Skip to content

Commit 955787f

Browse files
committed
Merge pull request #3207
666893b qt: keep a list of requested payments (Wladimir J. van der Laan)
2 parents 20a3c80 + 666893b commit 955787f

11 files changed

+409
-73
lines changed

src/qt/Makefile.am

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ QT_MOC_CPP = moc_aboutdialog.cpp moc_addressbookpage.cpp \
9696
moc_optionsmodel.cpp moc_overviewpage.cpp moc_paymentserver.cpp \
9797
moc_receiverequestdialog.cpp moc_qvalidatedlineedit.cpp moc_qvaluecombobox.cpp \
9898
moc_receivecoinsdialog.cpp \
99+
moc_recentrequeststablemodel.cpp \
99100
moc_rpcconsole.cpp moc_sendcoinsdialog.cpp moc_sendcoinsentry.cpp \
100101
moc_signverifymessagedialog.cpp moc_splashscreen.cpp moc_trafficgraphwidget.cpp moc_transactiondesc.cpp \
101102
moc_transactiondescdialog.cpp moc_transactionfilterproxy.cpp \
@@ -122,6 +123,7 @@ BITCOIN_QT_H = aboutdialog.h addressbookpage.h addresstablemodel.h \
122123
optionsdialog.h \
123124
optionsmodel.h overviewpage.h paymentrequestplus.h paymentserver.h \
124125
receivecoinsdialog.h \
126+
recentrequeststablemodel.h \
125127
receiverequestdialog.h qvalidatedlineedit.h qvaluecombobox.h rpcconsole.h \
126128
sendcoinsdialog.h sendcoinsentry.h signverifymessagedialog.h splashscreen.h \
127129
trafficgraphwidget.h transactiondescdialog.h transactiondesc.h transactionfilterproxy.h \
@@ -157,6 +159,7 @@ BITCOIN_QT_CPP = aboutdialog.cpp addressbookpage.cpp \
157159
optionsdialog.cpp optionsmodel.cpp overviewpage.cpp paymentrequestplus.cpp \
158160
paymentserver.cpp qvalidatedlineedit.cpp qvaluecombobox.cpp \
159161
receivecoinsdialog.cpp receiverequestdialog.cpp \
162+
recentrequeststablemodel.cpp \
160163
rpcconsole.cpp sendcoinsdialog.cpp sendcoinsentry.cpp \
161164
signverifymessagedialog.cpp splashscreen.cpp trafficgraphwidget.cpp transactiondesc.cpp \
162165
transactiondescdialog.cpp transactionfilterproxy.cpp transactionrecord.cpp \

