Add tooltips, make "amount" entry consistent in Options dialog

This commit is contained in:
Wladimir J. van der Laan 2011-06-11 12:46:09 +02:00
parent 4181184acf
commit 5e1feddcb6
7 changed files with 82 additions and 13 deletions

View File

@ -17,9 +17,12 @@
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>1</number>
<number>0</number>
</property>
<widget class="QWidget" name="sendTab">
<property name="toolTip">
<string/>
</property>
<attribute name="title">
<string>Sending</string>
</attribute>
@ -43,6 +46,9 @@
</layout>
</widget>
<widget class="QWidget" name="receiveTab">
<property name="toolTip">
<string/>
</property>
<attribute name="title">
<string>Receiving</string>
</attribute>
@ -97,6 +103,9 @@
</item>
<item>
<widget class="QPushButton" name="newAddressButton">
<property name="toolTip">
<string>Create a new address</string>
</property>
<property name="text">
<string>&amp;New Address...</string>
</property>
@ -104,6 +113,9 @@
</item>
<item>
<widget class="QPushButton" name="copyToClipboard">
<property name="toolTip">
<string>Copy the currently selected address to the system clipboard</string>
</property>
<property name="text">
<string>&amp;Copy to Clipboard</string>
</property>
@ -111,6 +123,9 @@
</item>
<item>
<widget class="QPushButton" name="editButton">
<property name="toolTip">
<string>Edit the currently selected address</string>
</property>
<property name="text">
<string>&amp;Edit...</string>
</property>
@ -118,6 +133,9 @@
</item>
<item>
<widget class="QPushButton" name="deleteButton">
<property name="toolTip">
<string>Delete the currently selected address from the list</string>
</property>
<property name="text">
<string>&amp;Delete</string>
</property>

View File

@ -40,10 +40,18 @@
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="labelEdit"/>
<widget class="QLineEdit" name="labelEdit">
<property name="toolTip">
<string>The label associated with this address book entry</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="addressEdit"/>
<widget class="QLineEdit" name="addressEdit">
<property name="toolTip">
<string>The address associated with this address book entry. This can only be modified for sending addresses.</string>
</property>
</widget>
</item>
</layout>
</item>

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>736</width>
<height>140</height>
<height>149</height>
</rect>
</property>
<property name="windowTitle">
@ -44,6 +44,9 @@
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="payTo">
<property name="toolTip">
<string>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</string>
</property>
<property name="maxLength">
<number>34</number>
</property>
@ -57,6 +60,9 @@
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>Amount of bitcoins to send (e.g. 0.05)</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
@ -64,6 +70,9 @@
</item>
<item row="3" column="2">
<widget class="QPushButton" name="pasteButton">
<property name="toolTip">
<string>Paste address from system clipboard</string>
</property>
<property name="text">
<string>&amp;Paste</string>
</property>
@ -74,6 +83,9 @@
</item>
<item row="3" column="3">
<widget class="QPushButton" name="addressBookButton">
<property name="toolTip">
<string>Look up adress in address book</string>
</property>
<property name="text">
<string>Address &amp;Book...</string>
</property>
@ -126,6 +138,9 @@
</item>
<item>
<widget class="QPushButton" name="sendButton">
<property name="toolTip">
<string>Confirm the send action</string>
</property>
<property name="text">
<string>&amp;Send</string>
</property>
@ -146,6 +161,9 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Abort the send action</string>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel</set>
</property>

View File

@ -15,7 +15,11 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QTextEdit" name="detailText"/>
<widget class="QTextEdit" name="detailText">
<property name="toolTip">
<string>This pane shows a detailed description of the transaction</string>
</property>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">

View File

@ -75,10 +75,13 @@ BitcoinGUI::BitcoinGUI(QWidget *parent):
address = new QLineEdit();
address->setReadOnly(true);
address->setFont(GUIUtil::bitcoinAddressFont());
address->setToolTip(tr("Your current default receiving address"));
hbox_address->addWidget(address);
QPushButton *button_new = new QPushButton(tr("&New..."));
button_new->setToolTip(tr("Create new receiving address"));
QPushButton *button_clipboard = new QPushButton(tr("&Copy to clipboard"));
button_clipboard->setToolTip(tr("Copy current receiving address to the system clipboard"));
hbox_address->addWidget(button_new);
hbox_address->addWidget(button_clipboard);
@ -89,6 +92,7 @@ BitcoinGUI::BitcoinGUI(QWidget *parent):
labelBalance = new QLabel();
labelBalance->setFont(QFont("Monospace"));
labelBalance->setToolTip(tr("Your current balance"));
hbox_balance->addWidget(labelBalance);
hbox_balance->addStretch(1);
@ -108,15 +112,18 @@ BitcoinGUI::BitcoinGUI(QWidget *parent):
labelConnections = new QLabel();
labelConnections->setFrameStyle(QFrame::Panel | QFrame::Sunken);
labelConnections->setMinimumWidth(130);
labelConnections->setToolTip(tr("Number of connections to other clients"));
labelBlocks = new QLabel();
labelBlocks->setFrameStyle(QFrame::Panel | QFrame::Sunken);
labelBlocks->setMinimumWidth(130);
labelBlocks->setToolTip(tr("Number of blocks in the block chain"));
labelTransactions = new QLabel();
labelTransactions->setFrameStyle(QFrame::Panel | QFrame::Sunken);
labelTransactions->setMinimumWidth(130);
labelTransactions->setToolTip(tr("Number of transactions in your wallet"));
statusBar()->addPermanentWidget(labelConnections);
statusBar()->addPermanentWidget(labelBlocks);
statusBar()->addPermanentWidget(labelTransactions);
@ -131,12 +138,19 @@ BitcoinGUI::BitcoinGUI(QWidget *parent):
void BitcoinGUI::createActions()
{
quit = new QAction(QIcon(":/icons/quit"), tr("&Exit"), this);
quit->setToolTip(tr("Quit application"));
sendcoins = new QAction(QIcon(":/icons/send"), tr("&Send coins"), this);
sendcoins->setToolTip(tr("Send coins to a bitcoin address"));
addressbook = new QAction(QIcon(":/icons/address-book"), tr("&Address Book"), this);
addressbook->setToolTip(tr("Edit the list of stored addresses and labels"));
about = new QAction(QIcon(":/icons/bitcoin"), tr("&About"), this);
about->setToolTip(tr("Show information about Bitcoin"));
receivingAddresses = new QAction(QIcon(":/icons/receiving-addresses"), tr("Your &Receiving Addresses..."), this);
receivingAddresses->setToolTip(tr("Show the list of receiving addresses and edit their labels"));
options = new QAction(QIcon(":/icons/options"), tr("&Options..."), this);
options->setToolTip(tr("Modify configuration options for bitcoin"));
openBitcoin = new QAction(QIcon(":/icons/bitcoin"), "Open &Bitcoin", this);
openBitcoin->setToolTip(tr("Show the Bitcoin window"));
connect(quit, SIGNAL(triggered()), qApp, SLOT(quit()));
connect(sendcoins, SIGNAL(triggered()), this, SLOT(sendcoinsClicked()));

View File

@ -33,5 +33,6 @@ void GUIUtil::setupAmountWidget(QLineEdit *widget, QWidget *parent)
amountValidator->setDecimals(8);
amountValidator->setBottom(0.0);
widget->setValidator(amountValidator);
widget->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
}

