update QRCodeDialog
- remove unused #include <QDebug> and lblBTC label - update Bitcoin input field to a BitcoinAmountField to allow Bitcoin unit selection - use BitcoinUnits::format for the resulting amount parameter in the generated URI (always use BTC as per BIP21) - move MAX_URI_LENGTH and EXPORT_IMAGE_SIZE to guiconstants.h - add OptionsModel in AddressBookPage and use it in on_showQRCode_clicked() to pass it to QRCodeDialog - add OptionsModel in QRCodeDialog to enable display unit updates - add updateDisplayUnit() slot to be able to imediately update currently set bitcoin unit - make all labels in the UI-file plain text - resize dialog to match for an updated layout (fields are now stacked and new field) - remove unused parameters from private slots - only enable save button, when QR Code was generated - show message when entered amound is invalid - add read-only QPlainTextEdit field to output generated URI
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
namespace Ui {
|
||||
class QRCodeDialog;
|
||||
}
|
||||
class OptionsModel;
|
||||
|
||||
class QRCodeDialog : public QDialog
|
||||
{
|
||||
@@ -16,22 +17,25 @@ public:
|
||||
explicit QRCodeDialog(const QString &addr, const QString &label, bool enableReq, QWidget *parent = 0);
|
||||
~QRCodeDialog();
|
||||
|
||||
private slots:
|
||||
void on_lnReqAmount_textChanged(const QString &arg1);
|
||||
void on_lnLabel_textChanged(const QString &arg1);
|
||||
void on_lnMessage_textChanged(const QString &arg1);
|
||||
void on_btnSaveAs_clicked();
|
||||
void setModel(OptionsModel *model);
|
||||
|
||||
void on_chkReqPayment_toggled(bool checked);
|
||||
private slots:
|
||||
void on_lnReqAmount_textChanged();
|
||||
void on_lnLabel_textChanged();
|
||||
void on_lnMessage_textChanged();
|
||||
void on_btnSaveAs_clicked();
|
||||
void on_chkReqPayment_toggled(bool fChecked);
|
||||
|
||||
void updateDisplayUnit();
|
||||
|
||||
private:
|
||||
Ui::QRCodeDialog *ui;
|
||||
OptionsModel *model;
|
||||
QString address;
|
||||
QImage myImage;
|
||||
|
||||
QString getURI();
|
||||
QString address;
|
||||
|
||||
void genCode();
|
||||
QString getURI();
|
||||
};
|
||||
|
||||
#endif // QRCODEDIALOG_H
|
||||
|
||||
Reference in New Issue
Block a user