diff options
Diffstat (limited to 'examples3/cursor.py')
-rwxr-xr-x | examples3/cursor.py | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/examples3/cursor.py b/examples3/cursor.py index d5bbbe1..c9f42bc 100755 --- a/examples3/cursor.py +++ b/examples3/cursor.py @@ -4,7 +4,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. ** ***************************************************************************""" @@ -47,9 +47,9 @@ cm_bits = "\x00\x00\x00\x00\x00\xf8\x1f\x00\x00\xfe\x3f\x00" \ "\x00\xfe\x3f\x00\x00\xf8\x0f\x00" # The CursorView contains many labels with different cursors. -class CursorView( QWidget ): # cursor view +class CursorView( TQWidget ): # cursor view def __init__( self ): - QWidget.__init__( self ) + TQWidget.__init__( self ) # Constructs a cursor view. #enum CursorShape { ArrowCursor, UpArrowCursor, CrossCursor, WaitCursor, IbeamCursor, SizeVerCursor, SizeHorCursor, SizeBDiagCursor, SizeFDiagCursor, SizeAllCursor, BlankCursor, SplitVCursor, SplitHCursor, PointingHandCursor, ForbiddenCursor, WhatsThisCursor, LastCursor = WhatsThisCursor, BitmapCursor = 24 } @@ -74,37 +74,37 @@ class CursorView( QWidget ): # cursor view self.setCaption( "CursorView" ) # set window caption - grid = QGridLayout( self, 5, 4, 20 ) + grid = TQGridLayout( self, 5, 4, 20 ) i=0 for y in range( 0, 4, 1 ) : # create the small labels for x in range( 0, 4, 1 ) : - label = QLabel( self ) - label.setCursor( QCursor(i) ) + label = TQLabel( self ) + label.setCursor( TQCursor(i) ) label.setText( shape[i] ); label.setAlignment( self.AlignCenter ) - label.setFrameStyle( QFrame.Box | QFrame.Raised ) + label.setFrameStyle( TQFrame.Box | TQFrame.Raised ) grid.addWidget( label, x, y ) - QToolTip.add( label, name[i] ) + TQToolTip.add( label, name[i] ) i += 1 - cb = QBitmap( cb_width, cb_height, cb_bits, True ) - cm = QBitmap( cm_width, cm_height, cm_bits, True ) - custom = QCursor( cb, cm ) # create bitmap cursor + cb = TQBitmap( cb_width, cb_height, cb_bits, True ) + cm = TQBitmap( cm_width, cm_height, cm_bits, True ) + custom = TQCursor( cb, cm ) # create bitmap cursor - label = QLabel( self ) # create the big label + label = TQLabel( self ) # create the big label label.setCursor( custom ) label.setText( "Custom bitmap cursor" ) - QToolTip.add( label, "custom bitmap cursor" ) + TQToolTip.add( label, "custom bitmap cursor" ) label.setAlignment( self.AlignCenter ) - label.setFrameStyle( QFrame.Box | QFrame.Sunken ) + label.setFrameStyle( TQFrame.Box | TQFrame.Sunken ) grid.addMultiCellWidget( label, 4, 4, 0, 3 ) # Create and display a CursorView. def main( args ): - a = QApplication(sys.argv) # application object + a = TQApplication(sys.argv) # application object v = CursorView() # cursor view - v.setCaption( "Qt Example - Cursors" ) + v.setCaption( "TQt Example - Cursors" ) a.setMainWidget( v ) v.show() |