diff options
Diffstat (limited to 'examples/widgets/widgets.cpp')
-rw-r--r-- | examples/widgets/widgets.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/examples/widgets/widgets.cpp b/examples/widgets/widgets.cpp index e98a52b50..7f18818cc 100644 --- a/examples/widgets/widgets.cpp +++ b/examples/widgets/widgets.cpp @@ -177,7 +177,7 @@ WidgetView::WidgetView( TQWidget *parent, const char *name ) menuBar()->insertItem( "&File", popup ); int id; id = popup->insertItem( "&New" ); - popup->setItemEnabled( id, FALSE ); + popup->setItemEnabled( id, false ); id = popup->insertItem( openIcon, "&Open...", this, TQ_SLOT( open() ) ); popup->insertSeparator(); @@ -191,27 +191,27 @@ WidgetView::WidgetView( TQWidget *parent, const char *name ) popup->insertSeparator(); TQFont f = font(); - f.setBold( TRUE ); + f.setBold( true ); id = popup->insertItem( new MyMenuItem( "&Bold", f ) ); popup->setAccel( CTRL+Key_B, id ); f = font(); - f.setItalic( TRUE ); + f.setItalic( true ); id = popup->insertItem( new MyMenuItem( "&Italic", f ) ); - popup->setItemChecked( id, TRUE ); + popup->setItemChecked( id, true ); popup->setAccel( CTRL+Key_I, id ); f = font(); - f.setUnderline( TRUE ); + f.setUnderline( true ); id = popup->insertItem( new MyMenuItem( "&Underline", f ) ); popup->setAccel( CTRL+Key_U, id ); f = font(); - f.setStrikeOut( TRUE ); + f.setStrikeOut( true ); id = popup->insertItem( new MyMenuItem( "&Strike", f ) ); connect( textStylePopup, TQ_SIGNAL(activated(int)), this, TQ_SLOT(popupSelected(int)) ); // Create an analog and a digital clock AnalogClock *aclock = new AnalogClock( central ); - aclock->setAutoMask( TRUE ); + aclock->setAutoMask( true ); DigitalClock *dclock = new DigitalClock( central ); dclock->setMaximumWidth(200); grid->addWidget( aclock, 0, 2 ); @@ -298,7 +298,7 @@ WidgetView::WidgetView( TQWidget *parent, const char *name ) vbox->addSpacing( bg->fontMetrics().height() ); rb = new TQRadioButton( bg ); rb->setText( "&AM" ); - rb->setChecked( TRUE ); + rb->setChecked( true ); vbox->addWidget(rb); TQToolTip::add( rb, "radio button 1" ); rb = new TQRadioButton( bg ); @@ -344,7 +344,7 @@ WidgetView::WidgetView( TQWidget *parent, const char *name ) "The tick marks are optional." " This slider controls the speed of the movie." ); // Create a combo box - TQComboBox *combo = new TQComboBox( FALSE, central, "comboBox" ); + TQComboBox *combo = new TQComboBox( false, central, "comboBox" ); combo->insertItem( "darkBlue" ); combo->insertItem( "darkRed" ); combo->insertItem( "darkGreen" ); @@ -356,7 +356,7 @@ WidgetView::WidgetView( TQWidget *parent, const char *name ) TQToolTip::add( combo, "read-only combo box" ); // Create an editable combo box - TQComboBox *edCombo = new TQComboBox( TRUE, central, "edComboBox" ); + TQComboBox *edCombo = new TQComboBox( true, central, "edComboBox" ); TQListBox *edComboLst = new TQListBox(this); edCombo->setListBox(edComboLst); edComboLst->insertItem( "Permutable" ); @@ -369,7 +369,7 @@ WidgetView::WidgetView( TQWidget *parent, const char *name ) this, TQ_SLOT(edComboBoxItemActivated(const TQString&)) ); TQToolTip::add( edCombo, "editable combo box" ); - edCombo->setAutoCompletion( TRUE ); + edCombo->setAutoCompletion( true ); vbox = new TQVBoxLayout(8); grid->addLayout( vbox, 2, 2 ); @@ -450,7 +450,7 @@ WidgetView::WidgetView( TQWidget *parent, const char *name ) TQSplitter *split = new TQSplitter( Vertical, central, "splitter" ); - split->setOpaqueResize( TRUE ); + split->setOpaqueResize( true ); topLayout->addWidget( split, 1 ); TQListView *lv = new MyListView( split ); connect(lv, TQ_SIGNAL(selectionChanged() ), @@ -463,13 +463,13 @@ WidgetView::WidgetView( TQWidget *parent, const char *name ) this, TQ_SLOT( mySelectionChanged(TQListViewItem*) ) ); lv->addColumn( "One" ); lv->addColumn( "Two" ); - lv->setAllColumnsShowFocus( TRUE ); + lv->setAllColumnsShowFocus( true ); TQListViewItem *lvi= new TQListViewItem( lv, "Text", "Text" ); lvi= new TQListViewItem( lv, "Text", "Other Text" ); lvi= new TQListViewItem( lv, "Text", "More Text" ); lvi= new TQListViewItem( lv, "Text", "Extra Text" ); - lvi->setOpen(TRUE); + lvi->setOpen(true); (void)new TQListViewItem( lvi, "SubText", "Additional Text" ); lvi= new TQListViewItem( lvi, "SubText", "Side Text" ); lvi= new TQListViewItem( lvi, "SubSubText", "Complimentary Text" ); @@ -491,7 +491,7 @@ WidgetView::WidgetView( TQWidget *parent, const char *name ) TQCheckListItem *lit = new TQCheckListItem( lv, "Cheese" ); - lit->setOpen( TRUE ); + lit->setOpen( true ); (void) new TQCheckListItem( lit, "Cheddar", TQCheckListItem::RadioButton ); (void) new TQCheckListItem( lit, "Mozarella", TQCheckListItem::RadioButton ); (void) new TQCheckListItem( lit, "Jarlsberg", TQCheckListItem::RadioButton ); @@ -576,10 +576,10 @@ void WidgetView::popupSelected( int selectedId ) if ( selectedId == plainStyleID ) { for ( int i = 0; i < int(textStylePopup->count()); i++ ) { int id = textStylePopup->idAt( i ); - textStylePopup->setItemChecked( id, FALSE); + textStylePopup->setItemChecked( id, false); } } else { - textStylePopup->setItemChecked( selectedId, TRUE ); + textStylePopup->setItemChecked( selectedId, true ); } } @@ -679,7 +679,7 @@ void WidgetView::spinBoxValueChanged( const TQString& valueText ) bool WidgetView::eventFilter( TQObject *obj, TQEvent *event ) { - static bool identify_now = TRUE; + static bool identify_now = true; if ( event->type() == TQEvent::MouseButtonPress && identify_now ) { TQMouseEvent *e = (TQMouseEvent*)event; if ( e->button() == TQMouseEvent::RightButton && @@ -691,9 +691,9 @@ bool WidgetView::eventFilter( TQObject *obj, TQEvent *event ) str += obj->name(); else str += "<no name>"; - identify_now = FALSE; // don't do it in message box + identify_now = false; // don't do it in message box TQMessageBox::information( (TQWidget*)obj, "Identify Widget", str ); - identify_now = TRUE; // allow it again + identify_now = true; // allow it again } } return TQMainWindow::eventFilter( obj, event ); // don't eat event @@ -739,9 +739,9 @@ void WidgetView::showProperties() output.sprintf( "Properties for class '%s'", tqApp->focusWidget()->className() ); int i = 0; - while( i < (int) tqApp->focusWidget()->metaObject()->numProperties( TRUE ) ) { + while( i < (int) tqApp->focusWidget()->metaObject()->numProperties( true ) ) { const TQMetaProperty* p - = tqApp->focusWidget()->metaObject()->property( i, TRUE ); + = tqApp->focusWidget()->metaObject()->property( i, true ); TQCString tmp; tmp.sprintf( "\n %2d: %s (read-%s, %s)", ++i, p->name(), p->writable() ? "write" : "only", p->type() ); |