summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/uilib
diff options
context:
space:
mode:
Diffstat (limited to 'kdevdesigner/uilib')
-rw-r--r--kdevdesigner/uilib/database.cpp14
-rw-r--r--kdevdesigner/uilib/database2.h6
-rw-r--r--kdevdesigner/uilib/qwidgetfactory.cpp250
-rw-r--r--kdevdesigner/uilib/qwidgetfactory.h22
4 files changed, 146 insertions, 146 deletions
diff --git a/kdevdesigner/uilib/database.cpp b/kdevdesigner/uilib/database.cpp
index 89e17a6b..2b1956a9 100644
--- a/kdevdesigner/uilib/database.cpp
+++ b/kdevdesigner/uilib/database.cpp
@@ -46,7 +46,7 @@ DatabaseSupport::DatabaseSupport()
{
con = 0;
frm = 0;
- tqparent = 0;
+ parent = 0;
}
void DatabaseSupport::initPreview( const TQString &connection, const TQString &table, TQObject *o,
@@ -54,7 +54,7 @@ void DatabaseSupport::initPreview( const TQString &connection, const TQString &t
{
tbl = table;
dbControls = databaseControls;
- tqparent = o;
+ parent = o;
if ( connection != "(default)" )
con = TQSqlDatabase::database( connection );
@@ -62,15 +62,15 @@ void DatabaseSupport::initPreview( const TQString &connection, const TQString &t
con = TQSqlDatabase::database();
frm = new TQSqlForm( o, table.ascii() );
for ( TQMap<TQString, TQString>::Iterator it = dbControls.begin(); it != dbControls.end(); ++it ) {
- TQObject *chld = tqparent->child( it.key().ascii(), TQWIDGET_OBJECT_NAME_STRING );
+ TQObject *chld = parent->child( it.key().ascii(), TQWIDGET_OBJECT_NAME_STRING );
if ( !chld )
continue;
frm->insert( (TQWidget*)chld, *it );
}
}
-TQDesignerDataBrowser::TQDesignerDataBrowser( TQWidget *tqparent, const char *name )
- : TQDataBrowser( tqparent, name )
+TQDesignerDataBrowser::TQDesignerDataBrowser( TQWidget *parent, const char *name )
+ : TQDataBrowser( parent, name )
{
}
@@ -96,8 +96,8 @@ bool TQDesignerDataBrowser::event( TQEvent* e )
return b;
}
-TQDesignerDataView::TQDesignerDataView( TQWidget *tqparent, const char *name )
- : TQDataView( tqparent, name )
+TQDesignerDataView::TQDesignerDataView( TQWidget *parent, const char *name )
+ : TQDataView( parent, name )
{
}
diff --git a/kdevdesigner/uilib/database2.h b/kdevdesigner/uilib/database2.h
index c8881736..c0de2b3d 100644
--- a/kdevdesigner/uilib/database2.h
+++ b/kdevdesigner/uilib/database2.h
@@ -52,7 +52,7 @@ protected:
TQSqlForm* frm;
TQString tbl;
TQMap<TQString, TQString> dbControls;
- TQObject *tqparent;
+ TQObject *parent;
};
@@ -62,7 +62,7 @@ class QDesignerDataBrowser2 : public TQDataBrowser, public DatabaseSupport2
TQ_OBJECT
public:
- QDesignerDataBrowser2( TQWidget *tqparent, const char *name );
+ QDesignerDataBrowser2( TQWidget *parent, const char *name );
protected:
bool event( TQEvent* e );
@@ -74,7 +74,7 @@ class QDesignerDataView2 : public TQDataView, public DatabaseSupport2
TQ_OBJECT
public:
- QDesignerDataView2( TQWidget *tqparent, const char *name );
+ QDesignerDataView2( TQWidget *parent, const char *name );
protected:
bool event( TQEvent* e );
diff --git a/kdevdesigner/uilib/qwidgetfactory.cpp b/kdevdesigner/uilib/qwidgetfactory.cpp
index 842f8a92..c61584a7 100644
--- a/kdevdesigner/uilib/qwidgetfactory.cpp
+++ b/kdevdesigner/uilib/qwidgetfactory.cpp
@@ -260,7 +260,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
@@ -278,7 +278,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 );
@@ -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, tqparent, name );
+ TQWidget *w = TQWidgetFactory::create( TQT_TQIODEVICE(&f), connector, parent, name );
if ( !qwf_forms )
qwf_forms = new TQMap<TQWidget*, TQString>;
qwf_forms->insert( w, uiFile );
@@ -308,7 +308,7 @@ TQWidget *TQWidgetFactory::create( const TQString &uiFile, TQObject *connector,
Loads the user interface description from device \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;
@@ -326,12 +326,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 );
}
@@ -405,7 +405,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 );
@@ -466,7 +466,7 @@ TQWidget *TQWidgetFactory::createFromUiFile( TQDomDocument doc, TQObject *connec
if ( !imageCollection.isNull() )
loadImageCollection( imageCollection );
- createWidgetInternal( widget, tqparent, 0, widget.attribute("class", TQWIDGET_OBJECT_NAME_STRING) );
+ createWidgetInternal( widget, parent, 0, widget.attribute("class", TQWIDGET_OBJECT_NAME_STRING) );
TQWidget *w = toplevel;
if ( !w )
return 0;
@@ -652,7 +652,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;
@@ -695,7 +695,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 );
@@ -703,18 +703,18 @@ void TQWidgetFactory::inputSpacer( const UibStrTable& strings, TQDataStream& in,
spacer = new TQSpacerItem( w, h, sizeType, TQSizePolicy::Minimum );
}
- if ( tqparent->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) {
- ((TQGridLayout *) tqparent)->addMultiCell( spacer, row,
+ if ( parent->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) {
+ ((TQGridLayout *) parent)->addMultiCell( spacer, row,
row + rowspan - 1, column, column + colspan - 1,
vertical ? TQt::AlignHCenter : TQt::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;
@@ -762,13 +762,13 @@ void TQWidgetFactory::inputColumnOrRow( const UibStrTable& strings,
in >> objectTag;
}
- if ( tqparent != 0 ) {
- if ( tqparent->inherits(TQLISTVIEW_OBJECT_NAME_STRING) ) {
- createListViewColumn( (TQListView *) tqparent, text, pixmap, clickable,
+ if ( parent != 0 ) {
+ if ( parent->inherits(TQLISTVIEW_OBJECT_NAME_STRING) ) {
+ createListViewColumn( (TQListView *) parent, text, pixmap, clickable,
resizable );
#ifndef TQT_NO_TABLE
- } else if ( tqparent->inherits(TQTABLE_OBJECT_NAME_STRING) ) {
- createTableColumnOrRow( (TQTable *) tqparent, text, pixmap, field,
+ } else if ( parent->inherits(TQTABLE_OBJECT_NAME_STRING) ) {
+ createTableColumnOrRow( (TQTable *) parent, text, pixmap, field,
isRow );
#endif
}
@@ -776,7 +776,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;
@@ -786,8 +786,8 @@ void TQWidgetFactory::inputItem( const UibStrTable& strings, TQDataStream& in,
TQ_UINT8 objectTag;
TQListView *listView = 0;
- if ( tqparent != 0 && tqparent->inherits(TQLISTVIEW_OBJECT_NAME_STRING) )
- tqparent = TQT_TQOBJECT((TQListView *) tqparent);
+ if ( parent != 0 && parent->inherits(TQLISTVIEW_OBJECT_NAME_STRING) )
+ parent = TQT_TQOBJECT((TQListView *) parent);
TQListViewItem *item = 0;
if ( listView != 0 ) {
if ( parentItem == 0 ) {
@@ -804,7 +804,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 );
@@ -847,12 +847,12 @@ void TQWidgetFactory::inputItem( const UibStrTable& strings, TQDataStream& in,
TQString text = texts.last();
TQPixmap pixmap = pixmaps.last();
- if ( tqparent != 0 ) {
- if ( tqparent->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) ||
- tqparent->inherits(TQLISTBOX_OBJECT_NAME_STRING) ) {
- TQListBox *listBox = (TQListBox *) tqparent->qt_cast( TQLISTBOX_OBJECT_NAME_STRING );
+ if ( parent != 0 ) {
+ if ( parent->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) ||
+ parent->inherits(TQLISTBOX_OBJECT_NAME_STRING) ) {
+ TQListBox *listBox = (TQListBox *) parent->qt_cast( TQLISTBOX_OBJECT_NAME_STRING );
if ( listBox == 0 )
- listBox = ((TQComboBox *) tqparent)->listBox();
+ listBox = ((TQComboBox *) parent)->listBox();
if ( pixmap.isNull() ) {
(void) new TQListBoxText( listBox, text );
@@ -860,8 +860,8 @@ void TQWidgetFactory::inputItem( const UibStrTable& strings, TQDataStream& in,
(void) new TQListBoxPixmap( listBox, pixmap, text );
}
#ifndef TQT_NO_ICONVIEW
- } else if ( tqparent->inherits(TQICONVIEW_OBJECT_NAME_STRING) ) {
- (void) new TQIconViewItem( (TQIconView *) tqparent, text, pixmap );
+ } else if ( parent->inherits(TQICONVIEW_OBJECT_NAME_STRING) ) {
+ (void) new TQIconViewItem( (TQIconView *) parent, text, pixmap );
#endif
}
}
@@ -903,7 +903,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;
@@ -913,15 +913,15 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
bool isTQObject = !className.isEmpty();
if ( isTQObject ) {
- if ( tqparent != 0 ) {
- if ( tqparent->isWidgetType() ) {
- if ( tqparent->inherits(TQMAINWINDOW_OBJECT_NAME_STRING) ) {
- parentWidget = ((TQMainWindow *) tqparent)->centralWidget();
+ if ( parent != 0 ) {
+ if ( parent->isWidgetType() ) {
+ if ( parent->inherits(TQMAINWINDOW_OBJECT_NAME_STRING) ) {
+ parentWidget = ((TQMainWindow *) parent)->centralWidget();
} else {
- parentWidget = (TQWidget *) tqparent;
+ parentWidget = (TQWidget *) parent;
}
- } else if ( tqparent->inherits(TQLAYOUT_OBJECT_NAME_STRING) ) {
- parentLayout = (TQLayout *) tqparent;
+ } else if ( parent->inherits(TQLAYOUT_OBJECT_NAME_STRING) ) {
+ parentLayout = (TQLayout *) parent;
parentWidget = ancestorWidget;
}
}
@@ -929,9 +929,9 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
if ( className == TQACTION_OBJECT_NAME_STRING ) {
unpackCString( strings, in, className );
if ( className == TQACTIONGROUP_OBJECT_NAME_STRING ) {
- obj = new TQActionGroup( tqparent );
+ obj = new TQActionGroup( parent );
} else {
- obj = new TQAction( tqparent );
+ obj = new TQAction( parent );
}
} else if ( className == TQLAYOUT_OBJECT_NAME_STRING ) {
unpackCString( strings, in, className );
@@ -949,13 +949,13 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
obj = TQT_TQOBJECT(tqlayout);
} else if ( className == TQMENUBAR_OBJECT_NAME_STRING ) {
unpackCString( strings, in, className );
- widget = ((TQMainWindow *) tqparent)->menuBar();
+ widget = ((TQMainWindow *) parent)->menuBar();
obj = TQT_TQOBJECT(widget);
} else if ( className == TQTOOLBAR_OBJECT_NAME_STRING ) {
TQ_UINT8 dock;
in >> dock;
unpackCString( strings, in, className );
- widget = new TQToolBar( TQString(), (TQMainWindow *) tqparent,
+ widget = new TQToolBar( TQString(), (TQMainWindow *) parent,
(TQt::Dock) dock );
obj = TQT_TQOBJECT(widget);
} else if ( className == TQWIDGET_OBJECT_NAME_STRING ) {
@@ -1099,7 +1099,7 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
break;
case Object_SubAction:
inputObject( objects, numObjects, strings, in, parentWidget,
- obj != 0 ? obj : tqparent, TQACTION_OBJECT_NAME_STRING );
+ obj != 0 ? obj : parent, TQACTION_OBJECT_NAME_STRING );
break;
case Object_SubLayout:
inputObject( objects, numObjects, strings, in, parentWidget, obj,
@@ -1117,11 +1117,11 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
if ( metAttribute > 0 ) {
if ( name == "title" ) {
- if ( tqparent != 0 ) {
- if ( tqparent->inherits(TQTABWIDGET_OBJECT_NAME_STRING) ) {
- ((TQTabWidget *) tqparent)->insertTab( widget, str );
- } else if ( tqparent->inherits(TQWIZARD_OBJECT_NAME_STRING) ) {
- ((TQWizard *) tqparent)->addPage( widget, str );
+ if ( parent != 0 ) {
+ if ( parent->inherits(TQTABWIDGET_OBJECT_NAME_STRING) ) {
+ ((TQTabWidget *) parent)->insertTab( widget, str );
+ } else if ( parent->inherits(TQWIZARD_OBJECT_NAME_STRING) ) {
+ ((TQWizard *) parent)->addPage( widget, str );
}
}
}
@@ -1136,8 +1136,8 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
if ( metAttribute > 0 ) {
if ( name == "id" ) {
- if ( tqparent != 0 && tqparent->inherits(TQWIDGETSTACK_OBJECT_NAME_STRING) )
- ((TQWidgetStack *) tqparent)->addWidget( widget, value.toInt() );
+ if ( parent != 0 && parent->inherits(TQWIDGETSTACK_OBJECT_NAME_STRING) )
+ ((TQWidgetStack *) parent)->addWidget( widget, value.toInt() );
}
} else {
if ( obj != 0 )
@@ -1172,7 +1172,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 )
@@ -1344,7 +1344,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_OBJECT_NAME_STRING );
if ( toplevel != 0 )
toplevel->setName( name );
@@ -1370,7 +1370,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
@@ -1406,106 +1406,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_OBJECT_NAME_STRING ) {
- return new TQPushButton( tqparent, name );
+ return new TQPushButton( parent, name );
} else if ( className == TQTOOLBUTTON_OBJECT_NAME_STRING ) {
- return new TQToolButton( tqparent, name );
+ return new TQToolButton( parent, name );
} else if ( className == TQCHECKBOX_OBJECT_NAME_STRING ) {
- return new TQCheckBox( tqparent, name );
+ return new TQCheckBox( parent, name );
} else if ( className == TQRADIOBUTTON_OBJECT_NAME_STRING ) {
- return new TQRadioButton( tqparent, name );
+ return new TQRadioButton( parent, name );
} else if ( className == TQGROUPBOX_OBJECT_NAME_STRING ) {
- return new TQGroupBox( tqparent, name );
+ return new TQGroupBox( parent, name );
} else if ( className == TQBUTTONGROUP_OBJECT_NAME_STRING ) {
- return new TQButtonGroup( tqparent, name );
+ return new TQButtonGroup( parent, name );
} else if ( className == TQICONVIEW_OBJECT_NAME_STRING ) {
#if !defined(TQT_NO_ICONVIEW)
- return new TQIconView( tqparent, name );
+ return new TQIconView( parent, name );
#endif
} else if ( className == TQTABLE_OBJECT_NAME_STRING ) {
#if !defined(TQT_NO_TABLE)
- return new TQTable( tqparent, name );
+ return new TQTable( parent, name );
#endif
} else if ( className == TQLISTBOX_OBJECT_NAME_STRING ) {
- return new TQListBox( tqparent, name );
+ return new TQListBox( parent, name );
} else if ( className == TQLISTVIEW_OBJECT_NAME_STRING ) {
- return new TQListView( tqparent, name );
+ return new TQListView( parent, name );
} else if ( className == TQLINEEDIT_OBJECT_NAME_STRING ) {
- return new TQLineEdit( tqparent, name );
+ return new TQLineEdit( parent, name );
} else if ( className == TQSPINBOX_OBJECT_NAME_STRING ) {
- return new TQSpinBox( tqparent, name );
+ return new TQSpinBox( parent, name );
} else if ( className == TQMULTILINEEDIT_OBJECT_NAME_STRING ) {
- return new TQMultiLineEdit( tqparent, name );
+ return new TQMultiLineEdit( parent, name );
} else if ( className == TQLABEL_OBJECT_NAME_STRING || className == "TextLabel" || className == "PixmapLabel" ) {
- return new TQLabel( tqparent, name );
+ return new TQLabel( parent, name );
} else if ( className == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) {
- return new TQWidget( tqparent, name );
+ return new TQWidget( parent, name );
} else if ( className == TQTABWIDGET_OBJECT_NAME_STRING ) {
- return new TQTabWidget( tqparent, name );
+ return new TQTabWidget( parent, name );
} else if ( className == TQCOMBOBOX_OBJECT_NAME_STRING ) {
- return new TQComboBox( FALSE, tqparent, name );
+ return new TQComboBox( FALSE, parent, name );
} else if ( className == TQWIDGET_OBJECT_NAME_STRING ) {
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_OBJECT_NAME_STRING ) {
if ( !qwf_stays_on_top )
- return new TQDialog( tqparent, name );
- return new TQDialog( tqparent, name, FALSE, TQt::WStyle_StaysOnTop );
+ return new TQDialog( parent, name );
+ return new TQDialog( parent, name, FALSE, TQt::WStyle_StaysOnTop );
} else if ( className == TQWIZARD_OBJECT_NAME_STRING ) {
- return new TQWizard( tqparent, name );
+ return new TQWizard( parent, name );
} else if ( className == TQLCDNUMBER_OBJECT_NAME_STRING ) {
- return new TQLCDNumber( tqparent, name );
+ return new TQLCDNumber( parent, name );
} else if ( className == TQPROGRESSBAR_OBJECT_NAME_STRING ) {
- return new TQProgressBar( tqparent, name );
+ return new TQProgressBar( parent, name );
} else if ( className == TQTEXTVIEW_OBJECT_NAME_STRING ) {
- return new TQTextView( tqparent, name );
+ return new TQTextView( parent, name );
} else if ( className == TQTEXTBROWSER_OBJECT_NAME_STRING ) {
- return new TQTextBrowser( tqparent, name );
+ return new TQTextBrowser( parent, name );
} else if ( className == TQDIAL_OBJECT_NAME_STRING ) {
- return new TQDial( tqparent, name );
+ return new TQDial( parent, name );
} else if ( className == TQSLIDER_OBJECT_NAME_STRING ) {
- return new TQSlider( tqparent, name );
+ return new TQSlider( parent, name );
} else if ( className == TQFRAME_OBJECT_NAME_STRING ) {
- return new TQFrame( tqparent, name );
+ return new TQFrame( parent, name );
} else if ( className == TQSPLITTER_OBJECT_NAME_STRING ) {
- 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_OBJECT_NAME_STRING ) {
- return new TQTextEdit( tqparent, name );
+ return new TQTextEdit( parent, name );
} else if ( className == TQDATEEDIT_OBJECT_NAME_STRING ) {
- return new TQDateEdit( tqparent, name );
+ return new TQDateEdit( parent, name );
} else if ( className == TQTIMEEDIT_OBJECT_NAME_STRING ) {
- return new TQTimeEdit( tqparent, name );
+ return new TQTimeEdit( parent, name );
} else if ( className == TQDATETIMEEDIT_OBJECT_NAME_STRING ) {
- return new TQDateTimeEdit( tqparent, name );
+ return new TQDateTimeEdit( parent, name );
} else if ( className == TQSCROLLBAR_OBJECT_NAME_STRING ) {
- return new TQScrollBar( tqparent, name );
+ return new TQScrollBar( parent, name );
} else if ( className == TQPOPUPMENU_OBJECT_NAME_STRING ) {
- return new TQPopupMenu( tqparent, name );
+ return new TQPopupMenu( parent, name );
} else if ( className == TQWIDGETSTACK_OBJECT_NAME_STRING ) {
- return new TQWidgetStack( tqparent, name );
+ return new TQWidgetStack( parent, name );
} else if ( className == TQTOOLBOX_OBJECT_NAME_STRING ) {
- return new TQToolBox( tqparent, name );
+ return new TQToolBox( parent, name );
} else if ( className == TQVBOX_OBJECT_NAME_STRING ) {
- return new TQVBox( tqparent, name );
+ return new TQVBox( parent, name );
} else if ( className == TQHBOX_OBJECT_NAME_STRING ) {
- return new TQHBox( tqparent, name );
+ return new TQHBox( parent, name );
} else if ( className == TQGRID_OBJECT_NAME_STRING ) {
- return new TQGrid( 4, tqparent, name );
+ return new TQGrid( 4, parent, name );
} else if ( className == TQMAINWINDOW_OBJECT_NAME_STRING ) {
TQMainWindow *mw = 0;
if ( !qwf_stays_on_top )
- mw = new TQMainWindow( tqparent, name );
+ mw = new TQMainWindow( parent, name );
else
- mw = new TQMainWindow( tqparent, name, TQt::WType_TopLevel | TQt::WStyle_StaysOnTop );
+ mw = new TQMainWindow( parent, name, TQt::WType_TopLevel | TQt::WStyle_StaysOnTop );
mw->setCentralWidget( new TQWidget( mw, "qt_central_widget" ) );
mw->centralWidget()->show();
(void)mw->statusBar();
@@ -1514,11 +1514,11 @@ TQWidget *TQWidgetFactory::createWidget( const TQString &className, TQWidget *tq
}
#if !defined(TQT_NO_SQL)
else if ( className == TQDATATABLE_OBJECT_NAME_STRING ) {
- return new TQDataTable( tqparent, name );
+ return new TQDataTable( parent, name );
} else if ( className == TQDATABROWSER_OBJECT_NAME_STRING ) {
- return new QDesignerDataBrowser2( tqparent, name );
+ return new QDesignerDataBrowser2( parent, name );
} else if ( className == TQDATAVIEW_OBJECT_NAME_STRING ) {
- return new QDesignerDataView2( tqparent, name );
+ return new QDesignerDataView2( parent, name );
}
#endif
@@ -1532,7 +1532,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;
@@ -1541,7 +1541,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;
}
@@ -1567,7 +1567,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;
@@ -1595,9 +1595,9 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget
}
if ( tqlayout && className == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) {
// 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;
@@ -1626,8 +1626,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
@@ -1682,19 +1682,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_OBJECT_NAME_STRING ) ) {
+ if ( parent ) {
+ if ( parent->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ) {
if ( attrib == "title" )
- ( (TQTabWidget*)tqparent )->insertTab( w, translate( v.toString() ) );
- } else if ( tqparent->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) ) {
+ ( (TQTabWidget*)parent )->insertTab( w, translate( v.toString() ) );
+ } else if ( parent->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) ) {
if ( attrib == "id" )
- ( (TQWidgetStack*)tqparent )->addWidget( w, v.toInt() );
- } else if ( tqparent->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) ) {
+ ( (TQWidgetStack*)parent )->addWidget( w, v.toInt() );
+ } else if ( parent->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) ) {
if ( attrib == "label" )
- ( (TQToolBox*)tqparent )->addItem( w, v.toString() );
- } else if ( tqparent->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) {
+ ( (TQToolBox*)parent )->addItem( w, v.toString() );
+ } else if ( parent->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) {
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" ) {
@@ -1706,7 +1706,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();
@@ -1850,8 +1850,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_OBJECT_NAME_STRING ) && obj->tqparent()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) )
- ( (TQButtonGroup*)obj->tqparent() )->insert( (TQButton*)obj, value.toInt() );
+ if ( obj->inherits( TQBUTTON_OBJECT_NAME_STRING ) && obj->parent()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) )
+ ( (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 ) ) {
@@ -2399,13 +2399,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() ) {
@@ -2417,10 +2417,10 @@ void TQWidgetFactory::loadChildAction( TQObject *tqparent, const TQDomElement &e
}
n2 = n2.nextSibling().toElement();
}
- if ( !tqparent->inherits( TQACTION_OBJECT_NAME_STRING ) )
+ if ( !parent->inherits( TQACTION_OBJECT_NAME_STRING ) )
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" ) {
@@ -2435,7 +2435,7 @@ void TQWidgetFactory::loadChildAction( TQObject *tqparent, const TQDomElement &e
}
n2 = n2.nextSibling().toElement();
}
- if ( !tqparent->inherits( TQACTION_OBJECT_NAME_STRING ) )
+ if ( !parent->inherits( TQACTION_OBJECT_NAME_STRING ) )
actionList.append( a );
}
diff --git a/kdevdesigner/uilib/qwidgetfactory.h b/kdevdesigner/uilib/qwidgetfactory.h
index ebdb38c0..c6770341 100644
--- a/kdevdesigner/uilib/qwidgetfactory.h
+++ b/kdevdesigner/uilib/qwidgetfactory.h
@@ -52,12 +52,12 @@ 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 );
+ 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 );
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 );
@@ -66,7 +66,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 );
@@ -87,7 +87,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 );
@@ -110,21 +110,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 {