Fix examples to properly import python_tqt module

This resolves bug 2693

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit e790d08307)
r14.0.x
Slávek Banko 8 years ago
parent d6f4544562
commit f303e4dc2b

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

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

@ -4,7 +4,7 @@
import sys, string
from qt import *
from python_tqt.qt import *
fileopen = [
@ -104,13 +104,13 @@ class ApplicationWindow(TQMainWindow):
self.fileTools = TQToolBar(self,'file operations')
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)
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)
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)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -3,7 +3,7 @@
# TQt tutorial 10.
import sys
import qt
from python_tqt import qt
class LCDRange(qt.TQVBox):
@ -101,7 +101,7 @@ class MyWidget(qt.TQWidget):
quit = qt.TQPushButton("&Quit", self, "quit")
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.setRange(5, 70)

@ -4,7 +4,7 @@
import sys
import math
import qt
from python_tqt import qt
class LCDRange(qt.TQVBox):
@ -162,7 +162,7 @@ class MyWidget(qt.TQWidget):
quit = qt.TQPushButton("&Quit", self, "quit")
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.setRange(5, 70)

@ -5,7 +5,7 @@
import sys
import math
import random
import qt
from python_tqt import qt
class LCDRange(qt.TQVBox):
@ -202,7 +202,7 @@ class MyWidget(qt.TQWidget):
quit = qt.TQPushButton("&Quit", self, "quit")
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.setRange(5, 70)

@ -5,7 +5,7 @@
import sys
import math
import random
import qt
from python_tqt import qt
class LCDRange(qt.TQWidget):
@ -237,7 +237,7 @@ class GameBoard(qt.TQWidget):
quit = qt.TQPushButton("&Quit", self, "quit")
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.setRange(5, 70)

@ -5,7 +5,7 @@
import sys
import math
import random
import qt
from python_tqt import qt
class LCDRange(qt.TQWidget):
@ -277,7 +277,7 @@ class GameBoard(qt.TQWidget):
quit = qt.TQPushButton("&Quit", self, "quit")
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.setRange(5, 70)
@ -316,7 +316,7 @@ class GameBoard(qt.TQWidget):
accel = qt.TQAccel(self)
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.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.addWidget(quit, 0, 0)

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

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

@ -3,7 +3,7 @@
# TQt tutorial 4.
import sys
import qt
from python_tqt import qt
class MyWidget(qt.TQWidget):
@ -17,7 +17,7 @@ class MyWidget(qt.TQWidget):
quit.setGeometry(62, 40, 75, 30)
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)

@ -3,7 +3,7 @@
# TQt tutorial 5.
import sys
import qt
from python_tqt import qt
class MyWidget(qt.TQVBox):
@ -13,7 +13,7 @@ class MyWidget(qt.TQVBox):
quit = qt.TQPushButton("Quit", self, "quit")
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")

@ -3,7 +3,7 @@
# TQt tutorial 6.
import sys
import qt
from python_tqt import qt
class LCDRange(qt.TQVBox):
@ -24,7 +24,7 @@ class MyWidget(qt.TQVBox):
quit = qt.TQPushButton("Quit", self, "quit")
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)

@ -3,7 +3,7 @@
# TQt tutorial 7.
import sys
import qt
from python_tqt import qt
class LCDRange(qt.TQVBox):
@ -31,7 +31,7 @@ class MyWidget(qt.TQVBox):
quit = qt.TQPushButton("Quit", self, "quit")
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)

@ -3,7 +3,7 @@
# TQt tutorial 8.
import sys
import qt
from python_tqt import qt
class LCDRange(qt.TQVBox):
@ -67,7 +67,7 @@ class MyWidget(qt.TQWidget):
quit = qt.TQPushButton("Quit", self, "quit")
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.setRange(5, 70)

@ -3,7 +3,7 @@
# TQt tutorial 9.
import sys
import qt
from python_tqt import qt
class LCDRange(qt.TQVBox):
@ -73,7 +73,7 @@ class MyWidget(qt.TQWidget):
quit = qt.TQPushButton("&Quit", self, "quit")
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.setRange(5, 70)

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

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

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

Loading…
Cancel
Save