PIVX Core  5.6.99
P2P Digital Currency
contactsdropdown.h
Go to the documentation of this file.
1 // Copyright (c) 2019-2021 The PIVX 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 PIVX_QT_CONTACTSDROPDOWN_H
6 #define PIVX_QT_CONTACTSDROPDOWN_H
7 
9 #include "addresstablemodel.h"
10 #include "contactdropdownrow.h"
12 #include "pwidget.h"
13 #include <QListView>
14 #include <QObject>
15 #include <QWidget>
16 
17 
18 class ContactsViewDelegate;
19 class ContViewHolder;
20 class WalletModel;
21 
22 
23 QT_BEGIN_NAMESPACE
24 class QModelIndex;
25 QT_END_NAMESPACE
26 
27 class ContactsDropdown : public PWidget
28 {
29  Q_OBJECT
30 public:
31  explicit ContactsDropdown(int minWidth, int minHeight, PWidget* parent = nullptr);
32  ContactsDropdown(int minWidth, int minHeight, PIVXGUI* _window = nullptr,
33  QWidget* parent = nullptr);
34 
35  void resizeList(int minWidth, int mintHeight);
36  void setWalletModel(WalletModel* _model, const QStringList& type);
37  void setType(const QStringList& type);
38  void changeTheme(bool isLightTheme, QString& theme) override;
39 Q_SIGNALS:
40  void contactSelected(QString address, QString label);
41 private:
45  QListView *list;
46  QFrame *frameList;
47  void init(int minWidth, int minHeight);
48 private Q_SLOTS:
49  void handleClick(const QModelIndex &index);
50 };
51 
52 #endif // PIVX_QT_CONTACTSDROPDOWN_H
Qt model of the address book in the core.
AddressFilterProxyModel * filter
FurAbstractListItemDelegate * delegate
ContactsDropdown(int minWidth, int minHeight, PWidget *parent=nullptr)
void handleClick(const QModelIndex &index)
void resizeList(int minWidth, int mintHeight)
void changeTheme(bool isLightTheme, QString &theme) override
void contactSelected(QString address, QString label)
void setType(const QStringList &type)
AddressTableModel * model
void setWalletModel(WalletModel *_model, const QStringList &type)
PIVX GUI main class.
Definition: pivxgui.h:46
void init()
Definition: pwidget.cpp:15
Interface to PIVX wallet from Qt view code.
Definition: walletmodel.h:109
bool isLightTheme()
Definition: qtutils.cpp:210