diff options
Diffstat (limited to 'examples2')
-rwxr-xr-x | examples2/addressbook.py | 2 | ||||
-rwxr-xr-x | examples2/application.py | 2 | ||||
-rwxr-xr-x | examples2/desktop.py | 12 | ||||
-rwxr-xr-x | examples2/dragdrop.py | 2 | ||||
-rwxr-xr-x | examples2/menu.py | 2 | ||||
-rwxr-xr-x | examples2/themes.py | 46 | ||||
-rwxr-xr-x | examples2/tut10.py | 2 | ||||
-rwxr-xr-x | examples2/tut11.py | 2 | ||||
-rwxr-xr-x | examples2/tut12.py | 2 | ||||
-rwxr-xr-x | examples2/tut13.py | 2 | ||||
-rwxr-xr-x | examples2/tut14.py | 4 | ||||
-rwxr-xr-x | examples2/tut4.py | 2 | ||||
-rwxr-xr-x | examples2/tut5.py | 2 | ||||
-rwxr-xr-x | examples2/tut6.py | 2 | ||||
-rwxr-xr-x | examples2/tut7.py | 2 | ||||
-rwxr-xr-x | examples2/tut8.py | 2 | ||||
-rwxr-xr-x | examples2/tut9.py | 2 | ||||
-rwxr-xr-x | examples2/widgets.py | 4 |
18 files changed, 47 insertions, 47 deletions
diff --git a/examples2/addressbook.py b/examples2/addressbook.py index e151996..6d7309b 100755 --- a/examples2/addressbook.py +++ b/examples2/addressbook.py @@ -396,7 +396,7 @@ class ABMainWindow(TQMainWindow): self.file.insertSeparator() #self.file.insertItem( 'Close', self.closeWindow, TQt.CTRL + TQt.Key_W ) self.file.insertItem('Close', self, SLOT('close()'), TQt.CTRL+TQt.Key_W) - self.file.insertItem( 'Quit', qApp, SLOT( 'quit()' ), TQt.CTRL + TQt.Key_Q ) + self.file.insertItem( 'Quit', tqApp, SLOT( 'quit()' ), TQt.CTRL + TQt.Key_Q ) def setupFileTools( self ): pass diff --git a/examples2/application.py b/examples2/application.py index 8b8f43b..97d07bf 100755 --- a/examples2/application.py +++ b/examples2/application.py @@ -141,7 +141,7 @@ class ApplicationWindow(TQMainWindow): self.file.insertSeparator() self.file.insertItem('&Close',self,SLOT('close()'),TQt.CTRL + TQt.Key_W) - self.file.insertItem('&Quit',qApp,SLOT('closeAllWindows()'),TQt.CTRL + TQt.Key_Q) + self.file.insertItem('&Quit',tqApp,SLOT('closeAllWindows()'),TQt.CTRL + TQt.Key_Q) self.help = TQPopupMenu(self) self.menuBar().insertSeparator() diff --git a/examples2/desktop.py b/examples2/desktop.py index cc0c97f..a2cccb1 100755 --- a/examples2/desktop.py +++ b/examples2/desktop.py @@ -83,7 +83,7 @@ def rotate(): h = 64 image = TQImage(w, h, 8, 128) for i in range(128): - image.setColor(i, qRgb(i,0,0)) + image.setColor(i, tqRgb(i,0,0)) for y in range(h): for x in range(w): image.setPixel(x,y,(x+y)%128) @@ -158,12 +158,12 @@ class DesktopWidget(TQWidget): def desktopWidget(s='Troll Tech'): t = DesktopWidget(s) t.update() - qApp.exec_loop() + tqApp.exec_loop() def desktopText(s='Troll Tech'): border = 20 - c1 = qApp.palette().normal().background() + c1 = tqApp.palette().normal().background() c2 = c1.light(104) c3 = c1.dark(106) @@ -173,8 +173,8 @@ def desktopText(s='Troll Tech'): r = p.fontMetrics().boundingRect(s) p.end() - appWidth = qApp.desktop().width() - appHeight = qApp.desktop().height() + appWidth = tqApp.desktop().width() + appHeight = tqApp.desktop().height() if r.width() > appWidth - border*2: r.setWidth(appWidth - border*2) if r.height() > appHeight - border*2: @@ -186,7 +186,7 @@ def desktopText(s='Troll Tech'): drawShadeText(p, -r.x()+border, -r.y()+border, s, c2, c3) p.end() - qApp.desktop().setBackgroundPixmap(pm) + tqApp.desktop().setBackgroundPixmap(pm) a = TQApplication(sys.argv) if len(sys.argv) > 1: diff --git a/examples2/dragdrop.py b/examples2/dragdrop.py index 5ea9171..0a7177b 100755 --- a/examples2/dragdrop.py +++ b/examples2/dragdrop.py @@ -52,6 +52,6 @@ addStuff( mw3, 1, 1 ) mw3.setCaption( "TQt Example - Drag and Drop" ) mw3.show() -TQObject.connect(qApp,SIGNAL('lastWindowClosed()'),qApp,SLOT('quit()')) +TQObject.connect(tqApp,SIGNAL('lastWindowClosed()'),tqApp,SLOT('quit()')) app.exec_loop() diff --git a/examples2/menu.py b/examples2/menu.py index a8efe7b..4f1cadd 100755 --- a/examples2/menu.py +++ b/examples2/menu.py @@ -160,7 +160,7 @@ class MenuExample( TQWidget ): self.file.insertSeparator() self.file.insertItem( self.p4, "&Print", self.printer, TQt.CTRL+TQt.Key_P ) self.file.insertSeparator() - self.file.insertItem( "E&xit", qApp, SLOT( "quit()" ), TQt.CTRL+TQt.Key_Q ) + self.file.insertItem( "E&xit", tqApp, SLOT( "quit()" ), TQt.CTRL+TQt.Key_Q ) self.edit = TQPopupMenu( self ) #CHECK_PTR( self.edit ) diff --git a/examples2/themes.py b/examples2/themes.py index 4dace47..e1fb529 100755 --- a/examples2/themes.py +++ b/examples2/themes.py @@ -389,7 +389,7 @@ class NorwegianWoodStyle(TQMotifStyle): rgb=img.color(i) c=TQColor(rgb) (r, g, b)=c.dark().rgb() - img.setColor(i,qRgb(r, g, b)) + img.setColor(i,tqRgb(r, g, b)) mid=TQPixmap() mid.convertFromImage(img) @@ -398,7 +398,7 @@ class NorwegianWoodStyle(TQMotifStyle): rgb=img.color(i) c=TQColor(rgb) (r, g, b)=c.light().rgb() - img.setColor(i,qRgb(r, g, b)) + img.setColor(i,tqRgb(r, g, b)) light=TQPixmap() light.convertFromImage(img) @@ -407,7 +407,7 @@ class NorwegianWoodStyle(TQMotifStyle): rgb=img.color(i) c=TQColor(rgb) (r, g, b)=c.dark().rgb() - img.setColor(i,qRgb(r, g, b)) + img.setColor(i,tqRgb(r, g, b)) dark=TQPixmap() dark.convertFromImage(img) @@ -815,7 +815,7 @@ class Themes(TQMainWindow): self.sMotif=self.style.insertItem("M&otif", self.styleMotif) self.sMotifPlus=self.style.insertItem("Motif P&lus", self.styleMotifPlus) self.style.insertSeparator() - self.style.insertItem("&Quit", qApp.quit, TQt.CTRL | TQt.Key_Q) + self.style.insertItem("&Quit", tqApp.quit, TQt.CTRL | TQt.Key_Q) self.help=TQPopupMenu(self) self.menuBar().insertSeparator() @@ -824,7 +824,7 @@ class Themes(TQMainWindow): self.help.insertItem("About &TQt", self.aboutTQt) self.style=NorwegianWoodStyle() - qApp.setStyle(self.style) + tqApp.setStyle(self.style) self.menuBar().setItemChecked(self.sWood, TRUE) # In the following we cannot simply set the new style as we can in C++. We @@ -833,37 +833,37 @@ class Themes(TQMainWindow): def styleWood(self): newstyle=NorwegianWoodStyle() - qApp.setStyle(newstyle) + tqApp.setStyle(newstyle) self.style=newstyle - qApp.setFont(self.appFont, TRUE) + tqApp.setFont(self.appFont, TRUE) self.selectStyleMenu(self.sWood) def styleMetal(self): newstyle=MetalStyle() - qApp.setStyle(newstyle) + tqApp.setStyle(newstyle) self.style=newstyle - qApp.setFont(self.appFont, TRUE) + tqApp.setFont(self.appFont, TRUE) self.selectStyleMenu(self.sMetal) def stylePlatinum(self): newstyle=TQPlatinumStyle() - qApp.setStyle(newstyle) + tqApp.setStyle(newstyle) self.style=newstyle p=TQPalette(TQColor(239, 239, 239)) - qApp.setPalette(p, TRUE) - qApp.setFont(self.appFont, TRUE) + tqApp.setPalette(p, TRUE) + tqApp.setFont(self.appFont, TRUE) self.selectStyleMenu(self.sPlatinum) def styleWindows(self): newstyle=TQWindowsStyle() - qApp.setStyle(newstyle) + tqApp.setStyle(newstyle) self.style=newstyle - qApp.setFont(self.appFont, TRUE) + tqApp.setFont(self.appFont, TRUE) self.selectStyleMenu(self.sWindows) def styleCDE(self): newstyle=TQCDEStyle(TRUE) - qApp.setStyle(newstyle) + tqApp.setStyle(newstyle) self.style=newstyle self.selectStyleMenu(self.sCDE) @@ -886,25 +886,25 @@ class Themes(TQMainWindow): p.setColor(TQPalette.Disabled, TQColorGroup.Foreground, TQt.lightGray); p.setColor(TQPalette.Disabled, TQColorGroup.Text, TQt.lightGray); p.setColor(TQPalette.Disabled, TQColorGroup.ButtonText, TQt.lightGray); - qApp.setPalette(p, TRUE) - qApp.setFont(TQFont("times", self.appFont.pointSize()), TRUE) + tqApp.setPalette(p, TRUE) + tqApp.setFont(TQFont("times", self.appFont.pointSize()), TRUE) def styleMotif(self): newstyle=TQMotifStyle(TRUE) - qApp.setStyle(newstyle) + tqApp.setStyle(newstyle) self.style=newstyle p=TQPalette(TQColor(192, 192, 192)) - qApp.setPalette(p, TRUE) - qApp.setFont(self.appFont, TRUE) + tqApp.setPalette(p, TRUE) + tqApp.setFont(self.appFont, TRUE) self.selectStyleMenu(self.sMotif) def styleMotifPlus(self): newstyle=TQMotifPlusStyle(TRUE) - qApp.setStyle(newstyle) + tqApp.setStyle(newstyle) self.style=newstyle p=TQPalette(TQColor(192, 192, 192)) - qApp.setPalette(p, TRUE) - qApp.setFont(self.appFont, TRUE) + tqApp.setPalette(p, TRUE) + tqApp.setFont(self.appFont, TRUE) self.selectStyleMenu(self.sMotifPlus) def about(self): diff --git a/examples2/tut10.py b/examples2/tut10.py index c852626..dda42b1 100755 --- a/examples2/tut10.py +++ b/examples2/tut10.py @@ -101,7 +101,7 @@ class MyWidget(TQWidget): quit = TQPushButton('&Quit',self,'quit') quit.setFont(TQFont('Times',18,TQFont.Bold)) - self.connect(quit,SIGNAL('clicked()'),qApp,SLOT('quit()')) + self.connect(quit,SIGNAL('clicked()'),tqApp,SLOT('quit()')) self.angle = LCDRange(self,'angle') self.angle.setRange(5,70) diff --git a/examples2/tut11.py b/examples2/tut11.py index 6d1dc67..99c0290 100755 --- a/examples2/tut11.py +++ b/examples2/tut11.py @@ -162,7 +162,7 @@ class MyWidget(TQWidget): quit = TQPushButton('&Quit',self,'quit') quit.setFont(TQFont('Times',18,TQFont.Bold)) - self.connect(quit,SIGNAL('clicked()'),qApp,SLOT('quit()')) + self.connect(quit,SIGNAL('clicked()'),tqApp,SLOT('quit()')) self.angle = LCDRange(self,'angle') self.angle.setRange(5,70) diff --git a/examples2/tut12.py b/examples2/tut12.py index e52af95..4adcd1f 100755 --- a/examples2/tut12.py +++ b/examples2/tut12.py @@ -201,7 +201,7 @@ class MyWidget(TQWidget): quit = TQPushButton('&Quit',self,'quit') quit.setFont(TQFont('Times',18,TQFont.Bold)) - self.connect(quit,SIGNAL('clicked()'),qApp,SLOT('quit()')) + self.connect(quit,SIGNAL('clicked()'),tqApp,SLOT('quit()')) self.angle = LCDRange('ANGLE',self,'angle') self.angle.setRange(5,70) diff --git a/examples2/tut13.py b/examples2/tut13.py index 0ac9a00..9147c45 100755 --- a/examples2/tut13.py +++ b/examples2/tut13.py @@ -236,7 +236,7 @@ class GameBoard(TQWidget): quit = TQPushButton('&Quit',self,'quit') quit.setFont(TQFont('Times',18,TQFont.Bold)) - self.connect(quit,SIGNAL('clicked()'),qApp,SLOT('quit()')) + self.connect(quit,SIGNAL('clicked()'),tqApp,SLOT('quit()')) self.angle = LCDRange('ANGLE',self,'angle') self.angle.setRange(5,70) diff --git a/examples2/tut14.py b/examples2/tut14.py index 8a75538..a61c0dd 100755 --- a/examples2/tut14.py +++ b/examples2/tut14.py @@ -276,7 +276,7 @@ class GameBoard(TQWidget): quit = TQPushButton('&Quit',self,'quit') quit.setFont(TQFont('Times',18,TQFont.Bold)) - self.connect(quit,SIGNAL('clicked()'),qApp,SLOT('quit()')) + self.connect(quit,SIGNAL('clicked()'),tqApp,SLOT('quit()')) self.angle = LCDRange('ANGLE',self,'angle') self.angle.setRange(5,70) @@ -315,7 +315,7 @@ class GameBoard(TQWidget): accel = TQAccel(self) accel.connectItem(accel.insertItem(TQt.Key_Enter),self.fire) accel.connectItem(accel.insertItem(TQt.Key_Return),self.fire) - accel.connectItem(accel.insertItem(TQt.CTRL + TQt.Key_Q),qApp,SLOT('quit()')) + accel.connectItem(accel.insertItem(TQt.CTRL + TQt.Key_Q),tqApp,SLOT('quit()')) grid = TQGridLayout(self,2,2,10) grid.addWidget(quit,0,0) diff --git a/examples2/tut4.py b/examples2/tut4.py index 7cafd36..71a5b65 100755 --- a/examples2/tut4.py +++ b/examples2/tut4.py @@ -17,7 +17,7 @@ class MyWidget(TQWidget): quit.setGeometry(62,40,75,30) quit.setFont(TQFont("Times",18,TQFont.Bold)) - self.connect(quit,SIGNAL("clicked()"),qApp,SLOT("quit()")) + self.connect(quit,SIGNAL("clicked()"),tqApp,SLOT("quit()")) a = TQApplication(sys.argv) diff --git a/examples2/tut5.py b/examples2/tut5.py index e7662fb..16577b4 100755 --- a/examples2/tut5.py +++ b/examples2/tut5.py @@ -13,7 +13,7 @@ class MyWidget(TQVBox): quit = TQPushButton("Quit",self,"quit") quit.setFont(TQFont("Times",18,TQFont.Bold)) - self.connect(quit,SIGNAL("clicked()"),qApp,SLOT("quit()")) + self.connect(quit,SIGNAL("clicked()"),tqApp,SLOT("quit()")) lcd = TQLCDNumber(2,self,"lcd") diff --git a/examples2/tut6.py b/examples2/tut6.py index 3108345..d97d842 100755 --- a/examples2/tut6.py +++ b/examples2/tut6.py @@ -24,7 +24,7 @@ class MyWidget(TQVBox): quit = TQPushButton("Quit",self,"quit") quit.setFont(TQFont("Times",18,TQFont.Bold)) - self.connect(quit,SIGNAL("clicked()"),qApp,SLOT("quit()")) + self.connect(quit,SIGNAL("clicked()"),tqApp,SLOT("quit()")) grid = TQGrid(4,self) diff --git a/examples2/tut7.py b/examples2/tut7.py index 2c03e89..fd0705a 100755 --- a/examples2/tut7.py +++ b/examples2/tut7.py @@ -31,7 +31,7 @@ class MyWidget(TQVBox): quit = TQPushButton("Quit",self,"quit") quit.setFont(TQFont("Times",18,TQFont.Bold)) - self.connect(quit,SIGNAL("clicked()"),qApp,SLOT("quit()")) + self.connect(quit,SIGNAL("clicked()"),tqApp,SLOT("quit()")) grid = TQGrid(4,self) diff --git a/examples2/tut8.py b/examples2/tut8.py index 2c16d22..09ea0d3 100755 --- a/examples2/tut8.py +++ b/examples2/tut8.py @@ -66,7 +66,7 @@ class MyWidget(TQWidget): quit = TQPushButton('Quit',self,'quit') quit.setFont(TQFont('Times',18,TQFont.Bold)) - self.connect(quit,SIGNAL('clicked()'),qApp,SLOT('quit()')) + self.connect(quit,SIGNAL('clicked()'),tqApp,SLOT('quit()')) self.angle = LCDRange(self,'angle') self.angle.setRange(5,70) diff --git a/examples2/tut9.py b/examples2/tut9.py index fdcd9f0..5938004 100755 --- a/examples2/tut9.py +++ b/examples2/tut9.py @@ -73,7 +73,7 @@ class MyWidget(TQWidget): quit = TQPushButton('&Quit',self,'quit') quit.setFont(TQFont('Times',18,TQFont.Bold)) - self.connect(quit,SIGNAL('clicked()'),qApp,SLOT('quit()')) + self.connect(quit,SIGNAL('clicked()'),tqApp,SLOT('quit()')) self.angle = LCDRange(self,'angle') self.angle.setRange(5,70) diff --git a/examples2/widgets.py b/examples2/widgets.py index 59d9249..3dfa524 100755 --- a/examples2/widgets.py +++ b/examples2/widgets.py @@ -136,7 +136,7 @@ class WidgetView ( TQWidget ): self.setCaption( "TQt Widgets Demo Application" ) # Install an application-global event filter - qApp.installEventFilter( self ) + tqApp.installEventFilter( self ) # Create a layout to position the widgets self.topLayout = TQVBoxLayout( self, 10 ) @@ -161,7 +161,7 @@ class WidgetView ( TQWidget ): self.id = self.popup.insertItem( "&Open" ) self.popup.setItemEnabled( self.id, FALSE ) self.popup.insertSeparator() - self.popup.insertItem( "&Quit", qApp, SLOT("quit()"), TQt.CTRL+TQt.Key_Q ) + self.popup.insertItem( "&Quit", tqApp, SLOT("quit()"), TQt.CTRL+TQt.Key_Q ) self.menubar.insertItem( "&File", self.popup ) |