From b8cc513c5e875739c6790da651f6a3f47ed8f657 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Wed, 12 Jul 2023 11:39:51 +0900 Subject: Replace _OBJECT_NAME_STRING defines with actual strings. This relates to the merging of tqtinterface with tqt3. Signed-off-by: Michele Calgaro --- kdevdesigner/designer/actiondnd.cpp | 4 +- kdevdesigner/designer/command.cpp | 2 +- kdevdesigner/designer/connectionitems.cpp | 4 +- kdevdesigner/designer/database.cpp | 2 +- kdevdesigner/designer/editfunctionsimpl.cpp | 2 +- kdevdesigner/designer/formwindow.cpp | 36 ++-- kdevdesigner/designer/hierarchyview.cpp | 4 +- kdevdesigner/designer/layout.cpp | 10 +- kdevdesigner/designer/listboxeditorimpl.cpp | 2 +- kdevdesigner/designer/listvieweditorimpl.cpp | 4 +- kdevdesigner/designer/mainwindow.cpp | 30 ++-- kdevdesigner/designer/mainwindowactions.cpp | 4 +- kdevdesigner/designer/newformimpl.cpp | 8 +- kdevdesigner/designer/popupmenueditor.cpp | 4 +- kdevdesigner/designer/previewwidgetimpl.cpp | 2 +- kdevdesigner/designer/project.cpp | 2 +- kdevdesigner/designer/propertyeditor.cpp | 12 +- kdevdesigner/designer/resource.cpp | 156 ++++++++-------- kdevdesigner/designer/startdialogimpl.cpp | 2 +- kdevdesigner/designer/widgetfactory.cpp | 128 ++++++------- kdevdesigner/designer/widgetfactory.h | 24 +-- kdevdesigner/shared/ui2uib.cpp | 28 +-- kdevdesigner/shared/widgetdatabase.cpp | 84 ++++----- kdevdesigner/uilib/database.cpp | 2 +- kdevdesigner/uilib/qwidgetfactory.cpp | 258 +++++++++++++-------------- 25 files changed, 407 insertions(+), 407 deletions(-) (limited to 'kdevdesigner') diff --git a/kdevdesigner/designer/actiondnd.cpp b/kdevdesigner/designer/actiondnd.cpp index 33f0c4bf..604e45d4 100644 --- a/kdevdesigner/designer/actiondnd.cpp +++ b/kdevdesigner/designer/actiondnd.cpp @@ -281,7 +281,7 @@ static void fixObject( TQObject *&o ) bool QDesignerToolBar::eventFilter( TQObject *o, TQEvent *e ) { - if ( !o || !e || o->inherits( TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING ) || o->inherits( "TQDockWindowTitleBar" ) ) + if ( !o || !e || o->inherits( "TQDockWindowHandle" ) || o->inherits( "TQDockWindowTitleBar" ) ) return TQToolBar::eventFilter( o, e ); if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) && e->type() == TQEvent::MouseButtonPress && @@ -719,7 +719,7 @@ void QDesignerToolBar::installEventFilters( TQWidget *w ) { if ( !w ) return; - TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); + TQObjectList *l = w->queryList( "TQWidget" ); for ( TQObject *o = l->first(); o; o = l->next() ) o->installEventFilter( this ); delete l; diff --git a/kdevdesigner/designer/command.cpp b/kdevdesigner/designer/command.cpp index b9b97827..8d7888c2 100644 --- a/kdevdesigner/designer/command.cpp +++ b/kdevdesigner/designer/command.cpp @@ -371,7 +371,7 @@ DeleteCommand::DeleteCommand( const TQString &n, FormWindow *fw, // Include the children of the selected items when deleting for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - TQObjectList *children = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); + TQObjectList *children = w->queryList( "TQWidget" ); for ( TQWidget *c = (TQWidget *)children->first(); c; c = (TQWidget *)children->next() ) { if ( copyOfWidgets.find( c ) == -1 && formWindow()->widgets()->find( c ) ) { widgets.insert(widgets.at() + 1, c); diff --git a/kdevdesigner/designer/connectionitems.cpp b/kdevdesigner/designer/connectionitems.cpp index 12b03a1d..d2371426 100644 --- a/kdevdesigner/designer/connectionitems.cpp +++ b/kdevdesigner/designer/connectionitems.cpp @@ -258,7 +258,7 @@ void SenderItem::setSenderEx( TQObject *sender ) void SenderItem::senderChanged( const TQString &sender ) { - TQObject *o = formWindow->child( sender, TQOBJECT_OBJECT_NAME_STRING ); + TQObject *o = formWindow->child( sender, "TQObject" ); if ( !o ) o = formWindow->findAction( sender ); if ( !o ) @@ -315,7 +315,7 @@ void ReceiverItem::setReceiverEx( TQObject *receiver ) void ReceiverItem::receiverChanged( const TQString &receiver ) { - TQObject *o = formWindow->child( receiver, TQOBJECT_OBJECT_NAME_STRING ); + TQObject *o = formWindow->child( receiver, "TQObject" ); if ( !o ) o = formWindow->findAction( receiver ); if ( !o ) diff --git a/kdevdesigner/designer/database.cpp b/kdevdesigner/designer/database.cpp index b5baea28..e7fdf0df 100644 --- a/kdevdesigner/designer/database.cpp +++ b/kdevdesigner/designer/database.cpp @@ -62,7 +62,7 @@ void DatabaseSupport::initPreview( const TQString &connection, const TQString &t con = TQSqlDatabase::database(); frm = new TQSqlForm( o, table ); for ( TQMap::Iterator it = dbControls.begin(); it != dbControls.end(); ++it ) { - TQObject *chld = parent->child( it.key(), TQWIDGET_OBJECT_NAME_STRING ); + TQObject *chld = parent->child( it.key(), "TQWidget" ); if ( !chld ) continue; frm->insert( (TQWidget*)chld, *it ); diff --git a/kdevdesigner/designer/editfunctionsimpl.cpp b/kdevdesigner/designer/editfunctionsimpl.cpp index 5681f00b..4d006097 100644 --- a/kdevdesigner/designer/editfunctionsimpl.cpp +++ b/kdevdesigner/designer/editfunctionsimpl.cpp @@ -116,7 +116,7 @@ EditFunctions::EditFunctions( TQWidget *parent, FormWindow *fw, bool justSlots ) TQT_SLOT( emitItemRenamed(TQListViewItem*, int, const TQString&) ) ); // Connect signal-relay to TQLineEdit "functionName" - TQObjectList *l = parent->queryList( TQLINEEDIT_OBJECT_NAME_STRING, "functionName" ); + TQObjectList *l = parent->queryList( "TQLineEdit", "functionName" ); TQObject *obj; TQObjectListIt itemsLineEditIt( *l ); while ( (obj = itemsLineEditIt.current()) != 0 ) { diff --git a/kdevdesigner/designer/formwindow.cpp b/kdevdesigner/designer/formwindow.cpp index 99f631ae..db0c1e2a 100644 --- a/kdevdesigner/designer/formwindow.cpp +++ b/kdevdesigner/designer/formwindow.cpp @@ -198,7 +198,7 @@ void FormWindow::init() this, TQT_SLOT( modificationChanged( bool ) ) ); buffer = 0; - TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQFRAME_OBJECT_NAME_STRING ), this ); + TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQFrame" ), this ); setMainContainer( w ); propertyWidget = TQT_TQOBJECT(w); targetContainer = 0; @@ -355,7 +355,7 @@ void FormWindow::insertWidget() bool useSizeHint = !oldRectValid || ( currRect.width() < 2 && currRect.height() < 2 ); Qt::Orientation orient =Qt::Horizontal; TQString n = WidgetDatabase::className( currTool ); - if ( useSizeHint && ( n == "Spacer" || n == TQSLIDER_OBJECT_NAME_STRING || n == "Line" || n == TQSCROLLBAR_OBJECT_NAME_STRING ) ) { + if ( useSizeHint && ( n == "Spacer" || n == "TQSlider" || n == "Line" || n == "TQScrollBar" ) ) { TQPopupMenu m( mainWindow() ); m.insertItem( i18n( "&Horizontal" ) ); int ver = m.insertItem( i18n( "&Vertical" ) ); @@ -594,7 +594,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) } else { // ...widget selected // only if widget has a layout (it is a layout meta widget or a laid out container!), unselect its childs if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout ) { - TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); + TQObjectList *l = w->queryList( "TQWidget" ); setPropertyShowingBlocked( TRUE ); for ( TQObject *o = l->first(); o; o = l->next() ) { if ( !o->isWidgetType() ) @@ -1160,7 +1160,7 @@ void FormWindow::handleKeyPress( TQKeyEvent *e, TQWidget *w ) } } if ( !e->isAccepted() ) { - TQObjectList *l = queryList( TQWIDGET_OBJECT_NAME_STRING ); + TQObjectList *l = queryList( "TQWidget" ); if ( !l ) return; if ( l->find( TQT_TQOBJECT(w) ) != -1 ) @@ -1365,7 +1365,7 @@ void FormWindow::endRectDraw() void FormWindow::selectWidgets() { - TQObjectList *l = mainContainer()->queryList( TQWIDGET_OBJECT_NAME_STRING ); + TQObjectList *l = mainContainer()->queryList( "TQWidget" ); if ( l ) { for ( TQObject *o = l->first(); o; o = l->next() ) { if ( ( (TQWidget*)o )->isVisibleTo( this ) && @@ -1420,7 +1420,7 @@ void FormWindow::redo() void FormWindow::raiseChildSelections( TQWidget *w ) { - TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); + TQObjectList *l = w->queryList( "TQWidget" ); if ( !l || !l->first() ) { delete l; return; @@ -1436,7 +1436,7 @@ void FormWindow::raiseChildSelections( TQWidget *w ) void FormWindow::updateChildSelections( TQWidget *w ) { - TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); + TQObjectList *l = w->queryList( "TQWidget" ); if ( l ) { for ( TQObject *o = l->first(); o; o = l->next() ) { if ( o->isWidgetType() && @@ -1451,7 +1451,7 @@ void FormWindow::checkSelectionsForMove( TQWidget *w ) { checkedSelectionsForMove = TRUE; - TQObjectList *l = w->parentWidget()->queryList( TQWIDGET_OBJECT_NAME_STRING, 0, FALSE, FALSE ); + TQObjectList *l = w->parentWidget()->queryList( "TQWidget", 0, FALSE, FALSE ); moving.clear(); if ( l ) { TQPtrDictIterator it( usedSelections ); @@ -1613,7 +1613,7 @@ void FormWindow::resizeEvent( TQResizeEvent *e ) void FormWindow::windowsRepaintWorkaroundTimerTimeout() { #if defined(TQ_WS_WIN32) - TQObjectList *l = queryList( TQWIDGET_OBJECT_NAME_STRING ); + TQObjectList *l = queryList( "TQWidget" ); for ( TQObject *o = l->first(); o; o = l->next() ) { flickerfree_update( (TQWidget*)o ); } @@ -1771,7 +1771,7 @@ void FormWindow::showOrderIndicators() { hideOrderIndicators(); orderIndicators.setAutoDelete( TRUE ); - TQObjectList *l = mainContainer()->queryList( TQWIDGET_OBJECT_NAME_STRING ); + TQObjectList *l = mainContainer()->queryList( "TQWidget" ); stackedWidgets = MetaDataBase::tabOrder( this ); if ( l ) { int order = 1; @@ -1903,7 +1903,7 @@ void FormWindow::checkAccels() { CHECK_MAINWINDOW; TQMap accels; - TQObjectList *l = mainContainer()->queryList( TQWIDGET_OBJECT_NAME_STRING ); + TQObjectList *l = mainContainer()->queryList( "TQWidget" ); if ( l ) { for ( TQObject *o = l->first(); o; o = l->next() ) { if ( ( (TQWidget*)o )->isVisibleTo( this ) && @@ -1978,7 +1978,7 @@ void FormWindow::selectAll() { checkedSelectionsForMove = FALSE; blockSignals( TRUE ); - TQObjectList *l = mainContainer()->queryList( TQWIDGET_OBJECT_NAME_STRING ); + TQObjectList *l = mainContainer()->queryList( "TQWidget" ); if ( l ) { for ( TQObject *o = l->first(); o; o = l->next() ) { if ( ( (TQWidget*)o )->isVisibleTo( this ) && @@ -2181,7 +2181,7 @@ bool FormWindow::hasInsertedChildren( TQWidget *w ) const w = WidgetFactory::containerOfWidget( w ); if ( !w ) return FALSE; - TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); + TQObjectList *l = w->queryList( "TQWidget" ); if ( !l || !l->first() ) { delete l; return FALSE; @@ -2376,7 +2376,7 @@ bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt ) TQPtrList al; TQAction *a = 0; for ( a = actions.first(); a; a = actions.next() ) { - TQObjectList *l = a->queryList( TQACTION_OBJECT_NAME_STRING ); + TQObjectList *l = a->queryList( "TQAction" ); al.append( a ); for ( TQObject *ao = l->first(); ao; ao = l->next() ) al.append( (TQAction*)ao ); @@ -2409,7 +2409,7 @@ bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt ) } if ( ::tqqt_cast(mainContainer()) ) { if ( !found ) { - TQObjectList *l = mainContainer()->queryList( TQDOCKWINDOW_OBJECT_NAME_STRING, 0, TRUE ); + TQObjectList *l = mainContainer()->queryList( "TQDockWindow", 0, TRUE ); for ( TQObject *o = l->first(); o; o = l->next() ) { if ( o != w && qstrcmp( o->name(), s.latin1() ) == 0 ) { @@ -2447,7 +2447,7 @@ bool FormWindow::isDatabaseWidgetUsed() const { #ifndef TQT_NO_SQL TQStringList dbClasses; - dbClasses << TQDATATABLE_OBJECT_NAME_STRING; // add more here + dbClasses << "TQDataTable"; // add more here TQPtrDictIterator it( insertedWidgets ); for ( ; it.current(); ++it ) { TQString c( it.current()->className() ); @@ -2663,7 +2663,7 @@ TQAction *FormWindow::findAction( const TQString &name ) for ( TQAction *a = actionList().first(); a; a = actionList().next() ) { if ( TQString( a->name() ) == name ) return a; - TQAction *ac = (TQAction*)a->child( name.latin1(), TQACTION_OBJECT_NAME_STRING ); + TQAction *ac = (TQAction*)a->child( name.latin1(), "TQAction" ); if ( ac ) return ac; } @@ -2672,7 +2672,7 @@ TQAction *FormWindow::findAction( const TQString &name ) void FormWindow::killAccels( TQObject *top ) { - TQObjectList *l = top->queryList( TQACCEL_OBJECT_NAME_STRING ); + TQObjectList *l = top->queryList( "TQAccel" ); if ( !l ) return; for ( TQObject *o = l->first(); o; o = l->next() ) diff --git a/kdevdesigner/designer/hierarchyview.cpp b/kdevdesigner/designer/hierarchyview.cpp index c6433cd0..43e16601 100644 --- a/kdevdesigner/designer/hierarchyview.cpp +++ b/kdevdesigner/designer/hierarchyview.cpp @@ -447,7 +447,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) if ( fakeMainWindow ) { name = o->parent()->name(); - className = TQMAINWINDOW_OBJECT_NAME_STRING; + className = "TQMainWindow"; } if ( !parent ) @@ -491,7 +491,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) if ( widgetStacks->findRef( stack ) != -1 ) continue; widgetStacks->append( stack ); - TQObjectList *l2 = stack->queryList( TQWIDGET_OBJECT_NAME_STRING, 0, TRUE, FALSE ); + TQObjectList *l2 = stack->queryList( "TQWidget", 0, TRUE, FALSE ); for ( obj = l2->last(); obj; obj = l2->prev() ) { if ( qstrcmp( obj->className(), "TQWidgetStackPrivate::Invisible" ) == 0 || diff --git a/kdevdesigner/designer/layout.cpp b/kdevdesigner/designer/layout.cpp index b8fb737c..be20989c 100644 --- a/kdevdesigner/designer/layout.cpp +++ b/kdevdesigner/designer/layout.cpp @@ -170,10 +170,10 @@ bool Layout::prepareLayout( bool &needMove, bool &needReparent ) needReparent = needMove || ::tqqt_cast(layoutBase) || ::tqqt_cast(layoutBase); if ( !layoutBase ) { if ( !useSplitter ) - layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( TQLAYOUTWIDGET_OBJECT_NAME_STRING ), + layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQLayoutWidget" ), WidgetFactory::containerOfWidget( parent ) ); else - layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( TQSPLITTER_OBJECT_NAME_STRING ), + layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQSplitter" ), WidgetFactory::containerOfWidget( parent ) ); } else { WidgetFactory::deleteLayout( layoutBase ); @@ -239,11 +239,11 @@ void Layout::breakLayout() rects.insert( w, w->geometry() ); } WidgetFactory::deleteLayout( layoutBase ); - bool needReparent = qstrcmp( layoutBase->className(), TQLAYOUTWIDGET_OBJECT_NAME_STRING ) == 0 || - qstrcmp( layoutBase->className(), TQSPLITTER_OBJECT_NAME_STRING ) == 0 || + bool needReparent = qstrcmp( layoutBase->className(), "TQLayoutWidget" ) == 0 || + qstrcmp( layoutBase->className(), "TQSplitter" ) == 0 || ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(layoutBase) ) ) ) && layoutBase != formWindow->mainContainer() ); - bool needResize = qstrcmp( layoutBase->className(), TQSPLITTER_OBJECT_NAME_STRING ) == 0; + bool needResize = qstrcmp( layoutBase->className(), "TQSplitter" ) == 0; bool add = geometries.isEmpty(); for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { if ( needReparent ) diff --git a/kdevdesigner/designer/listboxeditorimpl.cpp b/kdevdesigner/designer/listboxeditorimpl.cpp index 01dfa64e..85a321ab 100644 --- a/kdevdesigner/designer/listboxeditorimpl.cpp +++ b/kdevdesigner/designer/listboxeditorimpl.cpp @@ -70,7 +70,7 @@ ListBoxEditor::ListBoxEditor( TQWidget *parent, TQWidget *editWidget, FormWindow ListBoxRename *editorRename = new ListBoxRename( preview ); - TQObjectList *l = parent->queryList( TQLINEEDIT_OBJECT_NAME_STRING, "itemText" ); + TQObjectList *l = parent->queryList( "TQLineEdit", "itemText" ); TQObjectListIt it( *l ); TQObject *obj; while ( (obj = it.current()) != 0 ) { diff --git a/kdevdesigner/designer/listvieweditorimpl.cpp b/kdevdesigner/designer/listvieweditorimpl.cpp index c5ec7498..8e4c2a32 100644 --- a/kdevdesigner/designer/listvieweditorimpl.cpp +++ b/kdevdesigner/designer/listvieweditorimpl.cpp @@ -86,7 +86,7 @@ ListViewEditor::ListViewEditor( TQWidget *parent, TQListView *lv, FormWindow *fw TQT_SLOT( emitItemRenamed(TQListViewItem*, int, const TQString&) ) ); // Connect signal-relay to TQLineEdit "itemText" - TQObjectList *l = parent->queryList( TQLINEEDIT_OBJECT_NAME_STRING, "itemText" ); + TQObjectList *l = parent->queryList( "TQLineEdit", "itemText" ); TQObject *obj; TQObjectListIt itemsLineEditIt( *l ); while ( (obj = itemsLineEditIt.current()) != 0 ) { @@ -112,7 +112,7 @@ ListViewEditor::ListViewEditor( TQWidget *parent, TQListView *lv, FormWindow *fw TQT_SLOT( columnTextChanged( const TQString & ) ) ); // Find TQLineEdit "colText" and connect - l = parent->queryList( TQLINEEDIT_OBJECT_NAME_STRING, "colText" ); + l = parent->queryList( "TQLineEdit", "colText" ); TQObjectListIt columnsLineEditIt( *l ); while ( (obj = columnsLineEditIt.current()) != 0 ) { ++columnsLineEditIt; diff --git a/kdevdesigner/designer/mainwindow.cpp b/kdevdesigner/designer/mainwindow.cpp index 47a581e2..6f98d371 100644 --- a/kdevdesigner/designer/mainwindow.cpp +++ b/kdevdesigner/designer/mainwindow.cpp @@ -258,15 +258,15 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons set_splash_status( "Loading User Settings..." ); readConfig(); // hack to make WidgetFactory happy (so it knows TQWidget and TQDialog for resetting properties) - TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQWIDGET_OBJECT_NAME_STRING ), this, 0, FALSE ); + TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQWidget" ), this, 0, FALSE ); delete w; - w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQDIALOG_OBJECT_NAME_STRING ), this, 0, FALSE ); + w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQDialog" ), this, 0, FALSE ); delete w; - w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQLABEL_OBJECT_NAME_STRING ), this, 0, FALSE ); + w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQLabel" ), this, 0, FALSE ); delete w; - w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQTABWIDGET_OBJECT_NAME_STRING ), this, 0, FALSE ); + w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQTabWidget" ), this, 0, FALSE ); delete w; - w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQFRAME_OBJECT_NAME_STRING ), this, 0, FALSE ); + w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQFrame" ), this, 0, FALSE ); delete w; setAppropriate( (TQDockWindow*)actionEditor->parentWidget(), FALSE ); actionEditor->parentWidget()->hide(); @@ -613,7 +613,7 @@ TQWidget* MainWindow::previewFormInternal( TQStyle* style, TQPalette* palet ) if ( style ) w->setStyle( style ); - TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); + TQObjectList *l = w->queryList( "TQWidget" ); for ( TQObject *o = l->first(); o; o = l->next() ) { if ( style ) ( (TQWidget*)o )->setStyle( style ); @@ -788,7 +788,7 @@ void MainWindow::helpContents() if ( source.isEmpty() || source == "designer-manual.html" ) { if ( classname.lower() == "spacer" ) source = "qspaceritem.html#details"; - else if ( classname == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) + else if ( classname == "TQLayoutWidget" ) source = "layout.html"; else source = TQString( WidgetFactory::classNameOf( propertyEditor->widget() ) ).lower() + ".html#details"; @@ -1010,7 +1010,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) pw = pw->parentWidget(); } } - if ( o && ( ::tqqt_cast(o) || o->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING) ) + if ( o && ( ::tqqt_cast(o) || o->inherits("TQDockWindowHandle") ) && e->type() == TQEvent::ContextMenu ) break; if ( isAToolBarChild( o ) && currentTool() != CONNECT_TOOL && currentTool() != BUDDY_TOOL ) @@ -1550,18 +1550,18 @@ void MainWindow::popupWidgetMenu( const TQPoint &gp, FormWindow * /*fw*/, TQWidg void MainWindow::setupRMBProperties( TQValueList &ids, TQMap &props, TQWidget *w ) { const TQMetaProperty* text = w->metaObject()->property( w->metaObject()->findProperty( "text", TRUE ), TRUE ); - if ( text && qstrcmp( text->type(), TQSTRING_OBJECT_NAME_STRING) != 0 ) + if ( text && qstrcmp( text->type(), "TQString") != 0 ) text = 0; const TQMetaProperty* title = w->metaObject()->property( w->metaObject()->findProperty( "title", TRUE ), TRUE ); - if ( title && qstrcmp( title->type(), TQSTRING_OBJECT_NAME_STRING) != 0 ) + if ( title && qstrcmp( title->type(), "TQString") != 0 ) title = 0; const TQMetaProperty* pagetitle = w->metaObject()->property( w->metaObject()->findProperty( "pageTitle", TRUE ), TRUE ); - if ( pagetitle && qstrcmp( pagetitle->type(), TQSTRING_OBJECT_NAME_STRING) != 0 ) + if ( pagetitle && qstrcmp( pagetitle->type(), "TQString") != 0 ) pagetitle = 0; const TQMetaProperty* pixmap = w->metaObject()->property( w->metaObject()->findProperty( "pixmap", TRUE ), TRUE ); - if ( pixmap && qstrcmp( pixmap->type(), TQPIXMAP_OBJECT_NAME_STRING) != 0 ) + if ( pixmap && qstrcmp( pixmap->type(), "TQPixmap") != 0 ) pixmap = 0; if ( text && text->designable(w) || @@ -2930,11 +2930,11 @@ void MainWindow::setupActionManager() TQPopupMenu *menu = 0; TQToolBar *tb = 0; - if ( !( menu = (TQPopupMenu*)child( grp.latin1(), TQPOPUPMENU_OBJECT_NAME_STRING ) ) ) { + if ( !( menu = (TQPopupMenu*)child( grp.latin1(), "TQPopupMenu" ) ) ) { menu = new TQPopupMenu( this, grp.latin1() ); menuBar()->insertItem( i18n( grp ), menu ); } - if ( !( tb = (TQToolBar*)child( grp.latin1(), TQTOOLBAR_OBJECT_NAME_STRING ) ) ) { + if ( !( tb = (TQToolBar*)child( grp.latin1(), "TQToolBar" ) ) ) { tb = new TQToolBar( this, grp.latin1() ); tb->setCloseMode( TQDockWindow::Undocked ); addToolBar( tb, grp ); @@ -3293,7 +3293,7 @@ void MainWindow::finishedRun() void MainWindow::enableAll( bool enable ) { menuBar()->setEnabled( enable ); - TQObjectList *l = queryList( TQDOCKWINDOW_OBJECT_NAME_STRING ); + TQObjectList *l = queryList( "TQDockWindow" ); for ( TQObject *o = l->first(); o; o = l->next() ) { if ( TQT_BASE_OBJECT(o) == wspace->parentWidget() || TQT_BASE_OBJECT(o) == oWindow->parentWidget() || diff --git a/kdevdesigner/designer/mainwindowactions.cpp b/kdevdesigner/designer/mainwindowactions.cpp index ec5cc004..161d3dae 100644 --- a/kdevdesigner/designer/mainwindowactions.cpp +++ b/kdevdesigner/designer/mainwindowactions.cpp @@ -1045,7 +1045,7 @@ void MainWindow::fileNewDialog() workspace()->update(); fw->setProject( currentProject ); MetaDataBase::addEntry( TQT_TQOBJECT(fw) ); - TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQDIALOG_OBJECT_NAME_STRING ), fw, n.latin1() ); + TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQDialog" ), fw, n.latin1() ); fw->setMainContainer( w ); fw->setCaption( n ); fw->resize( 600, 480 ); @@ -1412,7 +1412,7 @@ void MainWindow::fileCreateTemplate() } for ( i = 0; i < WidgetDatabase::count(); ++i ) { if ( WidgetDatabase::isContainer( i ) && !WidgetDatabase::isForm(i) && - WidgetDatabase::className( i ) != TQTABWIDGET_OBJECT_NAME_STRING && WidgetDatabase::group( i ) != "Temp" ) { + WidgetDatabase::className( i ) != "TQTabWidget" && WidgetDatabase::group( i ) != "Temp" ) { dia.listClass->insertItem( WidgetDatabase::className( i ) ); } } diff --git a/kdevdesigner/designer/newformimpl.cpp b/kdevdesigner/designer/newformimpl.cpp index 17dfc1b7..738c8a55 100644 --- a/kdevdesigner/designer/newformimpl.cpp +++ b/kdevdesigner/designer/newformimpl.cpp @@ -79,18 +79,18 @@ void FormItem::insert( Project *pro ) fw->setProject( pro ); MetaDataBase::addEntry( TQT_TQOBJECT(fw) ); if ( fType == Widget ) { - TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQWIDGET_OBJECT_NAME_STRING ), + TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQWidget" ), fw, n.latin1() ); fw->setMainContainer( w ); } else if ( fType == Dialog ) { - TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQDIALOG_OBJECT_NAME_STRING ), fw, n.latin1() ); + TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQDialog" ), fw, n.latin1() ); fw->setMainContainer( w ); } else if ( fType == Wizard ) { - TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQWIZARD_OBJECT_NAME_STRING ), + TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQWizard" ), fw, n.latin1() ); fw->setMainContainer( w ); } else if ( fType == MainWindow ) { - TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQMAINWINDOW_OBJECT_NAME_STRING ), + TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQMainWindow" ), fw, n.latin1() ); fw->setMainContainer( w ); } diff --git a/kdevdesigner/designer/popupmenueditor.cpp b/kdevdesigner/designer/popupmenueditor.cpp index da6289dd..d2a66750 100644 --- a/kdevdesigner/designer/popupmenueditor.cpp +++ b/kdevdesigner/designer/popupmenueditor.cpp @@ -357,7 +357,7 @@ void PopupMenuEditor::insert( TQActionGroup * actionGroup, int index ) PopupMenuEditorItem *i = new PopupMenuEditorItem( (TQAction *)actionGroup, this, 0, TQString( actionGroup->name() ) + "Menu" ); TQActionGroup *g = 0; - TQObjectList *l = actionGroup->queryList( TQACTION_OBJECT_NAME_STRING, 0, FALSE, FALSE ); + TQObjectList *l = actionGroup->queryList( "TQAction", 0, FALSE, FALSE ); TQObjectListIterator it( *l ); insert( i, index ); for ( ; it.current(); ++it ) { @@ -863,7 +863,7 @@ void PopupMenuEditor::dropEvent( TQDropEvent * e ) TQString n = TQString( g->name() ) + "Item"; formWindow()->unify( i, n, FALSE ); i->setName( n ); - TQObjectList *l = g->queryList( TQACTION_OBJECT_NAME_STRING, 0, FALSE, FALSE ); + TQObjectList *l = g->queryList( "TQAction", 0, FALSE, FALSE ); TQObjectListIterator it( *l ); for ( ; it.current(); ++it ) { g = ::tqqt_cast(it.current()); diff --git a/kdevdesigner/designer/previewwidgetimpl.cpp b/kdevdesigner/designer/previewwidgetimpl.cpp index d574f9ae..15fb8058 100644 --- a/kdevdesigner/designer/previewwidgetimpl.cpp +++ b/kdevdesigner/designer/previewwidgetimpl.cpp @@ -31,7 +31,7 @@ PreviewWidget::PreviewWidget( TQWidget *parent, const char *name ) : PreviewWidgetBase( parent, name ) { // install event filter on child widgets - TQObjectList *l = queryList(TQWIDGET_OBJECT_NAME_STRING); + TQObjectList *l = queryList("TQWidget"); TQObjectListIt it(*l); TQObject * obj; while ((obj = it.current()) != 0) { diff --git a/kdevdesigner/designer/project.cpp b/kdevdesigner/designer/project.cpp index 0ab26894..d8a6cf94 100644 --- a/kdevdesigner/designer/project.cpp +++ b/kdevdesigner/designer/project.cpp @@ -1066,7 +1066,7 @@ TQObjectList *Project::formList( bool resolveFakeObjects ) const if ( resolveFakeObjects && f->formWindow()->isFake() ) l->append( objectForFakeForm( f->formWindow() ) ); else - l->append( f->formWindow()->child( 0, TQWIDGET_OBJECT_NAME_STRING ) ); + l->append( f->formWindow()->child( 0, "TQWidget" ) ); } else if ( f->isFake() ) { l->append( objectForFakeFormFile( f ) ); } diff --git a/kdevdesigner/designer/propertyeditor.cpp b/kdevdesigner/designer/propertyeditor.cpp index 057e73f7..d4826c7e 100644 --- a/kdevdesigner/designer/propertyeditor.cpp +++ b/kdevdesigner/designer/propertyeditor.cpp @@ -861,7 +861,7 @@ TQDateEdit *PropertyDateItem::lined() if ( lin ) return lin; lin = new TQDateEdit( listview->viewport() ); - TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); + TQObjectList *l = lin->queryList( "TQLineEdit" ); for ( TQObject *o = l->first(); o; o = l->next() ) o->installEventFilter( listview ); delete l; @@ -938,7 +938,7 @@ TQTimeEdit *PropertyTimeItem::lined() lin = new TQTimeEdit( listview->viewport() ); connect( lin, TQT_SIGNAL( valueChanged( const TQTime & ) ), this, TQT_SLOT( setValue() ) ); - TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); + TQObjectList *l = lin->queryList( "TQLineEdit" ); for ( TQObject *o = l->first(); o; o = l->next() ) o->installEventFilter( listview ); delete l; @@ -1013,7 +1013,7 @@ TQDateTimeEdit *PropertyDateTimeItem::lined() lin = new TQDateTimeEdit( listview->viewport() ); connect( lin, TQT_SIGNAL( valueChanged( const TQDateTime & ) ), this, TQT_SLOT( setValue() ) ); - TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); + TQObjectList *l = lin->queryList( "TQLineEdit" ); for ( TQObject *o = l->first(); o; o = l->next() ) o->installEventFilter( listview ); delete l; @@ -1182,7 +1182,7 @@ TQSpinBox *PropertyIntItem::spinBox() spinBx = new TQSpinBox( 0, INT_MAX, 1, listview->viewport() ); spinBx->hide(); spinBx->installEventFilter( listview ); - TQObjectList *ol = spinBx->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); + TQObjectList *ol = spinBx->queryList( "TQLineEdit" ); if ( ol && ol->first() ) ol->first()->installEventFilter( listview ); delete ol; @@ -1278,7 +1278,7 @@ TQSpinBox* PropertyLayoutItem::spinBox() spinBx->setSpecialValueText( i18n( "default" ) ); spinBx->hide(); spinBx->installEventFilter( listview ); - TQObjectList *ol = spinBx->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); + TQObjectList *ol = spinBx->queryList( "TQLineEdit" ); if ( ol && ol->first() ) ol->first()->installEventFilter( listview ); delete ol; @@ -1351,7 +1351,7 @@ TQComboBox *PropertyListItem::combo() this, TQT_SLOT( setValue() ) ); comb->installEventFilter( listview ); if ( editable ) { - TQObjectList *ol = comb->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); + TQObjectList *ol = comb->queryList( "TQLineEdit" ); if ( ol && ol->first() ) ol->first()->installEventFilter( listview ); delete ol; diff --git a/kdevdesigner/designer/resource.cpp b/kdevdesigner/designer/resource.cpp index 9b7d00a0..db41b131 100644 --- a/kdevdesigner/designer/resource.cpp +++ b/kdevdesigner/designer/resource.cpp @@ -112,87 +112,87 @@ static struct { int key; const char* name; } keyname[] = { - { TQt::Key_Space, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Space" ) }, - { TQt::Key_Escape, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Esc" ) }, - { TQt::Key_Tab, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Tab" ) }, - { TQt::Key_Backtab, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Backtab" ) }, - { TQt::Key_Backspace, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Backspace" ) }, - { TQt::Key_Return, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Return" ) }, - { TQt::Key_Enter, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Enter" ) }, - { TQt::Key_Insert, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Ins" ) }, - { TQt::Key_Delete, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Del" ) }, - { TQt::Key_Pause, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Pause" ) }, - { TQt::Key_Print, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Print" ) }, - { TQt::Key_SysReq, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "SysReq" ) }, - { TQt::Key_Home, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Home" ) }, - { TQt::Key_End, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "End" ) }, - { TQt::Key_Left, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Left" ) }, - { TQt::Key_Up, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Up" ) }, - { TQt::Key_Right, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Right" ) }, - { TQt::Key_Down, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Down" ) }, - { TQt::Key_Prior, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "PgUp" ) }, - { TQt::Key_Next, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "PgDown" ) }, - { TQt::Key_CapsLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "CapsLock" ) }, - { TQt::Key_NumLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "NumLock" ) }, - { TQt::Key_ScrollLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "ScrollLock" ) }, - { TQt::Key_Menu, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Menu" ) }, - { TQt::Key_Help, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Help" ) }, + { TQt::Key_Space, TQT_TRANSLATE_NOOP( "TQAccel", "Space" ) }, + { TQt::Key_Escape, TQT_TRANSLATE_NOOP( "TQAccel", "Esc" ) }, + { TQt::Key_Tab, TQT_TRANSLATE_NOOP( "TQAccel", "Tab" ) }, + { TQt::Key_Backtab, TQT_TRANSLATE_NOOP( "TQAccel", "Backtab" ) }, + { TQt::Key_Backspace, TQT_TRANSLATE_NOOP( "TQAccel", "Backspace" ) }, + { TQt::Key_Return, TQT_TRANSLATE_NOOP( "TQAccel", "Return" ) }, + { TQt::Key_Enter, TQT_TRANSLATE_NOOP( "TQAccel", "Enter" ) }, + { TQt::Key_Insert, TQT_TRANSLATE_NOOP( "TQAccel", "Ins" ) }, + { TQt::Key_Delete, TQT_TRANSLATE_NOOP( "TQAccel", "Del" ) }, + { TQt::Key_Pause, TQT_TRANSLATE_NOOP( "TQAccel", "Pause" ) }, + { TQt::Key_Print, TQT_TRANSLATE_NOOP( "TQAccel", "Print" ) }, + { TQt::Key_SysReq, TQT_TRANSLATE_NOOP( "TQAccel", "SysReq" ) }, + { TQt::Key_Home, TQT_TRANSLATE_NOOP( "TQAccel", "Home" ) }, + { TQt::Key_End, TQT_TRANSLATE_NOOP( "TQAccel", "End" ) }, + { TQt::Key_Left, TQT_TRANSLATE_NOOP( "TQAccel", "Left" ) }, + { TQt::Key_Up, TQT_TRANSLATE_NOOP( "TQAccel", "Up" ) }, + { TQt::Key_Right, TQT_TRANSLATE_NOOP( "TQAccel", "Right" ) }, + { TQt::Key_Down, TQT_TRANSLATE_NOOP( "TQAccel", "Down" ) }, + { TQt::Key_Prior, TQT_TRANSLATE_NOOP( "TQAccel", "PgUp" ) }, + { TQt::Key_Next, TQT_TRANSLATE_NOOP( "TQAccel", "PgDown" ) }, + { TQt::Key_CapsLock, TQT_TRANSLATE_NOOP( "TQAccel", "CapsLock" ) }, + { TQt::Key_NumLock, TQT_TRANSLATE_NOOP( "TQAccel", "NumLock" ) }, + { TQt::Key_ScrollLock, TQT_TRANSLATE_NOOP( "TQAccel", "ScrollLock" ) }, + { TQt::Key_Menu, TQT_TRANSLATE_NOOP( "TQAccel", "Menu" ) }, + { TQt::Key_Help, TQT_TRANSLATE_NOOP( "TQAccel", "Help" ) }, // Multimedia keys - { TQt::Key_Back, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Back" ) }, - { TQt::Key_Forward, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Forward" ) }, - { TQt::Key_Stop, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Stop" ) }, - { TQt::Key_Refresh, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Refresh" ) }, - { TQt::Key_VolumeDown, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Volume Down" ) }, - { TQt::Key_VolumeMute, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Volume Mute" ) }, - { TQt::Key_VolumeUp, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Volume Up" ) }, - { TQt::Key_BassBoost, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Bass Boost" ) }, - { TQt::Key_BassUp, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Bass Up" ) }, - { TQt::Key_BassDown, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Bass Down" ) }, - { TQt::Key_TrebleUp, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Treble Up" ) }, - { TQt::Key_TrebleDown, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Treble Down" ) }, - { TQt::Key_MediaPlay, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Play" ) }, - { TQt::Key_MediaStop, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Stop" ) }, - { TQt::Key_MediaPrev, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Previous" ) }, - { TQt::Key_MediaNext, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Next" ) }, - { TQt::Key_MediaRecord, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Record" ) }, - { TQt::Key_HomePage, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Home" ) }, - { TQt::Key_Favorites, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Favorites" ) }, - { TQt::Key_Search, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Search" ) }, - { TQt::Key_Standby, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Standby" ) }, - { TQt::Key_OpenUrl, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Open URL" ) }, - { TQt::Key_LaunchMail, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch Mail" ) }, - { TQt::Key_LaunchMedia, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch Media" ) }, - { TQt::Key_Launch0, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (0)" ) }, - { TQt::Key_Launch1, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (1)" ) }, - { TQt::Key_Launch2, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (2)" ) }, - { TQt::Key_Launch3, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (3)" ) }, - { TQt::Key_Launch4, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (4)" ) }, - { TQt::Key_Launch5, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (5)" ) }, - { TQt::Key_Launch6, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (6)" ) }, - { TQt::Key_Launch7, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (7)" ) }, - { TQt::Key_Launch8, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (8)" ) }, - { TQt::Key_Launch9, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (9)" ) }, - { TQt::Key_LaunchA, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (A)" ) }, - { TQt::Key_LaunchB, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (B)" ) }, - { TQt::Key_LaunchC, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (C)" ) }, - { TQt::Key_LaunchD, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (D)" ) }, - { TQt::Key_LaunchE, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (E)" ) }, - { TQt::Key_LaunchF, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (F)" ) }, + { TQt::Key_Back, TQT_TRANSLATE_NOOP( "TQAccel", "Back" ) }, + { TQt::Key_Forward, TQT_TRANSLATE_NOOP( "TQAccel", "Forward" ) }, + { TQt::Key_Stop, TQT_TRANSLATE_NOOP( "TQAccel", "Stop" ) }, + { TQt::Key_Refresh, TQT_TRANSLATE_NOOP( "TQAccel", "Refresh" ) }, + { TQt::Key_VolumeDown, TQT_TRANSLATE_NOOP( "TQAccel", "Volume Down" ) }, + { TQt::Key_VolumeMute, TQT_TRANSLATE_NOOP( "TQAccel", "Volume Mute" ) }, + { TQt::Key_VolumeUp, TQT_TRANSLATE_NOOP( "TQAccel", "Volume Up" ) }, + { TQt::Key_BassBoost, TQT_TRANSLATE_NOOP( "TQAccel", "Bass Boost" ) }, + { TQt::Key_BassUp, TQT_TRANSLATE_NOOP( "TQAccel", "Bass Up" ) }, + { TQt::Key_BassDown, TQT_TRANSLATE_NOOP( "TQAccel", "Bass Down" ) }, + { TQt::Key_TrebleUp, TQT_TRANSLATE_NOOP( "TQAccel", "Treble Up" ) }, + { TQt::Key_TrebleDown, TQT_TRANSLATE_NOOP( "TQAccel", "Treble Down" ) }, + { TQt::Key_MediaPlay, TQT_TRANSLATE_NOOP( "TQAccel", "Media Play" ) }, + { TQt::Key_MediaStop, TQT_TRANSLATE_NOOP( "TQAccel", "Media Stop" ) }, + { TQt::Key_MediaPrev, TQT_TRANSLATE_NOOP( "TQAccel", "Media Previous" ) }, + { TQt::Key_MediaNext, TQT_TRANSLATE_NOOP( "TQAccel", "Media Next" ) }, + { TQt::Key_MediaRecord, TQT_TRANSLATE_NOOP( "TQAccel", "Media Record" ) }, + { TQt::Key_HomePage, TQT_TRANSLATE_NOOP( "TQAccel", "Home" ) }, + { TQt::Key_Favorites, TQT_TRANSLATE_NOOP( "TQAccel", "Favorites" ) }, + { TQt::Key_Search, TQT_TRANSLATE_NOOP( "TQAccel", "Search" ) }, + { TQt::Key_Standby, TQT_TRANSLATE_NOOP( "TQAccel", "Standby" ) }, + { TQt::Key_OpenUrl, TQT_TRANSLATE_NOOP( "TQAccel", "Open URL" ) }, + { TQt::Key_LaunchMail, TQT_TRANSLATE_NOOP( "TQAccel", "Launch Mail" ) }, + { TQt::Key_LaunchMedia, TQT_TRANSLATE_NOOP( "TQAccel", "Launch Media" ) }, + { TQt::Key_Launch0, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (0)" ) }, + { TQt::Key_Launch1, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (1)" ) }, + { TQt::Key_Launch2, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (2)" ) }, + { TQt::Key_Launch3, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (3)" ) }, + { TQt::Key_Launch4, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (4)" ) }, + { TQt::Key_Launch5, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (5)" ) }, + { TQt::Key_Launch6, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (6)" ) }, + { TQt::Key_Launch7, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (7)" ) }, + { TQt::Key_Launch8, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (8)" ) }, + { TQt::Key_Launch9, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (9)" ) }, + { TQt::Key_LaunchA, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (A)" ) }, + { TQt::Key_LaunchB, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (B)" ) }, + { TQt::Key_LaunchC, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (C)" ) }, + { TQt::Key_LaunchD, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (D)" ) }, + { TQt::Key_LaunchE, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (E)" ) }, + { TQt::Key_LaunchF, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (F)" ) }, // -------------------------------------------------------------- // More consistent namings - { TQt::Key_Print, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Print Screen" ) }, - { TQt::Key_Prior, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Page Up" ) }, - { TQt::Key_Next, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Page Down" ) }, - { TQt::Key_CapsLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Caps Lock" ) }, - { TQt::Key_NumLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Num Lock" ) }, - { TQt::Key_NumLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Number Lock" ) }, - { TQt::Key_ScrollLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Scroll Lock" ) }, - { TQt::Key_Insert, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Insert" ) }, - { TQt::Key_Delete, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Delete" ) }, - { TQt::Key_Escape, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Escape" ) }, - { TQt::Key_SysReq, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "System Request" ) }, + { TQt::Key_Print, TQT_TRANSLATE_NOOP( "TQAccel", "Print Screen" ) }, + { TQt::Key_Prior, TQT_TRANSLATE_NOOP( "TQAccel", "Page Up" ) }, + { TQt::Key_Next, TQT_TRANSLATE_NOOP( "TQAccel", "Page Down" ) }, + { TQt::Key_CapsLock, TQT_TRANSLATE_NOOP( "TQAccel", "Caps Lock" ) }, + { TQt::Key_NumLock, TQT_TRANSLATE_NOOP( "TQAccel", "Num Lock" ) }, + { TQt::Key_NumLock, TQT_TRANSLATE_NOOP( "TQAccel", "Number Lock" ) }, + { TQt::Key_ScrollLock, TQT_TRANSLATE_NOOP( "TQAccel", "Scroll Lock" ) }, + { TQt::Key_Insert, TQT_TRANSLATE_NOOP( "TQAccel", "Insert" ) }, + { TQt::Key_Delete, TQT_TRANSLATE_NOOP( "TQAccel", "Delete" ) }, + { TQt::Key_Escape, TQT_TRANSLATE_NOOP( "TQAccel", "Escape" ) }, + { TQt::Key_SysReq, TQT_TRANSLATE_NOOP( "TQAccel", "System Request" ) }, { 0, 0 } }; @@ -916,7 +916,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea if ( ::tqqt_cast(obj) ) { TQTabWidget* tw = (TQTabWidget*) obj; - TQObjectList* tmpl = tw->queryList( TQWIDGETSTACK_OBJECT_NAME_STRING ); + TQObjectList* tmpl = tw->queryList( "TQWidgetStack" ); TQWidgetStack *ws = (TQWidgetStack*)tmpl->first(); TQTabBar *tb = ( (QDesignerTabWidget*)obj )->tabBar(); for ( int i = 0; i < tb->count(); ++i ) { @@ -1807,7 +1807,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay if ( colspan < 1 ) colspan = 1; - TQString className = e.attribute( "class", TQWIDGET_OBJECT_NAME_STRING ); + TQString className = e.attribute( "class", "TQWidget" ); #ifdef TQT_CONTAINER_CUSTOM_WIDGETS TQString parentClassName = WidgetFactory::classNameOf( parent ); bool isPlugin = diff --git a/kdevdesigner/designer/startdialogimpl.cpp b/kdevdesigner/designer/startdialogimpl.cpp index adff44fd..1b21432f 100644 --- a/kdevdesigner/designer/startdialogimpl.cpp +++ b/kdevdesigner/designer/startdialogimpl.cpp @@ -151,7 +151,7 @@ void StartDialog::initFileOpen() TQPoint point( 0, 0 ); fd->reparent( tab, point ); - TQObjectList *l = fd->queryList( TQPUSHBUTTON_OBJECT_NAME_STRING ); + TQObjectList *l = fd->queryList( "TQPushButton" ); TQObjectListIt it( *l ); TQObject *obj; while ( (obj = it.current()) != 0 ) { diff --git a/kdevdesigner/designer/widgetfactory.cpp b/kdevdesigner/designer/widgetfactory.cpp index 162e20ce..9fd07ffc 100644 --- a/kdevdesigner/designer/widgetfactory.cpp +++ b/kdevdesigner/designer/widgetfactory.cpp @@ -686,7 +686,7 @@ void WidgetFactory::deleteLayout( TQWidget *widget ) TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *parent, const char *name, bool init, const TQRect *r, Qt::Orientation orient ) { - if ( className == TQPUSHBUTTON_OBJECT_NAME_STRING ) { + if ( className == "TQPushButton" ) { TQPushButton *b = 0; if ( init ) { b = new QDesignerPushButton( parent, name ); @@ -697,7 +697,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare TQWidget *w = find_formwindow( b ); b->setAutoDefault( w && ::tqqt_cast(((FormWindow*)w)->mainContainer()) ); return b; - } else if ( className == TQTOOLBUTTON_OBJECT_NAME_STRING ) { + } else if ( className == "TQToolButton" ) { if ( init ) { QDesignerToolButton *tb = new QDesignerToolButton( parent, name ); if ( ::tqqt_cast(widgetOfContainer(parent))) { @@ -711,29 +711,29 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare return tb; } return new QDesignerToolButton( parent, name ); - } else if ( className == TQCHECKBOX_OBJECT_NAME_STRING ) { + } else if ( className == "TQCheckBox" ) { if ( init ) { QDesignerCheckBox *cb = new QDesignerCheckBox( parent, name ); cb->setText( TQString::fromLatin1( name ) ); return cb; } return new QDesignerCheckBox( parent, name ); - } else if ( className == TQRADIOBUTTON_OBJECT_NAME_STRING ) { + } else if ( className == "TQRadioButton" ) { if ( init ) { QDesignerRadioButton *rb = new QDesignerRadioButton( parent, name ); rb->setText( TQString::fromLatin1( name ) ); return rb; } return new QDesignerRadioButton( parent, name ); - } else if ( className == TQGROUPBOX_OBJECT_NAME_STRING ) { + } else if ( className == "TQGroupBox" ) { if ( init ) return new TQGroupBox( TQString::fromLatin1( name ), parent, name ); return new TQGroupBox( parent, name ); - } else if ( className == TQBUTTONGROUP_OBJECT_NAME_STRING ) { + } else if ( className == "TQButtonGroup" ) { if ( init ) return new TQButtonGroup( TQString::fromLatin1( name ), parent, name ); return new TQButtonGroup( parent, name ); - } else if ( className == TQICONVIEW_OBJECT_NAME_STRING ) { + } else if ( className == "TQIconView" ) { #if !defined(TQT_NO_ICONVIEW) TQIconView* iv = new TQIconView( parent, name ); if ( init ) @@ -742,7 +742,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare #else return 0; #endif - } else if ( className == TQTABLE_OBJECT_NAME_STRING ) { + } else if ( className == "TQTable" ) { #if !defined(TQT_NO_TABLE) if ( init ) return new TQTable( 3, 3, parent, name ); @@ -751,24 +751,24 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare return 0; #endif #ifndef TQT_NO_SQL - } else if ( className == TQDATATABLE_OBJECT_NAME_STRING ) { + } else if ( className == "TQDataTable" ) { return new TQDataTable( parent, name ); #endif //TQT_NO_SQL - } else if ( className == TQDATEEDIT_OBJECT_NAME_STRING ) { + } else if ( className == "TQDateEdit" ) { return new TQDateEdit( parent, name ); - } else if ( className == TQTIMEEDIT_OBJECT_NAME_STRING ) { + } else if ( className == "TQTimeEdit" ) { return new TQTimeEdit( parent, name ); - } else if ( className == TQDATETIMEEDIT_OBJECT_NAME_STRING ) { + } else if ( className == "TQDateTimeEdit" ) { return new TQDateTimeEdit( parent, name ); } - else if ( className == TQLISTBOX_OBJECT_NAME_STRING ) { + else if ( className == "TQListBox" ) { TQListBox* lb = new TQListBox( parent, name ); if ( init ) { lb->insertItem( i18n( "New Item" ) ); lb->setCurrentItem( 0 ); } return lb; - } else if ( className == TQLISTVIEW_OBJECT_NAME_STRING ) { + } else if ( className == "TQListView" ) { TQListView *lv = new TQListView( parent, name ); lv->setSorting( -1 ); if ( init ) { @@ -776,17 +776,17 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare lv->setCurrentItem( new TQListViewItem( lv, i18n( "New Item" ) ) ); } return lv; - } else if ( className == TQLINEEDIT_OBJECT_NAME_STRING ) + } else if ( className == "TQLineEdit" ) return new TQLineEdit( parent, name ); - else if ( className == TQSPINBOX_OBJECT_NAME_STRING ) + else if ( className == "TQSpinBox" ) return new TQSpinBox( parent, name ); - else if ( className == TQSPLITTER_OBJECT_NAME_STRING ) + else if ( className == "TQSplitter" ) return new TQSplitter( parent, name ); - else if ( className == TQMULTILINEEDIT_OBJECT_NAME_STRING ) + else if ( className == "TQMultiLineEdit" ) return new TQMultiLineEdit( parent, name ); - else if ( className == TQTEXTEDIT_OBJECT_NAME_STRING ) + else if ( className == "TQTextEdit" ) return new TQTextEdit( parent, name ); - else if ( className == TQLABEL_OBJECT_NAME_STRING || className == "TextLabel" ) { + else if ( className == "TQLabel" || className == "TextLabel" ) { QDesignerLabel *l = new QDesignerLabel( parent, name ); if ( init ) { l->setText( TQString::fromLatin1( name ) ); @@ -804,9 +804,9 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "scaledContents", TRUE ); } return l; - } else if ( className == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) + } else if ( className == "TQLayoutWidget" ) return new TQLayoutWidget( parent, name ); - else if ( className == TQTABWIDGET_OBJECT_NAME_STRING ) { + else if ( className == "TQTabWidget" ) { TQTabWidget *tw = new QDesignerTabWidget( parent, name ); if ( init ) { FormWindow *fw = find_formwindow( parent ); @@ -819,7 +819,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare MetaDataBase::addEntry( TQT_TQOBJECT(w) ); } return tw; - } else if ( className == TQWIDGETSTACK_OBJECT_NAME_STRING ) { + } else if ( className == "TQWidgetStack" ) { QDesignerWidgetStack *ws = new QDesignerWidgetStack( parent, name ); if ( init ) { FormWindow *fw = find_formwindow( parent ); @@ -829,9 +829,9 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare MetaDataBase::addEntry( TQT_TQOBJECT(ws) ); } return ws; - } else if ( className == TQCOMBOBOX_OBJECT_NAME_STRING ) { + } else if ( className == "TQComboBox" ) { return new TQComboBox( FALSE, parent, name ); - } else if ( className == TQWIDGET_OBJECT_NAME_STRING ) { + } else if ( className == "TQWidget" ) { if ( parent && ( ::tqqt_cast(parent) || ::tqqt_cast(parent) || @@ -847,7 +847,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare } } return new TQWidget( parent, name ); - } else if ( className == TQDIALOG_OBJECT_NAME_STRING ) { + } else if ( className == "TQDialog" ) { TQDialog *dia = 0; if ( ::tqqt_cast(parent) ) dia = new QDesignerDialog( (FormWindow*)parent, parent, name ); @@ -856,7 +856,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare if ( parent ) dia->reparent( parent, TQPoint( 0, 0 ), TRUE ); return dia; - } else if ( className == TQWIZARD_OBJECT_NAME_STRING ) { + } else if ( className == "TQWizard" ) { TQWizard *wiz = new QDesignerWizard( parent, name ); if ( parent ) wiz->reparent( parent, TQPoint( 0, 0 ), TRUE ); @@ -881,17 +881,17 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare else s->setOrientation( Qt::Horizontal ); return s; - } else if ( className == TQLCDNUMBER_OBJECT_NAME_STRING ) + } else if ( className == "TQLCDNumber" ) return new TQLCDNumber( parent, name ); - else if ( className == TQPROGRESSBAR_OBJECT_NAME_STRING ) + else if ( className == "TQProgressBar" ) return new TQProgressBar( parent, name ); - else if ( className == TQTEXTVIEW_OBJECT_NAME_STRING ) + else if ( className == "TQTextView" ) return new TQTextView( parent, name ); - else if ( className == TQTEXTBROWSER_OBJECT_NAME_STRING ) + else if ( className == "TQTextBrowser" ) return new TQTextBrowser( parent, name ); - else if ( className == TQDIAL_OBJECT_NAME_STRING ) + else if ( className == "TQDial" ) return new TQDial( parent, name ); - else if ( className == TQSLIDER_OBJECT_NAME_STRING ) { + else if ( className == "TQSlider" ) { TQSlider *s = new TQSlider( parent, name ); if ( !r ) return s; @@ -902,7 +902,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare MetaDataBase::addEntry( TQT_TQOBJECT(s) ); MetaDataBase::setPropertyChanged( TQT_TQOBJECT(s), "orientation", TRUE ); return s; - } else if ( className == TQSCROLLBAR_OBJECT_NAME_STRING ) { + } else if ( className == "TQScrollBar" ) { TQScrollBar *s = new TQScrollBar( parent, name ); if ( !r ) return s; @@ -913,7 +913,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare MetaDataBase::addEntry( TQT_TQOBJECT(s) ); MetaDataBase::setPropertyChanged( TQT_TQOBJECT(s), "orientation", TRUE ); return s; - } else if ( className == TQFRAME_OBJECT_NAME_STRING ) { + } else if ( className == "TQFrame" ) { if ( !init ) return new TQFrame( parent, name ); TQFrame *f = new TQFrame( parent, name ); @@ -932,7 +932,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare else if ( r->width() < r->height() ) l->setOrientation( Qt::Vertical ); return l; - } else if ( className == TQMAINWINDOW_OBJECT_NAME_STRING ) { + } else if ( className == "TQMainWindow" ) { TQMainWindow *mw = new TQMainWindow( parent, name, 0 ); mw->setDockEnabled( TQt::DockMinimized, FALSE ); QDesignerWidget *dw = new QDesignerWidget( (FormWindow*)parent, mw, "central widget" ); @@ -942,7 +942,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare (void)mw->statusBar(); dw->show(); return mw; - } else if ( className == TQTOOLBOX_OBJECT_NAME_STRING ) { + } else if ( className == "TQToolBox" ) { if ( !init ) return new QDesignerToolBox( parent, name ); TQToolBox *tb = new QDesignerToolBox( parent, name ); @@ -958,12 +958,12 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare return tb; } #ifndef TQT_NO_SQL - else if ( className == TQDATABROWSER_OBJECT_NAME_STRING ) { + else if ( className == "TQDataBrowser" ) { TQWidget *w = new QDesignerDataBrowser( parent, name ); if ( parent ) w->reparent( parent, TQPoint( 0, 0 ), TRUE ); return w; - } else if ( className == TQDATAVIEW_OBJECT_NAME_STRING ) { + } else if ( className == "TQDataView" ) { TQWidget *w = new QDesignerDataView( parent, name ); if ( parent ) w->reparent( parent, TQPoint( 0, 0 ), TRUE ); @@ -1021,7 +1021,7 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&lay TQLayout *lay = w->layout(); if ( ::tqqt_cast(w) ) { - TQObjectList *l = TQT_TQOBJECT(lay)->queryList( TQLAYOUT_OBJECT_NAME_STRING ); + TQObjectList *l = TQT_TQOBJECT(lay)->queryList( "TQLayout" ); if ( l && l->first() ) lay = (TQLayout*)l->first(); delete l; @@ -1169,10 +1169,10 @@ bool WidgetFactory::isPassiveInteractor( TQObject* o ) else if ( ::tqqt_cast(o) && ::tqqt_cast(o->parent()) ) return ( lastWasAPassiveInteractor = TRUE ); // else if ( ::tqqt_cast(o) ) - else if ( o->inherits( TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING ) ) + else if ( o->inherits( "TQDockWindowHandle" ) ) return ( lastWasAPassiveInteractor = TRUE ); // else if ( ::tqqt_cast(o) ) - else if ( o->inherits( TQHIDEDOCK_OBJECT_NAME_STRING ) ) + else if ( o->inherits( "TQHideDock" ) ) return ( lastWasAPassiveInteractor = TRUE ); else if ( qstrcmp( o->name(), "designer_wizardstack_button" ) == 0 ) return ( lastWasAPassiveInteractor = TRUE ); @@ -1215,46 +1215,46 @@ const char* WidgetFactory::classNameOf( TQObject* o ) if (WidgetDatabase::isCustomPluginWidget(WidgetDatabase::idFromClassName(o->className()))) return o->className(); else if ( ::tqqt_cast(o) ) - return TQTABWIDGET_OBJECT_NAME_STRING; + return "TQTabWidget"; else if ( ::tqqt_cast(o) ) - return TQWIDGETSTACK_OBJECT_NAME_STRING; + return "TQWidgetStack"; else if ( ::tqqt_cast(o) ) return "TQWeDoNotWantToBreakTabWidget"; else if ( ::tqqt_cast(o) ) - return TQDIALOG_OBJECT_NAME_STRING; + return "TQDialog"; else if ( ::tqqt_cast(o) ) - return TQWIDGET_OBJECT_NAME_STRING; + return "TQWidget"; else if ( o->inherits( "CustomWidget" ) ) return ( (CustomWidget*)o )->realClassName().latin1(); else if ( ::tqqt_cast(o) ) - return TQLABEL_OBJECT_NAME_STRING; + return "TQLabel"; else if ( ::tqqt_cast(o) ) - return TQWIZARD_OBJECT_NAME_STRING; + return "TQWizard"; else if ( ::tqqt_cast(o) ) - return TQPUSHBUTTON_OBJECT_NAME_STRING; + return "TQPushButton"; else if ( ::tqqt_cast(o) ) - return TQTOOLBUTTON_OBJECT_NAME_STRING; + return "TQToolButton"; else if ( ::tqqt_cast(o) ) - return TQRADIOBUTTON_OBJECT_NAME_STRING; + return "TQRadioButton"; else if ( ::tqqt_cast(o) ) - return TQCHECKBOX_OBJECT_NAME_STRING; + return "TQCheckBox"; else if ( ::tqqt_cast(o) ) - return TQMENUBAR_OBJECT_NAME_STRING; + return "TQMenuBar"; else if ( ::tqqt_cast(o) ) - return TQTOOLBAR_OBJECT_NAME_STRING; + return "TQToolBar"; else if ( ::tqqt_cast(o) ) - return TQACTION_OBJECT_NAME_STRING; + return "TQAction"; else if ( ::tqqt_cast(o) ) - return TQACTIONGROUP_OBJECT_NAME_STRING; + return "TQActionGroup"; else if ( ::tqqt_cast(o) ) - return TQPOPUPMENU_OBJECT_NAME_STRING; + return "TQPopupMenu"; else if ( ::tqqt_cast(o) ) - return TQTOOLBOX_OBJECT_NAME_STRING; + return "TQToolBox"; #ifndef TQT_NO_SQL else if ( ::tqqt_cast(o) ) - return TQDATABROWSER_OBJECT_NAME_STRING; + return "TQDataBrowser"; else if ( ::tqqt_cast(o) ) - return TQDATAVIEW_OBJECT_NAME_STRING; + return "TQDataView"; #endif return o->className(); } @@ -1317,7 +1317,7 @@ void WidgetFactory::initChangedProperties( TQObject *o ) } else if ( ::tqqt_cast(o) ) MetaDataBase::setPropertyChanged( o, "title", TRUE ); - else if ( o->isA( TQFRAME_OBJECT_NAME_STRING ) ) { + else if ( o->isA( "TQFrame" ) ) { MetaDataBase::setPropertyChanged( o, "frameShadow", TRUE ); MetaDataBase::setPropertyChanged( o, "frameShape", TRUE ); } else if ( ::tqqt_cast(o) || ::tqqt_cast(o) ) { @@ -1372,7 +1372,7 @@ bool WidgetFactory::hasSpecialEditor( int id, TQObject *editorWidget ) return TRUE; if ( className.contains( "IconView" ) ) return TRUE; - if ( className == TQTEXTEDIT_OBJECT_NAME_STRING || className == TQMULTILINEEDIT_OBJECT_NAME_STRING ) + if ( className == "TQTextEdit" || className == "TQMultiLineEdit" ) return TRUE; if ( ::tqqt_cast(editorWidget) != 0 ) return TRUE; @@ -1435,7 +1435,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, return; } - if ( className == TQMULTILINEEDIT_OBJECT_NAME_STRING || className == TQTEXTEDIT_OBJECT_NAME_STRING ) { + if ( className == "TQMultiLineEdit" || className == "TQTextEdit" ) { MultiLineEditor *e = new MultiLineEditor( FALSE, TRUE, parent, editWidget, fw ); e->exec(); delete e; @@ -1541,7 +1541,7 @@ void QDesignerLabel::updateBuddy() if ( myBuddy.isEmpty() ) return; - TQObjectList *l = topLevelWidget()->queryList( TQWIDGET_OBJECT_NAME_STRING, myBuddy, FALSE, TRUE ); + TQObjectList *l = topLevelWidget()->queryList( "TQWidget", myBuddy, FALSE, TRUE ); if ( !l || !l->first() ) { delete l; return; diff --git a/kdevdesigner/designer/widgetfactory.h b/kdevdesigner/designer/widgetfactory.h index feebe9c7..f248187e 100644 --- a/kdevdesigner/designer/widgetfactory.h +++ b/kdevdesigner/designer/widgetfactory.h @@ -402,13 +402,13 @@ public: : TQToolButton( parent, name ) {} bool isInButtonGroup() const { - return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ); + return parentWidget() && parentWidget()->inherits( "TQButtonGroup" ); } int buttonGroupId() const { - return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1; + return parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1; } void setButtonGroupId( int id ) { - if ( parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) { + if ( parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ) { ( (TQButtonGroup*)parentWidget() )->remove( this ); ( (TQButtonGroup*)parentWidget() )->insert( this, id ); } @@ -426,13 +426,13 @@ public: : TQRadioButton( parent, name ) {} bool isInButtonGroup() const { - return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ); + return parentWidget() && parentWidget()->inherits( "TQButtonGroup" ); } int buttonGroupId() const { - return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1; + return parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1; } void setButtonGroupId( int id ) { - if ( parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) { + if ( parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ) { ( (TQButtonGroup*)parentWidget() )->remove( this ); ( (TQButtonGroup*)parentWidget() )->insert( this, id ); } @@ -451,13 +451,13 @@ public: : TQPushButton( parent, name ) {} bool isInButtonGroup() const { - return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ); + return parentWidget() && parentWidget()->inherits( "TQButtonGroup" ); } int buttonGroupId() const { - return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1; + return parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1; } void setButtonGroupId( int id ) { - if ( parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) { + if ( parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ) { ( (TQButtonGroup*)parentWidget() )->remove( this ); ( (TQButtonGroup*)parentWidget() )->insert( this, id ); } @@ -476,13 +476,13 @@ public: : TQCheckBox( parent, name ) {} bool isInButtonGroup() const { - return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ); + return parentWidget() && parentWidget()->inherits( "TQButtonGroup" ); } int buttonGroupId() const { - return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1; + return parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1; } void setButtonGroupId( int id ) { - if ( parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) { + if ( parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ) { ( (TQButtonGroup*)parentWidget() )->remove( this ); ( (TQButtonGroup*)parentWidget() )->insert( this, id ); } diff --git a/kdevdesigner/shared/ui2uib.cpp b/kdevdesigner/shared/ui2uib.cpp index 5cff46e0..e2b8665f 100644 --- a/kdevdesigner/shared/ui2uib.cpp +++ b/kdevdesigner/shared/ui2uib.cpp @@ -137,13 +137,13 @@ static TQCString layoutForTag( const TQString& tag ) { if ( tag == "grid" ) { - return TQGRIDLAYOUT_OBJECT_NAME_STRING; + return "TQGridLayout"; } else if ( tag == "hbox" ) { - return TQHBOXLAYOUT_OBJECT_NAME_STRING; + return "TQHBoxLayout"; } else if ( tag == "vbox" ) { - return TQVBOXLAYOUT_OBJECT_NAME_STRING; + return "TQVBoxLayout"; } else { - return TQLAYOUT_OBJECT_NAME_STRING; + return "TQLayout"; } } @@ -490,9 +490,9 @@ static int outputObject( TQMap& buddies, { bool isTQObject = !className.isEmpty(); - if ( className == TQTOOLBAR_OBJECT_NAME_STRING ) + if ( className == "TQToolBar" ) out << (TQ_UINT8) elem.attribute( "dock", "0" ).toInt(); - if ( className == TQWIDGET_OBJECT_NAME_STRING ) + if ( className == "TQWidget" ) className = elem.attribute( "class", className ).latin1(); int objectNo = -1; @@ -504,7 +504,7 @@ static int outputObject( TQMap& buddies, outputGridCell( out, elem ); // optimization: insert '&Foo' into string-table before 'Foo' - if ( className == TQACTION_OBJECT_NAME_STRING || className == TQACTIONGROUP_OBJECT_NAME_STRING ) { + if ( className == "TQAction" || className == "TQActionGroup" ) { TQVariant value = DomTool::readProperty( elem, "menuText", TQVariant() ); if ( value.asString().startsWith("&") ) strings.insertString( value.asString() ); @@ -523,11 +523,11 @@ static int outputObject( TQMap& buddies, } } else { out << (TQ_UINT8) Object_SubAction; - outputObject( buddies, objects, strings, out, f, TQACTION_OBJECT_NAME_STRING ); + outputObject( buddies, objects, strings, out, f, "TQAction" ); } } else if ( tag == "actiongroup" ) { out << (TQ_UINT8) Object_SubAction; - outputObject( buddies, objects, strings, out, f, TQACTIONGROUP_OBJECT_NAME_STRING ); + outputObject( buddies, objects, strings, out, f, "TQActionGroup" ); } else if ( tag == "attribute" ) { out << (TQ_UINT8) Object_Attribute; outputProperty( buddies, objectNo, strings, out, f ); @@ -564,13 +564,13 @@ static int outputObject( TQMap& buddies, out << (TQ_UINT8) Object_Spacer; outputObject( buddies, objects, strings, out, f ); } else if ( tag == "widget" ) { - if ( f.attribute("class") == TQLAYOUTWIDGET_OBJECT_NAME_STRING && + if ( f.attribute("class") == "TQLayoutWidget" && elem.tagName() != "widget" ) { outputLayoutWidgetsSubLayout( buddies, objects, strings, out, f ); } else { out << (TQ_UINT8) Object_SubWidget; - outputObject( buddies, objects, strings, out, f, TQWIDGET_OBJECT_NAME_STRING ); + outputObject( buddies, objects, strings, out, f, "TQWidget" ); } } f = f.nextSibling().toElement(); @@ -747,7 +747,7 @@ void convertUiToUib( TQDomDocument& doc, TQDataStream& out ) { TQDataStream out2( widgetBlock, IO_WriteOnly ); widgetNo = outputObject( buddies, objects, strings, out2, widgetElem, - TQWIDGET_OBJECT_NAME_STRING ); + "TQWidget" ); } if ( !tabstopsElem.isNull() ) { @@ -772,7 +772,7 @@ void convertUiToUib( TQDomDocument& doc, TQDataStream& out ) if ( !menubarElem.isNull() ) { TQDataStream out2( menubarBlock, IO_WriteOnly ); outputObject( buddies, objects, strings, out2, menubarElem, - TQMENUBAR_OBJECT_NAME_STRING ); + "TQMenuBar" ); } if ( !toolbarsElem.isNull() ) { @@ -780,7 +780,7 @@ void convertUiToUib( TQDomDocument& doc, TQDataStream& out ) TQDomElement f = toolbarsElem.firstChild().toElement(); while ( !f.isNull() ) { if ( f.tagName() == "toolbar" ) - outputObject( buddies, objects, strings, out2, f, TQTOOLBAR_OBJECT_NAME_STRING ); + outputObject( buddies, objects, strings, out2, f, "TQToolBar" ); f = f.nextSibling().toElement(); } } diff --git a/kdevdesigner/shared/widgetdatabase.cpp b/kdevdesigner/shared/widgetdatabase.cpp index be4b6091..13e93eb1 100644 --- a/kdevdesigner/shared/widgetdatabase.cpp +++ b/kdevdesigner/shared/widgetdatabase.cpp @@ -135,7 +135,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_pushbutton.png"; - r->name = TQPUSHBUTTON_OBJECT_NAME_STRING; + r->name = "TQPushButton"; r->group = widgetGroup( "Buttons" ); r->toolTip = "Push Button"; r->isCommon = TRUE; @@ -144,7 +144,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_toolbutton.png"; - r->name = TQTOOLBUTTON_OBJECT_NAME_STRING; + r->name = "TQToolButton"; r->group = widgetGroup( "Buttons" ); r->toolTip = "Tool Button"; @@ -152,7 +152,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_radiobutton.png"; - r->name = TQRADIOBUTTON_OBJECT_NAME_STRING; + r->name = "TQRadioButton"; r->group = widgetGroup( "Buttons" ); r->toolTip = "Radio Button"; r->isCommon = TRUE; @@ -161,7 +161,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_checkbox.png"; - r->name = TQCHECKBOX_OBJECT_NAME_STRING; + r->name = "TQCheckBox"; r->group = widgetGroup( "Buttons" ); r->toolTip = "Check Box"; r->isCommon = TRUE; @@ -170,7 +170,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_groupbox.png"; - r->name = TQGROUPBOX_OBJECT_NAME_STRING; + r->name = "TQGroupBox"; r->group = widgetGroup( "Containers" ); r->toolTip = "Group Box"; r->isContainer = TRUE; @@ -179,7 +179,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_buttongroup.png"; - r->name = TQBUTTONGROUP_OBJECT_NAME_STRING; + r->name = "TQButtonGroup"; r->group = widgetGroup( "Containers" ); r->toolTip = "Button Group"; r->isContainer = TRUE; @@ -189,7 +189,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_frame.png"; - r->name = TQFRAME_OBJECT_NAME_STRING; + r->name = "TQFrame"; r->group = widgetGroup( "Containers" ); r->toolTip = "Frame"; r->isContainer = TRUE; @@ -198,7 +198,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_tabwidget.png"; - r->name = TQTABWIDGET_OBJECT_NAME_STRING; + r->name = "TQTabWidget"; r->group = widgetGroup( "Containers" ); r->toolTip = "Tabwidget"; r->isContainer = TRUE; @@ -207,7 +207,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_widgetstack.png"; - r->name = TQWIDGETSTACK_OBJECT_NAME_STRING; + r->name = "TQWidgetStack"; r->group = widgetGroup( "Containers" ); r->toolTip = "Widget Stack"; r->isContainer = TRUE; @@ -216,7 +216,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_toolbox.png"; - r->name = TQTOOLBOX_OBJECT_NAME_STRING; + r->name = "TQToolBox"; r->group = widgetGroup( "Containers" ); r->toolTip = "Tool Box"; r->isContainer = TRUE; @@ -225,7 +225,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_listbox.png"; - r->name = TQLISTBOX_OBJECT_NAME_STRING; + r->name = "TQListBox"; r->group = widgetGroup( "Views" ); r->toolTip = "List Box"; r->isCommon = TRUE; @@ -234,7 +234,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_listview.png"; - r->name = TQLISTVIEW_OBJECT_NAME_STRING; + r->name = "TQListView"; r->group = widgetGroup( "Views" ); r->toolTip = "List View"; @@ -243,7 +243,7 @@ void WidgetDatabase::setupDataBase( int id ) #if !defined(TQT_NO_ICONVIEW) || defined(UIC) r = new WidgetDatabaseRecord; r->iconSet = "designer_iconview.png"; - r->name = TQICONVIEW_OBJECT_NAME_STRING; + r->name = "TQIconView"; r->group = widgetGroup( "Views" ); r->toolTip = "Icon View"; @@ -253,7 +253,7 @@ void WidgetDatabase::setupDataBase( int id ) #if !defined(TQT_NO_TABLE) r = new WidgetDatabaseRecord; r->iconSet = "designer_table.png"; - r->name = TQTABLE_OBJECT_NAME_STRING; + r->name = "TQTable"; r->group = widgetGroup( "Views" ); r->toolTip = "Table"; @@ -264,7 +264,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_datatable.png"; r->includeFile = "tqdatatable.h"; - r->name = TQDATATABLE_OBJECT_NAME_STRING; + r->name = "TQDataTable"; r->group = widgetGroup( "Database" ); r->toolTip = "Data Table"; @@ -273,7 +273,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_lineedit.png"; - r->name = TQLINEEDIT_OBJECT_NAME_STRING; + r->name = "TQLineEdit"; r->group = widgetGroup( "Input" ); r->toolTip = "Line Edit"; r->isCommon = TRUE; @@ -282,7 +282,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_spinbox.png"; - r->name = TQSPINBOX_OBJECT_NAME_STRING; + r->name = "TQSpinBox"; r->group = widgetGroup( "Input" ); r->toolTip = "Spin Box"; r->isCommon = TRUE; @@ -291,7 +291,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_dateedit.png"; - r->name = TQDATEEDIT_OBJECT_NAME_STRING; + r->name = "TQDateEdit"; r->group = widgetGroup( "Input" ); r->toolTip = "Date Edit"; r->includeFile = "tqdatetimeedit.h"; @@ -300,7 +300,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_timeedit.png"; - r->name = TQTIMEEDIT_OBJECT_NAME_STRING; + r->name = "TQTimeEdit"; r->group = widgetGroup( "Input" ); r->toolTip = "Time Edit"; r->includeFile = "tqdatetimeedit.h"; @@ -309,7 +309,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_datetimeedit.png"; - r->name = TQDATETIMEEDIT_OBJECT_NAME_STRING; + r->name = "TQDateTimeEdit"; r->group = widgetGroup( "Input" ); r->toolTip = "Date-Time Edit"; r->includeFile = "tqdatetimeedit.h"; @@ -318,7 +318,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_multilineedit.png"; - r->name = TQMULTILINEEDIT_OBJECT_NAME_STRING; + r->name = "TQMultiLineEdit"; r->group = widgetGroup( "Temp" ); r->toolTip = "Multi Line Edit"; @@ -326,7 +326,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_richtextedit.png"; - r->name = TQTEXTEDIT_OBJECT_NAME_STRING; + r->name = "TQTextEdit"; r->group = widgetGroup( "Input" ); r->toolTip = "Rich Text Edit"; r->isCommon = TRUE; @@ -335,7 +335,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_combobox.png"; - r->name = TQCOMBOBOX_OBJECT_NAME_STRING; + r->name = "TQComboBox"; r->group = widgetGroup( "Input" ); r->toolTip = "Combo Box"; r->isCommon = TRUE; @@ -344,7 +344,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_slider.png"; - r->name = TQSLIDER_OBJECT_NAME_STRING; + r->name = "TQSlider"; r->group = widgetGroup( "Input" ); r->toolTip = "Slider"; @@ -352,7 +352,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_scrollbar.png"; - r->name = TQSCROLLBAR_OBJECT_NAME_STRING; + r->name = "TQScrollBar"; r->group = widgetGroup( "Input" ); r->toolTip = "Scrollbar"; @@ -360,7 +360,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_dial.png"; - r->name = TQDIAL_OBJECT_NAME_STRING; + r->name = "TQDial"; r->group = widgetGroup( "Input" ); r->toolTip = "Dial"; @@ -368,7 +368,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_label.png"; - r->name = TQLABEL_OBJECT_NAME_STRING; + r->name = "TQLabel"; r->group = widgetGroup( "Temp" ); r->toolTip = "Label"; @@ -395,7 +395,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_lcdnumber.png"; - r->name = TQLCDNUMBER_OBJECT_NAME_STRING; + r->name = "TQLCDNumber"; r->group = widgetGroup( "Display" ); r->toolTip = "LCD Number"; @@ -413,7 +413,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_progress.png"; - r->name = TQPROGRESSBAR_OBJECT_NAME_STRING; + r->name = "TQProgressBar"; r->group = widgetGroup( "Display" ); r->toolTip = "Progress Bar"; @@ -421,7 +421,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_textview.png"; - r->name = TQTEXTVIEW_OBJECT_NAME_STRING; + r->name = "TQTextView"; r->group = widgetGroup( "Temp" ); r->toolTip = "Text View"; @@ -429,7 +429,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_textbrowser.png"; - r->name = TQTEXTBROWSER_OBJECT_NAME_STRING; + r->name = "TQTextBrowser"; r->group = widgetGroup( "Display" ); r->toolTip = "Text Browser"; @@ -445,21 +445,21 @@ void WidgetDatabase::setupDataBase( int id ) append( r ); r = new WidgetDatabaseRecord; - r->name = TQWIDGET_OBJECT_NAME_STRING; + r->name = "TQWidget"; r->isForm = TRUE; r->group = widgetGroup( "Forms" ); append( r ); r = new WidgetDatabaseRecord; - r->name = TQDIALOG_OBJECT_NAME_STRING; + r->name = "TQDialog"; r->group = widgetGroup( "Forms" ); r->isForm = TRUE; append( r ); r = new WidgetDatabaseRecord; - r->name = TQWIZARD_OBJECT_NAME_STRING; + r->name = "TQWizard"; r->group = widgetGroup( "Forms" ); r->isContainer = TRUE; @@ -473,7 +473,7 @@ void WidgetDatabase::setupDataBase( int id ) append( r ); r = new WidgetDatabaseRecord; - r->name = TQLAYOUTWIDGET_OBJECT_NAME_STRING; + r->name = "TQLayoutWidget"; r->group = widgetGroup( "Temp" ); r->includeFile = ""; r->isContainer = TRUE; @@ -481,7 +481,7 @@ void WidgetDatabase::setupDataBase( int id ) append( r ); r = new WidgetDatabaseRecord; - r->name = TQSPLITTER_OBJECT_NAME_STRING; + r->name = "TQSplitter"; r->group = widgetGroup( "Temp" ); r->includeFile = "tqsplitter.h"; r->isContainer = TRUE; @@ -514,7 +514,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = ""; - r->name = TQMAINWINDOW_OBJECT_NAME_STRING; + r->name = "TQMainWindow"; r->includeFile = "tqmainwindow.h"; r->group = widgetGroup( "Temp" ); r->isContainer = TRUE; @@ -541,7 +541,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = ""; - r->name = TQSCROLLVIEW_OBJECT_NAME_STRING; + r->name = "TQScrollView"; r->includeFile = "tqscrollview.h"; r->group = widgetGroup( "Temp" ); r->isContainer = TRUE; @@ -551,7 +551,7 @@ void WidgetDatabase::setupDataBase( int id ) #ifndef TQT_NO_SQL r = new WidgetDatabaseRecord; r->iconSet = ""; - r->name = TQDATABROWSER_OBJECT_NAME_STRING; + r->name = "TQDataBrowser"; r->includeFile = "tqdatabrowser.h"; r->group = widgetGroup( "Database" ); r->toolTip = "Data Browser"; @@ -562,7 +562,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = ""; - r->name = TQDATAVIEW_OBJECT_NAME_STRING; + r->name = "TQDataView"; r->includeFile = "tqdataview.h"; r->group = widgetGroup( "Database" ); r->toolTip = "Data View"; @@ -760,7 +760,7 @@ TQString WidgetDatabase::createWidgetName( int id ) { setupDataBase( id ); TQString n = className( id ); - if ( n == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) + if ( n == "TQLayoutWidget" ) n = "Layout"; if ( n[ 0 ] == 'Q' && n[ 1 ].lower() != n[ 1 ] ) n = n.mid( 1 ); @@ -787,7 +787,7 @@ int WidgetDatabase::idFromClassName( const TQString &name ) if ( i ) return *i; if ( name == "FormWindow" ) - return idFromClassName( TQLAYOUTWIDGET_OBJECT_NAME_STRING ); + return idFromClassName( "TQLayoutWidget" ); #ifdef UIC setupDataBase( -2 ); i = className2Id->find( name ); diff --git a/kdevdesigner/uilib/database.cpp b/kdevdesigner/uilib/database.cpp index 2b1956a9..4e1c8d57 100644 --- a/kdevdesigner/uilib/database.cpp +++ b/kdevdesigner/uilib/database.cpp @@ -62,7 +62,7 @@ void DatabaseSupport::initPreview( const TQString &connection, const TQString &t con = TQSqlDatabase::database(); frm = new TQSqlForm( o, table.ascii() ); for ( TQMap::Iterator it = dbControls.begin(); it != dbControls.end(); ++it ) { - TQObject *chld = parent->child( it.key().ascii(), TQWIDGET_OBJECT_NAME_STRING ); + TQObject *chld = parent->child( it.key().ascii(), "TQWidget" ); if ( !chld ) continue; frm->insert( (TQWidget*)chld, *it ); diff --git a/kdevdesigner/uilib/qwidgetfactory.cpp b/kdevdesigner/uilib/qwidgetfactory.cpp index c431253e..55aaa31d 100644 --- a/kdevdesigner/uilib/qwidgetfactory.cpp +++ b/kdevdesigner/uilib/qwidgetfactory.cpp @@ -133,19 +133,19 @@ static void setupWidgetListAndMap() return; setupPluginDir(); availableWidgetList = new TQStringList; - (*availableWidgetList) << TQPUSHBUTTON_OBJECT_NAME_STRING << TQTOOLBUTTON_OBJECT_NAME_STRING << TQCHECKBOX_OBJECT_NAME_STRING << TQRADIOBUTTON_OBJECT_NAME_STRING - << TQGROUPBOX_OBJECT_NAME_STRING << TQBUTTONGROUP_OBJECT_NAME_STRING << TQICONVIEW_OBJECT_NAME_STRING << TQTABLE_OBJECT_NAME_STRING - << TQLISTBOX_OBJECT_NAME_STRING << TQLISTVIEW_OBJECT_NAME_STRING << TQLINEEDIT_OBJECT_NAME_STRING << TQSPINBOX_OBJECT_NAME_STRING - << TQMULTILINEEDIT_OBJECT_NAME_STRING << TQLABEL_OBJECT_NAME_STRING << "TextLabel" << "PixmapLabel" - << TQLAYOUTWIDGET_OBJECT_NAME_STRING << TQTABWIDGET_OBJECT_NAME_STRING << TQCOMBOBOX_OBJECT_NAME_STRING - << TQWIDGET_OBJECT_NAME_STRING << TQDIALOG_OBJECT_NAME_STRING << TQWIZARD_OBJECT_NAME_STRING << TQLCDNUMBER_OBJECT_NAME_STRING; + (*availableWidgetList) << "TQPushButton" << "TQToolButton" << "TQCheckBox" << "TQRadioButton" + << "TQGroupBox" << "TQButtonGroup" << "TQIconView" << "TQTable" + << "TQListBox" << "TQListView" << "TQLineEdit" << "TQSpinBox" + << "TQMultiLineEdit" << "TQLabel" << "TextLabel" << "PixmapLabel" + << "TQLayoutWidget" << "TQTabWidget" << "TQComboBox" + << "TQWidget" << "TQDialog" << "TQWizard" << "TQLCDNumber"; // put less stress on the compiler by limiting the template nesting depth - (*availableWidgetList) << TQPROGRESSBAR_OBJECT_NAME_STRING << TQTEXTVIEW_OBJECT_NAME_STRING << TQTEXTBROWSER_OBJECT_NAME_STRING - << TQDIAL_OBJECT_NAME_STRING << TQSLIDER_OBJECT_NAME_STRING << TQFRAME_OBJECT_NAME_STRING << "Line" << TQTEXTEDIT_OBJECT_NAME_STRING - << TQDATEEDIT_OBJECT_NAME_STRING << TQTIMEEDIT_OBJECT_NAME_STRING << TQDATETIMEEDIT_OBJECT_NAME_STRING << TQSCROLLBAR_OBJECT_NAME_STRING - << TQPOPUPMENU_OBJECT_NAME_STRING << TQWIDGETSTACK_OBJECT_NAME_STRING << TQMAINWINDOW_OBJECT_NAME_STRING - << TQDATATABLE_OBJECT_NAME_STRING << TQDATABROWSER_OBJECT_NAME_STRING << TQDATAVIEW_OBJECT_NAME_STRING - << TQVBOX_OBJECT_NAME_STRING << TQHBOX_OBJECT_NAME_STRING << TQGRID_OBJECT_NAME_STRING << TQTOOLBOX_OBJECT_NAME_STRING; + (*availableWidgetList) << "TQProgressBar" << "TQTextView" << "TQTextBrowser" + << "TQDial" << "TQSlider" << "TQFrame" << "Line" << "TQTextEdit" + << "TQDateEdit" << "TQTimeEdit" << "TQDateTimeEdit" << "TQScrollBar" + << "TQPopupMenu" << "TQWidgetStack" << "TQMainWindow" + << "TQDataTable" << "TQDataBrowser" << "TQDataView" + << "TQVBox" << "TQHBox" << "TQGrid" << "TQToolBox"; if ( !widgetInterfaceManager ) widgetInterfaceManager = @@ -364,7 +364,7 @@ TQWidget *TQWidgetFactory::create( TQIODevice *dev, TQObject *connector, TQWidge for ( TQMap::Iterator it = widgetFactory->dbTables.begin(); it != widgetFactory->dbTables.end(); ++it ) { - TQDataTable *table = (TQDataTable*)widgetFactory->toplevel->child( it.key().ascii(), TQDATATABLE_OBJECT_NAME_STRING ); + TQDataTable *table = (TQDataTable*)widgetFactory->toplevel->child( it.key().ascii(), "TQDataTable" ); if ( !table ) continue; if ( widgetFactory->noDatabaseWidgets.find( table->name() ) != @@ -391,8 +391,8 @@ TQWidget *TQWidgetFactory::create( TQIODevice *dev, TQObject *connector, TQWidge for ( TQMap::Iterator it = widgetFactory->buddies.begin(); it != widgetFactory->buddies.end(); ++it ) { - TQLabel *label = (TQLabel*)widgetFactory->toplevel->child( it.key().ascii(), TQLABEL_OBJECT_NAME_STRING ); - TQWidget *buddy = (TQWidget*)widgetFactory->toplevel->child( (*it).ascii(), TQWIDGET_OBJECT_NAME_STRING ); + TQLabel *label = (TQLabel*)widgetFactory->toplevel->child( it.key().ascii(), "TQLabel" ); + TQWidget *buddy = (TQWidget*)widgetFactory->toplevel->child( (*it).ascii(), "TQWidget" ); if ( label && buddy ) label->setBuddy( buddy ); } @@ -466,7 +466,7 @@ TQWidget *TQWidgetFactory::createFromUiFile( TQDomDocument doc, TQObject *connec if ( !imageCollection.isNull() ) loadImageCollection( imageCollection ); - createWidgetInternal( widget, parent, 0, widget.attribute("class", TQWIDGET_OBJECT_NAME_STRING) ); + createWidgetInternal( widget, parent, 0, widget.attribute("class", "TQWidget") ); TQWidget *w = toplevel; if ( !w ) return 0; @@ -703,7 +703,7 @@ void TQWidgetFactory::inputSpacer( const UibStrTable& strings, TQDataStream& in, spacer = new TQSpacerItem( w, h, sizeType, TQSizePolicy::Minimum ); } - if ( parent->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) { + if ( parent->inherits("TQGridLayout") ) { ((TQGridLayout *) parent)->addMultiCell( spacer, row, row + rowspan - 1, column, column + colspan - 1, vertical ? TQt::AlignHCenter : TQt::AlignVCenter ); @@ -763,11 +763,11 @@ void TQWidgetFactory::inputColumnOrRow( const UibStrTable& strings, } if ( parent != 0 ) { - if ( parent->inherits(TQLISTVIEW_OBJECT_NAME_STRING) ) { + if ( parent->inherits("TQListView") ) { createListViewColumn( (TQListView *) parent, text, pixmap, clickable, resizable ); #ifndef TQT_NO_TABLE - } else if ( parent->inherits(TQTABLE_OBJECT_NAME_STRING) ) { + } else if ( parent->inherits("TQTable") ) { createTableColumnOrRow( (TQTable *) parent, text, pixmap, field, isRow ); #endif @@ -786,7 +786,7 @@ void TQWidgetFactory::inputItem( const UibStrTable& strings, TQDataStream& in, TQ_UINT8 objectTag; TQListView *listView = 0; - if ( parent != 0 && parent->inherits(TQLISTVIEW_OBJECT_NAME_STRING) ) + if ( parent != 0 && parent->inherits("TQListView") ) parent = TQT_TQOBJECT((TQListView *) parent); TQListViewItem *item = 0; if ( listView != 0 ) { @@ -848,9 +848,9 @@ void TQWidgetFactory::inputItem( const UibStrTable& strings, TQDataStream& in, TQPixmap pixmap = pixmaps.last(); if ( parent != 0 ) { - if ( parent->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) || - parent->inherits(TQLISTBOX_OBJECT_NAME_STRING) ) { - TQListBox *listBox = (TQListBox *) parent->tqt_cast( TQLISTBOX_OBJECT_NAME_STRING ); + if ( parent->inherits("TQComboBox") || + parent->inherits("TQListBox") ) { + TQListBox *listBox = (TQListBox *) parent->tqt_cast( "TQListBox" ); if ( listBox == 0 ) listBox = ((TQComboBox *) parent)->listBox(); @@ -860,7 +860,7 @@ void TQWidgetFactory::inputItem( const UibStrTable& strings, TQDataStream& in, (void) new TQListBoxPixmap( listBox, pixmap, text ); } #ifndef TQT_NO_ICONVIEW - } else if ( parent->inherits(TQICONVIEW_OBJECT_NAME_STRING) ) { + } else if ( parent->inherits("TQIconView") ) { (void) new TQIconViewItem( (TQIconView *) parent, text, pixmap ); #endif } @@ -915,50 +915,50 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects, if ( isTQObject ) { if ( parent != 0 ) { if ( parent->isWidgetType() ) { - if ( parent->inherits(TQMAINWINDOW_OBJECT_NAME_STRING) ) { + if ( parent->inherits("TQMainWindow") ) { parentWidget = ((TQMainWindow *) parent)->centralWidget(); } else { parentWidget = (TQWidget *) parent; } - } else if ( parent->inherits(TQLAYOUT_OBJECT_NAME_STRING) ) { + } else if ( parent->inherits("TQLayout") ) { parentLayout = (TQLayout *) parent; parentWidget = ancestorWidget; } } - if ( className == TQACTION_OBJECT_NAME_STRING ) { + if ( className == "TQAction" ) { unpackCString( strings, in, className ); - if ( className == TQACTIONGROUP_OBJECT_NAME_STRING ) { + if ( className == "TQActionGroup" ) { obj = new TQActionGroup( parent ); } else { obj = new TQAction( parent ); } - } else if ( className == TQLAYOUT_OBJECT_NAME_STRING ) { + } else if ( className == "TQLayout" ) { unpackCString( strings, in, className ); LayoutType type = Grid; - if ( className == TQHBOXLAYOUT_OBJECT_NAME_STRING ) { + if ( className == "TQHBoxLayout" ) { type = HBox; - } else if ( className == TQVBOXLAYOUT_OBJECT_NAME_STRING ) { + } else if ( className == "TQVBoxLayout" ) { type = VBox; } - if ( parentLayout != 0 && parentLayout->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) { + if ( parentLayout != 0 && parentLayout->inherits("TQGridLayout") ) { layout = createLayout( 0, 0, type ); } else { layout = createLayout( parentWidget, parentLayout, type ); } obj = TQT_TQOBJECT(layout); - } else if ( className == TQMENUBAR_OBJECT_NAME_STRING ) { + } else if ( className == "TQMenuBar" ) { unpackCString( strings, in, className ); widget = ((TQMainWindow *) parent)->menuBar(); obj = TQT_TQOBJECT(widget); - } else if ( className == TQTOOLBAR_OBJECT_NAME_STRING ) { + } else if ( className == "TQToolBar" ) { TQ_UINT8 dock; in >> dock; unpackCString( strings, in, className ); widget = new TQToolBar( TQString(), (TQMainWindow *) parent, (TQt::Dock) dock ); obj = TQT_TQOBJECT(widget); - } else if ( className == TQWIDGET_OBJECT_NAME_STRING ) { + } else if ( className == "TQWidget" ) { unpackCString( strings, in, className ); widget = createWidget( className, parentWidget, 0 ); obj = TQT_TQOBJECT(widget); @@ -1099,15 +1099,15 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects, break; case Object_SubAction: inputObject( objects, numObjects, strings, in, parentWidget, - obj != 0 ? obj : parent, TQACTION_OBJECT_NAME_STRING ); + obj != 0 ? obj : parent, "TQAction" ); break; case Object_SubLayout: inputObject( objects, numObjects, strings, in, parentWidget, obj, - TQLAYOUT_OBJECT_NAME_STRING ); + "TQLayout" ); break; case Object_SubWidget: inputObject( objects, numObjects, strings, in, parentWidget, obj, - TQWIDGET_OBJECT_NAME_STRING ); + "TQWidget" ); break; case Object_TextProperty: unpackCString( strings, in, name ); @@ -1118,9 +1118,9 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects, if ( metAttribute > 0 ) { if ( name == "title" ) { if ( parent != 0 ) { - if ( parent->inherits(TQTABWIDGET_OBJECT_NAME_STRING) ) { + if ( parent->inherits("TQTabWidget") ) { ((TQTabWidget *) parent)->insertTab( widget, str ); - } else if ( parent->inherits(TQWIZARD_OBJECT_NAME_STRING) ) { + } else if ( parent->inherits("TQWizard") ) { ((TQWizard *) parent)->addPage( widget, str ); } } @@ -1136,7 +1136,7 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects, if ( metAttribute > 0 ) { if ( name == "id" ) { - if ( parent != 0 && parent->inherits(TQWIDGETSTACK_OBJECT_NAME_STRING) ) + if ( parent != 0 && parent->inherits("TQWidgetStack") ) ((TQWidgetStack *) parent)->addWidget( widget, value.toInt() ); } } else { @@ -1153,7 +1153,7 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects, if ( parentLayout != 0 ) { if ( widget != 0 ) { - if ( parentLayout->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) { + if ( parentLayout->inherits("TQGridLayout") ) { ((TQGridLayout *) parentLayout)->addMultiCellWidget( widget, row, row + rowspan - 1, column, column + colspan - 1 ); @@ -1161,7 +1161,7 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects, ((TQBoxLayout *) parentLayout)->addWidget( widget ); } } else if ( layout != 0 ) { - if ( parentLayout->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) { + if ( parentLayout->inherits("TQGridLayout") ) { ((TQGridLayout *) parentLayout)->addMultiCellLayout( layout, row, row + rowspan - 1, column, column + colspan - 1 ); @@ -1219,7 +1219,7 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in, unpackUInt16( in, labelNo ); unpackUInt16( in, buddyNo ); TQLabel *label = - (TQLabel *) objects[labelNo]->tqt_cast( TQLABEL_OBJECT_NAME_STRING ); + (TQLabel *) objects[labelNo]->tqt_cast( "TQLabel" ); if ( label != 0 ) label->setBuddy( (TQWidget *) objects[buddyNo] ); } while ( !END_OF_BLOCK() ); @@ -1301,7 +1301,7 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in, break; case Block_Menubar: inputObject( objects, numObjects, strings, in, toplevel, TQT_TQOBJECT(toplevel), - TQMENUBAR_OBJECT_NAME_STRING ); + "TQMenuBar" ); break; case Block_Slots: { @@ -1334,7 +1334,7 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in, case Block_Toolbars: do { inputObject( objects, numObjects, strings, in, toplevel, - TQT_TQOBJECT(toplevel), TQTOOLBAR_OBJECT_NAME_STRING ); + TQT_TQOBJECT(toplevel), "TQToolBar" ); } while ( !END_OF_BLOCK() ); break; case Block_Variables: @@ -1345,7 +1345,7 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in, case Block_Widget: toplevel = (TQWidget *) inputObject( objects, numObjects, strings, in, toplevel, TQT_TQOBJECT(parent), - TQWIDGET_OBJECT_NAME_STRING ); + "TQWidget" ); if ( toplevel != 0 ) toplevel->setName( name ); break; @@ -1410,97 +1410,97 @@ TQWidget *TQWidgetFactory::createWidget( const TQString &className, TQWidget *pa const char *name ) const { // create widgets we know - if ( className == TQPUSHBUTTON_OBJECT_NAME_STRING ) { + if ( className == "TQPushButton" ) { return new TQPushButton( parent, name ); - } else if ( className == TQTOOLBUTTON_OBJECT_NAME_STRING ) { + } else if ( className == "TQToolButton" ) { return new TQToolButton( parent, name ); - } else if ( className == TQCHECKBOX_OBJECT_NAME_STRING ) { + } else if ( className == "TQCheckBox" ) { return new TQCheckBox( parent, name ); - } else if ( className == TQRADIOBUTTON_OBJECT_NAME_STRING ) { + } else if ( className == "TQRadioButton" ) { return new TQRadioButton( parent, name ); - } else if ( className == TQGROUPBOX_OBJECT_NAME_STRING ) { + } else if ( className == "TQGroupBox" ) { return new TQGroupBox( parent, name ); - } else if ( className == TQBUTTONGROUP_OBJECT_NAME_STRING ) { + } else if ( className == "TQButtonGroup" ) { return new TQButtonGroup( parent, name ); - } else if ( className == TQICONVIEW_OBJECT_NAME_STRING ) { + } else if ( className == "TQIconView" ) { #if !defined(TQT_NO_ICONVIEW) return new TQIconView( parent, name ); #endif - } else if ( className == TQTABLE_OBJECT_NAME_STRING ) { + } else if ( className == "TQTable" ) { #if !defined(TQT_NO_TABLE) return new TQTable( parent, name ); #endif - } else if ( className == TQLISTBOX_OBJECT_NAME_STRING ) { + } else if ( className == "TQListBox" ) { return new TQListBox( parent, name ); - } else if ( className == TQLISTVIEW_OBJECT_NAME_STRING ) { + } else if ( className == "TQListView" ) { return new TQListView( parent, name ); - } else if ( className == TQLINEEDIT_OBJECT_NAME_STRING ) { + } else if ( className == "TQLineEdit" ) { return new TQLineEdit( parent, name ); - } else if ( className == TQSPINBOX_OBJECT_NAME_STRING ) { + } else if ( className == "TQSpinBox" ) { return new TQSpinBox( parent, name ); - } else if ( className == TQMULTILINEEDIT_OBJECT_NAME_STRING ) { + } else if ( className == "TQMultiLineEdit" ) { return new TQMultiLineEdit( parent, name ); - } else if ( className == TQLABEL_OBJECT_NAME_STRING || className == "TextLabel" || className == "PixmapLabel" ) { + } else if ( className == "TQLabel" || className == "TextLabel" || className == "PixmapLabel" ) { return new TQLabel( parent, name ); - } else if ( className == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) { + } else if ( className == "TQLayoutWidget" ) { return new TQWidget( parent, name ); - } else if ( className == TQTABWIDGET_OBJECT_NAME_STRING ) { + } else if ( className == "TQTabWidget" ) { return new TQTabWidget( parent, name ); - } else if ( className == TQCOMBOBOX_OBJECT_NAME_STRING ) { + } else if ( className == "TQComboBox" ) { return new TQComboBox( FALSE, parent, name ); - } else if ( className == TQWIDGET_OBJECT_NAME_STRING ) { + } else if ( className == "TQWidget" ) { if ( !qwf_stays_on_top ) return new TQWidget( parent, name ); return new TQWidget( parent, name, TQt::WStyle_StaysOnTop ); - } else if ( className == TQDIALOG_OBJECT_NAME_STRING ) { + } else if ( className == "TQDialog" ) { if ( !qwf_stays_on_top ) return new TQDialog( parent, name ); return new TQDialog( parent, name, FALSE, TQt::WStyle_StaysOnTop ); - } else if ( className == TQWIZARD_OBJECT_NAME_STRING ) { + } else if ( className == "TQWizard" ) { return new TQWizard( parent, name ); - } else if ( className == TQLCDNUMBER_OBJECT_NAME_STRING ) { + } else if ( className == "TQLCDNumber" ) { return new TQLCDNumber( parent, name ); - } else if ( className == TQPROGRESSBAR_OBJECT_NAME_STRING ) { + } else if ( className == "TQProgressBar" ) { return new TQProgressBar( parent, name ); - } else if ( className == TQTEXTVIEW_OBJECT_NAME_STRING ) { + } else if ( className == "TQTextView" ) { return new TQTextView( parent, name ); - } else if ( className == TQTEXTBROWSER_OBJECT_NAME_STRING ) { + } else if ( className == "TQTextBrowser" ) { return new TQTextBrowser( parent, name ); - } else if ( className == TQDIAL_OBJECT_NAME_STRING ) { + } else if ( className == "TQDial" ) { return new TQDial( parent, name ); - } else if ( className == TQSLIDER_OBJECT_NAME_STRING ) { + } else if ( className == "TQSlider" ) { return new TQSlider( parent, name ); - } else if ( className == TQFRAME_OBJECT_NAME_STRING ) { + } else if ( className == "TQFrame" ) { return new TQFrame( parent, name ); - } else if ( className == TQSPLITTER_OBJECT_NAME_STRING ) { + } else if ( className == "TQSplitter" ) { return new TQSplitter( parent, name ); } else if ( className == "Line" ) { TQFrame *f = new TQFrame( parent, name ); f->setFrameStyle( TQFrame::HLine | TQFrame::Sunken ); return f; - } else if ( className == TQTEXTEDIT_OBJECT_NAME_STRING ) { + } else if ( className == "TQTextEdit" ) { return new TQTextEdit( parent, name ); - } else if ( className == TQDATEEDIT_OBJECT_NAME_STRING ) { + } else if ( className == "TQDateEdit" ) { return new TQDateEdit( parent, name ); - } else if ( className == TQTIMEEDIT_OBJECT_NAME_STRING ) { + } else if ( className == "TQTimeEdit" ) { return new TQTimeEdit( parent, name ); - } else if ( className == TQDATETIMEEDIT_OBJECT_NAME_STRING ) { + } else if ( className == "TQDateTimeEdit" ) { return new TQDateTimeEdit( parent, name ); - } else if ( className == TQSCROLLBAR_OBJECT_NAME_STRING ) { + } else if ( className == "TQScrollBar" ) { return new TQScrollBar( parent, name ); - } else if ( className == TQPOPUPMENU_OBJECT_NAME_STRING ) { + } else if ( className == "TQPopupMenu" ) { return new TQPopupMenu( parent, name ); - } else if ( className == TQWIDGETSTACK_OBJECT_NAME_STRING ) { + } else if ( className == "TQWidgetStack" ) { return new TQWidgetStack( parent, name ); - } else if ( className == TQTOOLBOX_OBJECT_NAME_STRING ) { + } else if ( className == "TQToolBox" ) { return new TQToolBox( parent, name ); - } else if ( className == TQVBOX_OBJECT_NAME_STRING ) { + } else if ( className == "TQVBox" ) { return new TQVBox( parent, name ); - } else if ( className == TQHBOX_OBJECT_NAME_STRING ) { + } else if ( className == "TQHBox" ) { return new TQHBox( parent, name ); - } else if ( className == TQGRID_OBJECT_NAME_STRING ) { + } else if ( className == "TQGrid" ) { return new TQGrid( 4, parent, name ); - } else if ( className == TQMAINWINDOW_OBJECT_NAME_STRING ) { + } else if ( className == "TQMainWindow" ) { TQMainWindow *mw = 0; if ( !qwf_stays_on_top ) mw = new TQMainWindow( parent, name ); @@ -1513,11 +1513,11 @@ TQWidget *TQWidgetFactory::createWidget( const TQString &className, TQWidget *pa } #if !defined(TQT_NO_SQL) - else if ( className == TQDATATABLE_OBJECT_NAME_STRING ) { + else if ( className == "TQDataTable" ) { return new TQDataTable( parent, name ); - } else if ( className == TQDATABROWSER_OBJECT_NAME_STRING ) { + } else if ( className == "TQDataBrowser" ) { return new QDesignerDataBrowser2( parent, name ); - } else if ( className == TQDATAVIEW_OBJECT_NAME_STRING ) { + } else if ( className == "TQDataView" ) { return new QDesignerDataView2( parent, name ); } #endif @@ -1589,11 +1589,11 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget bool isTQLayoutWidget = FALSE; if ( !className.isEmpty() ) { - if ( !layout && className == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) { - className = TQWIDGET_OBJECT_NAME_STRING; + if ( !layout && className == "TQLayoutWidget" ) { + className = "TQWidget"; isTQLayoutWidget = TRUE; } - if ( layout && className == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) { + if ( layout && className == "TQLayoutWidget" ) { // hide layout widgets w = parent; } else { @@ -1603,7 +1603,7 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget w = (TQWidget*)obj; if ( !toplevel ) toplevel = w; - if ( w->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) ) + if ( w->inherits( "TQMainWindow" ) ) w = ( (TQMainWindow*)w )->centralWidget(); if ( layout ) { switch( layoutType( layout ) ) { @@ -1639,41 +1639,41 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget createSpacer( n, layout ); } else if ( n.tagName() == "widget" ) { TQMap< TQString, TQString> *oldDbControls = dbControls; - createWidgetInternal( n, w, layout, n.attribute( "class", TQWIDGET_OBJECT_NAME_STRING ) ); + createWidgetInternal( n, w, layout, n.attribute( "class", "TQWidget" ) ); dbControls = oldDbControls; } else if ( n.tagName() == "hbox" ) { TQLayout *parentLayout = layout; - if ( layout && layout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) + if ( layout && layout->inherits( "TQGridLayout" ) ) layout = createLayout( 0, 0, TQWidgetFactory::HBox, isTQLayoutWidget ); else layout = createLayout( w, layout, TQWidgetFactory::HBox, isTQLayoutWidget ); obj = TQT_TQOBJECT(layout); n = n.firstChild().toElement(); - if ( parentLayout && parentLayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) + if ( parentLayout && parentLayout->inherits( "TQGridLayout" ) ) ( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row, row + rowspan - 1, col, col + colspan - 1 ); continue; } else if ( n.tagName() == "grid" ) { TQLayout *parentLayout = layout; - if ( layout && layout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) + if ( layout && layout->inherits( "TQGridLayout" ) ) layout = createLayout( 0, 0, TQWidgetFactory::Grid, isTQLayoutWidget ); else layout = createLayout( w, layout, TQWidgetFactory::Grid, isTQLayoutWidget ); obj = TQT_TQOBJECT(layout); n = n.firstChild().toElement(); - if ( parentLayout && parentLayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) + if ( parentLayout && parentLayout->inherits( "TQGridLayout" ) ) ( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row, row + rowspan - 1, col, col + colspan - 1 ); continue; } else if ( n.tagName() == "vbox" ) { TQLayout *parentLayout = layout; - if ( layout && layout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) + if ( layout && layout->inherits( "TQGridLayout" ) ) layout = createLayout( 0, 0, TQWidgetFactory::VBox, isTQLayoutWidget ); else layout = createLayout( w, layout, TQWidgetFactory::VBox, isTQLayoutWidget ); obj = TQT_TQOBJECT(layout); n = n.firstChild().toElement(); - if ( parentLayout && parentLayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) + if ( parentLayout && parentLayout->inherits( "TQGridLayout" ) ) ( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row, row + rowspan - 1, col, col + colspan - 1 ); continue; @@ -1683,16 +1683,16 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget TQString attrib = n.attribute( "name" ); TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); if ( parent ) { - if ( parent->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ) { + if ( parent->inherits( "TQTabWidget" ) ) { if ( attrib == "title" ) ( (TQTabWidget*)parent )->insertTab( w, translate( v.toString() ) ); - } else if ( parent->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) ) { + } else if ( parent->inherits( "TQWidgetStack" ) ) { if ( attrib == "id" ) ( (TQWidgetStack*)parent )->addWidget( w, v.toInt() ); - } else if ( parent->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) ) { + } else if ( parent->inherits( "TQToolBox" ) ) { if ( attrib == "label" ) ( (TQToolBox*)parent )->addItem( w, v.toString() ); - } else if ( parent->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) { + } else if ( parent->inherits( "TQWizard" ) ) { if ( attrib == "title" ) ( (TQWizard*)parent )->addPage( w, translate( v.toString() ) ); #ifdef TQT_CONTAINER_CUSTOM_WIDGETS @@ -1737,21 +1737,21 @@ TQLayout *TQWidgetFactory::createLayout( TQWidget *widget, TQLayout* layout, if ( layout || !widget || isTQLayoutWidget ) margin = 0; - if ( !layout && widget && widget->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ) + if ( !layout && widget && widget->inherits( "TQTabWidget" ) ) widget = ((TQTabWidget*)widget)->currentPage(); - if ( !layout && widget && widget->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) + if ( !layout && widget && widget->inherits( "TQWizard" ) ) widget = ((TQWizard*)widget)->currentPage(); - if ( !layout && widget && widget->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) ) + if ( !layout && widget && widget->inherits( "TQWidgetStack" ) ) widget = ((TQWidgetStack*)widget)->visibleWidget(); - if ( !layout && widget && widget->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) ) + if ( !layout && widget && widget->inherits( "TQToolBox" ) ) widget = ((TQToolBox*)widget)->currentItem(); TQLayout *l = 0; int align = 0; - if ( !layout && widget && widget->inherits( TQGROUPBOX_OBJECT_NAME_STRING ) ) { + if ( !layout && widget && widget->inherits( "TQGroupBox" ) ) { TQGroupBox *gb = (TQGroupBox*)widget; gb->setColumnLayout( 0, Qt::Vertical ); layout = gb->layout(); @@ -1796,11 +1796,11 @@ TQLayout *TQWidgetFactory::createLayout( TQWidget *widget, TQLayout* layout, TQWidgetFactory::LayoutType TQWidgetFactory::layoutType( TQLayout *layout ) const { - if ( layout->inherits( TQHBOXLAYOUT_OBJECT_NAME_STRING ) ) + if ( layout->inherits( "TQHBoxLayout" ) ) return HBox; - else if ( layout->inherits( TQVBOXLAYOUT_OBJECT_NAME_STRING ) ) + else if ( layout->inherits( "TQVBoxLayout" ) ) return VBox; - else if ( layout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) + else if ( layout->inherits( "TQGridLayout" ) ) return Grid; return NoLayout; } @@ -1850,11 +1850,11 @@ void TQWidgetFactory::setProperty( TQObject* obj, const TQString &prop, } else if ( prop == "buddy" ) { buddies.insert( obj->name(), value.toCString() ); } else if ( prop == "buttonGroupId" ) { - if ( obj->inherits( TQBUTTON_OBJECT_NAME_STRING ) && obj->parent()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) + if ( obj->inherits( "TQButton" ) && obj->parent()->inherits( "TQButtonGroup" ) ) ( (TQButtonGroup*)obj->parent() )->insert( (TQButton*)obj, value.toInt() ); #ifndef TQT_NO_SQL - } else if ( prop == "database" && !obj->inherits( TQDATAVIEW_OBJECT_NAME_STRING ) - && !obj->inherits( TQDATABROWSER_OBJECT_NAME_STRING ) ) { + } else if ( prop == "database" && !obj->inherits( "TQDataView" ) + && !obj->inherits( "TQDataBrowser" ) ) { const TQStringList& lst = value.asStringList(); if ( lst.count() > 2 ) { if ( dbControls ) @@ -1864,7 +1864,7 @@ void TQWidgetFactory::setProperty( TQObject* obj, const TQString &prop, } } else if ( prop == "database" ) { const TQStringList& lst = value.asStringList(); - if ( lst.count() == 2 && obj->inherits( TQWIDGET_OBJECT_NAME_STRING ) ) { + if ( lst.count() == 2 && obj->inherits( "TQWidget" ) ) { SqlWidgetConnection conn( lst[ 0 ], lst[ 1 ] ); sqlWidgetConnections.insert( (TQWidget*)obj, conn ); dbControls = conn.dbControls; @@ -1953,7 +1953,7 @@ void TQWidgetFactory::createSpacer( const TQDomElement &e, TQLayout *layout ) TQSpacerItem *item = new TQSpacerItem( w, h, orient == Qt::Horizontal ? sizeType : TQSizePolicy::Minimum, orient == Qt::Vertical ? sizeType : TQSizePolicy::Minimum ); if ( layout ) { - if ( layout->inherits( TQBOXLAYOUT_OBJECT_NAME_STRING ) ) + if ( layout->inherits( "TQBoxLayout" ) ) ( (TQBoxLayout*)layout )->addItem( item ); else ( (TQGridLayout*)layout )->addMultiCell( item, row, row + rowspan - 1, col, col + colspan - 1, @@ -2212,7 +2212,7 @@ void TQWidgetFactory::createTableColumnOrRow( TQTable *table, const TQString& tx const TQString& field, bool isRow ) { #ifndef TQT_NO_SQL - bool isSql = table->inherits( TQDATATABLE_OBJECT_NAME_STRING ); + bool isSql = table->inherits( "TQDataTable" ); #endif if ( isRow ) table->setNumRows( table->numRows() + 1 ); @@ -2256,7 +2256,7 @@ void TQWidgetFactory::createTableColumnOrRow( TQTable *table, const TQString& tx void TQWidgetFactory::createColumn( const TQDomElement &e, TQWidget *widget ) { - if ( widget->inherits( TQLISTVIEW_OBJECT_NAME_STRING ) && e.tagName() == "column" ) { + if ( widget->inherits( "TQListView" ) && e.tagName() == "column" ) { TQListView *lv = (TQListView*)widget; TQDomElement n = e.firstChild().toElement(); TQPixmap pix; @@ -2280,7 +2280,7 @@ void TQWidgetFactory::createColumn( const TQDomElement &e, TQWidget *widget ) createListViewColumn( lv, txt, pix, clickable, resizable ); } #ifndef TQT_NO_TABLE - else if ( widget->inherits( TQTABLE_OBJECT_NAME_STRING ) ) { + else if ( widget->inherits( "TQTable" ) ) { TQTable *table = (TQTable*)widget; TQDomElement n = e.firstChild().toElement(); @@ -2328,14 +2328,14 @@ void TQWidgetFactory::loadItem( const TQDomElement &e, TQPixmap &pix, TQString & void TQWidgetFactory::createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i ) { - if ( widget->inherits( TQLISTBOX_OBJECT_NAME_STRING ) || widget->inherits( TQCOMBOBOX_OBJECT_NAME_STRING ) ) { + if ( widget->inherits( "TQListBox" ) || widget->inherits( "TQComboBox" ) ) { TQDomElement n = e.firstChild().toElement(); TQPixmap pix; bool hasPixmap = FALSE; TQString txt; loadItem( n, pix, txt, hasPixmap ); TQListBox *lb = 0; - if ( widget->inherits( TQLISTBOX_OBJECT_NAME_STRING ) ) + if ( widget->inherits( "TQListBox" ) ) lb = (TQListBox*)widget; else lb = ( (TQComboBox*)widget)->listBox(); @@ -2345,7 +2345,7 @@ void TQWidgetFactory::createItem( const TQDomElement &e, TQWidget *widget, TQLis new TQListBoxText( lb, txt ); } #ifndef TQT_NO_ICONVIEW - } else if ( widget->inherits( TQICONVIEW_OBJECT_NAME_STRING ) ) { + } else if ( widget->inherits( "TQIconView" ) ) { TQDomElement n = e.firstChild().toElement(); TQPixmap pix; bool hasPixmap = FALSE; @@ -2355,7 +2355,7 @@ void TQWidgetFactory::createItem( const TQDomElement &e, TQWidget *widget, TQLis TQIconView *iv = (TQIconView*)widget; new TQIconViewItem( iv, txt, pix ); #endif - } else if ( widget->inherits( TQLISTVIEW_OBJECT_NAME_STRING ) ) { + } else if ( widget->inherits( "TQListView" ) ) { TQDomElement n = e.firstChild().toElement(); TQPixmap pix; TQValueList pixmaps; @@ -2417,7 +2417,7 @@ void TQWidgetFactory::loadChildAction( TQObject *parent, const TQDomElement &e ) } n2 = n2.nextSibling().toElement(); } - if ( !parent->inherits( TQACTION_OBJECT_NAME_STRING ) ) + if ( !parent->inherits( "TQAction" ) ) actionList.append( a ); } else if ( n.tagName() == "actiongroup" ) { a = new TQActionGroup( parent ); @@ -2435,7 +2435,7 @@ void TQWidgetFactory::loadChildAction( TQObject *parent, const TQDomElement &e ) } n2 = n2.nextSibling().toElement(); } - if ( !parent->inherits( TQACTION_OBJECT_NAME_STRING ) ) + if ( !parent->inherits( "TQAction" ) ) actionList.append( a ); } @@ -2476,7 +2476,7 @@ void TQWidgetFactory::loadToolBars( const TQDomElement &e ) } else if ( n2.tagName() == "separator" ) { tb->addSeparator(); } else if ( n2.tagName() == "widget" ) { - (void)createWidgetInternal( n2, tb, 0, n2.attribute( "class", TQWIDGET_OBJECT_NAME_STRING ) ); + (void)createWidgetInternal( n2, tb, 0, n2.attribute( "class", "TQWidget" ) ); } else if ( n2.tagName() == "property" ) { setProperty( TQT_TQOBJECT(tb), n2.attribute( "name" ), n2.firstChild().toElement() ); } @@ -2551,7 +2551,7 @@ TQAction *TQWidgetFactory::findAction( const TQString &name ) for ( TQAction *a = actionList.first(); a; a = actionList.next() ) { if ( TQString( a->name() ) == name ) return a; - TQAction *ac = (TQAction*)a->child( name.latin1(), TQACTION_OBJECT_NAME_STRING ); + TQAction *ac = (TQAction*)a->child( name.latin1(), "TQAction" ); if ( ac ) return ac; } -- cgit v1.2.1