6 #if defined(HAVE_CONFIG_H) 29 #endif // ENABLE_WALLET 45 #include <QtNetwork/QNetworkAccessManager> 46 #include <QtNetwork/QNetworkReply> 47 #include <QGraphicsDropShadowEffect> 48 #include <QToolButton> 49 #include <QPushButton> 51 #include <QWidgetAction> 53 #include <QApplication> 55 #include <QDesktopWidget> 56 #include <QDragEnterEvent> 57 #include <QListWidget> 59 #include <QMessageBox> 61 #include <QProgressDialog> 64 #include <QStackedWidget> 69 #include <QVBoxLayout> 71 #if QT_VERSION < 0x050000 72 #include <QTextDocument> 76 #include <validation.h> 78 #include <QFontDatabase> 85 #elif defined(Q_OS_WIN) 101 unitDisplayControl(0),
102 labelWalletEncryptionIcon(0),
103 labelWalletHDStatusIcon(0),
104 connectionsControl(0),
114 sendCoinsMenuAction(0),
115 usedSendingAddressesAction(0),
116 usedReceivingAddressesAction(0),
117 signMessageAction(0),
118 verifyMessageAction(0),
120 receiveCoinsAction(0),
121 receiveCoinsMenuAction(0),
124 encryptWalletAction(0),
125 backupWalletAction(0),
126 changePassphraseAction(0),
128 openRPCConsoleAction(0),
129 openWalletRepairAction(0),
131 showHelpMessageAction(0),
132 transferAssetAction(0),
133 createAssetAction(0),
134 manageAssetAction(0),
138 labelCurrentMarket(0),
139 labelCurrentPrice(0),
147 helpMessageDialog(0),
151 platformStyle(_platformStyle)
155 if (!restoreGeometry(settings.value(
"MainWindowGeometry").toByteArray())) {
157 move(QApplication::desktop()->availableGeometry().center() - frameGeometry().center());
163 #endif // ENABLE_WALLET 166 windowTitle += tr(
"Wallet");
168 windowTitle += tr(
"Node");
177 setWindowTitle(windowTitle);
179 #if defined(Q_OS_MAC) && QT_VERSION < 0x050000 182 setUnifiedTitleAndToolBarOnMac(
true);
194 #endif // ENABLE_WALLET 208 request =
new QNetworkRequest();
212 setAcceptDrops(
true);
216 #if !defined(Q_OS_MAC) 217 this->setFont(QFont(
"Open Sans"));
237 statusBar()->setSizeGripEnabled(
false);
240 QFrame *frameBlocks =
new QFrame();
241 frameBlocks->setContentsMargins(0,0,0,0);
242 frameBlocks->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
243 QHBoxLayout *frameBlocksLayout =
new QHBoxLayout(frameBlocks);
244 frameBlocksLayout->setContentsMargins(3,0,3,0);
245 frameBlocksLayout->setSpacing(3);
253 frameBlocksLayout->addStretch();
255 frameBlocksLayout->addStretch();
259 frameBlocksLayout->addStretch();
261 frameBlocksLayout->addStretch();
263 frameBlocksLayout->addStretch();
276 QString curStyle = QApplication::style()->metaObject()->className();
277 if(curStyle ==
"QWindowsStyle" || curStyle ==
"QWindowsXPStyle")
279 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; }");
284 statusBar()->addPermanentWidget(frameBlocks);
290 this->installEventFilter(
this);
316 settings.setValue(
"MainWindowGeometry", saveGeometry());
329 QFontDatabase::addApplicationFont(
":/fonts/opensans-bold");
330 QFontDatabase::addApplicationFont(
":/fonts/opensans-bolditalic");
331 QFontDatabase::addApplicationFont(
":/fonts/opensans-extrabold");
332 QFontDatabase::addApplicationFont(
":/fonts/opensans-extrabolditalic");
333 QFontDatabase::addApplicationFont(
":/fonts/opensans-italic");
334 QFontDatabase::addApplicationFont(
":/fonts/opensans-light");
335 QFontDatabase::addApplicationFont(
":/fonts/opensans-lightitalic");
336 QFontDatabase::addApplicationFont(
":/fonts/opensans-regular");
337 QFontDatabase::addApplicationFont(
":/fonts/opensans-semibold");
338 QFontDatabase::addApplicationFont(
":/fonts/opensans-semibolditalic");
344 QFont font = QFont();
345 font.setPixelSize(22);
346 font.setLetterSpacing(QFont::SpacingType::AbsoluteSpacing, -0.43);
347 #if !defined(Q_OS_MAC) 348 font.setFamily(
"Open Sans");
350 font.setWeight(QFont::Weight::ExtraLight);
352 QActionGroup *tabGroup =
new QActionGroup(
this);
355 overviewAction->setStatusTip(tr(
"Show general overview of wallet"));
375 receiveCoinsAction->setStatusTip(tr(
"Request payments (generates QR codes and raven: URIs)"));
387 historyAction->setStatusTip(tr(
"Browse transaction history"));
390 historyAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_4));
412 manageAssetAction->setStatusTip(tr(
"Manage assets you are the administrator of"));
431 votingAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_9));
441 connect(
overviewAction, SIGNAL(triggered()),
this, SLOT(gotoOverviewPage()));
443 connect(
sendCoinsAction, SIGNAL(triggered()),
this, SLOT(gotoSendCoinsPage()));
451 connect(
historyAction, SIGNAL(triggered()),
this, SLOT(gotoHistoryPage()));
455 connect(
createAssetAction, SIGNAL(triggered()),
this, SLOT(gotoCreateAssetsPage()));
457 connect(
manageAssetAction, SIGNAL(triggered()),
this, SLOT(gotoManageAssetsPage()));
460 #endif // ENABLE_WALLET 463 quitAction->setStatusTip(tr(
"Quit application"));
464 quitAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q));
471 aboutQtAction->setStatusTip(tr(
"Show information about Qt"));
481 encryptWalletAction->setStatusTip(tr(
"Encrypt the private keys that belong to your wallet"));
488 signMessageAction->setStatusTip(tr(
"Sign messages with your Raven addresses to prove you own them"));
490 verifyMessageAction->setStatusTip(tr(
"Verify messages to ensure they were signed with specified Raven addresses"));
506 openAction->setStatusTip(tr(
"Open a raven: URI or payment request"));
512 connect(
quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
514 connect(
aboutQtAction, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
531 connect(
signMessageAction, SIGNAL(triggered()),
this, SLOT(gotoSignMessageTab()));
535 connect(
openAction, SIGNAL(triggered()),
this, SLOT(openClicked()));
537 #endif // ENABLE_WALLET 540 new QShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_D),
this, SLOT(
showDebugWindow()));
554 QMenu *file =
appMenuBar->addMenu(tr(
"&File"));
560 file->addSeparator();
563 file->addSeparator();
567 QMenu *settings =
appMenuBar->addMenu(tr(
"&Wallet"));
573 settings->addSeparator();
584 help->addSeparator();
595 QWidget* toolbarWidget =
new QWidget();
597 QString widgetStyleSheet =
".QWidget {background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 %1, stop: 1 %2);}";
601 QLabel* label =
new QLabel();
602 label->setPixmap(QPixmap::fromImage(QImage(
":/icons/ravencointext")));
603 label->setContentsMargins(0,0,0,50);
604 label->setStyleSheet(
".QLabel{background-color: transparent;}");
607 QToolBar *toolbar =
new QToolBar();
608 toolbar->setStyle(style());
609 toolbar->setMinimumWidth(label->width());
610 toolbar->setContextMenuPolicy(Qt::PreventContextMenu);
611 toolbar->setMovable(
false);
612 toolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
623 QString openSansFontString =
"font: normal 22pt \"Open Sans\";";
624 QString normalString =
"font: normal 22pt \"Arial\";";
625 QString stringToUse =
"";
627 #if !defined(Q_OS_MAC) 628 stringToUse = openSansFontString;
630 stringToUse = normalString;
634 QString tbStyleSheet =
".QToolBar {background-color : transparent; border-color: transparent; } " 635 ".QToolButton {background-color: transparent; border-color: transparent; width: 249px; color: %1; border: none;} " 636 ".QToolButton:checked {background: none; background-color: none; selection-background-color: none; color: %2; border: none; font: %4} " 637 ".QToolButton:hover {background: none; background-color: none; border: none; color: %3;} " 638 ".QToolButton:disabled {color: gray;}";
644 toolbar->setOrientation(Qt::Vertical);
645 toolbar->setIconSize(QSize(40, 40));
647 QLayout* lay = toolbar->layout();
648 for(
int i = 0; i < lay->count(); ++i)
649 lay->itemAt(i)->setAlignment(Qt::AlignLeft);
653 QVBoxLayout* ravenLabelLayout =
new QVBoxLayout(toolbarWidget);
654 ravenLabelLayout->addWidget(label);
655 ravenLabelLayout->addWidget(toolbar);
656 ravenLabelLayout->setDirection(QBoxLayout::TopToBottom);
657 ravenLabelLayout->addStretch(1);
660 QWidget* mainWalletWidget =
new QWidget();
661 mainWalletWidget->setStyleSheet(mainWalletWidgetStyle);
664 #if !defined(Q_OS_MAC) 665 QGraphicsDropShadowEffect *walletFrameShadow =
new QGraphicsDropShadowEffect;
666 walletFrameShadow->setBlurRadius(50);
668 walletFrameShadow->setXOffset(-8.0);
669 walletFrameShadow->setYOffset(0);
670 mainWalletWidget->setGraphicsEffect(walletFrameShadow);
677 headerWidget->setStyleSheet(widgetBackgroundSytleSheet);
681 QFont currentMarketFont;
682 currentMarketFont.setFamily(
"Open Sans");
683 currentMarketFont.setWeight(QFont::Weight::Normal);
684 currentMarketFont.setLetterSpacing(QFont::SpacingType::AbsoluteSpacing, -0.6);
685 currentMarketFont.setPixelSize(18);
688 QHBoxLayout* priceLayout =
new QHBoxLayout(
headerWidget);
689 priceLayout->setContentsMargins(QMargins());
690 priceLayout->setDirection(QBoxLayout::LeftToRight);
691 priceLayout->setAlignment(Qt::AlignVCenter);
699 QString currentPriceStyleSheet =
".QLabel{color: %1;}";
706 QLabel* labelBtcRvn =
new QLabel();
707 labelBtcRvn->setText(
"BTC / RVN");
708 labelBtcRvn->setContentsMargins(15,0,0,0);
709 labelBtcRvn->setFixedHeight(75);
710 labelBtcRvn->setAlignment(Qt::AlignVCenter);
712 labelBtcRvn->setFont(currentMarketFont);
717 priceLayout->addWidget(labelBtcRvn, 0 , Qt::AlignVCenter | Qt::AlignLeft);
718 priceLayout->addStretch();
721 QVBoxLayout* mainFrameLayout =
new QVBoxLayout(mainWalletWidget);
724 mainFrameLayout->setDirection(QBoxLayout::TopToBottom);
725 mainFrameLayout->setContentsMargins(QMargins());
727 QVBoxLayout* layout =
new QVBoxLayout();
728 layout->addWidget(toolbarWidget);
729 layout->addWidget(mainWalletWidget);
730 layout->setSpacing(0);
731 layout->setContentsMargins(QMargins());
732 layout->setDirection(QBoxLayout::LeftToRight);
733 QWidget* containerWidget =
new QWidget();
734 containerWidget->setLayout(layout);
735 setCentralWidget(containerWidget);
738 QObject::connect(
networkManager, &QNetworkAccessManager::finished,
739 this, [=](QNetworkReply *reply) {
740 if (reply->error()) {
742 qDebug() << reply->errorString();
746 QString answer = reply->readAll();
749 QRegExp rx(
"\\d*.\\d\\d\\d\\d\\d\\d\\d\\d");
753 QStringList list = rx.capturedTexts();
755 QString currentPriceStyleSheet =
".QLabel{color: %1;}";
758 if (!list.isEmpty()) {
759 double next = list.first().toDouble(&ok);
766 current = 0.00000000;
770 else if (next > current)
801 connect(_clientModel, SIGNAL(numConnectionsChanged(
int)),
this, SLOT(
setNumConnections(
int)));
802 connect(_clientModel, SIGNAL(networkActiveChanged(
bool)),
this, SLOT(
setNetworkActive(
bool)));
806 connect(_clientModel, SIGNAL(numBlocksChanged(
int,QDateTime,
double,
bool)),
this, SLOT(
setNumBlocks(
int,QDateTime,
double,
bool)));
809 connect(_clientModel, SIGNAL(
message(QString,QString,
unsigned int)),
this, SLOT(
message(QString,QString,
unsigned int)));
820 #endif // ENABLE_WALLET 827 connect(optionsModel,SIGNAL(hideTrayIconChanged(
bool)),
this,SLOT(
setTrayIconVisible(
bool)));
847 #endif // ENABLE_WALLET 853 bool RavenGUI::addWallet(
const QString& name,
WalletModel *walletModel)
861 bool RavenGUI::setCurrentWallet(
const QString& name)
868 void RavenGUI::removeAllWallets()
875 #endif // ENABLE_WALLET 906 trayIcon =
new QSystemTrayIcon(
this);
926 connect(
trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
946 #ifndef Q_OS_MAC // This is built-in on Mac 955 if(reason == QSystemTrayIcon::Trigger)
1007 #ifdef ENABLE_WALLET 1008 void RavenGUI::openClicked()
1017 void RavenGUI::gotoOverviewPage()
1023 void RavenGUI::gotoHistoryPage()
1029 void RavenGUI::gotoReceiveCoinsPage()
1035 void RavenGUI::gotoSendCoinsPage(QString addr)
1041 void RavenGUI::gotoSignMessageTab(QString addr)
1046 void RavenGUI::gotoVerifyMessageTab(QString addr)
1052 void RavenGUI::gotoAssetsPage()
1058 void RavenGUI::gotoCreateAssetsPage()
1064 void RavenGUI::gotoManageAssetsPage()
1070 #endif // ENABLE_WALLET 1078 case 0: icon =
":/icons/connect_0";
break;
1079 case 1:
case 2:
case 3: icon =
":/icons/connect_1";
break;
1080 case 4:
case 5:
case 6: icon =
":/icons/connect_2";
break;
1081 case 7:
case 8:
case 9: icon =
":/icons/connect_3";
break;
1082 default: icon =
":/icons/connect_4";
break;
1088 tooltip = tr(
"%n active connection(s) to Raven network",
"", count) + QString(
".<br>") + tr(
"Click to disable network activity.");
1090 tooltip = tr(
"Network activity disabled.") + QString(
"<br>") + tr(
"Click to enable network activity again.");
1091 icon =
":/icons/network_disabled";
1095 tooltip = QString(
"<nobr>") + tooltip + QString(
"</nobr>");
1116 if (estHeadersLeft > HEADER_HEIGHT_DELTA_SYNC)
1117 progressBarLabel->setText(tr(
"Syncing Headers (%1%)...").arg(QString::number(100.0 / (headersTipHeight+estHeadersLeft)*headersTipHeight,
'f', 1)));
1134 statusBar()->clearMessage();
1138 switch (blockSource) {
1167 QDateTime currentDate = QDateTime::currentDateTime();
1168 qint64 secs = blockDate.secsTo(currentDate);
1170 tooltip = tr(
"Processed %n block(s) of transaction history.",
"", count);
1175 tooltip = tr(
"Up to date") + QString(
".<br>") + tooltip;
1178 #ifdef ENABLE_WALLET 1184 #endif // ENABLE_WALLET 1194 progressBar->setFormat(tr(
"%1 behind").arg(timeBehindText));
1196 progressBar->setValue(nVerificationProgress * 1000000000.0 + 0.5);
1199 tooltip = tr(
"Catching up...") + QString(
"<br>") + tooltip;
1203 ":/movies/spinner-%1").arg(
spinnerFrame, 3, 10, QChar(
'0')))
1204 .pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
1209 #ifdef ENABLE_WALLET 1215 #endif // ENABLE_WALLET 1217 tooltip += QString(
"<br>");
1218 tooltip += tr(
"Last received block was generated %1 ago.").arg(timeBehindText);
1219 tooltip += QString(
"<br>");
1220 tooltip += tr(
"Transactions after this will not yet be visible.");
1224 tooltip = QString(
"<nobr>") + tooltip + QString(
"</nobr>");
1233 QString strTitle = tr(
"Raven");
1235 int nMBoxIcon = QMessageBox::Information;
1241 if (!title.isEmpty()) {
1247 msgType = tr(
"Error");
1250 msgType = tr(
"Warning");
1253 msgType = tr(
"Information");
1260 if (!msgType.isEmpty())
1261 strTitle +=
" - " + msgType;
1265 nMBoxIcon = QMessageBox::Critical;
1269 nMBoxIcon = QMessageBox::Warning;
1276 QMessageBox::StandardButton buttons;
1278 buttons = QMessageBox::Ok;
1281 QMessageBox mBox((QMessageBox::Icon)nMBoxIcon, strTitle, message, buttons,
this);
1282 int r = mBox.exec();
1284 *ret = r == QMessageBox::Ok;
1292 QMainWindow::changeEvent(e);
1293 #ifndef Q_OS_MAC // Ignored on Mac 1294 if(e->type() == QEvent::WindowStateChange)
1298 QWindowStateChangeEvent *wsevt =
static_cast<QWindowStateChangeEvent*
>(e);
1299 if(!(wsevt->oldState() & Qt::WindowMinimized) && isMinimized())
1301 QTimer::singleShot(0,
this, SLOT(hide()));
1311 #ifndef Q_OS_MAC // Ignored on Mac 1319 QApplication::quit();
1323 QMainWindow::showMinimized();
1328 QMainWindow::closeEvent(event);
1340 #ifdef ENABLE_WALLET 1341 void RavenGUI::incomingTransaction(
const QString& date,
int unit,
const CAmount& amount,
const QString& type,
const QString& address,
const QString& label,
const QString& assetName)
1344 QString msg = tr(
"Date: %1\n").arg(date);
1345 if (assetName ==
"RVN")
1350 msg += tr(
"Type: %1\n").arg(type);
1352 if (!label.isEmpty())
1353 msg += tr(
"Label: %1\n").arg(label);
1354 else if (!address.isEmpty())
1355 msg += tr(
"Address: %1\n").arg(address);
1356 message((amount)<0 ? tr(
"Sent transaction") : tr(
"Incoming transaction"),
1360 void RavenGUI::checkAssets()
1378 #endif // ENABLE_WALLET 1383 if(event->mimeData()->hasUrls())
1384 event->acceptProposedAction();
1389 if(event->mimeData()->hasUrls())
1391 for (
const QUrl &uri : event->mimeData()->urls())
1396 event->acceptProposedAction();
1402 if (event->type() == QEvent::StatusTip)
1408 return QMainWindow::eventFilter(
object, event);
1411 #ifdef ENABLE_WALLET 1418 gotoSendCoinsPage();
1424 void RavenGUI::setHDStatus(
int hdEnabled)
1427 labelWalletHDStatusIcon->setToolTip(hdEnabled ? tr(
"HD key generation is <b>enabled</b>") : tr(
"HD key generation is <b>disabled</b>"));
1433 void RavenGUI::setEncryptionStatus(
int status)
1461 #endif // ENABLE_WALLET 1474 else if (isMinimized())
1484 else if(fToggleHidden)
1514 else if (nProgress == 100)
1530 trayIcon->setVisible(!fHideTrayIcon);
1540 static bool ThreadSafeMessageBox(
RavenGUI *gui,
const std::string&
message,
const std::string& caption,
unsigned int style)
1548 QMetaObject::invokeMethod(gui,
"message",
1550 Q_ARG(QString, QString::fromStdString(caption)),
1551 Q_ARG(QString, QString::fromStdString(
message)),
1552 Q_ARG(
unsigned int, style),
1553 Q_ARG(
bool*, &ret));
1590 setToolTip(tr(
"Unit to show amounts in. Click to select another unit."));
1593 const QFontMetrics fm(font());
1598 setMinimumSize(max_width, 0);
1599 setAlignment(Qt::AlignRight | Qt::AlignVCenter);
1600 setStyleSheet(QString(
"QLabel { color : %1; }").arg(platformStyle->
DarkOrangeColor().name()));
1612 menu =
new QMenu(
this);
1616 menuAction->setData(QVariant(u));
1617 menu->addAction(menuAction);
1619 menu->setStyleSheet(QString(
"QMenu::item{ color: %1; } QMenu::item:selected{ color: %2;}").arg(platformStyle->
DarkOrangeColor().name(), platformStyle->
TextColor().name()));
1631 connect(_optionsModel,SIGNAL(displayUnitChanged(
int)),
this,SLOT(
updateDisplayUnit(
int)));
1647 QPoint globalPos = mapToGlobal(point);
1648 menu->exec(globalPos);
1662 request->setUrl(QUrl(
"https://api.binance.com/api/v1/ticker/price?symbol=RVNBTC"));
1663 networkManager->get(*request);
bool handlePaymentRequest(const SendCoinsRecipient &recipient)
bool setCurrentWallet(const QString &name)
void showDebugWindowActivateConsole()
Show debug window and set focus to the console.
void changeEvent(QEvent *e)
void dragEnterEvent(QDragEnterEvent *event)
bool getNetworkActive() const
Return true if network activity in core is enabled.
void unsubscribeFromCoreSignals()
Disconnect core signals from GUI client.
QNetworkAccessManager * networkManager
QAction * usedReceivingAddressesAction
QAction * showHelpMessageAction
void mousePressEvent(QMouseEvent *event)
So that it responds to left-button clicks.
UnitDisplayStatusBarControl(const PlatformStyle *platformStyle)
static bool isWalletEnabled()
QGraphicsDropShadowEffect * getShadowEffect()
QAction * manageAssetAction
void requestedRestart(QStringList args)
Restart handling.
#define COLOR_WALLETFRAME_SHADOW
QAction * openRPCConsoleAction
void toggleNetworkActive()
Toggle networking.
void setClientModel(ClientModel *clientModel)
Set the client model.
void setTrayIconVisible(bool)
When hideTrayIcon setting is changed in OptionsModel hide or show the icon accordingly.
void showWalletRepair()
Show debug window and set focus to the wallet repair tab.
WalletFrame * walletFrame
void tipUpdate(int count, const QDateTime &blockDate, double nVerificationProgress)
Qt::ConnectionType blockingGUIThreadConnection()
Get connection type to call object slot in GUI thread with invokeMethod.
QAction * changePassphraseAction
const QIcon & getAppIcon() const
QProgressDialog * progressDialog
void subscribeToCoreSignals()
Connect core signals to GUI client.
OptionsModel * getOptionsModel()
void toggleHidden()
Simply calls showNormalIfMinimized(true) for use in SLOT() macro.
void handleRestart(QStringList args)
Get restart command-line parameters and request restart.
Macintosh-specific dock icon handler.
Mask of all available buttons in CClientUIInterface::MessageBoxFlags This needs to be updated...
bool isLayerVisible() const
QLabel * labelWalletHDStatusIcon
Notify user of potential problem.
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.
Modal overlay to display information about the chain-sync state.
const QString & getTitleAddText() const
Signals for UI communication.
void setOptionsModel(OptionsModel *optionsModel)
Lets the control know about the Options Model (and its signals)
void setNetworkActive(bool networkActive)
Set network state shown in the UI.
int getDisplayUnit() const
Force blocking, modal message box dialog (not just OS notification)
void showOutOfSyncWarning(bool fShow)
void optionsClicked()
Show configuration dialog.
ModalOverlay * modalOverlay
void setIcon(const QIcon &icon)
void receivedURI(const QString &uri)
Signal raised when a URI was entered or dragged to the GUI.
void loadFonts()
Load the custome open sans fonts into the font database.
void setNumConnections(int count)
Set number of connections shown in the UI.
void detectShutdown()
called by a timer to check if fRequestShutdown has been set
void setClientModel(ClientModel *model)
void closeEvent(QCloseEvent *event)
void gotoHistoryPage()
Switch to history (transactions) page.
int64_t CAmount
Amount in corbies (Can be negative)
QAction * receiveCoinsAction
QAction * createAssetAction
static QString formatWithUnit(int unit, const CAmount &amount, bool plussign=false, SeparatorStyle separators=separatorStandard)
Format as string (with unit)
void createMenuBar()
Create the menu bar and sub-menus.
void createTrayIconMenu()
Create system tray menu (or setup the dock menu)
void gotoCreateAssetsPage()
void gotoOverviewPage()
Switch to overview (home) page.
void showHelpMessageClicked()
Show help message dialog.
static MacDockIconHandler * instance()
static const QString DEFAULT_WALLET
Display name for default wallet name.
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)
bool AreAssetsDeployed()
RVN START.
int getNumConnections(unsigned int flags=CONNECTIONS_ALL) const
Return number of connections, default is in- and outbound (total)
OptionsModel * optionsModel
Notificator * notificator
double getVerificationProgress(const CBlockIndex *tip) const
enum BlockSource getBlockSource() const
Returns enum BlockSource of the current importing/syncing state.
QNetworkRequest * request
void setKnownBestHeight(int count, const QDateTime &blockDate)
void gotoVerifyMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to verify message tab.
static const std::string DEFAULT_UIPLATFORM
#define STRING_LABEL_COLOR
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)
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 setTabFocus(enum TabTypes tabType)
set which tab has the focus (is visible)
int64_t nPowTargetSpacing
QAction * sendCoinsAction
void setModel(OptionsModel *model)
void showProgress(const QString &title, int nProgress)
Show progress dialog e.g.
void setNumBlocks(int count, const QDateTime &blockDate, double nVerificationProgress, bool headers)
Set number of blocks and last block date shown in the UI.
void updateHeadersSyncProgressLabel()
Cross-platform desktop notification client.
bool eventFilter(QObject *object, QEvent *event)
QAction * sendCoinsMenuAction
UnitDisplayStatusBarControl * unitDisplayControl
QAction * verifyMessageAction
UniValue help(const JSONRPCRequest &jsonRequest)
QAction * receiveCoinsMenuAction
void updateNetworkState()
Update UI with latest network info from model.
QAction * encryptWalletAction
Model for Raven network client.
void showEvent(QShowEvent *event)
const QIcon & getTrayAndWindowIcon() const
ClickableProgressBar ProgressBar
void gotoSignMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to sign message tab.
void showHide(bool hide=false, bool userRequested=false)
void createActions()
Create the main UI actions.
QAction * usedSendingAddressesAction
RavenGUI(const PlatformStyle *platformStyle, const NetworkStyle *networkStyle, QWidget *parent=0)
QDateTime getLastBlockDate() const
void createContextMenu(const PlatformStyle *platformStyle)
Creates context menu, its actions, and wires up all the relevant signals for mouse events...
QAction * transferAssetAction
RVN START.
void showDebugWindow()
Show debug window.
bool getMinimizeOnClose() const
void gotoSendCoinsPage(QString addr="")
Switch to send coins page.
QLabel * progressBarLabel
void gotoReceiveCoinsPage()
Switch to receive coins page.
QSystemTrayIcon * trayIcon
RVN END.
Interface from Qt to configuration data structure for Raven client.
const CChainParams & Params()
Return the currently selected parameters.
bool getMinimizeToTray() const
Interface to Raven wallet from Qt view code.
void showNormalIfMinimized(bool fToggleHidden=false)
Show window if hidden, unminimize when minimized, rise when obscured or show if hidden and fToggleHid...
QLabel * labelWalletEncryptionIcon
QAction * messagingAction
QLabel * labelCurrentMarket
int prevBlocks
Keep track of previous number of blocks, to detect progress.
void createToolBars()
Create the toolbars.
QAction * signMessageAction
static QList< Unit > availableUnits()
Get list of units, for drop-down box.
void aboutClicked()
Show about dialog.
boost::signals2::signal< bool(const std::string &message, const std::string &caption, unsigned int style), boost::signals2::last_value< bool > > ThreadSafeMessageBox
Show message box.
void gotoManageAssetsPage()
static QString name(int unit)
Short name.
"Help message" dialog box
QLabel * connectionsControl
void setNetworkActive(bool active)
Toggle network activity state in core.
void setWalletActionsEnabled(bool enabled)
Enable or disable all wallet-related actions.
QString formatNiceTimeOffset(qint64 secs)
int64_t GetTime()
GetTimeMicros() and GetTimeMillis() both return the system time, but in different units...
CClientUIInterface uiInterface
const Consensus::Params & GetConsensus() const
QAction * backupWalletAction
void createTrayIcon(const NetworkStyle *networkStyle)
Create system tray icon and notification.
void dropEvent(QDropEvent *event)
static QString formatWithCustomName(QString customName, const CAmount &amount, int unit=MAX_ASSET_UNITS, bool plussign=false, SeparatorStyle separators=separatorStandard)
Format as string (with custom name)
int getHeaderTipHeight() const
void trayIconActivated(QSystemTrayIcon::ActivationReason reason)
Handle tray icon clicked.
const PlatformStyle * platformStyle
QProgressBar * progressBar
void gotoAssetsPage()
RVN START.
int64_t getHeaderTipTime() const
HelpMessageDialog * helpMessageDialog
QAction * toggleHideAction
A container for embedding all wallet-related controls into RavenGUI.
bool getHideTrayIcon() const
QAction * openWalletRepairAction
void onDisplayUnitsClicked(const QPoint &point)
Shows context menu with Display Unit options by the mouse coordinates.
void onMenuSelection(QAction *action)
Tells underlying optionsModel to update its current display unit.
Predefined combinations for certain default usage cases.
QLabel * labelCurrentPrice
ClientModel * clientModel