2011-11-10 15:20:17 +01:00
|
|
|
#ifndef QRCODEDIALOG_H
|
|
|
|
#define QRCODEDIALOG_H
|
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
#include <QImage>
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class QRCodeDialog;
|
|
|
|
}
|
2012-06-24 18:28:05 +02:00
|
|
|
class OptionsModel;
|
2011-11-10 15:20:17 +01:00
|
|
|
|
|
|
|
class QRCodeDialog : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2012-04-11 23:05:22 +02:00
|
|
|
explicit QRCodeDialog(const QString &addr, const QString &label, bool enableReq, QWidget *parent = 0);
|
2011-11-10 15:20:17 +01:00
|
|
|
~QRCodeDialog();
|
|
|
|
|
2012-06-24 18:28:05 +02:00
|
|
|
void setModel(OptionsModel *model);
|
|
|
|
|
2011-11-10 15:20:17 +01:00
|
|
|
private slots:
|
2012-06-24 18:28:05 +02:00
|
|
|
void on_lnReqAmount_textChanged();
|
|
|
|
void on_lnLabel_textChanged();
|
|
|
|
void on_lnMessage_textChanged();
|
2011-11-10 15:20:17 +01:00
|
|
|
void on_btnSaveAs_clicked();
|
2012-06-24 18:28:05 +02:00
|
|
|
void on_chkReqPayment_toggled(bool fChecked);
|
2011-11-10 15:20:17 +01:00
|
|
|
|
2012-06-24 18:28:05 +02:00
|
|
|
void updateDisplayUnit();
|
2011-11-10 15:20:17 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
Ui::QRCodeDialog *ui;
|
2012-06-24 18:28:05 +02:00
|
|
|
OptionsModel *model;
|
2011-11-10 15:20:17 +01:00
|
|
|
QString address;
|
2012-06-24 18:28:05 +02:00
|
|
|
QImage myImage;
|
2011-11-10 15:20:17 +01:00
|
|
|
|
|
|
|
void genCode();
|
2012-06-24 18:28:05 +02:00
|
|
|
QString getURI();
|
2011-11-10 15:20:17 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // QRCODEDIALOG_H
|