summaryrefslogtreecommitdiffstats
path: root/examples3/progressbar.py
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2011-11-29 01:11:08 -0600
committerTimothy Pearson <[email protected]>2011-11-29 01:11:08 -0600
commit8a055d66f43592c257cece2eb8cc021808062917 (patch)
treed0922f201bd5d24b62a33160d1d9baf9e89f9a70 /examples3/progressbar.py
parentb388516ca2691303a076a0764fd40bf7116fe43d (diff)
downloadpytqt-8a055d66f43592c257cece2eb8cc021808062917.tar.gz
pytqt-8a055d66f43592c257cece2eb8cc021808062917.zip
Initial TQt conversion
Diffstat (limited to 'examples3/progressbar.py')
-rwxr-xr-xexamples3/progressbar.py34
1 files changed, 17 insertions, 17 deletions
diff --git a/examples3/progressbar.py b/examples3/progressbar.py
index beca2b6..9887a97 100755
--- a/examples3/progressbar.py
+++ b/examples3/progressbar.py
@@ -5,7 +5,7 @@
**
** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
**
-** This file is part of an example program for Qt. This example
+** This file is part of an example program for TQt. This example
** program may be used, distributed and modified without limitation.
**
**************************************************************************"""
@@ -17,43 +17,43 @@ from qt import *
FALSE = 0
TRUE = 1
-class ProgressBar( QButtonGroup ):
+class ProgressBar( TQButtonGroup ):
# Constructor
# Creates child widgets of the ProgressBar widget
def __init__( self, parent=None, name=None ):
- QButtonGroup.__init__( self, 0, Qt.Horizontal, "Progress Bar", parent, name )
+ TQButtonGroup.__init__( self, 0, TQt.Horizontal, "Progress Bar", parent, name )
- self.timer = QTimer()
+ self.timer = TQTimer()
self.setMargin( 10 )
- toplayout = QGridLayout( self.layout(), 2, 2, 5)
+ toplayout = TQGridLayout( self.layout(), 2, 2, 5)
self.setRadioButtonExclusive( TRUE )
# insert three radiobuttons which the user can use
# to set the speed of the progress and two pushbuttons
# to start/pause/continue and reset the progress
- self.slow = QRadioButton( "&Slow", self )
- self.normal = QRadioButton( "&Normal", self )
- self.fast = QRadioButton( "&Fast", self )
- vb1 = QVBoxLayout( )
+ self.slow = TQRadioButton( "&Slow", self )
+ self.normal = TQRadioButton( "&Normal", self )
+ self.fast = TQRadioButton( "&Fast", self )
+ vb1 = TQVBoxLayout( )
toplayout.addLayout( vb1, 0, 0 )
vb1.addWidget( self.slow )
vb1.addWidget( self.normal )
vb1.addWidget( self.fast )
# two push buttons, one for start, for for reset.
- self.start = QPushButton( "&Start", self )
- self.reset = QPushButton( "&Reset", self )
+ self.start = TQPushButton( "&Start", self )
+ self.reset = TQPushButton( "&Reset", self )
- vb2 = QVBoxLayout()
+ vb2 = TQVBoxLayout()
toplayout.addLayout( vb2, 0, 1 )
vb2.addWidget( self.start )
vb2.addWidget( self.reset )
# Create the progressbar
- self.progress = QProgressBar( 100, self )
- #self.progress.setStyle( QMotifStyle() )
+ self.progress = TQProgressBar( 100, self )
+ #self.progress.setStyle( TQMotifStyle() )
toplayout.addMultiCellWidget( self.progress, 1, 1, 0, 1 )
# connect the clicked() SIGNALs of the pushbuttons to SLOTs
@@ -139,13 +139,13 @@ class ProgressBar( QButtonGroup ):
self.progress.setProgress( p )
- #QPushButton *start, *pause, *reset;
+ #TQPushButton *start, *pause, *reset;
def main( args ):
- a = QApplication( args )
+ a = TQApplication( args )
progressbar = ProgressBar()
- progressbar.setCaption("Qt Example - ProgressBar")
+ progressbar.setCaption("TQt Example - ProgressBar")
a.setMainWidget(progressbar)
progressbar.show()