Raven Core  3.0.0
P2P Digital Currency
reissueassetdialog.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2014 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_REISSUEASSETDIALOG_H
7 #define RAVEN_QT_REISSUEASSETDIALOG_H
8 
9 #include "walletmodel.h"
10 
11 #include <QDialog>
12 
13 class PlatformStyle;
14 class WalletModel;
15 class ClientModel;
16 class CNewAsset;
17 class QStringListModel;
18 class QSortFilterProxyModel;
19 class QCompleter;
20 
21 namespace Ui {
22  class ReissueAssetDialog;
23 }
24 
25 QT_BEGIN_NAMESPACE
26 class QModelIndex;
27 QT_END_NAMESPACE
28 
30 class ReissueAssetDialog : public QDialog
31 {
32 Q_OBJECT
33 
34 public:
35  explicit ReissueAssetDialog(const PlatformStyle *platformStyle, QWidget *parent = 0);
37 
38  void setClientModel(ClientModel *clientModel);
39  void setModel(WalletModel *model);
40 
41  QString formatGreen;
42  QString formatBlack;
43 
44  void setupCoinControlFrame(const PlatformStyle *platformStyle);
45  void setupAssetDataView(const PlatformStyle *platformStyle);
46  void setupFeeControl(const PlatformStyle *platformStyle);
47  void updateAssetsList();
48 
49  void clear();
50 
51  QStringListModel* stringModel;
52  QSortFilterProxyModel* proxy;
53  QCompleter* completer;
54 
55 private:
56  Ui::ReissueAssetDialog *ui;
61 
63 
64  void toggleIPFSText();
65  void setUpValues();
66  void showMessage(QString string);
67  void showValidMessage(QString string);
68  void hideMessage();
69  void disableReissueButton();
70  void enableReissueButton();
71  void CheckFormState();
72  void disableAll();
73  void enableDataEntry();
74  void buildUpdatedData();
75  void setDisplayedDataToNone();
76 
77  //CoinControl
78  // Update the passed in CCoinControl with state from the GUI
79  void updateCoinControlState(CCoinControl& ctrl);
80 
81  //Fee
82  void updateFeeMinimizedLabel();
83  void minimizeFeeSection(bool fMinimize);
84 
85  //Validation of IPFS
86  bool checkIPFSHash(QString hash);
87 
88 private Q_SLOTS:
89  void onAssetSelected(int index);
90  void onQuantityChanged(double qty);
91  void onIPFSStateChanged();
92  void onIPFSHashChanged(QString hash);
93  void onAddressNameChanged(QString address);
94  void onReissueAssetClicked();
95  void onReissueBoxChanged();
96  void onUnitChanged(int value);
97  void onClearButtonClicked();
98 
99  //CoinControl
100  void coinControlFeatureChanged(bool);
101  void coinControlButtonClicked();
102  void coinControlChangeChecked(int);
103  void coinControlChangeEdited(const QString &);
104  void coinControlClipboardQuantity();
105  void coinControlClipboardAmount();
106  void coinControlClipboardFee();
107  void coinControlClipboardAfterFee();
108  void coinControlClipboardBytes();
109  void coinControlClipboardLowOutput();
110  void coinControlClipboardChange();
111  void coinControlUpdateLabels();
112 
113  //Fee
114  void on_buttonChooseFee_clicked();
115  void on_buttonMinimizeFee_clicked();
116  void setMinimumFee();
117  void updateFeeSectionControls();
118  void updateMinFeeLabel();
119  void updateSmartFeeLabel();
120  void feeControlFeatureChanged(bool);
121 
122  void setBalance(const CAmount& balance, const CAmount& unconfirmedBalance, const CAmount& immatureBalance,
123  const CAmount& watchOnlyBalance, const CAmount& watchUnconfBalance, const CAmount& watchImmatureBalance);
124  void updateDisplayUnit();
125 
126  void focusReissueAsset(const QModelIndex &index);
127 
128 Q_SIGNALS:
129  // Fired when a message should be reported to the user
130  void message(const QString &title, const QString &message, unsigned int style);
131 };
132 
133 #endif // RAVEN_QT_REISSUEASSETDIALOG_H
Dialog showing transaction details.
const PlatformStyle * platformStyle
Coin Control Features.
Definition: coincontrol.h:17
int64_t CAmount
Amount in corbies (Can be negative)
Definition: amount.h:13
ClientModel * clientModel
Model for Raven network client.
Definition: clientmodel.h:39
Interface to Raven wallet from Qt view code.
Definition: walletmodel.h:165
Ui::ReissueAssetDialog * ui
QSortFilterProxyModel * proxy
QStringListModel * stringModel