Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/Makefile.qt.include
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ BITCOIN_QT_H = \
qt/paymentrequestplus.h \
qt/paymentserver.h \
qt/peertablemodel.h \
qt/platformstyle.h \
qt/qrdialog.h \
qt/qvalidatedlineedit.h \
qt/qvaluecombobox.h \
Expand Down Expand Up @@ -253,7 +252,6 @@ BITCOIN_QT_BASE_CPP = \
qt/optionsdialog.cpp \
qt/optionsmodel.cpp \
qt/peertablemodel.cpp \
qt/platformstyle.cpp \
qt/qvalidatedlineedit.cpp \
qt/qvaluecombobox.cpp \
qt/rpcconsole.cpp \
Expand Down
15 changes: 2 additions & 13 deletions src/qt/addressbookpage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include <qt/editaddressdialog.h>
#include <qt/guiutil.h>
#include <qt/optionsmodel.h>
#include <qt/platformstyle.h>
#include <qt/qrdialog.h>

#include <QIcon>
Expand Down Expand Up @@ -59,25 +58,15 @@ class AddressBookSortFilterProxyModel final : public QSortFilterProxyModel
}
};

AddressBookPage::AddressBookPage(const PlatformStyle *platformStyle, Mode _mode, Tabs _tab, QWidget *parent) :
AddressBookPage::AddressBookPage(Mode _mode, Tabs _tab, QWidget* parent) :
QDialog(parent),
ui(new Ui::AddressBookPage),
model(0),
mode(_mode),
tab(_tab)
{
ui->setupUi(this);
if (!platformStyle->getImagesOnButtons()) {
ui->newAddress->setIcon(QIcon());
ui->copyAddress->setIcon(QIcon());
ui->deleteAddress->setIcon(QIcon());
ui->exportButton->setIcon(QIcon());
} else {
ui->newAddress->setIcon(QIcon(":/icons/add"));
ui->copyAddress->setIcon(QIcon(":/icons/editcopy"));
ui->deleteAddress->setIcon(QIcon(":/icons/remove"));
ui->exportButton->setIcon(QIcon(":/icons/export"));
}

ui->showAddressQRCode->setIcon(QIcon());

switch(mode)
Expand Down
3 changes: 1 addition & 2 deletions src/qt/addressbookpage.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

class AddressBookSortFilterProxyModel;
class AddressTableModel;
class PlatformStyle;

namespace Ui {
class AddressBookPage;
Expand Down Expand Up @@ -38,7 +37,7 @@ class AddressBookPage : public QDialog
ForEditing /**< Open address book for editing */
};

explicit AddressBookPage(const PlatformStyle *platformStyle, Mode mode, Tabs tab, QWidget *parent);
explicit AddressBookPage(Mode mode, Tabs tab, QWidget* parent);
~AddressBookPage();

void setModel(AddressTableModel *model);
Expand Down
76 changes: 37 additions & 39 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include <qt/openuridialog.h>
#include <qt/optionsdialog.h>
#include <qt/optionsmodel.h>
#include <qt/platformstyle.h>
#include <qt/rpcconsole.h>
#include <qt/utilitydialog.h>

Expand Down Expand Up @@ -72,7 +71,7 @@ const std::string BitcoinGUI::DEFAULT_UIPLATFORM =
#endif
;

BitcoinGUI::BitcoinGUI(const PlatformStyle *_platformStyle, const NetworkStyle *networkStyle, QWidget *parent) :
BitcoinGUI::BitcoinGUI(const NetworkStyle* networkStyle, QWidget* parent) :
QMainWindow(parent),
enableWallet(false),
clientModel(0),
Expand Down Expand Up @@ -122,8 +121,7 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *_platformStyle, const NetworkStyle *
modalOverlay(0),
tabGroup(0),
prevBlocks(0),
spinnerFrame(0),
platformStyle(_platformStyle)
spinnerFrame(0)
{
QSettings settings;
if (!restoreGeometry(settings.value("MainWindowGeometry").toByteArray())) {
Expand All @@ -148,13 +146,13 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *_platformStyle, const NetworkStyle *
setWindowIcon(networkStyle->getTrayAndWindowIcon());
setWindowTitle(windowTitle);

rpcConsole = new RPCConsole(_platformStyle, this);
rpcConsole = new RPCConsole(this);
helpMessageDialog = new HelpMessageDialog(this, HelpMessageDialog::cmdline);
#ifdef ENABLE_WALLET
if(enableWallet)
{
/** Create wallet frame*/
walletFrame = new WalletFrame(_platformStyle, this);
walletFrame = new WalletFrame(this);
} else
#endif // ENABLE_WALLET
{
Expand Down Expand Up @@ -193,7 +191,7 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *_platformStyle, const NetworkStyle *
QHBoxLayout *frameBlocksLayout = new QHBoxLayout(frameBlocks);
frameBlocksLayout->setContentsMargins(3,0,3,0);
frameBlocksLayout->setSpacing(3);
unitDisplayControl = new UnitDisplayStatusBarControl(platformStyle);
unitDisplayControl = new UnitDisplayStatusBarControl();
labelWalletEncryptionIcon = new QLabel();
labelWalletHDStatusIcon = new QLabel();
labelConnectionsIcon = new GUIUtil::ClickableLabel();
Expand Down Expand Up @@ -311,7 +309,7 @@ void BitcoinGUI::createActions()
#endif
tabGroup->addButton(sendCoinsAction);

sendCoinsMenuAction = new QAction(QIcon(":/icons/send"), sendCoinsAction->text(), this);
sendCoinsMenuAction = new QAction(sendCoinsAction->text(), this);
sendCoinsMenuAction->setStatusTip(sendCoinsAction->statusTip());
sendCoinsMenuAction->setToolTip(sendCoinsMenuAction->statusTip());

Expand All @@ -327,7 +325,7 @@ void BitcoinGUI::createActions()
#endif
tabGroup->addButton(privateSendCoinsAction);

privateSendCoinsMenuAction = new QAction(QIcon(":/icons/send"), privateSendCoinsAction->text(), this);
privateSendCoinsMenuAction = new QAction(privateSendCoinsAction->text(), this);
privateSendCoinsMenuAction->setStatusTip(privateSendCoinsAction->statusTip());
privateSendCoinsMenuAction->setToolTip(privateSendCoinsMenuAction->statusTip());

Expand All @@ -343,7 +341,7 @@ void BitcoinGUI::createActions()
#endif
tabGroup->addButton(receiveCoinsAction);

receiveCoinsMenuAction = new QAction(QIcon(":/icons/receiving_addresses"), receiveCoinsAction->text(), this);
receiveCoinsMenuAction = new QAction(receiveCoinsAction->text(), this);
receiveCoinsMenuAction->setStatusTip(receiveCoinsAction->statusTip());
receiveCoinsMenuAction->setToolTip(receiveCoinsMenuAction->statusTip());

Expand Down Expand Up @@ -403,54 +401,54 @@ void BitcoinGUI::createActions()
connect(tabGroup, SIGNAL(buttonToggled(QAbstractButton *, bool)), this, SLOT(highlightTabButton(QAbstractButton *, bool)));
#endif // ENABLE_WALLET

quitAction = new QAction(QIcon(":/icons/quit"), tr("E&xit"), this);
quitAction = new QAction(tr("E&xit"), this);
quitAction->setStatusTip(tr("Quit application"));
quitAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q));
quitAction->setMenuRole(QAction::QuitRole);
aboutAction = new QAction(QIcon(":/icons/about"), tr("&About %1").arg(tr(PACKAGE_NAME)), this);
aboutAction = new QAction(tr("&About %1").arg(tr(PACKAGE_NAME)), this);
aboutAction->setStatusTip(tr("Show information about Dash Core"));
aboutAction->setMenuRole(QAction::AboutRole);
aboutAction->setEnabled(false);
aboutQtAction = new QAction(QIcon(":/icons/about_qt"), tr("About &Qt"), this);
aboutQtAction = new QAction(tr("About &Qt"), this);
aboutQtAction->setStatusTip(tr("Show information about Qt"));
aboutQtAction->setMenuRole(QAction::AboutQtRole);
optionsAction = new QAction(QIcon(":/icons/options"), tr("&Options..."), this);
optionsAction = new QAction(tr("&Options..."), this);
optionsAction->setStatusTip(tr("Modify configuration options for %1").arg(tr(PACKAGE_NAME)));
optionsAction->setMenuRole(QAction::PreferencesRole);
optionsAction->setEnabled(false);
toggleHideAction = new QAction(QIcon(":/icons/about"), tr("&Show / Hide"), this);
toggleHideAction = new QAction(tr("&Show / Hide"), this);
toggleHideAction->setStatusTip(tr("Show or hide the main Window"));

encryptWalletAction = new QAction(QIcon(":/icons/lock_closed"), tr("&Encrypt Wallet..."), this);
encryptWalletAction = new QAction(tr("&Encrypt Wallet..."), this);
encryptWalletAction->setStatusTip(tr("Encrypt the private keys that belong to your wallet"));
encryptWalletAction->setCheckable(true);
backupWalletAction = new QAction(QIcon(":/icons/filesave"), tr("&Backup Wallet..."), this);
backupWalletAction = new QAction(tr("&Backup Wallet..."), this);
backupWalletAction->setStatusTip(tr("Backup wallet to another location"));
changePassphraseAction = new QAction(QIcon(":/icons/key"), tr("&Change Passphrase..."), this);
changePassphraseAction = new QAction(tr("&Change Passphrase..."), this);
changePassphraseAction->setStatusTip(tr("Change the passphrase used for wallet encryption"));
unlockWalletAction = new QAction(tr("&Unlock Wallet..."), this);
unlockWalletAction->setToolTip(tr("Unlock wallet"));
lockWalletAction = new QAction(tr("&Lock Wallet"), this);
signMessageAction = new QAction(QIcon(":/icons/edit"), tr("Sign &message..."), this);
signMessageAction = new QAction(tr("Sign &message..."), this);
signMessageAction->setStatusTip(tr("Sign messages with your Dash addresses to prove you own them"));
verifyMessageAction = new QAction(QIcon(":/icons/transaction_0"), tr("&Verify message..."), this);
verifyMessageAction = new QAction(tr("&Verify message..."), this);
verifyMessageAction->setStatusTip(tr("Verify messages to ensure they were signed with specified Dash addresses"));

openInfoAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr("&Information"), this);
openInfoAction = new QAction(tr("&Information"), this);
openInfoAction->setStatusTip(tr("Show diagnostic information"));
openRPCConsoleAction = new QAction(QIcon(":/icons/debugwindow"), tr("&Debug console"), this);
openRPCConsoleAction = new QAction(tr("&Debug console"), this);
openRPCConsoleAction->setStatusTip(tr("Open debugging console"));
openGraphAction = new QAction(QIcon(":/icons/connect_4"), tr("&Network Monitor"), this);
openGraphAction = new QAction(tr("&Network Monitor"), this);
openGraphAction->setStatusTip(tr("Show network monitor"));
openPeersAction = new QAction(QIcon(":/icons/connect_4"), tr("&Peers list"), this);
openPeersAction = new QAction(tr("&Peers list"), this);
openPeersAction->setStatusTip(tr("Show peers info"));
openRepairAction = new QAction(QIcon(":/icons/options"), tr("Wallet &Repair"), this);
openRepairAction = new QAction(tr("Wallet &Repair"), this);
openRepairAction->setStatusTip(tr("Show wallet repair options"));
openConfEditorAction = new QAction(QIcon(":/icons/edit"), tr("Open Wallet &Configuration File"), this);
openConfEditorAction = new QAction(tr("Open Wallet &Configuration File"), this);
openConfEditorAction->setStatusTip(tr("Open configuration file"));
// override TextHeuristicRole set by default which confuses this action with application settings
openConfEditorAction->setMenuRole(QAction::NoRole);
showBackupsAction = new QAction(QIcon(":/icons/browse"), tr("Show Automatic &Backups"), this);
showBackupsAction = new QAction(tr("Show Automatic &Backups"), this);
showBackupsAction->setStatusTip(tr("Show automatically created wallet backups"));
// initially disable the debug window menu items
openInfoAction->setEnabled(false);
Expand All @@ -459,19 +457,19 @@ void BitcoinGUI::createActions()
openPeersAction->setEnabled(false);
openRepairAction->setEnabled(false);

usedSendingAddressesAction = new QAction(QIcon(":/icons/address-book"), tr("&Sending addresses..."), this);
usedSendingAddressesAction = new QAction(tr("&Sending addresses..."), this);
usedSendingAddressesAction->setStatusTip(tr("Show the list of used sending addresses and labels"));
usedReceivingAddressesAction = new QAction(QIcon(":/icons/address-book"), tr("&Receiving addresses..."), this);
usedReceivingAddressesAction = new QAction(tr("&Receiving addresses..."), this);
usedReceivingAddressesAction->setStatusTip(tr("Show the list of used receiving addresses and labels"));

openAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_DirOpenIcon), tr("Open &URI..."), this);
openAction = new QAction(tr("Open &URI..."), this);
openAction->setStatusTip(tr("Open a dash: URI or payment request"));

showHelpMessageAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr("&Command-line options"), this);
showHelpMessageAction = new QAction(tr("&Command-line options"), this);
showHelpMessageAction->setMenuRole(QAction::NoRole);
showHelpMessageAction->setStatusTip(tr("Show the %1 help message to get a list with possible Dash command-line options").arg(tr(PACKAGE_NAME)));

showPrivateSendHelpAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr("&PrivateSend information"), this);
showPrivateSendHelpAction = new QAction(tr("&PrivateSend information"), this);
showPrivateSendHelpAction->setMenuRole(QAction::NoRole);
showPrivateSendHelpAction->setStatusTip(tr("Show the PrivateSend basic information"));

Expand Down Expand Up @@ -697,13 +695,13 @@ void BitcoinGUI::setClientModel(ClientModel *_clientModel)
}
#endif // ENABLE_WALLET
unitDisplayControl->setOptionsModel(_clientModel->getOptionsModel());

OptionsModel* optionsModel = _clientModel->getOptionsModel();
if(optionsModel)
{
// be aware of the tray icon disable state change reported by the OptionsModel object.
connect(optionsModel,SIGNAL(hideTrayIconChanged(bool)),this,SLOT(setTrayIconVisible(bool)));

// initialize the disable state of the tray icon with the current value in the model.
setTrayIconVisible(optionsModel->getHideTrayIcon());
}
Expand Down Expand Up @@ -1023,7 +1021,7 @@ void BitcoinGUI::updateNetworkState()
icon = ":/icons/network_disabled";
}

