summaryrefslogtreecommitdiffstats
path: root/tqtinterface/qt4/tools/designer/uilib
diff options
context:
space:
mode:
Diffstat (limited to 'tqtinterface/qt4/tools/designer/uilib')
-rw-r--r--tqtinterface/qt4/tools/designer/uilib/tqwidgetfactory.cpp250
-rw-r--r--tqtinterface/qt4/tools/designer/uilib/tqwidgetfactory.h24
2 files changed, 137 insertions, 137 deletions
diff --git a/tqtinterface/qt4/tools/designer/uilib/tqwidgetfactory.cpp b/tqtinterface/qt4/tools/designer/uilib/tqwidgetfactory.cpp
index ef46eea..b8bd674 100644
--- a/tqtinterface/qt4/tools/designer/uilib/tqwidgetfactory.cpp
+++ b/tqtinterface/qt4/tools/designer/uilib/tqwidgetfactory.cpp
@@ -271,7 +271,7 @@ TQWidgetFactory::~TQWidgetFactory()
/*!
Loads the \e{TQt Designer} user interface description file \a uiFile
- and returns the top-level widget in that description. \a tqparent and
+ and returns the top-level widget in that description. \a parent and
\a name are passed to the constructor of the top-level widget.
This function also performs signal and slot connections, tab
@@ -289,7 +289,7 @@ TQWidgetFactory::~TQWidgetFactory()
*/
TQWidget *TQWidgetFactory::create( const TQString &uiFile, TQObject *connector,
- TQWidget *tqparent, const char *name )
+ TQWidget *parent, const char *name )
{
setupPluginDir();
TQFile f( uiFile );
@@ -306,7 +306,7 @@ TQWidget *TQWidgetFactory::create( const TQString &uiFile, TQObject *connector,
return 0;
qwf_currFileName = uiFile;
- TQWidget *w = TQWidgetFactory::create( &f, connector, tqparent, name );
+ TQWidget *w = TQWidgetFactory::create( &f, connector, parent, name );
if ( !qwf_forms )
qwf_forms = new TQMap<TQWidget*, TQString>;
qwf_forms->insert( w, uiFile );
@@ -319,7 +319,7 @@ TQWidget *TQWidgetFactory::create( const TQString &uiFile, TQObject *connector,
Loads the user interface description from tqdevice \a dev.
*/
-TQWidget *TQWidgetFactory::create( TQIODevice *dev, TQObject *connector, TQWidget *tqparent, const char *name )
+TQWidget *TQWidgetFactory::create( TQIODevice *dev, TQObject *connector, TQWidget *parent, const char *name )
{
setupPluginDir();
TQWidget *w = 0;
@@ -337,12 +337,12 @@ TQWidget *TQWidgetFactory::create( TQIODevice *dev, TQObject *connector, TQWidge
TQDataStream in( dev );
in >> magic;
if ( magic == UibMagic ) {
- w = widgetFactory->createFromUibFile( in, connector, tqparent, name );
+ w = widgetFactory->createFromUibFile( in, connector, parent, name );
} else {
in.unsetDevice();
dev->at( start );
if ( doc.setContent( dev, &errMsg, &errLine ) ) {
- w = widgetFactory->createFromUiFile( doc, connector, tqparent, name );
+ w = widgetFactory->createFromUiFile( doc, connector, parent, name );
} else {
// qDebug( TQString("Parse error: ") + errMsg + TQString(" in line %d"), errLine );
}
@@ -416,7 +416,7 @@ TQWidget *TQWidgetFactory::create( TQIODevice *dev, TQObject *connector, TQWidge
}
TQWidget *TQWidgetFactory::createFromUiFile( TQDomDocument doc, TQObject *connector,
- TQWidget *tqparent, const char *name )
+ TQWidget *parent, const char *name )
{
DomTool::fixDocument( doc );
@@ -477,7 +477,7 @@ TQWidget *TQWidgetFactory::createFromUiFile( TQDomDocument doc, TQObject *connec
if ( !imageCollection.isNull() )
loadImageCollection( imageCollection );
- createWidgetInternal( widget, tqparent, 0, widget.attribute("class", "TQWidget") );
+ createWidgetInternal( widget, parent, 0, widget.attribute("class", "TQWidget") );
TQWidget *w = toplevel;
if ( !w )
return 0;
@@ -663,7 +663,7 @@ void TQWidgetFactory::unpackVariant( const UibStrTable& strings, TQDataStream& i
}
void TQWidgetFactory::inputSpacer( const UibStrTable& strings, TQDataStream& in,
- TQLayout *tqparent )
+ TQLayout *parent )
{
TQCString name;
TQVariant value;
@@ -706,7 +706,7 @@ void TQWidgetFactory::inputSpacer( const UibStrTable& strings, TQDataStream& in,
in >> objectTag;
}
- if ( tqparent != 0 ) {
+ if ( parent != 0 ) {
TQSpacerItem *spacer;
if ( vertical ) {
spacer = new TQSpacerItem( w, h, TQSizePolicy::Minimum, sizeType );
@@ -714,18 +714,18 @@ void TQWidgetFactory::inputSpacer( const UibStrTable& strings, TQDataStream& in,
spacer = new TQSpacerItem( w, h, sizeType, TQSizePolicy::Minimum );
}
- if ( tqparent->inherits("TQGridLayout") ) {
- ((TQGridLayout *) tqparent)->addMultiCell( spacer, row,
+ if ( parent->inherits("TQGridLayout") ) {
+ ((TQGridLayout *) parent)->addMultiCell( spacer, row,
row + rowspan - 1, column, column + colspan - 1,
vertical ? Qt::AlignHCenter : Qt::AlignVCenter );
} else {
- tqparent->addItem( spacer );
+ parent->addItem( spacer );
}
}
}
void TQWidgetFactory::inputColumnOrRow( const UibStrTable& strings,
- TQDataStream& in, TQObject *tqparent,
+ TQDataStream& in, TQObject *parent,
bool isRow )
{
TQString text;
@@ -773,13 +773,13 @@ void TQWidgetFactory::inputColumnOrRow( const UibStrTable& strings,
in >> objectTag;
}
- if ( tqparent != 0 ) {
- if ( tqparent->inherits("TQListView") ) {
- createListViewColumn( (TQListView *) tqparent, text, pixmap, clickable,
+ if ( parent != 0 ) {
+ if ( parent->inherits("TQListView") ) {
+ createListViewColumn( (TQListView *) parent, text, pixmap, clickable,
resizable );
#ifndef TQT_NO_TABLE
- } else if ( tqparent->inherits("TQTable") ) {
- createTableColumnOrRow( (TQTable *) tqparent, text, pixmap, field,
+ } else if ( parent->inherits("TQTable") ) {
+ createTableColumnOrRow( (TQTable *) parent, text, pixmap, field,
isRow );
#endif
}
@@ -787,7 +787,7 @@ void TQWidgetFactory::inputColumnOrRow( const UibStrTable& strings,
}
void TQWidgetFactory::inputItem( const UibStrTable& strings, TQDataStream& in,
- TQObject *tqparent, TQListViewItem *parentItem )
+ TQObject *parent, TQListViewItem *parentItem )
{
TQStringList texts;
TQValueList<TQPixmap> pixmaps;
@@ -797,8 +797,8 @@ void TQWidgetFactory::inputItem( const UibStrTable& strings, TQDataStream& in,
TQ_UINT8 objectTag;
TQListView *listView = 0;
- if ( tqparent != 0 && tqparent->inherits("TQListView") )
- tqparent = TQT_TQOBJECT((TQListView *) tqparent);
+ if ( parent != 0 && parent->inherits("TQListView") )
+ parent = TQT_TQOBJECT((TQListView *) parent);
TQListViewItem *item = 0;
if ( listView != 0 ) {
if ( parentItem == 0 ) {
@@ -815,7 +815,7 @@ void TQWidgetFactory::inputItem( const UibStrTable& strings, TQDataStream& in,
case Object_Item:
if ( listView != 0 )
d->lastItem->setOpen( TRUE );
- inputItem( strings, in, tqparent, item );
+ inputItem( strings, in, parent, item );
break;
case Object_TextProperty:
unpackCString( strings, in, name );
@@ -858,12 +858,12 @@ void TQWidgetFactory::inputItem( const UibStrTable& strings, TQDataStream& in,
TQString text = texts.last();
TQPixmap pixmap = pixmaps.last();
- if ( tqparent != 0 ) {
- if ( tqparent->inherits("TQComboBox") ||
- tqparent->inherits("TQListBox") ) {
- TQListBox *listBox = (TQListBox *) tqparent->tqqt_cast( "TQListBox" );
+ if ( parent != 0 ) {
+ if ( parent->inherits("TQComboBox") ||
+ parent->inherits("TQListBox") ) {
+ TQListBox *listBox = (TQListBox *) parent->tqqt_cast( "TQListBox" );
if ( listBox == 0 )
- listBox = ((TQComboBox *) tqparent)->listBox();
+ listBox = ((TQComboBox *) parent)->listBox();
if ( pixmap.isNull() ) {
(void) new TQListBoxText( listBox, text );
@@ -871,8 +871,8 @@ void TQWidgetFactory::inputItem( const UibStrTable& strings, TQDataStream& in,
(void) new TQListBoxPixmap( listBox, pixmap, text );
}
#ifndef TQT_NO_ICONVIEW
- } else if ( tqparent->inherits("TQIconView") ) {
- (void) new TQIconViewItem( (TQIconView *) tqparent, text, pixmap );
+ } else if ( parent->inherits("TQIconView") ) {
+ (void) new TQIconViewItem( (TQIconView *) parent, text, pixmap );
#endif
}
}
@@ -914,7 +914,7 @@ void TQWidgetFactory::inputMenuItem( TQObject **objects,
TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
const UibStrTable& strings,
TQDataStream& in, TQWidget *ancestorWidget,
- TQObject *tqparent, TQCString className )
+ TQObject *parent, TQCString className )
{
TQObject *obj = 0;
TQWidget *widget = 0;
@@ -924,15 +924,15 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
bool isTQObject = !className.isEmpty();
if ( isTQObject ) {
- if ( tqparent != 0 ) {
- if ( tqparent->isWidgetType() ) {
- if ( tqparent->inherits("TQMainWindow") ) {
- parentWidget = ((TQMainWindow *) tqparent)->centralWidget();
+ if ( parent != 0 ) {
+ if ( parent->isWidgetType() ) {
+ if ( parent->inherits("TQMainWindow") ) {
+ parentWidget = ((TQMainWindow *) parent)->centralWidget();
} else {
- parentWidget = (TQWidget *) tqparent;
+ parentWidget = (TQWidget *) parent;
}
- } else if ( tqparent->inherits("TQLayout") ) {
- parentLayout = (TQLayout *) tqparent;
+ } else if ( parent->inherits("TQLayout") ) {
+ parentLayout = (TQLayout *) parent;
parentWidget = ancestorWidget;
}
}
@@ -940,9 +940,9 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
if ( className == "TQAction" ) {
unpackCString( strings, in, className );
if ( className == "TQActionGroup" ) {
- obj = TQT_TQOBJECT(new TQActionGroup( tqparent ));
+ obj = TQT_TQOBJECT(new TQActionGroup( parent ));
} else {
- obj = TQT_TQOBJECT(new TQAction( tqparent ));
+ obj = TQT_TQOBJECT(new TQAction( parent ));
}
} else if ( className == "TQLayout" ) {
unpackCString( strings, in, className );
@@ -960,13 +960,13 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
obj = TQT_TQOBJECT(tqlayout);
} else if ( className == "TQMenuBar" ) {
unpackCString( strings, in, className );
- widget = ((TQMainWindow *) tqparent)->menuBar();
+ widget = ((TQMainWindow *) parent)->menuBar();
obj = TQT_TQOBJECT(widget);
} else if ( className == "TQToolBar" ) {
TQ_UINT8 dock;
in >> dock;
unpackCString( strings, in, className );
- widget = new TQToolBar( TQString(), (TQMainWindow *) tqparent,
+ widget = new TQToolBar( TQString(), (TQMainWindow *) parent,
(TQt::TQt::Dock) dock );
obj = TQT_TQOBJECT(widget);
} else if ( className == "TQWidget" ) {
@@ -1110,7 +1110,7 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
break;
case Object_SubAction:
inputObject( objects, numObjects, strings, in, parentWidget,
- obj != 0 ? obj : tqparent, "TQAction" );
+ obj != 0 ? obj : parent, "TQAction" );
break;
case Object_SubLayout:
inputObject( objects, numObjects, strings, in, parentWidget, obj,
@@ -1128,11 +1128,11 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
if ( metAttribute > 0 ) {
if ( name == "title" ) {
- if ( tqparent != 0 ) {
- if ( tqparent->inherits("TQTabWidget") ) {
- ((TQTabWidget *) tqparent)->insertTab( widget, str );
- } else if ( tqparent->inherits("TQWizard") ) {
- ((TQWizard *) tqparent)->addPage( widget, str );
+ if ( parent != 0 ) {
+ if ( parent->inherits("TQTabWidget") ) {
+ ((TQTabWidget *) parent)->insertTab( widget, str );
+ } else if ( parent->inherits("TQWizard") ) {
+ ((TQWizard *) parent)->addPage( widget, str );
}
}
}
@@ -1147,8 +1147,8 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
if ( metAttribute > 0 ) {
if ( name == "id" ) {
- if ( tqparent != 0 && tqparent->inherits("TQWidgetStack") )
- ((TQWidgetStack *) tqparent)->addWidget( widget, value.toInt() );
+ if ( parent != 0 && parent->inherits("TQWidgetStack") )
+ ((TQWidgetStack *) parent)->addWidget( widget, value.toInt() );
}
} else {
if ( obj != 0 )
@@ -1183,7 +1183,7 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
}
TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in,
- TQObject * /* connector */ , TQWidget *tqparent, const char *name )
+ TQObject * /* connector */ , TQWidget *parent, const char *name )
{
#define END_OF_BLOCK() \
( in.atEnd() || in.tqdevice()->at() >= nextBlock )
@@ -1355,7 +1355,7 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in,
break;
case Block_Widget:
toplevel = (TQWidget *)
- inputObject( objects, numObjects, strings, in, toplevel, TQT_TQOBJECT(tqparent),
+ inputObject( objects, numObjects, strings, in, toplevel, TQT_TQOBJECT(parent),
"TQWidget" );
if ( toplevel != 0 )
toplevel->setName( name );
@@ -1381,7 +1381,7 @@ void TQWidgetFactory::addWidgetFactory( TQWidgetFactory *factory )
}
/*!
- Creates a widget of the type \a className passing \a tqparent and \a
+ Creates a widget of the type \a className passing \a parent and \a
name to its constructor.
If \a className is a widget in the TQt library, it is directly
@@ -1417,106 +1417,106 @@ void TQWidgetFactory::addWidgetFactory( TQWidgetFactory *factory )
\endlist
*/
-TQWidget *TQWidgetFactory::createWidget( const TQString &className, TQWidget *tqparent,
+TQWidget *TQWidgetFactory::createWidget( const TQString &className, TQWidget *parent,
const char *name ) const
{
// create widgets we know
if ( className == "TQPushButton" ) {
- return new TQPushButton( tqparent, name );
+ return new TQPushButton( parent, name );
} else if ( className == "TQToolButton" ) {
- return new TQToolButton( tqparent, name );
+ return new TQToolButton( parent, name );
} else if ( className == "TQCheckBox" ) {
- return new TQCheckBox( tqparent, name );
+ return new TQCheckBox( parent, name );
} else if ( className == "TQRadioButton" ) {
- return new TQRadioButton( tqparent, name );
+ return new TQRadioButton( parent, name );
} else if ( className == "TQGroupBox" ) {
- return new TQGroupBox( tqparent, name );
+ return new TQGroupBox( parent, name );
} else if ( className == "TQButtonGroup" ) {
- return new TQButtonGroup( tqparent, name );
+ return new TQButtonGroup( parent, name );
} else if ( className == "TQIconView" ) {
#if !defined(TQT_NO_ICONVIEW)
- return new TQIconView( tqparent, name );
+ return new TQIconView( parent, name );
#endif
} else if ( className == "TQTable" ) {
#if !defined(TQT_NO_TABLE)
- return new TQTable( tqparent, name );
+ return new TQTable( parent, name );
#endif
} else if ( className == "TQListBox" ) {
- return new TQListBox( tqparent, name );
+ return new TQListBox( parent, name );
} else if ( className == "TQListView" ) {
- return new TQListView( tqparent, name );
+ return new TQListView( parent, name );
} else if ( className == "TQLineEdit" ) {
- return new TQLineEdit( tqparent, name );
+ return new TQLineEdit( parent, name );
} else if ( className == "TQSpinBox" ) {
- return new TQSpinBox( tqparent, name );
+ return new TQSpinBox( parent, name );
} else if ( className == "TQMultiLineEdit" ) {
- return new TQMultiLineEdit( tqparent, name );
+ return new TQMultiLineEdit( parent, name );
} else if ( className == "TQLabel" || className == "TextLabel" || className == "PixmapLabel" ) {
- return new TQLabel( tqparent, name );
+ return new TQLabel( parent, name );
} else if ( className == "TQLayoutWidget" ) {
- return new TQWidget( tqparent, name );
+ return new TQWidget( parent, name );
} else if ( className == "TQTabWidget" ) {
- return new TQTabWidget( tqparent, name );
+ return new TQTabWidget( parent, name );
} else if ( className == "TQComboBox" ) {
- return new TQComboBox( FALSE, tqparent, name );
+ return new TQComboBox( FALSE, parent, name );
} else if ( className == "TQWidget" ) {
if ( !qwf_stays_on_top )
- return new TQWidget( tqparent, name );
- return new TQWidget( tqparent, name, TQt::WStyle_StaysOnTop );
+ return new TQWidget( parent, name );
+ return new TQWidget( parent, name, TQt::WStyle_StaysOnTop );
} else if ( className == "TQDialog" ) {
if ( !qwf_stays_on_top )
- return new TQDialog( tqparent, name );
- return new TQDialog( tqparent, name, FALSE, (WFlags)TQt::WStyle_StaysOnTop );
+ return new TQDialog( parent, name );
+ return new TQDialog( parent, name, FALSE, (WFlags)TQt::WStyle_StaysOnTop );
} else if ( className == "TQWizard" ) {
- return new TQWizard( tqparent, name );
+ return new TQWizard( parent, name );
} else if ( className == "TQLCDNumber" ) {
- return new TQLCDNumber( tqparent, name );
+ return new TQLCDNumber( parent, name );
} else if ( className == "TQProgressBar" ) {
- return new TQProgressBar( tqparent, name );
+ return new TQProgressBar( parent, name );
} else if ( className == "TQTextView" ) {
- return new TQTextView( tqparent, name );
+ return new TQTextView( parent, name );
} else if ( className == "TQTextBrowser" ) {
- return new TQTextBrowser( tqparent, name );
+ return new TQTextBrowser( parent, name );
} else if ( className == "TQDial" ) {
- return new TQDial( tqparent, name );
+ return new TQDial( parent, name );
} else if ( className == "TQSlider" ) {
- return new TQSlider( tqparent, name );
+ return new TQSlider( parent, name );
} else if ( className == "TQFrame" ) {
- return new TQFrame( tqparent, name );
+ return new TQFrame( parent, name );
} else if ( className == "TQSplitter" ) {
- return new TQSplitter( tqparent, name );
+ return new TQSplitter( parent, name );
} else if ( className == "Line" ) {
- TQFrame *f = new TQFrame( tqparent, name );
+ TQFrame *f = new TQFrame( parent, name );
f->setFrameStyle( TQFrame::HLine | TQFrame::Sunken );
return f;
} else if ( className == "TQTextEdit" ) {
- return new TQTextEdit( tqparent, name );
+ return new TQTextEdit( parent, name );
} else if ( className == "TQDateEdit" ) {
- return new TQDateEdit( tqparent, name );
+ return new TQDateEdit( parent, name );
} else if ( className == "TQTimeEdit" ) {
- return new TQTimeEdit( tqparent, name );
+ return new TQTimeEdit( parent, name );
} else if ( className == "TQDateTimeEdit" ) {
- return new TQDateTimeEdit( tqparent, name );
+ return new TQDateTimeEdit( parent, name );
} else if ( className == "TQScrollBar" ) {
- return new TQScrollBar( tqparent, name );
+ return new TQScrollBar( parent, name );
} else if ( className == "TQPopupMenu" ) {
- return new TQPopupMenu( tqparent, name );
+ return new TQPopupMenu( parent, name );
} else if ( className == "TQWidgetStack" ) {
- return new TQWidgetStack( tqparent, name );
+ return new TQWidgetStack( parent, name );
} else if ( className == "TQToolBox" ) {
- return new TQToolBox( tqparent, name );
+ return new TQToolBox( parent, name );
} else if ( className == "TQVBox" ) {
- return new TQVBox( tqparent, name );
+ return new TQVBox( parent, name );
} else if ( className == "TQHBox" ) {
- return new TQHBox( tqparent, name );
+ return new TQHBox( parent, name );
} else if ( className == "TQGrid" ) {
- return new TQGrid( 4, tqparent, name );
+ return new TQGrid( 4, parent, name );
} else if ( className == "TQMainWindow" ) {
TQMainWindow *mw = 0;
if ( !qwf_stays_on_top )
- mw = new TQMainWindow( tqparent, name );
+ mw = new TQMainWindow( parent, name );
else
- mw = new TQMainWindow( tqparent, name, (WFlags)(TQt::WType_TopLevel | TQt::WStyle_StaysOnTop) );
+ mw = new TQMainWindow( parent, name, (WFlags)(TQt::WType_TopLevel | TQt::WStyle_StaysOnTop) );
mw->setCentralWidget( new TQWidget( mw, "qt_central_widget" ) );
mw->centralWidget()->show();
(void)mw->statusBar();
@@ -1525,11 +1525,11 @@ TQWidget *TQWidgetFactory::createWidget( const TQString &className, TQWidget *tq
}
#if !defined(TQT_NO_SQL)
else if ( className == "TQDataTable" ) {
- return new TQDataTable( tqparent, name );
+ return new TQDataTable( parent, name );
} else if ( className == "TQDataBrowser" ) {
- return new TQDesignerDataBrowser2( tqparent, name );
+ return new TQDesignerDataBrowser2( parent, name );
} else if ( className == "TQDataView" ) {
- return new TQDesignerDataView2( tqparent, name );
+ return new TQDesignerDataView2( parent, name );
}
#endif
@@ -1543,7 +1543,7 @@ TQWidget *TQWidgetFactory::createWidget( const TQString &className, TQWidget *tq
TQInterfacePtr<WidgetInterface> iface = 0;
widgetInterfaceManager->queryInterface( className, &iface );
if ( iface ) {
- TQWidget *w = iface->create( className, tqparent, name );
+ TQWidget *w = iface->create( className, parent, name );
if ( w ) {
d->customWidgets.replace( className.latin1(), new bool(TRUE) );
return w;
@@ -1552,7 +1552,7 @@ TQWidget *TQWidgetFactory::createWidget( const TQString &className, TQWidget *tq
// hope we have a factory which can do it
for ( TQWidgetFactory* f = widgetFactories.first(); f; f = widgetFactories.next() ) {
- TQWidget *w = f->createWidget( className, tqparent, name );
+ TQWidget *w = f->createWidget( className, parent, name );
if ( w )
return w;
}
@@ -1578,7 +1578,7 @@ bool TQWidgetFactory::supportsWidget( const TQString &widget )
return ( availableWidgetMap->find( widget ) != availableWidgetMap->end() );
}
-TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget *tqparent,
+TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget *parent,
TQLayout* tqlayout, const TQString &classNameArg )
{
d->lastItem = 0;
@@ -1606,9 +1606,9 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget
}
if ( tqlayout && className == "TQLayoutWidget" ) {
// hide tqlayout widgets
- w = tqparent;
+ w = parent;
} else {
- obj = TQT_TQOBJECT(TQWidgetFactory::createWidget( className, tqparent, 0 ));
+ obj = TQT_TQOBJECT(TQWidgetFactory::createWidget( className, parent, 0 ));
if ( !obj )
return 0;
w = (TQWidget*)obj;
@@ -1637,8 +1637,8 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget
}
}
#ifdef TQT_CONTAINER_CUSTOM_WIDGETS
- TQString parentClassName = tqparent ? tqparent->className() : 0;
- bool isPlugin = tqparent ? !!d->customWidgets.find( tqparent->className() ) : FALSE;
+ TQString parentClassName = parent ? parent->className() : 0;
+ bool isPlugin = parent ? !!d->customWidgets.find( parent->className() ) : FALSE;
if ( isPlugin )
qWarning( "####### loading custom container widgets without page support not implemented!" );
// ### TODO loading for custom container widgets without pages
@@ -1693,19 +1693,19 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget
} else if ( n.tagName() == "attribute" && w ) {
TQString attrib = n.attribute( "name" );
TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() );
- if ( tqparent ) {
- if ( tqparent->inherits( "TQTabWidget" ) ) {
+ if ( parent ) {
+ if ( parent->inherits( "TQTabWidget" ) ) {
if ( attrib == "title" )
- ( (TQTabWidget*)tqparent )->insertTab( w, translate( v.toString() ) );
- } else if ( tqparent->inherits( "TQWidgetStack" ) ) {
+ ( (TQTabWidget*)parent )->insertTab( w, translate( v.toString() ) );
+ } else if ( parent->inherits( "TQWidgetStack" ) ) {
if ( attrib == "id" )
- ( (TQWidgetStack*)tqparent )->addWidget( w, v.toInt() );
- } else if ( tqparent->inherits( "TQToolBox" ) ) {
+ ( (TQWidgetStack*)parent )->addWidget( w, v.toInt() );
+ } else if ( parent->inherits( "TQToolBox" ) ) {
if ( attrib == "label" )
- ( (TQToolBox*)tqparent )->addItem( w, v.toString() );
- } else if ( tqparent->inherits( "TQWizard" ) ) {
+ ( (TQToolBox*)parent )->addItem( w, v.toString() );
+ } else if ( parent->inherits( "TQWizard" ) ) {
if ( attrib == "title" )
- ( (TQWizard*)tqparent )->addPage( w, translate( v.toString() ) );
+ ( (TQWizard*)parent )->addPage( w, translate( v.toString() ) );
#ifdef TQT_CONTAINER_CUSTOM_WIDGETS
} else if ( isPlugin ) {
if ( attrib == "label" ) {
@@ -1717,7 +1717,7 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget
(TQUnknownInterface**)&iface2 );
if ( iface2 ) {
iface2->insertPage( parentClassName,
- (TQWidget*)tqparent, translate( v.toString() ), -1, w );
+ (TQWidget*)parent, translate( v.toString() ), -1, w );
iface2->release();
}
iface->release();
@@ -1861,8 +1861,8 @@ 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" ) && obj->tqparent()->inherits( "TQButtonGroup" ) )
- ( (TQButtonGroup*)obj->tqparent() )->insert( (TQButton*)obj, value.toInt() );
+ 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" )
&& !obj->inherits( "TQDataBrowser" ) ) {
@@ -2416,13 +2416,13 @@ void TQWidgetFactory::createItem( const TQDomElement &e, TQWidget *widget, TQLis
-void TQWidgetFactory::loadChildAction( TQObject *tqparent, const TQDomElement &e )
+void TQWidgetFactory::loadChildAction( TQObject *parent, const TQDomElement &e )
{
TQDomElement n = e;
TQAction *a = 0;
bool hasMenuText = FALSE;
if ( n.tagName() == "action" ) {
- a = new TQAction( tqparent );
+ a = new TQAction( parent );
TQDomElement n2 = n.firstChild().toElement();
while ( !n2.isNull() ) {
@@ -2434,10 +2434,10 @@ void TQWidgetFactory::loadChildAction( TQObject *tqparent, const TQDomElement &e
}
n2 = n2.nextSibling().toElement();
}
- if ( !tqparent->inherits( "TQAction" ) )
+ if ( !parent->inherits( "TQAction" ) )
actionList.append( a );
} else if ( n.tagName() == "actiongroup" ) {
- a = new TQActionGroup( tqparent );
+ a = new TQActionGroup( parent );
TQDomElement n2 = n.firstChild().toElement();
while ( !n2.isNull() ) {
if ( n2.tagName() == "property" ) {
@@ -2452,7 +2452,7 @@ void TQWidgetFactory::loadChildAction( TQObject *tqparent, const TQDomElement &e
}
n2 = n2.nextSibling().toElement();
}
- if ( !tqparent->inherits( "TQAction" ) )
+ if ( !parent->inherits( "TQAction" ) )
actionList.append( a );
}
diff --git a/tqtinterface/qt4/tools/designer/uilib/tqwidgetfactory.h b/tqtinterface/qt4/tools/designer/uilib/tqwidgetfactory.h
index 0ce05e9..bc4bd7c 100644
--- a/tqtinterface/qt4/tools/designer/uilib/tqwidgetfactory.h
+++ b/tqtinterface/qt4/tools/designer/uilib/tqwidgetfactory.h
@@ -61,13 +61,13 @@ public:
TQWidgetFactory();
virtual ~TQWidgetFactory();
- static TQWidget *create( const TQString &uiFile, TQObject *connector = 0, TQWidget *tqparent = 0, const char *name = 0 );
- static TQWidget *create( TQIODevice *dev, TQObject *connector = 0, TQWidget *tqparent = 0, const char *name = 0 );
- inline static TQWidget *create( TQFile *dev, TQObject *connector = 0, TQWidget *tqparent = 0, const char *name = 0 ) { return create(TQT_TQIODEVICE(dev), connector, tqparent, name); }
+ static TQWidget *create( const TQString &uiFile, TQObject *connector = 0, TQWidget *parent = 0, const char *name = 0 );
+ static TQWidget *create( TQIODevice *dev, TQObject *connector = 0, TQWidget *parent = 0, const char *name = 0 );
+ inline static TQWidget *create( TQFile *dev, TQObject *connector = 0, TQWidget *parent = 0, const char *name = 0 ) { return create(TQT_TQIODEVICE(dev), connector, parent, name); }
static void addWidgetFactory( TQWidgetFactory *factory );
static void loadImages( const TQString &dir );
- virtual TQWidget *createWidget( const TQString &className, TQWidget *tqparent, const char *name ) const;
+ virtual TQWidget *createWidget( const TQString &className, TQWidget *parent, const char *name ) const;
static TQStringList widgets();
static bool supportsWidget( const TQString &widget );
@@ -76,7 +76,7 @@ private:
void loadImageCollection( const TQDomElement &e );
void loadConnections( const TQDomElement &e, TQObject *connector );
void loadTabOrder( const TQDomElement &e );
- TQWidget *createWidgetInternal( const TQDomElement &e, TQWidget *tqparent, TQLayout* tqlayout, const TQString &classNameArg );
+ TQWidget *createWidgetInternal( const TQDomElement &e, TQWidget *parent, TQLayout* tqlayout, const TQString &classNameArg );
TQLayout *createLayout( TQWidget *widget, TQLayout* tqlayout, LayoutType type, bool isTQLayoutWidget = FALSE );
LayoutType layoutType( TQLayout *l ) const;
void setProperty( TQObject* widget, const TQString &prop, TQVariant value );
@@ -97,7 +97,7 @@ private:
void createColumn( const TQDomElement &e, TQWidget *widget );
void loadItem( const TQDomElement &e, TQPixmap &pix, TQString &txt, bool &hasPixmap );
void createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i = 0 );
- void loadChildAction( TQObject *tqparent, const TQDomElement &e );
+ void loadChildAction( TQObject *parent, const TQDomElement &e );
void loadActions( const TQDomElement &e );
void loadToolBars( const TQDomElement &e );
void loadMenuBar( const TQDomElement &e );
@@ -120,21 +120,21 @@ private:
void unpackVariant( const UibStrTable& strings, TQDataStream& in,
TQVariant& value );
void inputSpacer( const UibStrTable& strings, TQDataStream& in,
- TQLayout *tqparent );
+ TQLayout *parent );
void inputColumnOrRow( const UibStrTable& strings, TQDataStream& in,
- TQObject *tqparent, bool isRow );
+ TQObject *parent, bool isRow );
void inputItem( const UibStrTable& strings, TQDataStream& in,
- TQObject *tqparent, TQListViewItem *parentItem = 0 );
+ TQObject *parent, TQListViewItem *parentItem = 0 );
void inputMenuItem( TQObject **objects, const UibStrTable& strings,
TQDataStream& in, TQMenuBar *menuBar );
TQObject *inputObject( TQObject **objects, int& numObjects,
const UibStrTable& strings, TQDataStream& in,
- TQWidget *ancestorWidget, TQObject *tqparent,
+ TQWidget *ancestorWidget, TQObject *parent,
TQCString className = "" );
TQWidget *createFromUiFile( TQDomDocument doc, TQObject *connector,
- TQWidget *tqparent, const char *name );
+ TQWidget *parent, const char *name );
TQWidget *createFromUibFile( TQDataStream& in, TQObject *connector,
- TQWidget *tqparent, const char *name );
+ TQWidget *parent, const char *name );
private:
struct Image {