CVS: anygui/lib/anygui/backends qtgui.py,1.23,1.24
"Dallas T. Johnston" <[email protected]> Sat, 16 Nov 2002 04:41:13 -0800
| Newsgroups | gmane.comp.python.anygui.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/anygui/anygui/lib/anygui/backends
In directory usw-pr-cvs1:/tmp/cvs-serv24516/lib/anygui/backends
Modified Files:
qtgui.py
Log Message:
dded frontend widgets and ported ComboBox to the new architecture.
Still some layout bugs in cb, but that will be fixed by tomorrow.
Also, changed the dialogs to remove Anygui, and fixed OpenFileDialog
to pretty much work perfectly now.
We just need to think of a clean way to have dialogs return their
values.
Index: qtgui.py
===================================================================
RCS file: /cvsroot/anygui/anygui/lib/anygui/backends/qtgui.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -r1.23 -r1.24
*** qtgui.py 13 Nov 2002 17:19:22 -0000 1.23
--- qtgui.py 16 Nov 2002 12:41:11 -0000 1.24
***************
*** 48,52 ****
FALSE = 0
! DEBUG = 0
TMP_DBG = 0
--- 48,52 ----
FALSE = 0
! DEBUG = 1
TMP_DBG = 0
***************
*** 85,91 ****
# Base class for all Widgets
- # FIXME: It seems that layout stuff (e.g. hstretch and vmove) is set
- # directly as state variables/attributes... Why is that? (There is a
- # layout_data attribute too... Hm.)
class ComponentWrapper(Wrapper):
--- 85,88 ----
***************
*** 173,178 ****
pass
-
-
#==============================================================#
--- 170,173 ----
***************
*** 228,232 ****
if not self.connected:
qApp.connect(self.widget, SIGNAL('highlighted(int)'),
! self.clickHandler)
self.connected = 1
--- 223,227 ----
if not self.connected:
qApp.connect(self.widget, SIGNAL('highlighted(int)'),
! self.selectHandler)
self.connected = 1
***************
*** 251,255 ****
return selection
! def clickHandler(self, index):
# self.selection = int(index)
send(self.proxy, 'select')
--- 246,250 ----
return selection
! def selectHandler(self, index):
# self.selection = int(index)
send(self.proxy, 'select')
***************
*** 310,315 ****
return QCheckBox(*args, **kwds)
-
-
#==============================================================#
# RadioButton
--- 305,308 ----
***************
*** 355,359 ****
def widgetSetUp(self):
if not self.connected:
! events = {QEvent.KeyRelease: self.keyPressHandler.im_func,
QEvent.FocusIn: self.gotFocusHandler.im_func,
QEvent.FocusOut: self.lostFocusHandler.im_func}
--- 348,352 ----
def widgetSetUp(self):
if not self.connected:
! events = {QEvent.KeyRelease: self.keyReleaseHandler.im_func,
QEvent.FocusIn: self.gotFocusHandler.im_func,
QEvent.FocusOut: self.lostFocusHandler.im_func}
***************
*** 369,379 ****
return QString(str(self.text))
! def keyPressHandler(self, event):
! if DEBUG: print 'in keyPressHandler of: ', self.widget
self.proxy.pull('text')
if int(event.key()) == 0x1004: #Qt Return Key Code
! send(self, 'enterkey')
return 1
-
def gotFocusHandler(self, event):
--- 362,372 ----
return QString(str(self.text))
! def keyReleaseHandler(self, event):
! if DEBUG: print 'in keyReleaseHandler of: ', self.widget
self.proxy.pull('text')
if int(event.key()) == 0x1004: #Qt Return Key Code
! if DEBUG: print 'enter key was pressed in ', self
! send(self.proxy, 'enterkey')
return 1
def gotFocusHandler(self, event):
-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing
your web site with SSL, click here to get a FREE TRIAL of a Thawte
Server Certificate: http://www.gothawte.com/rd524.html