CVS: anygui/lib/anygui/backends qtgui.py,1.22,1.23 tkgui.py,1.85,1.86
"Dallas T. Johnston" <[email protected]> Wed, 13 Nov 2002 09:19:24 -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-serv4972/lib/anygui/backends
Modified Files:
qtgui.py tkgui.py
Log Message:
lots of goodies...
1) added pure anygui dialogs
2) fixed many bugs
3) enhanced Application with name and version
Index: qtgui.py
===================================================================
RCS file: /cvsroot/anygui/anygui/lib/anygui/backends/qtgui.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -r1.22 -r1.23
*** qtgui.py 8 Nov 2002 10:52:23 -0000 1.22
--- qtgui.py 13 Nov 2002 17:19:22 -0000 1.23
***************
*** 49,53 ****
DEBUG = 0
! TMP_DBG = 1
#==============================================================#
--- 49,53 ----
DEBUG = 0
! TMP_DBG = 0
#==============================================================#
***************
*** 75,78 ****
--- 75,79 ----
def internalDestroy(self):
+ if DEBUG: print "in internalDestroy of: ", self
self.widget.destroy()
***************
*** 96,120 ****
def setX(self, x):
if self.widget:
! self.setGeometry(x,self.y,self.width,self.height)
def setY(self, y):
if self.widget:
! self.setGeometry(self.x,y,self.width,self.height)
def setWidth(self, width):
if self.widget:
! self.setGeometry(self.x,self.y,width,self.height)
def setHeight(self, height):
if self.widget:
! self.setGeometry(self.x,self.y,self.width,height)
def setPosition(self, x, y):
if self.widget:
! self.setGeometry(x,y,self.width,self.height)
def setSize(self, width, height):
if self.widget:
! self.setGeometry(self.x,self.y,width,height)
def setGeometry(self, x, y, width, height):
--- 97,127 ----
def setX(self, x):
if self.widget:
! g = self.widget.geometry()
! self.setGeometry(x, g.y(), g.width(), g.height())
def setY(self, y):
if self.widget:
! g = self.widget.geometry()
! self.setGeometry(g.x(), y, g.width(), g.height())
def setWidth(self, width):
if self.widget:
! g = self.widget.geometry()
! self.setGeometry(g.x(), g.y(), width, g.height())
def setHeight(self, height):
if self.widget:
! g = self.widget.geometry()
! self.setGeometry(g.x() ,g.y(), g.width(), height)
def setPosition(self, x, y):
if self.widget:
! g = self.widget.geometry()
! self.setGeometry(x, y, g.width(), g.height())
def setSize(self, width, height):
if self.widget:
! g = self.widget.geometry()
! self.setGeometry(g.x(), g.y(), width, height)
def setGeometry(self, x, y, width, height):
***************
*** 518,523 ****
ComponentWrapper.__init__(self, proxy)
def setTitle(self, title):
! if self.widget is not None:
self.mainWindow.setCaption(QString(str(title)))
--- 525,534 ----
ComponentWrapper.__init__(self, proxy)
+ def setText(self, text):
+ if self.widget:
+ self.mainWindow.setCaption(QString(str(text)))
+
def setTitle(self, title):
! if self.widget:
self.mainWindow.setCaption(QString(str(title)))
***************
*** 609,626 ****
def internalDestroy(self):
self.mainWindow.destroy()
def setGeometry(self, x, y, width, height):
! if self.widget is not None:
! g = self.widget.geometry()
! dx = -self.widget.x()
! dy = -self.widget.y()
! dw = self.mainWindow.width() - g.width()
! dh = self.mainWindow.height() - g.height()
! self.mainWindow.setGeometry(x + dx, y + dy,
! width + dw, height + dh)
def getGeometry(self):
! if self.widget is not None:
r = self.widget.geometry()
p = self.widget.mapToGlobal(QPoint(r.x(), r.y()))
--- 620,633 ----
def internalDestroy(self):
+ if DEBUG: print "in internalDestroy of: ", self
self.mainWindow.destroy()
+ application().remove(self.proxy)
def setGeometry(self, x, y, width, height):
! if self.widget:
! self.mainWindow.setGeometry(x, y, width, height)
def getGeometry(self):
! if self.widget:
r = self.widget.geometry()
p = self.widget.mapToGlobal(QPoint(r.x(), r.y()))
***************
*** 801,806 ****
class Application(AbstractApplication, QApplication):
! def __init__(self):
! AbstractApplication.__init__(self)
QApplication.__init__(self,[])
--- 808,813 ----
class Application(AbstractApplication, QApplication):
! def __init__(self, **kwds):
! AbstractApplication.__init__(self, **kwds)
QApplication.__init__(self,[])
***************
*** 811,814 ****
--- 818,824 ----
if not self._windows:
qApp.quit()
+
+ def quit(self):
+ qApp.quit()
#==============================================================#
Index: tkgui.py
===================================================================
RCS file: /cvsroot/anygui/anygui/lib/anygui/backends/tkgui.py,v
retrieving revision 1.85
retrieving revision 1.86
diff -C2 -r1.85 -r1.86
*** tkgui.py 13 Oct 2002 00:57:48 -0000 1.85
--- tkgui.py 13 Nov 2002 17:19:22 -0000 1.86
***************
*** 33,38 ****
class Application(AbstractApplication):
! def __init__(self):
! AbstractApplication.__init__(self)
self._root = Tkinter.Tk()
self._root.withdraw()
--- 33,38 ----
class Application(AbstractApplication):
! def __init__(self, **kwds):
! AbstractApplication.__init__(self, **kwds)
self._root = Tkinter.Tk()
self._root.withdraw()
-------------------------------------------------------
This sf.net email is sponsored by: Are you worried about
your web server security? Click here for a FREE Thawte
Apache SSL Guide and answer your Apache SSL security
needs: http://www.gothawte.com/rd523.html