diff options
Diffstat (limited to 'kdevdesigner/designer/popupmenueditor.cpp')
-rw-r--r-- | kdevdesigner/designer/popupmenueditor.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/kdevdesigner/designer/popupmenueditor.cpp b/kdevdesigner/designer/popupmenueditor.cpp index bf60b215..629d40fe 100644 --- a/kdevdesigner/designer/popupmenueditor.cpp +++ b/kdevdesigner/designer/popupmenueditor.cpp @@ -84,13 +84,13 @@ bool PopupMenuEditorItemPtrDrag::decode( TQDropEvent * e, PopupMenuEditorItem ** TQDataStream stream( data, IO_ReadOnly ); if ( !data.size() ) - return FALSE; + return false; TQ_LONG p = 0; stream >> p; *i = ( PopupMenuEditorItem *) p; - return TRUE; + return true; } // PopupMenuEditorItem Implementation ----------------------------------- @@ -100,8 +100,8 @@ PopupMenuEditorItem::PopupMenuEditorItem( PopupMenuEditor * menu, TQObject * par a( 0 ), s( 0 ), m( menu ), - separator( FALSE ), - removable( FALSE ) + separator( false ), + removable( false ) { init(); a = new TQAction( this ); @@ -115,12 +115,12 @@ PopupMenuEditorItem::PopupMenuEditorItem( TQAction * action, PopupMenuEditor * m a( action ), s( 0 ), m( menu ), - separator( FALSE ), - removable( TRUE ) + separator( false ), + removable( true ) { init(); if ( /*a->name() == "qt_separator_action" ||*/ ::tqt_cast<QSeparatorAction*>(a) ) - separator = TRUE; + separator = true; if ( a && !a->childrenListObject().isEmpty() ) a->installEventFilter( this ); } @@ -151,7 +151,7 @@ void PopupMenuEditorItem::init() if ( m && !isSeparator() ) { s = new PopupMenuEditor( m->formWindow(), m ); TQString n = "PopupMenuEditor"; - m->formWindow()->unify( s, n, TRUE ); + m->formWindow()->unify( s, n, true ); s->setName( n ); MetaDataBase::addEntry( s ); } @@ -180,7 +180,7 @@ bool PopupMenuEditorItem::isVisible() const return ( g->isVisible() && g->usesDropDown() ); else if ( a ) return a->isVisible(); - return FALSE; + return false; } void PopupMenuEditorItem::showMenu( int x, int y ) @@ -223,20 +223,20 @@ int PopupMenuEditorItem::count() const bool PopupMenuEditorItem::eventFilter( TQObject * o, TQEvent * event ) { if ( ! ::tqt_cast<TQActionGroup*>( o ) ) - return FALSE; + return false; if ( event->type() == TQEvent::ChildInserted ) { TQChildEvent * ce = ( TQChildEvent * ) event; TQObject * c = ce->child(); TQAction * action = ::tqt_cast<TQAction*>( c ); if ( s->find( action ) != -1 ) // avoid duplicates - return FALSE; + return false; TQActionGroup * actionGroup = ::tqt_cast<TQActionGroup*>( c ); if ( actionGroup ) s->insert( actionGroup ); else if ( action ) s->insert( action ); } - return FALSE; + return false; } void PopupMenuEditorItem::selfDestruct() @@ -293,7 +293,7 @@ PopupMenuEditor::PopupMenuEditor( FormWindow * fw, PopupMenuEditor * menu, PopupMenuEditor::~PopupMenuEditor() { - itemList.setAutoDelete( TRUE ); + itemList.setAutoDelete( true ); } void PopupMenuEditor::init() @@ -303,7 +303,7 @@ void PopupMenuEditor::init() addItem.action()->setMenuText( i18n("new item") ); addSeparator.action()->setMenuText( i18n("new separator") ); - setAcceptDrops( TRUE ); + setAcceptDrops( true ); setFocusPolicy( TQWidget::StrongFocus ); lineEdit = new TQLineEdit( this ); @@ -357,7 +357,7 @@ void PopupMenuEditor::insert( TQActionGroup * actionGroup, int index ) PopupMenuEditorItem *i = new PopupMenuEditorItem( (TQAction *)actionGroup, this, 0, TQString( actionGroup->name() ) + "Menu" ); TQActionGroup *g = 0; - TQObjectList *l = actionGroup->queryList( "TQAction", 0, FALSE, FALSE ); + TQObjectList *l = actionGroup->queryList( "TQAction", 0, false, false ); TQObjectListIterator it( *l ); insert( i, index ); for ( ; it.current(); ++it ) { @@ -566,7 +566,7 @@ void PopupMenuEditor::setAccelerator( int key, TQt::ButtonState state, int index if ( n < 4 ) keys[n] = key | shift | ctrl | alt | meta; a->setAccel( TQKeySequence( keys[0], keys[1], keys[2], keys[3] ) ); - MetaDataBase::setPropertyChanged( a, "accel", TRUE ); + MetaDataBase::setPropertyChanged( a, "accel", true ); resizeToContents(); } @@ -625,7 +625,7 @@ PopupMenuEditorItem * PopupMenuEditor::createItem( TQAction * a ) a = ae->newActionEx(); PopupMenuEditorItem * i = new PopupMenuEditorItem( a, this ); TQString n = TQString( a->name() ) + "Item"; - formWindow()->unify( i, n, FALSE ); + formWindow()->unify( i, n, false ); i->setName( n ); AddActionToPopupCommand * cmd = new AddActionToPopupCommand( i18n( "Add Item" ), formWnd, this, i ); @@ -748,7 +748,7 @@ void PopupMenuEditor::mouseDoubleClickEvent( TQMouseEvent * ) setFocusAt( mousePressPos ); if ( currentItem() == &addSeparator ) { PopupMenuEditorItem * i = createItem( new QSeparatorAction( 0 ) ); - i->setSeparator( TRUE ); + i->setSeparator( true ); return; } if ( currentField == 0 ) { @@ -772,7 +772,7 @@ void PopupMenuEditor::mouseMoveEvent( TQMouseEvent * e ) // FIXME: start rename after drop } else if ( draggedItem == &addSeparator ) { draggedItem = createItem( new QSeparatorAction( 0 ) ); - draggedItem->setSeparator( TRUE ); + draggedItem->setSeparator( true ); } PopupMenuEditorItemPtrDrag * d = @@ -780,7 +780,7 @@ void PopupMenuEditor::mouseMoveEvent( TQMouseEvent * e ) hideSubMenu(); - draggedItem->setVisible( FALSE ); + draggedItem->setVisible( false ); resizeToContents(); // If the item is dropped in the same list, @@ -792,7 +792,7 @@ void PopupMenuEditor::mouseMoveEvent( TQMouseEvent * e ) d->dragCopy(); // dragevents and stuff happens if ( draggedItem ) { // item was not dropped - draggedItem->setVisible( TRUE ); + draggedItem->setVisible( true ); draggedItem = 0; if ( hasFocus() ) { hideSubMenu(); @@ -800,7 +800,7 @@ void PopupMenuEditor::mouseMoveEvent( TQMouseEvent * e ) showSubMenu(); } } else { // item was dropped - itemList.takeNode( node )->setVisible( TRUE ); + itemList.takeNode( node )->setVisible( true ); if ( currentIndex > 0 && currentIndex > idx ) --currentIndex; // the drop might happen in another menu, so we'll resize @@ -861,9 +861,9 @@ void PopupMenuEditor::dropEvent( TQDropEvent * e ) if ( g->usesDropDown() ) { i = new PopupMenuEditorItem( g, this ); TQString n = TQString( g->name() ) + "Item"; - formWindow()->unify( i, n, FALSE ); + formWindow()->unify( i, n, false ); i->setName( n ); - TQObjectList *l = g->queryList( "TQAction", 0, FALSE, FALSE ); + TQObjectList *l = g->queryList( "TQAction", 0, false, false ); TQObjectListIterator it( *l ); for ( ; it.current(); ++it ) { g = ::tqt_cast<TQActionGroup*>(it.current()); @@ -1416,10 +1416,10 @@ void PopupMenuEditor::leaveEditMode( TQKeyEvent * e ) a->setMenuText( menuText ); i = createItem( a ); TQString n = constructName( i ); - formWindow()->unify( a, n, TRUE ); + formWindow()->unify( a, n, true ); a->setName( n ); MetaDataBase::addEntry( a ); - MetaDataBase::setPropertyChanged( a, "menuText", TRUE ); + MetaDataBase::setPropertyChanged( a, "menuText", true ); ActionEditor *ae = (ActionEditor*)formWindow()->mainWindow()->child( 0, "ActionEditor" ); if ( ae ) ae->updateActionName( a ); |