From a2bae01d006ea8053e85bc16d09a8cf40a4b0b75 Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 17 Jun 2011 03:03:11 +0000 Subject: Fix kdewebdev FTBFS under Qt3 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1237074 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kommander/editor/actiondnd.cpp | 236 ++++++++++++++++----------------- kommander/editor/actiondnd.h | 48 +++---- kommander/editor/actionlistview.cpp | 8 +- kommander/editor/actionlistview.h | 16 +-- kommander/editor/command.cpp | 90 ++++++------- kommander/editor/command.h | 40 +++--- kommander/editor/formwindow.cpp | 10 +- kommander/editor/hierarchyview.cpp | 14 +- kommander/editor/hierarchyview.h | 2 +- kommander/editor/layout.cpp | 6 +- kommander/editor/layout.h | 6 +- kommander/editor/mainwindow.cpp | 30 ++--- kommander/editor/metadatabase.cpp | 2 +- kommander/editor/propertyeditor.cpp | 8 +- kommander/editor/resource.cpp | 46 +++---- kommander/editor/resource.h | 4 +- kommander/editor/widgetdatabase.cpp | 8 +- kommander/editor/widgetdatabase.h | 2 +- kommander/editor/widgetfactory.cpp | 132 +++++++++--------- kommander/editor/widgetfactory.h | 36 ++--- kommander/editor/widgetinterface.h | 2 +- kommander/factory/kommanderfactory.cpp | 14 +- 22 files changed, 380 insertions(+), 380 deletions(-) (limited to 'kommander') diff --git a/kommander/editor/actiondnd.cpp b/kommander/editor/actiondnd.cpp index 119f481b..58cdb4a3 100644 --- a/kommander/editor/actiondnd.cpp +++ b/kommander/editor/actiondnd.cpp @@ -42,7 +42,7 @@ #include -bool TQDesignerAction::addTo( TQWidget *w ) +bool QDesignerAction::addTo( TQWidget *w ) { if ( !widgetToInsert ) return TQAction::addTo( w ); @@ -55,7 +55,7 @@ bool TQDesignerAction::addTo( TQWidget *w ) return true; } -bool TQDesignerAction::removeFrom( TQWidget *w ) +bool QDesignerAction::removeFrom( TQWidget *w ) { if ( !widgetToInsert ) return TQAction::removeFrom( w ); @@ -64,7 +64,7 @@ bool TQDesignerAction::removeFrom( TQWidget *w ) return true; } -void TQDesignerAction::remove() +void QDesignerAction::remove() { if ( !widgetToInsert ) return; @@ -72,7 +72,7 @@ void TQDesignerAction::remove() widgetToInsert->reparent( 0, TQPoint( 0, 0 ), false ); } -TQDesignerToolBarSeparator::TQDesignerToolBarSeparator(Qt::Orientation o , TQToolBar *tqparent, +QDesignerToolBarSeparator::QDesignerToolBarSeparator(Qt::Orientation o , TQToolBar *tqparent, const char* name ) : TQWidget( tqparent, name ) { @@ -84,17 +84,17 @@ TQDesignerToolBarSeparator::TQDesignerToolBarSeparator(Qt::Orientation o , TQToo tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) ); } -void TQDesignerToolBarSeparator::setOrientation( Qt::Orientation o ) +void QDesignerToolBarSeparator::setOrientation( Qt::Orientation o ) { orient = o; } -void TQDesignerToolBarSeparator::styleChange( TQStyle& ) +void QDesignerToolBarSeparator::styleChange( TQStyle& ) { setOrientation( orient ); } -TQSize TQDesignerToolBarSeparator::tqsizeHint() const +TQSize QDesignerToolBarSeparator::tqsizeHint() const { int extent = tqstyle().tqpixelMetric( TQStyle::PM_DockWindowSeparatorExtent, this ); @@ -104,7 +104,7 @@ TQSize TQDesignerToolBarSeparator::tqsizeHint() const return TQSize( 0, extent ); } -void TQDesignerToolBarSeparator::paintEvent( TQPaintEvent * ) +void QDesignerToolBarSeparator::paintEvent( TQPaintEvent * ) { TQPainter p( this ); TQStyle::SFlags flags = TQStyle::Style_Default; @@ -118,16 +118,16 @@ void TQDesignerToolBarSeparator::paintEvent( TQPaintEvent * ) -TQSeparatorAction::TQSeparatorAction( TQObject *tqparent ) +QSeparatorAction::QSeparatorAction( TQObject *tqparent ) : TQAction( tqparent, "qt_designer_separator" ), wid( 0 ) { } -bool TQSeparatorAction::addTo( TQWidget *w ) +bool QSeparatorAction::addTo( TQWidget *w ) { if ( w->inherits( TQTOOLBAR_OBJECT_NAME_STRING ) ) { TQToolBar *tb = (TQToolBar*)w; - wid = new TQDesignerToolBarSeparator( tb->orientation(), tb ); + wid = new QDesignerToolBarSeparator( tb->orientation(), tb ); return true; } else if ( w->inherits( TQPOPUPMENU_OBJECT_NAME_STRING ) ) { idx = ( (TQPopupMenu*)w )->count(); @@ -137,7 +137,7 @@ bool TQSeparatorAction::addTo( TQWidget *w ) return false; } -bool TQSeparatorAction::removeFrom( TQWidget *w ) +bool QSeparatorAction::removeFrom( TQWidget *w ) { if ( w->inherits( TQTOOLBAR_OBJECT_NAME_STRING ) ) { delete wid; @@ -149,7 +149,7 @@ bool TQSeparatorAction::removeFrom( TQWidget *w ) return false; } -TQWidget *TQSeparatorAction::widget() const +TQWidget *QSeparatorAction::widget() const { return wid; } @@ -157,7 +157,7 @@ TQWidget *TQSeparatorAction::widget() const -TQDesignerToolBar::TQDesignerToolBar( TQMainWindow *mw ) +QDesignerToolBar::QDesignerToolBar( TQMainWindow *mw ) : TQToolBar( mw ), lastIndicatorPos( -1, -1 ) { insertAnchor = 0; @@ -165,7 +165,7 @@ TQDesignerToolBar::TQDesignerToolBar( TQMainWindow *mw ) setAcceptDrops( true ); MetaDataBase::addEntry( TQT_TQOBJECT(this) ); lastIndicatorPos = TQPoint( -1, -1 ); - indicator = new TQDesignerIndicatorWidget( this ); + indicator = new QDesignerIndicatorWidget( this ); indicator->hide(); installEventFilter( this ); widgetInserting = false; @@ -173,13 +173,13 @@ TQDesignerToolBar::TQDesignerToolBar( TQMainWindow *mw ) mw->setDockEnabled( DockTornOff, false ); } -TQDesignerToolBar::TQDesignerToolBar( TQMainWindow *mw, Dock dock ) +QDesignerToolBar::QDesignerToolBar( TQMainWindow *mw, Dock dock ) : TQToolBar( TQString(), mw, dock), lastIndicatorPos( -1, -1 ) { insertAnchor = 0; afterAnchor = true; setAcceptDrops( true ); - indicator = new TQDesignerIndicatorWidget( this ); + indicator = new QDesignerIndicatorWidget( this ); indicator->hide(); MetaDataBase::addEntry( TQT_TQOBJECT(this) ); installEventFilter( this ); @@ -188,7 +188,7 @@ TQDesignerToolBar::TQDesignerToolBar( TQMainWindow *mw, Dock dock ) mw->setDockEnabled( DockTornOff, false ); } -void TQDesignerToolBar::findFormWindow() +void QDesignerToolBar::findFormWindow() { TQWidget *w = this; while ( w ) { @@ -198,29 +198,29 @@ void TQDesignerToolBar::findFormWindow() } } -void TQDesignerToolBar::addAction( TQAction *a ) +void QDesignerToolBar::addAction( TQAction *a ) { actionList.append( a ); connect( a, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( actionRemoved() ) ); if ( a->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ) { - ( (TQDesignerActionGroup*)a )->widget()->installEventFilter( this ); - actionMap.insert( ( (TQDesignerActionGroup*)a )->widget(), a ); - } else if ( a->inherits( "TQSeparatorAction" ) ) { - ( (TQSeparatorAction*)a )->widget()->installEventFilter( this ); - actionMap.insert( ( (TQSeparatorAction*)a )->widget(), a ); + ( (QDesignerActionGroup*)a )->widget()->installEventFilter( this ); + actionMap.insert( ( (QDesignerActionGroup*)a )->widget(), a ); + } else if ( a->inherits( "QSeparatorAction" ) ) { + ( (QSeparatorAction*)a )->widget()->installEventFilter( this ); + actionMap.insert( ( (QSeparatorAction*)a )->widget(), a ); } else { - ( (TQDesignerAction*)a )->widget()->installEventFilter( this ); - actionMap.insert( ( (TQDesignerAction*)a )->widget(), a ); + ( (QDesignerAction*)a )->widget()->installEventFilter( this ); + actionMap.insert( ( (QDesignerAction*)a )->widget(), a ); } } static void fixObject( TQObject *&o ) { - while ( o && o->tqparent() && !o->tqparent()->inherits( "TQDesignerToolBar" ) ) + while ( o && o->tqparent() && !o->tqparent()->inherits( "QDesignerToolBar" ) ) o = o->tqparent(); } -bool TQDesignerToolBar::eventFilter( TQObject *o, TQEvent *e ) +bool QDesignerToolBar::eventFilter( TQObject *o, TQEvent *e ) { if ( !o || !e || o->inherits( TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING ) || o->inherits( "TQDockWindowTitleBar" ) ) return TQToolBar::eventFilter( o, e ); @@ -279,7 +279,7 @@ bool TQDesignerToolBar::eventFilter( TQObject *o, TQEvent *e ) return TQToolBar::eventFilter( o, e ); } -void TQDesignerToolBar::paintEvent( TQPaintEvent *e ) +void QDesignerToolBar::paintEvent( TQPaintEvent *e ) { TQToolBar::paintEvent( e ); if ( e->rect() != rect() ) @@ -287,7 +287,7 @@ void TQDesignerToolBar::paintEvent( TQPaintEvent *e ) lastIndicatorPos = TQPoint( -1, -1 ); } -void TQDesignerToolBar::contextMenuEvent( TQContextMenuEvent *e ) +void QDesignerToolBar::contextMenuEvent( TQContextMenuEvent *e ) { e->accept(); TQPopupMenu menu( 0 ); @@ -301,7 +301,7 @@ void TQDesignerToolBar::contextMenuEvent( TQContextMenuEvent *e ) } } -void TQDesignerToolBar::mousePressEvent( TQMouseEvent *e ) +void QDesignerToolBar::mousePressEvent( TQMouseEvent *e ) { widgetInserting = false; if ( e->button() == Qt::LeftButton && @@ -318,14 +318,14 @@ void TQDesignerToolBar::mousePressEvent( TQMouseEvent *e ) } } -void TQDesignerToolBar::mouseReleaseEvent( TQMouseEvent *e ) +void QDesignerToolBar::mouseReleaseEvent( TQMouseEvent *e ) { if ( widgetInserting ) doInsertWidget( mapFromGlobal( e->globalPos() ) ); widgetInserting = false; } -void TQDesignerToolBar::buttonMouseReleaseEvent( TQMouseEvent *e, TQObject *w ) +void QDesignerToolBar::buttonMouseReleaseEvent( TQMouseEvent *e, TQObject *w ) { if ( widgetInserting ) doInsertWidget( mapFromGlobal( e->globalPos() ) ); @@ -336,7 +336,7 @@ void TQDesignerToolBar::buttonMouseReleaseEvent( TQMouseEvent *e, TQObject *w ) widgetInserting = false; } -void TQDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject *o ) +void QDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject *o ) { e->accept(); TQPopupMenu menu( 0 ); @@ -344,7 +344,7 @@ void TQDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject const int ID_SEP = 2; const int ID_DELTOOLBAR = 3; TQMap::Iterator it = actionMap.tqfind( (TQWidget*)o ); - if ( it != actionMap.end() && (*it)->inherits( "TQSeparatorAction" ) ) + if ( it != actionMap.end() && (*it)->inherits( "QSeparatorAction" ) ) menu.insertItem( i18n("Delete Separator" ), ID_DELETE ); else menu.insertItem( i18n("Delete Item" ), ID_DELETE ); @@ -366,7 +366,7 @@ void TQDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject cmd->execute(); } else if ( res == ID_SEP ) { calcIndicatorPos( mapFromGlobal( e->globalPos() ) ); - TQAction *a = new TQSeparatorAction( 0 ); + TQAction *a = new QSeparatorAction( 0 ); int index = actionList.tqfindRef( *actionMap.tqfind( insertAnchor ) ); if ( index != -1 && afterAnchor ) ++index; @@ -387,7 +387,7 @@ void TQDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject } } -void TQDesignerToolBar::buttonMousePressEvent( TQMouseEvent *e, TQObject * ) +void QDesignerToolBar::buttonMousePressEvent( TQMouseEvent *e, TQObject * ) { widgetInserting = false; @@ -411,7 +411,7 @@ void TQDesignerToolBar::buttonMousePressEvent( TQMouseEvent *e, TQObject * ) dragStartPos = e->pos(); } -void TQDesignerToolBar::removeWidget( TQWidget *w ) +void QDesignerToolBar::removeWidget( TQWidget *w ) { TQMap::Iterator it = actionMap.tqfind( w ); if ( it == actionMap.end() ) @@ -428,7 +428,7 @@ void TQDesignerToolBar::removeWidget( TQWidget *w ) adjustSize(); } -void TQDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o ) +void QDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o ) { if ( widgetInserting || ( e->state() & Qt::LeftButton ) == 0 ) return; @@ -451,14 +451,14 @@ void TQDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o ) adjustSize(); TQString type = a->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ? TQString( "application/x-designer-actiongroup" ) : - a->inherits( "TQSeparatorAction" ) ? TQString( "application/x-designer-separator" ) : TQString( "application/x-designer-actions" ); + a->inherits( "QSeparatorAction" ) ? TQString( "application/x-designer-separator" ) : TQString( "application/x-designer-actions" ); TQStoredDrag *drag = new TQStoredDrag( type, this ); TQString s = TQString::number( (long)a ); // #### huha, that is evil drag->setEncodedData( TQCString( s.latin1() ) ); drag->setPixmap( a->iconSet().pixmap() ); - if ( a->inherits( "TQDesignerAction" ) ) { - if ( formWindow->widgets()->tqfind( ( (TQDesignerAction*)a )->widget() ) ) - formWindow->selectWidget( TQT_TQOBJECT(( (TQDesignerAction*)a )->widget()), false ); + if ( a->inherits( "QDesignerAction" ) ) { + if ( formWindow->widgets()->tqfind( ( (QDesignerAction*)a )->widget() ) ) + formWindow->selectWidget( TQT_TQOBJECT(( (QDesignerAction*)a )->widget()), false ); } if ( !drag->drag() ) { AddActionToToolBarCommand *cmd = new AddActionToToolBarCommand( i18n("Add Action '%1' to Toolbar '%2'" ). @@ -473,7 +473,7 @@ void TQDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o ) #ifndef TQT_NO_DRAGANDDROP -void TQDesignerToolBar::dragEnterEvent( TQDragEnterEvent *e ) +void QDesignerToolBar::dragEnterEvent( TQDragEnterEvent *e ) { widgetInserting = false; lastIndicatorPos = TQPoint( -1, -1 ); @@ -483,7 +483,7 @@ void TQDesignerToolBar::dragEnterEvent( TQDragEnterEvent *e ) e->accept(); } -void TQDesignerToolBar::dragMoveEvent( TQDragMoveEvent *e ) +void QDesignerToolBar::dragMoveEvent( TQDragMoveEvent *e ) { if ( e->provides( "application/x-designer-actions" ) || e->provides( "application/x-designer-actiongroup" ) || @@ -494,14 +494,14 @@ void TQDesignerToolBar::dragMoveEvent( TQDragMoveEvent *e ) drawIndicator( calcIndicatorPos( e->pos() ) ); } -void TQDesignerToolBar::dragLeaveEvent( TQDragLeaveEvent * ) +void QDesignerToolBar::dragLeaveEvent( TQDragLeaveEvent * ) { indicator->hide(); insertAnchor = 0; afterAnchor = true; } -void TQDesignerToolBar::dropEvent( TQDropEvent *e ) +void QDesignerToolBar::dropEvent( TQDropEvent *e ) { if ( e->provides( "application/x-designer-actions" ) || e->provides( "application/x-designer-actiongroup" ) || @@ -527,11 +527,11 @@ void TQDesignerToolBar::dropEvent( TQDropEvent *e ) if ( e->provides( "application/x-designer-actions" ) || e->provides( "application/x-designer-separator" ) ) { if ( e->provides( "application/x-designer-actions" ) ) - a = (TQDesignerAction*)s.toLong(); + a = (QDesignerAction*)s.toLong(); else - a = (TQSeparatorAction*)s.toLong(); + a = (QSeparatorAction*)s.toLong(); } else { - a = (TQDesignerActionGroup*)s.toLong(); + a = (QDesignerActionGroup*)s.toLong(); } if ( actionList.tqfindRef( a ) != -1 ) { @@ -553,7 +553,7 @@ void TQDesignerToolBar::dropEvent( TQDropEvent *e ) #endif -void TQDesignerToolBar::reInsert() +void QDesignerToolBar::reInsert() { TQAction *a = 0; actionMap.clear(); @@ -561,27 +561,27 @@ void TQDesignerToolBar::reInsert() for ( a = actionList.first(); a; a = actionList.next() ) { a->addTo( this ); if ( a->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ) { - actionMap.insert( ( (TQDesignerActionGroup*)a )->widget(), a ); - if ( ( (TQDesignerActionGroup*)a )->widget() ) - ( (TQDesignerActionGroup*)a )->widget()->installEventFilter( this ); - } else if ( a->inherits( "TQDesignerAction" ) ) { - actionMap.insert( ( (TQDesignerAction*)a )->widget(), a ); - ( (TQDesignerAction*)a )->widget()->installEventFilter( this ); - } else if ( a->inherits( "TQSeparatorAction" ) ) { - actionMap.insert( ( (TQSeparatorAction*)a )->widget(), a ); - ( (TQSeparatorAction*)a )->widget()->installEventFilter( this ); + actionMap.insert( ( (QDesignerActionGroup*)a )->widget(), a ); + if ( ( (QDesignerActionGroup*)a )->widget() ) + ( (QDesignerActionGroup*)a )->widget()->installEventFilter( this ); + } else if ( a->inherits( "QDesignerAction" ) ) { + actionMap.insert( ( (QDesignerAction*)a )->widget(), a ); + ( (QDesignerAction*)a )->widget()->installEventFilter( this ); + } else if ( a->inherits( "QSeparatorAction" ) ) { + actionMap.insert( ( (QSeparatorAction*)a )->widget(), a ); + ( (QSeparatorAction*)a )->widget()->installEventFilter( this ); } } TQApplication::sendPostedEvents(); adjustSize(); } -void TQDesignerToolBar::actionRemoved() +void QDesignerToolBar::actionRemoved() { actionList.removeRef( (TQAction*)sender() ); } -TQPoint TQDesignerToolBar::calcIndicatorPos( const TQPoint &pos ) +TQPoint QDesignerToolBar::calcIndicatorPos( const TQPoint &pos ) { if ( orientation() ==Qt::Horizontal ) { TQPoint pnt( width() - 2, 0 ); @@ -632,7 +632,7 @@ TQPoint TQDesignerToolBar::calcIndicatorPos( const TQPoint &pos ) } } -void TQDesignerToolBar::drawIndicator( const TQPoint &pos ) +void QDesignerToolBar::drawIndicator( const TQPoint &pos ) { if ( lastIndicatorPos == pos ) return; @@ -656,7 +656,7 @@ void TQDesignerToolBar::drawIndicator( const TQPoint &pos ) TQApplication::sendPostedEvents(); } -void TQDesignerToolBar::doInsertWidget( const TQPoint &p ) +void QDesignerToolBar::doInsertWidget( const TQPoint &p ) { if ( formWindow != MainWindow::self->formWindow() ) return; @@ -664,7 +664,7 @@ void TQDesignerToolBar::doInsertWidget( const TQPoint &p ) TQWidget *w = WidgetFactory::create( MainWindow::self->currentTool(), this, 0, true ); installEventFilters( w ); MainWindow::self->formWindow()->insertWidget( w, true ); - TQDesignerAction *a = new TQDesignerAction( w, tqparent() ); + QDesignerAction *a = new QDesignerAction( w, tqparent() ); int index = actionList.tqfindRef( *actionMap.tqfind( insertAnchor ) ); if ( index != -1 && afterAnchor ) ++index; @@ -678,16 +678,16 @@ void TQDesignerToolBar::doInsertWidget( const TQPoint &p ) MainWindow::self->resetTool(); } -void TQDesignerToolBar::clear() +void QDesignerToolBar::clear() { for ( TQAction *a = actionList.first(); a; a = actionList.next() ) { - if ( a->inherits( "TQDesignerAction" ) ) - ( (TQDesignerAction*)a )->remove(); + if ( a->inherits( "QDesignerAction" ) ) + ( (QDesignerAction*)a )->remove(); } TQToolBar::clear(); } -void TQDesignerToolBar::installEventFilters( TQWidget *w ) +void QDesignerToolBar::installEventFilters( TQWidget *w ) { if ( !w ) return; @@ -699,7 +699,7 @@ void TQDesignerToolBar::installEventFilters( TQWidget *w ) -TQDesignerMenuBar::TQDesignerMenuBar( TQWidget *mw ) +QDesignerMenuBar::QDesignerMenuBar( TQWidget *mw ) : TQMenuBar( mw, 0 ) { show(); @@ -709,12 +709,12 @@ TQDesignerMenuBar::TQDesignerMenuBar( TQWidget *mw ) mousePressed = false; lastIndicatorPos = TQPoint( -1, -1 ); insertAt = -1; - indicator = new TQDesignerIndicatorWidget( this ); + indicator = new QDesignerIndicatorWidget( this ); indicator->hide(); findFormWindow(); } -void TQDesignerMenuBar::findFormWindow() +void QDesignerMenuBar::findFormWindow() { TQWidget *w = this; while ( w ) { @@ -724,7 +724,7 @@ void TQDesignerMenuBar::findFormWindow() } } -void TQDesignerMenuBar::contextMenuEvent( TQContextMenuEvent *e ) +void QDesignerMenuBar::contextMenuEvent( TQContextMenuEvent *e ) { e->accept(); int itm = itemAtPos( e->pos() ); @@ -742,7 +742,7 @@ void TQDesignerMenuBar::contextMenuEvent( TQContextMenuEvent *e ) RemoveMenuCommand *cmd = new RemoveMenuCommand( i18n("Delete Menu '%1'" ).tqarg( item->text() ), formWindow, (TQMainWindow*)tqparentWidget(), this, - (TQDesignerPopupMenu*)item->popup(), + (QDesignerPopupMenu*)item->popup(), idAt( itm ), itm, item->text() ); formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); @@ -764,7 +764,7 @@ void TQDesignerMenuBar::contextMenuEvent( TQContextMenuEvent *e ) } } -void TQDesignerMenuBar::mousePressEvent( TQMouseEvent *e ) +void QDesignerMenuBar::mousePressEvent( TQMouseEvent *e ) { lastIndicatorPos = TQPoint( -1, -1 ); insertAt = -1; @@ -776,7 +776,7 @@ void TQDesignerMenuBar::mousePressEvent( TQMouseEvent *e ) TQMenuBar::mousePressEvent( e ); } -void TQDesignerMenuBar::mouseMoveEvent( TQMouseEvent *e ) +void QDesignerMenuBar::mouseMoveEvent( TQMouseEvent *e ) { if ( !mousePressed || e->state() == Qt::NoButton ) { TQMenuBar::mouseMoveEvent( e ); @@ -814,7 +814,7 @@ void TQDesignerMenuBar::mouseMoveEvent( TQMouseEvent *e ) mousePressed = false; } -void TQDesignerMenuBar::mouseReleaseEvent( TQMouseEvent *e ) +void QDesignerMenuBar::mouseReleaseEvent( TQMouseEvent *e ) { TQMenuBar::mouseReleaseEvent( e ); mousePressed = false; @@ -822,7 +822,7 @@ void TQDesignerMenuBar::mouseReleaseEvent( TQMouseEvent *e ) #ifndef TQT_NO_DRAGANDDROP -void TQDesignerMenuBar::dragEnterEvent( TQDragEnterEvent *e ) +void QDesignerMenuBar::dragEnterEvent( TQDragEnterEvent *e ) { if ( e->provides( "application/x-designer-actions" ) || e->provides( "application/x-designer-actiongroup" ) || @@ -834,7 +834,7 @@ void TQDesignerMenuBar::dragEnterEvent( TQDragEnterEvent *e ) insertAt = -1; } -void TQDesignerMenuBar::dragMoveEvent( TQDragMoveEvent *e ) +void QDesignerMenuBar::dragMoveEvent( TQDragMoveEvent *e ) { if ( e->provides( "application/x-designer-actions" ) || e->provides( "application/x-designer-menuitem" ) || @@ -860,14 +860,14 @@ void TQDesignerMenuBar::dragMoveEvent( TQDragMoveEvent *e ) } } -void TQDesignerMenuBar::dragLeaveEvent( TQDragLeaveEvent * ) +void QDesignerMenuBar::dragLeaveEvent( TQDragLeaveEvent * ) { mousePressed = false; lastIndicatorPos = TQPoint( -1, -1 ); insertAt = -1; } -void TQDesignerMenuBar::dropEvent( TQDropEvent *e ) +void QDesignerMenuBar::dropEvent( TQDropEvent *e ) { mousePressed = false; if ( !e->provides( "application/x-designer-menuitem" ) ) @@ -881,7 +881,7 @@ void TQDesignerMenuBar::dropEvent( TQDropEvent *e ) insertItem( txt, popup, -1, insertAt ); MoveMenuCommand *cmd = new MoveMenuCommand( i18n("Move Menu '%1'" ).tqarg( txt ), formWindow, - this, (TQDesignerPopupMenu*)popup, oldPos, insertAt, txt ); + this, (QDesignerPopupMenu*)popup, oldPos, insertAt, txt ); // do not execute, we did the work already formWindow->commandHistory()->addCommand( cmd ); @@ -890,7 +890,7 @@ void TQDesignerMenuBar::dropEvent( TQDropEvent *e ) #endif -TQPoint TQDesignerMenuBar::calcIndicatorPos( const TQPoint &pos ) +TQPoint QDesignerMenuBar::calcIndicatorPos( const TQPoint &pos ) { int w = frameWidth(); insertAt = count(); @@ -906,7 +906,7 @@ TQPoint TQDesignerMenuBar::calcIndicatorPos( const TQPoint &pos ) return TQPoint( w, 0 ); } -void TQDesignerMenuBar::drawIndicator( const TQPoint &pos ) +void QDesignerMenuBar::drawIndicator( const TQPoint &pos ) { if ( lastIndicatorPos == pos ) return; @@ -920,38 +920,38 @@ void TQDesignerMenuBar::drawIndicator( const TQPoint &pos ) TQApplication::sendPostedEvents(); } -void TQDesignerMenuBar::setItemNumber( int num ) +void QDesignerMenuBar::setItemNumber( int num ) { itemNum = num; } -int TQDesignerMenuBar::itemNumber() const +int QDesignerMenuBar::itemNumber() const { return itemNum; } -void TQDesignerMenuBar::setItemText( const TQString &s ) +void QDesignerMenuBar::setItemText( const TQString &s ) { if ( itemNum < 0 || itemNum >= (int)count() ) return; changeItem( idAt( itemNum ), s ); } -TQString TQDesignerMenuBar::itemText() const +TQString QDesignerMenuBar::itemText() const { if ( itemNum < 0 || (int)itemNum >= (int)count() ) return TQString(); return text( idAt( itemNum ) ); } -void TQDesignerMenuBar::setItemName( const TQCString &s ) +void QDesignerMenuBar::setItemName( const TQCString &s ) { if ( itemNum < 0 || itemNum >= (int)count() ) return; tqfindItem( idAt( itemNum ) )->popup()->setName( s ); } -TQCString TQDesignerMenuBar::itemName() const +TQCString QDesignerMenuBar::itemName() const { if ( itemNum < 0 || itemNum >= (int)count() ) return ""; @@ -960,7 +960,7 @@ TQCString TQDesignerMenuBar::itemName() const -TQDesignerPopupMenu::TQDesignerPopupMenu( TQWidget *w ) +QDesignerPopupMenu::QDesignerPopupMenu( TQWidget *w ) : TQPopupMenu( w, 0 ), popupMenu( 0 ) { @@ -969,11 +969,11 @@ TQDesignerPopupMenu::TQDesignerPopupMenu( TQWidget *w ) insertAt = -1; mousePressed = false; lastIndicatorPos = TQPoint( -1, -1 ); - indicator = new TQDesignerIndicatorWidget( this ); + indicator = new QDesignerIndicatorWidget( this ); indicator->hide(); } -void TQDesignerPopupMenu::contextMenuEvent( TQContextMenuEvent *e ) +void QDesignerPopupMenu::contextMenuEvent( TQContextMenuEvent *e ) { #if defined( TQ_WS_MAC ) //the mac needs us to use context menu rather than right click e->accept(); @@ -984,7 +984,7 @@ void TQDesignerPopupMenu::contextMenuEvent( TQContextMenuEvent *e ) #endif } -void TQDesignerPopupMenu::mousePressEvent( TQMouseEvent *e ) +void QDesignerPopupMenu::mousePressEvent( TQMouseEvent *e ) { if ( e->button() == Qt::MidButton ) return; @@ -1006,7 +1006,7 @@ void TQDesignerPopupMenu::mousePressEvent( TQMouseEvent *e ) TQPopupMenu::mousePressEvent( e ); } -void TQDesignerPopupMenu::createPopupMenu() +void QDesignerPopupMenu::createPopupMenu() { // actually creates our popup for the popupmenu. TQPopupMenu menu( 0 ); @@ -1018,7 +1018,7 @@ void TQDesignerPopupMenu::createPopupMenu() if ( itm == -1 ) return; TQAction *a = actionList.at( itm ); - if ( a && a->inherits( "TQSeparatorAction" ) ) + if ( a && a->inherits( "QSeparatorAction" ) ) menu.insertItem( i18n("Delete Separator" ), ID_DELETE ); else menu.insertItem( i18n("Delete Item" ), ID_DELETE ); @@ -1037,22 +1037,22 @@ void TQDesignerPopupMenu::createPopupMenu() } else if ( res == ID_SEP ) { TQPoint p( pos() ); calcIndicatorPos( mapFromGlobal( popupPos ) ); - TQAction *a = new TQSeparatorAction( 0 ); + TQAction *a = new QSeparatorAction( 0 ); AddActionToPopupCommand *cmd = new AddActionToPopupCommand( i18n("Add Separator to Popup Menu '%1'" ). arg( name() ), formWindow, a, this, insertAt ); formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); - ( (TQDesignerMenuBar*)( (TQMainWindow*)tqparentWidget() )->menuBar() )->hidePopups(); - ( (TQDesignerMenuBar*)( (TQMainWindow*)tqparentWidget() )->menuBar() )->activateItemAt( -1 ); + ( (QDesignerMenuBar*)( (TQMainWindow*)tqparentWidget() )->menuBar() )->hidePopups(); + ( (QDesignerMenuBar*)( (TQMainWindow*)tqparentWidget() )->menuBar() )->activateItemAt( -1 ); popup( p ); } // set this back to zero so we know a popup (will soon) not exist. popupMenu = 0; } -void TQDesignerPopupMenu::mouseMoveEvent( TQMouseEvent *e ) +void QDesignerPopupMenu::mouseMoveEvent( TQMouseEvent *e ) { if ( !mousePressed || e->state() == Qt::NoButton ) { TQPopupMenu::mouseMoveEvent( e ); @@ -1075,7 +1075,7 @@ void TQDesignerPopupMenu::mouseMoveEvent( TQMouseEvent *e ) cmd->execute(); TQString type = a->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ? TQString( "application/x-designer-actiongroup" ) : - a->inherits( "TQSeparatorAction" ) ? TQString( "application/x-designer-separator" ) : TQString( "application/x-designer-actions" ); + a->inherits( "QSeparatorAction" ) ? TQString( "application/x-designer-separator" ) : TQString( "application/x-designer-actions" ); TQStoredDrag *drag = new TQStoredDrag( type, this ); TQString s = TQString::number( (long)a ); // #### huha, that is evil drag->setEncodedData( TQCString( s.latin1() ) ); @@ -1092,7 +1092,7 @@ void TQDesignerPopupMenu::mouseMoveEvent( TQMouseEvent *e ) mousePressed = false; } -void TQDesignerPopupMenu::mouseReleaseEvent( TQMouseEvent *e ) +void QDesignerPopupMenu::mouseReleaseEvent( TQMouseEvent *e ) { mousePressed = false; TQPopupMenu::mouseReleaseEvent( e ); @@ -1100,7 +1100,7 @@ void TQDesignerPopupMenu::mouseReleaseEvent( TQMouseEvent *e ) #ifndef TQT_NO_DRAGANDDROP -void TQDesignerPopupMenu::dragEnterEvent( TQDragEnterEvent *e ) +void QDesignerPopupMenu::dragEnterEvent( TQDragEnterEvent *e ) { mousePressed = false; lastIndicatorPos = TQPoint( -1, -1 ); @@ -1110,7 +1110,7 @@ void TQDesignerPopupMenu::dragEnterEvent( TQDragEnterEvent *e ) e->accept(); } -void TQDesignerPopupMenu::dragMoveEvent( TQDragMoveEvent *e ) +void QDesignerPopupMenu::dragMoveEvent( TQDragMoveEvent *e ) { mousePressed = false; if ( e->provides( "application/x-designer-actions" ) || @@ -1122,14 +1122,14 @@ void TQDesignerPopupMenu::dragMoveEvent( TQDragMoveEvent *e ) drawIndicator( calcIndicatorPos( e->pos() ) ); } -void TQDesignerPopupMenu::dragLeaveEvent( TQDragLeaveEvent * ) +void QDesignerPopupMenu::dragLeaveEvent( TQDragLeaveEvent * ) { mousePressed = false; indicator->hide(); insertAt = -1; } -void TQDesignerPopupMenu::dropEvent( TQDropEvent *e ) +void QDesignerPopupMenu::dropEvent( TQDropEvent *e ) { mousePressed = false; if ( e->provides( "application/x-designer-actions" ) || @@ -1143,15 +1143,15 @@ void TQDesignerPopupMenu::dropEvent( TQDropEvent *e ) TQAction *a = 0; if ( e->provides( "application/x-designer-actiongroup" ) ) { TQString s( e->tqencodedData( "application/x-designer-actiongroup" ) ); - a = (TQDesignerActionGroup*)s.toLong(); + a = (QDesignerActionGroup*)s.toLong(); } else { TQString s; if ( e->provides( "application/x-designer-separator" ) ) { s = TQString( e->tqencodedData( "application/x-designer-separator" ) ); - a = (TQSeparatorAction*)s.toLong(); + a = (QSeparatorAction*)s.toLong(); } else { s = TQString( e->tqencodedData( "application/x-designer-actions" ) ); - a = (TQDesignerAction*)s.toLong(); + a = (QDesignerAction*)s.toLong(); } } @@ -1169,22 +1169,22 @@ void TQDesignerPopupMenu::dropEvent( TQDropEvent *e ) formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); - ( (TQDesignerMenuBar*)( (TQMainWindow*)tqparentWidget() )->menuBar() )->hidePopups(); - ( (TQDesignerMenuBar*)( (TQMainWindow*)tqparentWidget() )->menuBar() )->activateItemAt( -1 ); + ( (QDesignerMenuBar*)( (TQMainWindow*)tqparentWidget() )->menuBar() )->hidePopups(); + ( (QDesignerMenuBar*)( (TQMainWindow*)tqparentWidget() )->menuBar() )->activateItemAt( -1 ); indicator->hide(); popup( p ); } #endif -void TQDesignerPopupMenu::reInsert() +void QDesignerPopupMenu::reInsert() { clear(); for ( TQAction *a = actionList.first(); a; a = actionList.next() ) a->addTo( this ); } -void TQDesignerPopupMenu::drawIndicator( const TQPoint &pos ) +void QDesignerPopupMenu::drawIndicator( const TQPoint &pos ) { if ( lastIndicatorPos == pos ) return; @@ -1198,7 +1198,7 @@ void TQDesignerPopupMenu::drawIndicator( const TQPoint &pos ) TQApplication::sendPostedEvents(); } -TQPoint TQDesignerPopupMenu::calcIndicatorPos( const TQPoint &pos ) +TQPoint QDesignerPopupMenu::calcIndicatorPos( const TQPoint &pos ) { int h = frameWidth(); insertAt = count(); @@ -1214,18 +1214,18 @@ TQPoint TQDesignerPopupMenu::calcIndicatorPos( const TQPoint &pos ) return TQPoint( 0, h ); } -void TQDesignerPopupMenu::addAction( TQAction *a ) +void QDesignerPopupMenu::addAction( TQAction *a ) { actionList.append( a ); connect( a, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( actionRemoved() ) ); } -void TQDesignerPopupMenu::actionRemoved() +void QDesignerPopupMenu::actionRemoved() { actionList.removeRef( (TQAction*)sender() ); } -void TQDesignerPopupMenu::paintEvent( TQPaintEvent *e ) +void QDesignerPopupMenu::paintEvent( TQPaintEvent *e ) { TQPopupMenu::paintEvent( e ); if ( e->rect() != rect() ) @@ -1233,7 +1233,7 @@ void TQDesignerPopupMenu::paintEvent( TQPaintEvent *e ) lastIndicatorPos = TQPoint( -1, -1 ); } -void TQDesignerPopupMenu::findFormWindow() +void QDesignerPopupMenu::findFormWindow() { TQWidget *w = this; while ( w ) { diff --git a/kommander/editor/actiondnd.h b/kommander/editor/actiondnd.h index 5d1c314d..66a87c5b 100644 --- a/kommander/editor/actiondnd.h +++ b/kommander/editor/actiondnd.h @@ -30,17 +30,17 @@ #include #include -class TQDesignerPopupMenu; -class TQDesignerIndicatorWidget; +class QDesignerPopupMenu; +class QDesignerIndicatorWidget; class FormWindow; -class TQDesignerActionGroup : public TQActionGroup +class QDesignerActionGroup : public TQActionGroup { Q_OBJECT TQ_OBJECT public: - TQDesignerActionGroup( TQObject *tqparent ) + QDesignerActionGroup( TQObject *tqparent ) : TQActionGroup( !tqparent || tqparent->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ? tqparent : 0 ), wid( 0 ), idx( -1 ) {} TQWidget *widget() const { return wid; } @@ -65,15 +65,15 @@ private: }; -class TQDesignerAction : public TQAction +class QDesignerAction : public TQAction { Q_OBJECT TQ_OBJECT public: - TQDesignerAction( TQObject *tqparent ) + QDesignerAction( TQObject *tqparent ) : TQAction( !tqparent || tqparent->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ? tqparent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( 0 ) {} - TQDesignerAction( TQWidget *w, TQObject *tqparent ) + QDesignerAction( TQWidget *w, TQObject *tqparent ) : TQAction( !tqparent || tqparent->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ? tqparent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( w ) {} TQWidget *widget() const { return wid; } @@ -100,13 +100,13 @@ private: }; -class TQDesignerToolBarSeparator : public TQWidget +class QDesignerToolBarSeparator : public TQWidget { Q_OBJECT TQ_OBJECT public: - TQDesignerToolBarSeparator( Qt::Orientation, TQToolBar *tqparent, const char* name=0 ); + QDesignerToolBarSeparator( Qt::Orientation, TQToolBar *tqparent, const char* name=0 ); TQSize tqsizeHint() const; Qt::Orientation orientation() const { return orient; } @@ -120,13 +120,13 @@ private: }; -class TQSeparatorAction : public TQAction +class QSeparatorAction : public TQAction { Q_OBJECT TQ_OBJECT public: - TQSeparatorAction( TQObject *tqparent ); + QSeparatorAction( TQObject *tqparent ); bool addTo( TQWidget *w ); bool removeFrom( TQWidget *w ); @@ -139,14 +139,14 @@ private: }; -class TQDesignerToolBar : public TQToolBar +class QDesignerToolBar : public TQToolBar { Q_OBJECT TQ_OBJECT public: - TQDesignerToolBar( TQMainWindow *mw ); - TQDesignerToolBar( TQMainWindow *mw, Dock dock ); + QDesignerToolBar( TQMainWindow *mw ); + QDesignerToolBar( TQMainWindow *mw, Dock dock ); TQPtrList insertedActions() const { return actionList; } void addAction( TQAction *a ); @@ -192,24 +192,24 @@ private: TQPtrList actionList; TQMap actionMap; TQPoint dragStartPos; - TQDesignerIndicatorWidget *indicator; + QDesignerIndicatorWidget *indicator; bool widgetInserting; FormWindow *formWindow; }; -class TQDesignerMenuBar : public TQMenuBar +class QDesignerMenuBar : public TQMenuBar { Q_OBJECT TQ_OBJECT - friend class TQDesignerPopupMenu; + friend class QDesignerPopupMenu; TQ_PROPERTY( int itemNumber WRITE setItemNumber READ itemNumber ) TQ_PROPERTY( TQString itemText WRITE setItemText READ itemText ) TQ_PROPERTY( TQCString itemName WRITE setItemName READ itemName ) public: - TQDesignerMenuBar( TQWidget *mw ); + QDesignerMenuBar( TQWidget *mw ); void setItemNumber( int num ); int itemNumber() const; @@ -241,19 +241,19 @@ private: bool mousePressed; TQPoint lastIndicatorPos; int insertAt; - TQDesignerIndicatorWidget *indicator; + QDesignerIndicatorWidget *indicator; FormWindow *formWindow; int oldPos; }; -class TQDesignerPopupMenu : public TQPopupMenu +class QDesignerPopupMenu : public TQPopupMenu { Q_OBJECT TQ_OBJECT public: - TQDesignerPopupMenu( TQWidget *w ); + QDesignerPopupMenu( TQWidget *w ); TQPtrList insertedActions() const { return actionList; } void addAction( TQAction *a ); void reInsert(); @@ -288,7 +288,7 @@ private: TQPtrList actionList; TQPoint dragStartPos; bool mousePressed; - TQDesignerIndicatorWidget *indicator; + QDesignerIndicatorWidget *indicator; FormWindow *formWindow; TQGuardedPtr popupMenu; TQPoint popupPos; @@ -296,13 +296,13 @@ private: }; -class TQDesignerIndicatorWidget : public TQWidget +class QDesignerIndicatorWidget : public TQWidget { Q_OBJECT TQ_OBJECT public: - TQDesignerIndicatorWidget( TQWidget *p ) + QDesignerIndicatorWidget( TQWidget *p ) : TQWidget( p, "qt_dockwidget_internal" ) { setBackgroundColor( red ); } diff --git a/kommander/editor/actionlistview.cpp b/kommander/editor/actionlistview.cpp index 20a0ee4e..70b9edbe 100644 --- a/kommander/editor/actionlistview.cpp +++ b/kommander/editor/actionlistview.cpp @@ -38,9 +38,9 @@ ActionItem::ActionItem( TQListView *lv, TQAction *ac ) : TQListViewItem( lv ), a( 0 ), g( 0 ) { if ( ac->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ) - g = (TQDesignerActionGroup*)ac; + g = (QDesignerActionGroup*)ac; else - a = (TQDesignerAction*)ac; + a = (QDesignerAction*)ac; setDragEnabled( true ); } @@ -48,9 +48,9 @@ ActionItem::ActionItem( TQListViewItem *i, TQAction *ac ) : TQListViewItem( i ), a( 0 ), g( 0 ) { if ( ac->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ) - g = (TQDesignerActionGroup*)ac; + g = (QDesignerActionGroup*)ac; else - a = (TQDesignerAction*)ac; + a = (QDesignerAction*)ac; setDragEnabled( true ); moveToEnd(); } diff --git a/kommander/editor/actionlistview.h b/kommander/editor/actionlistview.h index 53a5fda6..3b9deca7 100644 --- a/kommander/editor/actionlistview.h +++ b/kommander/editor/actionlistview.h @@ -29,24 +29,24 @@ class ActionItem : public TQListViewItem public: ActionItem( TQListView *lv, bool group ) : TQListViewItem( lv ), - a( group ? 0 : new TQDesignerAction( 0 ) ), - g( group ? new TQDesignerActionGroup( 0 ) : 0 ) { setDragEnabled( TRUE ); } + a( group ? 0 : new QDesignerAction( 0 ) ), + g( group ? new QDesignerActionGroup( 0 ) : 0 ) { setDragEnabled( TRUE ); } ActionItem( TQListView *lv, TQAction *ac ); ActionItem( TQListViewItem *i, TQAction *ac ); ActionItem( ActionItem *tqparent, bool group = FALSE ) : TQListViewItem( tqparent ), - a( group ? 0 : new TQDesignerAction( tqparent->actionGroup() ) ), - g( group ? new TQDesignerActionGroup( tqparent->actionGroup() ) : 0 ) { setDragEnabled( TRUE ); moveToEnd(); } + a( group ? 0 : new QDesignerAction( tqparent->actionGroup() ) ), + g( group ? new QDesignerActionGroup( tqparent->actionGroup() ) : 0 ) { setDragEnabled( TRUE ); moveToEnd(); } - TQDesignerAction *action() const { return a; } - TQDesignerActionGroup *actionGroup() const { return g; } + QDesignerAction *action() const { return a; } + QDesignerActionGroup *actionGroup() const { return g; } private: void moveToEnd(); private: - TQDesignerAction *a; - TQDesignerActionGroup *g; + QDesignerAction *a; + QDesignerActionGroup *g; }; diff --git a/kommander/editor/command.cpp b/kommander/editor/command.cpp index a549c915..e20ba086 100644 --- a/kommander/editor/command.cpp +++ b/kommander/editor/command.cpp @@ -806,7 +806,7 @@ AddTabPageCommand::AddTabPageCommand( const TQString &n, FormWindow *fw, TQTabWidget *tw, const TQString &label ) : Command( n, fw ), tabWidget( tw ), tabLabel( label ) { - tabPage = new TQDesignerWidget( formWindow(), tabWidget, "tab" ); + tabPage = new QDesignerWidget( formWindow(), tabWidget, "tab" ); tabPage->hide(); index = -1; MetaDataBase::addEntry( TQT_TQOBJECT(tabPage) ); @@ -815,7 +815,7 @@ AddTabPageCommand::AddTabPageCommand( const TQString &n, FormWindow *fw, void AddTabPageCommand::execute() { if ( index == -1 ) - index = ( (TQDesignerTabWidget*)tabWidget )->count(); + index = ( (QDesignerTabWidget*)tabWidget )->count(); tabWidget->insertTab( tabPage, tabLabel, index ); tabWidget->showPage( tabPage ); formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); @@ -837,7 +837,7 @@ AddToolBoxPageCommand::AddToolBoxPageCommand( const TQString &n, FormWindow *fw, TQToolBox *tw, const TQString &_label ) : Command( n, fw ), toolBox( tw ), label( _label ) { - page = new TQDesignerWidget( formWindow(), toolBox, "tab" ); + page = new QDesignerWidget( formWindow(), toolBox, "tab" ); page->hide(); index = -1; MetaDataBase::addEntry( TQT_TQOBJECT(page) ); @@ -873,18 +873,18 @@ MoveTabPageCommand::MoveTabPageCommand( const TQString &n, FormWindow *fw, void MoveTabPageCommand::execute() { - ((TQDesignerTabWidget*)tabWidget )->removePage( tabPage ); - ((TQDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, newIndex ); - ((TQDesignerTabWidget*)tabWidget )->showPage( tabPage ); + ((QDesignerTabWidget*)tabWidget )->removePage( tabPage ); + ((QDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, newIndex ); + ((QDesignerTabWidget*)tabWidget )->showPage( tabPage ); formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); } void MoveTabPageCommand::unexecute() { - ((TQDesignerTabWidget*)tabWidget )->removePage( tabPage ); - ((TQDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, oldIndex ); - ((TQDesignerTabWidget*)tabWidget )->showPage( tabPage ); + ((QDesignerTabWidget*)tabWidget )->removePage( tabPage ); + ((QDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, oldIndex ); + ((QDesignerTabWidget*)tabWidget )->showPage( tabPage ); formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); } @@ -895,8 +895,8 @@ DeleteTabPageCommand::DeleteTabPageCommand( const TQString &n, FormWindow *fw, TQTabWidget *tw, TQWidget *page ) : Command( n, fw ), tabWidget( tw ), tabPage( page ) { - tabLabel = ( (TQDesignerTabWidget*)tabWidget )->pageTitle(); - index = ( (TQDesignerTabWidget*)tabWidget )->currentPage(); + tabLabel = ( (QDesignerTabWidget*)tabWidget )->pageTitle(); + index = ( (QDesignerTabWidget*)tabWidget )->currentPage(); } void DeleteTabPageCommand::execute() @@ -947,7 +947,7 @@ AddWizardPageCommand::AddWizardPageCommand( const TQString &n, FormWindow *fw, TQWizard *w, const TQString &label, int i, bool s ) : Command( n, fw ), wizard( w ), pageLabel( label ) { - page = new TQDesignerWidget( formWindow(), wizard, "page" ); + page = new QDesignerWidget( formWindow(), wizard, "page" ); page->hide(); index = i; show = s; @@ -960,7 +960,7 @@ void AddWizardPageCommand::execute() index = wizard->pageCount(); wizard->insertPage( page, pageLabel, index ); if ( show ) - ( (TQDesignerWizard*)wizard )->setCurrentPage( ( (TQDesignerWizard*)wizard )->pageNum( page ) ); + ( (QDesignerWizard*)wizard )->setCurrentPage( ( (QDesignerWizard*)wizard )->pageNum( page ) ); formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); } @@ -996,7 +996,7 @@ void DeleteWizardPageCommand::unexecute() { wizard->insertPage( page, pageLabel, index ); if ( show ) - ( (TQDesignerWizard*)wizard )->setCurrentPage( ( (TQDesignerWizard*)wizard )->pageNum( page ) ); + ( (QDesignerWizard*)wizard )->setCurrentPage( ( (QDesignerWizard*)wizard )->pageNum( page ) ); formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); } @@ -1576,7 +1576,7 @@ void PopulateTableCommand::unexecute() // ------------------------------------------------------------ AddActionToToolBarCommand::AddActionToToolBarCommand( const TQString &n, FormWindow *fw, - TQAction *a, TQDesignerToolBar *tb, int idx ) + TQAction *a, QDesignerToolBar *tb, int idx ) : Command( n, fw ), action( a ), toolBar( tb ), index( idx ) { } @@ -1585,25 +1585,25 @@ void AddActionToToolBarCommand::execute() { action->addTo( toolBar ); - if ( action->inherits( "TQDesignerAction" ) ) { - TQString s = ( (TQDesignerAction*)action )->widget()->name(); + if ( action->inherits( "QDesignerAction" ) ) { + TQString s = ( (QDesignerAction*)action )->widget()->name(); if ( s.startsWith( "qt_dead_widget_" ) ) { s.remove( 0, TQString( "qt_dead_widget_" ).length() ); - ( (TQDesignerAction*)action )->widget()->setName( s ); + ( (QDesignerAction*)action )->widget()->setName( s ); } } - if ( action->inherits( "TQDesignerAction" ) ) { - toolBar->insertAction( ( (TQDesignerAction*)action )->widget(), action ); - ( (TQDesignerAction*)action )->widget()->installEventFilter( toolBar ); - } else if ( action->inherits( "TQDesignerActionGroup" ) ) { - if ( ( (TQDesignerActionGroup*)action )->usesDropDown() ) { - toolBar->insertAction( ( (TQDesignerActionGroup*)action )->widget(), action ); - ( (TQDesignerActionGroup*)action )->widget()->installEventFilter( toolBar ); + if ( action->inherits( "QDesignerAction" ) ) { + toolBar->insertAction( ( (QDesignerAction*)action )->widget(), action ); + ( (QDesignerAction*)action )->widget()->installEventFilter( toolBar ); + } else if ( action->inherits( "QDesignerActionGroup" ) ) { + if ( ( (QDesignerActionGroup*)action )->usesDropDown() ) { + toolBar->insertAction( ( (QDesignerActionGroup*)action )->widget(), action ); + ( (QDesignerActionGroup*)action )->widget()->installEventFilter( toolBar ); } - } else if ( action->inherits( "TQSeparatorAction" ) ) { - toolBar->insertAction( ( (TQSeparatorAction*)action )->widget(), action ); - ( (TQSeparatorAction*)action )->widget()->installEventFilter( toolBar ); + } else if ( action->inherits( "QSeparatorAction" ) ) { + toolBar->insertAction( ( (QSeparatorAction*)action )->widget(), action ); + ( (QSeparatorAction*)action )->widget()->installEventFilter( toolBar ); } if ( !action->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) || ( (TQActionGroup*)action )->usesDropDown()) { if ( index == -1 ) @@ -1623,8 +1623,8 @@ void AddActionToToolBarCommand::execute() if ( !o->inherits( TQACTION_OBJECT_NAME_STRING ) ) continue; // ### fix it for nested actiongroups - if ( o->inherits( "TQDesignerAction" ) ) { - TQDesignerAction *ac = (TQDesignerAction*)o; + if ( o->inherits( "QDesignerAction" ) ) { + QDesignerAction *ac = (QDesignerAction*)o; toolBar->insertAction( ac->widget(), ac ); ac->widget()->installEventFilter( toolBar ); if ( index == -1 ) @@ -1641,10 +1641,10 @@ void AddActionToToolBarCommand::execute() void AddActionToToolBarCommand::unexecute() { - if ( action->inherits( "TQDesignerAction" ) ) { - TQString s = ( (TQDesignerAction*)action )->widget()->name(); + if ( action->inherits( "QDesignerAction" ) ) { + TQString s = ( (QDesignerAction*)action )->widget()->name(); s.prepend( "qt_dead_widget_" ); - ( (TQDesignerAction*)action )->widget()->setName( s ); + ( (QDesignerAction*)action )->widget()->setName( s ); } toolBar->removeAction( action ); @@ -1661,7 +1661,7 @@ void AddActionToToolBarCommand::unexecute() ++it; if ( !o->inherits( TQACTION_OBJECT_NAME_STRING ) ) continue; - if ( o->inherits( "TQDesignerAction" ) ) { + if ( o->inherits( "QDesignerAction" ) ) { o->removeEventFilter( toolBar ); toolBar->removeAction( (TQAction*)o ); } @@ -1673,7 +1673,7 @@ void AddActionToToolBarCommand::unexecute() // ------------------------------------------------------------ AddActionToPopupCommand::AddActionToPopupCommand( const TQString &n, FormWindow *fw, - TQAction *a, TQDesignerPopupMenu *p, int idx ) + TQAction *a, QDesignerPopupMenu *p, int idx ) : Command( n, fw ), action( a ), popup( p ), index( idx ) { } @@ -1695,7 +1695,7 @@ void AddActionToPopupCommand::execute() ++it; if ( !o->inherits( TQACTION_OBJECT_NAME_STRING ) ) continue; - TQDesignerAction *ac = (TQDesignerAction*)o; + QDesignerAction *ac = (QDesignerAction*)o; popup->insertAction( index + (i++), ac ); } } @@ -1703,7 +1703,7 @@ void AddActionToPopupCommand::execute() popup->reInsert(); TQObject::connect( action, TQT_SIGNAL( destroyed() ), popup, TQT_SLOT( actionRemoved() ) ); } else { - if ( !action->inherits( "TQDesignerAction" ) || ( (TQDesignerAction*)action )->supportsMenu() ) { + if ( !action->inherits( "QDesignerAction" ) || ( (QDesignerAction*)action )->supportsMenu() ) { action->addTo( popup ); popup->insertAction( index, action ); popup->reInsert(); @@ -1728,7 +1728,7 @@ void AddActionToPopupCommand::unexecute() ++it; if ( !o->inherits( TQACTION_OBJECT_NAME_STRING ) ) continue; - if ( o->inherits( "TQDesignerAction" ) ) { + if ( o->inherits( "QDesignerAction" ) ) { o->removeEventFilter( popup ); popup->removeAction( (TQAction*)o ); } @@ -1748,15 +1748,15 @@ void AddMenuCommand::execute() { if ( !popup ) { TQString n = "PopupMenu"; - popup = new TQDesignerPopupMenu( mainWindow ); + popup = new QDesignerPopupMenu( mainWindow ); formWindow()->unify( TQT_TQOBJECT(popup), n, true ); popup->setName( n ); } if ( !mainWindow->child( 0, TQMENUBAR_OBJECT_NAME_STRING ) ) { - menuBar = new TQDesignerMenuBar( (TQWidget*)mainWindow ); + menuBar = new QDesignerMenuBar( (TQWidget*)mainWindow ); menuBar->setName( "menubar" ); } else { - menuBar = (TQDesignerMenuBar*)mainWindow->menuBar(); + menuBar = (QDesignerMenuBar*)mainWindow->menuBar(); } if ( id == -1 ) id = mainWindow->menuBar()->insertItem( name, popup ); @@ -1775,7 +1775,7 @@ void AddMenuCommand::unexecute() // ------------------------------------------------------------ -RenameMenuCommand::RenameMenuCommand( const TQString &n, FormWindow *fw, TQDesignerMenuBar *mb, +RenameMenuCommand::RenameMenuCommand( const TQString &n, FormWindow *fw, QDesignerMenuBar *mb, int i, const TQString &on, const TQString &nn ) : Command( n, fw ), menuBar( mb ), id( i ), oldName( on ), newName( nn ) { @@ -1795,8 +1795,8 @@ void RenameMenuCommand::unexecute() // ------------------------------------------------------------ -MoveMenuCommand::MoveMenuCommand( const TQString &n, FormWindow *fw, TQDesignerMenuBar *mb, - TQDesignerPopupMenu *p, int fidx, int tidx, const TQString &txt ) +MoveMenuCommand::MoveMenuCommand( const TQString &n, FormWindow *fw, QDesignerMenuBar *mb, + QDesignerPopupMenu *p, int fidx, int tidx, const TQString &txt ) : Command( n, fw ), menuBar( mb ), popup( p ), fromIdx( fidx ), toIdx( tidx ), text( txt ) { } @@ -1825,7 +1825,7 @@ AddToolBarCommand::AddToolBarCommand( const TQString &n, FormWindow *fw, TQMainW void AddToolBarCommand::execute() { if ( !toolBar ) { - toolBar = new TQDesignerToolBar( mainWindow ); + toolBar = new QDesignerToolBar( mainWindow ); TQString n = "Toolbar"; formWindow()->unify( TQT_TQOBJECT(toolBar), n, true ); toolBar->setName( n ); diff --git a/kommander/editor/command.h b/kommander/editor/command.h index 3fd83e1c..f56e21a6 100644 --- a/kommander/editor/command.h +++ b/kommander/editor/command.h @@ -44,10 +44,10 @@ class TQIconView; class TQMultiLineEdit; class TQTable; class TQAction; -class TQDesignerToolBar; +class QDesignerToolBar; class TQMainWindow; -class TQDesignerPopupMenu; -class TQDesignerMenuBar; +class QDesignerPopupMenu; +class QDesignerMenuBar; class TQToolBox; class Command : public TQt @@ -779,7 +779,7 @@ class AddActionToToolBarCommand : public Command { public: AddActionToToolBarCommand( const TQString &n, FormWindow *fw, - TQAction *a, TQDesignerToolBar *tb, int idx ); + TQAction *a, QDesignerToolBar *tb, int idx ); void execute(); void unexecute(); @@ -787,7 +787,7 @@ public: private: TQAction *action; - TQDesignerToolBar *toolBar; + QDesignerToolBar *toolBar; int index; }; @@ -796,7 +796,7 @@ class RemoveActionFromToolBarCommand : public AddActionToToolBarCommand { public: RemoveActionFromToolBarCommand( const TQString &n, FormWindow *fw, - TQAction *a, TQDesignerToolBar *tb, int idx ) + TQAction *a, QDesignerToolBar *tb, int idx ) : AddActionToToolBarCommand( n, fw, a, tb, idx ) {} void execute() { AddActionToToolBarCommand::unexecute(); } @@ -809,7 +809,7 @@ class AddActionToPopupCommand : public Command { public: AddActionToPopupCommand( const TQString &n, FormWindow *fw, - TQAction *a, TQDesignerPopupMenu *p, int idx ); + TQAction *a, QDesignerPopupMenu *p, int idx ); void execute(); void unexecute(); @@ -817,7 +817,7 @@ public: private: TQAction *action; - TQDesignerPopupMenu *popup; + QDesignerPopupMenu *popup; int index; }; @@ -826,7 +826,7 @@ class RemoveActionFromPopupCommand : public AddActionToPopupCommand { public: RemoveActionFromPopupCommand( const TQString &n, FormWindow *fw, - TQAction *a, TQDesignerPopupMenu *p, int idx ) + TQAction *a, QDesignerPopupMenu *p, int idx ) : AddActionToPopupCommand( n, fw, a, p, idx ) {} void execute() { AddActionToPopupCommand::unexecute(); } @@ -845,8 +845,8 @@ public: Type type() const { return AddMenu; } protected: - TQDesignerMenuBar *menuBar; - TQDesignerPopupMenu *popup; + QDesignerMenuBar *menuBar; + QDesignerPopupMenu *popup; TQMainWindow *mainWindow; int id; int index; @@ -858,7 +858,7 @@ class RemoveMenuCommand : public AddMenuCommand { public: RemoveMenuCommand( const TQString &n, FormWindow *fw, TQMainWindow *mw, - TQDesignerMenuBar *mb, TQDesignerPopupMenu *p, int i, int idx, const TQString &mn ) + QDesignerMenuBar *mb, QDesignerPopupMenu *p, int i, int idx, const TQString &mn ) : AddMenuCommand( n, fw, mw ) { menuBar = mb; popup = p; id = i; index = idx, name = mn; } void execute() { AddMenuCommand::unexecute(); } @@ -870,7 +870,7 @@ public: class RenameMenuCommand : public Command { public: - RenameMenuCommand( const TQString &n, FormWindow *fw, TQDesignerMenuBar *mb, + RenameMenuCommand( const TQString &n, FormWindow *fw, QDesignerMenuBar *mb, int i, const TQString &on, const TQString &nn ); void execute(); @@ -878,7 +878,7 @@ public: Type type() const { return RenameMenu; } private: - TQDesignerMenuBar *menuBar; + QDesignerMenuBar *menuBar; int id; TQString oldName, newName; @@ -887,16 +887,16 @@ private: class MoveMenuCommand : public Command { public: - MoveMenuCommand( const TQString &n, FormWindow *fw, TQDesignerMenuBar *mb, - TQDesignerPopupMenu *p, int fidx, int tidx, const TQString &txt ); + MoveMenuCommand( const TQString &n, FormWindow *fw, QDesignerMenuBar *mb, + QDesignerPopupMenu *p, int fidx, int tidx, const TQString &txt ); void execute(); void unexecute(); Type type() const { return MoveMenu; } private: - TQDesignerMenuBar *menuBar; - TQDesignerPopupMenu *popup; + QDesignerMenuBar *menuBar; + QDesignerPopupMenu *popup; int fromIdx, toIdx; TQString text; @@ -912,7 +912,7 @@ public: Type type() const { return AddToolBar; } protected: - TQDesignerToolBar *toolBar; + QDesignerToolBar *toolBar; TQMainWindow *mainWindow; }; @@ -920,7 +920,7 @@ protected: class RemoveToolBarCommand : public AddToolBarCommand { public: - RemoveToolBarCommand( const TQString &n, FormWindow *fw, TQMainWindow *mw, TQDesignerToolBar *tb ) + RemoveToolBarCommand( const TQString &n, FormWindow *fw, TQMainWindow *mw, QDesignerToolBar *tb ) : AddToolBarCommand( n, fw, mw ) { toolBar = tb; } void execute() { AddToolBarCommand::unexecute(); } diff --git a/kommander/editor/formwindow.cpp b/kommander/editor/formwindow.cpp index 2218a977..f3228b6f 100644 --- a/kommander/editor/formwindow.cpp +++ b/kommander/editor/formwindow.cpp @@ -1107,7 +1107,7 @@ void FormWindow::selectWidget(TQObject * o, bool select) return; } - if (o->inherits("TQDesignerToolBar") || o->inherits("TQDesignerMenuBar")) + if (o->inherits("QDesignerToolBar") || o->inherits("QDesignerMenuBar")) return; if (select) @@ -1414,7 +1414,7 @@ void FormWindow::deleteWidgets() if (!(tb = mainWindow()->isAToolBarChild(TQT_TQOBJECT(it.current()->widget())))) widgets.append(it.current()->widget()); else - ((TQDesignerToolBar *) tb)->removeWidget(it.current()->widget()); + ((QDesignerToolBar *) tb)->removeWidget(it.current()->widget()); } if (widgets.isEmpty()) @@ -2328,7 +2328,7 @@ bool FormWindow::unify(TQObject *w, TQString &s, bool changeIt) } if (!found) { - TQObjectList *l = mainContainer()->queryList("TQDesignerPopupMenu", 0, true); + TQObjectList *l = mainContainer()->queryList("QDesignerPopupMenu", 0, true); for (TQObject *o = l->first(); o; o = l->next()) if (o != w && !qstrcmp(o->name(), s.latin1())) { @@ -2376,8 +2376,8 @@ bool FormWindow::isDatabaseWidgetUsed() const bool FormWindow::isDatabaseAware() const { #ifndef TQT_NO_SQL - if (TQString(mContainer->className()) == "TQDesignerDataBrowser" || - TQString(mContainer->className()) == "TQDesignerDataView") + if (TQString(mContainer->className()) == "QDesignerDataBrowser" || + TQString(mContainer->className()) == "QDesignerDataView") return true; return isDatabaseWidgetUsed(); #else diff --git a/kommander/editor/hierarchyview.cpp b/kommander/editor/hierarchyview.cpp index 5907b348..03c6385e 100644 --- a/kommander/editor/hierarchyview.cpp +++ b/kommander/editor/hierarchyview.cpp @@ -262,7 +262,7 @@ void HierarchyList::objectClicked( TQListViewItem *i ) if ( w->tqparent()->tqparent()->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ) ( (TQTabWidget*)w->tqparent()->tqparent() )->showPage( w ); else - ( (TQDesignerWizard*)w->tqparent()->tqparent() )->setCurrentPage( ( (TQDesignerWizard*)w->tqparent()->tqparent() )->pageNum( w ) ); + ( (QDesignerWizard*)w->tqparent()->tqparent() )->setCurrentPage( ( (QDesignerWizard*)w->tqparent()->tqparent() )->pageNum( w ) ); w = (TQWidget*)w->tqparent()->tqparent(); formWindow->emitUpdateProperties( TQT_TQOBJECT(formWindow->currentWidget()) ); } else { @@ -434,12 +434,12 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *tqparent ) it.current()->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) ) { TQObject *obj = it.current(); TQObjectList *l2 = obj->queryList( TQWIDGET_OBJECT_NAME_STRING, 0, true, false ); - TQDesignerTabWidget *tw = 0; - TQDesignerWizard *dw = 0; + QDesignerTabWidget *tw = 0; + QDesignerWizard *dw = 0; if ( it.current()->tqparent()->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ) - tw = (TQDesignerTabWidget*)it.current()->tqparent(); + tw = (QDesignerTabWidget*)it.current()->tqparent(); if ( it.current()->tqparent()->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) - dw = (TQDesignerWizard*)it.current()->tqparent(); + dw = (QDesignerWizard*)it.current()->tqparent(); TQWidgetStack *stack = (TQWidgetStack*)obj; for ( obj = l2->last(); obj; obj = l2->prev() ) { if ( qstrcmp( obj->className(), "TQWidgetStackPrivate::Invisible" ) == 0 || @@ -537,7 +537,7 @@ void HierarchyList::removeTabPage() if ( w->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ) { TQTabWidget *tw = (TQTabWidget*)w; if ( tw->currentPage() ) { - TQDesignerTabWidget *dtw = (TQDesignerTabWidget*)tw; + QDesignerTabWidget *dtw = (QDesignerTabWidget*)tw; DeleteTabPageCommand *cmd = new DeleteTabPageCommand( i18n("Delete Page %1 of %2" ). tqarg( dtw->pageTitle() ).tqarg( tw->name() ), formWindow, tw, tw->currentPage() ); @@ -547,7 +547,7 @@ void HierarchyList::removeTabPage() } else if ( w->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) { TQWizard *wiz = (TQWizard*)formWindow->mainContainer(); if ( wiz->currentPage() ) { - TQDesignerWizard *dw = (TQDesignerWizard*)wiz; + QDesignerWizard *dw = (QDesignerWizard*)wiz; DeleteWizardPageCommand *cmd = new DeleteWizardPageCommand( i18n("Delete Page %1 of %2" ). tqarg( dw->pageTitle() ).tqarg( wiz->name() ), formWindow, wiz, diff --git a/kommander/editor/hierarchyview.h b/kommander/editor/hierarchyview.h index f3f1fc91..68215bda 100644 --- a/kommander/editor/hierarchyview.h +++ b/kommander/editor/hierarchyview.h @@ -25,7 +25,7 @@ #include #include #include -#include +#include class FormWindow; class TQCloseEvent; diff --git a/kommander/editor/layout.cpp b/kommander/editor/layout.cpp index 998b4fce..1b55de9c 100644 --- a/kommander/editor/layout.cpp +++ b/kommander/editor/layout.cpp @@ -733,7 +733,7 @@ void GridLayout::doLayout() if ( !prepareLayout( needMove, needRetqparent ) ) return; - TQDesignerGridLayout *tqlayout = (TQDesignerGridLayout*)WidgetFactory::createLayout( tqlayoutBase, 0, WidgetFactory::Grid ); + QDesignerGridLayout *tqlayout = (QDesignerGridLayout*)WidgetFactory::createLayout( tqlayoutBase, 0, WidgetFactory::Grid ); if ( !grid ) buildGrid(); @@ -941,13 +941,13 @@ void Spacer::setOrientation( Qt::Orientation o ) } -void TQDesignerGridLayout::addWidget( TQWidget *w, int row, int col, int align_ ) +void QDesignerGridLayout::addWidget( TQWidget *w, int row, int col, int align_ ) { items.insert( w, Item(row, col, 1, 1) ); TQGridLayout::addWidget( w, row, col, align_ ); } -void TQDesignerGridLayout::addMultiCellWidget( TQWidget *w, int fromRow, int toRow, +void QDesignerGridLayout::addMultiCellWidget( TQWidget *w, int fromRow, int toRow, int fromCol, int toCol, int align_ ) { items.insert( w, Item(fromRow, fromCol, toRow - fromRow + 1, toCol - fromCol +1) ); diff --git a/kommander/editor/layout.h b/kommander/editor/layout.h index 107a4083..831ce507 100644 --- a/kommander/editor/layout.h +++ b/kommander/editor/layout.h @@ -154,13 +154,13 @@ protected: TQSize sh; }; -class TQDesignerGridLayout : public TQGridLayout +class QDesignerGridLayout : public TQGridLayout { Q_OBJECT TQ_OBJECT public: - TQDesignerGridLayout( TQWidget *tqparent ) : TQGridLayout( tqparent ){}; - TQDesignerGridLayout( TQLayout *tqparentLayout ) : TQGridLayout( tqparentLayout ){}; + QDesignerGridLayout( TQWidget *tqparent ) : TQGridLayout( tqparent ){}; + QDesignerGridLayout( TQLayout *tqparentLayout ) : TQGridLayout( tqparentLayout ){}; void addWidget( TQWidget *, int row, int col, int align = 0 ); void addMultiCellWidget( TQWidget *, int fromRow, int toRow, diff --git a/kommander/editor/mainwindow.cpp b/kommander/editor/mainwindow.cpp index f87b7c2c..7a47b852 100644 --- a/kommander/editor/mainwindow.cpp +++ b/kommander/editor/mainwindow.cpp @@ -626,27 +626,27 @@ bool MainWindow::eventFilter(TQObject *o, TQEvent *e) return true; } case TQEvent::ContextMenu: - if (o->inherits("TQDesignerPopupMenu")) + if (o->inherits("QDesignerPopupMenu")) break; - if (o && currentTool() == POINTER_TOOL && (o->inherits("TQDesignerMenuBar") || - o->inherits("TQDesignerToolBar") || - (o->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) || o->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING) || o->inherits("TQDesignerToolBarSeparator")) && - o->tqparent() && o->tqparent()->inherits("TQDesignerToolBar"))) { + if (o && currentTool() == POINTER_TOOL && (o->inherits("QDesignerMenuBar") || + o->inherits("QDesignerToolBar") || + (o->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) || o->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING) || o->inherits("QDesignerToolBarSeparator")) && + o->tqparent() && o->tqparent()->inherits("QDesignerToolBar"))) { TQWidget *w = (TQWidget*)o; - if (w->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING) || w->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) || w->inherits("TQDesignerToolBarSeparator")) + if (w->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING) || w->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) || w->inherits("QDesignerToolBarSeparator")) w = w->tqparentWidget(); TQWidget *pw = w->tqparentWidget(); while (pw) { if (pw->inherits("FormWindow")) { ((FormWindow*)pw)->emitShowProperties(TQT_TQOBJECT(w)); - if (!o->inherits("TQDesignerToolBar")) + if (!o->inherits("QDesignerToolBar")) return !o->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING) && !o->inherits(TQMENUBAR_OBJECT_NAME_STRING) && - !o->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) && !o->inherits("TQDesignerToolBarSeparator"); + !o->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) && !o->inherits("QDesignerToolBarSeparator"); } pw = pw->tqparentWidget(); } } - if (o && (o->inherits("TQDesignerToolBar") || o->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING)) + if (o && (o->inherits("QDesignerToolBar") || o->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING)) && e->type() == TQEvent::ContextMenu) break; if (isAToolBarChild(o) && currentTool() != CONNECT_TOOL) @@ -745,7 +745,7 @@ bool MainWindow::eventFilter(TQObject *o, TQEvent *e) break; case TQEvent::Enter: case TQEvent::Leave: - if (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator") || o->inherits("TQDesignerMenuBar")) + if (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator") || o->inherits("QDesignerMenuBar")) break; return true; case TQEvent::Resize: @@ -821,7 +821,7 @@ TQWidget *MainWindow::isAFormWindowChild(TQObject *o) const TQWidget *MainWindow::isAToolBarChild(TQObject *o) const { while (o) { - if (o->inherits("TQDesignerToolBar")) + if (o->inherits("QDesignerToolBar")) return (TQWidget*)o; if (o->inherits("FormWindow")) return 0; @@ -1071,7 +1071,7 @@ void MainWindow::setupRMBSpecialCommands(TQValueList &ids, TQMapinherits(TQTABWIDGET_OBJECT_NAME_STRING)) { if (ids.isEmpty()) ids << rmbWidgets->insertSeparator(0); - if (((TQDesignerTabWidget*)w)->count() > 1) { + if (((QDesignerTabWidget*)w)->count() > 1) { ids << (id = rmbWidgets->insertItem(i18n("Delete Page"), -1, 0)); commands.insert("remove", id); } @@ -1220,7 +1220,7 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap &commands cmd->execute(); } else if (id == commands[ "remove" ]) { if (tw->currentPage()) { - TQDesignerTabWidget *dtw = (TQDesignerTabWidget*)tw; + QDesignerTabWidget *dtw = (QDesignerTabWidget*)tw; DeleteTabPageCommand *cmd = new DeleteTabPageCommand(i18n("Delete Page %1 of %2"). tqarg(dtw->pageTitle()).tqarg(tw->name()), formWindow(), tw, tw->currentPage()); @@ -1273,7 +1273,7 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap &commands cmd->execute(); } else if (id == commands[ "remove" ]) { if (wiz->currentPage()) { - TQDesignerWizard *dw = (TQDesignerWizard*)wiz; + QDesignerWizard *dw = (QDesignerWizard*)wiz; DeleteWizardPageCommand *cmd = new DeleteWizardPageCommand(i18n("Delete Page %1 of %2"). tqarg(dw->pageTitle()).tqarg(wiz->name()), formWindow(), wiz, wiz->indexOf(wiz->currentPage())); @@ -1287,7 +1287,7 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap &commands } else if (id == commands[ "rename" ]) { bool ok = false; - TQDesignerWizard *dw = (TQDesignerWizard*)wiz; + QDesignerWizard *dw = (QDesignerWizard*)wiz; TQString text = KInputDialog::getText(i18n("Page Title"), i18n("New page title:"), dw->pageTitle(), &ok, this); if (ok) { TQString pn(i18n("Rename page %1 of %2").tqarg(dw->pageTitle()).tqarg(wiz->name())); diff --git a/kommander/editor/metadatabase.cpp b/kommander/editor/metadatabase.cpp index d8cdb32c..2e0064f0 100644 --- a/kommander/editor/metadatabase.cpp +++ b/kommander/editor/metadatabase.cpp @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/kommander/editor/propertyeditor.cpp b/kommander/editor/propertyeditor.cpp index b0c71147..18558be1 100644 --- a/kommander/editor/propertyeditor.cpp +++ b/kommander/editor/propertyeditor.cpp @@ -2505,7 +2505,7 @@ static bool tqparent_is_data_aware( TQObject *o ) TQWidget *w = (TQWidget*)o; TQWidget *p = w->tqparentWidget(); while ( p && !p->isTopLevel() ) { - if ( p->inherits( "TQDesignerDataBrowser" ) || p->inherits( "TQDesignerDataView" ) ) + if ( p->inherits( "QDesignerDataBrowser" ) || p->inherits( "QDesignerDataView" ) ) return true; p = p->tqparentWidget(); } @@ -2539,7 +2539,7 @@ void PropertyList::setupProperties() continue; if ( unique.tqcontains( TQString::tqfromLatin1( it.current() ) ) ) continue; - if ( editor->widget()->inherits( "TQDesignerToolBar" ) || editor->widget()->inherits( "TQDesignerMenuBar" ) ) { + if ( editor->widget()->inherits( "QDesignerToolBar" ) || editor->widget()->inherits( "QDesignerMenuBar" ) ) { if ( qstrcmp( p->name(), "minimumHeight" ) == 0 ) continue; if ( qstrcmp( p->name(), "minimumWidth" ) == 0 ) @@ -2702,7 +2702,7 @@ void PropertyList::setupProperties() } } - if ( !w->inherits( TQSPLITTER_OBJECT_NAME_STRING ) && !w->inherits( "TQDesignerMenuBar" ) && !w->inherits( "TQDesignerToolBar" ) && + if ( !w->inherits( TQSPLITTER_OBJECT_NAME_STRING ) && !w->inherits( "QDesignerMenuBar" ) && !w->inherits( "QDesignerToolBar" ) && w->isWidgetType() && WidgetFactory::tqlayoutType( (TQWidget*)w ) != WidgetFactory::NoLayout ) { item = new PropertyIntItem( this, item, 0, "tqlayoutSpacing", true ); setPropertyValue( item ); @@ -2714,7 +2714,7 @@ void PropertyList::setupProperties() if ( !w->inherits( "Spacer" ) && !w->inherits( TQLAYOUTWIDGET_OBJECT_NAME_STRING ) && !w->inherits( TQACTION_OBJECT_NAME_STRING ) && - !w->inherits( "TQDesignerMenuBar" ) && !w->inherits( "TQDesignerToolBar" ) ) { + !w->inherits( "QDesignerMenuBar" ) && !w->inherits( "QDesignerToolBar" ) ) { item = new PropertyTextItem( this, item, 0, "toolTip", true, false ); setPropertyValue( item ); if ( MetaDataBase::isPropertyChanged( editor->widget(), "toolTip" ) ) diff --git a/kommander/editor/resource.cpp b/kommander/editor/resource.cpp index 02cd1eec..09768081 100644 --- a/kommander/editor/resource.cpp +++ b/kommander/editor/resource.cpp @@ -571,7 +571,7 @@ void Resource::paste( const TQString &cb, TQWidget *tqparent ) formwindow->commandHistory()->addCommand( cmd ); } -void Resource::saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStream &ts, int indent ) +void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStream &ts, int indent ) { if ( obj && obj->isWidgetType() && ( (TQWidget*)obj )->isHidden() && !(obj->isA("ScriptObject")) ) return; @@ -585,7 +585,7 @@ void Resource::saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStre TQString attributes; if ( grid ) { - TQDesignerGridLayout::Item item = grid->items[ (TQWidget*)obj ]; + QDesignerGridLayout::Item item = grid->items[ (TQWidget*)obj ]; attributes += TQString(" row=\"") + TQString::number(item.row) + "\""; attributes += TQString(" column=\"") + TQString::number(item.column) + "\""; if ( item.rowspan * item.colspan != 1 ) { @@ -619,7 +619,7 @@ void Resource::saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStre TQTabWidget* tw = (TQTabWidget*) obj; TQObjectList* tmpl = tw->queryList( TQWIDGETSTACK_OBJECT_NAME_STRING ); TQWidgetStack *ws = (TQWidgetStack*)tmpl->first(); - TQTabBar *tb = ( (TQDesignerTabWidget*)obj )->tabBar(); + TQTabBar *tb = ( (QDesignerTabWidget*)obj )->tabBar(); for ( int i = 0; i < tb->count(); ++i ) { TQTab *t = tb->tabAt( i ); if ( !t ) @@ -936,7 +936,7 @@ void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent ) TQString closeTag; // if the widget has a tqlayout we pretend that all widget's childs are childs of the tqlayout - makes the structure nicer TQLayout *tqlayout = 0; - TQDesignerGridLayout* grid = 0; + QDesignerGridLayout* grid = 0; if ( !obj->inherits( TQSPLITTER_OBJECT_NAME_STRING ) && WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( obj ) ) ) && obj->isWidgetType() && @@ -957,7 +957,7 @@ void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent ) closeTag = makeIndent( indent ) + ""; ts << makeIndent( indent ) << "" << endl; ++indent; - grid = (TQDesignerGridLayout*) tqlayout; + grid = (QDesignerGridLayout*) tqlayout; break; default: break; @@ -1020,7 +1020,7 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ) if ( w->inherits( TQLABEL_OBJECT_NAME_STRING ) && qstrcmp( p->name(), "pixmap" ) == 0 && ( !( (TQLabel*)w )->pixmap() || ( (TQLabel*)w )->pixmap()->isNull() ) ) continue; - if ( w->inherits( "TQDesignerMenuBar" ) && + if ( w->inherits( "QDesignerMenuBar" ) && ( qstrcmp( p->name(), "itemName" ) == 0 || qstrcmp( p->name(), "itemNumber" ) == 0 || qstrcmp( p->name(), "itemText" ) == 0 ) ) continue; @@ -1355,7 +1355,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *tqparent, TQL ( (TQVBoxLayout*)tqlayout )->addWidget( w ); break; case WidgetFactory::Grid: - ( (TQDesignerGridLayout*)tqlayout )->addMultiCellWidget( w, row, row + rowspan - 1, + ( (QDesignerGridLayout*)tqlayout )->addMultiCellWidget( w, row, row + rowspan - 1, col, col + colspan - 1 ); break; default: @@ -1633,7 +1633,7 @@ TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *tqparent, TQL if ( tqlayout->inherits( TQBOXLAYOUT_OBJECT_NAME_STRING ) ) ( (TQBoxLayout*)tqlayout )->addWidget( spacer, 0, spacer->tqalignment() ); else - ( (TQDesignerGridLayout*)tqlayout )->addMultiCellWidget( spacer, row, row + rowspan - 1, col, col + colspan - 1, + ( (QDesignerGridLayout*)tqlayout )->addMultiCellWidget( spacer, row, row + rowspan - 1, col, col + colspan - 1, spacer->tqalignment() ); } return spacer; @@ -2434,7 +2434,7 @@ void Resource::loadChildAction( TQObject *tqparent, const TQDomElement &e ) TQDomElement n = e; TQAction *a = 0; if ( n.tagName() == "action" ) { - a = new TQDesignerAction( tqparent ); + a = new QDesignerAction( tqparent ); MetaDataBase::addEntry( a ); TQDomElement n2 = n.firstChild().toElement(); while ( !n2.isNull() ) { @@ -2453,7 +2453,7 @@ void Resource::loadChildAction( TQObject *tqparent, const TQDomElement &e ) if ( !tqparent->inherits( TQACTION_OBJECT_NAME_STRING ) ) formwindow->actionList().append( a ); } else if ( n.tagName() == "actiongroup" ) { - a = new TQDesignerActionGroup( tqparent ); + a = new QDesignerActionGroup( tqparent ); MetaDataBase::addEntry( a ); TQDomElement n2 = n.firstChild().toElement(); while ( !n2.isNull() ) { @@ -2506,13 +2506,13 @@ void Resource::saveToolBars( TQMainWindow *mw, TQTextStream &ts, int indent ) ts << makeIndent( indent ) << "" << endl; indent++; saveObjectProperties( TQT_TQOBJECT(tb), ts, indent ); - TQPtrList actionList = ( (TQDesignerToolBar*)tb )->insertedActions(); + TQPtrList actionList = ( (QDesignerToolBar*)tb )->insertedActions(); for ( TQAction *a = actionList.first(); a; a = actionList.next() ) { - if ( a->inherits( "TQSeparatorAction" ) ) { + if ( a->inherits( "QSeparatorAction" ) ) { ts << makeIndent( indent ) << "" << endl; } else { - if ( a->inherits( "TQDesignerAction" ) && !( (TQDesignerAction*)a )->supportsMenu() ) { - TQWidget *w = ( (TQDesignerAction*)a )->widget(); + if ( a->inherits( "QDesignerAction" ) && !( (QDesignerAction*)a )->supportsMenu() ) { + TQWidget *w = ( (QDesignerAction*)a )->widget(); ts << makeIndent( indent ) << "" << endl; indent++; @@ -2552,9 +2552,9 @@ void Resource::saveMenuBar( TQMainWindow *mw, TQTextStream &ts, int indent ) TQMenuItem *m = mw->menuBar()->tqfindItem( mw->menuBar()->idAt( i ) ); if ( !m ) continue; - TQPtrList actionList = ( (TQDesignerPopupMenu*)m->popup() )->insertedActions(); + TQPtrList actionList = ( (QDesignerPopupMenu*)m->popup() )->insertedActions(); for ( TQAction *a = actionList.first(); a; a = actionList.next() ) { - if ( a->inherits( "TQSeparatorAction" ) ) + if ( a->inherits( "QSeparatorAction" ) ) ts << makeIndent( indent ) << "" << endl; else ts << makeIndent( indent ) << "name() << "\"/>" << endl; @@ -2570,11 +2570,11 @@ void Resource::loadToolBars( const TQDomElement &e ) { TQDomElement n = e.firstChild().toElement(); TQMainWindow *mw = ( (TQMainWindow*)formwindow->mainContainer() ); - TQDesignerToolBar *tb = 0; + QDesignerToolBar *tb = 0; while ( !n.isNull() ) { if ( n.tagName() == "toolbar" ) { TQt::Dock dock = (TQt::Dock)n.attribute( "dock" ).toInt(); - tb = new TQDesignerToolBar( mw, dock ); + tb = new QDesignerToolBar( mw, dock ); TQDomElement n2 = n.firstChild().toElement(); while ( !n2.isNull() ) { if ( n2.tagName() == "action" ) { @@ -2584,12 +2584,12 @@ void Resource::loadToolBars( const TQDomElement &e ) tb->addAction( a ); } } else if ( n2.tagName() == "separator" ) { - TQAction *a = new TQSeparatorAction( 0 ); + TQAction *a = new QSeparatorAction( 0 ); a->addTo( tb ); tb->addAction( a ); } else if ( n2.tagName() == "widget" ) { TQWidget *w = (TQWidget*)createObject( n2, tb ); - TQDesignerAction *a = new TQDesignerAction( w, TQT_TQOBJECT(tb) ); + QDesignerAction *a = new QDesignerAction( w, TQT_TQOBJECT(tb) ); a->addTo( tb ); tb->addAction( a ); tb->installEventFilters( w ); @@ -2607,10 +2607,10 @@ void Resource::loadMenuBar( const TQDomElement &e ) { TQDomElement n = e.firstChild().toElement(); TQMainWindow *mw = ( (TQMainWindow*)formwindow->mainContainer() ); - TQDesignerMenuBar *mb = new TQDesignerMenuBar( mw ); + QDesignerMenuBar *mb = new QDesignerMenuBar( mw ); while ( !n.isNull() ) { if ( n.tagName() == "item" ) { - TQDesignerPopupMenu *popup = new TQDesignerPopupMenu( mw ); + QDesignerPopupMenu *popup = new QDesignerPopupMenu( mw ); popup->setName( n.attribute( "name" ) ); TQDomElement n2 = n.firstChild().toElement(); while ( !n2.isNull() ) { @@ -2621,7 +2621,7 @@ void Resource::loadMenuBar( const TQDomElement &e ) popup->addAction( a ); } } else if ( n2.tagName() == "separator" ) { - TQAction *a = new TQSeparatorAction( 0 ); + TQAction *a = new QSeparatorAction( 0 ); a->addTo( popup ); popup->addAction( a ); } diff --git a/kommander/editor/resource.h b/kommander/editor/resource.h index 1684df20..75dd6387 100644 --- a/kommander/editor/resource.h +++ b/kommander/editor/resource.h @@ -38,7 +38,7 @@ class TQPalette; class FormWindow; class MainWindow; class TQDomElement; -class TQDesignerGridLayout; +class QDesignerGridLayout; class TQListViewItem; class TQMainWindow; #ifndef KOMMANDER @@ -77,7 +77,7 @@ public: static void loadCustomWidgets( const TQDomElement &e, Resource *r ); private: - void saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStream &ts, int indent ); + void saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStream &ts, int indent ); void saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent ); void saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ); void saveSetProperty( TQObject *w, const TQString &name, TQVariant::Type t, TQTextStream &ts, int indent ); diff --git a/kommander/editor/widgetdatabase.cpp b/kommander/editor/widgetdatabase.cpp index 73349c3b..cb12834e 100644 --- a/kommander/editor/widgetdatabase.cpp +++ b/kommander/editor/widgetdatabase.cpp @@ -377,7 +377,7 @@ void WidgetDatabase::setupDataBase( int id ) append(r); r = new WidgetDatabaseRecord; - r->name = "TQDesignerWizard"; + r->name = "QDesignerWizard"; r->group = widgetGroup("Forms"); r->isContainer = true; append(r); @@ -398,21 +398,21 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconName = "tabwidget.xpm"; - r->name = "TQDesignerTabWidget"; + r->name = "QDesignerTabWidget"; r->group = widgetGroup("Temp"); r->isContainer = true; append(r); r = new WidgetDatabaseRecord; r->iconName = "tabwidget.xpm"; - r->name = "TQDesignerWidget"; + r->name = "QDesignerWidget"; r->group = widgetGroup("Temp"); r->isContainer = true; append(r); r = new WidgetDatabaseRecord; r->iconName = "tabwidget.xpm"; - r->name = "TQDesignerDialog"; + r->name = "QDesignerDialog"; r->group = widgetGroup("Temp"); r->isContainer = true; append(r); diff --git a/kommander/editor/widgetdatabase.h b/kommander/editor/widgetdatabase.h index 24b14530..9d6f97c1 100644 --- a/kommander/editor/widgetdatabase.h +++ b/kommander/editor/widgetdatabase.h @@ -25,7 +25,7 @@ #include #ifndef KOMMANDER #include "widgetinterface.h" // up here for GCC 2.7.* compatibility -#include +#include extern TQPluginManager *widgetManager(); diff --git a/kommander/editor/widgetfactory.cpp b/kommander/editor/widgetfactory.cpp index 920a3605..b908f8e9 100644 --- a/kommander/editor/widgetfactory.cpp +++ b/kommander/editor/widgetfactory.cpp @@ -137,52 +137,52 @@ void TQLayoutWidget::paintEvent( TQPaintEvent* ) } -TQDesignerTabWidget::TQDesignerTabWidget( TQWidget *tqparent, const char *name ) +QDesignerTabWidget::QDesignerTabWidget( TQWidget *tqparent, const char *name ) : TQTabWidget( tqparent, name ), dropIndicator( 0 ), dragPage( 0 ), mousePressed( false ) { tabBar()->setAcceptDrops( true ); tabBar()->installEventFilter( this ); } -int TQDesignerTabWidget::currentPage() const +int QDesignerTabWidget::currentPage() const { return tabBar()->currentTab(); } -void TQDesignerTabWidget::setCurrentPage( int i ) +void QDesignerTabWidget::setCurrentPage( int i ) { tabBar()->setCurrentTab( i ); } -TQString TQDesignerTabWidget::pageTitle() const +TQString QDesignerTabWidget::pageTitle() const { return ((TQTabWidget*)this)->tabLabel( TQTabWidget::currentPage() ); } -void TQDesignerTabWidget::setPageTitle( const TQString& title ) +void QDesignerTabWidget::setPageTitle( const TQString& title ) { changeTab( TQTabWidget::currentPage(), title ); } -void TQDesignerTabWidget::setPageName( const TQCString& name ) +void QDesignerTabWidget::setPageName( const TQCString& name ) { if ( TQTabWidget::currentPage() ) TQTabWidget::currentPage()->setName( name ); } -TQCString TQDesignerTabWidget::pageName() const +TQCString QDesignerTabWidget::pageName() const { if ( !TQTabWidget::currentPage() ) return 0; return TQTabWidget::currentPage()->name(); } -int TQDesignerTabWidget::count() const +int QDesignerTabWidget::count() const { return tabBar()->count(); } -bool TQDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e ) +bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e ) { if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(tabBar()) ) return false; @@ -303,7 +303,7 @@ bool TQDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e ) return false; } -int TQDesignerWizard::currentPageNum() const +int QDesignerWizard::currentPageNum() const { for ( int i = 0; i < pageCount(); ++i ) { if ( page( i ) == currentPage() ) @@ -312,7 +312,7 @@ int TQDesignerWizard::currentPageNum() const return 0; } -void TQDesignerWizard::setCurrentPage( int i ) +void QDesignerWizard::setCurrentPage( int i ) { if ( i < currentPageNum() ) { while ( i < currentPageNum() ) { @@ -330,30 +330,30 @@ void TQDesignerWizard::setCurrentPage( int i ) } } -TQString TQDesignerWizard::pageTitle() const +TQString QDesignerWizard::pageTitle() const { return title( currentPage() ); } -void TQDesignerWizard::setPageTitle( const TQString& title ) +void QDesignerWizard::setPageTitle( const TQString& title ) { setTitle( currentPage(), title ); } -void TQDesignerWizard::setPageName( const TQCString& name ) +void QDesignerWizard::setPageName( const TQCString& name ) { if ( TQWizard::currentPage() ) TQWizard::currentPage()->setName( name ); } -TQCString TQDesignerWizard::pageName() const +TQCString QDesignerWizard::pageName() const { if ( !TQWizard::currentPage() ) return 0; return TQWizard::currentPage()->name(); } -int TQDesignerWizard::pageNum( TQWidget *p ) +int QDesignerWizard::pageNum( TQWidget *p ) { for ( int i = 0; i < pageCount(); ++i ) { if ( page( i ) == p ) @@ -362,20 +362,20 @@ int TQDesignerWizard::pageNum( TQWidget *p ) return -1; } -void TQDesignerWizard::addPage( TQWidget *p, const TQString &t ) +void QDesignerWizard::addPage( TQWidget *p, const TQString &t ) { TQWizard::addPage( p, t ); if ( removedPages.tqfind( p ) ) removedPages.remove( p ); } -void TQDesignerWizard::removePage( TQWidget *p ) +void QDesignerWizard::removePage( TQWidget *p ) { TQWizard::removePage( p ); removedPages.insert( p, p ); } -void TQDesignerWizard::insertPage( TQWidget *p, const TQString &t, int index ) +void QDesignerWizard::insertPage( TQWidget *p, const TQString &t, int index ) { TQWizard::insertPage( p, t, index ); if ( removedPages.tqfind( p ) ) @@ -721,7 +721,7 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *tqlayout, Lay MetaDataBase::addEntry( TQT_TQOBJECT(l) ); return l; case Grid: - l = new TQDesignerGridLayout( gb->tqlayout() ); + l = new QDesignerGridLayout( gb->tqlayout() ); MetaDataBase::setMargin( TQT_TQOBJECT(gb), margin ); MetaDataBase::setSpacing( TQT_TQOBJECT(gb), spacing ); l->tqsetAlignment( AlignTop ); @@ -749,7 +749,7 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *tqlayout, Lay MetaDataBase::addEntry( TQT_TQOBJECT(l) ); return l; case Grid: { - l = new TQDesignerGridLayout( tqlayout ); + l = new QDesignerGridLayout( tqlayout ); MetaDataBase::addEntry( TQT_TQOBJECT(l) ); l->setSpacing( spacing ); l->setMargin( margin ); @@ -787,7 +787,7 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *tqlayout, Lay MetaDataBase::addEntry( TQT_TQOBJECT(l) ); return l; case Grid: { - l = new TQDesignerGridLayout( widget ); + l = new QDesignerGridLayout( widget ); MetaDataBase::addEntry( TQT_TQOBJECT(l) ); if ( widget ) { MetaDataBase::setMargin( TQT_TQOBJECT(widget), margin ); @@ -837,11 +837,11 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa TQPushButton *b = 0; if (init) { - b = new TQDesignerPushButton(tqparent, name); + b = new QDesignerPushButton(tqparent, name); b->setText(TQString::tqfromLatin1(name)); } else { - b = new TQDesignerPushButton(tqparent, name); + b = new QDesignerPushButton(tqparent, name); } TQWidget *w = find_formwindow(b); b->setAutoDefault(w && ((FormWindow *) w)->mainContainer()->inherits(TQDIALOG_OBJECT_NAME_STRING)); @@ -850,29 +850,29 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa { if (init) { - TQDesignerToolButton *tb = new TQDesignerToolButton(tqparent, name); + QDesignerToolButton *tb = new QDesignerToolButton(tqparent, name); tb->setText("..."); return tb; } - return new TQDesignerToolButton(tqparent, name); + return new QDesignerToolButton(tqparent, name); } else if (className == TQCHECKBOX_OBJECT_NAME_STRING) { if (init) { - TQDesignerCheckBox *cb = new TQDesignerCheckBox(tqparent, name); + QDesignerCheckBox *cb = new QDesignerCheckBox(tqparent, name); cb->setText(TQString::tqfromLatin1(name)); return cb; } - return new TQDesignerCheckBox(tqparent, name); + return new QDesignerCheckBox(tqparent, name); } else if (className == TQRADIOBUTTON_OBJECT_NAME_STRING) { if (init) { - TQDesignerRadioButton *rb = new TQDesignerRadioButton(tqparent, name); + QDesignerRadioButton *rb = new QDesignerRadioButton(tqparent, name); rb->setText(TQString::tqfromLatin1(name)); return rb; } - return new TQDesignerRadioButton(tqparent, name); + return new QDesignerRadioButton(tqparent, name); } else if (className == TQGROUPBOX_OBJECT_NAME_STRING) { if (init) @@ -947,7 +947,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa return new TQTextEdit(tqparent, name); else if (className == TQLABEL_OBJECT_NAME_STRING) { - TQDesignerLabel *l = new TQDesignerLabel(tqparent, name); + QDesignerLabel *l = new QDesignerLabel(tqparent, name); if (init) { l->setText(TQString::tqfromLatin1(name)); @@ -959,14 +959,14 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa return new TQLayoutWidget(tqparent, name); else if (className == TQTABWIDGET_OBJECT_NAME_STRING) { - TQTabWidget *tw = new TQDesignerTabWidget(tqparent, name); + TQTabWidget *tw = new QDesignerTabWidget(tqparent, name); if (init) { FormWindow *fw = find_formwindow(tqparent); - TQWidget *w = fw ? new TQDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab"); + TQWidget *w = fw ? new QDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab"); tw->addTab(w, i18n("Tab 1")); MetaDataBase::addEntry(TQT_TQOBJECT(w)); - w = fw ? new TQDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab"); + w = fw ? new QDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab"); tw->addTab(w, i18n("Tab 2")); MetaDataBase::addEntry(TQT_TQOBJECT(tw)); MetaDataBase::addEntry(TQT_TQOBJECT(w)); @@ -984,7 +984,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa FormWindow *fw = find_formwindow(tqparent); if (fw) { - TQDesignerWidget *dw = new TQDesignerWidget(fw, tqparent, name); + QDesignerWidget *dw = new QDesignerWidget(fw, tqparent, name); MetaDataBase::addEntry(TQT_TQOBJECT(dw)); return dw; } @@ -994,7 +994,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa { TQDialog *dia = 0; if (tqparent && tqparent->inherits("FormWindow")) - dia = new TQDesignerDialog((FormWindow *) tqparent, tqparent, name); + dia = new QDesignerDialog((FormWindow *) tqparent, tqparent, name); else dia = new TQDialog(tqparent, name); if (tqparent && !tqparent->inherits("MainWindow")) @@ -1002,14 +1002,14 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa return dia; } else if (className == TQWIZARD_OBJECT_NAME_STRING) { - TQWizard *wiz = new TQDesignerWizard(tqparent, name); + TQWizard *wiz = new QDesignerWizard(tqparent, name); if (tqparent && !tqparent->inherits("MainWindow")) { wiz->reparent(tqparent, TQPoint(0, 0), true); } if (init && tqparent && tqparent->inherits("FormWindow")) { - TQDesignerWidget *dw = new TQDesignerWidget((FormWindow *) tqparent, wiz, "page"); + QDesignerWidget *dw = new QDesignerWidget((FormWindow *) tqparent, wiz, "page"); MetaDataBase::addEntry(TQT_TQOBJECT(dw)); wiz->addPage(dw, i18n("Page")); TQTimer::singleShot(0, wiz, TQT_SLOT(next())); @@ -1089,7 +1089,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa { TQMainWindow *mw = new KmdrMainWindow(tqparent, name, 0); mw->setDockEnabled(TQt::DockMinimized, false); - TQDesignerWidget *dw = new TQDesignerWidget((FormWindow *) tqparent, mw, "central widget"); + QDesignerWidget *dw = new QDesignerWidget((FormWindow *) tqparent, mw, "central widget"); mw->setDockMenuEnabled(false); MetaDataBase::addEntry(TQT_TQOBJECT(dw)); mw->setCentralWidget(dw); @@ -1100,13 +1100,13 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa #ifndef TQT_NO_SQL else if (className == TQDATABROWSER_OBJECT_NAME_STRING) { - TQWidget *w = new TQDesignerDataBrowser(tqparent, name); + TQWidget *w = new QDesignerDataBrowser(tqparent, name); if (tqparent) w->reparent(tqparent, TQPoint(0, 0), true); return w; } else if (className == TQDATAVIEW_OBJECT_NAME_STRING) { - TQWidget *w = new TQDesignerDataView(tqparent, name); + TQWidget *w = new QDesignerDataView(tqparent, name); if (tqparent) w->reparent(tqparent, TQPoint(0, 0), true); return w; @@ -1144,14 +1144,14 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa //qDebug("Creating Wizard..."); TQWizard *wiz; if (tqparent && tqparent->inherits("FormWindow")) - wiz = new TQDesignerWizard(tqparent, name); + wiz = new QDesignerWizard(tqparent, name); else wiz = new Wizard(tqparent, name); if (tqparent) wiz->reparent(tqparent, TQPoint(0, 0), true); if (init && tqparent && tqparent->inherits("FormWindow")) { - TQDesignerWidget *dw = new TQDesignerWidget((FormWindow *) tqparent, wiz, "page"); + QDesignerWidget *dw = new QDesignerWidget((FormWindow *) tqparent, wiz, "page"); MetaDataBase::addEntry(TQT_TQOBJECT(dw)); wiz->addPage(dw, i18n("Page 1")); wiz->addPage(dw, i18n("Page 2")); @@ -1165,10 +1165,10 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa if (init) { FormWindow *fw = find_formwindow(tqparent); - TQWidget *w = fw ? new TQDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab"); + TQWidget *w = fw ? new QDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab"); tw->addTab(w, i18n("Tab 1")); MetaDataBase::addEntry(TQT_TQOBJECT(w)); - w = fw ? new TQDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab"); + w = fw ? new QDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab"); tw->addTab(w, i18n("Tab 2")); MetaDataBase::addEntry(TQT_TQOBJECT(tw)); MetaDataBase::addEntry(TQT_TQOBJECT(w)); @@ -1180,10 +1180,10 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa if (init) { FormWindow *fw = find_formwindow(tqparent); - TQWidget *w = fw ? new TQDesignerWidget(fw, tw, "toolbox") : new TQWidget(tw, "toolbox"); + TQWidget *w = fw ? new QDesignerWidget(fw, tw, "toolbox") : new TQWidget(tw, "toolbox"); tw->addItem(w, i18n("Page 1")); MetaDataBase::addEntry(TQT_TQOBJECT(w)); - w = fw ? new TQDesignerWidget(fw, tw, "toolbox") : new TQWidget(tw, "toolbox"); + w = fw ? new QDesignerWidget(fw, tw, "toolbox") : new TQWidget(tw, "toolbox"); tw->addItem(w, i18n("Page 2")); MetaDataBase::addEntry(TQT_TQOBJECT(tw)); MetaDataBase::addEntry(TQT_TQOBJECT(w)); @@ -1415,7 +1415,7 @@ bool WidgetFactory::isPassiveInteractor( TQObject* o ) */ const char* WidgetFactory::classNameOf( TQObject* o ) { - if (o->inherits("TQDesignerTabWidget")) + if (o->inherits("QDesignerTabWidget")) return TQTABWIDGET_OBJECT_NAME_STRING; #ifdef KOMMANDER else if (o->inherits("EditorTabWidget")) @@ -1423,34 +1423,34 @@ const char* WidgetFactory::classNameOf( TQObject* o ) else if (o->inherits("EditorToolBox")) return "ToolBox"; #endif - else if (o->inherits("TQDesignerDialog")) + else if (o->inherits("QDesignerDialog")) return TQDIALOG_OBJECT_NAME_STRING; - else if (o->inherits("TQDesignerWidget")) + else if (o->inherits("QDesignerWidget")) return TQWIDGET_OBJECT_NAME_STRING; else if (o->inherits("CustomWidget")) return ((CustomWidget *) o)->realClassName().latin1(); - else if (o->inherits("TQDesignerLabel")) + else if (o->inherits("QDesignerLabel")) return TQLABEL_OBJECT_NAME_STRING; - else if (o->inherits("TQDesignerWizard")) + else if (o->inherits("QDesignerWizard")) return TQWIZARD_OBJECT_NAME_STRING; else if (o->inherits("EditorWizard")) return "Wizard"; - else if (o->inherits("TQDesignerPushButton")) + else if (o->inherits("QDesignerPushButton")) return TQPUSHBUTTON_OBJECT_NAME_STRING; - else if (o->inherits("TQDesignerToolButton")) + else if (o->inherits("QDesignerToolButton")) return TQTOOLBUTTON_OBJECT_NAME_STRING; - else if (o->inherits("TQDesignerRadioButton")) + else if (o->inherits("QDesignerRadioButton")) return TQRADIOBUTTON_OBJECT_NAME_STRING; - else if (o->inherits("TQDesignerCheckBox")) + else if (o->inherits("QDesignerCheckBox")) return TQCHECKBOX_OBJECT_NAME_STRING; - else if (o->inherits("TQDesignerMenuBar")) + else if (o->inherits("QDesignerMenuBar")) return TQMENUBAR_OBJECT_NAME_STRING; - else if (o->inherits("TQDesignerToolBar")) + else if (o->inherits("QDesignerToolBar")) return TQTOOLBAR_OBJECT_NAME_STRING; #ifndef TQT_NO_SQL - else if (o->inherits("TQDesignerDataBrowser")) + else if (o->inherits("QDesignerDataBrowser")) return TQDATABROWSER_OBJECT_NAME_STRING; - else if (o->inherits("TQDesignerDataView")) + else if (o->inherits("QDesignerDataView")) return TQDATAVIEW_OBJECT_NAME_STRING; #endif else if (o->inherits("EditorDialog")) @@ -1466,7 +1466,7 @@ const char* WidgetFactory::classNameOf( TQObject* o ) void WidgetFactory::initChangedProperties( TQObject *o ) { MetaDataBase::setPropertyChanged( o, "name", true ); - if ( !o->inherits( "TQDesignerToolBar" ) && !o->inherits( "TQDesignerMenuBar" ) ) + if ( !o->inherits( "QDesignerToolBar" ) && !o->inherits( "QDesignerMenuBar" ) ) MetaDataBase::setPropertyChanged( o, "geometry", true ); if ( o->inherits( TQPUSHBUTTON_OBJECT_NAME_STRING ) || o->inherits(TQRADIOBUTTON_OBJECT_NAME_STRING) || o->inherits( TQCHECKBOX_OBJECT_NAME_STRING ) || o->inherits( TQTOOLBUTTON_OBJECT_NAME_STRING ) ) @@ -1503,9 +1503,9 @@ void WidgetFactory::initChangedProperties( TQObject *o ) MetaDataBase::setPropertyChanged( o, "itemBackgroundMode", true ); } else if ( o->inherits( TQSPLITTER_OBJECT_NAME_STRING ) ) { MetaDataBase::setPropertyChanged( o, "orientation", true ); - } else if ( o->inherits( "TQDesignerToolBar" ) ) { + } else if ( o->inherits( "QDesignerToolBar" ) ) { MetaDataBase::setPropertyChanged( o, "label", true ); - } else if ( o->inherits( "TQDesignerMenuBar" ) ) { + } else if ( o->inherits( "QDesignerMenuBar" ) ) { MetaDataBase::setPropertyChanged( o, "itemName", true ); MetaDataBase::setPropertyChanged( o, "itemNumber", true ); MetaDataBase::setPropertyChanged( o, "itemText", true ); @@ -1745,7 +1745,7 @@ TQVariant WidgetFactory::property( TQObject *w, const char *name ) return MetaDataBase::fakeProperty( w, name ); } -void TQDesignerLabel::updateBuddy() +void QDesignerLabel::updateBuddy() { if ( myBuddy.isEmpty() ) @@ -1761,12 +1761,12 @@ void TQDesignerLabel::updateBuddy() delete l; } -void TQDesignerWidget::paintEvent( TQPaintEvent *e ) +void QDesignerWidget::paintEvent( TQPaintEvent *e ) { formwindow->paintGrid( this, e ); } -void TQDesignerDialog::paintEvent( TQPaintEvent *e ) +void QDesignerDialog::paintEvent( TQPaintEvent *e ) { formwindow->paintGrid( this, e ); } diff --git a/kommander/editor/widgetfactory.h b/kommander/editor/widgetfactory.h index bfde50ec..ab73cd5c 100644 --- a/kommander/editor/widgetfactory.h +++ b/kommander/editor/widgetfactory.h @@ -108,7 +108,7 @@ private: }; -class TQDesignerTabWidget : public TQTabWidget +class QDesignerTabWidget : public TQTabWidget { Q_OBJECT TQ_OBJECT @@ -116,7 +116,7 @@ class TQDesignerTabWidget : public TQTabWidget TQ_PROPERTY( TQString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true ) TQ_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true ) public: - TQDesignerTabWidget( TQWidget *tqparent, const char *name ); + QDesignerTabWidget( TQWidget *tqparent, const char *name ); int currentPage() const; void setCurrentPage( int i ); @@ -188,7 +188,7 @@ public: int count() const; }; -class TQDesignerWizard : public TQWizard +class QDesignerWizard : public TQWizard { Q_OBJECT TQ_OBJECT @@ -196,7 +196,7 @@ class TQDesignerWizard : public TQWizard TQ_PROPERTY( TQString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true ) TQ_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true ) public: - TQDesignerWizard( TQWidget *tqparent, const char *name ) : TQWizard( tqparent, name ) {} + QDesignerWizard( TQWidget *tqparent, const char *name ) : TQWizard( tqparent, name ) {} int currentPageNum() const; void setCurrentPage( int i ); @@ -303,7 +303,7 @@ public: } }; -class TQDesignerLabel : public TQLabel +class QDesignerLabel : public TQLabel { Q_OBJECT TQ_OBJECT @@ -311,7 +311,7 @@ class TQDesignerLabel : public TQLabel TQ_PROPERTY( TQCString buddy READ buddyWidget WRITE setBuddyWidget ) public: - TQDesignerLabel( TQWidget *tqparent = 0, const char *name = 0 ) + QDesignerLabel( TQWidget *tqparent = 0, const char *name = 0 ) : TQLabel( tqparent, name ) { myBuddy = 0; } void setBuddyWidget( const TQCString &b ) { @@ -336,13 +336,13 @@ private: }; -class TQDesignerWidget : public TQWidget +class QDesignerWidget : public TQWidget { Q_OBJECT TQ_OBJECT public: - TQDesignerWidget( FormWindow *fw, TQWidget *tqparent, const char *name ) + QDesignerWidget( FormWindow *fw, TQWidget *tqparent, const char *name ) : TQWidget( tqparent, name, WResizeNoErase ), formwindow( fw ) {} protected: @@ -353,13 +353,13 @@ private: }; -class TQDesignerDialog : public TQDialog +class QDesignerDialog : public TQDialog { Q_OBJECT TQ_OBJECT public: - TQDesignerDialog( FormWindow *fw, TQWidget *tqparent, const char *name ) + QDesignerDialog( FormWindow *fw, TQWidget *tqparent, const char *name ) : TQDialog( tqparent, name, FALSE, WResizeNoErase ), formwindow( fw ) {} protected: @@ -370,14 +370,14 @@ private: }; -class TQDesignerToolButton : public TQToolButton +class QDesignerToolButton : public TQToolButton { Q_OBJECT TQ_OBJECT TQ_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId ) public: - TQDesignerToolButton( TQWidget *tqparent, const char *name ) + QDesignerToolButton( TQWidget *tqparent, const char *name ) : TQToolButton( tqparent, name ) {} bool isInButtonGroup() const { @@ -394,14 +394,14 @@ public: } }; -class TQDesignerRadioButton : public TQRadioButton +class QDesignerRadioButton : public TQRadioButton { Q_OBJECT TQ_OBJECT TQ_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId ) public: - TQDesignerRadioButton( TQWidget *tqparent, const char *name ) + QDesignerRadioButton( TQWidget *tqparent, const char *name ) : TQRadioButton( tqparent, name ) {} bool isInButtonGroup() const { @@ -419,14 +419,14 @@ public: }; -class TQDesignerPushButton : public TQPushButton +class QDesignerPushButton : public TQPushButton { Q_OBJECT TQ_OBJECT TQ_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId ) public: - TQDesignerPushButton( TQWidget *tqparent, const char *name ) + QDesignerPushButton( TQWidget *tqparent, const char *name ) : TQPushButton( tqparent, name ) {} bool isInButtonGroup() const { @@ -444,14 +444,14 @@ public: }; -class TQDesignerCheckBox : public TQCheckBox +class QDesignerCheckBox : public TQCheckBox { Q_OBJECT TQ_OBJECT TQ_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId ) public: - TQDesignerCheckBox( TQWidget *tqparent, const char *name ) + QDesignerCheckBox( TQWidget *tqparent, const char *name ) : TQCheckBox( tqparent, name ) {} bool isInButtonGroup() const { diff --git a/kommander/editor/widgetinterface.h b/kommander/editor/widgetinterface.h index 364e9871..3eed33d7 100644 --- a/kommander/editor/widgetinterface.h +++ b/kommander/editor/widgetinterface.h @@ -21,7 +21,7 @@ #ifndef WIDGETINTERFACE_H #define WIDGETINTERFACE_H -#include +#include #define WidgetInterface TQWidgetFactoryInterface #define IID_Widget IID_TQWidgetFactory diff --git a/kommander/factory/kommanderfactory.cpp b/kommander/factory/kommanderfactory.cpp index d5713bd0..11ac1cf3 100644 --- a/kommander/factory/kommanderfactory.cpp +++ b/kommander/factory/kommanderfactory.cpp @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include #include #include @@ -259,10 +259,10 @@ TQWidget *KommanderFactory::create( TQIODevice *dev, TQObject *connector, TQWidg for( ; cit != widgetFactory->sqlWidgetConnections.end(); ++cit ) { if ( widgetFactory->noDatabaseWidgets.tqfind( cit.key()->name() ) != widgetFactory->noDatabaseWidgets.end() ) continue; - if ( cit.key()->inherits( "TQDesignerDataBrowser2" ) ) - ( (TQDesignerDataBrowser2*)cit.key() )->initPreview( (*cit).conn, (*cit).table, cit.key(), *(*cit).dbControls ); - else if ( cit.key()->inherits( "TQDesignerDataView2" ) ) - ( (TQDesignerDataView2*)cit.key() )->initPreview( (*cit).conn, (*cit).table, cit.key(), *(*cit).dbControls ); + if ( cit.key()->inherits( "QDesignerDataBrowser2" ) ) + ( (QDesignerDataBrowser2*)cit.key() )->initPreview( (*cit).conn, (*cit).table, cit.key(), *(*cit).dbControls ); + else if ( cit.key()->inherits( "QDesignerDataView2" ) ) + ( (QDesignerDataView2*)cit.key() )->initPreview( (*cit).conn, (*cit).table, cit.key(), *(*cit).dbControls ); } for ( TQMap::Iterator it = widgetFactory->dbTables.begin(); it != widgetFactory->dbTables.end(); ++it ) { @@ -423,9 +423,9 @@ TQWidget *KommanderFactory::createWidget( const TQString &literalClassName, TQWi else if (className == TQDATATABLE_OBJECT_NAME_STRING) return new TQDataTable(tqparent, name); else if (className == TQDATABROWSER_OBJECT_NAME_STRING) - return new TQDesignerDataBrowser2(tqparent, name); + return new QDesignerDataBrowser2(tqparent, name); else if (className == TQDATAVIEW_OBJECT_NAME_STRING) - return new TQDesignerDataView2(tqparent, name); + return new QDesignerDataView2(tqparent, name); #endif // try to create it using the loaded kommander widget plugins -- cgit v1.2.3