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.cpp202
1 files changed, 101 insertions, 101 deletions
diff --git a/kommander/editor/widgetfactory.cpp b/kommander/editor/widgetfactory.cpp
index 34cd0514..2becbd33 100644
--- a/kommander/editor/widgetfactory.cpp
+++ b/kommander/editor/widgetfactory.cpp
@@ -677,29 +677,29 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou
int spacing = MainWindow::self->currentLayoutDefaultSpacing();
int margin = 0;
- if ( widget && !widget->inherits( "QLayoutWidget" ) &&
+ if ( widget && !widget->inherits( TQLAYOUTWIDGET_OBJECT_NAME_STRING ) &&
( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ) ) ||
widget && widget->parentWidget() && widget->parentWidget()->inherits( "FormWindow" ) ) )
margin = MainWindow::self->currentLayoutDefaultMargin();
- if ( !layout && widget && widget->inherits( "TQTabWidget" ) )
+ if ( !layout && widget && widget->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) )
widget = ((TQTabWidget*)widget)->currentPage();
- if ( !layout && widget && widget->inherits( "TQToolBox" ) )
+ if ( !layout && widget && widget->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) )
widget = ((TQToolBox*)widget)->currentItem();
- if ( !layout && widget && widget->inherits( "TQWizard" ) )
+ if ( !layout && widget && widget->inherits( TQWIZARD_OBJECT_NAME_STRING ) )
widget = ((TQWizard*)widget)->currentPage();
- if ( !layout && widget && widget->inherits( "TQMainWindow" ) )
+ if ( !layout && widget && widget->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) )
widget = ((TQMainWindow*)widget)->centralWidget();
- if ( !layout && widget && widget->inherits( "TQWidgetStack" ) )
+ if ( !layout && widget && widget->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) )
widget = ((TQWidgetStack*)widget)->visibleWidget();
MetaDataBase::addEntry( widget );
- if ( !layout && widget && widget->inherits( "TQGroupBox" ) ) {
+ if ( !layout && widget && widget->inherits( TQGROUPBOX_OBJECT_NAME_STRING ) ) {
TQGroupBox *gb = (TQGroupBox*)widget;
gb->setColumnLayout( 0, Qt::Vertical );
gb->layout()->setMargin( 0 );
@@ -811,13 +811,13 @@ void WidgetFactory::deleteLayout( TQWidget *widget )
if ( !widget )
return;
- if ( widget->inherits( "TQTabWidget" ) )
+ if ( widget->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) )
widget = ((TQTabWidget*)widget)->currentPage();
- if ( widget->inherits( "TQWizard" ) )
+ if ( widget->inherits( TQWIZARD_OBJECT_NAME_STRING ) )
widget = ((TQWizard*)widget)->currentPage();
- if ( widget->inherits( "TQMainWindow" ) )
+ if ( widget->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) )
widget = ((TQMainWindow*)widget)->centralWidget();
- if ( widget->inherits( "TQWidgetStack" ) )
+ if ( widget->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) )
widget = ((TQWidgetStack*)widget)->visibleWidget();
delete widget->layout();
}
@@ -832,7 +832,7 @@ void WidgetFactory::deleteLayout( TQWidget *widget )
TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *parent, const char *name, bool init,
const TQRect *r, Qt::Orientation orient )
{
- if (className == "TQPushButton")
+ if (className == TQPUSHBUTTON_OBJECT_NAME_STRING)
{
TQPushButton *b = 0;
if (init)
@@ -844,9 +844,9 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
b = new QDesignerPushButton(parent, name);
}
TQWidget *w = find_formwindow(b);
- b->setAutoDefault(w && ((FormWindow *) w)->mainContainer()->inherits("TQDialog"));
+ b->setAutoDefault(w && ((FormWindow *) w)->mainContainer()->inherits(TQDIALOG_OBJECT_NAME_STRING));
return b;
- } else if (className == "TQToolButton")
+ } else if (className == TQTOOLBUTTON_OBJECT_NAME_STRING)
{
if (init)
{
@@ -855,7 +855,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
return tb;
}
return new QDesignerToolButton(parent, name);
- } else if (className == "TQCheckBox")
+ } else if (className == TQCHECKBOX_OBJECT_NAME_STRING)
{
if (init)
{
@@ -864,7 +864,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
return cb;
}
return new QDesignerCheckBox(parent, name);
- } else if (className == "TQRadioButton")
+ } else if (className == TQRADIOBUTTON_OBJECT_NAME_STRING)
{
if (init)
{
@@ -873,17 +873,17 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
return rb;
}
return new QDesignerRadioButton(parent, name);
- } else if (className == "TQGroupBox")
+ } else if (className == TQGROUPBOX_OBJECT_NAME_STRING)
{
if (init)
return new TQGroupBox(TQString::fromLatin1(name), parent, name);
return new TQGroupBox(parent, name);
- } else if (className == "TQButtonGroup")
+ } else if (className == TQBUTTONGROUP_OBJECT_NAME_STRING)
{
if (init)
return new TQButtonGroup(TQString::fromLatin1(name), parent, name);
return new TQButtonGroup(parent, name);
- } else if (className == "TQIconView")
+ } else if (className == TQICONVIEW_OBJECT_NAME_STRING)
{
#if !defined(QT_NO_ICONVIEW)
TQIconView *iv = new TQIconView(parent, name);
@@ -893,7 +893,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
#else
return 0;
#endif
- } else if (className == "TQTable")
+ } else if (className == TQTABLE_OBJECT_NAME_STRING)
{
#if !defined(QT_NO_TABLE)
if (init)
@@ -903,20 +903,20 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
return 0;
#endif
#ifndef QT_NO_SQL
- } else if (className == "TQDataTable")
+ } else if (className == TQDATATABLE_OBJECT_NAME_STRING)
{
return new TQDataTable(parent, name);
#endif //QT_NO_SQL
- } else if (className == "QDateEdit")
+ } else if (className == TQDATEEDIT_OBJECT_NAME_STRING)
{
return new QDateEdit(parent, name);
- } else if (className == "QTimeEdit")
+ } else if (className == TQTIMEEDIT_OBJECT_NAME_STRING)
{
return new QTimeEdit(parent, name);
- } else if (className == "QDateTimeEdit")
+ } else if (className == TQDATETIMEEDIT_OBJECT_NAME_STRING)
{
return new QDateTimeEdit(parent, name);
- } else if (className == "TQListBox")
+ } else if (className == TQLISTBOX_OBJECT_NAME_STRING)
{
TQListBox *lb = new TQListBox(parent, name);
if (init)
@@ -925,7 +925,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
lb->setCurrentItem(0);
}
return lb;
- } else if (className == "TQListView")
+ } else if (className == TQLISTVIEW_OBJECT_NAME_STRING)
{
TQListView *lv = new TQListView(parent, name);
lv->setSorting(-1);
@@ -935,17 +935,17 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
lv->setCurrentItem(new TQListViewItem(lv, i18n("New Item")));
}
return lv;
- } else if (className == "TQLineEdit")
+ } else if (className == TQLINEEDIT_OBJECT_NAME_STRING)
return new TQLineEdit(parent, name);
- else if (className == "TQSpinBox")
+ else if (className == TQSPINBOX_OBJECT_NAME_STRING)
return new TQSpinBox(parent, name);
- else if (className == "TQSplitter")
+ else if (className == TQSPLITTER_OBJECT_NAME_STRING)
return new TQSplitter(parent, name);
- else if (className == "TQMultiLineEdit")
+ else if (className == TQMULTILINEEDIT_OBJECT_NAME_STRING)
return new TQMultiLineEdit(parent, name);
- else if (className == "TQTextEdit")
+ else if (className == TQTEXTEDIT_OBJECT_NAME_STRING)
return new TQTextEdit(parent, name);
- else if (className == "TQLabel")
+ else if (className == TQLABEL_OBJECT_NAME_STRING)
{
QDesignerLabel *l = new QDesignerLabel(parent, name);
if (init)
@@ -955,9 +955,9 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
MetaDataBase::setPropertyChanged(l, "text", true);
}
return l;
- } else if (className == "QLayoutWidget")
+ } else if (className == TQLAYOUTWIDGET_OBJECT_NAME_STRING)
return new QLayoutWidget(parent, name);
- else if (className == "TQTabWidget")
+ else if (className == TQTABWIDGET_OBJECT_NAME_STRING)
{
TQTabWidget *tw = new QDesignerTabWidget(parent, name);
if (init)
@@ -972,14 +972,14 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
MetaDataBase::addEntry(w);
}
return tw;
- } else if (className == "TQComboBox")
+ } else if (className == TQCOMBOBOX_OBJECT_NAME_STRING)
{
return new TQComboBox(false, parent, name);
- } else if (className == "TQWidget")
+ } else if (className == TQWIDGET_OBJECT_NAME_STRING)
{
if (parent &&
- (parent->inherits("FormWindow") || parent->inherits("TQWizard")
- || parent->inherits("TQTabWidget") || parent->inherits("TQToolBox") || parent->inherits("TQMainWindow")))
+ (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(parent);
if (fw)
@@ -990,7 +990,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
}
}
return new TQWidget(parent, name);
- } else if (className == "TQDialog")
+ } else if (className == TQDIALOG_OBJECT_NAME_STRING)
{
TQDialog *dia = 0;
if (parent && parent->inherits("FormWindow"))
@@ -1000,7 +1000,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
if (parent && !parent->inherits("MainWindow"))
dia->reparent(parent, TQPoint(0, 0), true);
return dia;
- } else if (className == "TQWizard")
+ } else if (className == TQWIZARD_OBJECT_NAME_STRING)
{
TQWizard *wiz = new QDesignerWizard(parent, name);
if (parent && !parent->inherits("MainWindow"))
@@ -1030,17 +1030,17 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
else
s->setOrientation(Qt::Horizontal);
return s;
- } else if (className == "TQLCDNumber")
+ } else if (className == TQLCDNUMBER_OBJECT_NAME_STRING)
return new TQLCDNumber(parent, name);
- else if (className == "TQProgressBar")
+ else if (className == TQPROGRESSBAR_OBJECT_NAME_STRING)
return new TQProgressBar(parent, name);
- else if (className == "TQTextView")
+ else if (className == TQTEXTVIEW_OBJECT_NAME_STRING)
return new TQTextView(parent, name);
- else if (className == "TQTextBrowser")
+ else if (className == TQTEXTBROWSER_OBJECT_NAME_STRING)
return new TQTextBrowser(parent, name);
- else if (className == "TQDial")
+ else if (className == TQDIAL_OBJECT_NAME_STRING)
return new TQDial(parent, name);
- else if (className == "TQSlider")
+ else if (className == TQSLIDER_OBJECT_NAME_STRING)
{
TQSlider *s = new TQSlider(parent, name);
if (!r)
@@ -1052,7 +1052,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
MetaDataBase::addEntry(s);
MetaDataBase::setPropertyChanged(s, "orientation", true);
return s;
- } else if (className == "TQScrollBar")
+ } else if (className == TQSCROLLBAR_OBJECT_NAME_STRING)
{
TQScrollBar *s = new TQScrollBar(parent, name);
if (!r)
@@ -1064,7 +1064,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
MetaDataBase::addEntry(s);
MetaDataBase::setPropertyChanged(s, "orientation", true);
return s;
- } else if (className == "TQFrame")
+ } else if (className == TQFRAME_OBJECT_NAME_STRING)
{
if (!init)
return new TQFrame(parent, name);
@@ -1085,7 +1085,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
else if (r->width() < r->height())
l->setOrientation(Qt::Vertical);
return l;
- } else if (className == "TQMainWindow")
+ } else if (className == TQMAINWINDOW_OBJECT_NAME_STRING)
{
TQMainWindow *mw = new KmdrMainWindow(parent, name, 0);
mw->setDockEnabled(Qt::DockMinimized, false);
@@ -1098,13 +1098,13 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
return mw;
}
#ifndef QT_NO_SQL
- else if (className == "TQDataBrowser")
+ else if (className == TQDATABROWSER_OBJECT_NAME_STRING)
{
TQWidget *w = new QDesignerDataBrowser(parent, name);
if (parent)
w->reparent(parent, TQPoint(0, 0), true);
return w;
- } else if (className == "TQDataView")
+ } else if (className == TQDATAVIEW_OBJECT_NAME_STRING)
{
TQWidget *w = new QDesignerDataView(parent, name);
if (parent)
@@ -1266,37 +1266,37 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&lay
{
layout = 0;
- if ( w && w->inherits( "TQTabWidget" ) )
+ if ( w && w->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) )
w = ((TQTabWidget*)w)->currentPage();
- if ( w->inherits( "TQToolBox" ) )
+ if ( w->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) )
w = ((TQToolBox*)w)->currentItem();
- if ( w && w->inherits( "TQWizard" ) )
+ if ( w && w->inherits( TQWIZARD_OBJECT_NAME_STRING ) )
w = ((TQWizard*)w)->currentPage();
- if ( w && w->inherits( "TQMainWindow" ) )
+ if ( w && w->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) )
w = ((TQMainWindow*)w)->centralWidget();
- if ( w && w->inherits( "TQWidgetStack" ) )
+ if ( w && w->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) )
w = ((TQWidgetStack*)w)->visibleWidget();
- if ( w && w->inherits( "TQSplitter" ) )
+ if ( w && w->inherits( TQSPLITTER_OBJECT_NAME_STRING ) )
return ( (TQSplitter*)w )->orientation() == Horizontal ? HBox : VBox;
if ( !w || !w->layout() )
return NoLayout;
TQLayout *lay = w->layout();
- if ( w->inherits( "TQGroupBox" ) ) {
- TQObjectList *l = lay->queryList( "TQLayout" );
+ if ( w->inherits( TQGROUPBOX_OBJECT_NAME_STRING ) ) {
+ TQObjectList *l = lay->queryList( TQLAYOUT_OBJECT_NAME_STRING );
if ( l && l->first() )
lay = (TQLayout*)l->first();
delete l;
}
layout = lay;
- if ( lay->inherits( "TQHBoxLayout" ) )
+ if ( lay->inherits( TQHBOXLAYOUT_OBJECT_NAME_STRING ) )
return HBox;
- else if ( lay->inherits( "TQVBoxLayout" ) )
+ else if ( lay->inherits( TQVBOXLAYOUT_OBJECT_NAME_STRING ) )
return VBox;
- else if ( lay->inherits( "TQGridLayout" ) )
+ else if ( lay->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) )
return Grid;
return NoLayout;
}
@@ -1306,11 +1306,11 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&lay
*/
WidgetFactory::LayoutType WidgetFactory::layoutType( TQLayout *layout )
{
- if ( layout->inherits( "TQHBoxLayout" ) )
+ if ( layout->inherits( TQHBOXLAYOUT_OBJECT_NAME_STRING ) )
return HBox;
- else if ( layout->inherits( "TQVBoxLayout" ) )
+ else if ( layout->inherits( TQVBOXLAYOUT_OBJECT_NAME_STRING ) )
return VBox;
- else if ( layout->inherits( "TQGridLayout" ) )
+ else if ( layout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) )
return Grid;
return NoLayout;
}
@@ -1349,15 +1349,15 @@ TQWidget* WidgetFactory::containerOfWidget( TQWidget *w )
{
if ( !w )
return w;
- if ( w->inherits( "TQTabWidget" ) )
+ if ( w->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) )
return ((TQTabWidget*)w)->currentPage();
- if ( w->inherits( "TQToolBox" ) )
+ if ( w->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) )
return ((TQToolBox*)w)->currentItem();
- if ( w->inherits( "TQWizard" ) )
+ if ( w->inherits( TQWIZARD_OBJECT_NAME_STRING ) )
return ((TQWizard*)w)->currentPage();
- if ( w->inherits( "TQWidgetStack" ) )
+ if ( w->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) )
return ((TQWidgetStack*)w)->visibleWidget();
- if ( w->inherits( "TQMainWindow" ) )
+ if ( w->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) )
return ((TQMainWindow*)w)->centralWidget();
return w;
}
@@ -1372,7 +1372,7 @@ TQWidget* WidgetFactory::containerOfWidget( TQWidget *w )
TQWidget* WidgetFactory::widgetOfContainer( TQWidget *w )
{
- if ( w->parentWidget() && w->parentWidget()->inherits( "TQWidgetStack" ) )
+ if ( w->parentWidget() && w->parentWidget()->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) )
w = w->parentWidget();
while ( w ) {
if ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ) ||
@@ -1391,19 +1391,19 @@ 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" ) || ::qt_cast<TQToolBox*>(o->parent()) )
+ if ( o->inherits( TQTABBAR_OBJECT_NAME_STRING ) || ::qt_cast<TQToolBox*>(o->parent()) )
return true;
- else if ( o->inherits( "TQSizeGrip" ) )
+ else if ( o->inherits( TQSIZEGRIP_OBJECT_NAME_STRING ) )
return true;
- else if ( o->inherits( "TQToolButton" ) && o->parent() && o->parent()->inherits( "TQTabBar" ) )
+ else if ( o->inherits( TQTOOLBUTTON_OBJECT_NAME_STRING ) && o->parent() && o->parent()->inherits( TQTABBAR_OBJECT_NAME_STRING ) )
return true;
- else if ( o->parent() && o->parent()->inherits( "TQWizard" ) && o->inherits( "TQPushButton" ) )
+ else if ( o->parent() && o->parent()->inherits( TQWIZARD_OBJECT_NAME_STRING ) && o->inherits( TQPUSHBUTTON_OBJECT_NAME_STRING ) )
return true;
- else if ( o->parent() && o->parent()->inherits( "TQMainWindow" ) && o->inherits( "TQMenuBar" ) )
+ else if ( o->parent() && o->parent()->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) && o->inherits( TQMENUBAR_OBJECT_NAME_STRING ) )
return true;
- else if ( o->inherits( "QDockWindowHandle" ) )
+ else if ( o->inherits( TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING ) )
return true;
- else if ( o->inherits( "QHideDock" ) )
+ else if ( o->inherits( TQHIDEDOCK_OBJECT_NAME_STRING ) )
return true;
return false;
@@ -1469,23 +1469,23 @@ void WidgetFactory::initChangedProperties( TQObject *o )
if ( !o->inherits( "QDesignerToolBar" ) && !o->inherits( "QDesignerMenuBar" ) )
MetaDataBase::setPropertyChanged( o, "geometry", true );
- if ( o->inherits( "TQPushButton" ) || o->inherits("TQRadioButton") || o->inherits( "TQCheckBox" ) || o->inherits( "TQToolButton" ) )
+ 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 (::qt_cast<TQToolButton*>(o) && ::qt_cast<TQToolBox*>(widgetOfContainer((TQWidget*)o->parent()))) {
MetaDataBase::setPropertyChanged( o, "usesTextLabel", TRUE );
MetaDataBase::setPropertyChanged( o, "textLabel", TRUE );
MetaDataBase::setPropertyChanged( o, "autoRaise", TRUE );
MetaDataBase::setPropertyChanged( o, "textPosition", TRUE );
- } else if ( o->inherits( "TQGroupBox" ) )
+ } else if ( o->inherits( TQGROUPBOX_OBJECT_NAME_STRING ) )
MetaDataBase::setPropertyChanged( o, "title", true );
- else if ( o->isA( "TQFrame" ) ) {
+ else if ( o->isA( TQFRAME_OBJECT_NAME_STRING ) ) {
MetaDataBase::setPropertyChanged( o, "frameShadow", true );
MetaDataBase::setPropertyChanged( o, "frameShape", true );
- } else if ( o->inherits( "TQTabWidget" ) || o->inherits( "TQWizard" ) ) {
+ } else if ( o->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) || o->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) {
MetaDataBase::setPropertyChanged( o, "pageTitle", true );
MetaDataBase::setPropertyChanged( o, "pageName", true );
#ifndef QT_NO_TABLE
- } else if ( o->inherits( "TQTable" ) && !o->inherits( "TQDataTable" ) ) {
+ } else if ( o->inherits( TQTABLE_OBJECT_NAME_STRING ) && !o->inherits( TQDATATABLE_OBJECT_NAME_STRING ) ) {
MetaDataBase::setPropertyChanged( o, "numRows", true );
MetaDataBase::setPropertyChanged( o, "numCols", true );
TQTable *t = (TQTable*)o;
@@ -1501,7 +1501,7 @@ void WidgetFactory::initChangedProperties( TQObject *o )
MetaDataBase::setPropertyChanged( o, "itemIconSet", true );
MetaDataBase::setPropertyChanged( o, "itemToolTip", true );
MetaDataBase::setPropertyChanged( o, "itemBackgroundMode", true );
- } else if ( o->inherits( "TQSplitter" ) ) {
+ } else if ( o->inherits( TQSPLITTER_OBJECT_NAME_STRING ) ) {
MetaDataBase::setPropertyChanged( o, "orientation", true );
} else if ( o->inherits( "QDesignerToolBar" ) ) {
MetaDataBase::setPropertyChanged( o, "label", true );
@@ -1528,7 +1528,7 @@ bool WidgetFactory::hasSpecialEditor( int id )
return true;
if (className.mid(1) == "IconView")
return true;
- if (className == "TQTextEdit" || className == "TQMultiLineEdit")
+ if (className == TQTEXTEDIT_OBJECT_NAME_STRING || className == TQMULTILINEEDIT_OBJECT_NAME_STRING)
return true;
if (className.contains("Table"))
return true;
@@ -1557,7 +1557,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
#ifdef KOMMANDER
if (className == "ComboBox")
{
- if (!editWidget->inherits("TQComboBox"))
+ if (!editWidget->inherits(TQCOMBOBOX_OBJECT_NAME_STRING))
return;
TQComboBox *cb = (TQComboBox *) editWidget;
@@ -1579,7 +1579,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
}
if (className == "TreeWidget")
{
- if (!editWidget->inherits("TQListView"))
+ if (!editWidget->inherits(TQLISTVIEW_OBJECT_NAME_STRING))
return;
TQListView *lv = (TQListView *) editWidget;
ListViewEditor *e = new ListViewEditor(parent, lv, fw);
@@ -1589,7 +1589,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
}
if (className == "ListBox")
{
- if (!editWidget->inherits("TQListBox"))
+ if (!editWidget->inherits(TQLISTBOX_OBJECT_NAME_STRING))
return;
ListBoxEditor *e = new ListBoxEditor(parent, editWidget, fw);
e->exec();
@@ -1599,7 +1599,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
#endif
if (className.mid(1) == "ListBox")
{
- if (!editWidget->inherits("TQListBox"))
+ if (!editWidget->inherits(TQLISTBOX_OBJECT_NAME_STRING))
return;
ListBoxEditor *e = new ListBoxEditor(parent, editWidget, fw);
e->exec();
@@ -1609,7 +1609,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
if (className.mid(1) == "ComboBox")
{
- if (!editWidget->inherits("TQComboBox"))
+ if (!editWidget->inherits(TQCOMBOBOX_OBJECT_NAME_STRING))
return;
TQComboBox *cb = (TQComboBox *) editWidget;
ListBoxEditor *e = new ListBoxEditor(parent, cb->listBox(), fw);
@@ -1621,7 +1621,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
if (className.mid(1) == "ListView")
{
- if (!editWidget->inherits("TQListView"))
+ if (!editWidget->inherits(TQLISTVIEW_OBJECT_NAME_STRING))
return;
TQListView *lv = (TQListView *) editWidget;
ListViewEditor *e = new ListViewEditor(parent, lv, fw);
@@ -1632,7 +1632,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
if (className.mid(1) == "IconView")
{
- if (!editWidget->inherits("TQIconView"))
+ if (!editWidget->inherits(TQICONVIEW_OBJECT_NAME_STRING))
return;
IconViewEditor *e = new IconViewEditor(parent, editWidget, fw);
e->exec();
@@ -1640,7 +1640,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
return;
}
- if (className == "TQMultiLineEdit" || className == "TQTextEdit")
+ if (className == TQMULTILINEEDIT_OBJECT_NAME_STRING || className == TQTEXTEDIT_OBJECT_NAME_STRING)
{
MultiLineEditor *e = new MultiLineEditor(parent, editWidget, fw);
e->exec();
@@ -1751,7 +1751,7 @@ void QDesignerLabel::updateBuddy()
if ( myBuddy.isEmpty() )
return;
- TQObjectList *l = topLevelWidget()->queryList( "TQWidget", myBuddy, false, true );
+ TQObjectList *l = topLevelWidget()->queryList( TQWIDGET_OBJECT_NAME_STRING, myBuddy, false, true );
if ( !l || !l->first() ) {
delete l;
return;
@@ -1831,8 +1831,8 @@ void QLayoutWidget::updateSizePolicy()
TQObjectListIt it( *children() );
TQObject *o;
- if ( layout()->inherits("TQVBoxLayout") ) {
- if ( parentLayout && parentLayout->inherits("TQHBoxLayout") )
+ if ( layout()->inherits(TQVBOXLAYOUT_OBJECT_NAME_STRING) ) {
+ if ( parentLayout && parentLayout->inherits(TQHBOXLAYOUT_OBJECT_NAME_STRING) )
vt = TQSizePolicy::Minimum;
else
vt = TQSizePolicy::Fixed;
@@ -1852,8 +1852,8 @@ void QLayoutWidget::updateSizePolicy()
if ( w->sizePolicy().mayShrinkVertically() )
vt |= TQSizePolicy::Maximum;
}
- } else if ( layout()->inherits("TQHBoxLayout") ) {
- if ( parentLayout && parentLayout->inherits("TQVBoxLayout") )
+ } else if ( layout()->inherits(TQHBOXLAYOUT_OBJECT_NAME_STRING) ) {
+ if ( parentLayout && parentLayout->inherits(TQVBOXLAYOUT_OBJECT_NAME_STRING) )
ht = TQSizePolicy::Minimum;
else
ht = TQSizePolicy::Fixed;
@@ -1873,13 +1873,13 @@ void QLayoutWidget::updateSizePolicy()
if ( !w->sizePolicy().mayShrinkVertically() )
vt &= ~TQSizePolicy::Maximum;
}
- } else if ( layout()->inherits("TQGridLayout") ) {
+ } else if ( layout()->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) {
ht = TQSizePolicy::Fixed;
vt = TQSizePolicy::Fixed;
if ( parentLayout ) {
- if ( parentLayout->inherits("TQVBoxLayout") )
+ if ( parentLayout->inherits(TQVBOXLAYOUT_OBJECT_NAME_STRING) )
ht = TQSizePolicy::Minimum;
- else if ( parentLayout->inherits("TQHBoxLayout") )
+ else if ( parentLayout->inherits(TQHBOXLAYOUT_OBJECT_NAME_STRING) )
vt = TQSizePolicy::Minimum;
}