@ -5,6 +5,7 @@ import decimal
import random
import random
import re
import re
import sys
import sys
import time
try :
try :
import lib . gui_qt as gui_qt
import lib . gui_qt as gui_qt
@ -16,6 +17,12 @@ def IconButton(filename, parent=None):
icon = QIcon ( pixmap )
icon = QIcon ( pixmap )
return QPushButton ( icon , " " , parent )
return QPushButton ( icon , " " , parent )
class Timer ( QThread ) :
def run ( self ) :
while True :
self . emit ( SIGNAL ( ' timersignal ' ) )
time . sleep ( 0.5 )
class ElectrumGui :
class ElectrumGui :
def __init__ ( self , wallet ) :
def __init__ ( self , wallet ) :
@ -25,18 +32,22 @@ class ElectrumGui:
self . app . setStyleSheet ( style_file . read ( ) )
self . app . setStyleSheet ( style_file . read ( ) )
def main ( self , url ) :
def main ( self , url ) :
self . actuator = MiniActuator ( self . wallet )
actuator = MiniActuator ( self . wallet )
self . mini = MiniWindow ( self . actuator , self . expand )
self . mini = MiniWindow ( actuator , self . expand )
self . driver = MiniDriver ( self . wallet , self . mini )
driver = MiniDriver ( self . wallet , self . mini )
sys . exit ( self . app . exec_ ( ) )
self . app . exec_ ( )
def expand ( self ) :
def expand ( self ) :
self . wallet . gui_callback = None
self . mini . hide ( )
self . actuator = None
self . actuator = None
self . mini . close ( )
self . mini = None
self . mini = None
self . driver = None
self . driver = None
#self.gui = gui_qt.ElectrumGui(self.wallet)
self . wallet . gui_callback = None
self . timer = Timer ( )
self . timer . start ( )
self . gui = gui_qt . ElectrumWindow ( self . wallet )
self . gui . connect_slots ( self . timer )
self . gui . update_wallet ( )
class MiniWindow ( QDialog ) :
class MiniWindow ( QDialog ) :