aboutsummaryrefslogtreecommitdiff
path: root/src/qt/guiutil.cpp
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2014-01-16 16:05:44 +0100
committerPhilip Kaufmann <phil.kaufmann@t-online.de>2014-01-18 16:57:02 +0100
commit7b50bb2f1b96cb8964819e03eb044c3b88746946 (patch)
treebf67dbda25f0be285c549e528c031ee76e1eef69 /src/qt/guiutil.cpp
parent490d6a30461d11aa112efe9fb3006797651ba4d5 (diff)
[Qt] add utilitydialog.cpp/h and helpmessage class
- adds a nice and well formated dialog, which displays our -? help message (all options/paramaters) - moves aboutdialog.cpp/h to the new utilitydialog - move GUI shutdown window to utilitydialog
Diffstat (limited to 'src/qt/guiutil.cpp')
-rw-r--r--src/qt/guiutil.cpp41
1 files changed, 0 insertions, 41 deletions
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index b87498402d..2d8a6afe21 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -591,47 +591,6 @@ void restoreWindowGeometry(const QString& strSetting, const QSize& defaultSize,
parent->move(pos);
}
-HelpMessageBox::HelpMessageBox(QWidget *parent) :
- QMessageBox(parent)
-{
- header = tr("Bitcoin Core") + " " + tr("version") + " " +
- QString::fromStdString(FormatFullVersion()) + "\n\n" +
- tr("Usage:") + "\n" +
- " bitcoin-qt [" + tr("command-line options") + "] " + "\n";
-
- coreOptions = QString::fromStdString(HelpMessage(HMM_BITCOIN_QT));
-
- uiOptions = tr("UI options") + ":\n" +
- " -lang=<lang> " + tr("Set language, for example \"de_DE\" (default: system locale)") + "\n" +
- " -min " + tr("Start minimized") + "\n" +
- " -splash " + tr("Show splash screen on startup (default: 1)") + "\n" +
- " -choosedatadir " + tr("Choose data directory on startup (default: 0)") + "\n";
-
- setWindowTitle(tr("Bitcoin Core"));
- setTextFormat(Qt::PlainText);
- // setMinimumWidth is ignored for QMessageBox so put in non-breaking spaces to make it wider.
- setText(header + QString(QChar(0x2003)).repeated(50));
- setDetailedText(coreOptions + "\n" + uiOptions);
-}
-
-void HelpMessageBox::printToConsole()
-{
- // On other operating systems, the expected action is to print the message to the console.
- QString strUsage = header + "\n" + coreOptions + "\n" + uiOptions;
- fprintf(stdout, "%s", strUsage.toStdString().c_str());
-}
-
-void HelpMessageBox::showOrPrint()
-{
-#if defined(WIN32)
- // On Windows, show a message box, as there is no stderr/stdout in windowed applications
- exec();
-#else
- // On other operating systems, print help text to console
- printToConsole();
-#endif
-}
-
void setClipboard(const QString& str)
{
QApplication::clipboard()->setText(str, QClipboard::Clipboard);