Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

qrdialog.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2015 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef BITCOIN_QT_QRDIALOG_H
6 #define BITCOIN_QT_QRDIALOG_H
7 
8 #include <qt/walletmodel.h>
9 
10 #include <QDialog>
11 #include <QImage>
12 #include <QLabel>
13 
14 class OptionsModel;
15 
16 namespace Ui {
17  class QRDialog;
18 }
19 
20 QT_BEGIN_NAMESPACE
21 class QMenu;
22 QT_END_NAMESPACE
23 
24 /* Label widget for QR code. This image can be dragged, dropped, copied and saved
25  * to disk.
26  */
27 class QRGeneralImageWidget : public QLabel
28 {
29  Q_OBJECT
30 
31 public:
32  explicit QRGeneralImageWidget(QWidget *parent = 0);
33  QImage exportImage();
34 
35 public Q_SLOTS:
36  void saveImage();
37  void copyImage();
38 
39 protected:
40  virtual void mousePressEvent(QMouseEvent *event);
41  virtual void contextMenuEvent(QContextMenuEvent *event);
42 
43 private:
44  QMenu *contextMenu;
45 };
46 
47 class QRDialog : public QDialog
48 {
49  Q_OBJECT
50 
51 public:
52  explicit QRDialog(QWidget *parent = 0);
53  ~QRDialog();
54 
56  void setInfo(QString strWindowtitle, QString strQRCode, QString strTextInfo, QString strQRCodeTitle);
57 
58 private Q_SLOTS:
59  void update();
60 
61 private:
62  Ui::QRDialog *ui;
64  QString strWindowtitle;
65  QString strQRCode;
66  QString strTextInfo;
67  QString strQRCodeTitle;
68 };
69 
70 #endif // BITCOIN_QT_QRDIALOG_H
void setInfo(QString strWindowtitle, QString strQRCode, QString strTextInfo, QString strQRCodeTitle)
Definition: qrdialog.cpp:128
void setModel(OptionsModel *model)
Definition: qrdialog.cpp:117
QImage exportImage()
Definition: qrdialog.cpp:45
QString strTextInfo
Definition: qrdialog.h:66
QString strQRCode
Definition: qrdialog.h:65
virtual void mousePressEvent(QMouseEvent *event)
Definition: qrdialog.cpp:52
QRGeneralImageWidget(QWidget *parent=0)
Definition: qrdialog.cpp:33
QString strWindowtitle
Definition: qrdialog.h:64
OptionsModel * model
Definition: qrdialog.h:63
void update()
Definition: qrdialog.cpp:137
Interface from Qt to configuration data structure for Bitcoin client.
Definition: optionsmodel.h:25
virtual void contextMenuEvent(QContextMenuEvent *event)
Definition: qrdialog.cpp:86
QString strQRCodeTitle
Definition: qrdialog.h:67
QRDialog(QWidget *parent=0)
Definition: qrdialog.cpp:93
Ui::QRDialog * ui
Definition: qrdialog.h:62
QMenu * contextMenu
Definition: qrdialog.h:44
Released under the MIT license