qt: add network-specific style object
Mainly cleanups: Gets rid of isTestNet everywhere, by keeping track of network-specific theming in a central place. Also makes GUI no longer dependent on the network ID enumeration, which alleviates concerns about #4802.
This commit is contained in:
committed by
jtimon
parent
dec58922d0
commit
6de50c3c9a
@@ -19,6 +19,7 @@
|
||||
#include <QSystemTrayIcon>
|
||||
|
||||
class ClientModel;
|
||||
class NetworkStyle;
|
||||
class Notificator;
|
||||
class OptionsModel;
|
||||
class RPCConsole;
|
||||
@@ -46,7 +47,7 @@ class BitcoinGUI : public QMainWindow
|
||||
public:
|
||||
static const QString DEFAULT_WALLET;
|
||||
|
||||
explicit BitcoinGUI(bool fIsTestnet = false, QWidget *parent = 0);
|
||||
explicit BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent = 0);
|
||||
~BitcoinGUI();
|
||||
|
||||
/** Set the client model.
|
||||
@@ -114,13 +115,13 @@ private:
|
||||
int spinnerFrame;
|
||||
|
||||
/** Create the main UI actions. */
|
||||
void createActions(bool fIsTestnet);
|
||||
void createActions(const NetworkStyle *networkStyle);
|
||||
/** Create the menu bar and sub-menus. */
|
||||
void createMenuBar();
|
||||
/** Create the toolbars */
|
||||
void createToolBars();
|
||||
/** Create system tray icon and notification */
|
||||
void createTrayIcon(bool fIsTestnet);
|
||||
void createTrayIcon(const NetworkStyle *networkStyle);
|
||||
/** Create system tray menu (or setup the dock menu) */
|
||||
void createTrayIconMenu();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user