View File

@ -1,6 +1,7 @@
#include "optionsdialog.h"
#include "optionsmodel.h"
#include "monitoreddatamapper.h"
#include "guiutil.h"
#include <QHBoxLayout>
#include <QVBoxLayout>
@ -144,18 +145,23 @@ MainOptionsPage::MainOptionsPage(QWidget *parent):
QVBoxLayout *layout = new QVBoxLayout();
bitcoin_at_startup = new QCheckBox(tr("&Start Bitcoin on window system startup"));
bitcoin_at_startup->setToolTip(tr("Automatically start Bitcoin after the computer is turned on"));
layout->addWidget(bitcoin_at_startup);
minimize_to_tray = new QCheckBox(tr("&Minimize to the tray instead of the taskbar"));
minimize_to_tray->setToolTip(tr("Show only a tray icon after minimizing the window"));
layout->addWidget(minimize_to_tray);
map_port_upnp = new QCheckBox(tr("Map port using &UPnP"));
map_port_upnp->setToolTip(tr("Automatically open the Bitcoin client port on the router. This only works when your router supports UPnP and it is enabled."));
layout->addWidget(map_port_upnp);
minimize_on_close = new QCheckBox(tr("M&inimize on close"));
minimize_on_close->setToolTip(tr("Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu."));
layout->addWidget(minimize_on_close);
connect_socks4 = new QCheckBox(tr("&Connect through socks4 proxy:"));
connect_socks4 = new QCheckBox(tr("&Connect through SOCKS4 proxy:"));
connect_socks4->setToolTip(tr("Connect to the Bitcon network through a SOCKS4 proxy (e.g. when connecting through Tor)"));
layout->addWidget(connect_socks4);
QHBoxLayout *proxy_hbox = new QHBoxLayout();
@ -166,6 +172,7 @@ MainOptionsPage::MainOptionsPage(QWidget *parent):
proxy_ip->setMaximumWidth(140);
proxy_ip->setEnabled(false);
proxy_ip->setValidator(new QRegExpValidator(QRegExp("[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}"), this));
proxy_ip->setToolTip(tr("IP address of the proxy (e.g. 127.0.0.1)"));
proxy_ip_label->setBuddy(proxy_ip);
proxy_hbox->addWidget(proxy_ip);
QLabel *proxy_port_label = new QLabel(tr("&Port: "));
@ -174,6 +181,7 @@ MainOptionsPage::MainOptionsPage(QWidget *parent):
proxy_port->setMaximumWidth(55);
proxy_port->setValidator(new QIntValidator(0, 65535, this));
proxy_port->setEnabled(false);
proxy_port->setToolTip(tr("Port of the proxy (e.g. 1234)"));
proxy_port_label->setBuddy(proxy_port);
proxy_hbox->addWidget(proxy_port);
proxy_hbox->addStretch(1);
@ -188,12 +196,10 @@ MainOptionsPage::MainOptionsPage(QWidget *parent):
QLabel *fee_label = new QLabel(tr("Pay transaction &fee"));
fee_hbox->addWidget(fee_label);
fee_edit = new QLineEdit();
fee_edit->setMaximumWidth(70);
fee_edit->setMaximumWidth(100);
fee_edit->setToolTip(tr("Optional transaction fee per KB that helps make sure your transactions are processed quickly. Most transactions are 1KB. Fee 0.01 recommended."));
QDoubleValidator *amountValidator = new QDoubleValidator(this);
amountValidator->setDecimals(8);
amountValidator->setBottom(0.0);
fee_edit->setValidator(amountValidator);
GUIUtil::setupAmountWidget(fee_edit, this);
fee_label->setBuddy(fee_edit);
fee_hbox->addWidget(fee_edit);