aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2012-05-12 00:28:58 +0200
committerPhilip Kaufmann <phil.kaufmann@t-online.de>2012-05-12 00:28:58 +0200
commitd2f7778cc7a2258b55f779584c9ca47c8c4b12b9 (patch)
tree5be944ca60396d0411e32ea5f5d73557149a2b3e
parentb34c5f3c0f4b37335e27bd67f554cf4df6976116 (diff)
downloadbitcoin-d2f7778cc7a2258b55f779584c9ca47c8c4b12b9.tar.xz
add the client startup time to the debug window / rename Version label to Client, which is better suiting now / add IBeamCursor for selectable text on the information page / make ">" sign on RPC page untranslatable / re-order XML-file tags to match real GUI element order
-rw-r--r--src/qt/clientmodel.cpp6
-rw-r--r--src/qt/clientmodel.h1
-rw-r--r--src/qt/forms/rpcconsole.ui126
-rw-r--r--src/qt/rpcconsole.cpp1
4 files changed, 96 insertions, 38 deletions
diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp
index d7172fd9cd..85ab03612d 100644
--- a/src/qt/clientmodel.cpp
+++ b/src/qt/clientmodel.cpp
@@ -5,6 +5,7 @@
#include "transactiontablemodel.h"
#include "main.h"
+static const int64 nClientStartupTime = GetTime();
#include <QDateTime>
@@ -98,3 +99,8 @@ QString ClientModel::clientName() const
{
return QString::fromStdString(CLIENT_NAME);
}
+
+QDateTime ClientModel::formatClientStartupTime() const
+{
+ return QDateTime::fromTime_t(nClientStartupTime);
+}
diff --git a/src/qt/clientmodel.h b/src/qt/clientmodel.h
index 74e0c0688f..67835db727 100644
--- a/src/qt/clientmodel.h
+++ b/src/qt/clientmodel.h
@@ -39,6 +39,7 @@ public:
QString formatFullVersion() const;
QString formatBuildDate() const;
QString clientName() const;
+ QDateTime formatClientStartupTime() const;
private:
OptionsModel *optionsModel;
diff --git a/src/qt/forms/rpcconsole.ui b/src/qt/forms/rpcconsole.ui
index 02164f76b5..e8f01ff2f5 100644
--- a/src/qt/forms/rpcconsole.ui
+++ b/src/qt/forms/rpcconsole.ui
@@ -27,6 +27,19 @@
<property name="horizontalSpacing">
<number>12</number>
</property>
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_9">
+ <property name="font">
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>Client</string>
+ </property>
+ </widget>
+ </item>
<item row="1" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
@@ -36,6 +49,9 @@
</item>
<item row="1" column="1">
<widget class="QLabel" name="clientName">
+ <property name="cursor">
+ <cursorShape>IBeamCursor</cursorShape>
+ </property>
<property name="text">
<string>N/A</string>
</property>
@@ -56,6 +72,9 @@
</item>
<item row="2" column="1">
<widget class="QLabel" name="clientVersion">
+ <property name="cursor">
+ <cursorShape>IBeamCursor</cursorShape>
+ </property>
<property name="text">
<string>N/A</string>
</property>
@@ -67,20 +86,53 @@
</property>
</widget>
</item>
- <item row="0" column="0">
- <widget class="QLabel" name="label_9">
- <property name="font">
- <font>
- <weight>75</weight>
- <bold>true</bold>
- </font>
+ <item row="3" column="0">
+ <widget class="QLabel" name="label_12">
+ <property name="text">
+ <string>Build date</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QLabel" name="buildDate">
+ <property name="cursor">
+ <cursorShape>IBeamCursor</cursorShape>
</property>
<property name="text">
- <string>Version</string>
+ <string>N/A</string>
+ </property>
+ <property name="textFormat">
+ <enum>Qt::PlainText</enum>
+ </property>
+ <property name="textInteractionFlags">
+ <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item row="4" column="0">
+ <widget class="QLabel" name="label_13">
+ <property name="text">
+ <string>Startup time</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1">
+ <widget class="QLabel" name="startupTime">
+ <property name="cursor">
+ <cursorShape>IBeamCursor</cursorShape>
+ </property>
+ <property name="text">
+ <string>N/A</string>
+ </property>
+ <property name="textFormat">
+ <enum>Qt::PlainText</enum>
+ </property>
+ <property name="textInteractionFlags">
+ <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="0">
<widget class="QLabel" name="label_11">
<property name="font">
<font>
@@ -93,15 +145,18 @@
</property>
</widget>
</item>
- <item row="5" column="0">
+ <item row="6" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Number of connections</string>
</property>
</widget>
</item>
- <item row="5" column="1">
+ <item row="6" column="1">
<widget class="QLabel" name="numberOfConnections">
+ <property name="cursor">
+ <cursorShape>IBeamCursor</cursorShape>
+ </property>
<property name="text">
<string>N/A</string>
</property>
@@ -113,14 +168,14 @@
</property>
</widget>
</item>
- <item row="6" column="0">
+ <item row="7" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>On testnet</string>
</property>
</widget>
</item>
- <item row="6" column="1">
+ <item row="7" column="1">
<widget class="QCheckBox" name="isTestNet">
<property name="enabled">
<bool>false</bool>
@@ -130,7 +185,7 @@
</property>
</widget>
</item>
- <item row="7" column="0">
+ <item row="8" column="0">
<widget class="QLabel" name="label_10">
<property name="font">
<font>
@@ -143,15 +198,18 @@
</property>
</widget>
</item>
- <item row="8" column="0">
+ <item row="9" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Current number of blocks</string>
</property>
</widget>
</item>
- <item row="8" column="1">
+ <item row="9" column="1">
<widget class="QLabel" name="numberOfBlocks">
+ <property name="cursor">
+ <cursorShape>IBeamCursor</cursorShape>
+ </property>
<property name="text">
<string>N/A</string>
</property>
@@ -163,15 +221,18 @@
</property>
</widget>
</item>
- <item row="9" column="0">
+ <item row="10" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Estimated total blocks</string>
</property>
</widget>
</item>
- <item row="9" column="1">
+ <item row="10" column="1">
<widget class="QLabel" name="totalBlocks">
+ <property name="cursor">
+ <cursorShape>IBeamCursor</cursorShape>
+ </property>
<property name="text">
<string>N/A</string>
</property>
@@ -183,15 +244,18 @@
</property>
</widget>
</item>
- <item row="10" column="0">
+ <item row="11" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Last block time</string>
</property>
</widget>
</item>
- <item row="10" column="1">
+ <item row="11" column="1">
<widget class="QLabel" name="lastBlockTime">
+ <property name="cursor">
+ <cursorShape>IBeamCursor</cursorShape>
+ </property>
<property name="text">
<string>N/A</string>
</property>
@@ -203,7 +267,7 @@
</property>
</widget>
</item>
- <item row="11" column="0">
+ <item row="12" column="0">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -216,7 +280,7 @@
</property>
</spacer>
</item>
- <item row="12" column="0">
+ <item row="13" column="0">
<widget class="QLabel" name="labelDebugLogfile">
<property name="font">
<font>
@@ -229,7 +293,7 @@
</property>
</widget>
</item>
- <item row="13" column="0">
+ <item row="14" column="0">
<widget class="QPushButton" name="openDebugLogfileButton">
<property name="toolTip">
<string>Open the Bitcoin debug logfile from the current data directory. This can take a few seconds for large logfiles.</string>
@@ -239,7 +303,7 @@
</property>
</widget>
</item>
- <item row="14" column="0">
+ <item row="15" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -252,20 +316,6 @@
</property>
</spacer>
</item>
- <item row="3" column="0">
- <widget class="QLabel" name="label_12">
- <property name="text">
- <string>Build date</string>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
- <widget class="QLabel" name="buildDate">
- <property name="text">
- <string>N/A</string>
- </property>
- </widget>
- </item>
</layout>
</widget>
<widget class="QWidget" name="tab_console">
@@ -311,7 +361,7 @@
<item>
<widget class="QLabel" name="label">
<property name="text">
- <string>&gt;</string>
+ <string notr="true">&gt;</string>
</property>
</widget>
</item>
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index 9254fe4cb5..5a035888ed 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -150,6 +150,7 @@ void RPCConsole::setClientModel(ClientModel *model)
ui->clientVersion->setText(model->formatFullVersion());
ui->clientName->setText(model->clientName());
ui->buildDate->setText(model->formatBuildDate());
+ ui->startupTime->setText(model->formatClientStartupTime().toString());
setNumConnections(model->getNumConnections());
ui->isTestNet->setChecked(model->isTestNet());