mastercoin-wallet 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bin/mastercoin-wallet +1 -1
- data/lib/mastercoin-wallet/builder.rb +0 -10
- data/lib/mastercoin-wallet/gui/main_window.rb +8 -7
- data/lib/mastercoin-wallet/gui/main_window.ui +338 -331
- data/lib/mastercoin-wallet/gui/simple_send_window.rb +11 -3
- data/lib/mastercoin-wallet/gui/ui_main.rb +177 -48
- data/lib/mastercoin-wallet/util.rb +2 -1
- data/mastercoin-wallet.gemspec +2 -2
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.7
|
data/bin/mastercoin-wallet
CHANGED
@@ -8,7 +8,7 @@ app.setWindowIcon(Qt::Icon.new(":/logo.svg"))
|
|
8
8
|
|
9
9
|
if MastercoinWallet.config.has_key?(:private_key)
|
10
10
|
dialog = MastercoinWallet::MainWindow.new
|
11
|
-
dialog.setMinimumSize(
|
11
|
+
dialog.setMinimumSize(786,469)
|
12
12
|
dialog.exec
|
13
13
|
else
|
14
14
|
dialog = MastercoinWallet::FirstRunWindow.new
|
@@ -110,12 +110,8 @@ module MastercoinWallet
|
|
110
110
|
used_outputs = MastercoinWallet.config.created_transactions.collect{|x| x["in"][0]["prev_out"] }
|
111
111
|
usuable_outputs = MastercoinWallet.config.spendable_outputs.find{|x| BigDecimal.new(x[:value]) > BigDecimal.new(required_amount.to_s) }
|
112
112
|
|
113
|
-
#puts "Found these total: #{usuable_outputs}"
|
114
|
-
#puts "These are used #{used_outputs}"
|
115
|
-
|
116
113
|
usuable_outputs = [usuable_outputs] if usuable_outputs.is_a?(Hash)
|
117
114
|
usuable_outputs.reject!{|x| puts x; used_outputs.include?(x["prev_out"])}
|
118
|
-
#puts "Left with these: #{usuable_outputs}"
|
119
115
|
|
120
116
|
if usuable_outputs.empty?
|
121
117
|
# Outputs are saved in order so the last output should always the one that's unused, make sure it's an output for thist address and that it's big enough
|
@@ -267,12 +263,6 @@ module MastercoinWallet
|
|
267
263
|
sent_transactions ||= []
|
268
264
|
sent_transactions << tx.to_hash(with_address: true)
|
269
265
|
|
270
|
-
#transactions = MastercoinWallet.config.get_key("bitcoin_transactions")
|
271
|
-
#transactions ||= []
|
272
|
-
#transactions << tx
|
273
|
-
#transactions = MastercoinWallet.config.set_key!("bitcoin_transactions", transactions)
|
274
|
-
|
275
|
-
|
276
266
|
MastercoinWallet.config.set_key!(:created_transactions, sent_transactions)
|
277
267
|
|
278
268
|
Qt::MessageBox.information(self, tr("Transaction send"),
|
@@ -28,15 +28,15 @@ module MastercoinWallet
|
|
28
28
|
@ui = Ui_MainWindow.new
|
29
29
|
@ui.setupUi(self)
|
30
30
|
|
31
|
-
setWindowTitle(tr("Mastercoin wallet - v0.0.
|
31
|
+
setWindowTitle(tr("Mastercoin wallet - v0.0.7"))
|
32
32
|
|
33
33
|
@rows = []
|
34
34
|
|
35
|
-
#createBalanceOverview()
|
36
|
-
|
37
35
|
@recentTransactions = findChild(Qt::TreeWidget, "overviewTree")
|
38
36
|
@recentTransactions.setColumnWidth(0,300)
|
37
|
+
@recentTransactions.hideColumn(5)
|
39
38
|
@recentTransactions.setColumnWidth(1,50)
|
39
|
+
@recentTransactions.sortByColumn(5)
|
40
40
|
|
41
41
|
@order_book = findChild(Qt::TreeWidget, "orderTree")
|
42
42
|
@order_book.setColumnWidth(0,280)
|
@@ -123,7 +123,8 @@ module MastercoinWallet
|
|
123
123
|
row.setText(1, item["amount"])
|
124
124
|
row.setText(2, type)
|
125
125
|
row.setText(3, coin_name(item["currency_id"]))
|
126
|
-
row.setText(4, get_date(item["tx_date"]))
|
126
|
+
row.setText(4, ("%s" % get_date(item["tx_date"])))
|
127
|
+
row.setText(5, item["block_height"].to_s)
|
127
128
|
return row
|
128
129
|
end
|
129
130
|
|
@@ -134,18 +135,18 @@ module MastercoinWallet
|
|
134
135
|
row.setText(2, item["amount_available"])
|
135
136
|
row.setText(3, "#{item["price_per_coin"]} BTC")
|
136
137
|
row.setText(4, item["required_fee"])
|
137
|
-
row.setText(5, item["tx_date"])
|
138
|
+
row.setText(5, get_date(item["tx_date"]))
|
138
139
|
return row
|
139
140
|
end
|
140
141
|
|
141
142
|
def add_purchase_row(item)
|
142
143
|
row = Qt::TreeWidgetItem.new
|
143
144
|
row.setText(0, item["selling_offer"]["address"])
|
144
|
-
row.setText(1, item["
|
145
|
+
row.setText(1, item["accepted_amount"])
|
145
146
|
row.setText(2, item["bitcoins_required"])
|
146
147
|
row.setText(3, coin_name(item["currency_id"]))
|
147
148
|
row.setText(4, item["status_text"])
|
148
|
-
row.setText(5, item["tx_date"])
|
149
|
+
row.setText(5, get_date(item["tx_date"]))
|
149
150
|
return row
|
150
151
|
end
|
151
152
|
|
@@ -11,7 +11,7 @@
|
|
11
11
|
</rect>
|
12
12
|
</property>
|
13
13
|
<property name="sizePolicy">
|
14
|
-
<sizepolicy hsizetype="
|
14
|
+
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
15
15
|
<horstretch>0</horstretch>
|
16
16
|
<verstretch>0</verstretch>
|
17
17
|
</sizepolicy>
|
@@ -19,343 +19,350 @@
|
|
19
19
|
<property name="windowTitle">
|
20
20
|
<string>New Purchase Offer</string>
|
21
21
|
</property>
|
22
|
-
<
|
23
|
-
<
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
<
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
<horstretch>0</horstretch>
|
34
|
-
<verstretch>0</verstretch>
|
35
|
-
</sizepolicy>
|
36
|
-
</property>
|
37
|
-
<property name="currentIndex">
|
38
|
-
<number>0</number>
|
39
|
-
</property>
|
40
|
-
<widget class="QWidget" name="tab">
|
41
|
-
<attribute name="title">
|
42
|
-
<string>Dashboard</string>
|
43
|
-
</attribute>
|
44
|
-
<widget class="QGroupBox" name="balanceGroup">
|
45
|
-
<property name="geometry">
|
46
|
-
<rect>
|
47
|
-
<x>10</x>
|
48
|
-
<y>0</y>
|
49
|
-
<width>201</width>
|
50
|
-
<height>111</height>
|
51
|
-
</rect>
|
22
|
+
<property name="sizeGripEnabled">
|
23
|
+
<bool>true</bool>
|
24
|
+
</property>
|
25
|
+
<layout class="QVBoxLayout" name="verticalLayout">
|
26
|
+
<item>
|
27
|
+
<widget class="QTabWidget" name="mainTab">
|
28
|
+
<property name="sizePolicy">
|
29
|
+
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
30
|
+
<horstretch>0</horstretch>
|
31
|
+
<verstretch>0</verstretch>
|
32
|
+
</sizepolicy>
|
52
33
|
</property>
|
53
|
-
<property name="
|
54
|
-
<
|
34
|
+
<property name="currentIndex">
|
35
|
+
<number>0</number>
|
55
36
|
</property>
|
56
|
-
<widget class="
|
57
|
-
<property name="
|
58
|
-
<
|
59
|
-
<x>10</x>
|
60
|
-
<y>30</y>
|
61
|
-
<width>181</width>
|
62
|
-
<height>19</height>
|
63
|
-
</rect>
|
64
|
-
</property>
|
65
|
-
<property name="text">
|
66
|
-
<string>Updating MSC balance</string>
|
67
|
-
</property>
|
68
|
-
</widget>
|
69
|
-
<widget class="QLabel" name="tMscBalanceLabel">
|
70
|
-
<property name="geometry">
|
71
|
-
<rect>
|
72
|
-
<x>10</x>
|
73
|
-
<y>50</y>
|
74
|
-
<width>171</width>
|
75
|
-
<height>20</height>
|
76
|
-
</rect>
|
37
|
+
<widget class="QWidget" name="tab">
|
38
|
+
<property name="enabled">
|
39
|
+
<bool>true</bool>
|
77
40
|
</property>
|
78
|
-
<property name="
|
79
|
-
<
|
41
|
+
<property name="sizePolicy">
|
42
|
+
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
43
|
+
<horstretch>0</horstretch>
|
44
|
+
<verstretch>0</verstretch>
|
45
|
+
</sizepolicy>
|
80
46
|
</property>
|
47
|
+
<attribute name="title">
|
48
|
+
<string>Dashboard</string>
|
49
|
+
</attribute>
|
50
|
+
<layout class="QVBoxLayout" name="verticalLayout_2">
|
51
|
+
<item>
|
52
|
+
<layout class="QHBoxLayout" name="horizontalLayout">
|
53
|
+
<item alignment="Qt::AlignTop">
|
54
|
+
<widget class="QGroupBox" name="balanceGroup">
|
55
|
+
<property name="title">
|
56
|
+
<string>Balances</string>
|
57
|
+
</property>
|
58
|
+
<layout class="QVBoxLayout" name="verticalLayout_4">
|
59
|
+
<item>
|
60
|
+
<widget class="QLabel" name="mscBalanceLabel">
|
61
|
+
<property name="text">
|
62
|
+
<string>Updating MSC balance</string>
|
63
|
+
</property>
|
64
|
+
</widget>
|
65
|
+
</item>
|
66
|
+
<item>
|
67
|
+
<widget class="QLabel" name="tMscBalanceLabel">
|
68
|
+
<property name="text">
|
69
|
+
<string>Updating test MSC balance</string>
|
70
|
+
</property>
|
71
|
+
</widget>
|
72
|
+
</item>
|
73
|
+
<item>
|
74
|
+
<widget class="QLabel" name="bitcoinLabel">
|
75
|
+
<property name="text">
|
76
|
+
<string>Updating Bitcoin balance</string>
|
77
|
+
</property>
|
78
|
+
</widget>
|
79
|
+
</item>
|
80
|
+
</layout>
|
81
|
+
</widget>
|
82
|
+
</item>
|
83
|
+
<item>
|
84
|
+
<layout class="QVBoxLayout" name="verticalLayout_3">
|
85
|
+
<property name="topMargin">
|
86
|
+
<number>2</number>
|
87
|
+
</property>
|
88
|
+
<item>
|
89
|
+
<widget class="QLabel" name="label_3">
|
90
|
+
<property name="sizePolicy">
|
91
|
+
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
92
|
+
<horstretch>0</horstretch>
|
93
|
+
<verstretch>0</verstretch>
|
94
|
+
</sizepolicy>
|
95
|
+
</property>
|
96
|
+
<property name="font">
|
97
|
+
<font>
|
98
|
+
<weight>50</weight>
|
99
|
+
<bold>false</bold>
|
100
|
+
</font>
|
101
|
+
</property>
|
102
|
+
<property name="text">
|
103
|
+
<string>Mastercoin wallet for</string>
|
104
|
+
</property>
|
105
|
+
</widget>
|
106
|
+
</item>
|
107
|
+
<item alignment="Qt::AlignTop">
|
108
|
+
<widget class="QLabel" name="mscAddressLabel">
|
109
|
+
<property name="sizePolicy">
|
110
|
+
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
111
|
+
<horstretch>0</horstretch>
|
112
|
+
<verstretch>0</verstretch>
|
113
|
+
</sizepolicy>
|
114
|
+
</property>
|
115
|
+
<property name="font">
|
116
|
+
<font>
|
117
|
+
<family>Verdana</family>
|
118
|
+
<pointsize>21</pointsize>
|
119
|
+
</font>
|
120
|
+
</property>
|
121
|
+
<property name="text">
|
122
|
+
<string>MSC Address</string>
|
123
|
+
</property>
|
124
|
+
<property name="textInteractionFlags">
|
125
|
+
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
126
|
+
</property>
|
127
|
+
</widget>
|
128
|
+
</item>
|
129
|
+
</layout>
|
130
|
+
</item>
|
131
|
+
</layout>
|
132
|
+
</item>
|
133
|
+
<item>
|
134
|
+
<widget class="QTreeWidget" name="overviewTree">
|
135
|
+
<property name="sortingEnabled">
|
136
|
+
<bool>true</bool>
|
137
|
+
</property>
|
138
|
+
<property name="columnCount">
|
139
|
+
<number>6</number>
|
140
|
+
</property>
|
141
|
+
<column>
|
142
|
+
<property name="text">
|
143
|
+
<string>Address</string>
|
144
|
+
</property>
|
145
|
+
</column>
|
146
|
+
<column>
|
147
|
+
<property name="text">
|
148
|
+
<string>Amount</string>
|
149
|
+
</property>
|
150
|
+
</column>
|
151
|
+
<column>
|
152
|
+
<property name="text">
|
153
|
+
<string>Type</string>
|
154
|
+
</property>
|
155
|
+
</column>
|
156
|
+
<column>
|
157
|
+
<property name="text">
|
158
|
+
<string>Currency</string>
|
159
|
+
</property>
|
160
|
+
</column>
|
161
|
+
<column>
|
162
|
+
<property name="text">
|
163
|
+
<string>Date</string>
|
164
|
+
</property>
|
165
|
+
</column>
|
166
|
+
<column>
|
167
|
+
<property name="text">
|
168
|
+
<string>Height</string>
|
169
|
+
</property>
|
170
|
+
</column>
|
171
|
+
</widget>
|
172
|
+
</item>
|
173
|
+
<item>
|
174
|
+
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
175
|
+
<item>
|
176
|
+
<spacer name="horizontalSpacer">
|
177
|
+
<property name="orientation">
|
178
|
+
<enum>Qt::Horizontal</enum>
|
179
|
+
</property>
|
180
|
+
<property name="sizeHint" stdset="0">
|
181
|
+
<size>
|
182
|
+
<width>0</width>
|
183
|
+
<height>0</height>
|
184
|
+
</size>
|
185
|
+
</property>
|
186
|
+
</spacer>
|
187
|
+
</item>
|
188
|
+
<item>
|
189
|
+
<widget class="QPushButton" name="simpleSendButton">
|
190
|
+
<property name="text">
|
191
|
+
<string>new Simple Send</string>
|
192
|
+
</property>
|
193
|
+
</widget>
|
194
|
+
</item>
|
195
|
+
</layout>
|
196
|
+
</item>
|
197
|
+
</layout>
|
81
198
|
</widget>
|
82
|
-
<widget class="
|
83
|
-
<
|
84
|
-
<
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
<
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
199
|
+
<widget class="QWidget" name="tab_2">
|
200
|
+
<attribute name="title">
|
201
|
+
<string>Distributed exchange</string>
|
202
|
+
</attribute>
|
203
|
+
<layout class="QVBoxLayout" name="verticalLayout_5">
|
204
|
+
<item>
|
205
|
+
<widget class="QSplitter" name="splitter">
|
206
|
+
<property name="orientation">
|
207
|
+
<enum>Qt::Vertical</enum>
|
208
|
+
</property>
|
209
|
+
<widget class="QWidget" name="layoutWidget">
|
210
|
+
<layout class="QVBoxLayout" name="verticalLayout_6">
|
211
|
+
<item>
|
212
|
+
<widget class="QLabel" name="label">
|
213
|
+
<property name="text">
|
214
|
+
<string><h2>Order book</h2></string>
|
215
|
+
</property>
|
216
|
+
</widget>
|
217
|
+
</item>
|
218
|
+
<item>
|
219
|
+
<widget class="QTreeWidget" name="orderTree">
|
220
|
+
<property name="toolTip">
|
221
|
+
<string>Double click to create a purchase offer from this Selling Offer</string>
|
222
|
+
</property>
|
223
|
+
<property name="sortingEnabled">
|
224
|
+
<bool>true</bool>
|
225
|
+
</property>
|
226
|
+
<column>
|
227
|
+
<property name="text">
|
228
|
+
<string>Seller</string>
|
229
|
+
</property>
|
230
|
+
</column>
|
231
|
+
<column>
|
232
|
+
<property name="text">
|
233
|
+
<string>Currency</string>
|
234
|
+
</property>
|
235
|
+
</column>
|
236
|
+
<column>
|
237
|
+
<property name="text">
|
238
|
+
<string>Units available</string>
|
239
|
+
</property>
|
240
|
+
</column>
|
241
|
+
<column>
|
242
|
+
<property name="text">
|
243
|
+
<string>Price per coin</string>
|
244
|
+
</property>
|
245
|
+
</column>
|
246
|
+
<column>
|
247
|
+
<property name="text">
|
248
|
+
<string>Required fee</string>
|
249
|
+
</property>
|
250
|
+
</column>
|
251
|
+
<column>
|
252
|
+
<property name="text">
|
253
|
+
<string>Date</string>
|
254
|
+
</property>
|
255
|
+
</column>
|
256
|
+
</widget>
|
257
|
+
</item>
|
258
|
+
<item>
|
259
|
+
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
260
|
+
<item>
|
261
|
+
<widget class="QLabel" name="label_4">
|
262
|
+
<property name="sizePolicy">
|
263
|
+
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
264
|
+
<horstretch>0</horstretch>
|
265
|
+
<verstretch>0</verstretch>
|
266
|
+
</sizepolicy>
|
267
|
+
</property>
|
268
|
+
<property name="text">
|
269
|
+
<string>Hint: You can double click to create a Purchase Offer for an item in the order book</string>
|
270
|
+
</property>
|
271
|
+
</widget>
|
272
|
+
</item>
|
273
|
+
<item>
|
274
|
+
<widget class="QPushButton" name="sellingButton">
|
275
|
+
<property name="text">
|
276
|
+
<string>New Selling Offer</string>
|
277
|
+
</property>
|
278
|
+
</widget>
|
279
|
+
</item>
|
280
|
+
</layout>
|
281
|
+
</item>
|
282
|
+
</layout>
|
283
|
+
</widget>
|
284
|
+
<widget class="QWidget" name="layoutWidget_2">
|
285
|
+
<layout class="QVBoxLayout" name="verticalLayout_7">
|
286
|
+
<item>
|
287
|
+
<widget class="QLabel" name="label_2">
|
288
|
+
<property name="text">
|
289
|
+
<string><h2>My purchase offers</h2></string>
|
290
|
+
</property>
|
291
|
+
</widget>
|
292
|
+
</item>
|
293
|
+
<item>
|
294
|
+
<widget class="QTreeWidget" name="purchaseTree">
|
295
|
+
<property name="sortingEnabled">
|
296
|
+
<bool>true</bool>
|
297
|
+
</property>
|
298
|
+
<column>
|
299
|
+
<property name="text">
|
300
|
+
<string>Offer address</string>
|
301
|
+
</property>
|
302
|
+
</column>
|
303
|
+
<column>
|
304
|
+
<property name="text">
|
305
|
+
<string>Amount</string>
|
306
|
+
</property>
|
307
|
+
</column>
|
308
|
+
<column>
|
309
|
+
<property name="text">
|
310
|
+
<string>Bitcoin amount</string>
|
311
|
+
</property>
|
312
|
+
</column>
|
313
|
+
<column>
|
314
|
+
<property name="text">
|
315
|
+
<string>Currency</string>
|
316
|
+
</property>
|
317
|
+
</column>
|
318
|
+
<column>
|
319
|
+
<property name="text">
|
320
|
+
<string>Offer status</string>
|
321
|
+
</property>
|
322
|
+
</column>
|
323
|
+
<column>
|
324
|
+
<property name="text">
|
325
|
+
<string>Date</string>
|
326
|
+
</property>
|
327
|
+
</column>
|
328
|
+
</widget>
|
329
|
+
</item>
|
330
|
+
<item>
|
331
|
+
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
332
|
+
<item>
|
333
|
+
<widget class="QLabel" name="label_5">
|
334
|
+
<property name="sizePolicy">
|
335
|
+
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
336
|
+
<horstretch>0</horstretch>
|
337
|
+
<verstretch>0</verstretch>
|
338
|
+
</sizepolicy>
|
339
|
+
</property>
|
340
|
+
<property name="text">
|
341
|
+
<string>Hint: You can double click to send the required Bitcoins for an accepted Purchase offer that's waiting on payment</string>
|
342
|
+
</property>
|
343
|
+
<property name="wordWrap">
|
344
|
+
<bool>true</bool>
|
345
|
+
</property>
|
346
|
+
</widget>
|
347
|
+
</item>
|
348
|
+
<item>
|
349
|
+
<widget class="QPushButton" name="purchaseButton">
|
350
|
+
<property name="text">
|
351
|
+
<string>New Purchase Offer</string>
|
352
|
+
</property>
|
353
|
+
</widget>
|
354
|
+
</item>
|
355
|
+
</layout>
|
356
|
+
</item>
|
357
|
+
</layout>
|
358
|
+
</widget>
|
359
|
+
</widget>
|
360
|
+
</item>
|
361
|
+
</layout>
|
94
362
|
</widget>
|
95
363
|
</widget>
|
96
|
-
|
97
|
-
|
98
|
-
<rect>
|
99
|
-
<x>220</x>
|
100
|
-
<y>40</y>
|
101
|
-
<width>491</width>
|
102
|
-
<height>51</height>
|
103
|
-
</rect>
|
104
|
-
</property>
|
105
|
-
<property name="font">
|
106
|
-
<font>
|
107
|
-
<family>Verdana</family>
|
108
|
-
<pointsize>24</pointsize>
|
109
|
-
</font>
|
110
|
-
</property>
|
111
|
-
<property name="text">
|
112
|
-
<string>MSC Address</string>
|
113
|
-
</property>
|
114
|
-
</widget>
|
115
|
-
<widget class="QTreeWidget" name="overviewTree">
|
116
|
-
<property name="geometry">
|
117
|
-
<rect>
|
118
|
-
<x>10</x>
|
119
|
-
<y>120</y>
|
120
|
-
<width>711</width>
|
121
|
-
<height>251</height>
|
122
|
-
</rect>
|
123
|
-
</property>
|
124
|
-
<property name="sortingEnabled">
|
125
|
-
<bool>true</bool>
|
126
|
-
</property>
|
127
|
-
<property name="columnCount">
|
128
|
-
<number>5</number>
|
129
|
-
</property>
|
130
|
-
<column>
|
131
|
-
<property name="text">
|
132
|
-
<string>Address</string>
|
133
|
-
</property>
|
134
|
-
</column>
|
135
|
-
<column>
|
136
|
-
<property name="text">
|
137
|
-
<string>Amount</string>
|
138
|
-
</property>
|
139
|
-
</column>
|
140
|
-
<column>
|
141
|
-
<property name="text">
|
142
|
-
<string>Type</string>
|
143
|
-
</property>
|
144
|
-
</column>
|
145
|
-
<column>
|
146
|
-
<property name="text">
|
147
|
-
<string>Currency</string>
|
148
|
-
</property>
|
149
|
-
</column>
|
150
|
-
<column>
|
151
|
-
<property name="text">
|
152
|
-
<string>Date</string>
|
153
|
-
</property>
|
154
|
-
</column>
|
155
|
-
</widget>
|
156
|
-
<widget class="QPushButton" name="simpleSendButton">
|
157
|
-
<property name="geometry">
|
158
|
-
<rect>
|
159
|
-
<x>580</x>
|
160
|
-
<y>380</y>
|
161
|
-
<width>141</width>
|
162
|
-
<height>32</height>
|
163
|
-
</rect>
|
164
|
-
</property>
|
165
|
-
<property name="text">
|
166
|
-
<string>new Simple Send</string>
|
167
|
-
</property>
|
168
|
-
</widget>
|
169
|
-
<widget class="QLabel" name="label_3">
|
170
|
-
<property name="geometry">
|
171
|
-
<rect>
|
172
|
-
<x>220</x>
|
173
|
-
<y>20</y>
|
174
|
-
<width>231</width>
|
175
|
-
<height>19</height>
|
176
|
-
</rect>
|
177
|
-
</property>
|
178
|
-
<property name="text">
|
179
|
-
<string>Mastercoin wallet for</string>
|
180
|
-
</property>
|
181
|
-
</widget>
|
182
|
-
</widget>
|
183
|
-
<widget class="QWidget" name="tab_2">
|
184
|
-
<attribute name="title">
|
185
|
-
<string>Distributed exchange</string>
|
186
|
-
</attribute>
|
187
|
-
<widget class="QTreeWidget" name="orderTree">
|
188
|
-
<property name="geometry">
|
189
|
-
<rect>
|
190
|
-
<x>10</x>
|
191
|
-
<y>30</y>
|
192
|
-
<width>701</width>
|
193
|
-
<height>131</height>
|
194
|
-
</rect>
|
195
|
-
</property>
|
196
|
-
<property name="toolTip">
|
197
|
-
<string>Double click to create a purchase offer from this Selling Offer</string>
|
198
|
-
</property>
|
199
|
-
<property name="sortingEnabled">
|
200
|
-
<bool>true</bool>
|
201
|
-
</property>
|
202
|
-
<column>
|
203
|
-
<property name="text">
|
204
|
-
<string>Seller</string>
|
205
|
-
</property>
|
206
|
-
</column>
|
207
|
-
<column>
|
208
|
-
<property name="text">
|
209
|
-
<string>Currency</string>
|
210
|
-
</property>
|
211
|
-
</column>
|
212
|
-
<column>
|
213
|
-
<property name="text">
|
214
|
-
<string>Units available</string>
|
215
|
-
</property>
|
216
|
-
</column>
|
217
|
-
<column>
|
218
|
-
<property name="text">
|
219
|
-
<string>Price per coin</string>
|
220
|
-
</property>
|
221
|
-
</column>
|
222
|
-
<column>
|
223
|
-
<property name="text">
|
224
|
-
<string>Required fee</string>
|
225
|
-
</property>
|
226
|
-
</column>
|
227
|
-
<column>
|
228
|
-
<property name="text">
|
229
|
-
<string>Date</string>
|
230
|
-
</property>
|
231
|
-
</column>
|
232
|
-
</widget>
|
233
|
-
<widget class="QLabel" name="label">
|
234
|
-
<property name="geometry">
|
235
|
-
<rect>
|
236
|
-
<x>10</x>
|
237
|
-
<y>-2</y>
|
238
|
-
<width>321</width>
|
239
|
-
<height>31</height>
|
240
|
-
</rect>
|
241
|
-
</property>
|
242
|
-
<property name="text">
|
243
|
-
<string><h2>Order book</h2></string>
|
244
|
-
</property>
|
245
|
-
</widget>
|
246
|
-
<widget class="QPushButton" name="sellingButton">
|
247
|
-
<property name="geometry">
|
248
|
-
<rect>
|
249
|
-
<x>580</x>
|
250
|
-
<y>160</y>
|
251
|
-
<width>131</width>
|
252
|
-
<height>32</height>
|
253
|
-
</rect>
|
254
|
-
</property>
|
255
|
-
<property name="text">
|
256
|
-
<string>New Selling Offer</string>
|
257
|
-
</property>
|
258
|
-
</widget>
|
259
|
-
<widget class="QTreeWidget" name="purchaseTree">
|
260
|
-
<property name="geometry">
|
261
|
-
<rect>
|
262
|
-
<x>10</x>
|
263
|
-
<y>250</y>
|
264
|
-
<width>701</width>
|
265
|
-
<height>131</height>
|
266
|
-
</rect>
|
267
|
-
</property>
|
268
|
-
<property name="sortingEnabled">
|
269
|
-
<bool>true</bool>
|
270
|
-
</property>
|
271
|
-
<column>
|
272
|
-
<property name="text">
|
273
|
-
<string>Offer address</string>
|
274
|
-
</property>
|
275
|
-
</column>
|
276
|
-
<column>
|
277
|
-
<property name="text">
|
278
|
-
<string>Amount</string>
|
279
|
-
</property>
|
280
|
-
</column>
|
281
|
-
<column>
|
282
|
-
<property name="text">
|
283
|
-
<string>Bitcoin amount</string>
|
284
|
-
</property>
|
285
|
-
</column>
|
286
|
-
<column>
|
287
|
-
<property name="text">
|
288
|
-
<string>Currency</string>
|
289
|
-
</property>
|
290
|
-
</column>
|
291
|
-
<column>
|
292
|
-
<property name="text">
|
293
|
-
<string>Offer status</string>
|
294
|
-
</property>
|
295
|
-
</column>
|
296
|
-
<column>
|
297
|
-
<property name="text">
|
298
|
-
<string>Date</string>
|
299
|
-
</property>
|
300
|
-
</column>
|
301
|
-
</widget>
|
302
|
-
<widget class="QLabel" name="label_2">
|
303
|
-
<property name="geometry">
|
304
|
-
<rect>
|
305
|
-
<x>10</x>
|
306
|
-
<y>210</y>
|
307
|
-
<width>411</width>
|
308
|
-
<height>31</height>
|
309
|
-
</rect>
|
310
|
-
</property>
|
311
|
-
<property name="text">
|
312
|
-
<string><h2>My purchase offers</h2></string>
|
313
|
-
</property>
|
314
|
-
</widget>
|
315
|
-
<widget class="QPushButton" name="purchaseButton">
|
316
|
-
<property name="geometry">
|
317
|
-
<rect>
|
318
|
-
<x>560</x>
|
319
|
-
<y>380</y>
|
320
|
-
<width>151</width>
|
321
|
-
<height>32</height>
|
322
|
-
</rect>
|
323
|
-
</property>
|
324
|
-
<property name="text">
|
325
|
-
<string>New Purchase Offer</string>
|
326
|
-
</property>
|
327
|
-
</widget>
|
328
|
-
<widget class="QLabel" name="label_4">
|
329
|
-
<property name="geometry">
|
330
|
-
<rect>
|
331
|
-
<x>10</x>
|
332
|
-
<y>160</y>
|
333
|
-
<width>521</width>
|
334
|
-
<height>21</height>
|
335
|
-
</rect>
|
336
|
-
</property>
|
337
|
-
<property name="text">
|
338
|
-
<string>Hint: You can double click to create a Purchase Offer for an item in the order book</string>
|
339
|
-
</property>
|
340
|
-
</widget>
|
341
|
-
<widget class="QLabel" name="label_5">
|
342
|
-
<property name="geometry">
|
343
|
-
<rect>
|
344
|
-
<x>10</x>
|
345
|
-
<y>380</y>
|
346
|
-
<width>521</width>
|
347
|
-
<height>41</height>
|
348
|
-
</rect>
|
349
|
-
</property>
|
350
|
-
<property name="text">
|
351
|
-
<string>Hint: You can double click to send the required Bitcoins for an accepted Purchase offer that's waiting on payment</string>
|
352
|
-
</property>
|
353
|
-
<property name="wordWrap">
|
354
|
-
<bool>true</bool>
|
355
|
-
</property>
|
356
|
-
</widget>
|
357
|
-
</widget>
|
358
|
-
</widget>
|
364
|
+
</item>
|
365
|
+
</layout>
|
359
366
|
</widget>
|
360
367
|
<resources/>
|
361
368
|
<connections/>
|
@@ -24,8 +24,8 @@ module MastercoinWallet
|
|
24
24
|
|
25
25
|
|
26
26
|
@currency_select = findChild(Qt::ComboBox, "currency_box")
|
27
|
-
|
28
|
-
|
27
|
+
|
28
|
+
@currency_select.addItem(tr("Mastercoin"))
|
29
29
|
@currency_select.addItem(tr("Test Mastercoin"))
|
30
30
|
|
31
31
|
connect(@submit, SIGNAL('clicked()'), self, SLOT('send_payment()'))
|
@@ -47,7 +47,15 @@ module MastercoinWallet
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def send_payment
|
50
|
-
|
50
|
+
if @currency_select.currentText() == "Mastercoin"
|
51
|
+
currency_id = 1
|
52
|
+
elsif @currency_select.currentText() == "Test Mastercoin"
|
53
|
+
currency_id = 2
|
54
|
+
else
|
55
|
+
raise "How did you get here? ^_^"
|
56
|
+
end
|
57
|
+
|
58
|
+
data_key = Mastercoin::SimpleSend.new(currency_id: currency_id, amount: (@amount.to_f * 1e8).to_i).encode_to_compressed_public_key(MastercoinWallet.config.address)
|
51
59
|
create_transaction_with_keys(data_key)
|
52
60
|
close()
|
53
61
|
end
|
@@ -1,112 +1,240 @@
|
|
1
1
|
=begin
|
2
2
|
** Form generated from reading ui file 'main_window.ui'
|
3
3
|
**
|
4
|
-
** Created: Thu Nov
|
4
|
+
** Created: Thu Nov 14 13:28:58 2013
|
5
5
|
** by: Qt User Interface Compiler version 4.8.4
|
6
6
|
**
|
7
7
|
** WARNING! All changes made in this file will be lost when recompiling ui file!
|
8
8
|
=end
|
9
9
|
|
10
10
|
class Ui_MainWindow
|
11
|
+
attr_reader :verticalLayout
|
11
12
|
attr_reader :mainTab
|
12
13
|
attr_reader :tab
|
14
|
+
attr_reader :verticalLayout_2
|
15
|
+
attr_reader :horizontalLayout
|
13
16
|
attr_reader :balanceGroup
|
17
|
+
attr_reader :verticalLayout_4
|
14
18
|
attr_reader :mscBalanceLabel
|
15
19
|
attr_reader :tMscBalanceLabel
|
16
20
|
attr_reader :bitcoinLabel
|
21
|
+
attr_reader :verticalLayout_3
|
22
|
+
attr_reader :label_3
|
17
23
|
attr_reader :mscAddressLabel
|
18
24
|
attr_reader :overviewTree
|
25
|
+
attr_reader :horizontalLayout_2
|
26
|
+
attr_reader :horizontalSpacer
|
19
27
|
attr_reader :simpleSendButton
|
20
|
-
attr_reader :label_3
|
21
28
|
attr_reader :tab_2
|
22
|
-
attr_reader :
|
29
|
+
attr_reader :verticalLayout_5
|
30
|
+
attr_reader :splitter
|
31
|
+
attr_reader :layoutWidget
|
32
|
+
attr_reader :verticalLayout_6
|
23
33
|
attr_reader :label
|
34
|
+
attr_reader :orderTree
|
35
|
+
attr_reader :horizontalLayout_3
|
36
|
+
attr_reader :label_4
|
24
37
|
attr_reader :sellingButton
|
25
|
-
attr_reader :
|
38
|
+
attr_reader :layoutWidget_2
|
39
|
+
attr_reader :verticalLayout_7
|
26
40
|
attr_reader :label_2
|
27
|
-
attr_reader :
|
28
|
-
attr_reader :
|
41
|
+
attr_reader :purchaseTree
|
42
|
+
attr_reader :horizontalLayout_4
|
29
43
|
attr_reader :label_5
|
44
|
+
attr_reader :purchaseButton
|
30
45
|
|
31
46
|
def setupUi(mainWindow)
|
32
47
|
if mainWindow.objectName.nil?
|
33
48
|
mainWindow.objectName = "mainWindow"
|
34
49
|
end
|
35
50
|
mainWindow.resize(746, 469)
|
36
|
-
@sizePolicy = Qt::SizePolicy.new(Qt::SizePolicy::
|
51
|
+
@sizePolicy = Qt::SizePolicy.new(Qt::SizePolicy::Expanding, Qt::SizePolicy::Expanding)
|
37
52
|
@sizePolicy.setHorizontalStretch(0)
|
38
53
|
@sizePolicy.setVerticalStretch(0)
|
39
54
|
@sizePolicy.heightForWidth = mainWindow.sizePolicy.hasHeightForWidth
|
40
55
|
mainWindow.sizePolicy = @sizePolicy
|
56
|
+
mainWindow.sizeGripEnabled = true
|
57
|
+
@verticalLayout = Qt::VBoxLayout.new(mainWindow)
|
58
|
+
@verticalLayout.objectName = "verticalLayout"
|
41
59
|
@mainTab = Qt::TabWidget.new(mainWindow)
|
42
60
|
@mainTab.objectName = "mainTab"
|
43
|
-
@mainTab.geometry = Qt::Rect.new(10, 10, 731, 451)
|
44
61
|
@sizePolicy.heightForWidth = @mainTab.sizePolicy.hasHeightForWidth
|
45
62
|
@mainTab.sizePolicy = @sizePolicy
|
46
63
|
@tab = Qt::Widget.new()
|
47
64
|
@tab.objectName = "tab"
|
65
|
+
@tab.enabled = true
|
66
|
+
@sizePolicy.heightForWidth = @tab.sizePolicy.hasHeightForWidth
|
67
|
+
@tab.sizePolicy = @sizePolicy
|
68
|
+
@verticalLayout_2 = Qt::VBoxLayout.new(@tab)
|
69
|
+
@verticalLayout_2.objectName = "verticalLayout_2"
|
70
|
+
@horizontalLayout = Qt::HBoxLayout.new()
|
71
|
+
@horizontalLayout.objectName = "horizontalLayout"
|
48
72
|
@balanceGroup = Qt::GroupBox.new(@tab)
|
49
73
|
@balanceGroup.objectName = "balanceGroup"
|
50
|
-
@
|
74
|
+
@verticalLayout_4 = Qt::VBoxLayout.new(@balanceGroup)
|
75
|
+
@verticalLayout_4.objectName = "verticalLayout_4"
|
51
76
|
@mscBalanceLabel = Qt::Label.new(@balanceGroup)
|
52
77
|
@mscBalanceLabel.objectName = "mscBalanceLabel"
|
53
|
-
|
78
|
+
|
79
|
+
@verticalLayout_4.addWidget(@mscBalanceLabel)
|
80
|
+
|
54
81
|
@tMscBalanceLabel = Qt::Label.new(@balanceGroup)
|
55
82
|
@tMscBalanceLabel.objectName = "tMscBalanceLabel"
|
56
|
-
|
83
|
+
|
84
|
+
@verticalLayout_4.addWidget(@tMscBalanceLabel)
|
85
|
+
|
57
86
|
@bitcoinLabel = Qt::Label.new(@balanceGroup)
|
58
87
|
@bitcoinLabel.objectName = "bitcoinLabel"
|
59
|
-
|
88
|
+
|
89
|
+
@verticalLayout_4.addWidget(@bitcoinLabel)
|
90
|
+
|
91
|
+
|
92
|
+
@horizontalLayout.addWidget(@balanceGroup)
|
93
|
+
|
94
|
+
@verticalLayout_3 = Qt::VBoxLayout.new()
|
95
|
+
@verticalLayout_3.objectName = "verticalLayout_3"
|
96
|
+
@verticalLayout_3.setContentsMargins(-1, 2, -1, -1)
|
97
|
+
@label_3 = Qt::Label.new(@tab)
|
98
|
+
@label_3.objectName = "label_3"
|
99
|
+
@sizePolicy1 = Qt::SizePolicy.new(Qt::SizePolicy::Preferred, Qt::SizePolicy::Fixed)
|
100
|
+
@sizePolicy1.setHorizontalStretch(0)
|
101
|
+
@sizePolicy1.setVerticalStretch(0)
|
102
|
+
@sizePolicy1.heightForWidth = @label_3.sizePolicy.hasHeightForWidth
|
103
|
+
@label_3.sizePolicy = @sizePolicy1
|
104
|
+
@font = Qt::Font.new
|
105
|
+
@font.bold = false
|
106
|
+
@font.weight = 50
|
107
|
+
@label_3.font = @font
|
108
|
+
|
109
|
+
@verticalLayout_3.addWidget(@label_3)
|
110
|
+
|
60
111
|
@mscAddressLabel = Qt::Label.new(@tab)
|
61
112
|
@mscAddressLabel.objectName = "mscAddressLabel"
|
62
|
-
@
|
63
|
-
@
|
64
|
-
@
|
65
|
-
@
|
66
|
-
@mscAddressLabel.
|
113
|
+
@sizePolicy2 = Qt::SizePolicy.new(Qt::SizePolicy::Expanding, Qt::SizePolicy::Preferred)
|
114
|
+
@sizePolicy2.setHorizontalStretch(0)
|
115
|
+
@sizePolicy2.setVerticalStretch(0)
|
116
|
+
@sizePolicy2.heightForWidth = @mscAddressLabel.sizePolicy.hasHeightForWidth
|
117
|
+
@mscAddressLabel.sizePolicy = @sizePolicy2
|
118
|
+
@font1 = Qt::Font.new
|
119
|
+
@font1.family = "Verdana"
|
120
|
+
@font1.pointSize = 24
|
121
|
+
@mscAddressLabel.font = @font1
|
122
|
+
@mscAddressLabel.textInteractionFlags = Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse
|
123
|
+
|
124
|
+
@verticalLayout_3.addWidget(@mscAddressLabel)
|
125
|
+
|
126
|
+
|
127
|
+
@horizontalLayout.addLayout(@verticalLayout_3)
|
128
|
+
|
129
|
+
|
130
|
+
@verticalLayout_2.addLayout(@horizontalLayout)
|
131
|
+
|
67
132
|
@overviewTree = Qt::TreeWidget.new(@tab)
|
68
133
|
@overviewTree.objectName = "overviewTree"
|
69
|
-
@overviewTree.geometry = Qt::Rect.new(10, 120, 711, 251)
|
70
134
|
@overviewTree.sortingEnabled = true
|
71
|
-
@overviewTree.columnCount =
|
135
|
+
@overviewTree.columnCount = 6
|
136
|
+
|
137
|
+
@verticalLayout_2.addWidget(@overviewTree)
|
138
|
+
|
139
|
+
@horizontalLayout_2 = Qt::HBoxLayout.new()
|
140
|
+
@horizontalLayout_2.objectName = "horizontalLayout_2"
|
141
|
+
@horizontalSpacer = Qt::SpacerItem.new(0, 0, Qt::SizePolicy::Expanding, Qt::SizePolicy::Minimum)
|
142
|
+
|
143
|
+
@horizontalLayout_2.addItem(@horizontalSpacer)
|
144
|
+
|
72
145
|
@simpleSendButton = Qt::PushButton.new(@tab)
|
73
146
|
@simpleSendButton.objectName = "simpleSendButton"
|
74
|
-
|
75
|
-
@
|
76
|
-
|
77
|
-
|
147
|
+
|
148
|
+
@horizontalLayout_2.addWidget(@simpleSendButton)
|
149
|
+
|
150
|
+
|
151
|
+
@verticalLayout_2.addLayout(@horizontalLayout_2)
|
152
|
+
|
78
153
|
@mainTab.addTab(@tab, Qt::Application.translate("MainWindow", "Dashboard", nil, Qt::Application::UnicodeUTF8))
|
79
154
|
@tab_2 = Qt::Widget.new()
|
80
155
|
@tab_2.objectName = "tab_2"
|
81
|
-
@
|
156
|
+
@verticalLayout_5 = Qt::VBoxLayout.new(@tab_2)
|
157
|
+
@verticalLayout_5.objectName = "verticalLayout_5"
|
158
|
+
@splitter = Qt::Splitter.new(@tab_2)
|
159
|
+
@splitter.objectName = "splitter"
|
160
|
+
@splitter.orientation = Qt::Vertical
|
161
|
+
@layoutWidget = Qt::Widget.new(@splitter)
|
162
|
+
@layoutWidget.objectName = "layoutWidget"
|
163
|
+
@verticalLayout_6 = Qt::VBoxLayout.new(@layoutWidget)
|
164
|
+
@verticalLayout_6.objectName = "verticalLayout_6"
|
165
|
+
@verticalLayout_6.setContentsMargins(0, 0, 0, 0)
|
166
|
+
@label = Qt::Label.new(@layoutWidget)
|
167
|
+
@label.objectName = "label"
|
168
|
+
|
169
|
+
@verticalLayout_6.addWidget(@label)
|
170
|
+
|
171
|
+
@orderTree = Qt::TreeWidget.new(@layoutWidget)
|
82
172
|
@orderTree.objectName = "orderTree"
|
83
|
-
@orderTree.geometry = Qt::Rect.new(10, 30, 701, 131)
|
84
173
|
@orderTree.sortingEnabled = true
|
85
|
-
|
86
|
-
@
|
87
|
-
|
88
|
-
@
|
174
|
+
|
175
|
+
@verticalLayout_6.addWidget(@orderTree)
|
176
|
+
|
177
|
+
@horizontalLayout_3 = Qt::HBoxLayout.new()
|
178
|
+
@horizontalLayout_3.objectName = "horizontalLayout_3"
|
179
|
+
@label_4 = Qt::Label.new(@layoutWidget)
|
180
|
+
@label_4.objectName = "label_4"
|
181
|
+
@sizePolicy2.heightForWidth = @label_4.sizePolicy.hasHeightForWidth
|
182
|
+
@label_4.sizePolicy = @sizePolicy2
|
183
|
+
|
184
|
+
@horizontalLayout_3.addWidget(@label_4)
|
185
|
+
|
186
|
+
@sellingButton = Qt::PushButton.new(@layoutWidget)
|
89
187
|
@sellingButton.objectName = "sellingButton"
|
90
|
-
|
91
|
-
@
|
188
|
+
|
189
|
+
@horizontalLayout_3.addWidget(@sellingButton)
|
190
|
+
|
191
|
+
|
192
|
+
@verticalLayout_6.addLayout(@horizontalLayout_3)
|
193
|
+
|
194
|
+
@splitter.addWidget(@layoutWidget)
|
195
|
+
@layoutWidget_2 = Qt::Widget.new(@splitter)
|
196
|
+
@layoutWidget_2.objectName = "layoutWidget_2"
|
197
|
+
@verticalLayout_7 = Qt::VBoxLayout.new(@layoutWidget_2)
|
198
|
+
@verticalLayout_7.objectName = "verticalLayout_7"
|
199
|
+
@verticalLayout_7.setContentsMargins(0, 0, 0, 0)
|
200
|
+
@label_2 = Qt::Label.new(@layoutWidget_2)
|
201
|
+
@label_2.objectName = "label_2"
|
202
|
+
|
203
|
+
@verticalLayout_7.addWidget(@label_2)
|
204
|
+
|
205
|
+
@purchaseTree = Qt::TreeWidget.new(@layoutWidget_2)
|
92
206
|
@purchaseTree.objectName = "purchaseTree"
|
93
|
-
@purchaseTree.geometry = Qt::Rect.new(10, 250, 701, 131)
|
94
207
|
@purchaseTree.sortingEnabled = true
|
95
|
-
|
96
|
-
@
|
97
|
-
|
98
|
-
@
|
99
|
-
@
|
100
|
-
@
|
101
|
-
@label_4 = Qt::Label.new(@tab_2)
|
102
|
-
@label_4.objectName = "label_4"
|
103
|
-
@label_4.geometry = Qt::Rect.new(10, 160, 521, 21)
|
104
|
-
@label_5 = Qt::Label.new(@tab_2)
|
208
|
+
|
209
|
+
@verticalLayout_7.addWidget(@purchaseTree)
|
210
|
+
|
211
|
+
@horizontalLayout_4 = Qt::HBoxLayout.new()
|
212
|
+
@horizontalLayout_4.objectName = "horizontalLayout_4"
|
213
|
+
@label_5 = Qt::Label.new(@layoutWidget_2)
|
105
214
|
@label_5.objectName = "label_5"
|
106
|
-
@
|
215
|
+
@sizePolicy2.heightForWidth = @label_5.sizePolicy.hasHeightForWidth
|
216
|
+
@label_5.sizePolicy = @sizePolicy2
|
107
217
|
@label_5.wordWrap = true
|
218
|
+
|
219
|
+
@horizontalLayout_4.addWidget(@label_5)
|
220
|
+
|
221
|
+
@purchaseButton = Qt::PushButton.new(@layoutWidget_2)
|
222
|
+
@purchaseButton.objectName = "purchaseButton"
|
223
|
+
|
224
|
+
@horizontalLayout_4.addWidget(@purchaseButton)
|
225
|
+
|
226
|
+
|
227
|
+
@verticalLayout_7.addLayout(@horizontalLayout_4)
|
228
|
+
|
229
|
+
@splitter.addWidget(@layoutWidget_2)
|
230
|
+
|
231
|
+
@verticalLayout_5.addWidget(@splitter)
|
232
|
+
|
108
233
|
@mainTab.addTab(@tab_2, Qt::Application.translate("MainWindow", "Distributed exchange", nil, Qt::Application::UnicodeUTF8))
|
109
234
|
|
235
|
+
@verticalLayout.addWidget(@mainTab)
|
236
|
+
|
237
|
+
|
110
238
|
retranslateUi(mainWindow)
|
111
239
|
|
112
240
|
@mainTab.setCurrentIndex(0)
|
@@ -125,15 +253,17 @@ class Ui_MainWindow
|
|
125
253
|
@mscBalanceLabel.text = Qt::Application.translate("MainWindow", "Updating MSC balance", nil, Qt::Application::UnicodeUTF8)
|
126
254
|
@tMscBalanceLabel.text = Qt::Application.translate("MainWindow", "Updating test MSC balance", nil, Qt::Application::UnicodeUTF8)
|
127
255
|
@bitcoinLabel.text = Qt::Application.translate("MainWindow", "Updating Bitcoin balance", nil, Qt::Application::UnicodeUTF8)
|
256
|
+
@label_3.text = Qt::Application.translate("MainWindow", "Mastercoin wallet for", nil, Qt::Application::UnicodeUTF8)
|
128
257
|
@mscAddressLabel.text = Qt::Application.translate("MainWindow", "MSC Address", nil, Qt::Application::UnicodeUTF8)
|
129
258
|
@overviewTree.headerItem.setText(0, Qt::Application.translate("MainWindow", "Address", nil, Qt::Application::UnicodeUTF8))
|
130
259
|
@overviewTree.headerItem.setText(1, Qt::Application.translate("MainWindow", "Amount", nil, Qt::Application::UnicodeUTF8))
|
131
260
|
@overviewTree.headerItem.setText(2, Qt::Application.translate("MainWindow", "Type", nil, Qt::Application::UnicodeUTF8))
|
132
261
|
@overviewTree.headerItem.setText(3, Qt::Application.translate("MainWindow", "Currency", nil, Qt::Application::UnicodeUTF8))
|
133
262
|
@overviewTree.headerItem.setText(4, Qt::Application.translate("MainWindow", "Date", nil, Qt::Application::UnicodeUTF8))
|
263
|
+
@overviewTree.headerItem.setText(5, Qt::Application.translate("MainWindow", "Height", nil, Qt::Application::UnicodeUTF8))
|
134
264
|
@simpleSendButton.text = Qt::Application.translate("MainWindow", "new Simple Send", nil, Qt::Application::UnicodeUTF8)
|
135
|
-
@label_3.text = Qt::Application.translate("MainWindow", "Mastercoin wallet for", nil, Qt::Application::UnicodeUTF8)
|
136
265
|
@mainTab.setTabText(@mainTab.indexOf(@tab), Qt::Application.translate("MainWindow", "Dashboard", nil, Qt::Application::UnicodeUTF8))
|
266
|
+
@label.text = Qt::Application.translate("MainWindow", "<h2>Order book</h2>", nil, Qt::Application::UnicodeUTF8)
|
137
267
|
@orderTree.headerItem.setText(0, Qt::Application.translate("MainWindow", "Seller", nil, Qt::Application::UnicodeUTF8))
|
138
268
|
@orderTree.headerItem.setText(1, Qt::Application.translate("MainWindow", "Currency", nil, Qt::Application::UnicodeUTF8))
|
139
269
|
@orderTree.headerItem.setText(2, Qt::Application.translate("MainWindow", "Units available", nil, Qt::Application::UnicodeUTF8))
|
@@ -141,18 +271,17 @@ class Ui_MainWindow
|
|
141
271
|
@orderTree.headerItem.setText(4, Qt::Application.translate("MainWindow", "Required fee", nil, Qt::Application::UnicodeUTF8))
|
142
272
|
@orderTree.headerItem.setText(5, Qt::Application.translate("MainWindow", "Date", nil, Qt::Application::UnicodeUTF8))
|
143
273
|
@orderTree.toolTip = Qt::Application.translate("MainWindow", "Double click to create a purchase offer from this Selling Offer", nil, Qt::Application::UnicodeUTF8)
|
144
|
-
@
|
274
|
+
@label_4.text = Qt::Application.translate("MainWindow", "Hint: You can double click to create a Purchase Offer for an item in the order book", nil, Qt::Application::UnicodeUTF8)
|
145
275
|
@sellingButton.text = Qt::Application.translate("MainWindow", "New Selling Offer", nil, Qt::Application::UnicodeUTF8)
|
276
|
+
@label_2.text = Qt::Application.translate("MainWindow", "<h2>My purchase offers</h2>", nil, Qt::Application::UnicodeUTF8)
|
146
277
|
@purchaseTree.headerItem.setText(0, Qt::Application.translate("MainWindow", "Offer address", nil, Qt::Application::UnicodeUTF8))
|
147
278
|
@purchaseTree.headerItem.setText(1, Qt::Application.translate("MainWindow", "Amount", nil, Qt::Application::UnicodeUTF8))
|
148
279
|
@purchaseTree.headerItem.setText(2, Qt::Application.translate("MainWindow", "Bitcoin amount", nil, Qt::Application::UnicodeUTF8))
|
149
280
|
@purchaseTree.headerItem.setText(3, Qt::Application.translate("MainWindow", "Currency", nil, Qt::Application::UnicodeUTF8))
|
150
281
|
@purchaseTree.headerItem.setText(4, Qt::Application.translate("MainWindow", "Offer status", nil, Qt::Application::UnicodeUTF8))
|
151
282
|
@purchaseTree.headerItem.setText(5, Qt::Application.translate("MainWindow", "Date", nil, Qt::Application::UnicodeUTF8))
|
152
|
-
@label_2.text = Qt::Application.translate("MainWindow", "<h2>My purchase offers</h2>", nil, Qt::Application::UnicodeUTF8)
|
153
|
-
@purchaseButton.text = Qt::Application.translate("MainWindow", "New Purchase Offer", nil, Qt::Application::UnicodeUTF8)
|
154
|
-
@label_4.text = Qt::Application.translate("MainWindow", "Hint: You can double click to create a Purchase Offer for an item in the order book", nil, Qt::Application::UnicodeUTF8)
|
155
283
|
@label_5.text = Qt::Application.translate("MainWindow", "Hint: You can double click to send the required Bitcoins for an accepted Purchase offer that's waiting on payment", nil, Qt::Application::UnicodeUTF8)
|
284
|
+
@purchaseButton.text = Qt::Application.translate("MainWindow", "New Purchase Offer", nil, Qt::Application::UnicodeUTF8)
|
156
285
|
@mainTab.setTabText(@mainTab.indexOf(@tab_2), Qt::Application.translate("MainWindow", "Distributed exchange", nil, Qt::Application::UnicodeUTF8))
|
157
286
|
end # retranslateUi
|
158
287
|
|
@@ -1,7 +1,8 @@
|
|
1
1
|
module MastercoinWallet
|
2
2
|
module Util
|
3
3
|
def get_date(date)
|
4
|
-
Time.strptime(date, "%Y-%m-%dT%H:%M:%S.000Z").strftime("%d-%m-%Y %H:%M:%S")
|
4
|
+
time = Time.strptime(date, "%Y-%m-%dT%H:%M:%S.000Z").strftime("%d-%m-%Y %H:%M:%S")
|
5
|
+
#Qt::Date.new(time.strftime("%Y").to_i, time.strftime("%m").to_i, time.strftime("%d").to_i)
|
5
6
|
end
|
6
7
|
|
7
8
|
def coin_name(currency_id)
|
data/mastercoin-wallet.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "mastercoin-wallet"
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.7"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Maran"]
|
12
|
-
s.date = "2013-11-
|
12
|
+
s.date = "2013-11-14"
|
13
13
|
s.description = "Mastercoin wallet using QT bindings to create a useful gui wallet"
|
14
14
|
s.email = "maran.hidskes@gmail.com"
|
15
15
|
s.executables = ["console", "mastercoin-wallet"]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mastercoin-wallet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-11-
|
12
|
+
date: 2013-11-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mastercoin-ruby
|
@@ -241,7 +241,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
241
241
|
version: '0'
|
242
242
|
segments:
|
243
243
|
- 0
|
244
|
-
hash: -
|
244
|
+
hash: -877991234193888793
|
245
245
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
246
246
|
none: false
|
247
247
|
requirements:
|