qt: rework "receive coins" workflow

This commit is contained in:
Wladimir J. van der Laan
2013-10-16 15:14:26 +02:00
parent 58daa0162c
commit 74fb765e29
19 changed files with 536 additions and 238 deletions

View File

@@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Address Book</string>
<string></string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
@@ -82,17 +82,6 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="showQRCode">
<property name="text">
<string>Show &amp;QR Code</string>
</property>
<property name="icon">
<iconset resource="../bitcoin.qrc">
<normaloff>:/icons/qrcode</normaloff>:/icons/qrcode</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="signMessage">
<property name="toolTip">

View File

@@ -0,0 +1,164 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ReceiveCoinsDialog</class>
<widget class="QWidget" name="ReceiveCoinsDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>776</width>
<height>343</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="3" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>&amp;Amount:</string>
</property>
<property name="buddy">
<cstring>reqAmount</cstring>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="BitcoinAmountField" name="reqAmount" native="true">
<property name="minimumSize">
<size>
<width>80</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>&amp;Label:</string>
</property>
<property name="buddy">
<cstring>reqLabel</cstring>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLineEdit" name="reqLabel"/>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>&amp;Message:</string>
</property>
<property name="buddy">
<cstring>reqMessage</cstring>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLineEdit" name="reqMessage"/>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QCheckBox" name="reuseAddress">
<property name="text">
<string>R&amp;euse an existing receiving address</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Use this form to request payments. All fields are optional.</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="clearButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Remove all transaction fields</string>
</property>
<property name="text">
<string>Clear</string>
</property>
<property name="icon">
<iconset resource="../bitcoin.qrc">
<normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
</property>
<property name="autoRepeatDelay">
<number>300</number>
</property>
<property name="autoDefault">
<bool>false</bool>
</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>
<item>
<widget class="QPushButton" name="receiveButton">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>&amp;Request payment</string>
</property>
<property name="icon">
<iconset resource="../bitcoin.qrc">
<normaloff>:/icons/receiving_addresses</normaloff>:/icons/receiving_addresses</iconset>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>BitcoinAmountField</class>
<extends>QLineEdit</extends>
<header>bitcoinamountfield.h</header>
</customwidget>
</customwidgets>
<resources>
<include location="../bitcoin.qrc"/>
</resources>
<connections/>
</ui>

View File

@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>QRCodeDialog</class>
<widget class="QDialog" name="QRCodeDialog">
<class>ReceiveRequestDialog</class>
<widget class="QDialog" name="ReceiveRequestDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>340</width>
<height>530</height>
<width>487</width>
<height>597</height>
</rect>
</property>
<property name="windowTitle">
<string>QR Code Dialog</string>
<string>Request coins</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
@@ -39,6 +39,37 @@
</property>
</widget>
</item>
<item>
<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="btnSaveAs">
<property name="text">
<string>&amp;Save Image...</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Bitcoin URI:</string>
</property>
</widget>
</item>
<item>
<widget class="QPlainTextEdit" name="outUri">
<property name="sizePolicy">
@@ -61,25 +92,22 @@
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Payment information:</string>
</property>
</widget>
</item>
<item>
<widget class="QWidget" name="widget" native="true">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QCheckBox" name="chkReqPayment">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string>Request Payment</string>
</property>
</widget>
</item>
<item>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="1" column="0">
<item row="2" column="0">
<widget class="QLabel" name="lblLabel">
<property name="text">
<string>Label:</string>
@@ -95,10 +123,17 @@
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="lnLabel"/>
<item row="2" column="1">
<widget class="QLineEdit" name="lnLabel">
<property name="enabled">
<bool>true</bool>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<item row="3" column="0">
<widget class="QLabel" name="lblMessage">
<property name="text">
<string>Message:</string>
@@ -114,10 +149,17 @@
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="lnMessage"/>
<item row="3" column="1">
<widget class="QLineEdit" name="lnMessage">
<property name="enabled">
<bool>true</bool>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="0">
<item row="1" column="0">
<widget class="QLabel" name="lblAmount">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
@@ -139,10 +181,10 @@
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="BitcoinAmountField" name="lnReqAmount">
<item row="1" column="1">
<widget class="BitcoinAmountField" name="lnReqAmount" native="true">
<property name="enabled">
<bool>false</bool>
<bool>true</bool>
</property>
<property name="minimumSize">
<size>
@@ -150,29 +192,31 @@
<height>0</height>
</size>
</property>
<property name="readOnly" stdset="0">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<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="btnSaveAs">
<item row="0" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>&amp;Save As...</string>
<string>Address:</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>reqAddress</cstring>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="lnAddress">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
@@ -186,27 +230,10 @@
<customwidgets>
<customwidget>
<class>BitcoinAmountField</class>
<extends>QLineEdit</extends>
<extends>QWidget</extends>
<header>bitcoinamountfield.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections>
<connection>
<sender>chkReqPayment</sender>
<signal>clicked(bool)</signal>
<receiver>lnReqAmount</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>92</x>
<y>285</y>
</hint>
<hint type="destinationlabel">
<x>98</x>
<y>311</y>
</hint>
</hints>
</connection>
</connections>
<connections/>
</ui>