summaryrefslogtreecommitdiffstats
path: root/kexi/formeditor/widgetfactory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/formeditor/widgetfactory.cpp')
-rw-r--r--kexi/formeditor/widgetfactory.cpp240
1 files changed, 120 insertions, 120 deletions
diff --git a/kexi/formeditor/widgetfactory.cpp b/kexi/formeditor/widgetfactory.cpp
index 8122013c..12585b6c 100644
--- a/kexi/formeditor/widgetfactory.cpp
+++ b/kexi/formeditor/widgetfactory.cpp
@@ -21,10 +21,10 @@
#include "widgetfactory.h"
-#include <qcursor.h>
-#include <qobjectlist.h>
-#include <qdict.h>
-#include <qmetaobject.h>
+#include <tqcursor.h>
+#include <tqobjectlist.h>
+#include <tqdict.h>
+#include <tqmetaobject.h>
#include <kdebug.h>
#include <klocale.h>
@@ -64,9 +64,9 @@ WidgetInfo::WidgetInfo(WidgetFactory *f)
{
}
-WidgetInfo::WidgetInfo(WidgetFactory *f, const char* parentFactoryName,
+WidgetInfo::WidgetInfo(WidgetFactory *f, const char* tqparentFactoryName,
const char* inheritedClassName)
- : m_parentFactoryName( QCString("kformdesigner_")+parentFactoryName )
+ : m_parentFactoryName( TQCString("kformdesigner_")+tqparentFactoryName )
, m_inheritedClassName(inheritedClassName)
, m_inheritedClass(0)
, m_overriddenAlternateNames(0)
@@ -84,12 +84,12 @@ WidgetInfo::~WidgetInfo()
delete m_customTypesForProperty;
}
-void WidgetInfo::addAlternateClassName(const QCString& alternateName, bool override)
+void WidgetInfo::addAlternateClassName(const TQCString& alternateName, bool override)
{
m_alternateNames += alternateName;
if (override) {
if (!m_overriddenAlternateNames)
- m_overriddenAlternateNames = new QAsciiDict<char>(101);
+ m_overriddenAlternateNames = new TQAsciiDict<char>(101);
m_overriddenAlternateNames->insert(alternateName, (char*)1);
}
else {
@@ -98,9 +98,9 @@ void WidgetInfo::addAlternateClassName(const QCString& alternateName, bool overr
}
}
-bool WidgetInfo::isOverriddenClassName(const QCString& alternateName) const
+bool WidgetInfo::isOverriddenClassName(const TQCString& alternateName) const
{
- return m_overriddenAlternateNames && (m_overriddenAlternateNames->find(alternateName) != 0);
+ return m_overriddenAlternateNames && (m_overriddenAlternateNames->tqfind(alternateName) != 0);
}
void WidgetInfo::setAutoSyncForProperty(const char *propertyName, tristate flag)
@@ -108,7 +108,7 @@ void WidgetInfo::setAutoSyncForProperty(const char *propertyName, tristate flag)
if (!m_propertiesWithDisabledAutoSync) {
if (~flag)
return;
- m_propertiesWithDisabledAutoSync = new QAsciiDict<char>(101);
+ m_propertiesWithDisabledAutoSync = new TQAsciiDict<char>(101);
}
if (~flag) {
@@ -121,7 +121,7 @@ void WidgetInfo::setAutoSyncForProperty(const char *propertyName, tristate flag)
tristate WidgetInfo::autoSyncForProperty(const char *propertyName) const
{
- char* flag = m_propertiesWithDisabledAutoSync ? m_propertiesWithDisabledAutoSync->find(propertyName) : 0;
+ char* flag = m_propertiesWithDisabledAutoSync ? m_propertiesWithDisabledAutoSync->tqfind(propertyName) : 0;
if (!flag)
return cancelled;
return flag==(char*)1 ? true : false;
@@ -132,14 +132,14 @@ void WidgetInfo::setCustomTypeForProperty(const char *propertyName, int type)
if (!propertyName || type==KoProperty::Auto)
return;
if (!m_customTypesForProperty) {
- m_customTypesForProperty = new QMap<QCString,int>();
+ m_customTypesForProperty = new TQMap<TQCString,int>();
}
- m_customTypesForProperty->replace(propertyName, type);
+ m_customTypesForProperty->tqreplace(propertyName, type);
}
int WidgetInfo::customTypeForProperty(const char *propertyName) const
{
- if (!m_customTypesForProperty || !m_customTypesForProperty->contains(propertyName))
+ if (!m_customTypesForProperty || !m_customTypesForProperty->tqcontains(propertyName))
return KoProperty::Auto;
return (*m_customTypesForProperty)[propertyName];
}
@@ -147,8 +147,8 @@ int WidgetInfo::customTypeForProperty(const char *propertyName) const
///// Widget Factory //////////////////////////
-WidgetFactory::WidgetFactory(QObject *parent, const char *name)
- : QObject(parent, (const char*)(QCString("kformdesigner_")+name))
+WidgetFactory::WidgetFactory(TQObject *tqparent, const char *name)
+ : TQObject(tqparent, (const char*)(TQCString("kformdesigner_")+name))
{
m_showAdvancedProperties = true;
m_classesByName.setAutoDelete(true);
@@ -177,63 +177,63 @@ void WidgetFactory::addClass(WidgetInfo *w)
void WidgetFactory::hideClass(const char *classname)
{
if (!m_hiddenClasses)
- m_hiddenClasses = new QAsciiDict<char>(101, false);
+ m_hiddenClasses = new TQAsciiDict<char>(101, false);
m_hiddenClasses->insert(classname, (char*)1);
}
void
-WidgetFactory::createEditor(const QCString &classname, const QString &text,
- QWidget *w, Container *container, QRect geometry,
+WidgetFactory::createEditor(const TQCString &classname, const TQString &text,
+ TQWidget *w, Container *container, TQRect tqgeometry,
int align, bool useFrame, bool multiLine, BackgroundMode background)
{
//#ifdef KEXI_KTEXTEDIT
if (multiLine) {
- KTextEdit *textedit = new KTextEdit(text, QString::null, w->parentWidget());
- textedit->setTextFormat(Qt::PlainText);
- textedit->setAlignment(align);
- if (dynamic_cast<QTextEdit*>(w)) {
- textedit->setWordWrap(dynamic_cast<QTextEdit*>(w)->wordWrap());
- textedit->setWrapPolicy(dynamic_cast<QTextEdit*>(w)->wrapPolicy());
+ KTextEdit *textedit = new KTextEdit(text, TQString(), w->tqparentWidget());
+ textedit->setTextFormat(TQt::PlainText);
+ textedit->tqsetAlignment(align);
+ if (dynamic_cast<TQTextEdit*>(w)) {
+ textedit->setWordWrap(dynamic_cast<TQTextEdit*>(w)->wordWrap());
+ textedit->setWrapPolicy(dynamic_cast<TQTextEdit*>(w)->wrapPolicy());
}
textedit->setPalette(w->palette());
textedit->setFont(w->font());
- textedit->setResizePolicy(QScrollView::Manual);
- textedit->setGeometry(geometry);
- if(background == Qt::NoBackground)
+ textedit->setResizePolicy(TQScrollView::Manual);
+ textedit->setGeometry(tqgeometry);
+ if(background == TQt::NoBackground)
textedit->setBackgroundMode(w->backgroundMode());
else
textedit->setBackgroundMode(background);
-// textedit->setPaletteBackgroundColor(textedit->colorGroup().color( QColorGroup::Base ));
+// textedit->setPaletteBackgroundColor(textedit->tqcolorGroup().color( TQColorGroup::Base ));
textedit->setPaletteBackgroundColor(w->paletteBackgroundColor());
for(int i =0; i <= textedit->paragraphs(); i++)
textedit->setParagraphBackgroundColor(i, w->paletteBackgroundColor());
textedit->selectAll(true);
textedit->setColor(w->paletteForegroundColor());
textedit->selectAll(false);
- textedit->moveCursor(QTextEdit::MoveEnd, false);
+ textedit->moveCursor(TQTextEdit::MoveEnd, false);
textedit->setParagraphBackgroundColor(0, w->paletteBackgroundColor());
- textedit->setVScrollBarMode(QScrollView::AlwaysOff); //ok?
- textedit->setHScrollBarMode(QScrollView::AlwaysOff); //ok?
+ textedit->setVScrollBarMode(TQScrollView::AlwaysOff); //ok?
+ textedit->setHScrollBarMode(TQScrollView::AlwaysOff); //ok?
textedit->installEventFilter(this);
- textedit->setFrameShape(useFrame ? QFrame::LineEditPanel : QFrame::NoFrame);
+ textedit->setFrameShape(useFrame ? TQFrame::LineEditPanel : TQFrame::NoFrame);
textedit->setMargin(2); //to move away from resize handle
textedit->show();
textedit->setFocus();
textedit->selectAll();
setEditor(w, textedit);
- connect(textedit, SIGNAL(textChanged()), this, SLOT(slotTextChanged()));
- connect(w, SIGNAL(destroyed()), this, SLOT(widgetDestroyed()));
- connect(textedit, SIGNAL(destroyed()), this, SLOT(editorDeleted()));
+ connect(textedit, TQT_SIGNAL(textChanged()), this, TQT_SLOT(slotTextChanged()));
+ connect(w, TQT_SIGNAL(destroyed()), this, TQT_SLOT(widgetDestroyed()));
+ connect(textedit, TQT_SIGNAL(destroyed()), this, TQT_SLOT(editorDeleted()));
//#else
}
else {
- KLineEdit *editor = new KLineEdit(text, w->parentWidget());
- editor->setAlignment(align);
+ KLineEdit *editor = new KLineEdit(text, w->tqparentWidget());
+ editor->tqsetAlignment(align);
editor->setPalette(w->palette());
editor->setFont(w->font());
- editor->setGeometry(geometry);
- if(background == Qt::NoBackground)
+ editor->setGeometry(tqgeometry);
+ if(background == TQt::NoBackground)
editor->setBackgroundMode(w->backgroundMode());
else
editor->setBackgroundMode(background);
@@ -243,17 +243,17 @@ WidgetFactory::createEditor(const QCString &classname, const QString &text,
editor->show();
editor->setFocus();
editor->selectAll();
- connect(editor, SIGNAL(textChanged(const QString&)), this, SLOT(changeTextInternal(const QString&)));
- connect(w, SIGNAL(destroyed()), this, SLOT(widgetDestroyed()));
- connect(editor, SIGNAL(destroyed()), this, SLOT(editorDeleted()));
+ connect(editor, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(changeTextInternal(const TQString&)));
+ connect(w, TQT_SIGNAL(destroyed()), this, TQT_SLOT(widgetDestroyed()));
+ connect(editor, TQT_SIGNAL(destroyed()), this, TQT_SLOT(editorDeleted()));
setEditor(w, editor);
// m_editor = editor;
}
//copy properties if available
WidgetWithSubpropertiesInterface* subpropIface = dynamic_cast<WidgetWithSubpropertiesInterface*>(w);
- QWidget *subwidget = (subpropIface && subpropIface->subwidget()) ? subpropIface->subwidget() : w;
- if (-1!=m_editor->metaObject()->findProperty("margin", true) && -1!=subwidget->metaObject()->findProperty("margin", true))
+ TQWidget *subwidget = (subpropIface && subpropIface->subwidget()) ? subpropIface->subwidget() : w;
+ if (-1!=m_editor->tqmetaObject()->tqfindProperty("margin", true) && -1!=subwidget->tqmetaObject()->tqfindProperty("margin", true))
m_editor->setProperty("margin", subwidget->property("margin"));
//#endif
//js m_handles = new ResizeHandleSet(w, container->form(), true);
@@ -278,7 +278,7 @@ WidgetFactory::createEditor(const QCString &classname, const QString &text,
}
void
-WidgetFactory::disableFilter(QWidget *w, Container *container)
+WidgetFactory::disableFilter(TQWidget *w, Container *container)
{
ObjectTreeItem *tree = container->form()->objectTree()->lookup(w->name());
if(!tree)
@@ -301,28 +301,28 @@ WidgetFactory::disableFilter(QWidget *w, Container *container)
// widget is disabled, so we re-enable it while editing
if(!tree->isEnabled()) {
- QPalette p = w->palette();
- QColorGroup cg = p.active();
+ TQPalette p = w->palette();
+ TQColorGroup cg = p.active();
p.setActive(p.disabled());
p.setDisabled(cg);
w->setPalette(p);
}
- connect(w, SIGNAL(destroyed()), this, SLOT(widgetDestroyed()));
+ connect(w, TQT_SIGNAL(destroyed()), this, TQT_SLOT(widgetDestroyed()));
}
bool
-WidgetFactory::editList(QWidget *w, QStringList &list)
+WidgetFactory::editList(TQWidget *w, TQStringList &list)
{
- KDialogBase dialog(w->topLevelWidget(), "stringlist_dialog", true, i18n("Edit List of Items"),
+ KDialogBase dialog(w->tqtopLevelWidget(), "stringlist_dialog", true, i18n("Edit List of Items"),
KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, false);
- KEditListBox *edit = new KEditListBox(i18n("Contents of %1").arg(w->name()), &dialog, "editlist");
+ KEditListBox *edit = new KEditListBox(i18n("Contents of %1").tqarg(w->name()), &dialog, "editlist");
dialog.setMainWidget(edit);
edit->insertStringList(list);
// edit->show();
- if(dialog.exec() == QDialog::Accepted)
+ if(dialog.exec() == TQDialog::Accepted)
{
list = edit->items();
return true;
@@ -331,10 +331,10 @@ WidgetFactory::editList(QWidget *w, QStringList &list)
}
bool
-WidgetFactory::editRichText(QWidget *w, QString &text)
+WidgetFactory::editRichText(TQWidget *w, TQString &text)
{
RichTextDialog dlg(w, text);
- if(dlg.exec()== QDialog::Accepted)
+ if(dlg.exec()== TQDialog::Accepted)
{
text = dlg.text();
return true;
@@ -343,66 +343,66 @@ WidgetFactory::editRichText(QWidget *w, QString &text)
}
void
-WidgetFactory::editListView(QListView *listview)
+WidgetFactory::editListView(TQListView *listview)
{
- EditListViewDialog dlg(((QWidget*)listview)->topLevelWidget());
+ EditListViewDialog dlg(((TQWidget*)listview)->tqtopLevelWidget());
//dlg.exec(listview);
}
bool
-WidgetFactory::eventFilter(QObject *obj, QEvent *ev)
+WidgetFactory::eventFilter(TQObject *obj, TQEvent *ev)
{
- if( ((ev->type() == QEvent::Resize) || (ev->type() == QEvent::Move) ) && (obj == m_widget) && editor(m_widget)) {
+ if( ((ev->type() == TQEvent::Resize) || (ev->type() == TQEvent::Move) ) && (obj == m_widget) && editor(m_widget)) {
// resize widget using resize handles
- QWidget *ed = editor(m_widget);
+ TQWidget *ed = editor(m_widget);
resizeEditor(ed, m_widget, m_widget->className());
}
- else if((ev->type() == QEvent::Paint) && (obj == m_widget) && editor(m_widget)) {
+ else if((ev->type() == TQEvent::Paint) && (obj == m_widget) && editor(m_widget)) {
// paint event for container edited (eg button group)
return m_container->eventFilter(obj, ev);
}
- else if((ev->type() == QEvent::MouseButtonPress) && (obj == m_widget) && editor(m_widget)) {
+ else if((ev->type() == TQEvent::MouseButtonPress) && (obj == m_widget) && editor(m_widget)) {
// click outside editor --> cancel editing
Container *cont = m_container;
resetEditor();
return cont->eventFilter(obj, ev);
}
- if(ev->type() == QEvent::FocusOut)
+ if(ev->type() == TQEvent::FocusOut)
{
- QWidget *w = editor(m_widget);
+ TQWidget *w = editor(m_widget);
if (!w)
- w = (QWidget *)m_widget;
- if(obj != (QObject *)w)
+ w = (TQWidget *)m_widget;
+ if(obj != (TQObject *)w)
return false;
- QWidget *focus = w->topLevelWidget()->focusWidget();
+ TQWidget *focus = w->tqtopLevelWidget()->tqfocusWidget();
if(focus && w != focus && !w->child(focus->name(), focus->className()))
resetEditor();
}
- else if(ev->type() == QEvent::KeyPress)
+ else if(ev->type() == TQEvent::KeyPress)
{
- QWidget *w = editor(m_widget);
+ TQWidget *w = editor(m_widget);
if (!w)
- w = (QWidget *)m_widget;
- if(obj != (QObject *)w)
+ w = (TQWidget *)m_widget;
+ if(obj != (TQObject *)w)
return false;
- QKeyEvent *e = static_cast<QKeyEvent*>(ev);
- if(((e->key() == Qt::Key_Return) || (e->key() == Qt::Key_Enter)) && (e->state() != AltButton))
+ TQKeyEvent *e = TQT_TQKEYEVENT(ev);
+ if(((e->key() == TQt::Key_Return) || (e->key() == TQt::Key_Enter)) && (e->state() != AltButton))
resetEditor();
- if(e->key() == Qt::Key_Escape)
+ if(e->key() == TQt::Key_Escape)
{
setEditorText(m_firstText);
//changeText(m_firstText);
resetEditor();
}
}
- else if(ev->type() == QEvent::ContextMenu) {
- QWidget *w = editor(m_widget);
+ else if(ev->type() == TQEvent::ContextMenu) {
+ TQWidget *w = editor(m_widget);
if (!w)
- w = (QWidget *)m_widget;
- if(obj != (QObject *)w)
+ w = (TQWidget *)m_widget;
+ if(obj != (TQObject *)w)
return false;
return true;
@@ -419,7 +419,7 @@ WidgetFactory::resetEditor()
if (m_container)
m_container->stopInlineEditing();
- QWidget *ed = editor(m_widget);
+ TQWidget *ed = editor(m_widget);
if(m_widget)
{
ObjectTreeItem *tree = m_container ? m_container->form()->objectTree()->lookup(m_widget->name()) : 0;
@@ -431,16 +431,16 @@ WidgetFactory::resetEditor()
tree->eventEater()->setContainer(m_container);
if(m_widget) {// && !ed)
setRecursiveCursor(m_widget, m_container->form());
- if (m_widget->inherits("QLineEdit") || m_widget->inherits("QTextEdit")) { //fix weird behaviour
+ if (m_widget->inherits(TQLINEEDIT_OBJECT_NAME_STRING) || m_widget->inherits(TQTEXTEDIT_OBJECT_NAME_STRING)) { //fix weird behaviour
m_widget->unsetCursor();
- m_widget->setCursor(Qt::ArrowCursor);
+ m_widget->setCursor(TQt::ArrowCursor);
}
}
// disable again the widget
if(!ed && !tree->isEnabled()) {
- QPalette p = m_widget->palette();
- QColorGroup cg = p.active();
+ TQPalette p = m_widget->palette();
+ TQColorGroup cg = p.active();
p.setActive(p.disabled());
p.setDisabled(cg);
m_widget->setPalette(p);
@@ -456,7 +456,7 @@ WidgetFactory::resetEditor()
if(m_widget)
{
disconnect(m_widget, 0, this, 0);
- m_widget->repaint();
+ m_widget->tqrepaint();
}
//js delete m_handles;
@@ -505,8 +505,8 @@ WidgetFactory::editorDeleted()
}
void
-WidgetFactory::changeProperty(const char *name, const QVariant &value, Form *form)
-//WidgetFactory::changeProperty(const char *name, const QVariant &value, Container *container)
+WidgetFactory::changeProperty(const char *name, const TQVariant &value, Form *form)
+//WidgetFactory::changeProperty(const char *name, const TQVariant &value, Container *container)
{
// if (!form->manager())
// return;
@@ -520,29 +520,29 @@ WidgetFactory::changeProperty(const char *name, const QVariant &value, Form *for
else
{
WidgetPropertySet *set = KFormDesigner::FormManager::self()->propertySet();
- if(set->contains(name))
+ if(set->tqcontains(name))
(*set)[name] = value;
}
}
/*
void
-WidgetFactory::addPropertyDescription(Container *container, const char *prop, const QString &desc)
+WidgetFactory::addPropertyDescription(Container *container, const char *prop, const TQString &desc)
{
WidgetPropertySet *buff = container->form()->manager()->buffer();
buff->addPropertyDescription(prop, desc);
}
void
-WidgetFactory::addValueDescription(Container *container, const char *value, const QString &desc)
+WidgetFactory::addValueDescription(Container *container, const char *value, const TQString &desc)
{
WidgetPropertySet *buff = container->form()->manager()->buffer();
buff->addValueDescription(value, desc);
}*/
bool
-WidgetFactory::isPropertyVisible(const QCString &classname, QWidget *w,
- const QCString &property, bool multiple, bool isTopLevel)
+WidgetFactory::isPropertyVisible(const TQCString &classname, TQWidget *w,
+ const TQCString &property, bool multiple, bool isTopLevel)
{
if (multiple)
{
@@ -560,8 +560,8 @@ WidgetFactory::isPropertyVisible(const QCString &classname, QWidget *w,
}
bool
-WidgetFactory::isPropertyVisibleInternal(const QCString &, QWidget *w,
- const QCString &property, bool isTopLevel)
+WidgetFactory::isPropertyVisibleInternal(const TQCString &, TQWidget *w,
+ const TQCString &property, bool isTopLevel)
{
Q_UNUSED( w );
@@ -580,8 +580,8 @@ WidgetFactory::isPropertyVisibleInternal(const QCString &, QWidget *w,
}
bool
-WidgetFactory::propertySetShouldBeReloadedAfterPropertyChange(const QCString& classname, QWidget *w,
- const QCString& property)
+WidgetFactory::propertySetShouldBeReloadedAfterPropertyChange(const TQCString& classname, TQWidget *w,
+ const TQCString& property)
{
Q_UNUSED(classname);
Q_UNUSED(w);
@@ -590,7 +590,7 @@ WidgetFactory::propertySetShouldBeReloadedAfterPropertyChange(const QCString& cl
}
void
-WidgetFactory::resizeEditor(QWidget *, QWidget *, const QCString&)
+WidgetFactory::resizeEditor(TQWidget *, TQWidget *, const TQCString&)
{
}
@@ -601,13 +601,13 @@ WidgetFactory::slotTextChanged()
}
bool
-WidgetFactory::clearWidgetContent(const QCString &, QWidget *)
+WidgetFactory::clearWidgetContent(const TQCString &, TQWidget *)
{
return false;
}
void
-WidgetFactory::changeTextInternal(const QString& text)
+WidgetFactory::changeTextInternal(const TQString& text)
{
if (changeText( text ))
return;
@@ -622,68 +622,68 @@ WidgetFactory::changeTextInternal(const QString& text)
}
bool
-WidgetFactory::changeText(const QString& text)
+WidgetFactory::changeText(const TQString& text)
{
changeProperty( "text", text, m_container->form() );
return true;
}
bool
-WidgetFactory::readSpecialProperty(const QCString &, QDomElement &, QWidget *, ObjectTreeItem *)
+WidgetFactory::readSpecialProperty(const TQCString &, TQDomElement &, TQWidget *, ObjectTreeItem *)
{
return false;
}
bool
-WidgetFactory::saveSpecialProperty(const QCString &, const QString &, const QVariant&, QWidget *, QDomElement &, QDomDocument &)
+WidgetFactory::saveSpecialProperty(const TQCString &, const TQString &, const TQVariant&, TQWidget *, TQDomElement &, TQDomDocument &)
{
return false;
}
bool WidgetFactory::inheritsFactories()
{
- for (QAsciiDictIterator<WidgetInfo> it(m_classesByName); it.current(); ++it) {
- if (!it.current()->parentFactoryName().isEmpty())
+ for (TQAsciiDictIterator<WidgetInfo> it(m_classesByName); it.current(); ++it) {
+ if (!it.current()->tqparentFactoryName().isEmpty())
return true;
}
return false;
}
-QString WidgetFactory::editorText() const {
- QWidget *ed = editor(m_widget);
+TQString WidgetFactory::editorText() const {
+ TQWidget *ed = editor(m_widget);
return dynamic_cast<KTextEdit*>(ed) ? dynamic_cast<KTextEdit*>(ed)->text() : dynamic_cast<KLineEdit*>(ed)->text();
}
-void WidgetFactory::setEditorText(const QString& text) {
- QWidget *ed = editor(m_widget);
+void WidgetFactory::setEditorText(const TQString& text) {
+ TQWidget *ed = editor(m_widget);
if (dynamic_cast<KTextEdit*>(ed))
dynamic_cast<KTextEdit*>(ed)->setText(text);
else
dynamic_cast<KLineEdit*>(ed)->setText(text);
}
-void WidgetFactory::setEditor(QWidget *widget, QWidget *editor)
+void WidgetFactory::setEditor(TQWidget *widget, TQWidget *editor)
{
if (!widget)
return;
WidgetInfo *winfo = m_classesByName[widget->className()];
- if (!winfo || winfo->parentFactoryName().isEmpty()) {
+ if (!winfo || winfo->tqparentFactoryName().isEmpty()) {
m_editor = editor;
}
else {
- WidgetFactory *f = m_library->factory(winfo->parentFactoryName());
+ WidgetFactory *f = m_library->factory(winfo->tqparentFactoryName());
if (f!=this)
f->setEditor(widget, editor);
m_editor = editor; //keep a copy
}
}
-QWidget *WidgetFactory::editor(QWidget *widget) const
+TQWidget *WidgetFactory::editor(TQWidget *widget) const
{
if (!widget)
return 0;
WidgetInfo *winfo = m_classesByName[widget->className()];
- if (!winfo || winfo->parentFactoryName().isEmpty()) {
+ if (!winfo || winfo->tqparentFactoryName().isEmpty()) {
return m_editor;
}
else {
@@ -694,11 +694,11 @@ QWidget *WidgetFactory::editor(QWidget *widget) const
}
}
-void WidgetFactory::setWidget(QWidget *widget, Container* container)
+void WidgetFactory::setWidget(TQWidget *widget, Container* container)
{
WidgetInfo *winfo = widget ? m_classesByName[widget->className()] : 0;
- if (winfo && !winfo->parentFactoryName().isEmpty()) {
- WidgetFactory *f = m_library->factory(winfo->parentFactoryName());
+ if (winfo && !winfo->tqparentFactoryName().isEmpty()) {
+ WidgetFactory *f = m_library->factory(winfo->tqparentFactoryName());
if (f!=this)
f->setWidget(widget, container);
}
@@ -706,18 +706,18 @@ void WidgetFactory::setWidget(QWidget *widget, Container* container)
m_container = container;
}
-QWidget *WidgetFactory::widget() const
+TQWidget *WidgetFactory::widget() const
{
return m_widget;
}
-void WidgetFactory::setInternalProperty(const QCString& classname, const QCString& property,
- const QString& value)
+void WidgetFactory::setInternalProperty(const TQCString& classname, const TQCString& property,
+ const TQString& value)
{
m_internalProp[classname+":"+property]=value;
}
-void WidgetFactory::setPropertyOptions( WidgetPropertySet& /*buf*/, const WidgetInfo& /*info*/, QWidget * /*w*/ )
+void WidgetFactory::setPropertyOptions( WidgetPropertySet& /*buf*/, const WidgetInfo& /*info*/, TQWidget * /*w*/ )
{
//nothing
}