summaryrefslogtreecommitdiffstats
path: root/kexi/formeditor/objecttree.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/formeditor/objecttree.cpp')
-rw-r--r--kexi/formeditor/objecttree.cpp96
1 files changed, 48 insertions, 48 deletions
diff --git a/kexi/formeditor/objecttree.cpp b/kexi/formeditor/objecttree.cpp
index d5708773..5f17d849 100644
--- a/kexi/formeditor/objecttree.cpp
+++ b/kexi/formeditor/objecttree.cpp
@@ -19,10 +19,10 @@
*/
#include <kdebug.h>
-#include <qwidget.h>
-#include <qvariant.h>
-#include <qdom.h>
-#include <qtextstream.h>
+#include <tqwidget.h>
+#include <tqvariant.h>
+#include <tqdom.h>
+#include <tqtextstream.h>
#include "form.h"
#include "container.h"
@@ -36,15 +36,15 @@ using namespace KFormDesigner;
////////////////////////////////////////////////////////////////////////////////////////
-ObjectTreeItem::ObjectTreeItem(const QString &classn, const QString &name, QWidget *widget,
- Container *parentContainer, Container *container)
+ObjectTreeItem::ObjectTreeItem(const TQString &classn, const TQString &name, TQWidget *widget,
+ Container *tqparentContainer, Container *container)
: m_enabled(true), m_row(-1), m_col(-1), m_rowspan(-1), m_colspan(-1), m_span(false)
{
m_className = classn;
m_name = name;
m_widget = widget;
m_container = container;
- m_eater = new EventEater(widget, parentContainer);
+ m_eater = new EventEater(widget, tqparentContainer);
m_parent = 0;
m_subprops = 0;
}
@@ -56,7 +56,7 @@ ObjectTreeItem::~ObjectTreeItem()
}
void
-ObjectTreeItem::rename(const QString &name)
+ObjectTreeItem::rename(const TQString &name)
{
m_name = name;
}
@@ -64,58 +64,58 @@ ObjectTreeItem::rename(const QString &name)
void
ObjectTreeItem::addChild(ObjectTreeItem *c)
{
- m_children.append(c);
+ m_tqchildren.append(c);
c->setParent(this);
}
void
ObjectTreeItem::removeChild(ObjectTreeItem *c)
{
- m_children.remove(c);
+ m_tqchildren.remove(c);
}
void
-ObjectTreeItem::addModifiedProperty(const QCString &property, const QVariant &oldValue)
+ObjectTreeItem::addModifiedProperty(const TQCString &property, const TQVariant &oldValue)
{
if(property == "name")
return;
- if(!m_props.contains(property)) {
+ if(!m_props.tqcontains(property)) {
m_props.insert(property, oldValue);
kdDebug() << "ObjectTree::adModProperty(): Added this property in the list: " << property << " oldValue: " << oldValue << endl;
}
}
void
-ObjectTreeItem::addSubproperty(const QCString &property, const QVariant& value)
+ObjectTreeItem::addSubproperty(const TQCString &property, const TQVariant& value)
{
if (!m_subprops)
- m_subprops = new QMap<QString, QVariant>();
- if (!m_props.contains(property))
+ m_subprops = new TQMap<TQString, TQVariant>();
+ if (!m_props.tqcontains(property))
m_subprops->insert( property, value );
}
void
-ObjectTreeItem::storeUnknownProperty(QDomElement &el)
+ObjectTreeItem::storeUnknownProperty(TQDomElement &el)
{
if(!el.isNull()) {
- QTextStream ts(m_unknownProps, IO_WriteOnly|IO_Append );
+ TQTextStream ts(m_unknownProps, IO_WriteOnly|IO_Append );
el.save(ts, 0);
}
}
void
-ObjectTreeItem::setPixmapName(const QCString &property, const QString &name)
+ObjectTreeItem::setPixmapName(const TQCString &property, const TQString &name)
{
m_pixmapNames[property] = name;
}
-QString
-ObjectTreeItem::pixmapName(const QCString &property)
+TQString
+ObjectTreeItem::pixmapName(const TQCString &property)
{
- if(m_pixmapNames.contains(property))
+ if(m_pixmapNames.tqcontains(property))
return m_pixmapNames[property];
- return QString::null;
+ return TQString();
}
void
@@ -134,22 +134,22 @@ ObjectTreeItem::setGridPos(int row, int col, int rowspan, int colspan)
/// ObjectTree /////////
////////////////////////////////////////////////////////////////////////////////////////
-ObjectTree::ObjectTree(const QString &classn, const QString &name, QWidget *widget, Container *container)
+ObjectTree::ObjectTree(const TQString &classn, const TQString &name, TQWidget *widget, Container *container)
: ObjectTreeItem(classn, name, widget, container, container)
{
}
ObjectTree::~ObjectTree()
{
-// for(ObjectTreeItem *it = children()->first(); it; it = children()->next())
+// for(ObjectTreeItem *it = tqchildren()->first(); it; it = tqchildren()->next())
// removeItem(it->name());
- while (children()->first()) {
- removeItem(children()->first());
+ while (tqchildren()->first()) {
+ removeItem(tqchildren()->first());
}
}
bool
-ObjectTree::rename(const QString &oldname, const QString &newname)
+ObjectTree::rename(const TQString &oldname, const TQString &newname)
{
if(oldname == m_name)
{
@@ -169,20 +169,20 @@ ObjectTree::rename(const QString &oldname, const QString &newname)
}
bool
-ObjectTree::reparent(const QString &name, const QString &newparent)
+ObjectTree::reparent(const TQString &name, const TQString &newtqparent)
{
ObjectTreeItem *item = lookup(name);
if(!item) return false;
- ObjectTreeItem *parent = lookup(newparent);
- if(!parent) return false;
+ ObjectTreeItem *tqparent = lookup(newtqparent);
+ if(!tqparent) return false;
- item->parent()->removeChild(item);
- parent->addChild(item);
+ item->tqparent()->removeChild(item);
+ tqparent->addChild(item);
return true;
}
ObjectTreeItem*
-ObjectTree::lookup(const QString &name)
+ObjectTree::lookup(const TQString &name)
{
if(name == this->name())
return this;
@@ -191,20 +191,20 @@ ObjectTree::lookup(const QString &name)
}
void
-ObjectTree::addItem(ObjectTreeItem *parent, ObjectTreeItem *c)
+ObjectTree::addItem(ObjectTreeItem *tqparent, ObjectTreeItem *c)
{
m_treeDict.insert(c->name(), c);
- if(!parent)
- parent = this;
- parent->addChild(c);
+ if(!tqparent)
+ tqparent = this;
+ tqparent->addChild(c);
m_container->form()->emitChildAdded(c);
- kdDebug() << "ObjectTree::addItem(): adding " << c->name() << " to " << parent->name() << endl;
+ kdDebug() << "ObjectTree::addItem(): adding " << c->name() << " to " << tqparent->name() << endl;
}
void
-ObjectTree::removeItem(const QString &name)
+ObjectTree::removeItem(const TQString &name)
{
ObjectTreeItem *c = lookup(name);
removeItem(c);
@@ -216,29 +216,29 @@ ObjectTree::removeItem(ObjectTreeItem *c)
if (m_container && m_container->form())
m_container->form()->emitChildRemoved(c);
- for(ObjectTreeItem *it = c->children()->first(); it; it = c->children()->next())
+ for(ObjectTreeItem *it = c->tqchildren()->first(); it; it = c->tqchildren()->next())
removeItem(it->name());
m_treeDict.remove(c->name());
- c->parent()->removeChild(c);
+ c->tqparent()->removeChild(c);
delete c;
}
-QCString
-ObjectTree::generateUniqueName(const QCString &prefix, bool numberSuffixRequired)
+TQCString
+ObjectTree::generateUniqueName(const TQCString &prefix, bool numberSuffixRequired)
{
/* old way of naming widgets
int appendix = m_names[c] + 1;
- QString name(c);
- name.append(QString::number(appendix));
+ TQString name(c);
+ name.append(TQString::number(appendix));
m_names[c] = appendix;*/
if (!numberSuffixRequired && !lookup(prefix))
return prefix;
- QString name( prefix );
+ TQString name( prefix );
int i = 2; //start from 2, i.e. we have: "widget", "widget2", etc.
- while(lookup(name + QString::number(i)))
+ while(lookup(name + TQString::number(i)))
i++;
- return (name + QString::number(i)).latin1();
+ return (name + TQString::number(i)).latin1();
}