summaryrefslogtreecommitdiffstats
path: root/examples2/aclock.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples2/aclock.py')
-rwxr-xr-xexamples2/aclock.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/examples2/aclock.py b/examples2/aclock.py
index 38ed36c..9fc773b 100755
--- a/examples2/aclock.py
+++ b/examples2/aclock.py
@@ -3,34 +3,34 @@
import sys
from qt import *
-def QMIN(x, y):
+def TQMIN(x, y):
if y > x: return y
return x
-class AnalogClock(QWidget):
+class AnalogClock(TQWidget):
def __init__(self, *args):
- apply(QWidget.__init__,(self,) + args)
- self.time = QTime.currentTime()
- internalTimer = QTimer(self)
+ apply(TQWidget.__init__,(self,) + args)
+ self.time = TQTime.currentTime()
+ internalTimer = TQTimer(self)
self.connect(internalTimer, SIGNAL("timeout()"), self.timeout)
internalTimer.start(5000)
def timeout(self):
- new_time = QTime.currentTime()
+ new_time = TQTime.currentTime()
if new_time.minute() != self.time.minute():
self.update()
def paintEvent(self, qe):
if not self.isVisible():
return
- self.time = QTime.currentTime()
+ self.time = TQTime.currentTime()
- pts = QPointArray()
- paint = QPainter(self)
+ pts = TQPointArray()
+ paint = TQPainter(self)
paint.setBrush(self.foregroundColor())
- cp = QPoint(self.rect().center())
- d = QMIN(self.width(), self.height())
- matrix = QWMatrix()
+ cp = TQPoint(self.rect().center())
+ d = TQMIN(self.width(), self.height())
+ matrix = TQWMatrix()
matrix.translate(cp.x(), cp.y())
matrix.scale(d/1000.0, d/1000.0)
@@ -53,7 +53,7 @@ class AnalogClock(QWidget):
paint.drawLine(450,0, 500,0)
matrix.rotate(30)
-a = QApplication(sys.argv)
+a = TQApplication(sys.argv)
clock = AnalogClock()
clock.resize(100,100)
a.setMainWidget(clock)