PIVX Core  5.6.99
P2P Digital Currency
Public Slots | Public Member Functions | Private Member Functions | Private Attributes | List of all members
GovernanceWidget Class Reference

#include <governancewidget.h>

Inheritance diagram for GovernanceWidget:
[legend]
Collaboration diagram for GovernanceWidget:
[legend]

Public Slots

void tierTwoSynced (bool IsSync)
 
void onFilterChanged (const QString &value)
 
void chainHeightChanged (int height)
 
void onVoteForPropClicked (const ProposalInfo &proposalInfo)
 
void onCreatePropClicked ()
 
void onMenuClicked (ProposalCard *card)
 
void onCopyUrl ()
 
void onOpenClicked ()
 
void onMoreInfoClicked ()
 

Public Member Functions

 GovernanceWidget (PIVXGUI *parent)
 
 ~GovernanceWidget () override
 
void showEvent (QShowEvent *event) override
 
void hideEvent (QHideEvent *event) override
 
void wheelEvent (QWheelEvent *event) override
 
void resizeEvent (QResizeEvent *event) override
 
void loadClientModel () override
 
void loadWalletModel () override
 
void setGovModel (GovernanceModel *_model)
 
void setMNModel (MNModel *_mnModel)
 
- Public Member Functions inherited from PWidget
 PWidget (PIVXGUI *_window=nullptr, QWidget *parent=nullptr)
 
 PWidget (PWidget *parent=nullptr)
 
void setClientModel (ClientModel *model)
 
void setWalletModel (WalletModel *model)
 
PIVXGUIgetWindow ()
 
void run (int type) override
 
void onError (QString error, int type) override
 
void inform (const QString &message)
 
void emitMessage (const QString &title, const QString &message, unsigned int style, bool *ret=nullptr)
 
QString translate (const char *msg) override
 

Private Member Functions

void showEmptyScreen (bool show)
 
void tryGridRefresh (bool force=false)
 
ProposalCardnewCard ()
 
void refreshCardsGrid (bool forceRefresh)
 
int calculateColumnsPerRow ()
 

Private Attributes

Ui::governancewidget * ui
 
GovernanceModelgovernanceModel {nullptr}
 
MNModelmnModel {nullptr}
 
bool isSync {false}
 
QGridLayout * gridLayout {nullptr}
 
std::vector< ProposalCard * > cards
 
int propsPerRow = 0
 
QTimer * refreshTimer {nullptr}
 
TooltipMenupropMenu {nullptr}
 
ProposalCardmenuCard {nullptr}
 
Optional< ProposalInfo::StatusstatusFilter {nullopt}
 

Additional Inherited Members

- Signals inherited from PWidget
void message (const QString &title, const QString &body, unsigned int style, bool *ret=nullptr)
 
void showHide (bool show)
 
bool execDialog (QDialog *dialog, int xDiv=3, int yDiv=5)
 
- Protected Slots inherited from PWidget
virtual void changeTheme (bool isLightTheme, QString &theme)
 
void onChangeTheme (bool isLightTheme, QString &theme)
 
- Protected Member Functions inherited from PWidget
void showHideOp (bool show)
 
bool execute (int type, std::unique_ptr< WalletModel::UnlockContext > pctx=nullptr)
 
void warn (const QString &title, const QString &message)
 
bool ask (const QString &title, const QString &message)
 
void showDialog (QDialog *dialog, int xDiv=3, int yDiv=5)
 
- Protected Attributes inherited from PWidget
PIVXGUIwindow = nullptr
 
ClientModelclientModel = nullptr
 
WalletModelwalletModel = nullptr
 

Detailed Description

Definition at line 55 of file governancewidget.h.

Constructor & Destructor Documentation

◆ GovernanceWidget()

GovernanceWidget::GovernanceWidget ( PIVXGUI parent)
explicit

Definition at line 35 of file governancewidget.cpp.

Here is the call graph for this function:

◆ ~GovernanceWidget()

GovernanceWidget::~GovernanceWidget ( )
override

Definition at line 101 of file governancewidget.cpp.

Member Function Documentation

◆ calculateColumnsPerRow()

int GovernanceWidget::calculateColumnsPerRow ( )
private

Definition at line 412 of file governancewidget.cpp.

Here is the caller graph for this function:

◆ chainHeightChanged

void GovernanceWidget::chainHeightChanged ( int  height)
slot

Definition at line 250 of file governancewidget.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hideEvent()

void GovernanceWidget::hideEvent ( QHideEvent *  event)
override

Definition at line 286 of file governancewidget.cpp.

Here is the call graph for this function:

◆ loadClientModel()

