|
|
|
@ -21,7 +21,7 @@ class AnalogClock( TQWidget ):
|
|
|
|
|
TQWidget.__init__(*(self,) + args)
|
|
|
|
|
self.time = TQTime.currentTime() # get current time
|
|
|
|
|
internalTimer = TQTimer( self ) # create internal timer
|
|
|
|
|
self.connect( internalTimer, SIGNAL("timeout()"), self.timeout )
|
|
|
|
|
self.connect( internalTimer, TQ_SIGNAL("timeout()"), self.timeout )
|
|
|
|
|
internalTimer.start( 5000 ) # emit signal every 5 seconds
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
@ -160,7 +160,7 @@ class WidgetView ( TQWidget ):
|
|
|
|
|
self.id = self.popup.insertItem( "&Open" )
|
|
|
|
|
self.popup.setItemEnabled( self.id, FALSE )
|
|
|
|
|
self.popup.insertSeparator()
|
|
|
|
|
self.popup.insertItem( "&Quit", tqApp, SLOT("quit()"), TQt.CTRL+TQt.Key_Q )
|
|
|
|
|
self.popup.insertItem( "&Quit", tqApp, TQ_SLOT("quit()"), TQt.CTRL+TQt.Key_Q )
|
|
|
|
|
|
|
|
|
|
self.menubar.insertItem( "&File", self.popup )
|
|
|
|
|
|
|
|
|
@ -189,7 +189,7 @@ class WidgetView ( TQWidget ):
|
|
|
|
|
self.pb.setText( "Push button 1" )
|
|
|
|
|
self.pb.setFixedHeight( self.pb.sizeHint().height() )
|
|
|
|
|
self.grid.addWidget( self.pb, 0, 0, TQt.AlignVCenter )
|
|
|
|
|
self.connect( self.pb, SIGNAL("clicked()"), self.button1Clicked )
|
|
|
|
|
self.connect( self.pb, TQ_SIGNAL("clicked()"), self.button1Clicked )
|
|
|
|
|
TQToolTip.add( self.pb, "push button 1" )
|
|
|
|
|
self.pm = TQPixmap()
|
|
|
|
|
self.pix = self.pm.load( "tqt.png" ) # load pixmap for button 2
|
|
|
|
@ -239,7 +239,7 @@ class WidgetView ( TQWidget ):
|
|
|
|
|
self.bg.setMinimumSize( self.bg.childrenRect().size() )
|
|
|
|
|
self.vbox.activate()
|
|
|
|
|
|
|
|
|
|
self.connect( self.bg, SIGNAL("clicked(int)"), self.checkBoxClicked )
|
|
|
|
|
self.connect( self.bg, TQ_SIGNAL("clicked(int)"), self.checkBoxClicked )
|
|
|
|
|
|
|
|
|
|
TQToolTip.add( self.cb[0], "check box 1" )
|
|
|
|
|
TQToolTip.add( self.cb[1], "check box 2" )
|
|
|
|
@ -272,7 +272,7 @@ class WidgetView ( TQWidget ):
|
|
|
|
|
self.rb.setMinimumSize( self.rb.sizeHint() )
|
|
|
|
|
self.vbox.activate()
|
|
|
|
|
|
|
|
|
|
self.connect( self.bg, SIGNAL("clicked(int)"), self.radioButtonClicked )
|
|
|
|
|
self.connect( self.bg, TQ_SIGNAL("clicked(int)"), self.radioButtonClicked )
|
|
|
|
|
TQToolTip.add( self.rb, "radio button 3" )
|
|
|
|
|
|
|
|
|
|
# Create a list box
|
|
|
|
@ -286,7 +286,7 @@ class WidgetView ( TQWidget ):
|
|
|
|
|
self.lb.insertItem( txt )
|
|
|
|
|
|
|
|
|
|
self.grid.addMultiCellWidget( self.lb, 2, 4, 0, 0 )
|
|
|
|
|
self.connect( self.lb, SIGNAL("selected(int)"), self.listBoxItemSelected )
|
|
|
|
|
self.connect( self.lb, TQ_SIGNAL("selected(int)"), self.listBoxItemSelected )
|
|
|
|
|
TQToolTip.add( self.lb, "list box" )
|
|
|
|
|
|
|
|
|
|
self.vbox = TQVBoxLayout( 8 )
|
|
|
|
@ -300,7 +300,7 @@ class WidgetView ( TQWidget ):
|
|
|
|
|
self.sb.setFixedHeight( self.sb.sizeHint().height() )
|
|
|
|
|
self.vbox.addWidget( self.sb )
|
|
|
|
|
|
|
|
|
|
self.connect( self.sb, SIGNAL("valueChanged(int)"), self.sliderValueChanged )
|
|
|
|
|
self.connect( self.sb, TQ_SIGNAL("valueChanged(int)"), self.sliderValueChanged )
|
|
|
|
|
TQToolTip.add( self.sb, "slider" )
|
|
|
|
|
|
|
|
|
|
# Create a combo box
|
|
|
|
@ -312,7 +312,7 @@ class WidgetView ( TQWidget ):
|
|
|
|
|
self.combo.insertItem( "red" )
|
|
|
|
|
self.combo.setFixedHeight( self.combo.sizeHint().height() )
|
|
|
|
|
self.vbox.addWidget( self.combo )
|
|
|
|
|
self.connect( self.combo, SIGNAL("activated(int)"), self.comboBoxItemActivated )
|
|
|
|
|
self.connect( self.combo, TQ_SIGNAL("activated(int)"), self.comboBoxItemActivated )
|
|
|
|
|
TQToolTip.add( self.combo, "read-only combo box" )
|
|
|
|
|
|
|
|
|
|
# Create an editable combo box
|
|
|
|
@ -324,7 +324,7 @@ class WidgetView ( TQWidget ):
|
|
|
|
|
self.edCombo.insertItem( "Inconstant" )
|
|
|
|
|
self.edCombo.setFixedHeight( self.edCombo.sizeHint().height() )
|
|
|
|
|
self.vbox.addWidget( self.edCombo )
|
|
|
|
|
self.connect( self.edCombo, SIGNAL("activated(const TQString &)"), self.edComboBoxItemActivated)
|
|
|
|
|
self.connect( self.edCombo, TQ_SIGNAL("activated(const TQString &)"), self.edComboBoxItemActivated)
|
|
|
|
|
TQToolTip.add( self.edCombo, "editable combo box" )
|
|
|
|
|
|
|
|
|
|
self.edCombo.setAutoCompletion( TRUE )
|
|
|
|
@ -339,7 +339,7 @@ class WidgetView ( TQWidget ):
|
|
|
|
|
self.spin.setSuffix( " mm" )
|
|
|
|
|
self.spin.setSpecialValueText( "Auto" )
|
|
|
|
|
self.spin.setMinimumSize( self.spin.sizeHint() )
|
|
|
|
|
self.connect( self.spin, SIGNAL( "valueChanged(const TQString &)" ), self.spinBoxValueChanged )
|
|
|
|
|
self.connect( self.spin, TQ_SIGNAL( "valueChanged(const TQString &)" ), self.spinBoxValueChanged )
|
|
|
|
|
TQToolTip.add( self.spin, "spin box" )
|
|
|
|
|
self.vbox.addWidget( self.spin )
|
|
|
|
|
|
|
|
|
@ -359,7 +359,7 @@ class WidgetView ( TQWidget ):
|
|
|
|
|
self.le = TQLineEdit( self, "lineEdit" )
|
|
|
|
|
self.grid.addMultiCellWidget( self.le, 4, 4, 1, 2 )
|
|
|
|
|
self.le.setFixedHeight( self.le.sizeHint().height() )
|
|
|
|
|
self.connect( self.le, SIGNAL("textChanged(const TQString &)"), self.lineEditTextChanged )
|
|
|
|
|
self.connect( self.le, TQ_SIGNAL("textChanged(const TQString &)"), self.lineEditTextChanged )
|
|
|
|
|
TQToolTip.add( self.le, "single line editor" )
|
|
|
|
|
|
|
|
|
|
# Create a horizontal line (sort of TQFrame) above the message line
|
|
|
|
|