Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
dash.cpp
Go to the documentation of this file.
117 static void initTranslations(QTranslator &qtTranslatorBase, QTranslator &qtTranslator, QTranslator &translatorBase, QTranslator &translator)
138 if (qtTranslatorBase.load("qt_" + lang, QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
142 if (qtTranslator.load("qt_" + lang_territory, QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
316 if(!executing_restart) { // Only restart 1x, no matter how often a user clicks on a restart-button
435 connect(executor, SIGNAL(runawayException(QString)), this, SLOT(handleRunawayException(QString)));
494 qWarning() << "Platform customization:" << gArgs.GetArg("-uiplatform", BitcoinGUI::DEFAULT_UIPLATFORM).c_str();
556 QMessageBox::critical(0, "Runaway exception", BitcoinGUI::tr("A fatal error occurred. Dash Core can no longer continue safely and will quit.") + QString("\n\n") + message);
607 // Need to pass name here as CAmount is a typedef (see http://qt-project.org/doc/qt-5/qmetatype.html#qRegisterMetaType)
633 // Show help message immediately after parsing command-line options (for "-lang") and setting locale,
635 if (gArgs.IsArgSet("-?") || gArgs.IsArgSet("-h") || gArgs.IsArgSet("-help") || gArgs.IsArgSet("-version"))
637 HelpMessageDialog help(nullptr, gArgs.IsArgSet("-version") ? HelpMessageDialog::about : HelpMessageDialog::cmdline);
652 QObject::tr("Error: Specified data directory \"%1\" does not exist.").arg(QString::fromStdString(gArgs.GetArg("-datadir", ""))));
659 QObject::tr("Error: Cannot parse configuration file: %1. Only use key=value syntax.").arg(e.what()));
666 // - QSettings() will use the new application name after this, resulting in network-specific settings
681 QScopedPointer<const NetworkStyle> networkStyle(NetworkStyle::instantiate(QString::fromStdString(Params().NetworkIDString())));
684 // QApplication::setApplicationName(networkStyle->getAppName()); // moved to NetworkStyle::NetworkStyle
685 // Re-initialize translations after changing application name (language in network-specific settings can be different)
691 // - Do this *after* setting up the data directory, as the data directory hash is used in the name
711 // Install global event filter for processing Windows session related Windows messages (WM_QUERYENDSESSION and WM_ENDSESSION)
730 QString strFamily = gArgs.GetArg("-font-family", GUIUtil::fontFamilyToString(GUIUtil::getFontFamilyDefault()).toStdString()).c_str();
735 QObject::tr("Error: Specified font-family invalid. Valid values: %1.").arg("SystemDefault, Montserrat"));
743 if (!GUIUtil::weightFromArg(gArgs.GetArg("-font-weight-normal", GUIUtil::weightToArg(GUIUtil::getFontWeightNormal())), weight)) {
745 QObject::tr("Error: Specified font-weight-normal invalid. Valid range %1 to %2.").arg(0).arg(8));
753 if (!GUIUtil::weightFromArg(gArgs.GetArg("-font-weight-bold", GUIUtil::weightToArg(GUIUtil::getFontWeightBold())), weight)) {
766 QObject::tr("Error: Specified font-scale invalid. Valid range %1 to %2.").arg(nScaleMin).arg(nScaleMax));
784 for (auto itCustomDir = fs::directory_iterator(customDir); itCustomDir != fs::directory_iterator(); ++itCustomDir) {
800 QObject::tr("Error: %1 CSS file(s) missing in -custom-css-dir path.").arg(vecRequiredFiles.size()) + "\n\n" + strMissingFiles);
809 "Warning: UI debug mode (-debug-ui) enabled" + QString(gArgs.IsArgSet("-custom-css-dir") ? "." : " without a custom css directory set with -custom-css-dir."));
828 WinShutdownMonitor::registerShutdownBlockReason(QObject::tr("%1 didn't yet exit safely...").arg(QObject::tr(PACKAGE_NAME)), (HWND)app.getMainWinId());
static void LoadRootCAs(X509_STORE *store=nullptr)
Definition: paymentserver.cpp:113
bool IsArgSet(const std::string &strArg) const
Return true if the given argument has been manually set.
Definition: util.cpp:784
bool weightFromArg(int nArg, QFont::Weight &weight)
Convert weight value from args (0-8) to QFont::Weight.
Definition: guiutil.cpp:1313
FontFamily getFontFamilyDefault()
set/get font family: GUIUtil::fontFamily
Definition: guiutil.cpp:1303
static const QString DEFAULT_WALLET
Display name for default wallet name.
Definition: bitcoingui.h:54
void ParseParameters(int argc, const char *const argv[])
Definition: util.cpp:730
int weightToArg(const QFont::Weight weight)
Convert QFont::Weight to an arg value (0-8)
Definition: guiutil.cpp:1334
Class for the splashscreen with information of the running client.
Definition: splashscreen.h:20
void stopThread()
FontFamily fontFamilyFromString(const QString &strFamily)
Definition: guiutil.cpp:1273
void setFontWeightNormal(QFont::Weight weight)
Definition: guiutil.cpp:1366
BitcoinApplication(int &argc, char **argv)
Definition: dash.cpp:350
void handleRunawayException(const std::exception_ptr e)
Pass fatal exception message to UI thread.
Definition: dash.cpp:273
void handleRunawayException(const QString &message)
Handle runaway exceptions. Shows a message box with the problem and quits the program.
Definition: dash.cpp:554
std::string GetCrashInfoStrFromSerializedStr(const std::string &ciStr)
Definition: stacktraces.cpp:422
void loadTheme(QWidget *widget, bool fForce)
Load the theme and update all UI elements according to the appearance settings.
Definition: guiutil.cpp:1782
const std::vector< QString > listStyleSheets()
Return a list of all required css files.
Definition: guiutil.cpp:1130
Definition: paymentserver.h:58
void requestedRestart(QStringList args)
Definition: box.hpp:161
Qt event filter that intercepts ToolTipChange events, and replaces the tooltip with a rich text repre...
Definition: guiutil.h:197
bool GetBoolArg(const std::string &strArg, bool fDefault) const
Return boolean argument or default value.
Definition: util.cpp:824
std::string GetWarnings(const std::string &strFor)
Format a string that describes several potential problems detected by the core.
Definition: warnings.cpp:41
void requestedInitialize()
void initializeResult(bool success)
static bool baseInitialize()
Basic initialization, before starting initialization/shutdown thread.
Definition: dash.cpp:279
void ReadConfigFile(const std::string &confPath)
Definition: util.cpp:1000
void PrepareShutdown()
Preparing steps before shutting down or restarting the wallet.
Definition: init.cpp:228
void setupAppearance(QWidget *parent, OptionsModel *model)
Definition: guiutil.cpp:309
static void ipcParseCommandLine(int argc, char *argv[])
Definition: paymentserver.cpp:204
Definition: util.h:129
void InitParameterInteraction()
Parameter interaction: change current parameters depending on various rules.
Definition: init.cpp:923
Definition: utilitydialog.h:24
Definition: utilitydialog.h:25
bool AppInitSanityChecks()
Initialization sanity checks: ecc init, sanity checks, dir lock.
Definition: init.cpp:1553
void createSplashScreen(const NetworkStyle *networkStyle)
Create splash screen.
Definition: dash.cpp:414
void SelectParams(const std::string &network)
Sets the params returned by Params() to those for the given BIP70 chain name.
Definition: chainparams.cpp:965
QString fontFamilyToString(FontFamily family)
Definition: guiutil.cpp:1284
Definition: walletmodel.h:39
void Shutdown()
Shutdown is split into 2 parts: Part 1: shut down everything but the main wallet instance (done in Pr...
Definition: init.cpp:375
void splashFinished(QWidget *window)
void DebugMessageHandler(QtMsgType type, const char *msg)
Definition: dash.cpp:156
void setStyleSheetDirectory(const QString &path)
Change the stylesheet directory.
Definition: guiutil.cpp:1120
void PrintExceptionContinue(const std::exception_ptr pex, const char *pszExceptionOrigin)
Definition: util.cpp:891
void requestedShutdown()
Interface from Qt to configuration data structure for Bitcoin client.
Definition: optionsmodel.h:25
const CChainParams & Params()
Return the currently selected parameters.
Definition: chainparams.cpp:947
boost::signals2::signal< std::string(const char *psz)> Translate
Translate a message to the native language of the user.
Definition: util.h:70
std::string GetArg(const std::string &strArg, const std::string &strDefault) const
Return string argument or default value.
Definition: util.cpp:808
Definition: networkstyle.h:14
static QWidget * showShutdownWindow(BitcoinGUI *window)
Definition: utilitydialog.cpp:224
A CWallet is an extension of a keystore, which also maintains a set of transactions and balances...
Definition: wallet.h:715
std::string GetChainName() const
Looks for -regtest, -testnet and returns the appropriate BIP70 chain name.
Definition: util.cpp:1026
static void initTranslations(QTranslator &qtTranslatorBase, QTranslator &qtTranslator, QTranslator &translatorBase, QTranslator &translator)
Set up translations.
Definition: dash.cpp:117
void shutdownResult()
static const std::string DEFAULT_UIPLATFORM
Definition: bitcoingui.h:55
void runawayException(const QString &message)
boost::signals2::signal< void(const std::string &message)> InitMessage
Progress message during initialization.
Definition: ui_interface.h:82
static const NetworkStyle * instantiate(const QString &networkId)
Get style associated with provided BIP70 network id, or 0 if not known.
Definition: networkstyle.cpp:97