Wladimir J. van der Laan
14 years ago
25 changed files with 447 additions and 69 deletions
@ -1,7 +0,0 @@
@@ -1,7 +0,0 @@
|
||||
#include "AddressBookDialog.h" |
||||
|
||||
AddressBookDialog::AddressBookDialog(QWidget *parent) : |
||||
QDialog(parent) |
||||
{ |
||||
} |
||||
|
@ -1,7 +0,0 @@
@@ -1,7 +0,0 @@
|
||||
#include "OptionsDialog.h" |
||||
/* TODO example: http://doc.trolltech.com/4.7/dialogs-configdialog-configdialog-cpp.html */ |
||||
|
||||
OptionsDialog::OptionsDialog(QWidget *parent) : |
||||
QDialog(parent) |
||||
{ |
||||
} |
@ -1,6 +0,0 @@
@@ -1,6 +0,0 @@
|
||||
#include "SendCoinsDialog.h" |
||||
|
||||
SendCoinsDialog::SendCoinsDialog(QWidget *parent) : |
||||
QDialog(parent) |
||||
{ |
||||
} |
@ -1,7 +0,0 @@
@@ -1,7 +0,0 @@
|
||||
#include "SettingsDialog.h" |
||||
|
||||
SettingsDialog::SettingsDialog(QWidget *parent) : |
||||
QDialog(parent) |
||||
{ |
||||
} |
||||
|
@ -1,18 +0,0 @@
@@ -1,18 +0,0 @@
|
||||
#ifndef SETTINGSDIALOG_H |
||||
#define SETTINGSDIALOG_H |
||||
|
||||
#include <QDialog> |
||||
|
||||
class SettingsDialog : public QDialog |
||||
{ |
||||
Q_OBJECT |
||||
public: |
||||
explicit SettingsDialog(QWidget *parent = 0); |
||||
|
||||
signals: |
||||
|
||||
public slots: |
||||
|
||||
}; |
||||
|
||||
#endif // SETTINGSDIALOG_H
|
@ -0,0 +1,19 @@
@@ -0,0 +1,19 @@
|
||||
#include "addressbookdialog.h" |
||||
#include "ui_addressbookdialog.h" |
||||
|
||||
AddressBookDialog::AddressBookDialog(QWidget *parent) : |
||||
QDialog(parent), |
||||
ui(new Ui::AddressBookDialog) |
||||
{ |
||||
ui->setupUi(this); |
||||
} |
||||
|
||||
AddressBookDialog::~AddressBookDialog() |
||||
{ |
||||
delete ui; |
||||
} |
||||
|
||||
void AddressBookDialog::setTab(int tab) |
||||
{ |
||||
|
||||
} |
@ -0,0 +1,77 @@
@@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<ui version="4.0"> |
||||
<class>AddressBookDialog</class> |
||||
<widget class="QDialog" name="AddressBookDialog"> |
||||
<property name="geometry"> |
||||
<rect> |
||||
<x>0</x> |
||||
<y>0</y> |
||||
<width>400</width> |
||||
<height>300</height> |
||||
</rect> |
||||
</property> |
||||
<property name="windowTitle"> |
||||
<string>Dialog</string> |
||||
</property> |
||||
<layout class="QVBoxLayout" name="verticalLayout"> |
||||
<item> |
||||
<spacer name="verticalSpacer"> |
||||
<property name="orientation"> |
||||
<enum>Qt::Vertical</enum> |
||||
</property> |
||||
<property name="sizeHint" stdset="0"> |
||||
<size> |
||||
<width>20</width> |
||||
<height>40</height> |
||||
</size> |
||||
</property> |
||||
</spacer> |
||||
</item> |
||||
<item> |
||||
<widget class="QDialogButtonBox" name="buttonBox"> |
||||
<property name="orientation"> |
||||
<enum>Qt::Horizontal</enum> |
||||
</property> |
||||
<property name="standardButtons"> |
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
</layout> |
||||
</widget> |
||||
<resources/> |
||||
<connections> |
||||
<connection> |
||||
<sender>buttonBox</sender> |
||||
<signal>accepted()</signal> |
||||
<receiver>AddressBookDialog</receiver> |
||||
<slot>accept()</slot> |
||||
<hints> |
||||
<hint type="sourcelabel"> |
||||
<x>248</x> |
||||
<y>254</y> |
||||
</hint> |
||||
<hint type="destinationlabel"> |
||||
<x>157</x> |
||||
<y>274</y> |
||||
</hint> |
||||
</hints> |
||||
</connection> |
||||
<connection> |
||||
<sender>buttonBox</sender> |
||||
<signal>rejected()</signal> |
||||
<receiver>AddressBookDialog</receiver> |
||||
<slot>reject()</slot> |
||||
<hints> |
||||
<hint type="sourcelabel"> |
||||
<x>316</x> |
||||
<y>260</y> |
||||
</hint> |
||||
<hint type="destinationlabel"> |
||||
<x>286</x> |
||||
<y>274</y> |
||||
</hint> |
||||
</hints> |
||||
</connection> |
||||
</connections> |
||||
</ui> |
@ -0,0 +1,67 @@
@@ -0,0 +1,67 @@
|
||||
#include "MainOptionsPage.h" |
||||
|
||||
#include <QHBoxLayout> |
||||
#include <QVBoxLayout> |
||||
#include <QCheckBox> |
||||
#include <QLabel> |
||||
#include <QLineEdit> |
||||
|
||||
MainOptionsPage::MainOptionsPage(QWidget *parent): |
||||
QWidget(parent) |
||||
{ |
||||
QVBoxLayout *layout = new QVBoxLayout(); |
||||
|
||||
QCheckBox *bitcoin_at_startup = new QCheckBox(tr("&Start Bitcoin on window system startup")); |
||||
layout->addWidget(bitcoin_at_startup); |
||||
|
||||
QCheckBox *minimize_to_tray = new QCheckBox(tr("&Minimize to the tray instead of the taskbar")); |
||||
layout->addWidget(minimize_to_tray); |
||||
|
||||
QCheckBox *map_port_upnp = new QCheckBox(tr("Map port using &UPnP")); |
||||
layout->addWidget(map_port_upnp); |
||||
|
||||
QCheckBox *minimize_on_close = new QCheckBox(tr("M&inimize on close")); |
||||
layout->addWidget(minimize_on_close); |
||||
|
||||
QCheckBox *connect_socks4 = new QCheckBox(tr("&Connect through socks4 proxy:")); |
||||
layout->addWidget(connect_socks4); |
||||
|
||||
QHBoxLayout *proxy_hbox = new QHBoxLayout(); |
||||
proxy_hbox->addSpacing(18); |
||||
QLabel *proxy_ip_label = new QLabel(tr("Proxy &IP: ")); |
||||
proxy_hbox->addWidget(proxy_ip_label); |
||||
QLineEdit *proxy_ip = new QLineEdit(); |
||||
proxy_ip->setMaximumWidth(140); |
||||
proxy_ip_label->setBuddy(proxy_ip); |
||||
proxy_hbox->addWidget(proxy_ip); |
||||
QLabel *proxy_port_label = new QLabel(tr("&Port: ")); |
||||
proxy_hbox->addWidget(proxy_port_label); |
||||
QLineEdit *proxy_port = new QLineEdit(); |
||||
proxy_port->setMaximumWidth(55); |
||||
proxy_port_label->setBuddy(proxy_port); |
||||
proxy_hbox->addWidget(proxy_port); |
||||
proxy_hbox->addStretch(1); |
||||
|
||||
layout->addLayout(proxy_hbox); |
||||
QLabel *fee_help = new QLabel(tr("Optional transaction fee per KB that helps make sure your transactions are processed quickly. Most transactions are 1KB. Fee 0.01 recommended.")); |
||||
fee_help->setWordWrap(true); |
||||
layout->addWidget(fee_help); |
||||
|
||||
QHBoxLayout *fee_hbox = new QHBoxLayout(); |
||||
fee_hbox->addSpacing(18); |
||||
QLabel *fee_label = new QLabel(tr("Pay transaction &fee")); |
||||
fee_hbox->addWidget(fee_label); |
||||
QLineEdit *fee_edit = new QLineEdit(); |
||||
fee_edit->setMaximumWidth(70); |
||||
fee_label->setBuddy(fee_edit); |
||||
fee_hbox->addWidget(fee_edit); |
||||
fee_hbox->addStretch(1); |
||||
|
||||
layout->addLayout(fee_hbox); |
||||
|
||||
|
||||
layout->addStretch(1); /* Extra space at bottom */ |
||||
|
||||
setLayout(layout); |
||||
} |
||||
|
@ -0,0 +1,18 @@
@@ -0,0 +1,18 @@
|
||||
#ifndef MAINOPTIONSPAGE_H |
||||
#define MAINOPTIONSPAGE_H |
||||
|
||||
#include <QWidget> |
||||
|
||||
class MainOptionsPage : public QWidget |
||||
{ |
||||
Q_OBJECT |
||||
public: |
||||
explicit MainOptionsPage(QWidget *parent = 0); |
||||
|
||||
signals: |
||||
|
||||
public slots: |
||||
|
||||
}; |
||||
|
||||
#endif // MAINOPTIONSPAGE_H
|
@ -0,0 +1,55 @@
@@ -0,0 +1,55 @@
|
||||
#include "OptionsDialog.h" |
||||
#include "MainOptionsPage.h" |
||||
|
||||
#include <QHBoxLayout> |
||||
#include <QVBoxLayout> |
||||
#include <QPushButton> |
||||
|
||||
OptionsDialog::OptionsDialog(QWidget *parent) : |
||||
QDialog(parent), contents_widget(0), pages_widget(0) |
||||
{ |
||||
contents_widget = new QListWidget(); |
||||
contents_widget->setMaximumWidth(128); |
||||
|
||||
pages_widget = new QStackedWidget(); |
||||
pages_widget->setMinimumWidth(300); |
||||
|
||||
QListWidgetItem *item_main = new QListWidgetItem(tr("Main")); |
||||
contents_widget->addItem(item_main); |
||||
pages_widget->addWidget(new MainOptionsPage(this)); |
||||
|
||||
contents_widget->setCurrentRow(0); |
||||
|
||||
QHBoxLayout *main_layout = new QHBoxLayout(); |
||||
main_layout->addWidget(contents_widget); |
||||
main_layout->addWidget(pages_widget, 1); |
||||
|
||||
QVBoxLayout *layout = new QVBoxLayout(); |
||||
layout->addLayout(main_layout); |
||||
|
||||
QHBoxLayout *buttons = new QHBoxLayout(); |
||||
buttons->addStretch(1); |
||||
QPushButton *ok_button = new QPushButton(tr("OK")); |
||||
buttons->addWidget(ok_button); |
||||
QPushButton *cancel_button = new QPushButton(tr("Cancel")); |
||||
buttons->addWidget(cancel_button); |
||||
QPushButton *apply_button = new QPushButton(tr("Apply")); |
||||
buttons->addWidget(apply_button); |
||||
|
||||
layout->addLayout(buttons); |
||||
|
||||
|
||||
setLayout(layout); |
||||
setWindowTitle(tr("Options")); |
||||
|
||||
|
||||
} |
||||
|
||||
void OptionsDialog::changePage(QListWidgetItem *current, QListWidgetItem *previous) |
||||
{ |
||||
Q_UNUSED(previous); |
||||
if(current) |
||||
{ |
||||
pages_widget->setCurrentIndex(contents_widget->row(current)); |
||||
} |
||||
} |
@ -0,0 +1,14 @@
@@ -0,0 +1,14 @@
|
||||
#include "SendCoinsDialog.h" |
||||
#include "ui_sendcoinsdialog.h" |
||||
|
||||
SendCoinsDialog::SendCoinsDialog(QWidget *parent) : |
||||
QDialog(parent), |
||||
ui(new Ui::SendCoinsDialog) |
||||
{ |
||||
ui->setupUi(this); |
||||
} |
||||
|
||||
SendCoinsDialog::~SendCoinsDialog() |
||||
{ |
||||
delete ui; |
||||
} |
@ -0,0 +1,146 @@
@@ -0,0 +1,146 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<ui version="4.0"> |
||||
<class>SendCoinsDialog</class> |
||||
<widget class="QDialog" name="SendCoinsDialog"> |
||||
<property name="geometry"> |
||||
<rect> |
||||
<x>0</x> |
||||
<y>0</y> |
||||
<width>736</width> |
||||
<height>129</height> |
||||
</rect> |
||||
</property> |
||||
<property name="windowTitle"> |
||||
<string>Dialog</string> |
||||
</property> |
||||
<layout class="QVBoxLayout" name="verticalLayout"> |
||||
<item> |
||||
<layout class="QGridLayout" name="gridLayout"> |
||||
<item row="4" column="0"> |
||||
<widget class="QLabel" name="label"> |
||||
<property name="text"> |
||||
<string>&Amount:</string> |
||||
</property> |
||||
<property name="alignment"> |
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> |
||||
</property> |
||||
<property name="buddy"> |
||||
<cstring>pay_amount</cstring> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item row="3" column="0"> |
||||
<widget class="QLabel" name="label_2"> |
||||
<property name="text"> |
||||
<string>Pay &To:</string> |
||||
</property> |
||||
<property name="alignment"> |
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> |
||||
</property> |
||||
<property name="buddy"> |
||||
<cstring>pay_to</cstring> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item row="3" column="1"> |
||||
<widget class="QLineEdit" name="pay_to"/> |
||||
</item> |
||||
<item row="4" column="1"> |
||||
<widget class="QLineEdit" name="pay_amount"> |
||||
<property name="maximumSize"> |
||||
<size> |
||||
<width>145</width> |
||||
<height>16777215</height> |
||||
</size> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item row="3" column="2"> |
||||
<widget class="QPushButton" name="pushButton"> |
||||
<property name="text"> |
||||
<string>&Paste</string> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item row="3" column="3"> |
||||
<widget class="QPushButton" name="pushButton_2"> |
||||
<property name="text"> |
||||
<string>Address &Book...</string> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item row="2" column="1"> |
||||
<widget class="QLabel" name="label_3"> |
||||
<property name="font"> |
||||
<font> |
||||
<pointsize>9</pointsize> |
||||
</font> |
||||
</property> |
||||
<property name="text"> |
||||
<string>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</string> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
</layout> |
||||
</item> |
||||
<item> |
||||
<spacer name="verticalSpacer"> |
||||
<property name="orientation"> |
||||
<enum>Qt::Vertical</enum> |
||||
</property> |
||||
<property name="sizeHint" stdset="0"> |
||||
<size> |
||||
<width>20</width> |
||||
<height>40</height> |
||||
</size> |
||||
</property> |
||||
</spacer> |
||||
</item> |
||||
<item> |
||||
<widget class="QDialogButtonBox" name="buttonBox"> |
||||
<property name="orientation"> |
||||
<enum>Qt::Horizontal</enum> |
||||
</property> |
||||
<property name="standardButtons"> |
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
</layout> |
||||
</widget> |
||||
<resources/> |
||||
<connections> |
||||
<connection> |
||||
<sender>buttonBox</sender> |
||||
<signal>accepted()</signal> |
||||
<receiver>SendCoinsDialog</receiver> |
||||
<slot>accept()</slot> |
||||
<hints> |
||||
<hint type="sourcelabel"> |
||||
<x>248</x> |
||||
<y>254</y> |
||||
</hint> |
||||
<hint type="destinationlabel"> |
||||
<x>157</x> |
||||
<y>274</y> |
||||
</hint> |
||||
</hints> |
||||
</connection> |
||||
<connection> |
||||
<sender>buttonBox</sender> |
||||
<signal>rejected()</signal> |
||||
<receiver>SendCoinsDialog</receiver> |
||||
<slot>reject()</slot> |
||||
<hints> |
||||
<hint type="sourcelabel"> |
||||
<x>316</x> |
||||
<y>260</y> |
||||
</hint> |
||||
<hint type="destinationlabel"> |
||||
<x>286</x> |
||||
<y>274</y> |
||||
</hint> |
||||
</hints> |
||||
</connection> |
||||
</connections> |
||||
</ui> |
Loading…
Reference in new issue