void GovernanceWidget::loadClientModel ( )
overridevirtual

Reimplemented from PWidget.

Definition at line 245 of file governancewidget.cpp.

Here is the call graph for this function:

◆ loadWalletModel()

void GovernanceWidget::loadWalletModel ( )
overridevirtual

Reimplemented from PWidget.

Definition at line 270 of file governancewidget.cpp.

Here is the call graph for this function:

◆ newCard()

ProposalCard * GovernanceWidget::newCard ( )
private

Definition at line 329 of file governancewidget.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ onCopyUrl

void GovernanceWidget::onCopyUrl ( )
slot

Definition at line 216 of file governancewidget.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ onCreatePropClicked

void GovernanceWidget::onCreatePropClicked ( )
slot

Definition at line 148 of file governancewidget.cpp.

Here is the call graph for this function:

◆ onFilterChanged

void GovernanceWidget::onFilterChanged ( const QString &  value)
slot

Definition at line 106 of file governancewidget.cpp.

◆ onMenuClicked

void GovernanceWidget::onMenuClicked ( ProposalCard card)
slot

Definition at line 191 of file governancewidget.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ onMoreInfoClicked

void GovernanceWidget::onMoreInfoClicked ( )
slot

Definition at line 236 of file governancewidget.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ onOpenClicked

void GovernanceWidget::onOpenClicked ( )
slot

Definition at line 223 of file governancewidget.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ onVoteForPropClicked

void GovernanceWidget::onVoteForPropClicked ( const ProposalInfo proposalInfo)
slot

Definition at line 126 of file governancewidget.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ refreshCardsGrid()

void GovernanceWidget::refreshCardsGrid ( bool  forceRefresh)
private

Definition at line 347 of file governancewidget.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resizeEvent()

void GovernanceWidget::resizeEvent ( QResizeEvent *  event)
override

Definition at line 299 of file governancewidget.cpp.

Here is the call graph for this function:

◆ setGovModel()

void GovernanceWidget::setGovModel ( GovernanceModel _model)

Definition at line 260 of file governancewidget.cpp.

◆ setMNModel()

void GovernanceWidget::setMNModel ( MNModel _mnModel)

Definition at line 265 of file governancewidget.cpp.

◆ showEmptyScreen()

void GovernanceWidget::showEmptyScreen ( bool  show)
private

Definition at line 339 of file governancewidget.cpp.

Here is the caller graph for this function:

◆ showEvent()

void GovernanceWidget::showEvent ( QShowEvent *  event)
override

Definition at line 275 of file governancewidget.cpp.

Here is the call graph for this function:

◆ tierTwoSynced

void GovernanceWidget::tierTwoSynced ( bool  IsSync)
slot

Definition at line 424 of file governancewidget.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tryGridRefresh()

void GovernanceWidget::tryGridRefresh ( bool  force = false)
private

Definition at line 305 of file governancewidget.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wheelEvent()

void GovernanceWidget::wheelEvent ( QWheelEvent *  event)
override

Definition at line 292 of file governancewidget.cpp.

Member Data Documentation

◆ cards

std::vector<ProposalCard*> GovernanceWidget::cards
private

Definition at line 90 of file governancewidget.h.

◆ governanceModel

GovernanceModel* GovernanceWidget::governanceModel {nullptr}
private

Definition at line 86 of file governancewidget.h.

◆ gridLayout

QGridLayout* GovernanceWidget::gridLayout {nullptr}
private

Definition at line 89 of file governancewidget.h.

◆ isSync

bool GovernanceWidget::isSync {false}
private

Definition at line 88 of file governancewidget.h.

◆ menuCard

ProposalCard* GovernanceWidget::menuCard {nullptr}
private

Definition at line 95 of file governancewidget.h.

◆ mnModel

MNModel* GovernanceWidget::mnModel {nullptr}
private

Definition at line 87 of file governancewidget.h.

◆ propMenu

TooltipMenu* GovernanceWidget::propMenu {nullptr}
private

Definition at line 94 of file governancewidget.h.

◆ propsPerRow

int GovernanceWidget::propsPerRow = 0
private

Definition at line 91 of file governancewidget.h.

◆ refreshTimer

QTimer* GovernanceWidget::refreshTimer {nullptr}
private

Definition at line 92 of file governancewidget.h.

◆ statusFilter

Optional<ProposalInfo::Status> GovernanceWidget::statusFilter {nullopt}
private

Definition at line 98 of file governancewidget.h.

◆ ui

Ui::governancewidget* GovernanceWidget::ui
private

Definition at line 85 of file governancewidget.h.


The documentation for this class was generated from the following files: