Fix examples to properly import python_tqt module

This resolves bug 2693

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/1/head
Slávek Banko 8 years ago
parent 0b2f1c4760
commit e790d08307

@ -1,7 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
import sys import sys
from qt import * from python_tqt.qt import *
def TQMIN(x, y): def TQMIN(x, y):
if y > x: return y if y > x: return y

@ -4,7 +4,7 @@
import sys, string import sys, string
from qt import * from python_tqt.qt import *
TRUE = 1 TRUE = 1
FALSE = 0 FALSE = 0

@ -4,7 +4,7 @@
import sys, string import sys, string
from qt import * from python_tqt.qt import *
fileopen = [ fileopen = [
@ -104,13 +104,13 @@ class ApplicationWindow(TQMainWindow):
self.fileTools = TQToolBar(self,'file operations') self.fileTools = TQToolBar(self,'file operations')
openIcon = TQPixmap(fileopen) openIcon = TQPixmap(fileopen)
self.fileOpen = TQToolButton(openIcon,'Open File',TQString.null,self.load,self.fileTools,'open file') self.fileOpen = TQToolButton(TQIconSet(openIcon),'Open File',TQString.null,self.load,self.fileTools,'open file')
saveIcon = TQPixmap(filesave) saveIcon = TQPixmap(filesave)
self.fileSave = TQToolButton(saveIcon,'Save File',TQString.null,self.save,self.fileTools,'save file') self.fileSave = TQToolButton(TQIconSet(saveIcon),'Save File',TQString.null,self.save,self.fileTools,'save file')
printIcon = TQPixmap(fileprint) printIcon = TQPixmap(fileprint)
self.filePrint = TQToolButton(printIcon,'Print File',TQString.null,self.printDoc,self.fileTools,'print file') self.filePrint = TQToolButton(TQIconSet(printIcon),'Print File',TQString.null,self.printDoc,self.fileTools,'print file')
TQWhatsThis.whatsThisButton(self.fileTools) TQWhatsThis.whatsThisButton(self.fileTools)

@ -10,7 +10,7 @@
#*****************************************************************************/ #*****************************************************************************/
import sys import sys
from qt import * from python_tqt.qt import *
TRUE = 1 TRUE = 1
FALSE = 0 FALSE = 0

@ -4,7 +4,7 @@
import sys, string import sys, string
from qt import * from python_tqt.qt import *
class DigitalClock(TQLCDNumber): class DigitalClock(TQLCDNumber):

@ -1,7 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
import sys import sys
from qt import * from python_tqt.qt import *
seed = 0.353535353535 seed = 0.353535353535
KINDA_RAND_MAX = 32767 KINDA_RAND_MAX = 32767

@ -1,7 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
import sys import sys
from qt import * from python_tqt.qt import *
class Directory(TQListViewItem): class Directory(TQListViewItem):
def __init__(self, parent, name=None): def __init__(self, parent, name=None):

@ -3,7 +3,7 @@
# Ported to PyTQt by Issac Trotts on Jan 1, 2002 # Ported to PyTQt by Issac Trotts on Jan 1, 2002
import sys import sys
from qt import * from python_tqt.qt import *
import dropsite, secret import dropsite, secret

@ -1,7 +1,7 @@
# This is part of the dragdrop example. # This is part of the dragdrop example.
from qt import * from python_tqt.qt import *
import secret import secret

@ -3,8 +3,8 @@
import sys import sys
import math import math
from qt import * from python_tqt.qt import *
from qtgl import * from python_tqt.qtgl import *
from OpenGL.GL import * from OpenGL.GL import *
def gear(inner_radius,outer_radius,width,teeth,tooth_depth): def gear(inner_radius,outer_radius,width,teeth,tooth_depth):

@ -11,7 +11,7 @@
#*****************************************************************************/ #*****************************************************************************/
import sys, string import sys, string
from qt import * from python_tqt.qt import *
TRUE = 1 TRUE = 1
FALSE = 0 FALSE = 0

@ -1,7 +1,7 @@
# This is part of the dragdrop example. # This is part of the dragdrop example.
from qt import * from python_tqt.qt import *
def canDecode(e): def canDecode(e):

@ -7,12 +7,12 @@ import sys
# Check if thread support was enabled. # Check if thread support was enabled.
try: try:
from qt import TQThread from python_tqt.qt import TQThread
except: except:
print "Thread support not enabled" print "Thread support not enabled"
sys.exit(1) sys.exit(1)
from qt import * from python_tqt.qt import *
# The semaphore instances. # The semaphore instances.

@ -1,7 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
import sys import sys
from qt import * from python_tqt.qt import *
class Test(TQWidget): class Test(TQWidget):
def __init__(self, parent=None, name='Test', f=0): def __init__(self, parent=None, name='Test', f=0):

@ -1,7 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
import sys import sys
from qt import * from python_tqt.qt import *
class Table(TQTableView): class Table(TQTableView):
def __init__(self, numRows, numCols, parent=None, name=''): def __init__(self, numRows, numCols, parent=None, name=''):

@ -13,7 +13,7 @@ import os, sys
# include files for QT # include files for QT
from qt import * from python_tqt.qt import *
class ButtonsGroups(TQVBox): class ButtonsGroups(TQVBox):

@ -3,7 +3,7 @@
# TQt tutorial 1. # TQt tutorial 1.
import sys import sys
from qt import * from python_tqt.qt import *
a = TQApplication(sys.argv) a = TQApplication(sys.argv)

@ -3,7 +3,7 @@
# TQt tutorial 10. # TQt tutorial 10.
import sys import sys
from qt import * from python_tqt.qt import *
class LCDRange(TQVBox): class LCDRange(TQVBox):

@ -4,7 +4,7 @@
import sys import sys
import math import math
from qt import * from python_tqt.qt import *
class LCDRange(TQVBox): class LCDRange(TQVBox):

@ -5,7 +5,7 @@
import sys import sys
import math import math
import random import random
from qt import * from python_tqt.qt import *
class LCDRange(TQVBox): class LCDRange(TQVBox):

@ -5,7 +5,7 @@
import sys import sys
import math import math
import random import random
from qt import * from python_tqt.qt import *
class LCDRange(TQWidget): class LCDRange(TQWidget):

@ -5,7 +5,7 @@
import sys import sys
import math import math
import random import random
from qt import * from python_tqt.qt import *
class LCDRange(TQWidget): class LCDRange(TQWidget):

@ -3,7 +3,7 @@
# TQt tutorial 2. # TQt tutorial 2.
import sys import sys
from qt import * from python_tqt.qt import *
a = TQApplication(sys.argv) a = TQApplication(sys.argv)

@ -3,7 +3,7 @@
# TQt tutorial 3. # TQt tutorial 3.
import sys import sys
from qt import * from python_tqt.qt import *
a = TQApplication(sys.argv) a = TQApplication(sys.argv)

@ -3,7 +3,7 @@
# TQt tutorial 4. # TQt tutorial 4.
import sys import sys
from qt import * from python_tqt.qt import *
class MyWidget(TQWidget): class MyWidget(TQWidget):

@ -3,7 +3,7 @@
# TQt tutorial 5. # TQt tutorial 5.
import sys import sys
from qt import * from python_tqt.qt import *
class MyWidget(TQVBox): class MyWidget(TQVBox):

@ -3,7 +3,7 @@
# TQt tutorial 6. # TQt tutorial 6.
import sys import sys
from qt import * from python_tqt.qt import *
class LCDRange(TQVBox): class LCDRange(TQVBox):

@ -3,7 +3,7 @@
# TQt tutorial 7. # TQt tutorial 7.
import sys import sys
from qt import * from python_tqt.qt import *
class LCDRange(TQVBox): class LCDRange(TQVBox):

@ -3,7 +3,7 @@
# TQt tutorial 8. # TQt tutorial 8.
import sys import sys
from qt import * from python_tqt.qt import *
class LCDRange(TQVBox): class LCDRange(TQVBox):

@ -3,7 +3,7 @@
# TQt tutorial 9. # TQt tutorial 9.
import sys import sys
from qt import * from python_tqt.qt import *
class LCDRange(TQVBox): class LCDRange(TQVBox):

@ -2,7 +2,7 @@
import sys, string import sys, string
from qt import * from python_tqt.qt import *
# #
## Constructs an analog clock widget that uses an internal TQTimer. ## Constructs an analog clock widget that uses an internal TQTimer.

@ -1,8 +1,8 @@
#!/usr/bin/env python #!/usr/bin/env python
import sys import sys
from qt import * from python_tqt.qt import *
from qtsql import * from python_tqt.qtsql import *
from frmconnect import frmConnect from frmconnect import frmConnect
from dbpar import * from dbpar import *

@ -6,7 +6,7 @@
# WARNING! All changes made in this file will be lost! # WARNING! All changes made in this file will be lost!
from qt import * from python_tqt.qt import *
class frmConnect(TQDialog): class frmConnect(TQDialog):

@ -1,7 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
import sys import sys
from qt import * from python_tqt.qt import *
from form1 import Form1 from form1 import Form1
from dbconnect import createConnection from dbconnect import createConnection

@ -1,7 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
import sys import sys
from qt import * from python_tqt.qt import *
from form2 import Form2 from form2 import Form2
from dbconnect import createConnection from dbconnect import createConnection

@ -1,8 +1,8 @@
#!/usr/bin/env python #!/usr/bin/env python
import sys import sys
from qt import * from python_tqt.qt import *
from qtsql import * from python_tqt.qtsql import *
from sqlex import SqlEx from sqlex import SqlEx
from connect import ConnectDialog from connect import ConnectDialog

@ -11,8 +11,8 @@
#*****************************************************************************/ #*****************************************************************************/
import sys import sys
from qt import * from python_tqt.qt import *
from qtsql import * from python_tqt.qtsql import *
from dbconnect import createConnection from dbconnect import createConnection

@ -11,8 +11,8 @@
#*****************************************************************************/ #*****************************************************************************/
import sys import sys
from qt import * from python_tqt.qt import *
from qtsql import * from python_tqt.qtsql import *
from dbconnect import createConnection from dbconnect import createConnection

@ -11,8 +11,8 @@
#*****************************************************************************/ #*****************************************************************************/
import sys import sys
from qt import * from python_tqt.qt import *
from qtsql import * from python_tqt.qtsql import *
from dbconnect import createConnection from dbconnect import createConnection

@ -1,7 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
import sys import sys
from qt import * from python_tqt.qt import *
def TQMIN(x, y): def TQMIN(x, y):
if y > x: return y if y > x: return y

@ -4,7 +4,7 @@
import sys, string import sys, string
from qt import * from python_tqt.qt import *
TRUE = 1 TRUE = 1
FALSE = 0 FALSE = 0

@ -4,7 +4,7 @@
import sys, string import sys, string
from qt import * from python_tqt.qt import *
fileopen = [ fileopen = [

@ -1,7 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
import os, sys, string import os, sys, string
from qt import * from python_tqt.qt import *
if TQT_VERSION < 0x030100: if TQT_VERSION < 0x030100:

@ -12,8 +12,8 @@
import sys import sys
import os import os
from qt import * from python_tqt.qt import *
from qttable import * from python_tqt.qttable import *
TRUE = 1 TRUE = 1
FALSE = 0 FALSE = 0

@ -10,7 +10,7 @@
#*****************************************************************************/ #*****************************************************************************/
import sys import sys
from qt import * from python_tqt.qt import *
TRUE = 1 TRUE = 1
FALSE = 0 FALSE = 0

@ -1,8 +1,8 @@
#!/usr/bin/env python #!/usr/bin/env python
import sys import sys
from qt import * from python_tqt.qt import *
from qtcanvas import * from python_tqt.qtcanvas import *
import random import random

@ -4,7 +4,7 @@
# Copyright (C) 2002 Oleksandr Yakovlyev (yshurik) <yshurik@thekompany.com> # Copyright (C) 2002 Oleksandr Yakovlyev (yshurik) <yshurik@thekompany.com>
import sys import sys
from qt import * from python_tqt.qt import *
TRUE = 1 TRUE = 1
FALSE = 0 FALSE = 0

@ -10,7 +10,7 @@
***************************************************************************""" ***************************************************************************"""
import sys import sys
from qt import * from python_tqt.qt import *
# cb_bits and cm_bits were generated by X bitmap program. # cb_bits and cm_bits were generated by X bitmap program.

@ -4,7 +4,7 @@
import sys, string import sys, string
from qt import * from python_tqt.qt import *
class DigitalClock(TQLCDNumber): class DigitalClock(TQLCDNumber):

@ -1,7 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
import sys import sys
from qt import * from python_tqt.qt import *
seed = 0.353535353535 seed = 0.353535353535
KINDA_RAND_MAX = 32767 KINDA_RAND_MAX = 32767

@ -12,7 +12,7 @@
***************************************************************************""" ***************************************************************************"""
import sys import sys
from qt import * from python_tqt.qt import *
folder_closed_xpm = [ folder_closed_xpm = [
"16 16 9 1", "16 16 9 1",

@ -3,7 +3,7 @@
# Ported to PyTQt by Issac Trotts on Jan 1, 2002 # Ported to PyTQt by Issac Trotts on Jan 1, 2002
import sys import sys
from qt import * from python_tqt.qt import *
import dropsite, secret import dropsite, secret

@ -1,7 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
import sys, random import sys, random
from qt import * from python_tqt.qt import *
TRUE = 1 TRUE = 1
FALSE = 0 FALSE = 0

@ -1,7 +1,7 @@
# This is part of the dragdrop example. # This is part of the dragdrop example.
from qt import * from python_tqt.qt import *
import secret import secret

@ -11,7 +11,7 @@
***************************************************************************""" ***************************************************************************"""
import sys import sys
from qt import * from python_tqt.qt import *
class FontRowTable( TQFrame ): class FontRowTable( TQFrame ):
def __init__( self, parent=None, name=None ): def __init__( self, parent=None, name=None ):

@ -11,7 +11,7 @@
***************************************************************************""" ***************************************************************************"""
import sys import sys
from qt import * from python_tqt.qt import *
class Viewer( TQWidget ): class Viewer( TQWidget ):
def __init__( self ): def __init__( self ):

@ -3,8 +3,8 @@
import sys import sys
import math import math
from qt import * from python_tqt.qt import *
from qtgl import * from python_tqt.qtgl import *
from OpenGL.GL import * from OpenGL.GL import *
def gear(inner_radius,outer_radius,width,teeth,tooth_depth): def gear(inner_radius,outer_radius,width,teeth,tooth_depth):

@ -5,7 +5,7 @@
from whrandom import randint from whrandom import randint
import sys import sys
from qt import * from python_tqt.qt import *
from mywidget import MyWidget from mywidget import MyWidget

@ -1,6 +1,6 @@
# Copyright (c) 2002 Detlev Offenbach <detlev@die-offenbachs.de> # Copyright (c) 2002 Detlev Offenbach <detlev@die-offenbachs.de>
from qt import * from python_tqt.qt import *
class MyWidget(TQMainWindow): class MyWidget(TQMainWindow):

@ -11,7 +11,7 @@
#*****************************************************************************/ #*****************************************************************************/
import sys import sys
from qt import * from python_tqt.qt import *
TRUE = 1 TRUE = 1
FALSE = 0 FALSE = 0

@ -11,7 +11,7 @@
***************************************************************************""" ***************************************************************************"""
import sys import sys
from qt import * from python_tqt.qt import *
FALSE = 0 FALSE = 0
TRUE = 1 TRUE = 1

@ -11,7 +11,7 @@
***************************************************************************""" ***************************************************************************"""
import sys import sys
from qt import * from python_tqt.qt import *
FALSE = 0 FALSE = 0
TRUE = 1 TRUE = 1

@ -4,7 +4,7 @@
import sys, string import sys, string
from qt import * from python_tqt.qt import *
fileopen = [ fileopen = [

@ -11,7 +11,7 @@
#*****************************************************************************/ #*****************************************************************************/
import sys, string import sys, string
from qt import * from python_tqt.qt import *
TRUE = 1 TRUE = 1
FALSE = 0 FALSE = 0

@ -13,7 +13,7 @@
#*****************************************************************************/ #*****************************************************************************/
import sys import sys
from qt import * from python_tqt.qt import *
from random import randint from random import randint
class AnimatedThingy(TQLabel): class AnimatedThingy(TQLabel):

@ -12,7 +12,7 @@
#import pdb #import pdb
import sys import sys
from qt import * from python_tqt.qt import *
FALSE = 0 FALSE = 0
TRUE = 1 TRUE = 1

@ -4,7 +4,7 @@
import os import os
import pickle import pickle
from qt import * from python_tqt.qt import *
from dirview import Directory, DirectoryView from dirview import Directory, DirectoryView
bookmarks = [ bookmarks = [

@ -11,7 +11,7 @@
#*****************************************************************************/ #*****************************************************************************/
import sys import sys
from qt import * from python_tqt.qt import *
TRUE = 1 TRUE = 1
FALSE = 0 FALSE = 0

@ -11,7 +11,7 @@
***************************************************************************""" ***************************************************************************"""
import sys import sys
from qt import * from python_tqt.qt import *
INT_MAX = sys.maxint INT_MAX = sys.maxint

@ -11,7 +11,7 @@
***************************************************************************""" ***************************************************************************"""
import sys import sys
from qt import * from python_tqt.qt import *
sayings = [ sayings = [
"<b>Saying 1:</b><br>" "<b>Saying 1:</b><br>"

@ -1,7 +1,7 @@
# This is part of the dragdrop example. # This is part of the dragdrop example.
from qt import * from python_tqt.qt import *
def canDecode(e): def canDecode(e):

@ -7,12 +7,12 @@ import sys
# Check if thread support was enabled. # Check if thread support was enabled.
try: try:
from qt import TQThread from python_tqt.qt import TQThread
except: except:
print "Thread support not enabled" print "Thread support not enabled"
sys.exit(1) sys.exit(1)
from qt import * from python_tqt.qt import *
# The semaphore instances. # The semaphore instances.

@ -12,8 +12,8 @@
import sys import sys
import os import os
from qt import * from python_tqt.qt import *
from qttable import * from python_tqt.qttable import *
TRUE = 1 TRUE = 1
FALSE = 0 FALSE = 0

@ -1,7 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
import sys import sys
from qt import * from python_tqt.qt import *
class Test(TQWidget): class Test(TQWidget):
def __init__(self, parent=None, name='Test', f=0): def __init__(self, parent=None, name='Test', f=0):

@ -11,7 +11,7 @@
***************************************************************************""" ***************************************************************************"""
import sys import sys
from qt import * from python_tqt.qt import *
class TabDialog( TQTabDialog ): class TabDialog( TQTabDialog ):
def __init__( self, parent=None, name=None, filename=None ): def __init__( self, parent=None, name=None, filename=None ):

@ -12,8 +12,8 @@
import sys import sys
import os import os
from qt import * from python_tqt.qt import *
from qttable import * from python_tqt.qttable import *
TRUE = 1 TRUE = 1
FALSE = 0 FALSE = 0

@ -11,7 +11,7 @@
***************************************************************************""" ***************************************************************************"""
import sys import sys
from qt import * from python_tqt.qt import *
from random import random from random import random
class DynamicTip( TQToolTip ): class DynamicTip( TQToolTip ):

@ -3,7 +3,7 @@
# TQt tutorial 1. # TQt tutorial 1.
import sys import sys
import qt from python_tqt import qt
a = qt.TQApplication(sys.argv) a = qt.TQApplication(sys.argv)

@ -3,7 +3,7 @@
# TQt tutorial 10. # TQt tutorial 10.
import sys import sys
import qt from python_tqt import qt
class LCDRange(qt.TQVBox): class LCDRange(qt.TQVBox):
@ -101,7 +101,7 @@ class MyWidget(qt.TQWidget):
quit = qt.TQPushButton("&Quit", self, "quit") quit = qt.TQPushButton("&Quit", self, "quit")
quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold))
self.connect(quit, qt.SIGNAL("clicked()"), qt.qApp, qt.SLOT("quit()")) self.connect(quit, qt.SIGNAL("clicked()"), qt.tqApp, qt.SLOT("quit()"))
self.angle = LCDRange(self, "angle") self.angle = LCDRange(self, "angle")
self.angle.setRange(5, 70) self.angle.setRange(5, 70)

@ -4,7 +4,7 @@
import sys import sys
import math import math
import qt from python_tqt import qt
class LCDRange(qt.TQVBox): class LCDRange(qt.TQVBox):
@ -162,7 +162,7 @@ class MyWidget(qt.TQWidget):
quit = qt.TQPushButton("&Quit", self, "quit") quit = qt.TQPushButton("&Quit", self, "quit")
quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold))
self.connect(quit, qt.SIGNAL("clicked()"), qt.qApp, qt.SLOT("quit()")) self.connect(quit, qt.SIGNAL("clicked()"), qt.tqApp, qt.SLOT("quit()"))
self.angle = LCDRange(self, "angle") self.angle = LCDRange(self, "angle")
self.angle.setRange(5, 70) self.angle.setRange(5, 70)

@ -5,7 +5,7 @@
import sys import sys
import math import math
import random import random
import qt from python_tqt import qt
class LCDRange(qt.TQVBox): class LCDRange(qt.TQVBox):
@ -202,7 +202,7 @@ class MyWidget(qt.TQWidget):
quit = qt.TQPushButton("&Quit", self, "quit") quit = qt.TQPushButton("&Quit", self, "quit")
quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold))
self.connect(quit, qt.SIGNAL("clicked()"), qt.qApp, qt.SLOT("quit()")) self.connect(quit, qt.SIGNAL("clicked()"), qt.tqApp, qt.SLOT("quit()"))
self.angle = LCDRange("ANGLE", self, "angle") self.angle = LCDRange("ANGLE", self, "angle")
self.angle.setRange(5, 70) self.angle.setRange(5, 70)

@ -5,7 +5,7 @@
import sys import sys
import math import math
import random import random
import qt from python_tqt import qt
class LCDRange(qt.TQWidget): class LCDRange(qt.TQWidget):
@ -237,7 +237,7 @@ class GameBoard(qt.TQWidget):
quit = qt.TQPushButton("&Quit", self, "quit") quit = qt.TQPushButton("&Quit", self, "quit")
quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold))
self.connect(quit, qt.SIGNAL("clicked()"), qt.qApp, qt.SLOT("quit()")) self.connect(quit, qt.SIGNAL("clicked()"), qt.tqApp, qt.SLOT("quit()"))
self.angle = LCDRange("ANGLE", self, "angle") self.angle = LCDRange("ANGLE", self, "angle")
self.angle.setRange(5, 70) self.angle.setRange(5, 70)

@ -5,7 +5,7 @@
import sys import sys
import math import math
import random import random
import qt from python_tqt import qt
class LCDRange(qt.TQWidget): class LCDRange(qt.TQWidget):
@ -277,7 +277,7 @@ class GameBoard(qt.TQWidget):
quit = qt.TQPushButton("&Quit", self, "quit") quit = qt.TQPushButton("&Quit", self, "quit")
quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold))
self.connect(quit, qt.SIGNAL("clicked()"), qt.qApp, qt.SLOT("quit()")) self.connect(quit, qt.SIGNAL("clicked()"), qt.tqApp, qt.SLOT("quit()"))
self.angle = LCDRange("ANGLE", self, "angle") self.angle = LCDRange("ANGLE", self, "angle")
self.angle.setRange(5, 70) self.angle.setRange(5, 70)
@ -316,7 +316,7 @@ class GameBoard(qt.TQWidget):
accel = qt.TQAccel(self) accel = qt.TQAccel(self)
accel.connectItem(accel.insertItem(qt.TQt.Key_Enter), self.fire) accel.connectItem(accel.insertItem(qt.TQt.Key_Enter), self.fire)
accel.connectItem(accel.insertItem(qt.TQt.Key_Return), self.fire) accel.connectItem(accel.insertItem(qt.TQt.Key_Return), self.fire)
accel.connectItem(accel.insertItem(qt.TQt.CTRL + qt.TQt.Key_Q), qt.qApp, qt.SLOT("quit()")) accel.connectItem(accel.insertItem(qt.TQt.CTRL + qt.TQt.Key_Q), qt.tqApp, qt.SLOT("quit()"))
grid = qt.TQGridLayout(self, 2, 2, 10) grid = qt.TQGridLayout(self, 2, 2, 10)
grid.addWidget(quit, 0, 0) grid.addWidget(quit, 0, 0)

@ -3,7 +3,7 @@
# TQt tutorial 2. # TQt tutorial 2.
import sys import sys
import qt from python_tqt import qt
a = qt.TQApplication(sys.argv) a = qt.TQApplication(sys.argv)

@ -3,7 +3,7 @@
# TQt tutorial 3. # TQt tutorial 3.
import sys import sys
import qt from python_tqt import qt
a = qt.TQApplication(sys.argv) a = qt.TQApplication(sys.argv)

@ -3,7 +3,7 @@
# TQt tutorial 4. # TQt tutorial 4.
import sys import sys
import qt from python_tqt import qt
class MyWidget(qt.TQWidget): class MyWidget(qt.TQWidget):
@ -17,7 +17,7 @@ class MyWidget(qt.TQWidget):
quit.setGeometry(62, 40, 75, 30) quit.setGeometry(62, 40, 75, 30)
quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold))
self.connect(quit, qt.SIGNAL("clicked()"), qt.qApp, qt.SLOT("quit()")) self.connect(quit, qt.SIGNAL("clicked()"), qt.tqApp, qt.SLOT("quit()"))
a = qt.TQApplication(sys.argv) a = qt.TQApplication(sys.argv)

@ -3,7 +3,7 @@
# TQt tutorial 5. # TQt tutorial 5.
import sys import sys
import qt from python_tqt import qt
class MyWidget(qt.TQVBox): class MyWidget(qt.TQVBox):
@ -13,7 +13,7 @@ class MyWidget(qt.TQVBox):
quit = qt.TQPushButton("Quit", self, "quit") quit = qt.TQPushButton("Quit", self, "quit")
quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold))
self.connect(quit, qt.SIGNAL("clicked()"), qt.qApp, qt.SLOT("quit()")) self.connect(quit, qt.SIGNAL("clicked()"), qt.tqApp, qt.SLOT("quit()"))
lcd = qt.TQLCDNumber(2, self, "lcd") lcd = qt.TQLCDNumber(2, self, "lcd")

@ -3,7 +3,7 @@
# TQt tutorial 6. # TQt tutorial 6.
import sys import sys
import qt from python_tqt import qt
class LCDRange(qt.TQVBox): class LCDRange(qt.TQVBox):
@ -24,7 +24,7 @@ class MyWidget(qt.TQVBox):
quit = qt.TQPushButton("Quit", self, "quit") quit = qt.TQPushButton("Quit", self, "quit")
quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold))
self.connect(quit, qt.SIGNAL("clicked()"), qt.qApp, qt.SLOT("quit()")) self.connect(quit, qt.SIGNAL("clicked()"), qt.tqApp, qt.SLOT("quit()"))
grid = qt.TQGrid(4, self) grid = qt.TQGrid(4, self)

@ -3,7 +3,7 @@
# TQt tutorial 7. # TQt tutorial 7.
import sys import sys
import qt from python_tqt import qt
class LCDRange(qt.TQVBox): class LCDRange(qt.TQVBox):
@ -31,7 +31,7 @@ class MyWidget(qt.TQVBox):
quit = qt.TQPushButton("Quit", self, "quit") quit = qt.TQPushButton("Quit", self, "quit")
quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold))
self.connect(quit, qt.SIGNAL("clicked()"), qt.qApp, qt.SLOT("quit()")) self.connect(quit, qt.SIGNAL("clicked()"), qt.tqApp, qt.SLOT("quit()"))
grid = qt.TQGrid(4, self) grid = qt.TQGrid(4, self)

@ -3,7 +3,7 @@
# TQt tutorial 8. # TQt tutorial 8.
import sys import sys
import qt from python_tqt import qt
class LCDRange(qt.TQVBox): class LCDRange(qt.TQVBox):
@ -67,7 +67,7 @@ class MyWidget(qt.TQWidget):
quit = qt.TQPushButton("Quit", self, "quit") quit = qt.TQPushButton("Quit", self, "quit")
quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold))
self.connect(quit, qt.SIGNAL("clicked()"), qt.qApp, qt.SLOT("quit()")) self.connect(quit, qt.SIGNAL("clicked()"), qt.tqApp, qt.SLOT("quit()"))
self.angle = LCDRange(self, "angle") self.angle = LCDRange(self, "angle")
self.angle.setRange(5, 70) self.angle.setRange(5, 70)

