summaryrefslogtreecommitdiffstats
path: root/kommander/editor/widgetfactory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kommander/editor/widgetfactory.cpp')
-rw-r--r--kommander/editor/widgetfactory.cpp284
1 files changed, 142 insertions, 142 deletions
diff --git a/kommander/editor/widgetfactory.cpp b/kommander/editor/widgetfactory.cpp
index f33d27b3..9f619c79 100644
--- a/kommander/editor/widgetfactory.cpp
+++ b/kommander/editor/widgetfactory.cpp
@@ -137,8 +137,8 @@ void TQLayoutWidget::paintEvent( TQPaintEvent* )
}
-QDesignerTabWidget::QDesignerTabWidget( TQWidget *tqparent, const char *name )
- : TQTabWidget( tqparent, name ), dropIndicator( 0 ), dragPage( 0 ), mousePressed( false )
+QDesignerTabWidget::QDesignerTabWidget( TQWidget *parent, const char *name )
+ : TQTabWidget( parent, name ), dropIndicator( 0 ), dragPage( 0 ), mousePressed( false )
{
tabBar()->setAcceptDrops( true );
tabBar()->installEventFilter( this );
@@ -417,8 +417,8 @@ static void saveChangedProperties( TQWidget *w, int id )
changedProperties->insert( id, l );
}
-EditorTabWidget::EditorTabWidget( TQWidget *tqparent, const char *name )
- : TabWidget( tqparent, name ), dropIndicator( 0 ), dragPage( 0 ), mousePressed( false )
+EditorTabWidget::EditorTabWidget( TQWidget *parent, const char *name )
+ : TabWidget( parent, name ), dropIndicator( 0 ), dragPage( 0 ), mousePressed( false )
{
tabBar()->setAcceptDrops( true );
tabBar()->installEventFilter( this );
@@ -584,8 +584,8 @@ bool EditorTabWidget::eventFilter( TQObject *o, TQEvent *e )
}
-EditorToolBox::EditorToolBox( TQWidget *tqparent, const char *name )
- : ToolBox( tqparent, name )
+EditorToolBox::EditorToolBox( TQWidget *parent, const char *name )
+ : ToolBox( parent, name )
{
setAcceptDrops( true );
}
@@ -631,12 +631,12 @@ int EditorToolBox::count() const
/*! Creates a widget of the type which is registered as \a id as
- child of \a tqparent. The \a name is optional. If \a init is true, the
+ child of \a parent. The \a name is optional. If \a init is true, the
widget is initialized with some defaults, else the plain widget is
created.
*/
-TQWidget *WidgetFactory::create( int id, TQWidget *tqparent, const char *name, bool init, const TQRect *r, Qt::Orientation orient )
+TQWidget *WidgetFactory::create( int id, TQWidget *parent, const char *name, bool init, const TQRect *r, Qt::Orientation orient )
{
TQString n = WidgetDatabase::className(id);
//qDebug("Trying to create '%s'", n.latin1());
@@ -652,10 +652,10 @@ TQWidget *WidgetFactory::create( int id, TQWidget *tqparent, const char *name, b
TQWidget *w = 0;
TQString str = WidgetDatabase::createWidgetName(id);
const char *s = str.latin1();
- w = createWidget(n, tqparent, name ? name : s, init, r, orient);
+ w = createWidget(n, parent, name ? name : s, init, r, orient);
//qDebug("Trying to create '%s', widget (id=%d) - %s", s, id, w ? "successful" : "failure");
if (!w && WidgetDatabase::isCustomWidget(id))
- w = createCustomWidget(tqparent, name ? name : s, MetaDataBase::customWidget(id));
+ w = createCustomWidget(parent, name ? name : s, MetaDataBase::customWidget(id));
if (!w)
return 0;
MetaDataBase::addEntry(TQT_TQOBJECT(w));
@@ -823,13 +823,13 @@ void WidgetFactory::deleteLayout( TQWidget *widget )
}
/*! Factory functions for creating a widget of the type \a className
- as child of \a tqparent with the name \a name.
+ as child of \a parent with the name \a name.
If \a init is true, some initial default properties are set. This
has to be in sync with the initChangedProperties() function!
*/
-TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqparent, const char *name, bool init,
+TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *parent, const char *name, bool init,
const TQRect *r, Qt::Orientation orient )
{
if (className == TQPUSHBUTTON_OBJECT_NAME_STRING)
@@ -837,11 +837,11 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa
TQPushButton *b = 0;
if (init)
{
- b = new QDesignerPushButton(tqparent, name);
+ b = new QDesignerPushButton(parent, name);
b->setText(TQString::tqfromLatin1(name));
} else
{
- b = new QDesignerPushButton(tqparent, name);
+ b = new QDesignerPushButton(parent, name);
}
TQWidget *w = find_formwindow(b);
b->setAutoDefault(w && ((FormWindow *) w)->mainContainer()->inherits(TQDIALOG_OBJECT_NAME_STRING));
@@ -850,43 +850,43 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa
{
if (init)
{
- QDesignerToolButton *tb = new QDesignerToolButton(tqparent, name);
+ QDesignerToolButton *tb = new QDesignerToolButton(parent, name);
tb->setText("...");
return tb;
}
- return new QDesignerToolButton(tqparent, name);
+ return new QDesignerToolButton(parent, name);
} else if (className == TQCHECKBOX_OBJECT_NAME_STRING)
{
if (init)
{
- QDesignerCheckBox *cb = new QDesignerCheckBox(tqparent, name);
+ QDesignerCheckBox *cb = new QDesignerCheckBox(parent, name);
cb->setText(TQString::tqfromLatin1(name));
return cb;
}
- return new QDesignerCheckBox(tqparent, name);
+ return new QDesignerCheckBox(parent, name);
} else if (className == TQRADIOBUTTON_OBJECT_NAME_STRING)
{
if (init)
{
- QDesignerRadioButton *rb = new QDesignerRadioButton(tqparent, name);
+ QDesignerRadioButton *rb = new QDesignerRadioButton(parent, name);
rb->setText(TQString::tqfromLatin1(name));
return rb;
}
- return new QDesignerRadioButton(tqparent, name);
+ return new QDesignerRadioButton(parent, name);
} else if (className == TQGROUPBOX_OBJECT_NAME_STRING)
{
if (init)
- return new TQGroupBox(TQString::tqfromLatin1(name), tqparent, name);
- return new TQGroupBox(tqparent, name);
+ return new TQGroupBox(TQString::tqfromLatin1(name), parent, name);
+ return new TQGroupBox(parent, name);
} else if (className == TQBUTTONGROUP_OBJECT_NAME_STRING)
{
if (init)
- return new TQButtonGroup(TQString::tqfromLatin1(name), tqparent, name);
- return new TQButtonGroup(tqparent, name);
+ return new TQButtonGroup(TQString::tqfromLatin1(name), parent, name);
+ return new TQButtonGroup(parent, name);
} else if (className == TQICONVIEW_OBJECT_NAME_STRING)
{
#if !defined(TQT_NO_ICONVIEW)
- TQIconView *iv = new TQIconView(tqparent, name);
+ TQIconView *iv = new TQIconView(parent, name);
if (init)
(void) new TQIconViewItem(iv, i18n("New Item"));
return iv;
@@ -897,28 +897,28 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa
{
#if !defined(TQT_NO_TABLE)
if (init)
- return new TQTable(3, 3, tqparent, name);
- return new TQTable(tqparent, name);
+ return new TQTable(3, 3, parent, name);
+ return new TQTable(parent, name);
#else
return 0;
#endif
#ifndef TQT_NO_SQL
} else if (className == TQDATATABLE_OBJECT_NAME_STRING)
{
- return new TQDataTable(tqparent, name);
+ return new TQDataTable(parent, name);
#endif //TQT_NO_SQL
} 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 == TQLISTBOX_OBJECT_NAME_STRING)
{
- TQListBox *lb = new TQListBox(tqparent, name);
+ TQListBox *lb = new TQListBox(parent, name);
if (init)
{
lb->insertItem(i18n("New Item"));
@@ -927,7 +927,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa
return lb;
} else if (className == TQLISTVIEW_OBJECT_NAME_STRING)
{
- TQListView *lv = new TQListView(tqparent, name);
+ TQListView *lv = new TQListView(parent, name);
lv->setSorting(-1);
if (init)
{
@@ -936,18 +936,18 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa
}
return lv;
} 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 == TQSPLITTER_OBJECT_NAME_STRING)
- return new TQSplitter(tqparent, name);
+ return new TQSplitter(parent, name);
else if (className == TQMULTILINEEDIT_OBJECT_NAME_STRING)
- return new TQMultiLineEdit(tqparent, name);
+ return new TQMultiLineEdit(parent, name);
else if (className == TQTEXTEDIT_OBJECT_NAME_STRING)
- return new TQTextEdit(tqparent, name);
+ return new TQTextEdit(parent, name);
else if (className == TQLABEL_OBJECT_NAME_STRING)
{
- QDesignerLabel *l = new QDesignerLabel(tqparent, name);
+ QDesignerLabel *l = new QDesignerLabel(parent, name);
if (init)
{
l->setText(TQString::tqfromLatin1(name));
@@ -956,13 +956,13 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa
}
return l;
} else if (className == TQLAYOUTWIDGET_OBJECT_NAME_STRING)
- return new TQLayoutWidget(tqparent, name);
+ return new TQLayoutWidget(parent, name);
else if (className == TQTABWIDGET_OBJECT_NAME_STRING)
{
- TQTabWidget *tw = new QDesignerTabWidget(tqparent, name);
+ TQTabWidget *tw = new QDesignerTabWidget(parent, name);
if (init)
{
- FormWindow *fw = find_formwindow(tqparent);
+ FormWindow *fw = find_formwindow(parent);
TQWidget *w = fw ? new QDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab");
tw->addTab(w, i18n("Tab 1"));
MetaDataBase::addEntry(TQT_TQOBJECT(w));
@@ -974,42 +974,42 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa
return tw;
} 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 (tqparent &&
- (tqparent->inherits("FormWindow") || tqparent->inherits(TQWIZARD_OBJECT_NAME_STRING)
- || tqparent->inherits(TQTABWIDGET_OBJECT_NAME_STRING) || tqparent->inherits(TQTOOLBOX_OBJECT_NAME_STRING) || tqparent->inherits(TQMAINWINDOW_OBJECT_NAME_STRING)))
+ if (parent &&
+ (parent->inherits("FormWindow") || parent->inherits(TQWIZARD_OBJECT_NAME_STRING)
+ || parent->inherits(TQTABWIDGET_OBJECT_NAME_STRING) || parent->inherits(TQTOOLBOX_OBJECT_NAME_STRING) || parent->inherits(TQMAINWINDOW_OBJECT_NAME_STRING)))
{
- FormWindow *fw = find_formwindow(tqparent);
+ FormWindow *fw = find_formwindow(parent);
if (fw)
{
- QDesignerWidget *dw = new QDesignerWidget(fw, tqparent, name);
+ QDesignerWidget *dw = new QDesignerWidget(fw, parent, name);
MetaDataBase::addEntry(TQT_TQOBJECT(dw));
return dw;
}
}
- return new TQWidget(tqparent, name);
+ return new TQWidget(parent, name);
} else if (className == TQDIALOG_OBJECT_NAME_STRING)
{
TQDialog *dia = 0;
- if (tqparent && tqparent->inherits("FormWindow"))
- dia = new QDesignerDialog((FormWindow *) tqparent, tqparent, name);
+ if (parent && parent->inherits("FormWindow"))
+ dia = new QDesignerDialog((FormWindow *) parent, parent, name);
else
- dia = new TQDialog(tqparent, name);
- if (tqparent && !tqparent->inherits("MainWindow"))
- dia->reparent(tqparent, TQPoint(0, 0), true);
+ dia = new TQDialog(parent, name);
+ if (parent && !parent->inherits("MainWindow"))
+ dia->reparent(parent, TQPoint(0, 0), true);
return dia;
} else if (className == TQWIZARD_OBJECT_NAME_STRING)
{
- TQWizard *wiz = new QDesignerWizard(tqparent, name);
- if (tqparent && !tqparent->inherits("MainWindow"))
+ TQWizard *wiz = new QDesignerWizard(parent, name);
+ if (parent && !parent->inherits("MainWindow"))
{
- wiz->reparent(tqparent, TQPoint(0, 0), true);
+ wiz->reparent(parent, TQPoint(0, 0), true);
}
- if (init && tqparent && tqparent->inherits("FormWindow"))
+ if (init && parent && parent->inherits("FormWindow"))
{
- QDesignerWidget *dw = new QDesignerWidget((FormWindow *) tqparent, wiz, "page");
+ QDesignerWidget *dw = new QDesignerWidget((FormWindow *) parent, wiz, "page");
MetaDataBase::addEntry(TQT_TQOBJECT(dw));
wiz->addPage(dw, i18n("Page"));
TQTimer::singleShot(0, wiz, TQT_SLOT(next()));
@@ -1017,7 +1017,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa
return wiz;
} else if (className == "Spacer")
{
- Spacer *s = new Spacer(tqparent, name);
+ Spacer *s = new Spacer(parent, name);
MetaDataBase::addEntry(TQT_TQOBJECT(s));
MetaDataBase::setPropertyChanged(TQT_TQOBJECT(s), "orientation", true);
MetaDataBase::setPropertyChanged(TQT_TQOBJECT(s), "sizeType", true);
@@ -1031,18 +1031,18 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa
s->setOrientation(Qt::Horizontal);
return s;
} 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)
{
- TQSlider *s = new TQSlider(tqparent, name);
+ TQSlider *s = new TQSlider(parent, name);
if (!r)
return s;
if (!r->isValid() || r->width() < 2 && r->height() < 2)
@@ -1054,7 +1054,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa
return s;
} else if (className == TQSCROLLBAR_OBJECT_NAME_STRING)
{
- TQScrollBar *s = new TQScrollBar(tqparent, name);
+ TQScrollBar *s = new TQScrollBar(parent, name);
if (!r)
return s;
if (!r->isValid() || r->width() < 2 && r->height() < 2)
@@ -1067,13 +1067,13 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa
} else if (className == TQFRAME_OBJECT_NAME_STRING)
{
if (!init)
- return new TQFrame(tqparent, name);
- TQFrame *f = new TQFrame(tqparent, name);
+ return new TQFrame(parent, name);
+ TQFrame *f = new TQFrame(parent, name);
f->setFrameStyle(TQFrame::StyledPanel | TQFrame::Raised);
return f;
} else if (className == "Line")
{
- Line *l = new Line(tqparent, name);
+ Line *l = new Line(parent, name);
MetaDataBase::addEntry(TQT_TQOBJECT(l));
MetaDataBase::setPropertyChanged(TQT_TQOBJECT(l), "orientation", true);
MetaDataBase::setPropertyChanged(TQT_TQOBJECT(l), "frameShadow", true);
@@ -1087,9 +1087,9 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa
return l;
} else if (className == TQMAINWINDOW_OBJECT_NAME_STRING)
{
- TQMainWindow *mw = new KmdrMainWindow(tqparent, name, 0);
+ TQMainWindow *mw = new KmdrMainWindow(parent, name, 0);
mw->setDockEnabled(TQt::DockMinimized, false);
- QDesignerWidget *dw = new QDesignerWidget((FormWindow *) tqparent, mw, "central widget");
+ QDesignerWidget *dw = new QDesignerWidget((FormWindow *) parent, mw, "central widget");
mw->setDockMenuEnabled(false);
MetaDataBase::addEntry(TQT_TQOBJECT(dw));
mw->setCentralWidget(dw);
@@ -1100,25 +1100,25 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa
#ifndef TQT_NO_SQL
else if (className == TQDATABROWSER_OBJECT_NAME_STRING)
{
- TQWidget *w = new QDesignerDataBrowser(tqparent, name);
- if (tqparent)
- w->reparent(tqparent, TQPoint(0, 0), true);
+ TQWidget *w = new QDesignerDataBrowser(parent, name);
+ if (parent)
+ w->reparent(parent, TQPoint(0, 0), true);
return w;
} else if (className == TQDATAVIEW_OBJECT_NAME_STRING)
{
- TQWidget *w = new QDesignerDataView(tqparent, name);
- if (tqparent)
- w->reparent(tqparent, TQPoint(0, 0), true);
+ TQWidget *w = new QDesignerDataView(parent, name);
+ if (parent)
+ w->reparent(parent, TQPoint(0, 0), true);
return w;
}
#endif
#ifdef KOMMANDER
if (className == "LineEdit")
- return new LineEdit(tqparent, name);
+ return new LineEdit(parent, name);
else if (className == "ListView")
{
- TQListView *lv = new TQListView(tqparent, name);
+ TQListView *lv = new TQListView(parent, name);
lv->setSorting(-1);
if (init)
{
@@ -1130,28 +1130,28 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa
else if (className == "Dialog")
{
TQDialog *dia = 0;
- if (tqparent && tqparent->inherits("FormWindow"))
- dia = new EditorDialog((FormWindow *) tqparent, tqparent, name);
+ if (parent && parent->inherits("FormWindow"))
+ dia = new EditorDialog((FormWindow *) parent, parent, name);
else
- dia = new Dialog(tqparent, name, false);
+ dia = new Dialog(parent, name, false);
- if (tqparent)
- dia->reparent(tqparent, TQPoint(0, 0), true);
+ if (parent)
+ dia->reparent(parent, TQPoint(0, 0), true);
return dia;
}
else if (className == "Wizard")
{
//qDebug("Creating Wizard...");
TQWizard *wiz;
- if (tqparent && tqparent->inherits("FormWindow"))
- wiz = new QDesignerWizard(tqparent, name);
+ if (parent && parent->inherits("FormWindow"))
+ wiz = new QDesignerWizard(parent, name);
else
- wiz = new Wizard(tqparent, name);
- if (tqparent)
- wiz->reparent(tqparent, TQPoint(0, 0), true);
- if (init && tqparent && tqparent->inherits("FormWindow"))
+ wiz = new Wizard(parent, name);
+ if (parent)
+ wiz->reparent(parent, TQPoint(0, 0), true);
+ if (init && parent && parent->inherits("FormWindow"))
{
- QDesignerWidget *dw = new QDesignerWidget((FormWindow *) tqparent, wiz, "page");
+ QDesignerWidget *dw = new QDesignerWidget((FormWindow *) parent, wiz, "page");
MetaDataBase::addEntry(TQT_TQOBJECT(dw));
wiz->addPage(dw, i18n("Page 1"));
wiz->addPage(dw, i18n("Page 2"));
@@ -1161,10 +1161,10 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa
}
else if (className == "TabWidget")
{
- TQTabWidget *tw = new EditorTabWidget(tqparent, name);
+ TQTabWidget *tw = new EditorTabWidget(parent, name);
if (init)
{
- FormWindow *fw = find_formwindow(tqparent);
+ FormWindow *fw = find_formwindow(parent);
TQWidget *w = fw ? new QDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab");
tw->addTab(w, i18n("Tab 1"));
MetaDataBase::addEntry(TQT_TQOBJECT(w));
@@ -1176,10 +1176,10 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa
return tw;
} else if (className == "ToolBox")
{
- TQToolBox *tw = new EditorToolBox(tqparent, name);
+ TQToolBox *tw = new EditorToolBox(parent, name);
if (init)
{
- FormWindow *fw = find_formwindow(tqparent);
+ FormWindow *fw = find_formwindow(parent);
TQWidget *w = fw ? new QDesignerWidget(fw, tw, "toolbox") : new TQWidget(tw, "toolbox");
tw->addItem(w, i18n("Page 1"));
MetaDataBase::addEntry(TQT_TQOBJECT(w));
@@ -1191,44 +1191,44 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa
return tw;
}
else if (className == "ExecButton")
- return new ExecButton(tqparent, name);
+ return new ExecButton(parent, name);
else if (className == "CloseButton")
- return new CloseButton(tqparent, name);
+ return new CloseButton(parent, name);
else if (className == "SubDialog")
- return new SubDialog(tqparent, name);
+ return new SubDialog(parent, name);
else if (className == "FileSelector")
- return new FileSelector(tqparent, name);
+ return new FileSelector(parent, name);
else if (className == "TextEdit")
- return new TextEdit(tqparent, name);
+ return new TextEdit(parent, name);
else if (className == "RadioButton")
- return new RadioButton(tqparent, name);
+ return new RadioButton(parent, name);
else if (className == "ButtonGroup")
- return new ButtonGroup(tqparent, name);
+ return new ButtonGroup(parent, name);
else if (className == "GroupBox")
- return new GroupBox(tqparent, name);
+ return new GroupBox(parent, name);
else if (className == "CheckBox")
- return new CheckBox(tqparent, name);
+ return new CheckBox(parent, name);
else if (className == "ComboBox")
- return new ComboBox(tqparent, name);
+ return new ComboBox(parent, name);
else if (className == "SpinBoxInt")
- return new SpinBoxInt(tqparent, name);
+ return new SpinBoxInt(parent, name);
else if (className == "ListBox")
- return new ListBox(tqparent, name);
+ return new ListBox(parent, name);
else if (className == "ScriptObject")
- return new ScriptObject(tqparent, name);
+ return new ScriptObject(parent, name);
else if (className == "RichTextEditor")
- return new RichTextEditor(tqparent, name);
+ return new RichTextEditor(parent, name);
else if (className == "DatePicker")
- return new DatePicker(tqparent, name);
+ return new DatePicker(parent, name);
else if (className == "PopupMenu")
- return new PopupMenu(tqparent, name);
+ return new PopupMenu(parent, name);
else if (className == "FontDialog")
- return new FontDialog(tqparent, name);
+ return new FontDialog(parent, name);
else if (className == "AboutDialog")
- return new AboutDialog(tqparent, name);
+ return new AboutDialog(parent, name);
else if (className == "TreeWidget")
{
- TQListView *lv = new TreeWidget(tqparent, name);
+ TQListView *lv = new TreeWidget(parent, name);
lv->setSorting(-1);
if (init)
{
@@ -1238,7 +1238,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa
return lv;
} else if (className == "Slider")
{
- Slider *s = new Slider(tqparent, name);
+ Slider *s = new Slider(parent, name);
if (!r)
return s;
if (!r->isValid() || r->width() < 2 && r->height() < 2)
@@ -1251,7 +1251,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa
}
#endif
- TQWidget *w = KommanderFactory::createWidget(className, tqparent, name);
+ TQWidget *w = KommanderFactory::createWidget(className, parent, name);
return w;
}
@@ -1331,7 +1331,7 @@ TQWidget *WidgetFactory::layoutParent( TQLayout *tqlayout )
while ( o ) {
if ( o->isWidgetType() )
return (TQWidget*)o;
- o = o->tqparent();
+ o = o->parent();
}
return 0;
}
@@ -1363,10 +1363,10 @@ TQWidget* WidgetFactory::containerOfWidget( TQWidget *w )
}
/*! Returns the actual designer widget of the container \a w. This is
- normally \a w itself, but might be a tqparent or grand tqparent of \a w
+ normally \a w itself, but might be a parent or grand parent of \a w
(e.g. when working with a tabwidget and \a w is the container which
contains and layouts childs, but the actual widget known to the
- designer is the tabwidget which is the tqparent of \a w. So this
+ designer is the tabwidget which is the parent of \a w. So this
function returns the tabwidget then.)
*/
@@ -1391,15 +1391,15 @@ bool WidgetFactory::isPassiveInteractor( TQObject* o )
if ( TQApplication::activePopupWidget() ) // if a popup is open, we have to make sure that this one is closed, else X might do funny things
return true;
- if ( o->inherits( TQTABBAR_OBJECT_NAME_STRING ) || ::tqqt_cast<TQToolBox*>(o->tqparent()) )
+ if ( o->inherits( TQTABBAR_OBJECT_NAME_STRING ) || ::tqqt_cast<TQToolBox*>(o->parent()) )
return true;
else if ( o->inherits( TQSIZEGRIP_OBJECT_NAME_STRING ) )
return true;
- else if ( o->inherits( TQTOOLBUTTON_OBJECT_NAME_STRING ) && o->tqparent() && o->tqparent()->inherits( TQTABBAR_OBJECT_NAME_STRING ) )
+ else if ( o->inherits( TQTOOLBUTTON_OBJECT_NAME_STRING ) && o->parent() && o->parent()->inherits( TQTABBAR_OBJECT_NAME_STRING ) )
return true;
- else if ( o->tqparent() && o->tqparent()->inherits( TQWIZARD_OBJECT_NAME_STRING ) && o->inherits( TQPUSHBUTTON_OBJECT_NAME_STRING ) )
+ else if ( o->parent() && o->parent()->inherits( TQWIZARD_OBJECT_NAME_STRING ) && o->inherits( TQPUSHBUTTON_OBJECT_NAME_STRING ) )
return true;
- else if ( o->tqparent() && o->tqparent()->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) && o->inherits( TQMENUBAR_OBJECT_NAME_STRING ) )
+ else if ( o->parent() && o->parent()->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) && o->inherits( TQMENUBAR_OBJECT_NAME_STRING ) )
return true;
else if ( o->inherits( TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING ) )
return true;
@@ -1471,7 +1471,7 @@ void WidgetFactory::initChangedProperties( TQObject *o )
if ( o->inherits( TQPUSHBUTTON_OBJECT_NAME_STRING ) || o->inherits(TQRADIOBUTTON_OBJECT_NAME_STRING) || o->inherits( TQCHECKBOX_OBJECT_NAME_STRING ) || o->inherits( TQTOOLBUTTON_OBJECT_NAME_STRING ) )
MetaDataBase::setPropertyChanged( o, "text", true );
- else if (::tqqt_cast<TQToolButton*>(o) && ::tqqt_cast<TQToolBox*>(widgetOfContainer((TQWidget*)o->tqparent()))) {
+ else if (::tqqt_cast<TQToolButton*>(o) && ::tqqt_cast<TQToolBox*>(widgetOfContainer((TQWidget*)o->parent()))) {
MetaDataBase::setPropertyChanged( o, "usesTextLabel", TRUE );
MetaDataBase::setPropertyChanged( o, "textLabel", TRUE );
MetaDataBase::setPropertyChanged( o, "autoRaise", TRUE );
@@ -1550,7 +1550,7 @@ bool WidgetFactory::hasItems( int id )
return false;
}
-void WidgetFactory::editWidget( int id, TQWidget *tqparent, TQWidget *editWidget, FormWindow *fw )
+void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, FormWindow *fw )
{
TQString className = WidgetDatabase::className(id);
@@ -1562,7 +1562,7 @@ void WidgetFactory::editWidget( int id, TQWidget *tqparent, TQWidget *editWidget
TQComboBox *cb = (TQComboBox *) editWidget;
- ListBoxEditor *e = new ListBoxEditor(tqparent, cb->listBox(), fw);
+ ListBoxEditor *e = new ListBoxEditor(parent, cb->listBox(), fw);
e->exec();
delete e;
@@ -1572,7 +1572,7 @@ void WidgetFactory::editWidget( int id, TQWidget *tqparent, TQWidget *editWidget
}
if (className == "TextEdit" || className == "TextBrowser")
{
- MultiLineEditor *e = new MultiLineEditor(tqparent, editWidget, fw);
+ MultiLineEditor *e = new MultiLineEditor(parent, editWidget, fw);
e->exec();
delete e;
return;
@@ -1582,7 +1582,7 @@ void WidgetFactory::editWidget( int id, TQWidget *tqparent, TQWidget *editWidget
if (!editWidget->inherits(TQLISTVIEW_OBJECT_NAME_STRING))
return;
TQListView *lv = (TQListView *) editWidget;
- ListViewEditor *e = new ListViewEditor(tqparent, lv, fw);
+ ListViewEditor *e = new ListViewEditor(parent, lv, fw);
e->exec();
delete e;
return;
@@ -1591,7 +1591,7 @@ void WidgetFactory::editWidget( int id, TQWidget *tqparent, TQWidget *editWidget
{
if (!editWidget->inherits(TQLISTBOX_OBJECT_NAME_STRING))
return;
- ListBoxEditor *e = new ListBoxEditor(tqparent, editWidget, fw);
+ ListBoxEditor *e = new ListBoxEditor(parent, editWidget, fw);
e->exec();
delete e;
return;
@@ -1601,7 +1601,7 @@ void WidgetFactory::editWidget( int id, TQWidget *tqparent, TQWidget *editWidget
{
if (!editWidget->inherits(TQLISTBOX_OBJECT_NAME_STRING))
return;
- ListBoxEditor *e = new ListBoxEditor(tqparent, editWidget, fw);
+ ListBoxEditor *e = new ListBoxEditor(parent, editWidget, fw);
e->exec();
delete e;
return;
@@ -1612,7 +1612,7 @@ void WidgetFactory::editWidget( int id, TQWidget *tqparent, TQWidget *editWidget
if (!editWidget->inherits(TQCOMBOBOX_OBJECT_NAME_STRING))
return;
TQComboBox *cb = (TQComboBox *) editWidget;
- ListBoxEditor *e = new ListBoxEditor(tqparent, cb->listBox(), fw);
+ ListBoxEditor *e = new ListBoxEditor(parent, cb->listBox(), fw);
e->exec();
delete e;
cb->update();
@@ -1624,7 +1624,7 @@ void WidgetFactory::editWidget( int id, TQWidget *tqparent, TQWidget *editWidget
if (!editWidget->inherits(TQLISTVIEW_OBJECT_NAME_STRING))
return;
TQListView *lv = (TQListView *) editWidget;
- ListViewEditor *e = new ListViewEditor(tqparent, lv, fw);
+ ListViewEditor *e = new ListViewEditor(parent, lv, fw);
e->exec();
delete e;
return;
@@ -1634,7 +1634,7 @@ void WidgetFactory::editWidget( int id, TQWidget *tqparent, TQWidget *editWidget
{
if (!editWidget->inherits(TQICONVIEW_OBJECT_NAME_STRING))
return;
- IconViewEditor *e = new IconViewEditor(tqparent, editWidget, fw);
+ IconViewEditor *e = new IconViewEditor(parent, editWidget, fw);
e->exec();
delete e;
return;
@@ -1642,7 +1642,7 @@ void WidgetFactory::editWidget( int id, TQWidget *tqparent, TQWidget *editWidget
if (className == TQMULTILINEEDIT_OBJECT_NAME_STRING || className == TQTEXTEDIT_OBJECT_NAME_STRING)
{
- MultiLineEditor *e = new MultiLineEditor(tqparent, editWidget, fw);
+ MultiLineEditor *e = new MultiLineEditor(parent, editWidget, fw);
e->exec();
delete e;
return;
@@ -1650,7 +1650,7 @@ void WidgetFactory::editWidget( int id, TQWidget *tqparent, TQWidget *editWidget
#ifndef TQT_NO_TABLE
if (className.contains("Table"))
{
- TableEditor *e = new TableEditor(tqparent, editWidget, fw);
+ TableEditor *e = new TableEditor(parent, editWidget, fw);
e->exec();
delete e;
return;
@@ -1730,11 +1730,11 @@ TQString WidgetFactory::defaultCurrentItem( TQObject *w, const TQString &propNam
return p->valueToKey( defaultValue( w, propName ).toInt() );
}
-TQWidget *WidgetFactory::createCustomWidget( TQWidget *tqparent, const char *name, MetaDataBase::CustomWidget *w )
+TQWidget *WidgetFactory::createCustomWidget( TQWidget *parent, const char *name, MetaDataBase::CustomWidget *w )
{
if ( !w )
return 0;
- return new CustomWidget( tqparent, name, w );
+ return new CustomWidget( parent, name, w );
}
TQVariant WidgetFactory::property( TQObject *w, const char *name )
@@ -1793,7 +1793,7 @@ bool TQLayoutWidget::event( TQEvent *e )
/*
This function must be called on TQLayoutWidget creation and whenever
- the TQLayoutWidget's tqparent tqlayout changes (e.g., from a TQHBoxLayout
+ the TQLayoutWidget's parent tqlayout changes (e.g., from a TQHBoxLayout
to a TQVBoxLayout), because of the (illogical) way layouting works.
*/
void TQLayoutWidget::updateSizePolicy()
@@ -1819,12 +1819,12 @@ void TQLayoutWidget::updateSizePolicy()
if ( tqlayout() ) {
/*
- parentLayout is set to the tqparent tqlayout if there is one and if it is
+ parentLayout is set to the parent tqlayout if there is one and if it is
top level, in which case layouting is illogical.
*/
TQLayout *parentLayout = 0;
- if ( tqparent() && tqparent()->isWidgetType() ) {
- parentLayout = ((TQWidget *)tqparent())->tqlayout();
+ if ( parent() && parent()->isWidgetType() ) {
+ parentLayout = ((TQWidget *)parent())->tqlayout();
if ( parentLayout && parentLayout->mainWidget()->inherits(TQLAYOUTWIDGET_OBJECT_NAME_STRING) )
parentLayout = 0;
}