electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 1aff310838a205a1ee03fd91b29c868ef3f05bba
parent 215f75ecdce782d2b4a0f2d9e4027fbaaaf21475
Author: ThomasV <thomasv@gitorious>
Date:   Sat, 11 Feb 2012 17:02:28 +0100

add tabs

Diffstat:
Mclient/gui_qt.py | 37++++++++++++++++++++++++++++++++-----
1 file changed, 32 insertions(+), 5 deletions(-)

diff --git a/client/gui_qt.py b/client/gui_qt.py @@ -1,7 +1,11 @@ import sys +# todo: see PySide + from PyQt4.QtGui import * +from PyQt4.QtCore import * import PyQt4.QtCore as QtCore +import PyQt4.QtGui as QtGui def restore_create_dialog(wallet): pass @@ -14,13 +18,36 @@ class BitcoinWidget(QWidget): self.wallet = wallet self.initUI() + def create_history_tab(self): + h = [ 'ff', 'bar' ] + qstr = QStringList((QString('foo'),QString('bar'))) + qstr_model = QtGui.QStringListModel(qstr) + lv = QListView() + lv.setModel(qstr_model) + return lv + + def create_send_tab(self): + return QLabel('heh') + + def create_receive_tab(self): + return QLabel('heh') + + def create_contacts_tab(self): + return QLabel('heh') + + def create_wall_tab(self): + return QLabel(self.wallet.interface.message) + def initUI(self): - qbtn = QPushButton('Quit', self) - qbtn.clicked.connect(QtCore.QCoreApplication.instance().quit) - qbtn.resize(qbtn.sizeHint()) - qbtn.move(50, 50) + tabs = QTabWidget(self) + tabs.addTab(self.create_history_tab(), 'History') + tabs.addTab(self.create_send_tab(), 'Send') + tabs.addTab(self.create_receive_tab(), 'Receive') + tabs.addTab(self.create_contacts_tab(),'Contacts') + tabs.addTab(self.create_wall_tab(), 'Wall') + tabs.resize(600, 400) + tabs.show() - self.setGeometry(300, 300, 250, 150) self.setWindowTitle( 'Electrum ' + self.wallet.electrum_version ) self.show()