PIVX Core  5.6.99
P2P Digital Currency
createproposaldialog.h
Go to the documentation of this file.
1 // Copyright (c) 2021 The PIVX Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or https://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef PIVX_QT_CREATEPROPOSALDIALOG_H
6 #define PIVX_QT_CREATEPROPOSALDIALOG_H
7 
8 #include <QDialog>
9 
10 namespace Ui {
12 class QPushButton;
13 }
14 
15 class ContactsDropdown;
16 class GovernanceModel;
17 class PIVXGUI;
18 class SnackBar;
19 class WalletModel;
20 
21 class CreateProposalDialog : public QDialog
22 {
23  Q_OBJECT
24 
25 public:
26  explicit CreateProposalDialog(PIVXGUI* parent, GovernanceModel* _govModel, WalletModel* _walletModel);
27  ~CreateProposalDialog() override;
28 protected:
29  void keyPressEvent(QKeyEvent* e) override;
30  void showEvent(QShowEvent* e) override;
31 public Q_SLOTS:
32  void onNextClicked();
33  void onBackClicked();
34  void propNameChanged(const QString& newText);
35  void propUrlChanged(const QString& newText);
36  void propAmountChanged(const QString& newText);
37  bool propaddressChanged(const QString& newText);
38  void onAddrListClicked();
39  void onGenAddressClicked();
40  void monthsEditDeselect(int i);
41 
42 private:
43  Ui::CreateProposalDialog *ui;
46  SnackBar* snackBar{nullptr};
47  QPushButton* icConfirm1{nullptr};
48  QPushButton* icConfirm2{nullptr};
49  QPushButton* icConfirm3{nullptr};
51  QAction* actAddrList{nullptr};
52  int pos = 0;
53 
54  void loadSummary();
55  void sendProposal();
56 
57  void setupPageOne();
58  void setupPageTwo();
59  void setupPageThree();
60 
61  bool validatePageOne();
62  bool validatePageTwo();
63 
64  void inform(const QString& text);
65 };
66 
67 #endif // PIVX_QT_CREATEPROPOSALDIALOG_H
void showEvent(QShowEvent *e) override
Ui::CreateProposalDialog * ui
void propUrlChanged(const QString &newText)
void propAmountChanged(const QString &newText)
bool propaddressChanged(const QString &newText)
GovernanceModel * govModel
void propNameChanged(const QString &newText)
CreateProposalDialog(PIVXGUI *parent, GovernanceModel *_govModel, WalletModel *_walletModel)
void keyPressEvent(QKeyEvent *e) override
void inform(const QString &text)
ContactsDropdown * menuContacts
PIVX GUI main class.
Definition: pivxgui.h:46
Interface to PIVX wallet from Qt view code.
Definition: walletmodel.h:109