diff --git a/TODO b/TODO index 3d1785cd..0cc78f11 100644 --- a/TODO +++ b/TODO @@ -54,3 +54,9 @@ AboutDialog - Toolbar icon - 'notify' on incoming transaction + +- AddressTableModel + - Name / Label + - Address + - Delete / Copy to clipboard based on tab + diff --git a/aboutdialog.cpp b/aboutdialog.cpp index 90d74e69..3d7a3f98 100644 --- a/aboutdialog.cpp +++ b/aboutdialog.cpp @@ -1,6 +1,19 @@ #include "aboutdialog.h" +#include "ui_aboutdialog.h" AboutDialog::AboutDialog(QWidget *parent) : - QDialog(parent) + QDialog(parent), + ui(new Ui::AboutDialog) { + ui->setupUi(this); +} + +AboutDialog::~AboutDialog() +{ + delete ui; +} + +void AboutDialog::on_buttonBox_accepted() +{ + close(); } diff --git a/aboutdialog.h b/aboutdialog.h index 13721210..827cc741 100644 --- a/aboutdialog.h +++ b/aboutdialog.h @@ -3,16 +3,23 @@ #include +namespace Ui { + class AboutDialog; +} + class AboutDialog : public QDialog { Q_OBJECT + public: explicit AboutDialog(QWidget *parent = 0); + ~AboutDialog(); -signals: - -public slots: +private: + Ui::AboutDialog *ui; +private slots: + void on_buttonBox_accepted(); }; #endif // ABOUTDIALOG_H diff --git a/aboutdialog.ui b/aboutdialog.ui new file mode 100644 index 00000000..2cc178fb --- /dev/null +++ b/aboutdialog.ui @@ -0,0 +1,162 @@ + + + AboutDialog + + + + 0 + 0 + 593 + 319 + + + + About Bitcoin + + + + + + + 0 + 0 + + + + + + + :/images/about + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + <b>Bitcoin</b> version + + + + + + + 0.3.666-beta + + + Qt::RichText + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Copyright (c) 2009-2011 Bitcoin Developers + +This is experimental software. + +Distributed under the MIT/X11 software license, see the accompanying file license.txt or http://www.opensource.org/licenses/mit-license.php. + +This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard. + + + true + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Ok + + + + + + + + + + + + + buttonBox + accepted() + AboutDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + AboutDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff --git a/addressbookdialog.cpp b/addressbookdialog.cpp index ca74159d..e1ce1fee 100644 --- a/addressbookdialog.cpp +++ b/addressbookdialog.cpp @@ -14,6 +14,26 @@ AddressBookDialog::~AddressBookDialog() } void AddressBookDialog::setTab(int tab) +{ + ui->tabWidget->setCurrentIndex(tab); +} + +void AddressBookDialog::on_OKButton_clicked() +{ + accept(); +} + +void AddressBookDialog::on_copyToClipboard_clicked() +{ + +} + +void AddressBookDialog::on_editButton_clicked() +{ + +} + +void AddressBookDialog::on_newAddressButton_clicked() { } diff --git a/addressbookdialog.h b/addressbookdialog.h index a51c02a7..e287019d 100644 --- a/addressbookdialog.h +++ b/addressbookdialog.h @@ -23,6 +23,12 @@ public: void setTab(int tab); private: Ui::AddressBookDialog *ui; + +private slots: + void on_newAddressButton_clicked(); + void on_editButton_clicked(); + void on_copyToClipboard_clicked(); + void on_OKButton_clicked(); }; #endif // ADDRESSBOOKDIALOG_H diff --git a/addressbookdialog.ui b/addressbookdialog.ui index e646b08e..530322ee 100644 --- a/addressbookdialog.ui +++ b/addressbookdialog.ui @@ -6,72 +6,101 @@ 0 0 - 400 - 300 + 591 + 347 - Dialog + Address Book - - - Qt::Vertical + + + 1 - - - 20 - 40 - - - + + + Sending + + + + + + + + + + Receiving + + + + + + These are your Bitcoin addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you. The highlighted address is displayed in the main window. + + + Qt::AutoText + + + true + + + + + + + + + - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Copy to Clipboard + + + + + + + Edit... + + + + + + + New Address... + + + + + + + OK + + + + - - - buttonBox - accepted() - AddressBookDialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - AddressBookDialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - + diff --git a/bitcoin.pro b/bitcoin.pro index 4e9bfda3..7bcf3afd 100644 --- a/bitcoin.pro +++ b/bitcoin.pro @@ -10,24 +10,25 @@ INCLUDEPATH += . # Input HEADERS += bitcoingui.h \ transactiontablemodel.h \ - aboutdialog.h \ addresstablemodel.h \ optionsdialog.h \ mainoptionspage.h \ sendcoinsdialog.h \ - addressbookdialog.h + addressbookdialog.h \ + aboutdialog.h SOURCES += bitcoin.cpp bitcoingui.cpp \ transactiontablemodel.cpp \ - aboutdialog.cpp \ addresstablemodel.cpp \ optionsdialog.cpp \ mainoptionspage.cpp \ sendcoinsdialog.cpp \ - addressbookdialog.cpp + addressbookdialog.cpp \ + aboutdialog.cpp RESOURCES += \ bitcoin.qrc FORMS += \ sendcoinsdialog.ui \ - addressbookdialog.ui + addressbookdialog.ui \ + aboutdialog.ui diff --git a/bitcoin.qrc b/bitcoin.qrc index ebce276c..0d91bbcd 100644 --- a/bitcoin.qrc +++ b/bitcoin.qrc @@ -5,4 +5,7 @@ res/icons/quit.png res/icons/send.png + + res/images/about.png + diff --git a/bitcoingui.cpp b/bitcoingui.cpp index 4083afbf..c78bb3c5 100644 --- a/bitcoingui.cpp +++ b/bitcoingui.cpp @@ -41,7 +41,7 @@ BitcoinGUI::BitcoinGUI(QWidget *parent): QAction *quit = new QAction(QIcon(":/icons/quit"), tr("&Quit"), this); QAction *sendcoins = new QAction(QIcon(":/icons/send"), tr("&Send coins"), this); - QAction *addressbook = new QAction(QIcon(":/icons/address-book"), tr("&Address book"), this); + QAction *addressbook = new QAction(QIcon(":/icons/address-book"), tr("&Address Book"), this); QAction *about = new QAction(QIcon(":/icons/bitcoin"), tr("&About"), this); QAction *receiving_addresses = new QAction(QIcon(":/icons/receiving-addresses"), tr("Your &Receiving Addresses..."), this); QAction *options = new QAction(QIcon(":/icons/options"), tr("&Options..."), this); diff --git a/res/icons/address-book.png b/res/icons/address-book.png index 621ca402..abfb3c3a 100644 Binary files a/res/icons/address-book.png and b/res/icons/address-book.png differ diff --git a/res/icons/send.png b/res/icons/send.png index 51067a19..0ba5359d 100644 Binary files a/res/icons/send.png and b/res/icons/send.png differ diff --git a/res/images/about.png b/res/images/about.png new file mode 100644 index 00000000..c9ab9511 Binary files /dev/null and b/res/images/about.png differ diff --git a/sendcoinsdialog.cpp b/sendcoinsdialog.cpp index 283039f2..1eaa3588 100644 --- a/sendcoinsdialog.cpp +++ b/sendcoinsdialog.cpp @@ -1,6 +1,8 @@ #include "sendcoinsdialog.h" #include "ui_sendcoinsdialog.h" +#include "addressbookdialog.h" + SendCoinsDialog::SendCoinsDialog(QWidget *parent) : QDialog(parent), ui(new Ui::SendCoinsDialog) @@ -12,3 +14,24 @@ SendCoinsDialog::~SendCoinsDialog() { delete ui; } + +void SendCoinsDialog::on_sendButton_clicked() +{ + accept(); +} + +void SendCoinsDialog::on_cancelButton_clicked() +{ + reject(); +} + +void SendCoinsDialog::on_pasteButton_clicked() +{ + +} + +void SendCoinsDialog::on_addressBookButton_clicked() +{ + AddressBookDialog dlg; + dlg.exec(); +} diff --git a/sendcoinsdialog.h b/sendcoinsdialog.h index 82fae9cf..e3ffd1d3 100644 --- a/sendcoinsdialog.h +++ b/sendcoinsdialog.h @@ -17,6 +17,12 @@ public: private: Ui::SendCoinsDialog *ui; + +private slots: + void on_addressBookButton_clicked(); + void on_pasteButton_clicked(); + void on_cancelButton_clicked(); + void on_sendButton_clicked(); }; #endif // SENDCOINSDIALOG_H diff --git a/sendcoinsdialog.ui b/sendcoinsdialog.ui index 56ec6d3d..b1adbc51 100644 --- a/sendcoinsdialog.ui +++ b/sendcoinsdialog.ui @@ -7,11 +7,11 @@ 0 0 736 - 129 + 140 - Dialog + Send Coins @@ -56,14 +56,14 @@ - + &Paste - + Address &Book... @@ -97,50 +97,38 @@ - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + &Send + + + + + + + Cancel + + + + - - - buttonBox - accepted() - SendCoinsDialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - SendCoinsDialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - +