summaryrefslogtreecommitdiffstats
path: root/examples3/dclock.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples3/dclock.py')
-rwxr-xr-xexamples3/dclock.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/examples3/dclock.py b/examples3/dclock.py
index 5382d4f..d129681 100755
--- a/examples3/dclock.py
+++ b/examples3/dclock.py
@@ -1,17 +1,17 @@
#!/usr/bin/env python
-# A port to PyQt of the dclock example from Qt v2.x.
+# A port to PyTQt of the dclock example from TQt v2.x.
import sys, string
from qt import *
-class DigitalClock(QLCDNumber):
+class DigitalClock(TQLCDNumber):
def __init__(self, parent=None, name=None):
- QLCDNumber.__init__(self, parent, name)
+ TQLCDNumber.__init__(self, parent, name)
self.showingColon = 0
- self.setFrameStyle(QFrame.Panel | QFrame.Raised)
+ self.setFrameStyle(TQFrame.Panel | TQFrame.Raised)
self.setLineWidth(2)
self.showTime()
self.normalTimer = self.startTimer(500)
@@ -25,13 +25,13 @@ class DigitalClock(QLCDNumber):
self.showTime()
def mousePressEvent(self, e):
- if e.button() == Qt.LeftButton:
+ if e.button() == TQt.LeftButton:
self.showDate()
def showDate(self):
if self.showDateTimer != -1:
return
- d = QDate.currentDate()
+ d = TQDate.currentDate()
self.display('%2d %2d' % (d.month(), d.day()))
self.showDateTimer = self.startTimer(2000)
@@ -42,7 +42,7 @@ class DigitalClock(QLCDNumber):
def showTime(self):
self.showingColon = not self.showingColon
- s = list(str(QTime.currentTime().toString())[:5]) #.left(5)
+ s = list(str(TQTime.currentTime().toString())[:5]) #.left(5)
if not self.showingColon:
s[2] = ' '
if s[0] == '0':
@@ -50,7 +50,7 @@ class DigitalClock(QLCDNumber):
s = string.join(s,'')
self.display(s)
-a = QApplication(sys.argv)
+a = TQApplication(sys.argv)
clock = DigitalClock()
clock.resize(170,80)
a.setMainWidget(clock)