labelConnectionsIcon->setPixmap(platformStyle->SingleColorIcon(icon).pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
labelConnectionsIcon->setPixmap(QIcon(icon).pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
}

void BitcoinGUI::setNumConnections(int count)
Expand Down Expand Up @@ -1141,7 +1139,7 @@ void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, double nVer
tooltip = tr("Catching up...") + QString("<br>") + tooltip;
if(count != prevBlocks)
{
labelBlocksIcon->setPixmap(platformStyle->SingleColorIcon(QString(
labelBlocksIcon->setPixmap(QIcon(QString(
":/movies/spinner-%1").arg(spinnerFrame, 3, 10, QChar('0')))
.pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
spinnerFrame = (spinnerFrame + 1) % SPINNER_FRAMES;
Expand Down Expand Up @@ -1200,7 +1198,7 @@ void BitcoinGUI::setAdditionalDataSyncProgress(double nSyncProgress)
labelBlocksIcon->setPixmap(QIcon(":/icons/synced").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
} else {

labelBlocksIcon->setPixmap(platformStyle->SingleColorIcon(QString(
labelBlocksIcon->setPixmap(QIcon(QString(
":/movies/spinner-%1").arg(spinnerFrame, 3, 10, QChar('0')))
.pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
spinnerFrame = (spinnerFrame + 1) % SPINNER_FRAMES;
Expand Down Expand Up @@ -1473,7 +1471,7 @@ bool BitcoinGUI::handlePaymentRequest(const SendCoinsRecipient& recipient)

void BitcoinGUI::setHDStatus(int hdEnabled)
{
labelWalletHDStatusIcon->setPixmap(platformStyle->SingleColorIcon(hdEnabled ? ":/icons/hd_enabled" : ":/icons/hd_disabled").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
labelWalletHDStatusIcon->setPixmap(QIcon(hdEnabled ? ":/icons/hd_enabled" : ":/icons/hd_disabled").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
labelWalletHDStatusIcon->setToolTip(hdEnabled ? tr("HD key generation is <b>enabled</b>") : tr("HD key generation is <b>disabled</b>"));

// eventually disable the QLabel to set its opacity to 50%
Expand Down Expand Up @@ -1649,7 +1647,7 @@ void BitcoinGUI::handleRestart(QStringList args)
Q_EMIT requestedRestart(args);
}

UnitDisplayStatusBarControl::UnitDisplayStatusBarControl(const PlatformStyle *platformStyle) :
UnitDisplayStatusBarControl::UnitDisplayStatusBarControl() :
optionsModel(0),
menu(0)
{
Expand Down
7 changes: 2 additions & 5 deletions src/qt/bitcoingui.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class ClientModel;
class NetworkStyle;
class Notificator;
class OptionsModel;
class PlatformStyle;
class RPCConsole;
class SendCoinsRecipient;
class UnitDisplayStatusBarControl;
Expand Down Expand Up @@ -55,7 +54,7 @@ class BitcoinGUI : public QMainWindow
public:
static const std::string DEFAULT_UIPLATFORM;

explicit BitcoinGUI(const PlatformStyle *platformStyle, const NetworkStyle *networkStyle, QWidget *parent = 0);
explicit BitcoinGUI(const NetworkStyle* networkStyle, QWidget* parent = 0);
~BitcoinGUI();

/** Set the client model.
Expand Down Expand Up @@ -151,8 +150,6 @@ class BitcoinGUI : public QMainWindow
int prevBlocks;
int spinnerFrame;

const PlatformStyle *platformStyle;

struct IncomingTransactionMessage {
QString date;
int unit;
Expand Down Expand Up @@ -325,7 +322,7 @@ class UnitDisplayStatusBarControl : public QLabel
Q_OBJECT

public:
explicit UnitDisplayStatusBarControl(const PlatformStyle *platformStyle);
explicit UnitDisplayStatusBarControl();
/** Lets the control know about the Options Model (and its signals) */
void setOptionsModel(OptionsModel *optionsModel);

Expand Down
6 changes: 2 additions & 4 deletions src/qt/coincontroldialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <qt/bitcoinunits.h>
#include <qt/guiutil.h>
#include <qt/optionsmodel.h>
#include <qt/platformstyle.h>
#include <txmempool.h>
#include <qt/walletmodel.h>

Expand Down Expand Up @@ -43,11 +42,10 @@ bool CCoinControlWidgetItem::operator<(const QTreeWidgetItem &other) const {
return QTreeWidgetItem::operator<(other);
}

CoinControlDialog::CoinControlDialog(const PlatformStyle *_platformStyle, QWidget *parent) :
CoinControlDialog::CoinControlDialog(QWidget* parent) :
QDialog(parent),
ui(new Ui::CoinControlDialog),
model(0),
platformStyle(_platformStyle)
model(0)
{
ui->setupUi(this);

Expand Down
5 changes: 1 addition & 4 deletions src/qt/coincontroldialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include <QString>
#include <QTreeWidgetItem>

class PlatformStyle;
class WalletModel;

class CCoinControl;
Expand All @@ -43,7 +42,7 @@ class CoinControlDialog : public QDialog
Q_OBJECT

public:
explicit CoinControlDialog(const PlatformStyle *platformStyle, QWidget *parent = 0);
explicit CoinControlDialog(QWidget* parent = 0);
~CoinControlDialog();

void setModel(WalletModel *model);
Expand All @@ -67,8 +66,6 @@ class CoinControlDialog : public QDialog
QAction *lockAction;
QAction *unlockAction;

const PlatformStyle *platformStyle;

void sortView(int, Qt::SortOrder);
void updateView();

Expand Down
Loading