feather/src/widgets/QrCodeWidget.h

29 lines
590 B
C
Raw Normal View History

2021-07-03 22:06:24 +00:00
// SPDX-License-Identifier: BSD-3-Clause
2023-01-02 19:30:11 +00:00
// SPDX-FileCopyrightText: 2020-2023 The Monero Project
2021-07-03 22:06:24 +00:00
#ifndef FEATHER_QRCODEWIDGET_H
#define FEATHER_QRCODEWIDGET_H
#include <QWidget>
#include "qrcode/QrCode.h"
class QrCodeWidget : public QWidget
{
Q_OBJECT
public:
explicit QrCodeWidget(QWidget *parent = nullptr);
void setQrCode(QrCode *qrCode);
protected:
void paintEvent(QPaintEvent *event) override;
2021-10-01 17:10:46 +00:00
int heightForWidth(int w) const override;
bool hasHeightForWidth() const override;
2021-07-03 22:06:24 +00:00
private:
QrCode *m_qrcode = nullptr;
};
#endif //FEATHER_QRCODEWIDGET_H