summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-02-27 17:38:16 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-02-27 17:38:16 -0600
commit104997c6f7b545c0095fdc1b1573367bc4cb4d5b (patch)
treecb6ae5f9464208d78cb51515f5a3c3a0a7edc64f
parente87fff3247e64b4e9509be991a8f2d6bd4ccfacc (diff)
downloadpytqt-104997c6.tar.gz
pytqt-104997c6.zip
Rename tqt3 color functions
-rw-r--r--ChangeLog4
-rw-r--r--NEWS2
-rw-r--r--doc/PyQt.html2
-rw-r--r--doc/PyQt.sgml2
-rw-r--r--doc/qtdocs.sip2
-rwxr-xr-xexamples2/addressbook.py2
-rwxr-xr-xexamples2/application.py2
-rwxr-xr-xexamples2/desktop.py12
-rwxr-xr-xexamples2/dragdrop.py2
-rwxr-xr-xexamples2/menu.py2
-rwxr-xr-xexamples2/themes.py46
-rwxr-xr-xexamples2/tut10.py2
-rwxr-xr-xexamples2/tut11.py2
-rwxr-xr-xexamples2/tut12.py2
-rwxr-xr-xexamples2/tut13.py2
-rwxr-xr-xexamples2/tut14.py4
-rwxr-xr-xexamples2/tut4.py2
-rwxr-xr-xexamples2/tut5.py2
-rwxr-xr-xexamples2/tut6.py2
-rwxr-xr-xexamples2/tut7.py2
-rwxr-xr-xexamples2/tut8.py2
-rwxr-xr-xexamples2/tut9.py2
-rwxr-xr-xexamples2/widgets.py4
-rwxr-xr-xexamples3/addressbook.py2
-rwxr-xr-xexamples3/application.py2
-rwxr-xr-xexamples3/canvas/canvas.py14
-rwxr-xr-xexamples3/desktop.py12
-rwxr-xr-xexamples3/dragdrop.py2
-rwxr-xr-xexamples3/i18n/i18n.py10
-rw-r--r--examples3/i18n/mywidget.py8
-rwxr-xr-xexamples3/mdi.py2
-rwxr-xr-xexamples3/menu.py2
-rwxr-xr-xexamples3/progress.py2
-rwxr-xr-xexamples3/qmag.py8
-rwxr-xr-xexamples3/richtext.py2
-rwxr-xr-xexamples3/tabdialog.py2
-rw-r--r--examples3/webbrowser/mainwindow.py2
-rwxr-xr-xexamples3/widgets.py4
-rw-r--r--pylupdate3/metatranslator.cpp4
-rw-r--r--pyuic3/globaldefs.h2
-rw-r--r--pyuic3/uic.cpp4
-rw-r--r--sip/qt/qapplication.sip2
-rw-r--r--sip/qt/qcolor.sip16
-rw-r--r--sip/qt/qobject.sip8
-rw-r--r--sip/qt/qwindowdefs_x11.sip2
45 files changed, 109 insertions, 109 deletions
diff --git a/ChangeLog b/ChangeLog
index d9f7a14..837992b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1555,7 +1555,7 @@ their own function name.
2003/05/30 17:47:57 phil
Added the listbox.py and listboxcombo.py examples from Jorge Arroyo.
build.py improvement in detecting executable programs.
-Changed pyuic3 to generate calls to qApp.translate() rather than self.tr().
+Changed pyuic3 to generate calls to tqApp.translate() rather than self.tr().
Documented the issues related to translations.
@@ -2533,7 +2533,7 @@ Added /CreatesThread/ and /NewThread/ to TQThread.
2002/04/14 18:07:56 phil
Reinstated PyTQtDisownTopLevelWidgets() because it solves the problem where we
-can't guarantee that the order in which qApp and the top level widgets will be
+can't guarantee that the order in which tqApp and the top level widgets will be
destroyed.
Changed -MT to -MD for Windows (thanks to Paul Felix).
diff --git a/NEWS b/NEWS
index 8341625..3d98625 100644
--- a/NEWS
+++ b/NEWS
@@ -548,7 +548,7 @@ v0.6 20th February 1999
v0.5 21st January 1999
The bindings are now packaged with autoconf configure scripts. The
enum in TQFrame is now unnamed as it is in TQt. All the examples changed
- to use the new form of enums. Added support for qApp, the global
+ to use the new form of enums. Added support for tqApp, the global
TQColors, kapp, i18n(), Icon() and ICON(). Same test environment as
v0.4.
diff --git a/doc/PyQt.html b/doc/PyQt.html
index 8cd432c..418b3ca 100644
--- a/doc/PyQt.html
+++ b/doc/PyQt.html
@@ -1744,7 +1744,7 @@ CLASS="PROGRAMLISTING"
TQObject.__init__(self)
def hello(self):
- return qApp.translate("A","Hello")</PRE
+ return tqApp.translate("A","Hello")</PRE
></TD
></TR
></TABLE
diff --git a/doc/PyQt.sgml b/doc/PyQt.sgml
index aa53ee4..e8cd373 100644
--- a/doc/PyQt.sgml
+++ b/doc/PyQt.sgml
@@ -1090,7 +1090,7 @@ class A(TQObject):
TQObject.__init__(self)
def hello(self):
- return qApp.translate("A","Hello")
+ return tqApp.translate("A","Hello")
</ProgramListing>
<Para>
diff --git a/doc/qtdocs.sip b/doc/qtdocs.sip
index 644f1cd..37824da 100644
--- a/doc/qtdocs.sip
+++ b/doc/qtdocs.sip
@@ -1123,7 +1123,7 @@ class A(TQObject):
TQObject.__init__(self)
def hello(self):
- return qApp.translate("A","Hello")
+ return tqApp.translate("A","Hello")
</ProgramListing>
<Para>
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 )
diff --git a/examples3/addressbook.py b/examples3/addressbook.py
index e151996..6d7309b 100755
--- a/examples3/addressbook.py
+++ b/examples3/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/examples3/application.py b/examples3/application.py
index c0224f3..eca45a9 100755
--- a/examples3/application.py
+++ b/examples3/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/examples3/canvas/canvas.py b/examples3/canvas/canvas.py
index 7d36592..8c0998e 100755
--- a/examples3/canvas/canvas.py
+++ b/examples3/canvas/canvas.py
@@ -34,7 +34,7 @@ class ImageItem(TQCanvasRectangle):
if not self.image.valid( ix , iy ):
return False
self.pixel = self.image.pixel( ix, iy )
- return (qAlpha( self.pixel ) != 0)
+ return (tqAlpha( self.pixel ) != 0)
def drawShape(self,p):
p.drawPixmap( self.x(), self.y(), self.pixmap )
@@ -212,7 +212,7 @@ class Main (TQMainWindow):
file.insertSeparator();
file.insertItem("&Print", self._print, TQt.CTRL+TQt.Key_P)
file.insertSeparator()
- file.insertItem("E&xit", qApp, SLOT("quit()"), TQt.CTRL+TQt.Key_Q)
+ file.insertItem("E&xit", tqApp, SLOT("quit()"), TQt.CTRL+TQt.Key_Q)
self.menuBar().insertItem("&File", file)
edit = TQPopupMenu(self.menuBar() )
@@ -280,9 +280,9 @@ class Main (TQMainWindow):
def newView(self):
m=Main(self.canvas,None,"new windiw",TQt.WDestructiveClose)
- qApp.setMainWidget(m)
+ tqApp.setMainWidget(m)
m.show()
- qApp.setMainWidget(None)
+ tqApp.setMainWidget(None)
views.append(m)
def clear(self):
@@ -596,7 +596,7 @@ if __name__=='__main__':
m=Main(canvas,None,"pyqt canvas example")
m.resize(m.sizeHint())
- qApp.setMainWidget(m)
+ tqApp.setMainWidget(m)
m.setCaption("TQt Canvas Example ported to PyTQt")
if TQApplication.desktop().width() > m.width() + 10 and TQApplication.desktop().height() > m.height() + 30:
m.show()
@@ -605,9 +605,9 @@ if __name__=='__main__':
m.show();
#// m.help();
- qApp.setMainWidget(None);
+ tqApp.setMainWidget(None);
- TQObject.connect( qApp, SIGNAL("lastWindowClosed()"), qApp, SLOT("quit()") )
+ TQObject.connect( tqApp, SIGNAL("lastWindowClosed()"), tqApp, SLOT("quit()") )
app.exec_loop()
diff --git a/examples3/desktop.py b/examples3/desktop.py
index 46c41dc..393558b 100755
--- a/examples3/desktop.py
+++ b/examples3/desktop.py
@@ -84,7 +84,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)
@@ -159,12 +159,12 @@ class DesktopWidget(TQWidget):
def desktopWidget(s='Trolltech'):
t = DesktopWidget(s)
t.update()
- qApp.exec_loop()
+ tqApp.exec_loop()
def desktopText(s='Trolltech'):
border = 20
- c1 = qApp.palette().normal().background()
+ c1 = tqApp.palette().normal().background()
c2 = c1.light(104)
c3 = c1.dark(106)
@@ -174,8 +174,8 @@ def desktopText(s='Trolltech'):
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:
@@ -187,7 +187,7 @@ def desktopText(s='Trolltech'):
drawShadeText(p, -r.x()+border, -r.y()+border, s, c2, c3)
p.end()
- qApp.desktop().setErasePixmap(pm)
+ tqApp.desktop().setErasePixmap(pm)
a = TQApplication(sys.argv)
if len(sys.argv) > 1:
diff --git a/examples3/dragdrop.py b/examples3/dragdrop.py
index 5ea9171..0a7177b 100755
--- a/examples3/dragdrop.py
+++ b/examples3/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/examples3/i18n/i18n.py b/examples3/i18n/i18n.py
index 8595d0b..866b097 100755
--- a/examples3/i18n/i18n.py
+++ b/examples3/i18n/i18n.py
@@ -61,7 +61,7 @@ wlist = [] # keep reference to widgets
def showLang(lang):
global translator
- qApp.setPalette(TQPalette(TQColor(220-randint(0,64),220-randint(0,64),220-randint(0,64))))
+ tqApp.setPalette(TQPalette(TQColor(220-randint(0,64),220-randint(0,64),220-randint(0,64))))
language = "mywidget_"+lang+".qm"
fi = TQFileInfo(language)
@@ -73,12 +73,12 @@ def showLang(lang):
return None
if translator is not None:
- qApp.removeTranslator(translator)
+ tqApp.removeTranslator(translator)
translator = None
translator = TQTranslator(None)
translator.load(language,".")
- qApp.installTranslator(translator)
+ tqApp.installTranslator(translator)
m = MyWidget()
m.setCaption("PyTQt Example - i18n - " + unicode(m.caption()))
wlist.append(m)
@@ -109,7 +109,7 @@ def main(argv):
r = dlg.exec_loop()
if r:
- tight = qApp.desktop().screen().width < 1024
+ tight = tqApp.desktop().screen().width < 1024
x = 5
y = 25
for i in range(0,len(qm)):
@@ -119,7 +119,7 @@ def main(argv):
if w == None:
sys.exit(0)
- app.connect(app, SIGNAL('lastWindowClosed()'), qApp, SLOT('quit()'))
+ app.connect(app, SIGNAL('lastWindowClosed()'), tqApp, SLOT('quit()'))
w.setGeometry(x,y,197,356)
w.show()
if tight:
diff --git a/examples3/i18n/mywidget.py b/examples3/i18n/mywidget.py
index f69cebf..c714910 100644
--- a/examples3/i18n/mywidget.py
+++ b/examples3/i18n/mywidget.py
@@ -15,7 +15,7 @@ class MyWidget(TQMainWindow):
self.setCaption(self.trUtf8("""Internationalization Example"""))
self.file = TQPopupMenu(self)
- self.file.insertItem(self.trUtf8("E&xit"), qApp, SLOT("quit()"),
+ self.file.insertItem(self.trUtf8("E&xit"), tqApp, SLOT("quit()"),
TQKeySequence(self.trUtf8("Ctrl+Q","File|Quit")))
self.menuBar().insertItem(self.trUtf8("&File"), self.file)
@@ -25,9 +25,9 @@ class MyWidget(TQMainWindow):
self.gbox = TQButtonGroup(1, TQGroupBox.Horizontal,
self.trUtf8("View"), self.central)
- rb = TQRadioButton(qApp.translate('MyWidget','Perspective'), self.gbox)
- rb = TQRadioButton(qApp.translate('MyWidget','Isometric'), self.gbox)
- rb = TQRadioButton(qApp.translate('MyWidget','Oblique'), self.gbox)
+ rb = TQRadioButton(tqApp.translate('MyWidget','Perspective'), self.gbox)
+ rb = TQRadioButton(tqApp.translate('MyWidget','Isometric'), self.gbox)
+ rb = TQRadioButton(tqApp.translate('MyWidget','Oblique'), self.gbox)
self.initChoices(self.central)
diff --git a/examples3/mdi.py b/examples3/mdi.py
index 3ff7e2e..8418678 100755
--- a/examples3/mdi.py
+++ b/examples3/mdi.py
@@ -164,7 +164,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.menuBar().insertSeparator()
self.windows = TQPopupMenu( self )
diff --git a/examples3/menu.py b/examples3/menu.py
index bb3f998..a303fb2 100755
--- a/examples3/menu.py
+++ b/examples3/menu.py
@@ -131,7 +131,7 @@ class MenuExample( TQWidget ):
self.file.insertSeparator()
self.file.insertItem( "&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 )
undoID = self.edit.insertItem( "&Undo", self.undo )
diff --git a/examples3/progress.py b/examples3/progress.py
index cb852b9..3c84f83 100755
--- a/examples3/progress.py
+++ b/examples3/progress.py
@@ -126,7 +126,7 @@ class CPUWaster(TQWidget):
"Ctrl+%s" % (i - self.first_draw_item)), i)
self.connect(menubar, SIGNAL("activated(int)"), self.doMenuItem)
file_.insertSeparator()
- file_.insertItem("Quit", qApp, SLOT("quit()"), TQKeySequence("Ctrl+Q"))
+ file_.insertItem("Quit", tqApp, SLOT("quit()"), TQKeySequence("Ctrl+Q"))
self.options = options = TQPopupMenu()
menubar.insertItem("&Options", options)
self.ld_id = options.insertItem("Loop driven", self.loopDriven,
diff --git a/examples3/qmag.py b/examples3/qmag.py
index d52a48c..28725e5 100755
--- a/examples3/qmag.py
+++ b/examples3/qmag.py
@@ -26,8 +26,8 @@ refreshrates = [
timer = (0, 20, 250, 333, 500, 1000, 2000, 3000, 5000, 10000)
class MagWidget(TQWidget):
- def __init__(self, qApp, parent = None, name = None):
- self.qApp = qApp
+ def __init__(self, tqApp, parent = None, name = None):
+ self.qApp = tqApp
TQWidget.__init__(self, parent, name)
self.pm = TQPixmap() # pixmap magnified
self.p = TQPixmap() # pixmap
@@ -210,8 +210,8 @@ class MagWidget(TQWidget):
if self.image.valid(x, y):
px = self.image.pixel(x, y)
pixelinfo = "%3d,%3d,%3d #%02x%02x%02x" % (
- qRed(px), qGreen(px), qBlue(px),
- qRed(px), qGreen(px), qBlue(px))
+ tqRed(px), tqGreen(px), tqBlue(px),
+ tqRed(px), tqGreen(px), tqBlue(px))
self.rgb.setText("x=%d, y=%d %s" % \
(x + self.grabx, y + self.graby, pixelinfo))
diff --git a/examples3/richtext.py b/examples3/richtext.py
index f7eb73e..7c99ee2 100755
--- a/examples3/richtext.py
+++ b/examples3/richtext.py
@@ -97,7 +97,7 @@ class MyRichText( TQVBox ):
self.bPrev.setEnabled( False )
- self.connect( self.bClose, SIGNAL("clicked()"), qApp, SLOT("quit()") )
+ self.connect( self.bClose, SIGNAL("clicked()"), tqApp, SLOT("quit()") )
self.connect( self.bPrev, SIGNAL("clicked()"), self.prev )
self.connect( self.bNext, SIGNAL("clicked()"), self.next )
diff --git a/examples3/tabdialog.py b/examples3/tabdialog.py
index fe1ecd7..19fd1a2 100755
--- a/examples3/tabdialog.py
+++ b/examples3/tabdialog.py
@@ -21,7 +21,7 @@ class TabDialog( TQTabDialog ):
self.setupTab1()
self.setupTab2()
self.setupTab3()
- self.connect( self, SIGNAL("applyButtonPressed()"), qApp, SLOT("quit()" ) )
+ self.connect( self, SIGNAL("applyButtonPressed()"), tqApp, SLOT("quit()" ) )
def setupTab1( self ):
tab1 = TQVBox( self )
diff --git a/examples3/webbrowser/mainwindow.py b/examples3/webbrowser/mainwindow.py
index c88be2f..96f0213 100644
--- a/examples3/webbrowser/mainwindow.py
+++ b/examples3/webbrowser/mainwindow.py
@@ -1094,4 +1094,4 @@ class MainWindow(TQMainWindow):
print "MainWindow.aboutTQtSlot(): Not implemented yet"
def __tr(self,s,c = None):
- return qApp.translate("MainWindow",s,c)
+ return tqApp.translate("MainWindow",s,c)
diff --git a/examples3/widgets.py b/examples3/widgets.py
index c0927b2..372a63c 100755
--- a/examples3/widgets.py
+++ b/examples3/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 )
@@ -160,7 +160,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 )
diff --git a/pylupdate3/metatranslator.cpp b/pylupdate3/metatranslator.cpp
index 7f46c19..ab97b33 100644
--- a/pylupdate3/metatranslator.cpp
+++ b/pylupdate3/metatranslator.cpp
@@ -174,10 +174,10 @@ bool TsHandler::fatalError( const TQXmlParseException& exception )
msg.sprintf( "Parse error at line %d, column %d (%s).",
exception.lineNumber(), exception.columnNumber(),
exception.message().latin1() );
- if ( qApp == 0 )
+ if ( tqApp == 0 )
qWarning( "XML error: %s", msg.latin1() );
else
- TQMessageBox::information( qApp->mainWidget(),
+ TQMessageBox::information( tqApp->mainWidget(),
TQObject::tr("TQt Linguist"), msg );
}
return FALSE;
diff --git a/pyuic3/globaldefs.h b/pyuic3/globaldefs.h
index 0035612..4704ff9 100644
--- a/pyuic3/globaldefs.h
+++ b/pyuic3/globaldefs.h
@@ -38,7 +38,7 @@ static void init_colors()
return;
#if 0 // a calculated alternative for backColor1
- TQColorGroup myCg = qApp->palette().active();
+ TQColorGroup myCg = tqApp->palette().active();
int h1, s1, v1;
int h2, s2, v2;
myCg.color( TQColorGroup::Base ).hsv( &h1, &s1, &v1 );
diff --git a/pyuic3/uic.cpp b/pyuic3/uic.cpp
index 16c027e..ea483a4 100644
--- a/pyuic3/uic.cpp
+++ b/pyuic3/uic.cpp
@@ -249,7 +249,7 @@ Uic::Uic( const TQString &fn, const char *outputFn, TQTextStream &outStream,
out << "\n";
out << indent << "def __tr(self,s,c = None):\n";
++indent;
- out << indent << "return qApp.translate(\"" << nameOfClass << "\",s,c)\n";
+ out << indent << "return tqApp.translate(\"" << nameOfClass << "\",s,c)\n";
--indent;
}
@@ -258,7 +258,7 @@ Uic::Uic( const TQString &fn, const char *outputFn, TQTextStream &outStream,
out << "\n";
out << indent << "def __trUtf8(self,s,c = None):\n";
++indent;
- out << indent << "return qApp.translate(\"" << nameOfClass << "\",s,c,TQApplication.UnicodeUTF8)\n";
+ out << indent << "return tqApp.translate(\"" << nameOfClass << "\",s,c,TQApplication.UnicodeUTF8)\n";
--indent;
}
diff --git a/sip/qt/qapplication.sip b/sip/qt/qapplication.sip
index 4e08b98..367ac2c 100644
--- a/sip/qt/qapplication.sip
+++ b/sip/qt/qapplication.sip
@@ -65,7 +65,7 @@ This has been renamed to <Literal>exec_loop</Literal> in Python.
%End
-TQApplication *qApp;
+TQApplication *tqApp;
class TQApplication : TQObject
diff --git a/sip/qt/qcolor.sip b/sip/qt/qcolor.sip
index 553b064..bf6ede8 100644
--- a/sip/qt/qcolor.sip
+++ b/sip/qt/qcolor.sip
@@ -106,16 +106,16 @@ TQColor darkYellow;
// Related functions.
-int qRed(TQRgb);
-int qGreen(TQRgb);
-int qBlue(TQRgb);
-TQRgb qRgb(int,int,int);
-int qGray(int,int,int);
-int qGray(TQRgb);
+int tqRed(TQRgb);
+int tqGreen(TQRgb);
+int tqBlue(TQRgb);
+TQRgb tqRgb(int,int,int);
+int tqGray(int,int,int);
+int tqGray(TQRgb);
%If (TQt_2_00 -)
-int qAlpha(TQRgb);
-TQRgb qRgba(int,int,int,int);
+int tqAlpha(TQRgb);
+TQRgb tqRgba(int,int,int,int);
%End
diff --git a/sip/qt/qobject.sip b/sip/qt/qobject.sip
index be2e6c5..55a9e1c 100644
--- a/sip/qt/qobject.sip
+++ b/sip/qt/qobject.sip
@@ -437,8 +437,8 @@ public:
Py_BEGIN_ALLOW_THREADS
- if (cname && qApp)
- sipRes = new TQString(qApp -> translate(cname,a0,a1,TQApplication::DefaultCodec));
+ if (cname && tqApp)
+ sipRes = new TQString(tqApp -> translate(cname,a0,a1,TQApplication::DefaultCodec));
else
sipRes = new TQString(TQString::fromLatin1(a0));
@@ -460,8 +460,8 @@ public:
Py_BEGIN_ALLOW_THREADS
- if (cname && qApp)
- sipRes = new TQString(qApp -> translate(cname,a0,a1,TQApplication::UnicodeUTF8));
+ if (cname && tqApp)
+ sipRes = new TQString(tqApp -> translate(cname,a0,a1,TQApplication::UnicodeUTF8));
else
sipRes = new TQString(TQString::fromUtf8(a0));
diff --git a/sip/qt/qwindowdefs_x11.sip b/sip/qt/qwindowdefs_x11.sip
index a771d63..9b2fdd6 100644
--- a/sip/qt/qwindowdefs_x11.sip
+++ b/sip/qt/qwindowdefs_x11.sip
@@ -42,7 +42,7 @@ WId qt_xrootwin(int);
%End
%If (TQt_3_3_0 -)
-const char *qAppClass();
+const char *tqAppClass();
%End
%End