summaryrefslogtreecommitdiffstats
path: root/kexi/formeditor
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2023-07-11 21:42:08 +0900
committerMichele Calgaro <[email protected]>2023-07-11 21:42:08 +0900
commit20e4a19b0d7cc800d57be50c56d69023adae4046 (patch)
tree522b0ae95b8f7e9ee59a3b405de24b2dd8180bc4 /kexi/formeditor
parentc2fdb394e63c0df50f1a38eace1077a9151374ce (diff)
downloadkoffice-20e4a19b0d7cc800d57be50c56d69023adae4046.tar.gz
koffice-20e4a19b0d7cc800d57be50c56d69023adae4046.zip
Replace _OBJECT_NAME_STRING defines with actual strings. This relates to the merging of tqtinterface with tqt3.
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'kexi/formeditor')
-rw-r--r--kexi/formeditor/commands.cpp8
-rw-r--r--kexi/formeditor/container.cpp18
-rw-r--r--kexi/formeditor/factories/containerfactory.cpp72
-rw-r--r--kexi/formeditor/factories/stdwidgetfactory.cpp72
-rw-r--r--kexi/formeditor/form.cpp4
-rw-r--r--kexi/formeditor/form.h2
-rw-r--r--kexi/formeditor/formIO.cpp12
-rw-r--r--kexi/formeditor/formmanager.cpp12
-rw-r--r--kexi/formeditor/tdevelop_plugin/kfd_kdev_part.cpp2
-rw-r--r--kexi/formeditor/test/kfd_part.cpp2
-rw-r--r--kexi/formeditor/utils.cpp4
-rw-r--r--kexi/formeditor/utils.h2
-rw-r--r--kexi/formeditor/widgetfactory.cpp2
-rw-r--r--kexi/formeditor/widgetpropertyset.cpp2
14 files changed, 107 insertions, 107 deletions
diff --git a/kexi/formeditor/commands.cpp b/kexi/formeditor/commands.cpp
index 3e22fcdd..10bd7eb3 100644
--- a/kexi/formeditor/commands.cpp
+++ b/kexi/formeditor/commands.cpp
@@ -378,10 +378,10 @@ AdjustSizeCommand::AdjustSizeCommand(int type, WidgetList &list, Form *form)
{
for(TQWidget *w = list.first(); w; w = list.next())
{
- if(w->parentWidget() && w->parentWidget()->isA(TQWIDGETSTACK_OBJECT_NAME_STRING))
+ if(w->parentWidget() && w->parentWidget()->isA("TQWidgetStack"))
{
w = w->parentWidget(); // widget is WidgetStack page
- if(w->parentWidget() && w->parentWidget()->inherits(TQTABWIDGET_OBJECT_NAME_STRING)) // widget is tabwidget page
+ if(w->parentWidget() && w->parentWidget()->inherits("TQTabWidget")) // widget is tabwidget page
w = w->parentWidget();
}
@@ -888,7 +888,7 @@ CreateLayoutCommand::execute()
TQCString classname;
switch(m_type) {
case Container::HSplitter: case Container::VSplitter:
- classname = TQSPLITTER_OBJECT_NAME_STRING; break;
+ classname = "TQSplitter"; break;
default:
classname = Container::layoutTypeToString(m_type).latin1();
}
@@ -1385,7 +1385,7 @@ DeleteWidgetCommand::DeleteWidgetCommand(WidgetList &list, Form *form)
{
TQWidget *w = it.current();
// Don't delete tabwidget or widgetstack pages
- if(w->parentWidget()->inherits(TQWIDGETSTACK_OBJECT_NAME_STRING))
+ if(w->parentWidget()->inherits("TQWidgetStack"))
{
list.remove(w);
continue;
diff --git a/kexi/formeditor/container.cpp b/kexi/formeditor/container.cpp
index a785893f..4ea7f97e 100644
--- a/kexi/formeditor/container.cpp
+++ b/kexi/formeditor/container.cpp
@@ -61,7 +61,7 @@ EventEater::eventFilter(TQObject *, TQEvent *ev)
// When the user click the empty part of tab bar, only MouseReleaseEvent is sent,
// we need to simulate the Press event
- if(ev->type() == TQEvent::MouseButtonRelease && m_widget->inherits(TQTABWIDGET_OBJECT_NAME_STRING))
+ if(ev->type() == TQEvent::MouseButtonRelease && m_widget->inherits("TQTabWidget"))
{
TQMouseEvent *mev = TQT_TQMOUSEEVENT(ev);
if(mev->button() == Qt::LeftButton)
@@ -225,7 +225,7 @@ Container::eventFilter(TQObject *s, TQEvent *e)
m_state = DrawingSelectionRect;
}
else {
- if(s->inherits(TQTABWIDGET_OBJECT_NAME_STRING)) // to allow changing page by clicking tab
+ if(s->inherits("TQTabWidget")) // to allow changing page by clicking tab
return false;
}
@@ -299,7 +299,7 @@ Container::eventFilter(TQObject *s, TQEvent *e)
{
if(!m_toplevel && m_moving == m_container) // no effect for form
return false;
- if((!m_moving) || (!m_moving->parentWidget()))// || (m_moving->parentWidget()->inherits(TQWIDGETSTACK_OBJECT_NAME_STRING)))
+ if((!m_moving) || (!m_moving->parentWidget()))// || (m_moving->parentWidget()->inherits("TQWidgetStack")))
return true;
moveSelectedWidgetsBy(mev->x() - m_grab.x(), mev->y() - m_grab.y());
@@ -1107,13 +1107,13 @@ Container::moveSelectedWidgetsBy(int realdx, int realdy, TQMouseEvent *mev)
for(TQWidget *w = m_form->selectedWidgets()->first(); w; w = m_form->selectedWidgets()->next())
{
- if(!w || !w->parent() || w->parent()->inherits(TQTABWIDGET_OBJECT_NAME_STRING) || w->parent()->inherits(TQWIDGETSTACK_OBJECT_NAME_STRING))
+ if(!w || !w->parent() || w->parent()->inherits("TQTabWidget") || w->parent()->inherits("TQWidgetStack"))
continue;
- if(w->parentWidget() && w->parentWidget()->isA(TQWIDGETSTACK_OBJECT_NAME_STRING))
+ if(w->parentWidget() && w->parentWidget()->isA("TQWidgetStack"))
{
w = w->parentWidget(); // widget is WidgetStack page
- if(w->parentWidget() && w->parentWidget()->inherits(TQTABWIDGET_OBJECT_NAME_STRING)) // widget is tabwidget page
+ if(w->parentWidget() && w->parentWidget()->inherits("TQTabWidget")) // widget is tabwidget page
w = w->parentWidget();
}
@@ -1133,13 +1133,13 @@ Container::moveSelectedWidgetsBy(int realdx, int realdy, TQMouseEvent *mev)
for(TQWidget *w = m_form->selectedWidgets()->first(); w; w = m_form->selectedWidgets()->next())
{
// Don't move tab widget pages (or widget stack pages)
- if(!w || !w->parent() || w->parent()->inherits(TQTABWIDGET_OBJECT_NAME_STRING) || w->parent()->inherits(TQWIDGETSTACK_OBJECT_NAME_STRING))
+ if(!w || !w->parent() || w->parent()->inherits("TQTabWidget") || w->parent()->inherits("TQWidgetStack"))
continue;
- if(w->parentWidget() && w->parentWidget()->isA(TQWIDGETSTACK_OBJECT_NAME_STRING))
+ if(w->parentWidget() && w->parentWidget()->isA("TQWidgetStack"))
{
w = w->parentWidget(); // widget is WidgetStack page
- if(w->parentWidget() && w->parentWidget()->inherits(TQTABWIDGET_OBJECT_NAME_STRING)) // widget is tabwidget page
+ if(w->parentWidget() && w->parentWidget()->inherits("TQTabWidget")) // widget is tabwidget page
w = w->parentWidget();
}
diff --git a/kexi/formeditor/factories/containerfactory.cpp b/kexi/formeditor/factories/containerfactory.cpp
index 8b0d5fc5..b0005dd9 100644
--- a/kexi/formeditor/factories/containerfactory.cpp
+++ b/kexi/formeditor/factories/containerfactory.cpp
@@ -244,11 +244,11 @@ InsertPageCommand::execute()
TQWidget *parent = m_form->objectTree()->lookup(m_parentname)->widget();
if(m_name.isEmpty()) {
m_name = container->form()->objectTree()->generateUniqueName(
- container->form()->library()->displayName(TQWIDGET_OBJECT_NAME_STRING).latin1(),
+ container->form()->library()->displayName("TQWidget").latin1(),
/*!numberSuffixRequired*/false);
}
- TQWidget *page = container->form()->library()->createWidget(TQWIDGET_OBJECT_NAME_STRING, parent, m_name.latin1(), container);
+ TQWidget *page = container->form()->library()->createWidget("TQWidget", parent, m_name.latin1(), container);
// TQWidget *page = new ContainerWidget(parent, m_name.latin1());
// new KFormDesigner::Container(container, page, parent);
@@ -263,7 +263,7 @@ InsertPageCommand::execute()
KFormDesigner::ObjectTreeItem *item = container->form()->objectTree()->lookup(m_name);
item->addModifiedProperty("title", n);
}
- else if(classname == TQWIDGETSTACK_OBJECT_NAME_STRING)
+ else if(classname == "TQWidgetStack")
{
TQWidgetStack *stack = (TQWidgetStack*)parent;
stack->addWidget(page, m_pageid);
@@ -291,7 +291,7 @@ InsertPageCommand::unexecute()
TabWidgetBase *tab = dynamic_cast<TabWidgetBase*>(parent);
tab->removePage(page);
}
- else if(classname == TQWIDGETSTACK_OBJECT_NAME_STRING)
+ else if(classname == "TQWidgetStack")
{
TQWidgetStack *stack = (TQWidgetStack*)parent;
int id = stack->id(page) - 1;
@@ -357,7 +357,7 @@ ContainerFactory::ContainerFactory(TQObject *parent, const char *, const TQStrin
{
KFormDesigner::WidgetInfo *wBtnGroup = new KFormDesigner::WidgetInfo(this);
wBtnGroup->setPixmap("frame");
- wBtnGroup->setClassName(TQBUTTONGROUP_OBJECT_NAME_STRING);
+ wBtnGroup->setClassName("TQButtonGroup");
wBtnGroup->setName(i18n("Button Group"));
wBtnGroup->setNamePrefix(
i18n("Widget name. This string will be used to name widgets of this class. It must _not_ contain white spaces and non latin1 characters.", "buttonGroup"));
@@ -369,11 +369,11 @@ ContainerFactory::ContainerFactory(TQObject *parent, const char *, const TQStrin
wTabWidget->setClassName("KFDTabWidget");
#if TDE_VERSION >= TDE_MAKE_VERSION(3,1,9)
wTabWidget->addAlternateClassName("KTabWidget");
- wTabWidget->addAlternateClassName(TQTABWIDGET_OBJECT_NAME_STRING);
-//tmp: wTabWidget->setSavingName(TQTABWIDGET_OBJECT_NAME_STRING);
+ wTabWidget->addAlternateClassName("TQTabWidget");
+//tmp: wTabWidget->setSavingName("TQTabWidget");
wTabWidget->setSavingName("KTabWidget");
#else
- wTabWidget->setSavingName(TQTABWIDGET_OBJECT_NAME_STRING);
+ wTabWidget->setSavingName("TQTabWidget");
#endif
wTabWidget->setIncludeFileName("ktabwidget.h");
wTabWidget->setName(i18n("Tab Widget"));
@@ -384,7 +384,7 @@ ContainerFactory::ContainerFactory(TQObject *parent, const char *, const TQStrin
KFormDesigner::WidgetInfo *wWidget = new KFormDesigner::WidgetInfo(this);
wWidget->setPixmap("frame");
- wWidget->setClassName(TQWIDGET_OBJECT_NAME_STRING);
+ wWidget->setClassName("TQWidget");
wWidget->addAlternateClassName("ContainerWidget");
wWidget->setName(i18n("Basic container"));
wWidget->setNamePrefix(
@@ -394,7 +394,7 @@ ContainerFactory::ContainerFactory(TQObject *parent, const char *, const TQStrin
KFormDesigner::WidgetInfo *wGroupBox = new KFormDesigner::WidgetInfo(this);
wGroupBox->setPixmap("groupbox");
- wGroupBox->setClassName(TQGROUPBOX_OBJECT_NAME_STRING);
+ wGroupBox->setClassName("TQGroupBox");
wGroupBox->addAlternateClassName("GroupBox");
wGroupBox->setName(i18n("Group Box"));
wGroupBox->setNamePrefix(
@@ -404,7 +404,7 @@ ContainerFactory::ContainerFactory(TQObject *parent, const char *, const TQStrin
KFormDesigner::WidgetInfo *wFrame = new KFormDesigner::WidgetInfo(this);
wFrame->setPixmap("frame");
- wFrame->setClassName(TQFRAME_OBJECT_NAME_STRING);
+ wFrame->setClassName("TQFrame");
wFrame->setName(i18n("Frame"));
wFrame->setNamePrefix(
i18n("Widget name. This string will be used to name widgets of this class. It must _not_ contain white spaces and non latin1 characters.", "frame"));
@@ -413,7 +413,7 @@ ContainerFactory::ContainerFactory(TQObject *parent, const char *, const TQStrin
KFormDesigner::WidgetInfo *wWidgetStack = new KFormDesigner::WidgetInfo(this);
wWidgetStack->setPixmap("widgetstack");
- wWidgetStack->setClassName(TQWIDGETSTACK_OBJECT_NAME_STRING);
+ wWidgetStack->setClassName("TQWidgetStack");
wWidgetStack->setName(i18n("Widget Stack"));
wWidgetStack->setNamePrefix(
i18n("Widget name. This string will be used to name widgets of this class. It must _not_ contain white spaces and non latin1 characters.", "widgetStack"));
@@ -451,7 +451,7 @@ ContainerFactory::ContainerFactory(TQObject *parent, const char *, const TQStrin
//! @todo horizontal/vertical splitter icons
wSplitter->setPixmap("frame");
wSplitter->setClassName("Splitter");
- wSplitter->addAlternateClassName(TQSPLITTER_OBJECT_NAME_STRING);
+ wSplitter->addAlternateClassName("TQSplitter");
wSplitter->setName(i18n("Splitter"));
wSplitter->setNamePrefix(
i18n("Widget name. This string will be used to name widgets of this class. It must _not_ contain white spaces and non latin1 characters.", "splitter"));
@@ -508,7 +508,7 @@ TQWidget*
ContainerFactory::createWidget(const TQCString &c, TQWidget *p, const char *n,
KFormDesigner::Container *container, int options)
{
- if(c == TQBUTTONGROUP_OBJECT_NAME_STRING)
+ if(c == "TQButtonGroup")
{
TQString text = container->form()->library()->textForWidgetName(n, c);
TQButtonGroup *w = new TQButtonGroup(/*i18n("Button Group")*/text, p, n);
@@ -538,20 +538,20 @@ ContainerFactory::createWidget(const TQCString &c, TQWidget *p, const char *n,
return tab;
}
- else if(c == TQWIDGET_OBJECT_NAME_STRING || c=="ContainerWidget")
+ else if(c == "TQWidget" || c=="ContainerWidget")
{
TQWidget *w = new ContainerWidget(p, n);
new KFormDesigner::Container(container, w, TQT_TQOBJECT(p));
return w;
}
- else if(c == TQGROUPBOX_OBJECT_NAME_STRING || c == "GroupBox")
+ else if(c == "TQGroupBox" || c == "GroupBox")
{
TQString text = container->form()->library()->textForWidgetName(n, c);
TQGroupBox *w = new GroupBox(text, p, n);
new KFormDesigner::Container(container, w, container);
return w;
}
- else if(c == TQFRAME_OBJECT_NAME_STRING)
+ else if(c == "TQFrame")
{
TQFrame *w = new TQFrame(p, n);
w->setLineWidth(2);
@@ -559,7 +559,7 @@ ContainerFactory::createWidget(const TQCString &c, TQWidget *p, const char *n,
new KFormDesigner::Container(container, w, container);
return w;
}
- else if(c == TQWIDGETSTACK_OBJECT_NAME_STRING)
+ else if(c == "TQWidgetStack")
{
TQWidgetStack *stack = new TQWidgetStack(p, n);
stack->setLineWidth(2);
@@ -606,7 +606,7 @@ ContainerFactory::createWidget(const TQCString &c, TQWidget *p, const char *n,
SubForm *subform = new SubForm(p, n);
return subform;
}
- else if(c == TQSPLITTER_OBJECT_NAME_STRING) {
+ else if(c == "TQSplitter") {
TQSplitter *split = new TQSplitter(p, n);
if (0 == (options & WidgetFactory::AnyOrientation))
split->setOrientation(
@@ -651,9 +651,9 @@ ContainerFactory::createMenuActions(const TQCString &classname, TQWidget *w, TQP
//m_widget = w;
// m_container = container;
- if((classname == "KFDTabWidget") || (w->parentWidget()->parentWidget()->inherits(TQTABWIDGET_OBJECT_NAME_STRING)))
+ if((classname == "KFDTabWidget") || (w->parentWidget()->parentWidget()->inherits("TQTabWidget")))
{
- if(w->parentWidget()->parentWidget()->inherits(TQTABWIDGET_OBJECT_NAME_STRING))
+ if(w->parentWidget()->parentWidget()->inherits("TQTabWidget"))
{
//m_widget = w->parentWidget()->parentWidget();
setWidget(w->parentWidget()->parentWidget(), m_container->toplevel());
@@ -668,7 +668,7 @@ ContainerFactory::createMenuActions(const TQCString &classname, TQWidget *w, TQP
menu->setItemEnabled(id, false);
return true;
}
- else if(w->parentWidget()->isA(TQWIDGETSTACK_OBJECT_NAME_STRING) && !w->parentWidget()->parentWidget()->inherits(TQTABWIDGET_OBJECT_NAME_STRING))
+ else if(w->parentWidget()->isA("TQWidgetStack") && !w->parentWidget()->parentWidget()->inherits("TQTabWidget"))
{
//m_widget = w->parentWidget();
TQWidgetStack *stack = (TQWidgetStack*)w->parentWidget(); //m_widget;
@@ -702,14 +702,14 @@ bool
ContainerFactory::startEditing(const TQCString &classname, TQWidget *w, KFormDesigner::Container *container)
{
m_container = container;
- if(classname == TQBUTTONGROUP_OBJECT_NAME_STRING)
+ if(classname == "TQButtonGroup")
{
TQButtonGroup *group = static_cast<TQButtonGroup*>(w);
TQRect r = TQRect(group->x()+2, group->y()-5, group->width()-10, w->fontMetrics().height() + 10);
createEditor(classname, group->title(), group, container, r, TQt::AlignAuto);
return true;
}
- if(classname == TQGROUPBOX_OBJECT_NAME_STRING || classname == "GroupBox")
+ if(classname == "TQGroupBox" || classname == "GroupBox")
{
TQGroupBox *group = static_cast<TQGroupBox*>(w);
TQRect r = TQRect(group->x()+2, group->y()-5, group->width()-10, w->fontMetrics().height() + 10);
@@ -722,12 +722,12 @@ ContainerFactory::startEditing(const TQCString &classname, TQWidget *w, KFormDes
bool
ContainerFactory::saveSpecialProperty(const TQCString &, const TQString &name, const TQVariant &, TQWidget *w, TQDomElement &parentNode, TQDomDocument &parent)
{
- if((name == "title") && (w->parentWidget()->parentWidget()->inherits(TQTABWIDGET_OBJECT_NAME_STRING)))
+ if((name == "title") && (w->parentWidget()->parentWidget()->inherits("TQTabWidget")))
{
TabWidgetBase *tab = dynamic_cast<TabWidgetBase*>(w->parentWidget()->parentWidget());
KFormDesigner::FormIO::savePropertyElement(parentNode, parent, "attribute", "title", tab->tabLabel(w));
}
- else if((name == "id") && (w->parentWidget()->isA(TQWIDGETSTACK_OBJECT_NAME_STRING)))
+ else if((name == "id") && (w->parentWidget()->isA("TQWidgetStack")))
{
TQWidgetStack *stack = (TQWidgetStack*)w->parentWidget();
KFormDesigner::FormIO::savePropertyElement(parentNode, parent, "attribute", "id", stack->id(w));
@@ -741,7 +741,7 @@ bool
ContainerFactory::readSpecialProperty(const TQCString &, TQDomElement &node, TQWidget *w, KFormDesigner::ObjectTreeItem *item)
{
TQString name = node.attribute("name");
- if((name == "title") && (item->parent()->widget()->inherits(TQTABWIDGET_OBJECT_NAME_STRING)))
+ if((name == "title") && (item->parent()->widget()->inherits("TQTabWidget")))
{
TabWidgetBase *tab = dynamic_cast<TabWidgetBase*>(w->parentWidget());
tab->addTab(w, node.firstChild().toElement().text());
@@ -749,7 +749,7 @@ ContainerFactory::readSpecialProperty(const TQCString &, TQDomElement &node, TQW
return true;
}
- if((name == "id") && (w->parentWidget()->isA(TQWIDGETSTACK_OBJECT_NAME_STRING)))
+ if((name == "id") && (w->parentWidget()->isA("TQWidgetStack")))
{
TQWidgetStack *stack = (TQWidgetStack*)w->parentWidget();
int id = KFormDesigner::FormIO::readPropertyValue(node.firstChild(), TQT_TQOBJECT(w), name).toInt();
@@ -768,7 +768,7 @@ ContainerFactory::autoSaveProperties(const TQCString &c)
TQValueList<TQCString> lst;
// if(c == "SubForm")
// lst << "formName";
- if(c == TQSPLITTER_OBJECT_NAME_STRING)
+ if(c == "TQSplitter")
lst << "orientation";
return lst;
}
@@ -784,7 +784,7 @@ ContainerFactory::isPropertyVisibleInternal(const TQCString &classname,
{
return property == "name" || property == "geometry";
}
- else if (classname == TQGROUPBOX_OBJECT_NAME_STRING || classname=="GroupBox") {
+ else if (classname == "TQGroupBox" || classname=="GroupBox") {
ok =
#ifdef KEXI_NO_UNFINISHED
/*! @todo Hidden for now in Kexi. "checkable" and "checked" props need adding
@@ -821,8 +821,8 @@ ContainerFactory::resizeEditor(TQWidget *editor, TQWidget *widget, const TQCStri
void ContainerFactory::addTabPage()
{
-// if (!m_widget->inherits(TQTABWIDGET_OBJECT_NAME_STRING))
- if (!widget()->inherits(TQTABWIDGET_OBJECT_NAME_STRING))
+// if (!m_widget->inherits("TQTabWidget"))
+ if (!widget()->inherits("TQTabWidget"))
return;
KCommand *com = new InsertPageCommand(m_container, widget());
if(dynamic_cast<TabWidgetBase*>(widget())->count() == 0)
@@ -836,7 +836,7 @@ void ContainerFactory::addTabPage()
void ContainerFactory::removeTabPage()
{
- if (!widget()->inherits(TQTABWIDGET_OBJECT_NAME_STRING))
+ if (!widget()->inherits("TQTabWidget"))
return;
TabWidgetBase *tab = dynamic_cast<TabWidgetBase*>(widget());
TQWidget *w = tab->currentPage();
@@ -850,7 +850,7 @@ void ContainerFactory::removeTabPage()
void ContainerFactory::renameTabPage()
{
- if (!widget()->inherits(TQTABWIDGET_OBJECT_NAME_STRING))
+ if (!widget()->inherits("TQTabWidget"))
return;
TabWidgetBase *tab = dynamic_cast<TabWidgetBase*>(widget());
TQWidget *w = tab->currentPage();
@@ -878,7 +878,7 @@ void ContainerFactory::reorderTabs(int oldpos, int newpos)
void ContainerFactory::addStackPage()
{
- if (!widget()->isA(TQWIDGETSTACK_OBJECT_NAME_STRING))
+ if (!widget()->isA("TQWidgetStack"))
return;
KCommand *com = new InsertPageCommand(m_container, widget());
if(!((TQWidgetStack*)widget())->visibleWidget())
@@ -892,7 +892,7 @@ void ContainerFactory::addStackPage()
void ContainerFactory::removeStackPage()
{
- if (!widget()->isA(TQWIDGETSTACK_OBJECT_NAME_STRING))
+ if (!widget()->isA("TQWidgetStack"))
return;
TQWidgetStack *stack = (TQWidgetStack*)widget();
TQWidget *page = stack->visibleWidget();
diff --git a/kexi/formeditor/factories/stdwidgetfactory.cpp b/kexi/formeditor/factories/stdwidgetfactory.cpp
index adb4d1bf..a74097a0 100644
--- a/kexi/formeditor/factories/stdwidgetfactory.cpp
+++ b/kexi/formeditor/factories/stdwidgetfactory.cpp
@@ -125,7 +125,7 @@ StdWidgetFactory::StdWidgetFactory(TQObject *parent, const char *, const TQStrin
KFormDesigner::WidgetInfo *wLabel = new KFormDesigner::WidgetInfo(this);
wLabel->setPixmap("label");
- wLabel->setClassName(TQLABEL_OBJECT_NAME_STRING);
+ wLabel->setClassName("TQLabel");
wLabel->setName(i18n("Text Label"));
wLabel->setNamePrefix(
i18n("Widget name. This string will be used to name widgets of this class. It must _not_ contain white spaces and non latin1 characters.", "label"));
@@ -137,7 +137,7 @@ StdWidgetFactory::StdWidgetFactory(TQObject *parent, const char *, const TQStrin
wPixLabel->setClassName("KexiPictureLabel");
wPixLabel->setName(i18n("Picture Label"));
//! @todo TQt designer compatibility: maybe use this class when TQLabel has a pixmap set...?
- //wPixLabel->addAlternateClassName(TQLABEL_OBJECT_NAME_STRING);
+ //wPixLabel->addAlternateClassName("TQLabel");
wPixLabel->setSavingName("KexiPictureLabel");
wPixLabel->setNamePrefix(
i18n("Widget name. This string will be used to name widgets of this class. It must _not_ contain white spaces and non latin1 characters.", "picture"));
@@ -147,7 +147,7 @@ StdWidgetFactory::StdWidgetFactory(TQObject *parent, const char *, const TQStrin
KFormDesigner::WidgetInfo *wLineEdit = new KFormDesigner::WidgetInfo(this);
wLineEdit->setPixmap("lineedit");
wLineEdit->setClassName("KLineEdit");
- wLineEdit->addAlternateClassName(TQLINEEDIT_OBJECT_NAME_STRING);
+ wLineEdit->addAlternateClassName("TQLineEdit");
wLineEdit->setIncludeFileName("klineedit.h");
wLineEdit->setName(i18n("Line Edit"));
wLineEdit->setNamePrefix(
@@ -167,7 +167,7 @@ StdWidgetFactory::StdWidgetFactory(TQObject *parent, const char *, const TQStrin
KFormDesigner::WidgetInfo *wPushButton = new KFormDesigner::WidgetInfo(this);
wPushButton->setPixmap("button");
wPushButton->setClassName("KPushButton");
- wPushButton->addAlternateClassName(TQPUSHBUTTON_OBJECT_NAME_STRING);
+ wPushButton->addAlternateClassName("TQPushButton");
wPushButton->setIncludeFileName("kpushbutton.h");
wPushButton->setName(i18n("Push Button"));
wPushButton->setNamePrefix(
@@ -177,7 +177,7 @@ StdWidgetFactory::StdWidgetFactory(TQObject *parent, const char *, const TQStrin
KFormDesigner::WidgetInfo *wRadioButton = new KFormDesigner::WidgetInfo(this);
wRadioButton->setPixmap("radio");
- wRadioButton->setClassName(TQRADIOBUTTON_OBJECT_NAME_STRING);
+ wRadioButton->setClassName("TQRadioButton");
wRadioButton->setName(i18n("Option Button"));
wRadioButton->setNamePrefix(
i18n("Widget name. This string will be used to name widgets of this class. It must _not_ contain white spaces and non latin1 characters.", "optionButton"));
@@ -186,7 +186,7 @@ StdWidgetFactory::StdWidgetFactory(TQObject *parent, const char *, const TQStrin
KFormDesigner::WidgetInfo *wCheckBox = new KFormDesigner::WidgetInfo(this);
wCheckBox->setPixmap("check");
- wCheckBox->setClassName(TQCHECKBOX_OBJECT_NAME_STRING);
+ wCheckBox->setClassName("TQCheckBox");
wCheckBox->setName(i18n("Check Box"));
wCheckBox->setNamePrefix(
i18n("Widget name. This string will be used to name widgets of this class. It must _not_ contain white spaces and non latin1 characters.", "checkBox"));
@@ -196,7 +196,7 @@ StdWidgetFactory::StdWidgetFactory(TQObject *parent, const char *, const TQStrin
KFormDesigner::WidgetInfo *wSpinBox = new KFormDesigner::WidgetInfo(this);
wSpinBox->setPixmap("spin");
wSpinBox->setClassName("KIntSpinBox");
- wSpinBox->addAlternateClassName(TQSPINBOX_OBJECT_NAME_STRING);
+ wSpinBox->addAlternateClassName("TQSpinBox");
wSpinBox->setIncludeFileName("knuminput.h");
wSpinBox->setName(i18n("Spin Box"));
wSpinBox->setNamePrefix(
@@ -207,7 +207,7 @@ StdWidgetFactory::StdWidgetFactory(TQObject *parent, const char *, const TQStrin
KFormDesigner::WidgetInfo *wComboBox = new KFormDesigner::WidgetInfo(this);
wComboBox->setPixmap("combo");
wComboBox->setClassName("KComboBox");
- wComboBox->addAlternateClassName(TQCOMBOBOX_OBJECT_NAME_STRING);
+ wComboBox->addAlternateClassName("TQComboBox");
wComboBox->setIncludeFileName("kcombobox.h");
wComboBox->setName(i18n("Combo Box"));
wComboBox->setNamePrefix(
@@ -218,7 +218,7 @@ StdWidgetFactory::StdWidgetFactory(TQObject *parent, const char *, const TQStrin
KFormDesigner::WidgetInfo *wListBox = new KFormDesigner::WidgetInfo(this);
wListBox->setPixmap("listbox");
wListBox->setClassName("TDEListBox");
- wListBox->addAlternateClassName(TQLISTBOX_OBJECT_NAME_STRING);
+ wListBox->addAlternateClassName("TQListBox");
wListBox->setIncludeFileName("tdelistbox.h");
wListBox->setName(i18n("List Box"));
wListBox->setNamePrefix(
@@ -229,7 +229,7 @@ StdWidgetFactory::StdWidgetFactory(TQObject *parent, const char *, const TQStrin
KFormDesigner::WidgetInfo *wTextEdit = new KFormDesigner::WidgetInfo(this);
wTextEdit->setPixmap("textedit");
wTextEdit->setClassName("KTextEdit");
- wTextEdit->addAlternateClassName(TQTEXTEDIT_OBJECT_NAME_STRING);
+ wTextEdit->addAlternateClassName("TQTextEdit");
wTextEdit->setIncludeFileName("ktextedit.h");
wTextEdit->setName(i18n("Text Editor"));
wTextEdit->setNamePrefix(
@@ -240,7 +240,7 @@ StdWidgetFactory::StdWidgetFactory(TQObject *parent, const char *, const TQStrin
KFormDesigner::WidgetInfo *wListView = new KFormDesigner::WidgetInfo(this);
wListView->setPixmap("listview");
wListView->setClassName("TDEListView");
- wListView->addAlternateClassName(TQLISTVIEW_OBJECT_NAME_STRING);
+ wListView->addAlternateClassName("TQListView");
wListView->setIncludeFileName("tdelistview.h");
wListView->setName(i18n("List View"));
wListView->setNamePrefix(
@@ -250,7 +250,7 @@ StdWidgetFactory::StdWidgetFactory(TQObject *parent, const char *, const TQStrin
KFormDesigner::WidgetInfo *wSlider = new KFormDesigner::WidgetInfo(this);
wSlider->setPixmap("slider");
- wSlider->setClassName(TQSLIDER_OBJECT_NAME_STRING);
+ wSlider->setClassName("TQSlider");
wSlider->setName(i18n("Slider"));
wSlider->setNamePrefix(
i18n("Widget name. This string will be used to name widgets of this class. It must _not_ contain white spaces and non latin1 characters.", "slider"));
@@ -260,7 +260,7 @@ StdWidgetFactory::StdWidgetFactory(TQObject *parent, const char *, const TQStrin
KFormDesigner::WidgetInfo *wProgressBar = new KFormDesigner::WidgetInfo(this);
wProgressBar->setPixmap("progress");
wProgressBar->setClassName("KProgress");
- wProgressBar->addAlternateClassName(TQPROGRESSBAR_OBJECT_NAME_STRING);
+ wProgressBar->addAlternateClassName("TQProgressBar");
wProgressBar->setIncludeFileName("kprogress.h");
wProgressBar->setName(i18n("Progress Bar"));
wProgressBar->setNamePrefix(
@@ -281,7 +281,7 @@ StdWidgetFactory::StdWidgetFactory(TQObject *parent, const char *, const TQStrin
wDate->setPixmap("dateedit");
wDate->setClassName("KDateWidget");
#if TDE_VERSION >= TDE_MAKE_VERSION(3,1,9)
- wDate->addAlternateClassName(TQDATEEDIT_OBJECT_NAME_STRING);
+ wDate->addAlternateClassName("TQDateEdit");
wDate->setIncludeFileName("kdatewidget.h");
#endif
wDate->setName(i18n("Date Widget"));
@@ -294,7 +294,7 @@ StdWidgetFactory::StdWidgetFactory(TQObject *parent, const char *, const TQStrin
wTime->setPixmap("timeedit");
wTime->setClassName("KTimeWidget");
#if TDE_VERSION >= TDE_MAKE_VERSION(3,1,9)
- wTime->addAlternateClassName(TQTIMEEDIT_OBJECT_NAME_STRING);
+ wTime->addAlternateClassName("TQTimeEdit");
wTime->setIncludeFileName("ktimewidget.h");
#endif
wTime->setName(i18n("Time Widget"));
@@ -307,7 +307,7 @@ StdWidgetFactory::StdWidgetFactory(TQObject *parent, const char *, const TQStrin
wDateTime->setPixmap("datetimeedit");
wDateTime->setClassName("KDateTimeWidget");
#if TDE_VERSION >= TDE_MAKE_VERSION(3,1,9)
- wDateTime->addAlternateClassName(TQDATETIMEEDIT_OBJECT_NAME_STRING);
+ wDateTime->addAlternateClassName("TQDateTimeEdit");
wDateTime->setIncludeFileName("kdatetimewidget.h");
#endif
wDateTime->setName(i18n("Date/Time Widget"));
@@ -385,7 +385,7 @@ StdWidgetFactory::createWidget(const TQCString &c, TQWidget *p, const char *n,
TQString text( container->form()->library()->textForWidgetName(n, c) );
const bool designMode = options & KFormDesigner::WidgetFactory::DesignViewMode;
- if(c == TQLABEL_OBJECT_NAME_STRING)
+ if(c == "TQLabel")
w = new TQLabel(text, p, n);
else if(c == "KexiPictureLabel")
w = new KexiPictureLabel(DesktopIcon("image-x-generic"), p, n);
@@ -399,10 +399,10 @@ StdWidgetFactory::createWidget(const TQCString &c, TQWidget *p, const char *n,
else if(c == "KPushButton")
w = new KPushButton(/*i18n("Button")*/text, p, n);
- else if(c == TQRADIOBUTTON_OBJECT_NAME_STRING)
+ else if(c == "TQRadioButton")
w = new TQRadioButton(/*i18n("Radio Button")*/text, p, n);
- else if(c == TQCHECKBOX_OBJECT_NAME_STRING)
+ else if(c == "TQCheckBox")
w = new TQCheckBox(/*i18n("Check Box")*/text, p, n);
else if(c == "KIntSpinBox")
@@ -424,7 +424,7 @@ StdWidgetFactory::createWidget(const TQCString &c, TQWidget *p, const char *n,
((TDEListView*)w)->addColumn(i18n("Column 1"));
((TDEListView*)w)->setRootIsDecorated(true);
}
- else if(c == TQSLIDER_OBJECT_NAME_STRING)
+ else if(c == "TQSlider")
w = new TQSlider(Qt::Horizontal, p, n);
else if(c == "KProgress")
@@ -470,7 +470,7 @@ bool
StdWidgetFactory::createMenuActions(const TQCString &classname, TQWidget *, TQPopupMenu *menu,
KFormDesigner::Container *)
{
- if((classname == TQLABEL_OBJECT_NAME_STRING) || (classname == "KTextEdit"))
+ if((classname == "TQLabel") || (classname == "KTextEdit"))
{
menu->insertItem(SmallIconSet("edit"), i18n("Edit Rich Text"), this, TQT_SLOT(editText()));
return true;
@@ -495,7 +495,7 @@ StdWidgetFactory::startEditing(const TQCString &classname, TQWidget *w, KFormDes
createEditor(classname, lineedit->text(), lineedit, container, lineedit->geometry(), lineedit->alignment(), true);
return true;
}
- else if(classname == TQLABEL_OBJECT_NAME_STRING)
+ else if(classname == "TQLabel")
{
TQLabel *label = static_cast<TQLabel*>(w);
if(label->textFormat() == RichText)
@@ -520,7 +520,7 @@ StdWidgetFactory::startEditing(const TQCString &classname, TQWidget *w, KFormDes
createEditor(classname, push->text(), push, container, editorRect, TQt::AlignCenter, false, false, TQt::PaletteButton);
return true;
}
- else if(classname == TQRADIOBUTTON_OBJECT_NAME_STRING)
+ else if(classname == "TQRadioButton")
{
TQRadioButton *radio = static_cast<TQRadioButton*>(w);
TQRect r = w->style().subRect(TQStyle::SR_RadioButtonContents, w);
@@ -528,7 +528,7 @@ StdWidgetFactory::startEditing(const TQCString &classname, TQWidget *w, KFormDes
createEditor(classname, radio->text(), radio, container, editorRect, TQt::AlignAuto);
return true;
}
- else if(classname == TQCHECKBOX_OBJECT_NAME_STRING)
+ else if(classname == "TQCheckBox")
{
TQCheckBox *check = static_cast<TQCheckBox*>(w);
//TQRect r(check->geometry());
@@ -609,7 +609,7 @@ StdWidgetFactory::changeText(const TQString &text)
TQFontMetrics fm = w->fontMetrics();
TQSize s(fm.width( text ), fm.height());
int width;
- if(n == TQLABEL_OBJECT_NAME_STRING) // labels are resized to fit the text
+ if(n == "TQLabel") // labels are resized to fit the text
{
w->resize(w->sizeHint());
WidgetFactory::m_editor->resize(w->size());
@@ -618,9 +618,9 @@ StdWidgetFactory::changeText(const TQString &text)
// and other widgets are just enlarged if needed
else if(n == "KPushButton")
width = w->style().sizeFromContents( TQStyle::CT_PushButton, w, s).width();
- else if(n == TQCHECKBOX_OBJECT_NAME_STRING)
+ else if(n == "TQCheckBox")
width = w->style().sizeFromContents( TQStyle::CT_CheckBox, w, s).width();
- else if(n == TQRADIOBUTTON_OBJECT_NAME_STRING)
+ else if(n == "TQRadioButton")
width = w->style().sizeFromContents( TQStyle::CT_RadioButton, w, s).width();
else
return;
@@ -643,13 +643,13 @@ StdWidgetFactory::resizeEditor(TQWidget *editor, TQWidget *widget, const TQCStri
TQPoint p = widget->pos();
TQRect r;
- if(classname == TQRADIOBUTTON_OBJECT_NAME_STRING)
+ if(classname == "TQRadioButton")
{
r = widget->style().subRect(TQStyle::SR_RadioButtonContents, widget);
p += r.topLeft();
s.setWidth(r.width());
}
- else if(classname == TQCHECKBOX_OBJECT_NAME_STRING)
+ else if(classname == "TQCheckBox")
{
r = widget->style().subRect(TQStyle::SR_CheckBoxContents, widget);
p += r.topLeft();
@@ -863,7 +863,7 @@ StdWidgetFactory::isPropertyVisibleInternal(const TQCString &classname,
if((property == "text") || (property == "indent") || (property == "textFormat") || (property == "font") || (property == "alignment"))
return false;
}
- else if(classname == TQLABEL_OBJECT_NAME_STRING)
+ else if(classname == "TQLabel")
{
if(property == "pixmap")
return false;
@@ -890,11 +890,11 @@ StdWidgetFactory::isPropertyVisibleInternal(const TQCString &classname,
if((property == "frameShape") || (property == "font") || (property == "margin"))
return false;
}
- else if(classname==TQCHECKBOX_OBJECT_NAME_STRING)
+ else if(classname=="TQCheckBox")
{
ok = m_showAdvancedProperties || (property != "autoRepeat");
}
- else if(classname==TQRADIOBUTTON_OBJECT_NAME_STRING)
+ else if(classname=="TQRadioButton")
{
ok = m_showAdvancedProperties || (property != "autoRepeat");
}
@@ -911,7 +911,7 @@ StdWidgetFactory::autoSaveProperties(const TQCString &classname)
{
TQValueList<TQCString> l;
- if(classname == TQLABEL_OBJECT_NAME_STRING)
+ if(classname == "TQLabel")
l << "text";
if(classname == "KPushButton")
l << "text";
@@ -946,7 +946,7 @@ StdWidgetFactory::editText()
TQString text;
if(classname == "KTextEdit")
text = ((KTextEdit*)widget())->text();
- else if(classname == TQLABEL_OBJECT_NAME_STRING)
+ else if(classname == "TQLabel")
text = ((TQLabel*)widget())->text();
if(editRichText(widget(), text))
@@ -955,14 +955,14 @@ StdWidgetFactory::editText()
changeProperty("text", text, m_container->form());
}
- if(classname == TQLABEL_OBJECT_NAME_STRING)
+ if(classname == "TQLabel")
widget()->resize(widget()->sizeHint());
}
void
StdWidgetFactory::editListContents()
{
- if(widget()->inherits(TQLISTVIEW_OBJECT_NAME_STRING))
+ if(widget()->inherits("TQListView"))
editListView((TQListView*)widget());
}
diff --git a/kexi/formeditor/form.cpp b/kexi/formeditor/form.cpp
index b52c2087..66321cf1 100644
--- a/kexi/formeditor/form.cpp
+++ b/kexi/formeditor/form.cpp
@@ -268,10 +268,10 @@ Form::setSelectedWidget(TQWidget *w, bool add, bool dontRaise, bool moreWillBeSe
emitActionSignals(false);
// WidgetStack and TabWidget pages widgets shouldn't have resize handles, but their parent
- if(!FormManager::self()->isTopLevel(w) && w->parentWidget() && w->parentWidget()->isA(TQWIDGETSTACK_OBJECT_NAME_STRING))
+ if(!FormManager::self()->isTopLevel(w) && w->parentWidget() && w->parentWidget()->isA("TQWidgetStack"))
{
w = w->parentWidget();
- if(w->parentWidget() && w->parentWidget()->inherits(TQTABWIDGET_OBJECT_NAME_STRING))
+ if(w->parentWidget() && w->parentWidget()->inherits("TQTabWidget"))
w = w->parentWidget();
}
diff --git a/kexi/formeditor/form.h b/kexi/formeditor/form.h
index 7f79cf79..e67f9cb4 100644
--- a/kexi/formeditor/form.h
+++ b/kexi/formeditor/form.h
@@ -154,7 +154,7 @@ class KFORMEDITOR_EXPORT Form : public TQObject
form->createToplevel(toplevel); \endcode
*/
void createToplevel(TQWidget *container, FormWidget *formWidget =0,
- const TQCString &classname=TQWIDGET_OBJECT_NAME_STRING);
+ const TQCString &classname="TQWidget");
/*! \return the toplevel Container or 0 if this is a preview Form or createToplevel()
has not been called yet. */
diff --git a/kexi/formeditor/formIO.cpp b/kexi/formeditor/formIO.cpp
index 503814d5..298c07f8 100644
--- a/kexi/formeditor/formIO.cpp
+++ b/kexi/formeditor/formIO.cpp
@@ -177,7 +177,7 @@ FormIO::saveFormToDom(Form *form, TQDomDocument &domDoc)
// We create the top class element
TQDomElement baseClass = domDoc.createElement("class");
uiElement.appendChild(baseClass);
- TQDomText baseClassV = domDoc.createTextNode(TQWIDGET_OBJECT_NAME_STRING);
+ TQDomText baseClassV = domDoc.createTextNode("TQWidget");
baseClass.appendChild(baseClassV);
// Save the toplevel widgets, and so the whole Form
@@ -952,11 +952,11 @@ FormIO::saveWidget(ObjectTreeItem *item, TQDomElement &parent, TQDomDocument &do
}
if(!item->parent()) // Toplevel widget
- tclass.setAttribute("class", TQWIDGET_OBJECT_NAME_STRING);
- // For compatibility, HBox, VBox and Grid are saved as TQLAYOUTWIDGET_OBJECT_NAME_STRING
+ tclass.setAttribute("class", "TQWidget");
+ // For compatibility, HBox, VBox and Grid are saved as "TQLayoutWidget"
else if(item->widget()->isA("HBox") || item->widget()->isA("VBox") || item->widget()->isA("Grid")
|| item->widget()->isA("HFlow") || item->widget()->isA("VFlow"))
- tclass.setAttribute("class", TQLAYOUTWIDGET_OBJECT_NAME_STRING);
+ tclass.setAttribute("class", "TQLayoutWidget");
else if(item->widget()->isA("CustomWidget"))
tclass.setAttribute("class", item->className());
else // Normal widgets
@@ -983,7 +983,7 @@ FormIO::saveWidget(ObjectTreeItem *item, TQDomElement &parent, TQDomDocument &do
savePropertyValue(tclass, domDoc, "geometry", item->widget()->property("geometry"), item->widget());
// Save the buddy widget for a label
- if(item->widget()->inherits(TQLABEL_OBJECT_NAME_STRING) && ((TQLabel*)item->widget())->buddy())
+ if(item->widget()->inherits("TQLabel") && ((TQLabel*)item->widget())->buddy())
savePropertyElement(tclass, domDoc, "property", "buddy", ((TQLabel*)item->widget())->buddy()->name());
// We save every property in the modifProp list of the ObjectTreeItem
@@ -1141,7 +1141,7 @@ FormIO::loadWidget(Container *container, const TQDomElement &el, TQWidget *paren
// We translate some name (for compatibility)
if(el.tagName() == "spacer")
classname = "Spring";
- else if(el.attribute("class") == TQLAYOUTWIDGET_OBJECT_NAME_STRING)
+ else if(el.attribute("class") == "TQLayoutWidget")
{
for(TQDomNode n = el.firstChild(); !n.isNull(); n = n.nextSibling())
{
diff --git a/kexi/formeditor/formmanager.cpp b/kexi/formeditor/formmanager.cpp
index 25f13b97..d502d5e8 100644
--- a/kexi/formeditor/formmanager.cpp
+++ b/kexi/formeditor/formmanager.cpp
@@ -291,7 +291,7 @@ FormManager::insertWidget(const TQCString &classname)
// form->d->cursors = new TQMap<TQString, TQCursor>();
if (form->toplevelContainer())
form->widget()->setCursor(TQCursor(CrossCursor));
- TQObjectList *l = form->widget()->queryList( TQWIDGET_OBJECT_NAME_STRING );
+ TQObjectList *l = form->widget()->queryList( "TQWidget" );
for(TQObject *o = l->first(); o; o = l->next())
{
if( ((TQWidget*)o)->ownCursor() )
@@ -322,7 +322,7 @@ FormManager::stopInsert()
for(form = m_forms.first(); form; form = m_forms.next())
{
form->widget()->unsetCursor();
- TQObjectList *l = form->widget()->queryList( TQWIDGET_OBJECT_NAME_STRING );
+ TQObjectList *l = form->widget()->queryList( "TQWidget" );
for(TQObject *o = l->first(); o; o = l->next())
{
TQT_TQWIDGET(o)->unsetCursor();
@@ -373,7 +373,7 @@ FormManager::startCreatingConnection()
form->widget()->setCursor(TQCursor(PointingHandCursor));
form->widget()->setMouseTracking(true);
}
- TQObjectList *l = form->widget()->queryList( TQWIDGET_OBJECT_NAME_STRING );
+ TQObjectList *l = form->widget()->queryList( "TQWidget" );
for(TQObject *o = l->first(); o; o = l->next())
{
TQWidget *w = TQT_TQWIDGET(o);
@@ -432,7 +432,7 @@ FormManager::stopCreatingConnection()
{
form->widget()->unsetCursor();
form->widget()->setMouseTracking(false);
- TQObjectList *l = form->widget()->queryList( TQWIDGET_OBJECT_NAME_STRING );
+ TQObjectList *l = form->widget()->queryList( "TQWidget" );
for(TQObject *o = l->first(); o; o = l->next())
{
TQWidget *w = (TQWidget*)o;
@@ -898,7 +898,7 @@ FormManager::createContextMenu(TQWidget *w, Container *container, bool popupAtCu
separatorNeeded = true;
// We create the buddy menu
- if(!multiple && w->inherits(TQLABEL_OBJECT_NAME_STRING) && ((TQLabel*)w)->text().contains("&") && (((TQLabel*)w)->textFormat() != RichText))
+ if(!multiple && w->inherits("TQLabel") && ((TQLabel*)w)->text().contains("&") && (((TQLabel*)w)->textFormat() != RichText))
{
if (separatorNeeded)
m_popup->insertSeparator();
@@ -1210,7 +1210,7 @@ FormManager::slotStyle()
TQString style = m_style->currentText();
activeForm()->widget()->setStyle( style );
- TQObjectList *l = activeForm()->widget()->queryList( TQWIDGET_OBJECT_NAME_STRING );
+ TQObjectList *l = activeForm()->widget()->queryList( "TQWidget" );
for(TQObject *o = l->first(); o; o = l->next())
(TQT_TQWIDGET(o))->setStyle( style );
delete l;
diff --git a/kexi/formeditor/tdevelop_plugin/kfd_kdev_part.cpp b/kexi/formeditor/tdevelop_plugin/kfd_kdev_part.cpp
index 2dcf57b8..f4f7bdf9 100644
--- a/kexi/formeditor/tdevelop_plugin/kfd_kdev_part.cpp
+++ b/kexi/formeditor/tdevelop_plugin/kfd_kdev_part.cpp
@@ -538,7 +538,7 @@ KFormDesignerKDevPart::~KFormDesignerKDevPart()
//repaint all children widgets
static void repaintAll(TQWidget *w)
{
- TQObjectList *list = w->queryList(TQWIDGET_OBJECT_NAME_STRING);
+ TQObjectList *list = w->queryList("TQWidget");
TQObjectListIt it(*list);
for (TQObject *obj; (obj=it.current()); ++it ) {
static_cast<TQWidget*>(obj)->repaint();
diff --git a/kexi/formeditor/test/kfd_part.cpp b/kexi/formeditor/test/kfd_part.cpp
index 913ec051..735b9a9e 100644
--- a/kexi/formeditor/test/kfd_part.cpp
+++ b/kexi/formeditor/test/kfd_part.cpp
@@ -562,7 +562,7 @@ KFormDesignerPart::setRedoEnabled(bool enabled, const TQString &text)
static void repaintAll(TQWidget *w)
{
w->repaint();
- TQObjectList *list = w->queryList(TQWIDGET_OBJECT_NAME_STRING);
+ TQObjectList *list = w->queryList("TQWidget");
TQObjectListIt it(*list);
for (TQObject *obj; (obj=it.current()); ++it ) {
static_cast<TQWidget*>(obj)->repaint();
diff --git a/kexi/formeditor/utils.cpp b/kexi/formeditor/utils.cpp
index 53a9a15b..b04222f3 100644
--- a/kexi/formeditor/utils.cpp
+++ b/kexi/formeditor/utils.cpp
@@ -89,14 +89,14 @@ KFormDesigner::setRecursiveCursor(TQWidget *w, Form *form)
{
ObjectTreeItem *tree = form->objectTree()->lookup(w->name());
if(tree && ((tree->modifiedProperties()->contains("cursor")) || !tree->children()->isEmpty())
- && !w->inherits(TQLINEEDIT_OBJECT_NAME_STRING) && !w->inherits(TQTEXTEDIT_OBJECT_NAME_STRING)
+ && !w->inherits("TQLineEdit") && !w->inherits("TQTextEdit")
) //fix weird behaviour
return; // if the user has set a cursor for this widget or this is a container, don't change it
if(w->ownCursor())
w->setCursor(TQt::ArrowCursor);
- TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING );
+ TQObjectList *l = w->queryList( "TQWidget" );
for(TQObject *o = l->first(); o; o = l->next())
((TQWidget*)o)->setCursor(TQt::ArrowCursor);
delete l;
diff --git a/kexi/formeditor/utils.h b/kexi/formeditor/utils.h
index 1e60f0f5..b28b0b4d 100644
--- a/kexi/formeditor/utils.h
+++ b/kexi/formeditor/utils.h
@@ -106,7 +106,7 @@ KFORMEDITOR_EXPORT void removeRecursiveEventFilter(TQObject *object, TQObject *c
KFORMEDITOR_EXPORT void setRecursiveCursor(TQWidget *w, Form *form);
/*! \return the size of \a w children. This can be used eg to get widget's sizeHint. */
-KFORMEDITOR_EXPORT TQSize getSizeFromChildren(TQWidget *widget, const char *inheritClass=TQWIDGET_OBJECT_NAME_STRING);
+KFORMEDITOR_EXPORT TQSize getSizeFromChildren(TQWidget *widget, const char *inheritClass="TQWidget");
}
diff --git a/kexi/formeditor/widgetfactory.cpp b/kexi/formeditor/widgetfactory.cpp
index b90193bc..14fd2665 100644
--- a/kexi/formeditor/widgetfactory.cpp
+++ b/kexi/formeditor/widgetfactory.cpp
@@ -431,7 +431,7 @@ WidgetFactory::resetEditor()
tree->eventEater()->setContainer(m_container);
if(m_widget) {// && !ed)
setRecursiveCursor(m_widget, m_container->form());
- if (m_widget->inherits(TQLINEEDIT_OBJECT_NAME_STRING) || m_widget->inherits(TQTEXTEDIT_OBJECT_NAME_STRING)) { //fix weird behaviour
+ if (m_widget->inherits("TQLineEdit") || m_widget->inherits("TQTextEdit")) { //fix weird behaviour
m_widget->unsetCursor();
m_widget->setCursor(TQt::ArrowCursor);
}
diff --git a/kexi/formeditor/widgetpropertyset.cpp b/kexi/formeditor/widgetpropertyset.cpp
index 20182689..99e6f511 100644
--- a/kexi/formeditor/widgetpropertyset.cpp
+++ b/kexi/formeditor/widgetpropertyset.cpp
@@ -833,7 +833,7 @@ WidgetPropertySet::createAlignProperty(const TQMetaProperty *meta, TQWidget *wid
if(possibleValues.find("WordBreak")!=possibleValues.constEnd()
// && isPropertyVisible("wordbreak", false, subwidget->className())
-// && !subWidget->inherits(TQLINEEDIT_OBJECT_NAME_STRING) /* TQLineEdit doesn't support 'word break' is this generic enough?*/
+// && !subWidget->inherits("TQLineEdit") /* TQLineEdit doesn't support 'word break' is this generic enough?*/
) {
// Create the wordbreak property
KoProperty::Property *p = new KoProperty::Property("wordbreak",