Bitcoin Core  21.99.0
P2P Digital Currency
addressbookpage.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2020 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_ADDRESSBOOKPAGE_H
6 #define BITCOIN_QT_ADDRESSBOOKPAGE_H
7 
8 #include <QDialog>
9 
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 QT_END_NAMESPACE
23 
26 class AddressBookPage : public QDialog
27 {
28  Q_OBJECT
29 
30 public:
31  enum Tabs {
34  };
35 
36  enum Mode {
39  };
40 
41  explicit AddressBookPage(const PlatformStyle *platformStyle, Mode mode, Tabs tab, QWidget *parent = nullptr);
43 
45  const QString &getReturnValue() const { return returnValue; }
46 
47 public Q_SLOTS:
48  void done(int retval) override;
49 
50 private:
51  Ui::AddressBookPage *ui;
55  QString returnValue;
57  QMenu *contextMenu;
58  QAction *deleteAction; // to be able to explicitly disable it
60 
61 private Q_SLOTS:
65  void on_newAddress_clicked();
69  void onCopyLabelAction();
71  void onEditAction();
74 
76  void selectionChanged();
78  void contextualMenu(const QPoint &point);
80  void selectNewAddress(const QModelIndex &parent, int begin, int /*end*/);
81 
82 Q_SIGNALS:
83  void sendCoins(QString addr);
84 };
85 
86 #endif // BITCOIN_QT_ADDRESSBOOKPAGE_H
AddressBookPage::setModel
void setModel(AddressTableModel *model)
Definition: addressbookpage.cpp:148
AddressBookPage::SendingTab
@ SendingTab
Definition: addressbookpage.h:32
AddressBookPage::on_deleteAddress_clicked
void on_deleteAddress_clicked()
Delete currently selected address entry.
Definition: addressbookpage.cpp:224
AddressBookPage::newAddressToSelect
QString newAddressToSelect
Definition: addressbookpage.h:59
AddressBookPage::on_exportButton_clicked
void on_exportButton_clicked()
Export button clicked.
Definition: addressbookpage.cpp:293
AddressBookPage::contextualMenu
void contextualMenu(const QPoint &point)
Spawn contextual menu (right mouse menu) for address book entry.
Definition: addressbookpage.cpp:316
AddressTableModel
Qt model of the address book in the core.
Definition: addresstablemodel.h:23
AddressBookPage::on_newAddress_clicked
void on_newAddress_clicked()
Create a new address for receiving coins and / or add a new address book entry.
Definition: addressbookpage.cpp:207
AddressBookPage::contextMenu
QMenu * contextMenu
Definition: addressbookpage.h:57
AddressBookPage::proxyModel
AddressBookSortFilterProxyModel * proxyModel
Definition: addressbookpage.h:56
AddressBookPage::Mode
Mode
Definition: addressbookpage.h:36
AddressBookPage::onEditAction
void onEditAction()
Edit currently selected address entry (no button)
Definition: addressbookpage.cpp:186
AddressBookPage::done
void done(int retval) override
Definition: addressbookpage.cpp:270
AddressBookPage::on_copyAddress_clicked
void on_copyAddress_clicked()
Copy address of currently selected address entry to clipboard.
Definition: addressbookpage.cpp:176
AddressBookPage::model
AddressTableModel * model
Definition: addressbookpage.h:52
AddressBookPage::returnValue
QString returnValue
Definition: addressbookpage.h:55
AddressBookPage::selectionChanged
void selectionChanged()
Set button states based on selected tab and selection.
Definition: addressbookpage.cpp:237
AddressBookPage::ui
Ui::AddressBookPage * ui
Definition: addressbookpage.h:51
AddressBookPage
Widget that shows a list of sending or receiving addresses.
Definition: addressbookpage.h:26
AddressBookPage::selectNewAddress
void selectNewAddress(const QModelIndex &parent, int begin, int)
New entry/entries were added to address table.
Definition: addressbookpage.cpp:325
AddressBookPage::deleteAction
QAction * deleteAction
Definition: addressbookpage.h:58
AddressBookPage::~AddressBookPage
~AddressBookPage()
Definition: addressbookpage.cpp:143
Ui
Definition: addressbookpage.h:14
AddressBookPage::sendCoins
void sendCoins(QString addr)
AddressBookPage::tab
Tabs tab
Definition: addressbookpage.h:54
AddressBookSortFilterProxyModel
Definition: addressbookpage.cpp:23
AddressBookPage::AddressBookPage
AddressBookPage(const PlatformStyle *platformStyle, Mode mode, Tabs tab, QWidget *parent=nullptr)
Definition: addressbookpage.cpp:58
AddressBookPage::getReturnValue
const QString & getReturnValue() const
Definition: addressbookpage.h:45
AddressBookPage::onCopyLabelAction
void onCopyLabelAction()
Copy label of currently selected address entry to clipboard (no button)
Definition: addressbookpage.cpp:181
AddressBookPage::mode
Mode mode
Definition: addressbookpage.h:53
PlatformStyle
Definition: platformstyle.h:13
AddressBookPage::Tabs
Tabs
Definition: addressbookpage.h:31
AddressBookPage::ForEditing
@ ForEditing
Open address book for editing.
Definition: addressbookpage.h:38
AddressBookPage::ForSelection
@ ForSelection
Open address book to pick address.
Definition: addressbookpage.h:37
AddressBookPage::ReceivingTab
@ ReceivingTab
Definition: addressbookpage.h:33