summaryrefslogtreecommitdiffstats
path: root/kommander/executor/instance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kommander/executor/instance.cpp')
-rw-r--r--kommander/executor/instance.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/kommander/executor/instance.cpp b/kommander/executor/instance.cpp
index 7676f12d..a8ff3400 100644
--- a/kommander/executor/instance.cpp
+++ b/kommander/executor/instance.cpp
@@ -158,9 +158,9 @@ bool Instance::run()
return false;
// Handle both dialogs and main windows
- if (m_instance->inherits("TQDialog"))
+ if (m_instance->inherits(TQDIALOG_OBJECT_NAME_STRING))
dynamic_cast<TQDialog*>((TQWidget*)m_instance)->exec();
- else if (m_instance->inherits("TQMainWindow"))
+ else if (m_instance->inherits(TQMAINWINDOW_OBJECT_NAME_STRING))
{
kapp->setMainWidget(m_instance);
dynamic_cast<TQMainWindow*>((TQWidget*)m_instance)->show();
@@ -234,14 +234,14 @@ bool Instance::isFileValid(const KURL& fname) const
void Instance::setEnabled(const TQString& widgetName, bool enable)
{
TQObject* child = stringToWidget(widgetName);
- if (child && child->inherits("TQWidget"))
+ if (child && child->inherits(TQWIDGET_OBJECT_NAME_STRING))
((TQWidget*)child)->setEnabled(enable);
}
void Instance::setVisible(const TQString& widgetName, bool visible)
{
TQObject* child = stringToWidget(widgetName);
- if (child && child->inherits("TQWidget"))
+ if (child && child->inherits(TQWIDGET_OBJECT_NAME_STRING))
((TQWidget*)child)->setShown(visible);
}
@@ -250,7 +250,7 @@ void Instance::setText(const TQString& widgetName, const TQString& text)
TQObject* child = stringToWidget(widgetName);
if (kommanderWidget(child))
kommanderWidget(child)->handleDCOP(DCOP::setText, text);
- else if (child && child->inherits("TQLabel"))
+ else if (child && child->inherits(TQLABEL_OBJECT_NAME_STRING))
{
TQLabel* label = (TQLabel*)child;
if (label->pixmap())
@@ -269,7 +269,7 @@ TQString Instance::text(const TQString& widgetName)
TQObject* child = stringToWidget(widgetName);
if (kommanderWidget(child))
return kommanderWidget(child)->handleDCOP(DCOP::text);
- else if (child && child->inherits("TQLabel"))
+ else if (child && child->inherits(TQLABEL_OBJECT_NAME_STRING))
return ((TQLabel*)child)->text();
return TQString();
}
@@ -279,7 +279,7 @@ void Instance::setSelection(const TQString& widgetName, const TQString& text)
TQObject* child = stringToWidget(widgetName);
if (kommanderWidget(child))
kommanderWidget(child)->handleDCOP(DCOP::setSelection, text);
- else if (child && child->inherits("TQLabel"))
+ else if (child && child->inherits(TQLABEL_OBJECT_NAME_STRING))
((TQLabel*)child)->setText(text);
}
@@ -426,7 +426,7 @@ TQStringList Instance::associatedText(const TQString &widgetName)
TQString Instance::type(const TQString& widget)
{
TQObject* child = stringToWidget(widget);
- if (child && child->inherits("TQWidget"))
+ if (child && child->inherits(TQWIDGET_OBJECT_NAME_STRING))
return child->className();
return TQString();
}
@@ -438,9 +438,9 @@ TQStringList Instance::children(const TQString& parent, bool recursive)
TQObjectList* widgets;
if (!child)
child = m_instance;
- if (child->inherits("TQWidget"))
+ if (child->inherits(TQWIDGET_OBJECT_NAME_STRING))
{
- widgets = child->queryList("TQWidget", 0, false, recursive);
+ widgets = child->queryList(TQWIDGET_OBJECT_NAME_STRING, 0, false, recursive);
for (TQObject* w = widgets->first(); w; w = widgets->next())
if (w->name() && kommanderWidget(w))
matching.append(w->name());