 |
PRCYCoin
2.0.0.7rc1
P2P Digital Currency
|
Go to the documentation of this file.
29 #include <QActionGroup>
30 #include <QFileDialog>
31 #include <QHBoxLayout>
33 #include <QProgressDialog>
34 #include <QPushButton>
36 #include <QVBoxLayout>
46 QVBoxLayout* vbox =
new QVBoxLayout();
47 QHBoxLayout* hbox_buttons =
new QHBoxLayout();
50 QPushButton* exportButton =
new QPushButton(tr(
"&Export"),
this);
51 exportButton->setToolTip(tr(
"Export the data in the current tab to a file"));
52 hbox_buttons->addStretch();
54 QLabel* transactionSumLabel =
new QLabel();
55 transactionSumLabel->setObjectName(
"transactionSumLabel");
56 transactionSumLabel->setText(tr(
"Selected amount:"));
57 hbox_buttons->addWidget(transactionSumLabel);
62 transactionSum->setTextInteractionFlags(Qt::TextSelectableByMouse);
65 hbox_buttons->addWidget(exportButton);
66 vbox->addLayout(hbox_buttons);
92 connect(exportButton, SIGNAL(clicked()),
transactionView, SLOT(exportClicked()));
109 connect(
this, SIGNAL(
message(QString, QString,
unsigned int)), gui, SLOT(
message(QString, QString,
unsigned int)));
115 connect(
this, SIGNAL(
incomingTransaction(QString,
int,
CAmount, QString, QString, QString)), gui, SLOT(
incomingTransaction(QString,
int,
CAmount, QString, QString, QString)));
149 connect(
walletModel, SIGNAL(
message(QString, QString,
unsigned int)),
this, SIGNAL(
message(QString, QString,
unsigned int)));
233 multiSendDialog->show();
260 tr(
"Backup Wallet"), QString(),
261 tr(
"Wallet Data (*.dat)"), NULL);
263 if (filename.isEmpty())
280 msgBox.setWindowTitle(
"Mnemonic Recovery Phrase");
281 msgBox.setIcon(QMessageBox::Information);
282 msgBox.setText(
"Attempt to view Mnemonic Phrase failed or canceled. Wallet locked for security.");
285 LogPrintf(
"Attempt to view Mnemonic Phrase failed or canceled. Wallet locked for security.\n");
290 LogPrintf(
"Attempt to view Mnemonic Phrase successful.\n");
293 QMessageBox::StandardButton reply;
294 reply = QMessageBox::question(
this,
"Are You Sure?",
"Are you sure you would like to view your Mnemonic Phrase?\nYou will be required to enter your passphrase. Failed or canceled attempts will be logged.", QMessageBox::Yes|QMessageBox::No);
295 if (reply == QMessageBox::Yes) {
300 msgBox.setWindowTitle(
"Mnemonic Recovery Phrase");
301 msgBox.setIcon(QMessageBox::Information);
302 msgBox.setText(
"Attempt to view Mnemonic Phrase failed or canceled. Wallet locked for security.");
305 LogPrintf(
"Attempt to view Mnemonic Phrase failed or canceled. Wallet locked for security.\n");
310 LogPrintf(
"Attempt to view Mnemonic Phrase successful.\n");
313 LogPrintf(
"Attempt to view Mnemonic Phrase canceled.\n");
319 std::string recoverySeedPhrase =
"";
321 phrase = QString::fromStdString(recoverySeedPhrase);
325 QPushButton *copyButton = msgBox.addButton(tr(
"Copy"), QMessageBox::ActionRole);
326 QPushButton *okButton = msgBox.addButton(tr(
"OK"), QMessageBox::ActionRole);
327 copyButton->setStyleSheet(
"background:transparent;");
328 copyButton->setIcon(QIcon(
":/icons/editcopy"));
329 msgBox.setWindowTitle(
"Mnemonic Recovery Phrase");
330 msgBox.setText(
"Below is your Mnemonic Recovery Phrase, consisting of 24 seed words. Please copy/write these words down in order. We strongly recommend keeping multiple copies in different locations.");
331 msgBox.setInformativeText(
"\n<b>" + phrase +
"</b>");
335 if (msgBox.clickedButton() == copyButton) {
390 dlg->setAttribute(Qt::WA_DeleteOnClose);
400 dlg->setAttribute(Qt::WA_DeleteOnClose);
407 if (nProgress == 0) {
414 }
else if (nProgress == 100) {
SendCoinsDialog * sendCoinsPage
Widget showing the transaction list for a wallet, including a filter row.
OptionsModel * getOptionsModel()
void setModel(AddressTableModel *model)
Dialog for requesting payment of bitcoins.
TransactionView * transactionView
@ Encrypt
Wallet needs to be fully unlocked.
WalletView(QWidget *parent)
bool inInitialBlockDownload() const
Return true if core is doing initial block download.
void setModel(WalletModel *model)
Interface to Bitcoin wallet from Qt view code.
void showBlockSync(bool fShow)
BlockExplorer * explorerWindow
void gotoReceiveCoinsPage()
Switch to receive coins page.
bool backupWallet(const QString &filename)
OverviewPage * overviewPage
AddressTableModel * getAddressTableModel()
void setWalletModel(WalletModel *walletModel)
Overview ("home") page widget.
Multifunctional dialog to ask for passphrases.
void showProgress(const QString &title, int nProgress)
Show progress dialog e.g.
ClientModel * clientModel
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
TransactionTableModel * getTransactionTableModel()
@ Decrypt
Ask passphrase and decrypt wallet.
void updateTableData(CWallet *wallet)
OptionsPage * optionsPage
void gotoSendCoinsPage(QString addr="")
Switch to send coins page.
void setModel(WalletModel *model)
void stakingStatusChanged(bool)
void setClipboard(const QString &str)
void processNewTransaction(const QModelIndex &parent, int start, int)
Show incoming transaction notification for new transactions.
@ ChangePass
Toggle wallet lock state.
void emitBalanceChanged()
void encryptionStatusChanged(int status)
Encryption status of wallet changed.
void setClientModel(ClientModel *clientModel)
Set the client model.
Masternode Manager page widget.
void trxAmount(QString amount)
Update selected PRCY amount from transactionview.
std::basic_string< char, std::char_traits< char >, secure_allocator< char > > SecureString
void setClientModel(ClientModel *clientModel)
void updateEncryptionStatus()
Re-Q_EMIT encryption status signal.
void message(const QString &title, const QString &message, unsigned int style)
Fired when a message should be reported to the user.
@ Unlock_Full
Unlock wallet from menu
EncryptionStatus getEncryptionStatus() const
int64_t CAmount
Amount in PRCY (Can be negative)
Widget that shows a list of sending or receiving addresses.
void toggleLockWallet()
Toggle wallet lock state.
Dialog for sending bitcoins.
QWidget * transactionsPage
bool getSeedPhrase(std::string &phrase) const
bool processingQueuedTransactions()
@ ToggleLock
Encrypt unencrypted wallet.
@ Encrypt
Ask passphrase twice and encrypt.
QString getSaveFileName(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedSuffixOut)
Get save filename, mimics QFileDialog::getSaveFileName, except that it appends a default suffix when ...
void gotoBlockExplorerPage()
Switch to explorer page.
HistoryPage * historyPage
void gotoOptionsPage()
Switch to options page.
Model for PRCY network client.
void unlockWallet(AskPassphraseDialog::Context context)
Ask for passphrase to unlock wallet temporarily.
@ ChangePass
Ask old passphrase + new passphrase twice.
UI model for the transaction table of a wallet.
int64_t GetAdjustedTime()
void showSeedPhrase()
Return 24 word seed phrase.
void gotoOverviewPage()
Switch to overview (home) page.
void setClientModel(ClientModel *clientModel)
void setWalletModel(WalletModel *walletModel)
Set the wallet model.
void changePassphrase()
Change encrypted wallet passphrase.
void encryptWallet(bool status)
Encrypt the wallet.
void setModel(WalletModel *model)
void setModel(WalletModel *model)
bool setWalletLocked(bool locked, const SecureString &passPhrase=SecureString(), bool stakingOnly=false)
WalletModel * walletModel
void backupWallet()
Backup the wallet.
ReceiveCoinsDialog * receiveCoinsPage
void setWalletModel(WalletModel *walletModel)
MasternodeList * masternodeListPage
void incomingTransaction(const QString &date, int unit, const CAmount &amount, const QString &type, const QString &address, const QString &confirmations)
Notify that a new transaction appeared.
void gotoMultiSendDialog()
Show MultiSend Dialog.
void usedSendingAddresses()
Show used sending addresses.
void setBitcoinGUI(BitcoinGUI *gui)
void usedReceivingAddresses()
Show used receiving addresses.
void lockWallet()
Lock wallet.
QString loadStyleSheet()
Load global CSS theme.
void setClientModel(ClientModel *clientModel)
void gotoMasternodePage()
Switch to masternode page.
UnlockContext requestUnlock(AskPassphraseDialog::Context context, bool relock=false)
void gotoHistoryPage()
Switch to history (transactions) page.
@ ForEditing
Open address book for editing.
void setModel(WalletModel *model)
@ UnlockStaking
Ask passphrase and unlock only for staking.
void setModel(WalletModel *model)
QProgressDialog * progressDialog
void showSyncStatus(bool fShow)