commit c8a8cb73b3d0817e1b885166ef0ee04574774497
parent 1c00fda189b99333859f7c8f1d62a4db3d6cb1d1
Author: ThomasV <thomasv@gitorious>
Date: Sun, 12 Feb 2012 11:26:38 +0100
buttons
Diffstat:
1 file changed, 34 insertions(+), 12 deletions(-)
diff --git a/client/gui_qt.py b/client/gui_qt.py
@@ -137,18 +137,40 @@ class ElectrumWindow(QMainWindow):
return w2
def make_address_list(self, is_recv):
- w = QTreeWidget(self)
- w.setColumnCount(3)
- w.setColumnWidth(0, 330)
- w.setColumnWidth(1, 330)
- w.setColumnWidth(2, 20)
- w.setHeaderLabels( ['Address', 'Label','Tx'])
- return w
- def create_receive_tab(self):
- self.receive_list = self.make_address_list(True)
- return self.receive_list
+ l = QTreeWidget(self)
+ l.setColumnCount(3)
+ l.setColumnWidth(0, 330)
+ l.setColumnWidth(1, 330)
+ l.setColumnWidth(2, 20)
+ l.setHeaderLabels( ['Address', 'Label','Tx'])
+ vbox = QtGui.QVBoxLayout()
+ #vbox.addStretch(1)
+ vbox.addWidget(l)
+
+ hbox = QtGui.QHBoxLayout()
+ qrButton = QtGui.QPushButton("QR")
+ copyButton = QtGui.QPushButton("Copy to Clipboard")
+ hbox.addWidget(qrButton)
+ hbox.addWidget(copyButton)
+ if not is_recv:
+ addButton = QtGui.QPushButton("New")
+ paytoButton = QtGui.QPushButton("Pay to")
+ hbox.addWidget(addButton)
+ hbox.addWidget(paytoButton)
+ hbox.addStretch(1)
+ buttons = QWidget()
+ buttons.setLayout(hbox)
+ vbox.addWidget(buttons)
+
+ w = QWidget()
+ w.setLayout(vbox)
+ return w, l
+
+ def create_receive_tab(self):
+ w, self.receive_list = self.make_address_list(True)
+ return w
def update_receive_tab(self):
self.receive_list.clear()
@@ -164,8 +186,8 @@ class ElectrumWindow(QMainWindow):
self.receive_list.addTopLevelItem(item)
def create_contacts_tab(self):
- self.contacts_list = self.make_address_list(False)
- return self.contacts_list
+ w, self.contacts_list = self.make_address_list(False)
+ return w
def update_contacts_tab(self):
self.contacts_list.clear()