summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/uilib/qwidgetfactory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdevdesigner/uilib/qwidgetfactory.cpp')
-rw-r--r--kdevdesigner/uilib/qwidgetfactory.cpp322
1 files changed, 161 insertions, 161 deletions
diff --git a/kdevdesigner/uilib/qwidgetfactory.cpp b/kdevdesigner/uilib/qwidgetfactory.cpp
index c431253e..9d0d3656 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 =
@@ -295,7 +295,7 @@ TQWidget *TQWidgetFactory::create( const TQString &uiFile, TQObject *connector,
return 0;
qwf_currFileName = uiFile;
- TQWidget *w = TQWidgetFactory::create( TQT_TQIODEVICE(&f), connector, parent, name );
+ TQWidget *w = TQWidgetFactory::create( &f, connector, parent, name );
if ( !qwf_forms )
qwf_forms = new TQMap<TQWidget*, TQString>;
qwf_forms->insert( w, uiFile );
@@ -356,15 +356,15 @@ TQWidget *TQWidgetFactory::create( TQIODevice *dev, TQObject *connector, TQWidge
continue;
if ( cit.key()->inherits( "QDesignerDataBrowser2" ) )
( (QDesignerDataBrowser2*)cit.key() )->initPreview( (*cit).conn, (*cit).table,
- TQT_TQOBJECT(cit.key()), *(*cit).dbControls );
+ cit.key(), *(*cit).dbControls );
else if ( cit.key()->inherits( "QDesignerDataView2" ) )
( (QDesignerDataView2*)cit.key() )->initPreview( (*cit).conn, (*cit).table,
- TQT_TQOBJECT(cit.key()), *(*cit).dbControls );
+ cit.key(), *(*cit).dbControls );
}
for ( TQMap<TQString, TQStringList>::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<TQString, TQString>::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,8 +786,8 @@ void TQWidgetFactory::inputItem( const UibStrTable& strings, TQDataStream& in,
TQ_UINT8 objectTag;
TQListView *listView = 0;
- if ( parent != 0 && parent->inherits(TQLISTVIEW_OBJECT_NAME_STRING) )
- parent = TQT_TQOBJECT((TQListView *) parent);
+ if ( parent != 0 && parent->inherits("TQListView") )
+ parent = (TQListView *) parent;
TQListViewItem *item = 0;
if ( listView != 0 ) {
if ( parentItem == 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,53 +915,53 @@ 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 ) {
+ obj = layout;
+ } else if ( className == "TQMenuBar" ) {
unpackCString( strings, in, className );
widget = ((TQMainWindow *) parent)->menuBar();
- obj = TQT_TQOBJECT(widget);
- } else if ( className == TQTOOLBAR_OBJECT_NAME_STRING ) {
+ obj = widget;
+ } 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 ) {
+ obj = widget;
+ } else if ( className == "TQWidget" ) {
unpackCString( strings, in, className );
widget = createWidget( className, parentWidget, 0 );
- obj = TQT_TQOBJECT(widget);
+ obj = widget;
}
if ( widget != 0 )
@@ -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 );
@@ -1208,7 +1208,7 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in,
switch ( blockType ) {
case Block_Actions:
- inputObject( objects, numObjects, strings, in, toplevel, TQT_TQOBJECT(toplevel) );
+ inputObject( objects, numObjects, strings, in, toplevel, toplevel );
break;
case Block_Buddies:
{
@@ -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() );
@@ -1300,8 +1300,8 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in,
}
break;
case Block_Menubar:
- inputObject( objects, numObjects, strings, in, toplevel, TQT_TQOBJECT(toplevel),
- TQMENUBAR_OBJECT_NAME_STRING );
+ inputObject( objects, numObjects, strings, in, toplevel, toplevel,
+ "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 );
+ toplevel, "TQToolBar" );
} while ( !END_OF_BLOCK() );
break;
case Block_Variables:
@@ -1344,8 +1344,8 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in,
break;
case Block_Widget:
toplevel = (TQWidget *)
- inputObject( objects, numObjects, strings, in, toplevel, TQT_TQOBJECT(parent),
- TQWIDGET_OBJECT_NAME_STRING );
+ inputObject( objects, numObjects, strings, in, toplevel, parent,
+ "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,21 +1589,21 @@ 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 {
- obj = TQT_TQOBJECT(TQWidgetFactory::createWidget( className, parent, 0 ));
+ obj = TQWidgetFactory::createWidget( className, parent, 0 );
if ( !obj )
return 0;
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);
+ obj = 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);
+ obj = 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);
+ obj = 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,23 +1737,23 @@ 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 );
+ gb->setColumnLayout( 0, TQt::Vertical );
layout = gb->layout();
layout->setMargin( 0 );
layout->setSpacing( 0 );
@@ -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;
}
@@ -1811,7 +1811,7 @@ void TQWidgetFactory::setProperty( TQObject* obj, const TQString &prop,
int offset = obj->metaObject()->findProperty( prop.ascii(), TRUE );
if ( offset != -1 ) {
- if ( prop == "geometry" && TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(toplevel) ) {
+ if ( prop == "geometry" && obj == toplevel ) {
toplevel->resize( value.toRect().size() );
} else if ( prop == "accel" ) {
obj->setProperty( prop.ascii(), TQVariant(value.toKeySequence()) );
@@ -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;
@@ -1925,7 +1925,7 @@ void TQWidgetFactory::createSpacer( const TQDomElement &e, TQLayout *layout )
int rowspan = e.attribute( "rowspan" ).toInt();
int colspan = e.attribute( "colspan" ).toInt();
- Qt::Orientation orient = Qt::Horizontal;
+ TQt::Orientation orient = TQt::Horizontal;
int w = 0, h = 0;
TQSizePolicy::SizeType sizeType = TQSizePolicy::Preferred;
while ( !n.isNull() ) {
@@ -1933,9 +1933,9 @@ void TQWidgetFactory::createSpacer( const TQDomElement &e, TQLayout *layout )
TQString prop = n.attribute( "name" );
if ( prop == "orientation" ) {
if ( n.firstChild().firstChild().toText().data() == "Horizontal" )
- orient = Qt::Horizontal;
+ orient = TQt::Horizontal;
else
- orient = Qt::Vertical;
+ orient = TQt::Vertical;
} else if ( prop == "sizeType" ) {
sizeType = stringToSizeType( n.firstChild().firstChild().toText().data() );
} else if ( prop == "sizeHint" ) {
@@ -1950,14 +1950,14 @@ void TQWidgetFactory::createSpacer( const TQDomElement &e, TQLayout *layout )
rowspan = 1;
if ( colspan < 1 )
colspan = 1;
- TQSpacerItem *item = new TQSpacerItem( w, h, orient == Qt::Horizontal ? sizeType : TQSizePolicy::Minimum,
- orient == Qt::Vertical ? sizeType : TQSizePolicy::Minimum );
+ TQSpacerItem *item = new TQSpacerItem( w, h, orient == TQt::Horizontal ? sizeType : TQSizePolicy::Minimum,
+ orient == TQt::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,
- orient == Qt::Horizontal ? TQt::AlignVCenter : TQt::AlignHCenter );
+ orient == TQt::Horizontal ? TQt::AlignVCenter : TQt::AlignHCenter );
}
}
@@ -2069,7 +2069,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto
if ( n2.tagName() == "sender" ) {
TQString name = n2.firstChild().toText().data();
if ( name == "this" || qstrcmp( toplevel->name(), name.ascii() ) == 0 ) {
- conn.sender = TQT_TQOBJECT(toplevel);
+ conn.sender = toplevel;
} else {
if ( name == "this" )
name = toplevel->name();
@@ -2087,7 +2087,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto
} else if ( n2.tagName() == "receiver" ) {
TQString name = n2.firstChild().toText().data();
if ( name == "this" || qstrcmp( toplevel->name(), name.ascii() ) == 0 ) {
- conn.receiver = TQT_TQOBJECT(toplevel);
+ conn.receiver = toplevel;
} else {
TQObjectList *l = toplevel->queryList( 0, name.ascii(), FALSE );
if ( l ) {
@@ -2113,7 +2113,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto
TQObject *sender = 0, *receiver = 0;
TQObjectList *l = toplevel->queryList( 0, conn.sender->name(), FALSE );
if ( qstrcmp( conn.sender->name(), toplevel->name() ) == 0 ) {
- sender = TQT_TQOBJECT(toplevel);
+ sender = toplevel;
} else {
if ( !l || !l->first() ) {
delete l;
@@ -2127,7 +2127,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto
sender = findAction( conn.sender->name() );
if ( qstrcmp( conn.receiver->name(), toplevel->name() ) == 0 ) {
- receiver = TQT_TQOBJECT(toplevel);
+ receiver = toplevel;
} else {
l = toplevel->queryList( 0, conn.receiver->name(), FALSE );
if ( !l || !l->first() ) {
@@ -2148,7 +2148,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto
TQStrList slotList = receiver->metaObject()->slotNames( TRUE );
// if this is a connection to a custom slot and we have a connector, try this as receiver
- if ( slotList.find( conn.slot ) == -1 && (TQT_BASE_OBJECT(receiver) == TQT_BASE_OBJECT(toplevel)) && connector ) {
+ if ( slotList.find( conn.slot ) == -1 && (receiver == toplevel) && connector ) {
slotList = connector->metaObject()->slotNames( TRUE );
receiver = connector;
}
@@ -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<TQPixmap> 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 );
}
@@ -2448,9 +2448,9 @@ void TQWidgetFactory::loadActions( const TQDomElement &e )
TQDomElement n = e.firstChild().toElement();
while ( !n.isNull() ) {
if ( n.tagName() == "action" ) {
- loadChildAction( TQT_TQOBJECT(toplevel), n );
+ loadChildAction( toplevel, n );
} else if ( n.tagName() == "actiongroup" ) {
- loadChildAction( TQT_TQOBJECT(toplevel), n );
+ loadChildAction( toplevel, n );
}
n = n.nextSibling().toElement();
}
@@ -2476,9 +2476,9 @@ 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() );
+ setProperty( tb, n2.attribute( "name" ), n2.firstChild().toElement() );
}
n2 = n2.nextSibling().toElement();
}
@@ -2499,7 +2499,7 @@ void TQWidgetFactory::loadMenuBar( const TQDomElement &e )
popup->setName( n.attribute( "name" ).ascii() );
mb->insertItem( translate( n.attribute( "text" ) ), popup );
} else if ( n.tagName() == "property" ) {
- setProperty( TQT_TQOBJECT(mb), n.attribute( "name" ), n.firstChild().toElement() );
+ setProperty( mb, n.attribute( "name" ), n.firstChild().toElement() );
} else if ( n.tagName() == "separator" ) {
mb->insertSeparator();
}
@@ -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;
}