 |
PRCYCoin
2.0.0.7rc1
P2P Digital Currency
|
Go to the documentation of this file.
5 #ifndef BITCOIN_QT_WALLETMODEL_H
6 #define BITCOIN_QT_WALLETMODEL_H
8 #if defined(HAVE_CONFIG_H)
25 #include <QAbstractTableModel>
75 template <
typename Stream,
typename Operation>
78 std::string sAddress =
address.toStdString();
79 std::string sLabel =
label.toStdString();
80 std::string sMessage =
message.toStdString();
92 if (ser_action.ForRead()) {
93 address = QString::fromStdString(sAddress);
94 label = QString::fromStdString(sLabel);
95 message = QString::fromStdString(sMessage);
152 void encryptKey(
const CKey key,
const std::string& pwd,
const std::string& slt, std::vector<unsigned char>& crypted);
153 void decryptKey(
const std::vector<unsigned char>& crypted,
const std::string& slt,
const std::string& pwd,
CKey&
key);
219 void getOutputs(
const std::vector<COutPoint>& vOutpoints, std::vector<COutput>& vOutputs);
221 void listCoins(std::map<QString, std::vector<COutput> >& mapCoins)
const;
230 bool saveReceiveRequest(
const std::string& sAddress,
const int64_t nId,
const std::string& sRequest);
275 void message(
const QString& title,
const QString&
message,
unsigned int style);
295 void updateAddressBook(
const QString& address,
const QString& label,
bool isMine,
const QString& purpose,
int status);
296 void updateAddressBook(
const QString& pubCoin,
const QString& isUsed,
int status);
306 std::vector<std::map<QString, QString> >
getTXs(
CWallet* wallet);
313 #endif // BITCOIN_QT_WALLETMODEL_H
bool changePassphrase(const SecureString &oldPass, const SecureString &newPass)
OptionsModel * getOptionsModel()
bool isMine(CBitcoinAddress address)
std::vector< std::map< QString, QString > > getTXs(CWallet *wallet)
void stakingStatusChanged(bool isStaking)
CAmount cachedWatchOnlyBalance
void listLockedCoins(std::vector< COutPoint > &vOutpts)
@ TransactionCommitFailed
TransactionTableModel * transactionTableModel
Interface to Bitcoin wallet from Qt view code.
@ TransactionCreationFailed
StakingStatusError getStakingStatusError(QString &)
base58-encoded PRCY addresses.
Qt model of the address book in the core.
bool backupWallet(const QString &filename)
AddressTableModel * getAddressTableModel()
SendCoinsReturn sendCoins(WalletModelTransaction &transaction)
@ AmountWithFeeExceedsBalance
bool setAddressBook(const CTxDestination &address, const std::string &strName, const std::string &strPurpose)
CAmount cachedWatchUnconfBalance
bool isShutdownRequested()
UnlockContext(const UnlockContext &obj)
void requireUnlock(AskPassphraseDialog::Context context)
bool checkBalanceChanged()
QString authenticatedMerchant
TransactionTableModel * getTransactionTableModel()
std::map< QString, QString > getTx(CWallet *wallet, uint256 hash)
A reference to a CKey: the Hash160 of its serialized public key.
bool getPubKey(const CKeyID &address, CPubKey &vchPubKeyOut) const
SendCoinsReturn(StatusCode status=OK)
CAmount cachedUnconfirmedBalance
CAmount cachedImmatureBalance
QAbstractTableModel * txTableModel
void decryptKey(const std::vector< unsigned char > &crypted, const std::string &slt, const std::string &pwd, CKey &key)
AddressTableModel * addressTableModel
CAmount cachedWatchImmatureBalance
Interface from Qt to configuration data structure for Bitcoin client.
void emitBalanceChanged()
CAmount getLockedBalance() const
void showProgress(const QString &title, int nProgress)
void lockCoin(COutPoint &output)
static const int CURRENT_VERSION
void unsubscribeFromCoreSignals()
bool validateAddress(const QString &address)
void updateWatchOnlyFlag(bool fHaveWatchonly)
bool saveReceiveRequest(const std::string &sAddress, const int64_t nId, const std::string &sRequest)
CKey generateNewKey() const
void message(const QString &title, const QString &message, unsigned int style)
bool lockForStakingOnly(const SecureString &passPhrase=SecureString())
QList< QString > getAddressBookData(CWallet *wallet)
std::basic_string< char, std::char_traits< char >, secure_allocator< char > > SecureString
bool isLockedCoin(uint256 hash, unsigned int n) const
void generateCoins(bool fGenerate, int nGenProcLimit)
EncryptionStatus getEncryptionStatus() const
CAmount getWatchImmatureBalance() const
int64_t CAmount
Amount in PRCY (Can be negative)
void loadReceiveRequests(std::vector< std::string > &vReceiveRequests)
UnlockContext & operator=(const UnlockContext &rhs)
CAmount getSpendableBalance() const
256-bit unsigned big integer.
SendCoinsRecipient(const QString &addr, const QString &label, const CAmount &amount, const QString &message)
bool getSeedPhrase(std::string &phrase) const
bool isSpent(const COutPoint &outpoint) const
boost::variant< CNoDestination, CKeyID, CScriptID > CTxDestination
A txout script template with a specific destination.
void SerializationOp(Stream &s, Operation ser_action, int nType, int nVersion)
UI model for the transaction table of a wallet.
An encapsulated public key.
void listCoins(std::map< QString, std::vector< COutput > > &mapCoins) const
bool setWalletEncrypted(bool encrypted, const SecureString &passphrase)
void unlockCoin(COutPoint &output)
OptionsModel * optionsModel
void getOutputs(const std::vector< COutPoint > &vOutpoints, std::vector< COutput > &vOutputs)
An encapsulated private key.
CAmount getMinStakingAmount() const
AvailableCoinsType inputType
std::string sPaymentRequest
A CWallet is an extension of a keystore, which also maintains a set of transactions and balances,...
bool fForceCheckBalanceChanged
A transaction with a bunch of additional info that only the owner cares about.
SendCoinsReturn prepareTransaction(WalletModelTransaction &transaction, const CCoinControl *coinControl=NULL)
void updateAddressBook(const QString &address, const QString &label, bool isMine, const QString &purpose, int status)
bool setWalletLocked(bool locked, const SecureString &passPhrase=SecureString(), bool stakingOnly=false)
CAmount getWatchBalance() const
void subscribeToCoreSignals()
An outpoint - a combination of a transaction hash and an index n into its vout.
CAmount getWatchUnconfirmedBalance() const
bool haveWatchOnly() const
bool isStakingOnlyUnlocked()
UnlockContext(bool valid, bool relock)
void encryptKey(const CKey key, const std::string &pwd, const std::string &slt, std::vector< unsigned char > &crypted)
void balanceChanged(const CAmount &balance, const CAmount &unconfirmedBalance, const CAmount &immatureBalance, const CAmount &watchOnlyBalance, const CAmount &watchUnconfBalance, const CAmount &watchImmatureBalance)
void CopyFrom(const UnlockContext &rhs)
QAbstractTableModel * getTxTableModel()
CAmount getUnconfirmedBalance() const
void pollBalanceChanged()
CAmount getImmatureBalance() const
UnlockContext requestUnlock(AskPassphraseDialog::Context context, bool relock=false)
WalletModel(CWallet *wallet, OptionsModel *optionsModel, QObject *parent=0)
std::string GetUniqueWalletBackupName()
Data model for a walletmodel transaction.
void notifyWatchonlyChanged(bool fHaveWatchonly)
EncryptionStatus cachedEncryptionStatus
void coinsSent(CWallet *wallet, SendCoinsRecipient recipient, QByteArray transaction)
CAmount getBalance(const CCoinControl *coinControl=NULL) const
void encryptionStatusChanged(int status)