twindow, statusbar - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 13e757036b02966989e15be7954871654c4dd6d1 DIR parent 1aff310838a205a1ee03fd91b29c868ef3f05bba HTML Author: ThomasV <thomasv@gitorious> Date: Sat, 11 Feb 2012 17:38:44 +0100 window, statusbar Diffstat: M client/gui_qt.py | 38 +++++++++++++++++++------------ 1 file changed, 23 insertions(+), 15 deletions(-) --- DIR diff --git a/client/gui_qt.py b/client/gui_qt.py t@@ -11,12 +11,26 @@ def restore_create_dialog(wallet): pass -class BitcoinWidget(QWidget): +class BitcoinWidget(QMainWindow): def __init__(self, wallet): - super(BitcoinWidget, self).__init__() + QMainWindow.__init__(self) self.wallet = wallet - self.initUI() + 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.create_status_bar() + + self.setGeometry(100,100,750,550) + self.setWindowTitle( 'Electrum ' + self.wallet.electrum_version ) + self.show() + def create_history_tab(self): h = [ 'ff', 'bar' ] t@@ -38,18 +52,12 @@ class BitcoinWidget(QWidget): def create_wall_tab(self): return QLabel(self.wallet.interface.message) - def initUI(self): - 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.setWindowTitle( 'Electrum ' + self.wallet.electrum_version ) - self.show() + def create_status_bar(self): + sb = QStatusBar() + sb.setFixedHeight(18) + self.setStatusBar(sb) + self.statusBar().showMessage(self.tr("test")) + class BitcoinGUI():