@ -3,7 +3,7 @@
# TQt tutorial 9. # TQt tutorial 9.
import sys import sys
import qt from python_tqt import qt
class LCDRange(qt.TQVBox): class LCDRange(qt.TQVBox):
@ -73,7 +73,7 @@ class MyWidget(qt.TQWidget):
quit = qt.TQPushButton("&Quit", self, "quit") quit = qt.TQPushButton("&Quit", self, "quit")
quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold))
self.connect(quit, qt.SIGNAL("clicked()"), qt.qApp, qt.SLOT("quit()")) self.connect(quit, qt.SIGNAL("clicked()"), qt.tqApp, qt.SLOT("quit()"))
self.angle = LCDRange(self, "angle") self.angle = LCDRange(self, "angle")
self.angle.setRange(5, 70) self.angle.setRange(5, 70)

@ -8,8 +8,8 @@
# WARNING! All changes made in this file will be lost! # WARNING! All changes made in this file will be lost!
from qt import * from python_tqt.qt import *
from qtaxcontainer import TQAxWidget from python_tqt.qtaxcontainer import TQAxWidget
image0_data = [ image0_data = [
"32 32 3 1", "32 32 3 1",

@ -7,8 +7,8 @@
import sys import sys
import qt from python_tqt import qt
import qtaxcontainer from python_tqt import qtaxcontainer
import mainwindow import mainwindow

@ -2,7 +2,7 @@
import sys, string import sys, string
from qt import * from python_tqt.qt import *
# #
## Constructs an analog clock widget that uses an internal TQTimer. ## Constructs an analog clock widget that uses an internal TQTimer.

Loading…
Cancel
Save