mirror of
https://github.com/wownero/wowlet.git
synced 2026-10-26 02:38:33 +01:00
45 lines
852 B
C++
45 lines
852 B
C++
// SPDX-License-Identifier: BSD-3-Clause
|
|
// SPDX-FileCopyrightText: 2020-2023 The Monero Project
|
|
|
|
#ifndef FEATHER_URWIDGET_H
|
|
#define FEATHER_URWIDGET_H
|
|
|
|
#include <QWidget>
|
|
#include <QTimer>
|
|
|
|
#include "qrcode/QrCode.h"
|
|
#include "widgets/QrCodeWidget.h"
|
|
#include <bcur/bc-ur.hpp>
|
|
|
|
namespace Ui {
|
|
class URWidget;
|
|
}
|
|
|
|
class URWidget : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit URWidget(QWidget *parent = nullptr);
|
|
~URWidget();
|
|
|
|
void setData(const QString &type, const std::string &data);
|
|
|
|
private slots:
|
|
void nextQR();
|
|
void setOptions();
|
|
|
|
private:
|
|
QScopedPointer<Ui::URWidget> ui;
|
|
QTimer m_timer;
|
|
ur::UREncoder *m_urencoder = nullptr;
|
|
QrCode *m_code = nullptr;
|
|
QList<std::string> allParts;
|
|
qsizetype currentIndex = 0;
|
|
|
|
std::string m_data;
|
|
QString m_type;
|
|
};
|
|
|
|
#endif //FEATHER_URWIDGET_H
|