5 #if defined(HAVE_CONFIG_H)    11 #include <qt/forms/ui_helpmessagedialog.h>    29 #include <QCloseEvent>    33 #include <QTextCursor>    34 #include <QVBoxLayout>    47 #if defined(__x86_64__)    48     version += 
" " + tr(
"(%1-bit)").arg(64);
    49 #elif defined(__i386__ )    50     version += 
" " + tr(
"(%1-bit)").arg(32);
    58         QString licenseInfo = QString::fromStdString(
LicenseInfo());
    59         QString licenseInfoHTML = licenseInfo;
    61         QRegExp uri(
"<(.*)>", Qt::CaseSensitive, QRegExp::RegExp2);
    63         licenseInfoHTML.replace(uri, 
"<a href=\"\\1\">\\1</a>");
    65         licenseInfoHTML.replace(
"\n", 
"<br>");
    67         ui->aboutMessage->setTextFormat(Qt::RichText);
    68         ui->scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
    69         text = version + 
"\n" + licenseInfo;
    70         ui->aboutMessage->setText(version + 
"<br><br>" + licenseInfoHTML);
    71         ui->aboutMessage->setWordWrap(
true);
    72         ui->helpMessage->setVisible(
false);
    74         setWindowTitle(tr(
"Command-line options"));
    75         QString header = 
"Usage:  bsha3-qt [command-line options]                     \n";
    76         QTextCursor cursor(
ui->helpMessage->document());
    77         cursor.insertText(version);
    79         cursor.insertText(header);
    83         QString coreOptions = QString::fromStdString(strUsage);
    84         text = version + 
"\n\n" + header + 
"\n" + coreOptions;
    87         tf.setBorderStyle(QTextFrameFormat::BorderStyle_None);
    89         QVector<QTextLength> widths;
    90         widths << QTextLength(QTextLength::PercentageLength, 35);
    91         widths << QTextLength(QTextLength::PercentageLength, 65);
    92         tf.setColumnWidthConstraints(widths);
    95         bold.setFontWeight(QFont::Bold);
    97         for (
const QString &line : coreOptions.split(
"\n")) {
    98             if (line.startsWith(
"  -"))
   100                 cursor.currentTable()->appendRows(1);
   101                 cursor.movePosition(QTextCursor::PreviousCell);
   102                 cursor.movePosition(QTextCursor::NextRow);
   103                 cursor.insertText(line.trimmed());
   104                 cursor.movePosition(QTextCursor::NextCell);
   105             } 
else if (line.startsWith(
"   ")) {
   106                 cursor.insertText(line.trimmed()+
' ');
   107             } 
else if (line.size() > 0) {
   109                 if (cursor.currentTable())
   110                     cursor.currentTable()->appendRows(1);
   111                 cursor.movePosition(QTextCursor::Down);
   112                 cursor.insertText(line.trimmed(), bold);
   113                 cursor.insertTable(1, 2, tf);
   117         ui->helpMessage->moveCursor(QTextCursor::Start);
   118         ui->scrollArea->setVisible(
false);
   119         ui->aboutLogo->setVisible(
false);
   131     fprintf(stdout, 
"%s\n", qPrintable(
text));
   155     QVBoxLayout *layout = 
new QVBoxLayout();
   156     layout->addWidget(
new QLabel(
   157         tr(
"%1 is shutting down...").arg(tr(
PACKAGE_NAME)) + 
"<br /><br />" +
   158         tr(
"Do not shut down the computer until this window disappears.")));
   169     shutdownWindow->setWindowTitle(window->windowTitle());
   172     const QPoint global = window->mapToGlobal(window->rect().center());
   173     shutdownWindow->move(global.x() - shutdownWindow->width() / 2, global.y() - shutdownWindow->height() / 2);
   174     shutdownWindow->show();
   175     return shutdownWindow;
 
void on_okButton_accepted()
 
ShutdownWindow(QWidget *parent=0, Qt::WindowFlags f=0)
"Shutdown" window 
 
std::string LicenseInfo()
Returns licensing information (for -version) 
 
void closeEvent(QCloseEvent *event)
 
std::string GetHelpMessage() const
Get the help string. 
 
std::string FormatFullVersion()
 
Ui::HelpMessageDialog * ui
 
static QWidget * showShutdownWindow(BitcoinGUI *window)
 
"Help message" dialog box 
 
HelpMessageDialog(interfaces::Node &node, QWidget *parent, bool about)
"Help message" or "About" dialog box 
 
Top-level interface for a bitcoin node (bsha3d process).