Raven Core  3.0.0
P2P Digital Currency
sendassetsentry.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_SENDASSETSENTRY_H
7 #define RAVEN_QT_SENDASSETSENTRY_H
8 
9 #include "walletmodel.h"
10 
11 #include <QStackedWidget>
12 
13 class WalletModel;
14 class PlatformStyle;
15 class QStringListModel;
16 class QSortFilterProxyModel;
17 class QCompleter;
18 
19 namespace Ui {
20  class SendAssetsEntry;
21 }
22 
28 class SendAssetsEntry : public QStackedWidget
29 {
30  Q_OBJECT
31 
32 public:
33  explicit SendAssetsEntry(const PlatformStyle *platformStyle, const QStringList myAssetsNames, QWidget *parent = 0);
34  ~SendAssetsEntry();
35 
36  void setModel(WalletModel *model);
37  bool validate();
38  SendAssetsRecipient getValue();
39 
41  bool isClear();
42 
43  void setValue(const SendAssetsRecipient &value);
44  void setAddress(const QString &address);
45  void CheckOwnerBox();
46  void IsAssetControl(bool fIsAssetControl, bool fIsOwner);
47  void setCurrentIndex(int index);
48 
52  QWidget *setupTabChain(QWidget *prev);
53 
54  void setFocus();
55  void setFocusAssetListBox();
56 
59 
60  void refreshAssetList();
61  void switchAdministratorList(bool fSwitchStatus = true);
62 
63  QStringListModel* stringModel;
64  QSortFilterProxyModel* proxy;
65  QCompleter* completer;
66 
67  bool eventFilter(QObject *object, QEvent *event);
68 
69 
70 public Q_SLOTS:
71  void clear();
72 
73 Q_SIGNALS:
74  void removeEntry(SendAssetsEntry *entry);
75  void payAmountChanged();
76  void subtractFeeFromAmountChanged();
77 
78 private Q_SLOTS:
79  void deleteClicked();
80  void on_payTo_textChanged(const QString &address);
81  void on_addressBookButton_clicked();
82  void on_pasteButton_clicked();
83  void onAssetSelected(int index);
84  void onSendOwnershipChanged();
85 
86 private:
88  Ui::SendAssetsEntry *ui;
91 
92  bool updateLabel(const QString &address);
93 };
94 
95 #endif // RAVEN_QT_SENDASSETSENTRY_H
WalletModel * model
QCompleter * completer
A single entry in the dialog for sending ravens.
bool fShowAdministratorList
Ui::SendAssetsEntry * ui
bool fUsingAssetControl
const PlatformStyle * platformStyle
Interface to Raven wallet from Qt view code.
Definition: walletmodel.h:165
QSortFilterProxyModel * proxy
QStringListModel * stringModel
SendAssetsRecipient recipient