Changeset View
Changeset View
Standalone View
Standalone View
src/qt/bitcoin.cpp
Show First 20 Lines • Show All 210 Lines • ▼ Show 20 Lines | #ifdef ENABLE_WALLET | ||||
/// Create payment server | /// Create payment server | ||||
void createPaymentServer(); | void createPaymentServer(); | ||||
#endif | #endif | ||||
/// parameter interaction/setup based on rules | /// parameter interaction/setup based on rules | ||||
void parameterSetup(); | void parameterSetup(); | ||||
/// Create options model | /// Create options model | ||||
void createOptionsModel(bool resetSettings); | void createOptionsModel(bool resetSettings); | ||||
/// Create main window | /// Create main window | ||||
void createWindow(const NetworkStyle *networkStyle); | void createWindow(const Config *, const NetworkStyle *networkStyle); | ||||
/// Create splash screen | /// Create splash screen | ||||
void createSplashScreen(const NetworkStyle *networkStyle); | void createSplashScreen(const NetworkStyle *networkStyle); | ||||
/// Request core initialization | /// Request core initialization | ||||
void requestInitialize(Config &config); | void requestInitialize(Config &config); | ||||
/// Request core shutdown | /// Request core shutdown | ||||
void requestShutdown(Config &config); | void requestShutdown(Config &config); | ||||
▲ Show 20 Lines • Show All 131 Lines • ▼ Show 20 Lines | void BitcoinApplication::createPaymentServer() { | ||||
paymentServer = new PaymentServer(this); | paymentServer = new PaymentServer(this); | ||||
} | } | ||||
#endif | #endif | ||||
void BitcoinApplication::createOptionsModel(bool resetSettings) { | void BitcoinApplication::createOptionsModel(bool resetSettings) { | ||||
optionsModel = new OptionsModel(nullptr, resetSettings); | optionsModel = new OptionsModel(nullptr, resetSettings); | ||||
} | } | ||||
void BitcoinApplication::createWindow(const NetworkStyle *networkStyle) { | void BitcoinApplication::createWindow(const Config *config, | ||||
window = new BitcoinGUI(platformStyle, networkStyle, 0); | const NetworkStyle *networkStyle) { | ||||
window = new BitcoinGUI(config, platformStyle, networkStyle, 0); | |||||
pollShutdownTimer = new QTimer(window); | pollShutdownTimer = new QTimer(window); | ||||
connect(pollShutdownTimer, SIGNAL(timeout()), window, | connect(pollShutdownTimer, SIGNAL(timeout()), window, | ||||
SLOT(detectShutdown())); | SLOT(detectShutdown())); | ||||
pollShutdownTimer->start(200); | pollShutdownTimer->start(200); | ||||
} | } | ||||
void BitcoinApplication::createSplashScreen(const NetworkStyle *networkStyle) { | void BitcoinApplication::createSplashScreen(const NetworkStyle *networkStyle) { | ||||
▲ Show 20 Lines • Show All 391 Lines • ▼ Show 20 Lines | #endif | ||||
// Get global config | // Get global config | ||||
Config &config = const_cast<Config &>(GetConfig()); | Config &config = const_cast<Config &>(GetConfig()); | ||||
if (GetBoolArg("-splash", DEFAULT_SPLASHSCREEN) && | if (GetBoolArg("-splash", DEFAULT_SPLASHSCREEN) && | ||||
!GetBoolArg("-min", false)) | !GetBoolArg("-min", false)) | ||||
app.createSplashScreen(networkStyle.data()); | app.createSplashScreen(networkStyle.data()); | ||||
try { | try { | ||||
app.createWindow(networkStyle.data()); | app.createWindow(&config, networkStyle.data()); | ||||
app.requestInitialize(config); | app.requestInitialize(config); | ||||
#if defined(Q_OS_WIN) && QT_VERSION >= 0x050000 | #if defined(Q_OS_WIN) && QT_VERSION >= 0x050000 | ||||
WinShutdownMonitor::registerShutdownBlockReason( | WinShutdownMonitor::registerShutdownBlockReason( | ||||
QObject::tr("%1 didn't yet exit safely...") | QObject::tr("%1 didn't yet exit safely...") | ||||
.arg(QObject::tr(PACKAGE_NAME)), | .arg(QObject::tr(PACKAGE_NAME)), | ||||
(HWND)app.getMainWinId()); | (HWND)app.getMainWinId()); | ||||
#endif | #endif | ||||
app.exec(); | app.exec(); | ||||
Show All 12 Lines |