summaryrefslogtreecommitdiffstats
path: root/examples2/secret.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples2/secret.py')
-rw-r--r--examples2/secret.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/examples2/secret.py b/examples2/secret.py
index 7023a0b..b405737 100644
--- a/examples2/secret.py
+++ b/examples2/secret.py
@@ -12,15 +12,15 @@ def decode(e):
payload = str(e.data( "secret/magic" ))
if ( str(payload) != '' ):
e.accept()
- return QString("The secret number is "+str(ord(payload)) )
+ return TQString("The secret number is "+str(ord(payload)) )
return None
-class SecretDrag(QStoredDrag):
+class SecretDrag(TQStoredDrag):
def __init__(self, secret, parent=None, name=None):
- QStoredDrag.__init__(self, 'secret/magic', parent, name)
- data = QByteArray(chr(secret))
+ TQStoredDrag.__init__(self, 'secret/magic', parent, name)
+ data = TQByteArray(chr(secret))
self.setEncodedData( data )
@@ -49,17 +49,17 @@ picture_xpm = [
]
-class SecretSource(QLabel):
+class SecretSource(TQLabel):
def __init__(self, secret, parent=None, name=None):
- QLabel.__init__(self, "Secret", parent, name)
- self.setBackgroundColor( Qt.blue.light() )
- self.setFrameStyle( QLabel.Box | QLabel.Sunken )
+ TQLabel.__init__(self, "Secret", parent, name)
+ self.setBackgroundColor( TQt.blue.light() )
+ self.setFrameStyle( TQLabel.Box | TQLabel.Sunken )
self.setMinimumHeight( self.sizeHint().height()*2 )
- self.setAlignment( QLabel.AlignCenter )
+ self.setAlignment( TQLabel.AlignCenter )
self.mySecret = secret
def mousePressEvent(self, e):
sd = SecretDrag( self.mySecret, self )
- sd.setPixmap(QPixmap(picture_xpm),QPoint(8,8))
+ sd.setPixmap(TQPixmap(picture_xpm),TQPoint(8,8))
sd.dragCopy()
self.mySecret = self.mySecret + 1