src/qt/addresstablemodel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ QVariant AddressTableModel::headerData(int section, Qt::Orientation orientation,
297297
{
298298
if(orientation == Qt::Horizontal)
299299
{
300-
if(role == Qt::DisplayRole)
300+
if(role == Qt::DisplayRole && section < columns.size())
301301
{
302302
return columns[section];
303303
}

src/qt/forms/receivecoinsdialog.ui

Lines changed: 152 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,60 @@
77
<x>0</x>
88
<y>0</y>
99
<width>776</width>
10-
<height>343</height>
10+
<height>364</height>
1111
</rect>
1212
</property>
1313
<layout class="QVBoxLayout" name="verticalLayout">
1414
<item>
1515
<layout class="QGridLayout" name="gridLayout">
16-
<item row="3" column="0">
17-
<widget class="QLabel" name="label">
16+
<item row="7" column="2">
17+
<widget class="QCheckBox" name="reuseAddress">
18+
<property name="toolTip">
19+
<string>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</string>
20+
</property>
1821
<property name="text">
19-
<string>&amp;Amount:</string>
22+
<string>R&amp;euse an existing receiving address (not recommended)</string>
23+
</property>
24+
</widget>
25+
</item>
26+
<item row="7" column="0">
27+
<widget class="QLabel" name="label_4">
28+
<property name="text">
29+
<string/>
30+
</property>
31+
</widget>
32+
</item>
33+
<item row="6" column="0">
34+
<widget class="QLabel" name="label_3">
35+
<property name="text">
36+
<string>&amp;Message:</string>
2037
</property>
2138
<property name="alignment">
2239
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
2340
</property>
2441
<property name="buddy">
25-
<cstring>reqAmount</cstring>
42+
<cstring>reqMessage</cstring>
2643
</property>
2744
</widget>
2845
</item>
29-
<item row="3" column="1">
30-
<widget class="BitcoinAmountField" name="reqAmount">
31-
<property name="minimumSize">
32-
<size>
33-
<width>80</width>
34-
<height>0</height>
35-
</size>
46+
<item row="4" column="2">
47+
<widget class="QLineEdit" name="reqLabel">
48+
<property name="toolTip">
49+
<string>The label to associate with the new receiving address</string>
3650
</property>
51+
</widget>
52+
</item>
53+
<item row="6" column="2">
54+
<widget class="QLineEdit" name="reqMessage">
3755
<property name="toolTip">
38-
<string>The amount to request</string>
56+
<string>The message to attach to payment request</string>
57+
</property>
58+
</widget>
59+
</item>
60+
<item row="2" column="2">
61+
<widget class="QLabel" name="label_5">
62+
<property name="text">
63+
<string>Use this form to request payments. All fields are optional.</string>
3964
</property>
4065
</widget>
4166
</item>
@@ -52,72 +77,34 @@
5277
</property>
5378
</widget>
5479
</item>
55-
<item row="4" column="1">
56-
<widget class="QLineEdit" name="reqLabel">
57-
<property name="toolTip">
58-
<string>The label to associate with the receiving address</string>
59-
</property>
60-
</widget>
61-
</item>
6280
<item row="5" column="0">
63-
<widget class="QLabel" name="label_3">
81+
<widget class="QLabel" name="label">
6482
<property name="text">
65-
<string>&amp;Message:</string>
83+
<string>&amp;Amount:</string>
6684
</property>
6785
<property name="alignment">
6886
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
6987
</property>
7088
<property name="buddy">
71-
<cstring>reqMessage</cstring>
72-
</property>
73-
</widget>
74-
</item>
75-
<item row="5" column="1">
76-
<widget class="QLineEdit" name="reqMessage">
77-
<property name="toolTip">
78-
<string>The message to attach to payment request</string>
89+
<cstring>reqAmount</cstring>
7990
</property>
8091
</widget>
8192
</item>
82-
<item row="6" column="0">
83-
<widget class="QLabel" name="label_4">
84-
<property name="text">
85-
<string/>
93+
<item row="5" column="2">
94+
<widget class="BitcoinAmountField" name="reqAmount">
95+
<property name="minimumSize">
96+
<size>
97+
<width>80</width>
98+
<height>0</height>
99+
</size>
86100
</property>
87-
</widget>
88-
</item>
89-
<item row="6" column="1">
90-
<widget class="QCheckBox" name="reuseAddress">
91101
<property name="toolTip">
92-
<string>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</string>
93-
</property>
94-
<property name="text">
95-
<string>R&amp;euse an existing receiving address (not recommended)</string>
96-
</property>
97-
</widget>
98-
</item>
99-
<item row="2" column="1">
100-
<widget class="QLabel" name="label_5">
101-
<property name="text">
102-
<string>Use this form to request payments. All fields are optional.</string>
102+
<string>The amount to request</string>
103103
</property>
104104
</widget>
105105
</item>
106106
</layout>
107107
</item>
108-
<item>
109-
<spacer name="verticalSpacer">
110-
<property name="orientation">
111-
<enum>Qt::Vertical</enum>
112-
</property>
113-
<property name="sizeHint" stdset="0">
114-
<size>
115-
<width>20</width>
116-
<height>40</height>
117-
</size>
118-
</property>
119-
</spacer>
120-
</item>
121108
<item>
122109
<layout class="QHBoxLayout" name="horizontalLayout">
123110
<item>
@@ -178,6 +165,98 @@
178165
</item>
179166
</layout>
180167
</item>
168+
<item>
169+
<spacer name="verticalSpacer_2">
170+
<property name="orientation">
171+
<enum>Qt::Vertical</enum>
172+
</property>
173+
<property name="sizeHint" stdset="0">
174+
<size>
175+
<width>20</width>
176+
<height>40</height>
177+
</size>
178+
</property>
179+
</spacer>
180+
</item>
181+
<item>
182+
<widget class="QFrame" name="frame">
183+
<property name="sizePolicy">
184+
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
185+
<horstretch>0</horstretch>
186+
<verstretch>0</verstretch>
187+
</sizepolicy>
188+
</property>
189+
<property name="frameShape">
190+
<enum>QFrame::StyledPanel</enum>
191+
</property>
192+
<property name="frameShadow">
193+
<enum>QFrame::Raised</enum>
194+
</property>
195+
<layout class="QVBoxLayout" name="verticalLayout_2">
196+
<item>
197+
<widget class="QLabel" name="label_6">
198+
<property name="font">
199+
<font>
200+
<weight>75</weight>
201+
<bold>true</bold>
202+
</font>
203+
</property>
204+
<property name="text">
205+
<string>Previously requested payments</string>
206+
</property>
207+
</widget>
208+
</item>
209+
<item>
210+
<widget class="QTableView" name="recentRequestsView"/>
211+
</item>
212+
<item>
213+
<layout class="QHBoxLayout" name="horizontalLayout_2">
214+
<item>
215+
<widget class="QPushButton" name="showRequestButton">
216+
<property name="toolTip">
217+
<string>Show the selected request (does the same as double clicking an entry)</string>
218+
</property>
219+
<property name="text">
220+
<string>Show</string>
221+
</property>
222+
<property name="icon">
223+
<iconset resource="../bitcoin.qrc">
224+
<normaloff>:/icons/edit</normaloff>:/icons/edit</iconset>
225+
</property>
226+
</widget>
227+
</item>
228+
<item>
229+
<widget class="QPushButton" name="removeRequestButton">
230+
<property name="toolTip">
231+
<string>Remove the selected entries from the list</string>
232+
</property>
233+
<property name="text">
234+
<string>Remove</string>
235+
</property>
236+
<property name="icon">
237+
<iconset resource="../bitcoin.qrc">
238+
<normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
239+
</property>
240+
</widget>
241+
</item>
242+
<item>
243+
<spacer name="horizontalSpacer_2">
244+
<property name="orientation">
245+
<enum>Qt::Horizontal</enum>
246+
</property>
247+
<property name="sizeHint" stdset="0">
248+
<size>
249+
<width>40</width>
250+
<height>20</height>
251+
</size>
252+
</property>
253+
</spacer>
254+
</item>
255+
</layout>
256+
</item>
257+
</layout>
258+
</widget>
259+
</item>
181260
</layout>
182261
</widget>
183262
<customwidgets>
@@ -187,6 +266,17 @@
187266
<header>bitcoinamountfield.h</header>
188267
</customwidget>
189268
</customwidgets>
269+
<tabstops>
270+
<tabstop>reqLabel</tabstop>
271+
<tabstop>reqAmount</tabstop>
272+
<tabstop>reqMessage</tabstop>
273+
<tabstop>reuseAddress</tabstop>
274+
<tabstop>clearButton</tabstop>
275+
<tabstop>receiveButton</tabstop>
276+
<tabstop>recentRequestsView</tabstop>
277+
<tabstop>showRequestButton</tabstop>
278+
<tabstop>removeRequestButton</tabstop>
279+
</tabstops>
190280
<resources>
191281
<include location="../bitcoin.qrc"/>
192282
</resources>

src/qt/forms/receiverequestdialog.ui

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,6 @@
8383
</property>
8484
</widget>
8585
</item>
86-
<item>
87-
<widget class="QPushButton" name="btnCopyImage">
88-
<property name="text">
89-
<string>&amp;Copy Image</string>
90-
</property>
91-
</widget>
92-
</item>
9386
<item>
9487
<widget class="QPushButton" name="btnSaveAs">
9588
<property name="text">

0 commit comments

Comments
 (0)