update
authorWladimir J. van der Laan <laanwj@gmail.com>
Thu, 12 May 2011 15:55:24 +0000 (17:55 +0200)
committerWladimir J. van der Laan <laanwj@gmail.com>
Thu, 12 May 2011 15:55:24 +0000 (17:55 +0200)
16 files changed:
TODO
aboutdialog.cpp
aboutdialog.h
aboutdialog.ui [new file with mode: 0644]
addressbookdialog.cpp
addressbookdialog.h
addressbookdialog.ui
bitcoin.pro
bitcoin.qrc
bitcoingui.cpp
res/icons/address-book.png
res/icons/send.png
res/images/about.png [new file with mode: 0644]
sendcoinsdialog.cpp
sendcoinsdialog.h
sendcoinsdialog.ui

diff --git a/TODO b/TODO
index 3d1785c..0cc78f1 100644 (file)
--- 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
+
index 90d74e6..3d7a3f9 100644 (file)
@@ -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();
 }
index 1372121..827cc74 100644 (file)
@@ -3,16 +3,23 @@
 
 #include <QDialog>
 
+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 (file)
index 0000000..2cc178f
--- /dev/null
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>AboutDialog</class>
+ <widget class="QDialog" name="AboutDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>593</width>
+    <height>319</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>About Bitcoin</string>
+  </property>
+  <layout class="QHBoxLayout" name="horizontalLayout_2">
+   <item>
+    <widget class="QLabel" name="label_4">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Ignored">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+     <property name="pixmap">
+      <pixmap resource="bitcoin.qrc">:/images/about</pixmap>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <layout class="QVBoxLayout" name="verticalLayout_2">
+     <item>
+      <spacer name="verticalSpacer_2">
+       <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>
+      <layout class="QHBoxLayout" name="horizontalLayout">
+       <item>
+        <widget class="QLabel" name="label">
+         <property name="text">
+          <string>&lt;b&gt;Bitcoin&lt;/b&gt; version</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLabel" name="label_3">
+         <property name="text">
+          <string>0.3.666-beta</string>
+         </property>
+         <property name="textFormat">
+          <enum>Qt::RichText</enum>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <spacer name="horizontalSpacer">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>40</width>
+           <height>20</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </item>
+     <item>
+      <widget class="QLabel" name="label_2">
+       <property name="text">
+        <string>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.</string>
+       </property>
+       <property name="wordWrap">
+        <bool>true</bool>
+       </property>
+      </widget>
+     </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::Ok</set>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <resources>
+  <include location="bitcoin.qrc"/>
+ </resources>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>AboutDialog</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>AboutDialog</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>
index ca74159..e1ce1fe 100644 (file)
@@ -15,5 +15,25 @@ 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()
+{
 
 }
index a51c02a..e287019 100644 (file)
@@ -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
index e646b08..530322e 100644 (file)
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>400</width>
-    <height>300</height>
+    <width>591</width>
+    <height>347</height>
    </rect>
   </property>
   <property name="windowTitle">
-   <string>Dialog</string>
+   <string>Address Book</string>
   </property>
   <layout class="QVBoxLayout" name="verticalLayout">
    <item>
-    <spacer name="verticalSpacer">
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
+    <widget class="QTabWidget" name="tabWidget">
+     <property name="currentIndex">
+      <number>1</number>
      </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>20</width>
-       <height>40</height>
-      </size>
-     </property>
-    </spacer>
+     <widget class="QWidget" name="tab">
+      <attribute name="title">
+       <string>Sending</string>
+      </attribute>
+      <layout class="QVBoxLayout" name="verticalLayout_2">
+       <item>
+        <widget class="QTableView" name="tableView"/>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="tab_2">
+      <attribute name="title">
+       <string>Receiving</string>
+      </attribute>
+      <layout class="QVBoxLayout" name="verticalLayout_3">
+       <item>
+        <widget class="QLabel" name="label">
+         <property name="text">
+          <string>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.</string>
+         </property>
+         <property name="textFormat">
+          <enum>Qt::AutoText</enum>
+         </property>
+         <property name="wordWrap">
+          <bool>true</bool>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QTableView" name="tableView_2"/>
+       </item>
+      </layout>
+     </widget>
+    </widget>
    </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>
+    <layout class="QHBoxLayout" name="horizontalLayout">
+     <item>
+      <spacer name="horizontalSpacer">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="copyToClipboard">
+       <property name="text">
+        <string>Copy to Clipboard</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="editButton">
+       <property name="text">
+        <string>Edit...</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="newAddressButton">
+       <property name="text">
+        <string>New Address...</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="OKButton">
+       <property name="text">
+        <string>OK</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
    </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>
+ <connections/>
 </ui>
index 4e9bfda..7bcf3af 100644 (file)
@@ -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
index ebce276..0d91bbc 100644 (file)
@@ -5,4 +5,7 @@
         <file alias="quit">res/icons/quit.png</file>
         <file alias="send">res/icons/send.png</file>
     </qresource>
+    <qresource prefix="/images">
+        <file alias="about">res/images/about.png</file>
+    </qresource>
 </RCC>
index 4083afb..c78bb3c 100644 (file)
@@ -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);
index 621ca40..abfb3c3 100644 (file)
Binary files a/res/icons/address-book.png and b/res/icons/address-book.png differ
index 51067a1..0ba5359 100644 (file)
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 (file)
index 0000000..c9ab951
Binary files /dev/null and b/res/images/about.png differ
index 283039f..1eaa358 100644 (file)
@@ -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();
+}
index 82fae9c..e3ffd1d 100644 (file)
@@ -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
index 56ec6d3..b1adbc5 100644 (file)
@@ -7,11 +7,11 @@
     <x>0</x>
     <y>0</y>
     <width>736</width>
-    <height>129</height>
+    <height>140</height>
    </rect>
   </property>
   <property name="windowTitle">
-   <string>Dialog</string>
+   <string>Send Coins</string>
   </property>
   <layout class="QVBoxLayout" name="verticalLayout">
    <item>
       </widget>
      </item>
      <item row="3" column="2">
-      <widget class="QPushButton" name="pushButton">
+      <widget class="QPushButton" name="pasteButton">
        <property name="text">
         <string>&amp;Paste</string>
        </property>
       </widget>
      </item>
      <item row="3" column="3">
-      <widget class="QPushButton" name="pushButton_2">
+      <widget class="QPushButton" name="addressBookButton">
        <property name="text">
         <string>Address &amp;Book...</string>
        </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>
+    <layout class="QHBoxLayout" name="horizontalLayout">
+     <item>
+      <spacer name="horizontalSpacer">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="sendButton">
+       <property name="text">
+        <string>&amp;Send</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="cancelButton">
+       <property name="text">
+        <string>Cancel</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
    </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>
+ <connections/>
 </ui>