Bitcoin Core 28.99.0
P2P Digital Currency
addressbookpage.h
Go to the documentation of this file.
1// Copyright (c) 2011-2021 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
12class PlatformStyle;
13
14namespace Ui {
15 class AddressBookPage;
16}
17
18QT_BEGIN_NAMESPACE
19class QItemSelection;
20class QMenu;
21class QModelIndex;
22QT_END_NAMESPACE
23
26class AddressBookPage : public QDialog
27{
28 Q_OBJECT
29
30public:
31 enum Tabs {
33 ReceivingTab = 1
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
47public Q_SLOTS:
48 void done(int retval) override;
49
50private:
51 Ui::AddressBookPage *ui;
55 QString returnValue;
60
61private Q_SLOTS:
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
82Q_SIGNALS:
83 void sendCoins(QString addr);
84};
85
86#endif // BITCOIN_QT_ADDRESSBOOKPAGE_H
Widget that shows a list of sending or receiving addresses.
Ui::AddressBookPage * ui
void onEditAction()
Edit currently selected address entry (no button)
@ ForEditing
Open address book for editing.
@ ForSelection
Open address book to pick address.
void setModel(AddressTableModel *model)
void onCopyLabelAction()
Copy label of currently selected address entry to clipboard (no button)
QString newAddressToSelect
void done(int retval) override
AddressBookPage(const PlatformStyle *platformStyle, Mode mode, Tabs tab, QWidget *parent=nullptr)
void on_copyAddress_clicked()
Copy address of currently selected address entry to clipboard.
void on_exportButton_clicked()
Export button clicked.
void sendCoins(QString addr)
void on_deleteAddress_clicked()
Delete currently selected address entry.
void contextualMenu(const QPoint &point)
Spawn contextual menu (right mouse menu) for address book entry.
AddressTableModel * model
void updateWindowsTitleWithWalletName()
const QString & getReturnValue() const
void selectionChanged()
Set button states based on selected tab and selection.
void selectNewAddress(const QModelIndex &parent, int begin, int)
New entry/entries were added to address table.
void on_newAddress_clicked()
Create a new address for receiving coins and / or add a new address book entry.
AddressBookSortFilterProxyModel * proxyModel
Qt model of the address book in the core.