diff options
Diffstat (limited to 'examples/demo')
28 files changed, 194 insertions, 197 deletions
diff --git a/examples/demo/display.cpp b/examples/demo/display.cpp index 52b2d220d..935dfef7a 100644 --- a/examples/demo/display.cpp +++ b/examples/demo/display.cpp @@ -156,7 +156,7 @@ DisplayWidget::DisplayWidget( TQWidget *parent, const char *name ) TQHBoxLayout *hbox = new TQHBoxLayout( vbox ); screen = new Screen( this ); dial = new TQDial( this ); - dial->setNotchesVisible( TRUE ); + dial->setNotchesVisible( true ); dial->setRange( -10, 10 ); dial->setValue( 1 ); screen->setStep( dial->value() ); diff --git a/examples/demo/dnd/dnd.cpp b/examples/demo/dnd/dnd.cpp index bf5ddd0f1..6dbc90c01 100644 --- a/examples/demo/dnd/dnd.cpp +++ b/examples/demo/dnd/dnd.cpp @@ -91,7 +91,7 @@ DnDDemo::DnDDemo( TQWidget* parent, const char* name ) IconItem item = it.data(); TQIconViewItem *iitem = new IconViewItem( iconView, item.name(), *item.pixmap(), it.key() ); - iitem->setRenameEnabled( TRUE ); + iitem->setRenameEnabled( true ); TQListViewItem *litem = new ListViewItem( listView, item.name(), it.key() ); litem->setPixmap( 0, *item.pixmap() ); } diff --git a/examples/demo/dnd/iconview.cpp b/examples/demo/dnd/iconview.cpp index 51bfff304..fc294f197 100644 --- a/examples/demo/dnd/iconview.cpp +++ b/examples/demo/dnd/iconview.cpp @@ -36,7 +36,7 @@ void IconView::slotNewItem( TQDropEvent *e, const TQValueList<TQIconDragItem>& ) if ( TQTextDrag::decode( e, tag ) ) { IconItem item = ((DnDDemo*) parentWidget())->findItem( tag ); IconViewItem *iitem = new IconViewItem( this, item.name(), *item.pixmap(), tag ); - iitem->setRenameEnabled( TRUE ); + iitem->setRenameEnabled( true ); } e->acceptAction(); } diff --git a/examples/demo/dnd/listview.cpp b/examples/demo/dnd/listview.cpp index 6b66d242e..3ec29140d 100644 --- a/examples/demo/dnd/listview.cpp +++ b/examples/demo/dnd/listview.cpp @@ -6,9 +6,9 @@ ListView::ListView( TQWidget* parent, const char* name ) : TQListView( parent, name ) { - setAcceptDrops( TRUE ); - setSorting( -1, FALSE ); - dragging = FALSE; + setAcceptDrops( true ); + setSorting( -1, false ); + dragging = false; } ListView::~ListView() @@ -40,7 +40,7 @@ void ListView::dropEvent( TQDropEvent *e ) void ListView::contentsMousePressEvent( TQMouseEvent *e ) { TQListView::contentsMousePressEvent( e ); - dragging = TRUE; + dragging = true; pressPos = e->pos(); } @@ -60,13 +60,13 @@ void ListView::contentsMouseMoveEvent( TQMouseEvent *e ) drg->setPixmap(*p); drg->setSubtype( "dragdemotag" ); drg->dragCopy(); - dragging = FALSE; + dragging = false; } } void ListView::contentsMouseReleaseEvent( TQMouseEvent *e ) { TQListView::contentsMouseReleaseEvent( e ); - dragging = FALSE; + dragging = false; } diff --git a/examples/demo/dnd/styledbutton.cpp b/examples/demo/dnd/styledbutton.cpp index 532c66cca..a7cd10664 100644 --- a/examples/demo/dnd/styledbutton.cpp +++ b/examples/demo/dnd/styledbutton.cpp @@ -44,10 +44,10 @@ #include <tqstyle.h> StyledButton::StyledButton(TQWidget* parent, const char* name) - : TQButton( parent, name ), pix( 0 ), spix( 0 ), edit( ColorEditor ), s( 0 ), mousePressed( FALSE ) + : TQButton( parent, name ), pix( 0 ), spix( 0 ), edit( ColorEditor ), s( 0 ), mousePressed( false ) { setMinimumSize( minimumSizeHint() ); - setAcceptDrops( TRUE ); + setAcceptDrops( true ); connect( this, TQ_SIGNAL(clicked()), TQ_SLOT(onEditor())); } @@ -222,7 +222,7 @@ void StyledButton::onEditor() void StyledButton::mousePressEvent(TQMouseEvent* e) { TQButton::mousePressEvent(e); - mousePressed = TRUE; + mousePressed = true; pressPos = e->pos(); } @@ -241,7 +241,7 @@ void StyledButton::mouseMoveEvent(TQMouseEvent* e) p.drawRect( 0, 0, pix.width(), pix.height() ); p.end(); drg->setPixmap( pix ); - mousePressed = FALSE; + mousePressed = false; drg->dragCopy(); } else if ( edit == PixmapEditor && pix && !pix->isNull() ) { @@ -249,7 +249,7 @@ void StyledButton::mouseMoveEvent(TQMouseEvent* e) TQImageDrag *drg = new TQImageDrag( img, this ); if(spix) drg->setPixmap( *spix ); - mousePressed = FALSE; + mousePressed = false; drg->dragCopy(); } } diff --git a/examples/demo/frame.cpp b/examples/demo/frame.cpp index 2c4105330..da87f184a 100644 --- a/examples/demo/frame.cpp +++ b/examples/demo/frame.cpp @@ -38,16 +38,16 @@ Frame::Frame( TQWidget *parent, const char *name ) TQAccel::stringToKey( tr( "Ctrl+Q" ) ) ); TQPopupMenu *styleMenu = new TQPopupMenu( this, "style" ); - styleMenu->setCheckable( TRUE ); + styleMenu->setCheckable( true ); TQActionGroup *ag = new TQActionGroup( this, 0 ); - ag->setExclusive( TRUE ); + ag->setExclusive( true ); TQSignalMapper *styleMapper = new TQSignalMapper( this ); connect( styleMapper, TQ_SIGNAL( mapped( const TQString& ) ), this, TQ_SLOT( setStyle( const TQString& ) ) ); TQStringList list = TQStyleFactory::keys(); list.sort(); - TQDict<int> stylesDict( 17, FALSE ); + TQDict<int> stylesDict( 17, false ); for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { TQString style = *it; TQString styleAccel = style; @@ -82,11 +82,11 @@ void Frame::setCategories( const TQPtrList<CategoryInterface> &l ) { categories = l; TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this ); - dw->setResizeEnabled( TRUE ); - dw->setVerticalStretchable( TRUE ); + dw->setResizeEnabled( true ); + dw->setVerticalStretchable( true ); addDockWindow( dw, DockLeft ); - setDockEnabled( dw, DockTop, FALSE ); - setDockEnabled( dw, DockBottom, FALSE ); + setDockEnabled( dw, DockTop, false ); + setDockEnabled( dw, DockBottom, false ); dw->setCloseMode( TQDockWindow::Always ); toolBox = new TQToolBox( dw ); @@ -113,9 +113,9 @@ TQWidget *Frame::createCategoryPage( CategoryInterface *c ) b->setBackgroundMode(PaletteBase); b->setTextLabel( c->categoryName( i ) ); b->setIconSet( c->categoryIcon( i ) ); - b->setAutoRaise( TRUE ); + b->setAutoRaise( true ); b->setTextPosition( TQToolButton::Right ); - b->setUsesTextLabel( TRUE ); + b->setUsesTextLabel( true ); g->insert( b, i + c->categoryOffset() ); connect( g, TQ_SIGNAL( clicked( int ) ), c, TQ_SLOT( setCurrentCategory( int ) ) ); } diff --git a/examples/demo/graph.cpp b/examples/demo/graph.cpp index ddb5a9364..a228cbaf7 100644 --- a/examples/demo/graph.cpp +++ b/examples/demo/graph.cpp @@ -259,7 +259,7 @@ public: BouncyText::BouncyText( const TQString& text, TQFont f, TQCanvas* canvas) : TQCanvasText(text, f, canvas) { - setAnimated(TRUE); + setAnimated(true); initPos(); } @@ -421,7 +421,7 @@ void FigureEditor::initialize() NodeItem *prev = 0; for ( int c = 0; c < cols; c++ ) { NodeItem *ni = new NodeItem( graph ); - ni->setAnimated( TRUE ); + ni->setAnimated( true ); nodecount++; ni->move(rand()%(graph->canvas->width()-ni->width()),rand()%(graph->canvas->height()-ni->height())); diff --git a/examples/demo/i18n/i18n.cpp b/examples/demo/i18n/i18n.cpp index b9ed9da7e..1e7ca80ab 100644 --- a/examples/demo/i18n/i18n.cpp +++ b/examples/demo/i18n/i18n.cpp @@ -19,7 +19,7 @@ static int windowIdNumber = 5000; -static bool firstShow = TRUE; +static bool firstShow = true; I18nDemo::I18nDemo(TQWidget *parent, const char *name) @@ -88,7 +88,7 @@ void I18nDemo::initMenuBar() windowMenu = new TQPopupMenu(this); connect(windowMenu, TQ_SIGNAL(activated(int)), TQ_SLOT(windowSlot(int))); - windowMenu->setCheckable(TRUE); + windowMenu->setCheckable(true); actionClose->addTo(windowMenu); actionCloseAll->addTo(windowMenu); @@ -145,7 +145,7 @@ void I18nDemo::newSlot(int id) wrapper->show(); windowMenu->insertItem(wrapper->caption(), wrapper->id); - windowMenu->setItemChecked(wrapper->id, TRUE); + windowMenu->setItemChecked(wrapper->id, true); lastwrapper = wrapper; windowIdNumber++; @@ -174,7 +174,7 @@ void I18nDemo::windowActivated(TQWidget *w) { if (lastwrapper) { tqApp->removeTranslator(&lastwrapper->translator); - windowMenu->setItemChecked(lastwrapper->id, FALSE); + windowMenu->setItemChecked(lastwrapper->id, false); } if (! w) { @@ -184,7 +184,7 @@ void I18nDemo::windowActivated(TQWidget *w) Wrapper *wrapper = (Wrapper *) w; - windowMenu->setItemChecked(wrapper->id, TRUE); + windowMenu->setItemChecked(wrapper->id, true); lastwrapper = wrapper; } @@ -200,7 +200,7 @@ void I18nDemo::closeAllSlot() { TQWidget *w; while ((w = workspace->activeWindow())) - w->close(TRUE); + w->close(true); } @@ -233,7 +233,7 @@ void I18nDemo::showEvent(TQShowEvent *) { if (firstShow) { newSlot(1); - firstShow = FALSE; + firstShow = false; return; } diff --git a/examples/demo/main.cpp b/examples/demo/main.cpp index 381e44aae..dc015865d 100644 --- a/examples/demo/main.cpp +++ b/examples/demo/main.cpp @@ -70,7 +70,7 @@ static void qdemo_set_caption( CategoryInterface *c, int i ) class WidgetCategory : public CategoryInterface { public: - WidgetCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( FALSE ) {} + WidgetCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( false ) {} TQString name() const { return "Widgets"; } TQIconSet icon() const { return TQPixmap( widgeticon ); } @@ -95,7 +95,7 @@ public: void create() { if ( created ) return; - created = TRUE; + created = true; stack->addWidget( new WidgetsBase( stack ), categoryOffset() + 0 ); stack->addWidget( new DnDDemo( stack ), categoryOffset() + 1 ); } @@ -111,7 +111,7 @@ private: class DatabaseCategory : public CategoryInterface { public: - DatabaseCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( FALSE ) {} + DatabaseCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( false ) {} TQString name() const { return "Database"; } TQIconSet icon() const { return TQPixmap( dbicon ); } @@ -133,7 +133,7 @@ public: void create() { if ( created ) return; - created = TRUE; + created = true; stack->addWidget( new SqlEx( stack ), categoryOffset() + 0 ); } @@ -149,7 +149,7 @@ private: class CanvasCategory : public CategoryInterface { public: - CanvasCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( FALSE ) {} + CanvasCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( false ) {} TQString name() const { return "2D Graphics"; } TQIconSet icon() const { return TQPixmap( twodicon ); } @@ -174,7 +174,7 @@ public: void create() { if ( created ) return; - created = TRUE; + created = true; stack->addWidget( new GraphWidget( stack ), categoryOffset() + 0 ); stack->addWidget( new DisplayWidget( stack ), categoryOffset() + 1 ); } @@ -191,7 +191,7 @@ private: class OpenGLCategory : public CategoryInterface { public: - OpenGLCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( FALSE ) {} + OpenGLCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( false ) {} TQString name() const { return "3D Graphics"; } TQIconSet icon() const { return TQPixmap( threedicon ); } @@ -219,7 +219,7 @@ public: void create() { if ( created ) return; - created = TRUE; + created = true; stack->addWidget( new GLWorkspace( stack ), categoryOffset() + 0 ); stack->addWidget( new GLLandscapeViewer( stack ), categoryOffset() + 1 ); stack->addWidget( new GLInfoText( stack ), categoryOffset() + 2 ); @@ -235,7 +235,7 @@ private: class TextCategory : public CategoryInterface { public: - TextCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( FALSE ) {} + TextCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( false ) {} TQString name() const { return "Text Drawing/Editing"; } TQIconSet icon() const { return TQPixmap( texticon ); } @@ -260,7 +260,7 @@ public: void create() { if ( created ) return; - created = TRUE; + created = true; TextEdit *te = new TextEdit( stack ); te->load( "textdrawing/example.html" ); stack->addWidget( te, categoryOffset() + 0 ); @@ -278,7 +278,7 @@ private: class I18NCategory : public CategoryInterface { public: - I18NCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( FALSE ) {} + I18NCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( false ) {} TQString name() const { return "Internationalization"; } TQIconSet icon() const { return TQPixmap( internicon ); } @@ -300,7 +300,7 @@ public: void create() { if ( created ) return; - created = TRUE; + created = true; stack->addWidget( new I18nDemo( stack ), categoryOffset() + 0 ); } int categoryOffset() const { return 100000; } @@ -314,7 +314,7 @@ private: class GameCategory : public CategoryInterface { public: - GameCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( FALSE ) {} + GameCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( false ) {} TQString name() const { return "Game"; } TQIconSet icon() const { return TQPixmap( joyicon ); } @@ -336,7 +336,7 @@ public: void create() { if ( created ) return; - created = TRUE; + created = true; stack->addWidget( new KAstTopLevel( stack ), categoryOffset() + 0 ); } int categoryOffset() const { return 1000000; } diff --git a/examples/demo/opengl/fbm.h b/examples/demo/opengl/fbm.h index 474cd3c2d..423e44c5c 100644 --- a/examples/demo/opengl/fbm.h +++ b/examples/demo/opengl/fbm.h @@ -17,9 +17,6 @@ extern "C" { #endif -#define TRUE 1 -#define FALSE 0 - typedef struct { double x; double y; diff --git a/examples/demo/opengl/glbox.cpp b/examples/demo/opengl/glbox.cpp index f065888b5..5250d49e4 100644 --- a/examples/demo/opengl/glbox.cpp +++ b/examples/demo/opengl/glbox.cpp @@ -68,7 +68,7 @@ void GLBox::paintGL() glVertex3f( 0.98, 0.98, 0.98 ); } glEnd(); - renderText( 1.0, 1.0, 1.0, "Wirebox", TQFont( "helvetica", 12, TQFont::Bold, TRUE ) ); + renderText( 1.0, 1.0, 1.0, "Wirebox", TQFont( "helvetica", 12, TQFont::Bold, true ) ); } diff --git a/examples/demo/opengl/glcontrolwidget.cpp b/examples/demo/opengl/glcontrolwidget.cpp index 33f3bafda..8da48258a 100644 --- a/examples/demo/opengl/glcontrolwidget.cpp +++ b/examples/demo/opengl/glcontrolwidget.cpp @@ -7,7 +7,7 @@ GLControlWidget::GLControlWidget( TQWidget *parent, const char *name, TQGLWidget *share, WFlags f ) : TQGLWidget( parent, name, share, f ), - xRot(0),yRot(0),zRot(0),xTrans(0),yTrans(0),zTrans(-10.0),scale(5.0), animation(TRUE), wasAnimated(FALSE), delay( 50 ) + xRot(0),yRot(0),zRot(0),xTrans(0),yTrans(0),zTrans(-10.0),scale(5.0), animation(true), wasAnimated(false), delay( 50 ) { setCursor( pointingHandCursor ); timer = new TQTimer( this ); @@ -189,7 +189,7 @@ void GLControlWidget::setAnimationDelay( int ms ) timer->stop(); delay = ms; if ( animation ) { - wasAnimated = TRUE; + wasAnimated = true; timer->start( delay ); } } diff --git a/examples/demo/opengl/glgear.cpp b/examples/demo/opengl/glgear.cpp index 07c5f3694..6f3d4f0e7 100644 --- a/examples/demo/opengl/glgear.cpp +++ b/examples/demo/opengl/glgear.cpp @@ -258,7 +258,7 @@ void GLGear::paintGL() glVertex3f( 2.98, 2.98, 2.98 ); } glEnd(); - renderText( 3.0, 3.0, 3.0, "Gears", TQFont( "helvetica", 12, TQFont::Bold, TRUE ) ); + renderText( 3.0, 3.0, 3.0, "Gears", TQFont( "helvetica", 12, TQFont::Bold, true ) ); glPopMatrix(); glPopAttrib(); } diff --git a/examples/demo/opengl/gllandscape.cpp b/examples/demo/opengl/gllandscape.cpp index 1de9102b0..612f8c264 100644 --- a/examples/demo/opengl/gllandscape.cpp +++ b/examples/demo/opengl/gllandscape.cpp @@ -18,8 +18,8 @@ GLLandscape::GLLandscape( TQWidget * parent, const char * name ) : TQGLWidget( parent, name ) { - mouseButtonDown = FALSE; - animationRunning = FALSE; + mouseButtonDown = false; + animationRunning = false; oldX = oldY = oldZ = 0.0; landscape = 0; vertexNormals = 0; @@ -308,7 +308,7 @@ void GLLandscape::createGrid( int size ) size++; gridSize = size; gridHalf = gridSize / 2; - initFractals = TRUE; + initFractals = true; landscape = new double*[gridSize]; normals = new gridNormals*[gridSize]; vertexNormals = new avgNormals*[gridSize]; @@ -425,7 +425,7 @@ void GLLandscape::fractalize() p.x = p.y = p.z = 0; // Initialise fbm routine if ( initFractals ) { - initFractals = FALSE; + initFractals = false; value = fBm( p, roughness, 2.0, 8.0, 1 ); } @@ -650,13 +650,13 @@ void GLLandscape::setLandscape( int state ) void GLLandscape::mousePressEvent( TQMouseEvent *e ) { oldPos = e->pos(); - mouseButtonDown = TRUE; + mouseButtonDown = true; } void GLLandscape::mouseReleaseEvent( TQMouseEvent *e ) { oldPos = e->pos(); - mouseButtonDown = FALSE; + mouseButtonDown = false; } void GLLandscape::mouseMoveEvent( TQMouseEvent *e ) @@ -742,10 +742,10 @@ void GLLandscape::toggleWaveAnimation( bool state ) { if (state) { animTimer = startTimer(20); - animationRunning = TRUE; + animationRunning = true; } else { killTimer(animTimer); - animationRunning = FALSE; + animationRunning = false; } } diff --git a/examples/demo/opengl/gltexobj.cpp b/examples/demo/opengl/gltexobj.cpp index 183940b42..77b1301db 100644 --- a/examples/demo/opengl/gltexobj.cpp +++ b/examples/demo/opengl/gltexobj.cpp @@ -63,7 +63,7 @@ void GLTexobj::paintGL() glVertex3f( 0.98f, 0.98f, 0.98f ); } glEnd(); - renderText( 1.0, 1.0, 1.0, "Can", TQFont( "helvetica", 12, TQFont::Bold, TRUE ) ); + renderText( 1.0, 1.0, 1.0, "Can", TQFont( "helvetica", 12, TQFont::Bold, true ) ); glPopAttrib(); glPopMatrix(); } diff --git a/examples/demo/opengl/glworkspace.cpp b/examples/demo/opengl/glworkspace.cpp index 32c491be6..04db7c4b5 100644 --- a/examples/demo/opengl/glworkspace.cpp +++ b/examples/demo/opengl/glworkspace.cpp @@ -46,8 +46,8 @@ void GLWorkspace::setupSceneActions() TQActionGroup *newGroup = new TQActionGroup( this ); newGroup->setMenuText( tr( "&New" ) ); newGroup->setText( tr( "New" ) ); - newGroup->setUsesDropDown( TRUE ); - newGroup->setExclusive( FALSE ); + newGroup->setUsesDropDown( true ); + newGroup->setExclusive( false ); newGroup->setIconSet( TQPixmap( "textdrawing/filenew.png" ) ); a = new TQAction( tr( "Wirebox" ), TQPixmap( "opengl/wirebox.xpm" ), tr( "&Wirebox" ), 0, newGroup ); connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( newWirebox() ) ); @@ -64,8 +64,8 @@ void GLWorkspace::setupSceneActions() TQActionGroup *printGroup = new TQActionGroup( this ); printGroup->setMenuText( tr( "&Print" ) ); printGroup->setText( tr( "Print" ) ); - printGroup->setUsesDropDown( TRUE ); - printGroup->setExclusive( FALSE ); + printGroup->setUsesDropDown( true ); + printGroup->setExclusive( false ); printGroup->setIconSet( TQPixmap( "textdrawing/print.png" ) ); TQAction *da = new TQAction( tr( "Window Size" ), TQPixmap( "textdrawing/print.png" ), tr( "&Window Size" ), CTRL + Key_P, printGroup ); connect( da, TQ_SIGNAL( activated() ), this, TQ_SLOT( filePrintWindowRes() ) ); @@ -148,10 +148,10 @@ void GLWorkspace::filePrint( int x, int y ) img.invertPixels(); } if ( view.checkMirror->isChecked() ) { - img = img.mirror( TRUE, FALSE ); + img = img.mirror( true, false ); } if ( view.checkFlip->isChecked() ) { - img = img.mirror( FALSE, TRUE ); + img = img.mirror( false, true ); } if ( view.checkLeft->isEnabled() && view.checkLeft->isChecked() ) { } @@ -196,13 +196,13 @@ bool GLWorkspace::filePrintSetup() if ( !printer ) printer = new TQPrinter; if ( printer->setup() ) { - return TRUE; + return true; } else { if ( newPrinter ) { delete printer; printer = 0; } - return FALSE; + return false; } } diff --git a/examples/demo/opengl/printpreview.ui.h b/examples/demo/opengl/printpreview.ui.h index 6f7b9dae7..87ffdb46f 100644 --- a/examples/demo/opengl/printpreview.ui.h +++ b/examples/demo/opengl/printpreview.ui.h @@ -24,10 +24,10 @@ void PrintPreview::updatePreview() img.invertPixels(); } if ( checkMirror->isChecked() ) { - img = img.mirror( TRUE, FALSE ); + img = img.mirror( true, false ); } if ( checkFlip->isChecked() ) { - img = img.mirror( FALSE, TRUE ); + img = img.mirror( false, true ); } if ( checkLeft->isEnabled() && checkLeft->isChecked() ) { } diff --git a/examples/demo/qasteroids/ledmeter.cpp b/examples/demo/qasteroids/ledmeter.cpp index a1cfb70d1..fc2cb0013 100644 --- a/examples/demo/qasteroids/ledmeter.cpp +++ b/examples/demo/qasteroids/ledmeter.cpp @@ -9,7 +9,7 @@ KALedMeter::KALedMeter( TQWidget *parent ) : TQFrame( parent ) { - mCRanges.setAutoDelete( TRUE ); + mCRanges.setAutoDelete( true ); mRange = 100; mCount = 20; mCurrentCount = 0; diff --git a/examples/demo/qasteroids/toplevel.cpp b/examples/demo/qasteroids/toplevel.cpp index ca6db89ef..0822191f5 100644 --- a/examples/demo/qasteroids/toplevel.cpp +++ b/examples/demo/qasteroids/toplevel.cpp @@ -234,7 +234,7 @@ KAstTopLevel::KAstTopLevel( TQWidget *parent, const char *name ) hbd->addWidget( powerMeter ); shipsRemain = 3; - showHiscores = FALSE; + showHiscores = false; actions.insert( TQt::Key_Up, Thrust ); actions.insert( TQt::Key_Left, RotateLeft ); @@ -271,31 +271,31 @@ void KAstTopLevel::keyPressEvent( TQKeyEvent *event ) switch ( a ) { case RotateLeft: - view->rotateLeft( TRUE ); + view->rotateLeft( true ); break; case RotateRight: - view->rotateRight( TRUE ); + view->rotateRight( true ); break; case Thrust: - view->thrust( TRUE ); + view->thrust( true ); break; case Shoot: - view->shoot( TRUE ); + view->shoot( true ); break; case Shield: - view->setShield( TRUE ); + view->setShield( true ); break; case Teleport: - view->teleport( TRUE ); + view->teleport( true ); break; case Brake: - view->brake( TRUE ); + view->brake( true ); break; default: @@ -318,38 +318,38 @@ void KAstTopLevel::keyReleaseEvent( TQKeyEvent *event ) switch ( a ) { case RotateLeft: - view->rotateLeft( FALSE ); + view->rotateLeft( false ); break; case RotateRight: - view->rotateRight( FALSE ); + view->rotateRight( false ); break; case Thrust: - view->thrust( FALSE ); + view->thrust( false ); break; case Shoot: - view->shoot( FALSE ); + view->shoot( false ); break; case Brake: - view->brake( FALSE ); + view->brake( false ); break; case Shield: - view->setShield( FALSE ); + view->setShield( false ); break; case Teleport: - view->teleport( FALSE ); + view->teleport( false ); break; case Launch: if ( waitShip ) { view->newShip(); - waitShip = FALSE; + waitShip = false; view->hideText(); } else @@ -365,11 +365,11 @@ void KAstTopLevel::keyReleaseEvent( TQKeyEvent *event ) /* case Pause: { - view->pause( TRUE ); + view->pause( true ); TQMessageBox::information( this, tr("KAsteroids is paused"), tr("Paused") ); - view->pause( FALSE ); + view->pause( false ); } break; */ @@ -384,14 +384,14 @@ void KAstTopLevel::keyReleaseEvent( TQKeyEvent *event ) void KAstTopLevel::showEvent( TQShowEvent *e ) { TQMainWindow::showEvent( e ); - view->pause( FALSE ); + view->pause( false ); view->setFocus(); } void KAstTopLevel::hideEvent( TQHideEvent *e ) { TQMainWindow::hideEvent( e ); - view->pause( TRUE ); + view->pause( true ); } void KAstTopLevel::slotNewGame() @@ -407,9 +407,9 @@ void KAstTopLevel::slotNewGame() view->addRocks( levels[0].nrocks ); // view->showText( tr( "Press L to launch." ), yellow ); view->newShip(); - waitShip = FALSE; + waitShip = false; view->hideText(); - isPaused = FALSE; + isPaused = false; } void KAstTopLevel::slotShipKilled() @@ -421,7 +421,7 @@ void KAstTopLevel::slotShipKilled() if ( shipsRemain ) { - waitShip = TRUE; + waitShip = true; view->showText( tr( "Ship Destroyed. Press L to launch."), yellow ); } else @@ -481,7 +481,7 @@ void KAstTopLevel::doStats() .arg(r); */ - view->showText( "Game Over. Press N for a new game.", yellow, FALSE ); + view->showText( "Game Over. Press N for a new game.", yellow, false ); } void KAstTopLevel::slotUpdateVitals() diff --git a/examples/demo/qasteroids/view.cpp b/examples/demo/qasteroids/view.cpp index e0ee429af..b96b47384 100644 --- a/examples/demo/qasteroids/view.cpp +++ b/examples/demo/qasteroids/view.cpp @@ -72,11 +72,11 @@ KAsteroidsView::KAsteroidsView( TQWidget *parent, const char *name ) view.setVScrollBarMode( TQScrollView::AlwaysOff ); view.setHScrollBarMode( TQScrollView::AlwaysOff ); view.viewport()->setFocusProxy( this ); - rocks.setAutoDelete( TRUE ); - missiles.setAutoDelete( TRUE ); - bits.setAutoDelete( TRUE ); - powerups.setAutoDelete( TRUE ); - exhaust.setAutoDelete( TRUE ); + rocks.setAutoDelete( true ); + missiles.setAutoDelete( true ); + bits.setAutoDelete( true ); + powerups.setAutoDelete( true ); + exhaust.setAutoDelete( true ); field.setBackgroundColor( black ); TQPixmap pm( IMG_BACKGROUND ); @@ -87,7 +87,7 @@ KAsteroidsView::KAsteroidsView( TQWidget *parent, const char *name ) textSprite->setFont( font ); shield = 0; - shieldOn = FALSE; + shieldOn = false; refreshRate = REFRESH_DELAY; initialized = readSprites(); @@ -97,10 +97,10 @@ KAsteroidsView::KAsteroidsView( TQWidget *parent, const char *name ) mTimerId = -1; shipPower = MAX_POWER_LEVEL; - vitalsChanged = TRUE; - can_destroy_powerups = FALSE; + vitalsChanged = true; + can_destroy_powerups = false; - mPaused = TRUE; + mPaused = true; if ( !initialized ) { textSprite->setText( tr("Error: Cannot read sprite images") ); @@ -135,7 +135,7 @@ void KAsteroidsView::reset() rockSpeed = 1.0; powerupSpeed = 1.0; mFrameNum = 0; - mPaused = FALSE; + mPaused = false; ship->hide(); shield->hide(); @@ -156,7 +156,7 @@ void KAsteroidsView::newGame() if ( shieldOn ) { shield->hide(); - shieldOn = FALSE; + shieldOn = false; } reset(); if ( mTimerId < 0 ) @@ -196,13 +196,13 @@ void KAsteroidsView::newShip() shipDx = 0; shipDy = 0; shipAngle = 0; - rotateL = FALSE; - rotateR = FALSE; - thrustShip = FALSE; - shootShip = FALSE; - brakeShip = FALSE; - teleportShip = FALSE; - shieldOn = TRUE; + rotateL = false; + rotateR = false; + thrustShip = false; + shootShip = false; + brakeShip = false; + teleportShip = false; + shieldOn = true; shootDelay = 0; shipPower = MAX_POWER_LEVEL; rotateRate = ROTATE_RATE; @@ -215,7 +215,7 @@ void KAsteroidsView::newShip() ship->show(); shield->show(); mShieldCount = 1; // just in case the ship appears on a rock. - shieldTimer->start( 1000, TRUE ); + shieldTimer->start( 1000, true ); } void KAsteroidsView::setShield( bool s ) @@ -238,9 +238,9 @@ void KAsteroidsView::brake( bool b ) { if ( brakeShip && !b ) { - rotateL = FALSE; - rotateR = FALSE; - thrustShip = FALSE; + rotateL = false; + rotateR = false; + thrustShip = false; rotateRate = ROTATE_RATE; } @@ -261,7 +261,7 @@ bool KAsteroidsView::readSprites() new TQCanvasPixmapArray( sprites_prefix + kas_animations[i].path, kas_animations[i].frames ); if ( !anim->isValid() ) - return FALSE; + return false; animation.insert( kas_animations[i].id, anim ); i++; } @@ -402,7 +402,7 @@ void KAsteroidsView::timerEvent( TQTimerEvent * ) if ( vitalsChanged && !(mFrameNum % 10) ) { emit updateVitals(); - vitalsChanged = FALSE; + vitalsChanged = false; } mFrameNum++; @@ -521,14 +521,14 @@ void KAsteroidsView::reducePower( int val ) if ( shipPower <= 0 ) { shipPower = 0; - thrustShip = FALSE; + thrustShip = false; if ( shieldOn ) { - shieldOn = FALSE; + shieldOn = false; shield->hide(); } } - vitalsChanged = TRUE; + vitalsChanged = true; } void KAsteroidsView::addExhaust( double x, double y, double dx, @@ -565,7 +565,7 @@ void KAsteroidsView::processMissiles() wrapSprite( missile ); - TQCanvasItemList hits = missile->collisions( TRUE ); + TQCanvasItemList hits = missile->collisions( true ); TQCanvasItemList::Iterator hit; for ( hit = hits.begin(); hit != hits.end(); ++hit ) { @@ -598,7 +598,7 @@ void KAsteroidsView::processShip() shield->setFrame( (shield->frame()+1) % shield->frameCount() ); shield->move( ship->x() - 9, ship->y() - 9 ); - TQCanvasItemList hits = shield->collisions( TRUE ); + TQCanvasItemList hits = shield->collisions( true ); TQCanvasItemList::Iterator it; for ( it = hits.begin(); it != hits.end(); ++it ) { @@ -623,7 +623,7 @@ void KAsteroidsView::processShip() if ( factor > mShieldCount ) { // shield not strong enough - shieldOn = FALSE; + shieldOn = false; break; } rockHit( *it ); @@ -636,7 +636,7 @@ void KAsteroidsView::processShip() if ( !shieldOn ) { shield->hide(); - TQCanvasItemList hits = ship->collisions( TRUE ); + TQCanvasItemList hits = ship->collisions( true ); TQCanvasItemList::Iterator it; for ( it = hits.begin(); it != hits.end(); ++it ) { @@ -688,16 +688,16 @@ void KAsteroidsView::processShip() if ( brakeShip ) { - thrustShip = FALSE; - rotateL = FALSE; - rotateR = FALSE; + thrustShip = false; + rotateL = false; + rotateR = false; rotateRate = ROTATE_RATE; if ( fabs(shipDx) < 2.5 && fabs(shipDy) < 2.5 ) { shipDx = 0.0; shipDy = 0.0; ship->setVelocity( shipDx, shipDy ); - brakeShip = FALSE; + brakeShip = false; } else { @@ -713,9 +713,9 @@ void KAsteroidsView::processShip() if ( fdiff > 0.08 ) { if ( angleDiff > 0 ) - rotateL = TRUE; + rotateL = true; else if ( angleDiff < 0 ) - rotateR = TRUE; + rotateR = true; if ( fdiff > 0.6 ) rotateRate = mBrakeCount + 1; else if ( fdiff > 0.4 ) @@ -728,7 +728,7 @@ void KAsteroidsView::processShip() } else if ( fabs(shipDx) > 1 || fabs(shipDy) > 1 ) { - thrustShip = TRUE; + thrustShip = true; // we'll make braking a bit faster shipDx += cosangle/6 * (mBrakeCount - 1); shipDy += sinangle/6 * (mBrakeCount - 1); @@ -791,7 +791,7 @@ void KAsteroidsView::processShip() ship->move( xra, yra ); } - vitalsChanged = TRUE; + vitalsChanged = true; } } @@ -821,7 +821,7 @@ void KAsteroidsView::processPowerups() wrapSprite( pup ); - TQCanvasItemList hits = pup->collisions( TRUE ); + TQCanvasItemList hits = pup->collisions( true ); TQCanvasItemList::Iterator it; for ( it = hits.begin(); it != hits.end(); ++it ) { @@ -852,7 +852,7 @@ void KAsteroidsView::processPowerups() } powerups.removeRef( pup ); - vitalsChanged = TRUE; + vitalsChanged = true; } else if ( (*it) == shield ) { @@ -876,7 +876,7 @@ void KAsteroidsView::hideShield() { shield->hide(); mShieldCount = 0; - shieldOn = FALSE; + shieldOn = false; } double KAsteroidsView::randDouble() @@ -893,10 +893,10 @@ int KAsteroidsView::randInt( int range ) void KAsteroidsView::showEvent( TQShowEvent *e ) { #if defined( QT_LICENSE_PROFESSIONAL ) - static bool wasThere = FALSE; + static bool wasThere = false; if ( !wasThere ) { - wasThere = TRUE; + wasThere = true; TQMessageBox::information( this, tr("TQCanvas demo"), tr("This game has been implemented using the TQCanvas class.\n" "The TQCanvas class is not part of the Professional Edition. Please \n" diff --git a/examples/demo/qasteroids/view.h b/examples/demo/qasteroids/view.h index d54fa847a..f7c1ce802 100644 --- a/examples/demo/qasteroids/view.h +++ b/examples/demo/qasteroids/view.h @@ -41,7 +41,7 @@ public: void brake( bool b ); void pause( bool p); - void showText( const TQString &text, const TQColor &color, bool scroll=TRUE ); + void showText( const TQString &text, const TQColor &color, bool scroll=true ); void hideText(); int shots() const { return shotsFired; } diff --git a/examples/demo/qthumbwheel.cpp b/examples/demo/qthumbwheel.cpp index 38ff85a55..db2a73aec 100644 --- a/examples/demo/qthumbwheel.cpp +++ b/examples/demo/qthumbwheel.cpp @@ -70,8 +70,8 @@ TQThumbWheel::~TQThumbWheel() void TQThumbWheel::init() { - track = TRUE; - mousePressed = FALSE; + track = true; + mousePressed = false; pressedAt = -1; rat = 1.0; setFrameStyle( WinPanel | Sunken ); @@ -106,7 +106,7 @@ void TQThumbWheel::setValue( int value ) void TQThumbWheel::valueChange() { - repaint( FALSE ); + repaint( false ); emit valueChanged(value()); } @@ -166,7 +166,7 @@ void TQThumbWheel::keyPressEvent( TQKeyEvent *e ) void TQThumbWheel::mousePressEvent( TQMouseEvent *e ) { if ( e->button() == LeftButton ) { - mousePressed = TRUE; + mousePressed = true; pressedAt = valueFromPosition( e->pos() ); } } diff --git a/examples/demo/sql/sqlex.ui.h b/examples/demo/sql/sqlex.ui.h index e14559c98..c59f6886b 100644 --- a/examples/demo/sql/sqlex.ui.h +++ b/examples/demo/sql/sqlex.ui.h @@ -33,8 +33,8 @@ void SqlEx::init() { hsplit->setResizeMode( lv, TQSplitter::KeepSize ); vsplit->setResizeMode( gb, TQSplitter::KeepSize ); - submitBtn->setEnabled( FALSE ); - conDiag = new ConnectDialog( this, "Connection Dialog", TRUE ); + submitBtn->setEnabled( false ); + conDiag = new ConnectDialog( this, "Connection Dialog", true ); } void SqlEx::dbConnect() @@ -84,15 +84,15 @@ void SqlEx::dbConnect() } lv->insertItem( lvi ); } - submitBtn->setEnabled( TRUE ); + submitBtn->setEnabled( true ); } void SqlEx::execQuery() { // use a custom cursor to populate the data table - TQSqlSelectCursor* cursor = new TQSqlSelectCursor( te->text(), TQSqlDatabase::database( "SqlEx", TRUE ) ); + TQSqlSelectCursor* cursor = new TQSqlSelectCursor( te->text(), TQSqlDatabase::database( "SqlEx", true ) ); if ( cursor->isSelect() ) { - dt->setSqlCursor( cursor, TRUE, TRUE ); + dt->setSqlCursor( cursor, true, true ); dt->setSort( TQStringList() ); dt->refresh( TQDataTable::RefreshAll ); TQString txt( "Query OK" ); @@ -118,8 +118,8 @@ void SqlEx::showTable( TQListViewItem * item ) } // populate the data table - TQSqlCursor* cursor = new TQSqlCursor( i->text( 0 ), TRUE, TQSqlDatabase::database( "SqlEx", TRUE ) ); - dt->setSqlCursor( cursor, TRUE, TRUE ); + TQSqlCursor* cursor = new TQSqlCursor( i->text( 0 ), true, TQSqlDatabase::database( "SqlEx", true ) ); + dt->setSqlCursor( cursor, true, true ); dt->setSort( cursor->primaryIndex() ); dt->refresh( TQDataTable::RefreshAll ); lbl->setText( "Displaying table " + i->text( 0 ) ); diff --git a/examples/demo/textdrawing/example.html b/examples/demo/textdrawing/example.html index 331b469b9..68c38b427 100644 --- a/examples/demo/textdrawing/example.html +++ b/examples/demo/textdrawing/example.html @@ -138,7 +138,7 @@ constructor. <p>See also <a href="#1f406e">setAlignment</a>(). <h3 class="fn">bool <a name="75b2a1"></a>TQLabel::autoResize () const</h3> <p><b>This function is obsolete.</b> It is provided to keep old source working, and will probably be removed in a future version of TQt. We strongly advise against using it in new code.<p> -<p>Returns TRUE if auto-resizing is enabled, or FALSE if auto-resizing +<p>Returns true if auto-resizing is enabled, or false if auto-resizing is disabled. <p>Auto-resizing is disabled by default. <p>See also <a href="#c0e104">setAutoResize</a>(). @@ -187,7 +187,7 @@ returns 0. <p>The <em>alignment</em> must be a bitwise OR of <a href="tqt.html#AlignmentFlags">TQt::AlignmentFlags</a> values. The <code>WordBreak, ExpandTabs, SingleLine</code> and <code>ShowPrefix</code> flags apply only if the label contains a plain text, and are otherwise ignored. The <code>DontClip</code> flag is always ignored. -<p>If the label has a buddy, the <code>ShowPrefix</code> flag is forced to TRUE. +<p>If the label has a buddy, the <code>ShowPrefix</code> flag is forced to true. <p>The default alignment is <code>AlignLeft | AlignVCenter | ExpandTabs</code> if the label doesn't have a buddy and <code>AlignLeft | AlignVCenter | ExpandTabs | ShowPrefix </code> if @@ -204,7 +204,7 @@ the label has a buddy. <p>Reimplemented from <a href="tqwidget.html#c7a335">TQWidget.</a> <h3 class="fn">void <a name="c0e104"></a>TQLabel::setAutoResize ( bool enable ) <code>[virtual]</code></h3> <p><b>This function is obsolete.</b> It is provided to keep old source working, and will probably be removed in a future version of TQt. We strongly advise against using it in new code.<p> -Enables auto-resizing if <em>enable</em> is TRUE, or disables it if <em>enable</em> is FALSE. +Enables auto-resizing if <em>enable</em> is true, or disables it if <em>enable</em> is false. <p>When auto-resizing is enabled, the label will resize itself to fit the contents whenever the contents change. The top left corner is not moved. This is useful for TQLabel widgets that are not managed by @@ -279,7 +279,7 @@ the label. Any previous content is cleared. <p>The label resizes itself if auto-resizing is enabled. <p>See also <a href="#101ecb">pixmap</a>() and <a href="#191701">setBuddy</a>(). <h3 class="fn">void <a name="e9e3cf"></a>TQLabel::setScaledContents ( bool enable )</h3> -<p>When called with <em>enable</em> == TRUE, and the label shows a pixmap, +<p>When called with <em>enable</em> == true, and the label shows a pixmap, it will scale the pixmap to fill available space. <p>See also <a href="#7e1f73">hasScaledContents</a>(). <h3 class="fn">void <a name="dffb43"></a>TQLabel::setText ( const <a href="tqstring.html">TQString</a> & text ) <code>[virtual slot]</code></h3> diff --git a/examples/demo/textdrawing/helpwindow.cpp b/examples/demo/textdrawing/helpwindow.cpp index 88d54f5b0..b2096fb10 100644 --- a/examples/demo/textdrawing/helpwindow.cpp +++ b/examples/demo/textdrawing/helpwindow.cpp @@ -100,8 +100,8 @@ HelpWindow::HelpWindow( const TQString& home_, const TQString& _path, menuBar()->insertItem( tr( "History" ), hist ); menuBar()->insertItem( tr( "Bookmarks" ), bookm ); - menuBar()->setItemEnabled( forwardId, FALSE); - menuBar()->setItemEnabled( backwardId, FALSE); + menuBar()->setItemEnabled( forwardId, false); + menuBar()->setItemEnabled( backwardId, false); connect( browser, TQ_SIGNAL( backwardAvailable( bool ) ), this, TQ_SLOT( setBackwardAvailable( bool ) ) ); connect( browser, TQ_SIGNAL( forwardAvailable( bool ) ), @@ -114,21 +114,21 @@ HelpWindow::HelpWindow( const TQString& home_, const TQString& _path, button = new TQToolButton( icon_back, tr("Backward"), "", browser, TQ_SLOT(backward()), toolbar ); connect( browser, TQ_SIGNAL( backwardAvailable(bool) ), button, TQ_SLOT( setEnabled(bool) ) ); - button->setEnabled( FALSE ); + button->setEnabled( false ); button = new TQToolButton( icon_forward, tr("Forward"), "", browser, TQ_SLOT(forward()), toolbar ); connect( browser, TQ_SIGNAL( forwardAvailable(bool) ), button, TQ_SLOT( setEnabled(bool) ) ); - button->setEnabled( FALSE ); + button->setEnabled( false ); button = new TQToolButton( icon_home, tr("Home"), "", browser, TQ_SLOT(home()), toolbar ); toolbar->addSeparator(); - pathCombo = new TQComboBox( TRUE, toolbar ); + pathCombo = new TQComboBox( true, toolbar ); connect( pathCombo, TQ_SIGNAL( activated( const TQString & ) ), this, TQ_SLOT( pathSelected( const TQString & ) ) ); toolbar->setStretchableWidget( pathCombo ); - setRightJustification( TRUE ); - setDockEnabled( DockLeft, FALSE ); - setDockEnabled( DockRight, FALSE ); + setRightJustification( true ); + setDockEnabled( DockLeft, false ); + setDockEnabled( DockRight, false ); pathCombo->insertItem( home_ ); @@ -156,11 +156,11 @@ void HelpWindow::textChanged() selectedURL = caption(); if ( !selectedURL.isEmpty() && pathCombo ) { - bool exists = FALSE; + bool exists = false; int i; for ( i = 0; i < pathCombo->count(); ++i ) { if ( pathCombo->text( i ) == selectedURL ) { - exists = TRUE; + exists = true; break; } } @@ -232,7 +232,7 @@ void HelpWindow::print() { #ifndef TQT_NO_PRINTER TQPrinter printer; - printer.setFullPage(TRUE); + printer.setFullPage(true); if ( printer.setup() ) { TQPainter p( &printer ); TQPaintDeviceMetrics metrics(p.device()); @@ -275,7 +275,7 @@ void HelpWindow::print() break; printer.newPage(); page++; - } while (TRUE); + } while (true); } #endif } @@ -284,10 +284,10 @@ void HelpWindow::pathSelected( const TQString &_path ) { browser->setSource( _path ); TQMap<int, TQString>::Iterator it = mHistory.begin(); - bool exists = FALSE; + bool exists = false; for ( ; it != mHistory.end(); ++it ) { if ( *it == _path ) { - exists = TRUE; + exists = true; break; } } diff --git a/examples/demo/textdrawing/textedit.cpp b/examples/demo/textdrawing/textedit.cpp index c002de194..2f6d4521b 100644 --- a/examples/demo/textdrawing/textedit.cpp +++ b/examples/demo/textdrawing/textedit.cpp @@ -110,7 +110,7 @@ void TextEdit::setupTextActions() TQPopupMenu *menu = new TQPopupMenu( this ); menuBar()->insertItem( tr( "For&mat" ), menu ); - comboStyle = new TQComboBox( FALSE, tb ); + comboStyle = new TQComboBox( false, tb ); comboStyle->insertItem( tr("Standard") ); comboStyle->insertItem( tr("Bullet List (Disc)") ); comboStyle->insertItem( tr("Bullet List (Circle)") ); @@ -121,14 +121,14 @@ void TextEdit::setupTextActions() connect( comboStyle, TQ_SIGNAL( activated( int ) ), this, TQ_SLOT( textStyle( int ) ) ); - comboFont = new TQComboBox( TRUE, tb ); + comboFont = new TQComboBox( true, tb ); TQFontDatabase db; comboFont->insertStringList( db.families() ); connect( comboFont, TQ_SIGNAL( activated( const TQString & ) ), this, TQ_SLOT( textFamily( const TQString & ) ) ); comboFont->lineEdit()->setText( TQApplication::font().family() ); - comboSize = new TQComboBox( TRUE, tb ); + comboSize = new TQComboBox( true, tb ); TQValueList<int> sizes = db.standardSizes(); TQValueList<int>::Iterator it = sizes.begin(); for ( ; it != sizes.end(); ++it ) @@ -141,39 +141,39 @@ void TextEdit::setupTextActions() connect( actionTextBold, TQ_SIGNAL( activated() ), this, TQ_SLOT( textBold() ) ); actionTextBold->addTo( tb ); actionTextBold->addTo( menu ); - actionTextBold->setToggleAction( TRUE ); + actionTextBold->setToggleAction( true ); actionTextItalic = new TQAction( tr( "Italic" ), TQPixmap( "textdrawing/textitalic.png" ), tr( "&Italic" ), CTRL + Key_I, this, "textItalic" ); connect( actionTextItalic, TQ_SIGNAL( activated() ), this, TQ_SLOT( textItalic() ) ); actionTextItalic->addTo( tb ); actionTextItalic->addTo( menu ); - actionTextItalic->setToggleAction( TRUE ); + actionTextItalic->setToggleAction( true ); actionTextUnderline = new TQAction( tr( "Underline" ), TQPixmap( "textdrawing/textunderline.png" ), tr( "&Underline" ), CTRL + Key_U, this, "textUnderline" ); connect( actionTextUnderline, TQ_SIGNAL( activated() ), this, TQ_SLOT( textUnderline() ) ); actionTextUnderline->addTo( tb ); actionTextUnderline->addTo( menu ); - actionTextUnderline->setToggleAction( TRUE ); + actionTextUnderline->setToggleAction( true ); menu->insertSeparator(); TQActionGroup *grp = new TQActionGroup( this ); - grp->setExclusive( TRUE ); + grp->setExclusive( true ); connect( grp, TQ_SIGNAL( selected( TQAction* ) ), this, TQ_SLOT( textAlign( TQAction* ) ) ); actionAlignLeft = new TQAction( tr( "Left" ), TQPixmap( "textdrawing/textleft.png" ), tr( "&Left" ), CTRL + Key_L, grp, "textLeft" ); actionAlignLeft->addTo( tb ); actionAlignLeft->addTo( menu ); - actionAlignLeft->setToggleAction( TRUE ); + actionAlignLeft->setToggleAction( true ); actionAlignCenter = new TQAction( tr( "Center" ), TQPixmap( "textdrawing/textcenter.png" ), tr( "C&enter" ), CTRL + Key_M, grp, "textCenter" ); actionAlignCenter->addTo( tb ); actionAlignCenter->addTo( menu ); - actionAlignCenter->setToggleAction( TRUE ); + actionAlignCenter->setToggleAction( true ); actionAlignRight = new TQAction( tr( "Right" ), TQPixmap( "textdrawing/textright.png" ), tr( "&Right" ), CTRL + Key_R, grp, "textRight" ); actionAlignRight->addTo( tb ); actionAlignRight->addTo( menu ); - actionAlignRight->setToggleAction( TRUE ); + actionAlignRight->setToggleAction( true ); actionAlignJustify = new TQAction( tr( "Justify" ), TQPixmap( "textdrawing/textjustify.png" ), tr( "&Justify" ), CTRL + Key_J, grp, "textjustify" ); actionAlignJustify->addTo( tb ); actionAlignJustify->addTo( menu ); - actionAlignJustify->setToggleAction( TRUE ); + actionAlignJustify->setToggleAction( true ); menu->insertSeparator(); @@ -273,7 +273,7 @@ void TextEdit::filePrint() return; #ifndef TQT_NO_PRINTER TQPrinter printer; - printer.setFullPage(TRUE); + printer.setFullPage(true); TQPaintDeviceMetrics screen( this ); printer.setResolution( screen.logicalDpiY() ); if ( printer.setup( this ) ) { @@ -302,7 +302,7 @@ void TextEdit::filePrint() break; printer.newPage(); page++; - } while (TRUE); + } while (true); } #endif } @@ -458,13 +458,13 @@ void TextEdit::colorChanged( const TQColor &c ) void TextEdit::alignmentChanged( int a ) { if ( ( a == AlignAuto ) || ( a & AlignLeft )) - actionAlignLeft->setOn( TRUE ); + actionAlignLeft->setOn( true ); else if ( ( a & AlignHCenter ) ) - actionAlignCenter->setOn( TRUE ); + actionAlignCenter->setOn( true ); else if ( ( a & AlignRight ) ) - actionAlignRight->setOn( TRUE ); + actionAlignRight->setOn( true ); else if ( ( a & AlignJustify ) ) - actionAlignJustify->setOn( TRUE ); + actionAlignJustify->setOn( true ); } void TextEdit::editorChanged( TQWidget * ) diff --git a/examples/demo/widgets/widgetsbase.ui.h b/examples/demo/widgets/widgetsbase.ui.h index 0e45e4939..2ff8a6290 100644 --- a/examples/demo/widgets/widgetsbase.ui.h +++ b/examples/demo/widgets/widgetsbase.ui.h @@ -13,14 +13,14 @@ void WidgetsBase::destroy() void WidgetsBase::resetColors() { - groupBox->setPalette( palette(), FALSE ); + groupBox->setPalette( palette(), false ); TQObjectList *chldn = groupBox->queryList(); if ( chldn ) { for(TQObject *obj=chldn->first(); obj; obj = chldn->next()) { if(obj->isWidgetType()) { TQWidget *w = (TQWidget *)obj; if(!w->isTopLevel()) - w->setPalette(palette(), FALSE); + w->setPalette(palette(), false); } } } @@ -28,14 +28,14 @@ void WidgetsBase::resetColors() void WidgetsBase::setColor( const TQString & color ) { - groupBox->setPalette( TQColor( color ), FALSE ); + groupBox->setPalette( TQColor( color ), false ); TQObjectList *chldn = groupBox->queryList(); if ( chldn ) { for(TQObject *obj=chldn->first(); obj; obj = chldn->next()) { if(obj->isWidgetType()) { TQWidget *w = (TQWidget *)obj; if(!w->isTopLevel()) - w->setPalette(TQColor(color), FALSE); + w->setPalette(TQColor(color), false); } } } @@ -53,7 +53,7 @@ void WidgetsBase::updateClock() void WidgetsBase::updateColorTest( const TQString & color ) { - colorTest->setPalette( TQColor( color ), TRUE); + colorTest->setPalette( TQColor( color ), true); } void WidgetsBase::updateDateTimeString() diff --git a/examples/demo/widgets/widgetsbase_pro.ui.h b/examples/demo/widgets/widgetsbase_pro.ui.h index fe01f9585..5d896a736 100644 --- a/examples/demo/widgets/widgetsbase_pro.ui.h +++ b/examples/demo/widgets/widgetsbase_pro.ui.h @@ -13,13 +13,13 @@ void WidgetsBase::destroy() void WidgetsBase::resetColors() { - groupBox->setPalette( palette(), FALSE ); + groupBox->setPalette( palette(), false ); if(TQObjectList *chldn = groupBox->queryList()) { for(TQObject *obj=chldn->first(); obj; obj = chldn->next()) { if(obj->isWidgetType()) { TQWidget *w = (TQWidget *)obj; if(!w->isTopLevel()) - w->setPalette(palette(), FALSE); + w->setPalette(palette(), false); } } } @@ -27,13 +27,13 @@ void WidgetsBase::resetColors() void WidgetsBase::setColor( const TQString & color ) { - groupBox->setPalette( TQColor( color ), FALSE ); + groupBox->setPalette( TQColor( color ), false ); if(TQObjectList *chldn = groupBox->queryList()) { for(TQObject *obj=chldn->first(); obj; obj = chldn->next()) { if(obj->isWidgetType()) { TQWidget *w = (TQWidget *)obj; if(!w->isTopLevel()) - w->setPalette(TQColor(color), FALSE); + w->setPalette(TQColor(color), false); } } } |
