diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-04-08 12:59:07 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-04-10 17:35:38 +0900 |
commit | d2d30bfbef26707f9158cbc31d5763a9a1d4ab2d (patch) | |
tree | 6d2d4502d6fbe4d6810bfb7bcf297cbf995d3db8 /kdevdesigner/designer/actiondnd.cpp | |
parent | b9618de13e8f38c3558e9ed393a75c1f13af665c (diff) | |
download | tdevelop-r14.1.4.tar.gz tdevelop-r14.1.4.zip |
Replace TRUE/FALSE with boolean values true/falser14.1.4
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 5198c9d3ac02aa9c7949f49e3cf374f683facb18)
Diffstat (limited to 'kdevdesigner/designer/actiondnd.cpp')
-rw-r--r-- | kdevdesigner/designer/actiondnd.cpp | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/kdevdesigner/designer/actiondnd.cpp b/kdevdesigner/designer/actiondnd.cpp index c76f13b6..0d524d9e 100644 --- a/kdevdesigner/designer/actiondnd.cpp +++ b/kdevdesigner/designer/actiondnd.cpp @@ -106,12 +106,12 @@ bool QDesignerAction::addTo( TQWidget *w ) return TQAction::addTo( w ); if ( ::tqt_cast<TQPopupMenu*>(w) ) - return FALSE; + return false; - widgetToInsert->reparent( w, TQPoint( 0, 0 ), FALSE ); + widgetToInsert->reparent( w, TQPoint( 0, 0 ), false ); widgetToInsert->show(); addedTo( widgetToInsert, w ); - return TRUE; + return true; } bool QDesignerAction::removeFrom( TQWidget *w ) @@ -120,15 +120,15 @@ bool QDesignerAction::removeFrom( TQWidget *w ) return TQAction::removeFrom( w ); remove(); - return TRUE; + return true; } void QDesignerAction::remove() { if ( !widgetToInsert ) return; - MainWindow::self->formWindow()->selectWidget( widgetToInsert, FALSE ); - widgetToInsert->reparent( 0, TQPoint( 0, 0 ), FALSE ); + MainWindow::self->formWindow()->selectWidget( widgetToInsert, false ); + widgetToInsert->reparent( 0, TQPoint( 0, 0 ), false ); } QDesignerToolBarSeparator::QDesignerToolBarSeparator(TQt::Orientation o , TQToolBar *parent, @@ -187,25 +187,25 @@ bool QSeparatorAction::addTo( TQWidget *w ) if ( ::tqt_cast<TQToolBar*>(w) ) { TQToolBar *tb = (TQToolBar*)w; wid = new QDesignerToolBarSeparator( tb->orientation(), tb ); - return TRUE; + return true; } else if ( ::tqt_cast<TQPopupMenu*>(w) ) { idx = ( (TQPopupMenu*)w )->count(); ( (TQPopupMenu*)w )->insertSeparator( idx ); - return TRUE; + return true; } - return FALSE; + return false; } bool QSeparatorAction::removeFrom( TQWidget *w ) { if ( ::tqt_cast<TQToolBar*>(w) ) { delete wid; - return TRUE; + return true; } else if ( ::tqt_cast<TQPopupMenu*>(w) ) { ( (TQPopupMenu*)w )->removeItemAt( idx ); - return TRUE; + return true; } - return FALSE; + return false; } TQWidget *QSeparatorAction::widget() const @@ -219,31 +219,31 @@ QDesignerToolBar::QDesignerToolBar( TQMainWindow *mw ) : TQToolBar( mw ), lastIndicatorPos( -1, -1 ) { insertAnchor = 0; - afterAnchor = TRUE; - setAcceptDrops( TRUE ); + afterAnchor = true; + setAcceptDrops( true ); MetaDataBase::addEntry( this ); lastIndicatorPos = TQPoint( -1, -1 ); indicator = new QDesignerIndicatorWidget( this ); indicator->hide(); installEventFilter( this ); - widgetInserting = FALSE; + widgetInserting = false; findFormWindow(); - mw->setDockEnabled( DockTornOff, FALSE ); + mw->setDockEnabled( DockTornOff, false ); } QDesignerToolBar::QDesignerToolBar( TQMainWindow *mw, Dock dock ) : TQToolBar( TQString(), mw, dock), lastIndicatorPos( -1, -1 ) { insertAnchor = 0; - afterAnchor = TRUE; - setAcceptDrops( TRUE ); + afterAnchor = true; + setAcceptDrops( true ); indicator = new QDesignerIndicatorWidget( this ); indicator->hide(); MetaDataBase::addEntry( this ); installEventFilter( this ); - widgetInserting = FALSE; + widgetInserting = false; findFormWindow(); - mw->setDockEnabled( DockTornOff, FALSE ); + mw->setDockEnabled( DockTornOff, false ); } void QDesignerToolBar::findFormWindow() @@ -287,7 +287,7 @@ bool QDesignerToolBar::eventFilter( TQObject *o, TQEvent *e ) if ( o == this && e->type() == TQEvent::MouseButtonPress && ( ( TQMouseEvent*)e )->button() == TQt::LeftButton ) { mousePressEvent( (TQMouseEvent*)e ); - return TRUE; + return true; } if ( o == this ) @@ -297,30 +297,30 @@ bool QDesignerToolBar::eventFilter( TQObject *o, TQEvent *e ) TQMouseEvent *ke = (TQMouseEvent*)e; fixObject( o ); if ( !o ) - return FALSE; + return false; buttonMousePressEvent( ke, o ); - return TRUE; + return true; } else if(e->type() == TQEvent::ContextMenu ) { TQContextMenuEvent *ce = (TQContextMenuEvent*)e; fixObject( o ); if( !o ) - return FALSE; + return false; buttonContextMenuEvent( ce, o ); - return TRUE; + return true; } else if ( e->type() == TQEvent::MouseMove ) { TQMouseEvent *ke = (TQMouseEvent*)e; fixObject( o ); if ( !o ) - return FALSE; + return false; buttonMouseMoveEvent( ke, o ); - return TRUE; + return true; } else if ( e->type() == TQEvent::MouseButtonRelease ) { TQMouseEvent *ke = (TQMouseEvent*)e; fixObject( o ); if ( !o ) - return FALSE; + return false; buttonMouseReleaseEvent( ke, o ); - return TRUE; + return true; } else if ( e->type() == TQEvent::DragEnter ) { TQDragEnterEvent *de = (TQDragEnterEvent*)e; if (ActionDrag::canDecode(de)) @@ -358,20 +358,20 @@ void QDesignerToolBar::contextMenuEvent( TQContextMenuEvent *e ) void QDesignerToolBar::mousePressEvent( TQMouseEvent *e ) { - widgetInserting = FALSE; + widgetInserting = false; if ( e->button() == TQt::LeftButton && MainWindow::self->currentTool() != POINTER_TOOL && MainWindow::self->currentTool() != ORDER_TOOL && MainWindow::self->currentTool() != CONNECT_TOOL && MainWindow::self->currentTool() != BUDDY_TOOL ) - widgetInserting = TRUE; + widgetInserting = true; } void QDesignerToolBar::mouseReleaseEvent( TQMouseEvent *e ) { if ( widgetInserting ) doInsertWidget( mapFromGlobal( e->globalPos() ) ); - widgetInserting = FALSE; + widgetInserting = false; } void QDesignerToolBar::buttonMouseReleaseEvent( TQMouseEvent *e, TQObject *w ) @@ -379,10 +379,10 @@ void QDesignerToolBar::buttonMouseReleaseEvent( TQMouseEvent *e, TQObject *w ) if ( widgetInserting ) doInsertWidget( mapFromGlobal( e->globalPos() ) ); else if ( w->isWidgetType() && formWindow->widgets()->find( w ) ) { - formWindow->clearSelection( FALSE ); + formWindow->clearSelection( false ); formWindow->selectWidget( w ); } - widgetInserting = FALSE; + widgetInserting = false; } void QDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject *o ) @@ -438,7 +438,7 @@ void QDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject * void QDesignerToolBar::buttonMousePressEvent( TQMouseEvent *e, TQObject * ) { - widgetInserting = FALSE; + widgetInserting = false; if ( e->button() == TQt::MidButton ) return; @@ -448,7 +448,7 @@ void QDesignerToolBar::buttonMousePressEvent( TQMouseEvent *e, TQObject * ) MainWindow::self->currentTool() != ORDER_TOOL && MainWindow::self->currentTool() != CONNECT_TOOL && MainWindow::self->currentTool() != BUDDY_TOOL ) { - widgetInserting = TRUE; + widgetInserting = true; return; } @@ -500,7 +500,7 @@ void QDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o ) drag->setPixmap( a->iconSet().pixmap() ); if ( ::tqt_cast<QDesignerAction*>(a) ) { if ( formWindow->widgets()->find( ( (QDesignerAction*)a )->widget() ) ) - formWindow->selectWidget( ( ( (QDesignerAction*)a )->widget()), FALSE ); + formWindow->selectWidget( ( ( (QDesignerAction*)a )->widget()), false ); } if ( !drag->drag() ) { AddActionToToolBarCommand *cmd = new AddActionToToolBarCommand( i18n( "Add Action '%1' to Toolbar '%2'" ). @@ -517,7 +517,7 @@ void QDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o ) void QDesignerToolBar::dragEnterEvent( TQDragEnterEvent *e ) { - widgetInserting = FALSE; + widgetInserting = false; lastIndicatorPos = TQPoint( -1, -1 ); if (ActionDrag::canDecode(e)) e->accept(); @@ -535,7 +535,7 @@ void QDesignerToolBar::dragLeaveEvent( TQDragLeaveEvent * ) { indicator->hide(); insertAnchor = 0; - afterAnchor = TRUE; + afterAnchor = true; } void QDesignerToolBar::dropEvent( TQDropEvent *e ) @@ -614,7 +614,7 @@ TQPoint QDesignerToolBar::calcIndicatorPos( const TQPoint &pos ) if ( orientation() ==TQt::Horizontal ) { TQPoint pnt( width() - 2, 0 ); insertAnchor = 0; - afterAnchor = TRUE; + afterAnchor = true; TQObjectList clo = childrenListObject(); if ( clo.isEmpty() ) return pnt; @@ -629,7 +629,7 @@ TQPoint QDesignerToolBar::calcIndicatorPos( const TQPoint &pos ) if ( w->x() < pos.x() ) { pnt.setX( w->x() + w->width() + 1 ); insertAnchor = w; - afterAnchor = TRUE; + afterAnchor = true; } } } @@ -637,7 +637,7 @@ TQPoint QDesignerToolBar::calcIndicatorPos( const TQPoint &pos ) } else { TQPoint pnt( 0, height() - 2 ); insertAnchor = 0; - afterAnchor = TRUE; + afterAnchor = true; TQObjectList clo = childrenListObject(); if ( clo.isEmpty() ) return pnt; @@ -652,7 +652,7 @@ TQPoint QDesignerToolBar::calcIndicatorPos( const TQPoint &pos ) if ( w->y() < pos.y() ) { pnt.setY( w->y() + w->height() + 1 ); insertAnchor = w; - afterAnchor = TRUE; + afterAnchor = true; } } } @@ -689,9 +689,9 @@ void QDesignerToolBar::doInsertWidget( const TQPoint &p ) if ( formWindow != MainWindow::self->formWindow() ) return; calcIndicatorPos( p ); - TQWidget *w = WidgetFactory::create( MainWindow::self->currentTool(), this, 0, TRUE ); + TQWidget *w = WidgetFactory::create( MainWindow::self->currentTool(), this, 0, true ); installEventFilters( w ); - MainWindow::self->formWindow()->insertWidget( w, TRUE ); + MainWindow::self->formWindow()->insertWidget( w, true ); QDesignerAction *a = new QDesignerAction( w, parent() ); int index = actionList.findRef( *actionMap.find( insertAnchor ) ); if ( index != -1 && afterAnchor ) |