Raven Core  3.0.0
P2P Digital Currency
addressbookpage.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2015 The Bitcoin Core developers
2 // Copyright (c) 2017-2019 The Raven Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
6 #ifndef RAVEN_QT_ADDRESSBOOKPAGE_H
7 #define RAVEN_QT_ADDRESSBOOKPAGE_H
8 
9 #include <QDialog>
10 
11 class AddressTableModel;
12 class PlatformStyle;
13 
14 namespace Ui {
15  class AddressBookPage;
16 }
17 
18 QT_BEGIN_NAMESPACE
19 class QItemSelection;
20 class QMenu;
21 class QModelIndex;
22 class QSortFilterProxyModel;
23 QT_END_NAMESPACE
24 
27 class AddressBookPage : public QDialog
28 {
29  Q_OBJECT
30 
31 public:
32  enum Tabs {
33  SendingTab = 0,
34  ReceivingTab = 1
35  };
36 
37  enum Mode {
39  ForEditing
40  };
41 
42  explicit AddressBookPage(const PlatformStyle *platformStyle, Mode mode, Tabs tab, QWidget *parent);
43  ~AddressBookPage();
44 
45  void setModel(AddressTableModel *model);
46  const QString &getReturnValue() const { return returnValue; }
47 
48 public Q_SLOTS:
49  void done(int retval);
50 
51 private:
52  Ui::AddressBookPage *ui;
56  QString returnValue;
57  QSortFilterProxyModel *proxyModel;
58  QMenu *contextMenu;
59  QAction *deleteAction; // to be able to explicitly disable it
61 
62 private Q_SLOTS:
64  void on_deleteAddress_clicked();
66  void on_newAddress_clicked();
68  void on_copyAddress_clicked();
70  void onCopyLabelAction();
72  void onEditAction();
74  void on_exportButton_clicked();
75 
77  void selectionChanged();
79  void contextualMenu(const QPoint &point);
81  void selectNewAddress(const QModelIndex &parent, int begin, int /*end*/);
82 
83 Q_SIGNALS:
84  void sendCoins(QString addr);
85 };
86 
87 #endif // RAVEN_QT_ADDRESSBOOKPAGE_H
AddressTableModel * model
QSortFilterProxyModel * proxyModel
Open address book to pick address.
QString newAddressToSelect
Ui::AddressBookPage * ui
QAction * deleteAction
Widget that shows a list of sending or receiving addresses.
Qt model of the address book in the core.
const QString & getReturnValue() const