5 #ifndef PIVX_QT_GOVERNANCEMODEL_H
6 #define PIVX_QT_GOVERNANCEMODEL_H
52 int _votesYes,
int _votesNo, std::string _recipientAdd,
53 CAmount _amount,
int _totalPayments,
int _remainingPayments,
54 Status _status,
int _startBlock,
int _endBlock) :
132 const std::string& strURL,
135 const std::string& strPaymentAddr);
139 const std::vector<std::string>& mnVotingAlias);
146 void txLoaded(
const QString& hash,
const int txType,
const int txStatus);
int64_t CAmount
Amount in PIV (Can be negative)
An outpoint - a combination of a transaction hash and an index n into its vout.
Model for PIVX network client.
int getPropMaxPaymentsCount() const
~GovernanceModel() override
WalletModel * walletModel
int getNextSuperblockHeight() const
std::atomic< bool > refreshNeeded
GovernanceModel(ClientModel *_clientModel, MNModel *_mnModel)
OperationResult validatePropPaymentCount(int paymentCount) const
int getProposalVoteUpdateMinTime() const
std::vector< CBudgetProposal > waitingPropsForConfirmations
OperationResult validatePropURL(const QString &url) const
OperationResult validatePropName(const QString &name) const
ProposalInfo buildProposalInfo(const CBudgetProposal *prop, bool isPassing, bool isPending)
CAmount getBudgetAvailableAmount() const
void scheduleBroadcast(const CBudgetProposal &proposal)
ClientModel * clientModel
void txLoaded(const QString &hash, const int txType, const int txStatus)
OperationResult voteForProposal(const ProposalInfo &prop, bool isVotePositive, const std::vector< std::string > &mnVotingAlias)
CAmount getProposalFeeAmount() const
OperationResult validatePropAmount(CAmount amount) const
CAmount getBudgetAllocatedAmount() const
int getNumBlocksPerBudgetCycle() const
void pollGovernanceChanged()
void setWalletModel(WalletModel *_walletModel)
OperationResult createProposal(const std::string &strProposalName, const std::string &strURL, int nPaymentCount, CAmount nAmount, const std::string &strPaymentAddr)
std::list< ProposalInfo > getProposals(const ProposalInfo::Status *filterByStatus=nullptr, bool filterFinished=true)
CAmount getMaxAvailableBudgetAmount() const
std::vector< VoteInfo > getLocalMNsVotesForProposal(const ProposalInfo &propInfo)
UI model for a transaction.
Interface to PIVX wallet from Qt view code.
std::string recipientAdd
Payment script destination.
bool operator==(const ProposalInfo &prop2) const
ProposalInfo(const uint256 &_id, std::string _name, std::string _url, int _votesYes, int _votesNo, std::string _recipientAdd, CAmount _amount, int _totalPayments, int _remainingPayments, Status _status, int _startBlock, int _endBlock)
int remainingPayments
Amount of times that the proposal was paid already.
int endBlock
End superblock height.
int totalPayments
Amount of times that the proposal will be paid.
CAmount amount
Amount of PIV paid per month.
std::string statusToStr() const
Status status
Proposal state.
int startBlock
Start superblock height.
VoteInfo(const COutPoint _mnId, VoteDirection _vote, std::string _mnAlias, int64_t _time)