5 #if defined(HAVE_CONFIG_H) 24 #include <validation.h> 34 #endif // ENABLE_WALLET 48 #include <QApplication> 50 #include <QDesktopWidget> 51 #include <QDragEnterEvent> 52 #include <QListWidget> 54 #include <QMessageBox> 56 #include <QProgressDialog> 59 #include <QStackedWidget> 64 #include <QVBoxLayout> 65 #include <QDockWidget> 68 #if QT_VERSION < 0x050000 69 #include <QTextDocument> 78 #elif defined(Q_OS_WIN) 97 unitDisplayControl(0),
98 labelWalletEncryptionIcon(0),
99 labelWalletHDStatusIcon(0),
100 connectionsControl(0),
112 sendCoinsMenuAction(0),
113 usedSendingAddressesAction(0),
114 usedReceivingAddressesAction(0),
115 signMessageAction(0),
116 verifyMessageAction(0),
118 receiveCoinsAction(0),
119 receiveCoinsMenuAction(0),
122 encryptWalletAction(0),
123 backupWalletAction(0),
124 restoreWalletAction(0),
125 changePassphraseAction(0),
126 unlockWalletAction(0),
129 openRPCConsoleAction(0),
131 showHelpMessageAction(0),
132 smartContractAction(0),
133 createContractAction(0),
134 sendToContractAction(0),
135 callContractAction(0),
138 receiveTokenAction(0),
144 helpMessageDialog(0),
146 fabcoinVersionChecker(0),
147 modalBackupOverlay(0),
150 platformStyle(_platformStyle)
153 if (!restoreGeometry(settings.value(
"MainWindowGeometry").toByteArray())) {
155 move(QApplication::desktop()->availableGeometry().center() - frameGeometry().center());
161 #endif // ENABLE_WALLET 164 windowTitle += tr(
"Wallet");
166 windowTitle += tr(
"Node");
175 setWindowTitle(windowTitle);
177 #if defined(Q_OS_MAC) && QT_VERSION < 0x050000 180 setUnifiedTitleAndToolBarOnMac(
true);
192 #endif // ENABLE_WALLET 201 setAcceptDrops(
true);
223 statusBar()->setSizeGripEnabled(
true);
224 statusBar()->addWidget(
new QSizeGrip(statusBar()));
225 statusBar()->setStyleSheet(
"QSizeGrip { width: 3px; height: 25px; border: 0px solid black; } \n QStatusBar::item { border: 0px solid black; }");
228 QFrame *frameBlocks =
new QFrame();
229 frameBlocks->setContentsMargins(0,0,0,0);
230 frameBlocks->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
231 QHBoxLayout *frameBlocksLayout =
new QHBoxLayout(frameBlocks);
232 frameBlocksLayout->setContentsMargins(3,0,0,0);
233 frameBlocksLayout->setSpacing(3);
242 frameBlocksLayout->addStretch();
244 frameBlocksLayout->addStretch();
248 frameBlocksLayout->addStretch();
250 frameBlocksLayout->addStretch();
252 frameBlocksLayout->addStretch();
254 frameBlocksLayout->addStretch();
260 timerStakingIcon->start(1000);
275 QString curStyle = QApplication::style()->metaObject()->className();
276 if(curStyle ==
"QWindowsStyle" || curStyle ==
"QWindowsXPStyle")
278 progressBar->setStyleSheet(
"QProgressBar { background-color: #e8e8e8; border: 1px solid grey; border-radius: 7px; padding: 1px; text-align: center; } QProgressBar::chunk { background: QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #FF8000, stop: 1 orange); border-radius: 7px; margin: 0px; }");
283 statusBar()->addPermanentWidget(frameBlocks);
286 this->installEventFilter(
this);
303 QString
message(tr(
"New version of Fabcoin wallet is available on the Fabcoin source code repository: <br /> %1. <br />It is recommended to download it and update this application").arg(link));
304 QMessageBox::information(
this, tr(
"Check for updates"), message);
316 setStyleSheet(
"QMainWindow::separator { width: 1px; height: 1px; margin: 0px; padding: 0px; }");
325 settings.setValue(
"MainWindowGeometry", saveGeometry());
338 QActionGroup *tabGroup =
new QActionGroup(
this);
341 overviewAction->setStatusTip(tr(
"Show general overview of wallet"));
359 receiveCoinsAction->setStatusTip(tr(
"Request payments (generates QR codes and fabcoin: URIs)"));
381 historyAction->setStatusTip(tr(
"Browse transaction history"));
384 historyAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_5));
388 QRCTokenAction->setStatusTip(tr(
"FRC Tokens (send, receive or add Tokens in list)"));
402 connect(
overviewAction, SIGNAL(triggered()),
this, SLOT(gotoOverviewPage()));
404 connect(
sendCoinsAction, SIGNAL(triggered()),
this, SLOT(gotoSendCoinsPage()));
412 connect(
historyAction, SIGNAL(triggered()),
this, SLOT(gotoHistoryPage()));
420 connect(
sendTokenAction, SIGNAL(triggered()),
this, SLOT(gotoSendTokenPage()));
424 connect(
addTokenAction, SIGNAL(triggered()),
this, SLOT(gotoAddTokenPage()));
425 #endif // ENABLE_WALLET 428 quitAction->setStatusTip(tr(
"Quit application"));
429 quitAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q));
436 aboutQtAction->setStatusTip(tr(
"Show information about Qt"));
446 encryptWalletAction->setStatusTip(tr(
"Encrypt the private keys that belong to your wallet"));
460 signMessageAction->setStatusTip(tr(
"Sign messages with your Fabcoin addresses to prove you own them"));
462 verifyMessageAction->setStatusTip(tr(
"Verify messages to ensure they were signed with specified Fabcoin addresses"));
475 openAction->setStatusTip(tr(
"Open a fabcoin: URI or payment request"));
481 connect(
quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
483 connect(
aboutQtAction, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
500 connect(
signMessageAction, SIGNAL(triggered()),
this, SLOT(gotoSignMessageTab()));
504 connect(
openAction, SIGNAL(triggered()),
this, SLOT(openClicked()));
506 #endif // ENABLE_WALLET 509 new QShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_D),
this, SLOT(
showDebugWindow()));
523 QMenu *file =
appMenuBar->addMenu(tr(
"&File"));
531 file->addSeparator();
534 file->addSeparator();
538 QMenu *settings =
appMenuBar->addMenu(tr(
"&Settings"));
545 settings->addSeparator();
555 help->addSeparator();
573 QList<QAction*> contractActions;
578 QList<QAction*> tokenActions;
610 connect(_clientModel, SIGNAL(numConnectionsChanged(
int)),
this, SLOT(
setNumConnections(
int)));
611 connect(_clientModel, SIGNAL(networkActiveChanged(
bool)),
this, SLOT(
setNetworkActive(
bool)));
615 connect(_clientModel, SIGNAL(numBlocksChanged(
int,QDateTime,
double,
bool)),
this, SLOT(
setNumBlocks(
int,QDateTime,
double,
bool)));
618 connect(_clientModel, SIGNAL(
message(QString,QString,
unsigned int)),
this, SLOT(
message(QString,QString,
unsigned int)));
629 #endif // ENABLE_WALLET 636 connect(optionsModel,SIGNAL(hideTrayIconChanged(
bool)),
this,SLOT(
setTrayIconVisible(
bool)));
658 #endif // ENABLE_WALLET 664 bool FabcoinGUI::addWallet(
const QString&
name,
WalletModel *walletModel)
677 bool FabcoinGUI::setCurrentWallet(
const QString&
name)
684 void FabcoinGUI::removeAllWallets()
691 #endif // ENABLE_WALLET 715 trayIcon =
new QSystemTrayIcon(
this);
735 connect(
trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
755 #ifndef Q_OS_MAC // This is built-in on Mac 764 if(reason == QSystemTrayIcon::Trigger)
811 void FabcoinGUI::openClicked()
820 void FabcoinGUI::gotoOverviewPage()
826 void FabcoinGUI::gotoHistoryPage()
832 void FabcoinGUI::gotoSendTokenPage()
839 void FabcoinGUI::gotoReceiveTokenPage()
846 void FabcoinGUI::gotoAddTokenPage()
853 void FabcoinGUI::gotoReceiveCoinsPage()
859 void FabcoinGUI::gotoSendCoinsPage(QString addr)
865 void FabcoinGUI::gotoCreateContractPage()
870 void FabcoinGUI::gotoSendToContractPage()
875 void FabcoinGUI::gotoCallContractPage()
880 void FabcoinGUI::gotoSignMessageTab(QString addr)
885 void FabcoinGUI::gotoVerifyMessageTab(QString addr)
889 #endif // ENABLE_WALLET 897 case 0: icon =
":/icons/connect_0";
break;
898 case 1:
case 2:
case 3: icon =
":/icons/connect_1";
break;
899 case 4:
case 5:
case 6: icon =
":/icons/connect_2";
break;
900 case 7:
case 8:
case 9: icon =
":/icons/connect_3";
break;
901 default: icon =
":/icons/connect_4";
break;
907 tooltip = tr(
"%n active connection(s) to Fabcoin network",
"", count) + QString(
".<br>") + tr(
"Click to disable network activity.");
909 tooltip = tr(
"Network activity disabled.") + QString(
"<br>") + tr(
"Click to enable network activity again.");
910 icon =
":/icons/network_disabled";
914 tooltip = QString(
"<nobr>") + tooltip + QString(
"</nobr>");
917 connectionsControl->setPixmap(QIcon(icon).pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
935 if (estHeadersLeft > HEADER_HEIGHT_DELTA_SYNC)
936 progressBarLabel->setText(tr(
"Syncing Headers (%1%)...").arg(QString::number(100.0 / (headersTipHeight+estHeadersLeft)*headersTipHeight,
'f', 1)));
952 statusBar()->clearMessage();
956 switch (blockSource) {
985 QDateTime currentDate = QDateTime::currentDateTime();
986 qint64 secs = blockDate.secsTo(currentDate);
988 tooltip = tr(
"Processed %n block(s) of transaction history.",
"", count);
993 tooltip = tr(
"Up to date") + QString(
".<br>") + tooltip;
994 labelBlocksIcon->setPixmap(QIcon(
":/icons/synced").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
1002 #endif // ENABLE_WALLET 1011 QMetaObject::invokeMethod(
clientModel,
"tipChanged", Qt::QueuedConnection);
1019 progressBar->setFormat(tr(
"%1 behind").arg(timeBehindText));
1021 progressBar->setValue(nVerificationProgress * 1000000000.0 + 0.5);
1024 tooltip = tr(
"Catching up...") + QString(
"<br>") + tooltip;
1028 ":/movies/spinner-%1").arg(
spinnerFrame, 3, 10, QChar(
'0')))
1029 .pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
1034 #ifdef ENABLE_WALLET 1040 #endif // ENABLE_WALLET 1042 tooltip += QString(
"<br>");
1043 tooltip += tr(
"Last received block was generated %1 ago.").arg(timeBehindText);
1044 tooltip += QString(
"<br>");
1045 tooltip += tr(
"Transactions after this will not yet be visible.");
1049 tooltip = QString(
"<nobr>") + tooltip + QString(
"</nobr>");
1058 QString strTitle = tr(
"Fabcoin");
1060 int nMBoxIcon = QMessageBox::Information;
1066 if (!title.isEmpty()) {
1072 msgType = tr(
"Error");
1075 msgType = tr(
"Warning");
1078 msgType = tr(
"Information");
1085 if (!msgType.isEmpty())
1086 strTitle +=
" - " + msgType;
1090 nMBoxIcon = QMessageBox::Critical;
1094 nMBoxIcon = QMessageBox::Warning;
1101 QMessageBox::StandardButton buttons;
1103 buttons = QMessageBox::Ok;
1106 QMessageBox mBox((QMessageBox::Icon)nMBoxIcon, strTitle, message, buttons,
this);
1107 int r = mBox.exec();
1109 *ret = r == QMessageBox::Ok;
1117 QMainWindow::changeEvent(e);
1118 #ifndef Q_OS_MAC // Ignored on Mac 1119 if(e->type() == QEvent::WindowStateChange)
1123 QWindowStateChangeEvent *wsevt =
static_cast<QWindowStateChangeEvent*
>(
e);
1124 if(!(wsevt->oldState() & Qt::WindowMinimized) && isMinimized())
1126 QTimer::singleShot(0,
this, SLOT(hide()));
1136 #ifndef Q_OS_MAC // Ignored on Mac 1144 QApplication::quit();
1148 QMainWindow::showMinimized();
1153 QMainWindow::closeEvent(event);
1165 #ifdef ENABLE_WALLET 1166 void FabcoinGUI::incomingTransaction(
const QString& date,
int unit,
const CAmount& amount,
const QString&
type,
const QString&
address,
const QString& label)
1169 QString msg = tr(
"Date: %1\n").arg(date) +
1171 tr(
"Type: %1\n").arg(
type);
1172 if (!label.isEmpty())
1173 msg += tr(
"Label: %1\n").arg(label);
1175 msg += tr(
"Address: %1\n").arg(
address);
1176 message((amount)<0 ? tr(
"Sent transaction") : tr(
"Incoming transaction"),
1180 void FabcoinGUI::incomingTokenTransaction(
const QString& date,
const QString& amount,
const QString&
type,
const QString&
address,
const QString& label,
const QString& title)
1183 QString msg = tr(
"Date: %1\n").arg(date) +
1184 tr(
"Amount: %1\n").arg(amount) +
1185 tr(
"Type: %1\n").arg(
type);
1186 if (!label.isEmpty())
1187 msg += tr(
"Label: %1\n").arg(label);
1189 msg += tr(
"Address: %1\n").arg(
address);
1192 #endif // ENABLE_WALLET 1197 if(event->mimeData()->hasUrls())
1198 event->acceptProposedAction();
1203 if(event->mimeData()->hasUrls())
1205 for (
const QUrl &uri : event->mimeData()->urls())
1210 event->acceptProposedAction();
1216 if (event->type() == QEvent::StatusTip)
1222 return QMainWindow::eventFilter(
object, event);
1225 #ifdef ENABLE_WALLET 1232 gotoSendCoinsPage();
1238 void FabcoinGUI::setHDStatus(
int hdEnabled)
1240 labelWalletHDStatusIcon->setPixmap(QIcon(hdEnabled ?
":/icons/hd_enabled" :
":/icons/hd_disabled").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
1241 labelWalletHDStatusIcon->setToolTip(hdEnabled ? tr(
"HD key generation is <b>enabled</b>") : tr(
"HD key generation is <b>disabled</b>"));
1247 void FabcoinGUI::setEncryptionStatus(
int status)
1289 #endif // ENABLE_WALLET 1302 else if (isMinimized())
1312 else if(fToggleHidden)
1334 #ifdef ENABLE_WALLET 1351 int nLastCoinStakeSearchInterval =0;
1352 if (nLastCoinStakeSearchInterval &&
nWeight)
1355 uint64_t nNetworkWeight = 0 ;
1359 unsigned nEstimateTime = nTargetSpacing * nNetworkWeight /
nWeight;
1362 if (nEstimateTime < 60)
1364 text = tr(
"%n second(s)",
"", nEstimateTime);
1366 else if (nEstimateTime < 60*60)
1368 text = tr(
"%n minute(s)",
"", nEstimateTime/60);
1370 else if (nEstimateTime < 24*60*60)
1372 text = tr(
"%n hour(s)",
"", nEstimateTime/(60*60));
1376 text = tr(
"%n day(s)",
"", nEstimateTime/(60*60*24));
1380 nNetworkWeight /= COIN;
1382 labelStakingIcon->setPixmap(QIcon(
":/icons/staking_on").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
1383 labelStakingIcon->setToolTip(tr(
"Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3").arg(nWeight).arg(nNetworkWeight).arg(text));
1387 labelStakingIcon->setPixmap(QIcon(
":/icons/staking_off").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
1394 labelStakingIcon->setToolTip(tr(
"Not staking because you don't have mature coins"));
1395 else if (pwalletMain && pwalletMain->
IsLocked())
1423 else if (nProgress == 100)
1439 trayIcon->setVisible(!fHideTrayIcon);
1463 static bool ThreadSafeMessageBox(
FabcoinGUI *gui,
const std::string&
message,
const std::string& caption,
unsigned int style)
1471 QMetaObject::invokeMethod(gui,
"message",
1473 Q_ARG(QString, QString::fromStdString(caption)),
1474 Q_ARG(QString, QString::fromStdString(
message)),
1475 Q_ARG(
unsigned int, style),
1476 Q_ARG(
bool*, &ret));
1503 QDockWidget *dock =
new QDockWidget(
this);
1504 dock->setFeatures(QDockWidget::NoDockWidgetFeatures);
1505 dock->setAllowedAreas(area);
1506 QWidget* titleBar =
new QWidget();
1507 titleBar->setMaximumSize(0, 0);
1508 dock->setTitleBarWidget(titleBar);
1509 dock->setWidget(widget);
1510 addDockWidget(area, dock);
1518 setToolTip(tr(
"Unit to show amounts in. Click to select another unit."));
1521 const QFontMetrics fm(font());
1526 setMinimumSize(max_width, 0);
1527 setAlignment(Qt::AlignRight | Qt::AlignVCenter);
1539 menu =
new QMenu(
this);
1543 menuAction->setData(QVariant(u));
1544 menu->addAction(menuAction);
1557 connect(_optionsModel,SIGNAL(displayUnitChanged(
int)),
this,SLOT(
updateDisplayUnit(
int)));
1573 QPoint globalPos = mapToGlobal(point);
1574 menu->exec(globalPos);
bool handlePaymentRequest(const SendCoinsRecipient &recipient)
void unsubscribeFromCoreSignals()
Disconnect core signals from GUI client.
bool setCurrentWallet(const QString &name)
void toggleNetworkActive()
Toggle networking.
bool getMinimizeOnClose()
void createTitleBars()
Create title bar.
Local Fabcoin RPC console.
std::vector< CWalletRef > vpwallets
void showProgress(const QString &title, int nProgress)
Show progress dialog e.g.
void dropEvent(QDropEvent *event)
void mousePressEvent(QMouseEvent *event)
So that it responds to left-button clicks.
UnitDisplayStatusBarControl(const PlatformStyle *platformStyle)
void trayIconActivated(QSystemTrayIcon::ActivationReason reason)
Handle tray icon clicked.
QAction * sendToContractAction
#define TRY_LOCK(cs, name)
static bool isWalletEnabled()
bool eventFilter(QObject *object, QEvent *event)
void gotoAddTokenPage()
Switch to Add Token page.
UnitDisplayStatusBarControl * unitDisplayControl
void updateNetworkState()
Update UI with latest network info from model.
double getVerificationProgress(const CBlockIndex *tip) const
void closeEvent(QCloseEvent *event)
QAction * lockWalletAction
CCriticalSection cs_wallet
void setClientModel(ClientModel *clientModel)
Set the client model.
void setTabBarInfo(QObject *info)
setTabBarInfo Set the tab bar info
static const std::string DEFAULT_UIPLATFORM
void createTrayIcon(const NetworkStyle *networkStyle)
Create system tray icon and notification.
ClientModel * clientModel
FabcoinVersionChecker * fabcoinVersionChecker
QAction * createContractAction
void gotoCreateContractPage()
Switch to create contract page.
void createToolBars()
Create the toolbars.
ModalOverlay * modalOverlay
bool getNetworkActive() const
Return true if network activity in core is enabled.
const Consensus::Params & GetConsensus() const
int prevBlocks
Keep track of previous number of blocks, to detect progress.
int getNumConnections(unsigned int flags=CONNECTIONS_ALL) const
Return number of connections, default is in- and outbound (total)
void tipUpdate(int count, const QDateTime &blockDate, double nVerificationProgress)
Qt::ConnectionType blockingGUIThreadConnection()
Get connection type to call object slot in GUI thread with invokeMethod.
bool GetBoolArg(const std::string &strArg, bool fDefault)
Return boolean argument or default value.
QAction * changePassphraseAction
void setNumConnections(int count)
Set number of connections shown in the UI.
void toggleHidden()
Simply calls showNormalIfMinimized(true) for use in SLOT() macro.
OptionsModel * getOptionsModel()
ModalOverlay * modalBackupOverlay
QAction * encryptWalletAction
Macintosh-specific dock icon handler.
Mask of all available buttons in CClientUIInterface::MessageBoxFlags This needs to be updated...
void changeEvent(QEvent *e)
void aboutClicked()
Show about dialog.
void showHelpMessageClicked()
Show help message dialog.
QAction * smartContractAction
void updateHeadersSyncProgressLabel()
void buildUi()
buildUi Construct the layout of the composite GUI control
void addAction(QAction *action)
addAction Add action to the navigation bar
void gotoSendTokenPage()
Switch to Send Token page.
Notify user of potential problem.
NavigationBar * appNavigationBar
void showDebugWindowActivateConsole()
Show debug window and set focus to the console.
Modal overlay to display information about the chain-sync state.
QAction * receiveCoinsMenuAction
Signals for UI communication.
FabcoinGUI(const PlatformStyle *platformStyle, const NetworkStyle *networkStyle, QWidget *parent=0)
void setOptionsModel(OptionsModel *optionsModel)
Lets the control know about the Options Model (and its signals)
void gotoCallContractPage()
Switch to call contract page.
void showDebugWindow()
Show debug window.
void addDockWindows(Qt::DockWidgetArea area, QWidget *widget)
Add docking windows to the main windows.
void receivedURI(const QString &uri)
Signal raised when a URI was entered or dragged to the GUI.
Force blocking, modal message box dialog (not just OS notification)
void showOutOfSyncWarning(bool fShow)
QAction * sendTokenAction
void setIcon(const QIcon &icon)
void setWalletActionsEnabled(bool enabled)
Enable or disable all wallet-related actions.
static QString formatWithUnit(int unit, const CAmount &amount, bool plussign=false, SeparatorStyle separators=separatorStandard)
Format as string (with unit)
void setClientModel(ClientModel *model)
void gotoHistoryPage()
Switch to history (transactions) page.
int64_t CAmount
Amount in lius (Can be negative)
int64_t GetnPowTargetSpacing(uint32_t nHeight=0) const
bool fBatchProcessingMode
QLabel * labelWalletEncryptionIcon
void gotoOverviewPage()
Switch to overview (home) page.
static MacDockIconHandler * instance()
void setDisplayUnit(const QVariant &value)
Updates current unit in memory, settings and emits displayUnitChanged(newUnit) signal.
void setClientModel(ClientModel *clientModel)
void setMainWindow(QMainWindow *window)
bool isObscured(QWidget *w)
Notificator * notificator
QAction * toggleHideAction
OptionsModel * optionsModel
void setKnownBestHeight(int count, const QDateTime &blockDate)
uint64_t nWeight
Current weight of the wallet.
The TitleBar class Title bar widget.
void gotoVerifyMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to verify message tab.
void notify(Class cls, const QString &title, const QString &text, const QIcon &icon=QIcon(), int millisTimeout=10000)
Show notification message.
bool addWallet(const QString &name, WalletModel *walletModel)
QDateTime getLastBlockDate() const
boost::signals2::signal< bool(const std::string &message, const std::string &noninteractive_message, const std::string &caption, unsigned int style), boost::signals2::last_value< bool > > ThreadSafeQuestion
If possible, ask the user a question.
void updateDisplayUnit(int newUnits)
When Display Units are changed on OptionsModel it will refresh the display text of the control on the...
void createTrayIconMenu()
Create system tray menu (or setup the dock menu)
QAction * receiveTokenAction
void setTabFocus(enum TabTypes tabType)
set which tab has the focus (is visible)
int64_t nPowTargetSpacing
QAction * showHelpMessageAction
void optionsClicked()
Show configuration dialog.
void subscribeToCoreSignals()
Connect core signals to GUI client.
void setModel(OptionsModel *model)
bool IsInitialBlockDownload()
Check whether we are doing an initial block download (synchronizing from disk or network) ...
void message(const QString &title, const QString &message, unsigned int style, bool *ret=nullptr)
Notify the user of an event from the core network or transaction handling code.
void setNetworkActive(bool networkActive)
Set network state shown in the UI.
void updateStakingIcon()
Update staking icon.
Cross-platform desktop notification client.
static const QString DEFAULT_WALLET
Display name for default wallet name.
QAction * unlockWalletAction
void createMenuBar()
Create the menu bar and sub-menus.
int getHeaderTipHeight() const
QProgressBar * progressBar
QAction * openRPCConsoleAction
QSystemTrayIcon * trayIcon
The NavigationBar class Custom control for navigation bar.
void mapGroup(QAction *action, QList< QAction * > list)
mapGroup Map the action with group
Parameters that influence chain consensus.
QAction * verifyMessageAction
Model for Fabcoin network client.
QAction * sendCoinsAction
ClickableProgressBar ProgressBar
void gotoSignMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to sign message tab.
QLabel * connectionsControl
QAction * usedReceivingAddressesAction
void showHide(bool hide=false, bool userRequested=false)
QLabel * progressBarLabel
const PlatformStyle * platformStyle
void createActions()
Create the main UI actions.
void gotoSendCoinsPage(QString addr="")
Switch to send coins page.
void updateWeight(CWalletRef pwalletMain)
Update the current weight of the wallet.
bool newVersionAvailable()
void gotoReceiveCoinsPage()
Switch to receive coins page.
static QString name(int unit)
Short name.
QAction * signMessageAction
void setTabBarInfo(QObject *into)
PlatformStyle::TableColorType type
Interface from Qt to configuration data structure for Fabcoin client.
void setTrayIconVisible(bool)
When hideTrayIcon setting is changed in OptionsModel hide or show the icon accordingly.
const CChainParams & Params()
Return the currently selected parameters.
Interface to Fabcoin wallet from Qt view code.
bool fWalletUnlockStakingOnly
static QList< Unit > availableUnits()
Get list of units, for drop-down box.
WalletFrame * walletFrame
int64_t getHeaderTipTime() const
QAction * receiveCoinsAction
QLabel * labelWalletHDStatusIcon
QLabel * labelStakingIcon
A CWallet is an extension of a keystore, which also maintains a set of transactions and balances...
std::unique_ptr< CConnman > g_connman
const QIcon & getTrayAndWindowIcon() const
boost::signals2::signal< bool(const std::string &message, const std::string &caption, unsigned int style), boost::signals2::last_value< bool > > ThreadSafeMessageBox
Show message box.
"Help message" dialog box
void gotoSendToContractPage()
Switch to send contract page.
QAction * callContractAction
QAction * sendCoinsMenuAction
void setNetworkActive(bool active)
Toggle network activity state in core.
HelpMessageDialog * helpMessageDialog
QString formatNiceTimeOffset(qint64 secs)
void createContextMenu()
Creates context menu, its actions, and wires up all the relevant signals for mouse events...
QProgressDialog * progressDialog
int64_t GetTime()
GetTimeMicros() and GetTimeMillis() both return the system time, but in different units...
struct evm_uint160be address(struct evm_env *env)
void showEvent(QShowEvent *event)
const QIcon & getAppIcon() const
CClientUIInterface uiInterface
QAction * restoreWalletAction
void setNumBlocks(int count, const QDateTime &blockDate, double nVerificationProgress, bool headers)
Set number of blocks and last block date shown in the UI.
void showNormalIfMinimized(bool fToggleHidden=false)
Show window if hidden, unminimize when minimized, rise when obscured or show if hidden and fToggleHid...
void setModel(WalletModel *_model)
setModel Set wallet model
bool showBackupOverlay
Switch for showing the backup overlay modal screen.
QAction * usedSendingAddressesAction
A container for embedding all wallet-related controls into FabcoinGUI.
enum BlockSource getBlockSource() const
Returns enum BlockSource of the current importing/syncing state.
void onDisplayUnitsClicked(const QPoint &point)
Shows context menu with Display Unit options by the mouse coordinates.
void detectShutdown()
called by a timer to check if fRequestShutdown has been set
void dragEnterEvent(QDragEnterEvent *event)
void onMenuSelection(QAction *action)
Tells underlying optionsModel to update its current display unit.
void gotoReceiveTokenPage()
Switch to Receive Token page.
QAction * backupWalletAction
Predefined combinations for certain default usage cases.
void showModalBackupOverlay()
vector< pair< u256, string > > const & units()
Get information concerning the currency denominations.
const QString & getTitleAddText() const