]> Git Repo - VerusCoin.git/blob - src/qt/editaddressdialog.h
Merge pull request #3145
[VerusCoin.git] / src / qt / editaddressdialog.h
1 // Copyright (c) 2011-2013 The Bitcoin developers
2 // Distributed under the MIT/X11 software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5 #ifndef EDITADDRESSDIALOG_H
6 #define EDITADDRESSDIALOG_H
7
8 #include <QDialog>
9
10 namespace Ui {
11     class EditAddressDialog;
12 }
13 class AddressTableModel;
14
15 QT_BEGIN_NAMESPACE
16 class QDataWidgetMapper;
17 QT_END_NAMESPACE
18
19 /** Dialog for editing an address and associated information.
20  */
21 class EditAddressDialog : public QDialog
22 {
23     Q_OBJECT
24
25 public:
26     enum Mode {
27         NewReceivingAddress,
28         NewSendingAddress,
29         EditReceivingAddress,
30         EditSendingAddress
31     };
32
33     explicit EditAddressDialog(Mode mode, QWidget *parent = 0);
34     ~EditAddressDialog();
35
36     void setModel(AddressTableModel *model);
37     void loadRow(int row);
38
39     QString getAddress() const;
40     void setAddress(const QString &address);
41
42 public slots:
43     void accept();
44
45 private:
46     bool saveCurrentRow();
47
48     Ui::EditAddressDialog *ui;
49     QDataWidgetMapper *mapper;
50     Mode mode;
51     AddressTableModel *model;
52
53     QString address;
54 };
55
56 #endif // EDITADDRESSDIALOG_H
This page took 0.027053 seconds and 4 git commands to generate.