summaryrefslogtreecommitdiffstats
path: root/kexi/plugins/macros/lib/variable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/plugins/macros/lib/variable.cpp')
-rw-r--r--kexi/plugins/macros/lib/variable.cpp76
1 files changed, 38 insertions, 38 deletions
diff --git a/kexi/plugins/macros/lib/variable.cpp b/kexi/plugins/macros/lib/variable.cpp
index 598b8b46..f64613b0 100644
--- a/kexi/plugins/macros/lib/variable.cpp
+++ b/kexi/plugins/macros/lib/variable.cpp
@@ -37,31 +37,31 @@ namespace KoMacro {
/**
* The name this @a Variable has.
*/
- QString name;
+ TQString name;
/**
* The i18n-caption used for display purposes only
* this @a Variable has.
*/
- QString text;
+ TQString text;
/**
- * If @a Variable::Type is @a Variable::TypeVariant this QVariant
+ * If @a Variable::Type is @a Variable::TypeVariant this TQVariant
* holds the value else it's invalid.
*/
- QVariant variant;
+ TQVariant variant;
/**
- * If @a Variable::Type is @a Variable::TypeObject this QObject is
+ * If @a Variable::Type is @a Variable::TypeObject this TQObject is
* the value else it's NULL.
*/
- const QObject* object;
+ const TQObject* object;
/**
- * Optional list of children this @a Variable has.
+ * Optional list of tqchildren this @a Variable has.
*/
// TODO Dow we use this or is it for the future??
- Variable::List children;
+ Variable::List tqchildren;
/**
* Defines if the variable is enabled or disabled.
@@ -84,7 +84,7 @@ Variable::Variable()
d->object = 0;
}
-Variable::Variable(const QVariant& variant, const QString& name, const QString& text)
+Variable::Variable(const TQVariant& variant, const TQString& name, const TQString& text)
: MetaParameter()
, d( new Private() ) // create the private d-pointer instance.
{
@@ -95,7 +95,7 @@ Variable::Variable(const QVariant& variant, const QString& name, const QString&
d->text = text;
}
-Variable::Variable(const QObject* object)
+Variable::Variable(const TQObject* object)
: MetaParameter()
, d( new Private() ) // create the private d-pointer instance.
{
@@ -103,28 +103,28 @@ Variable::Variable(const QObject* object)
d->object = object;
}
-Variable::Variable(const QDomElement& element)
+Variable::Variable(const TQDomElement& element)
: MetaParameter()
, d( new Private() ) // create the private d-pointer instance.
{
- QString typesignature = element.attribute("type", "const QString&");
- QString value = element.text();
+ TQString typesignature = element.attribute("type", "const TQString&");
+ TQString value = element.text();
setSignatureArgument( typesignature );
switch( type() ) {
case KoMacro::MetaParameter::TypeVariant: {
- //kdDebug() << QString("KoMacro::Variable(QDomElement) KoMacro::MetaParameter::TypeVariant") << endl;
+ //kdDebug() << TQString("KoMacro::Variable(TQDomElement) KoMacro::MetaParameter::TypeVariant") << endl;
// Set the variant without overwritting the previously detected varianttype.
- setVariant( QVariant(value), false );
+ setVariant( TQVariant(value), false );
} break;
case KoMacro::MetaParameter::TypeObject: {
- //kdDebug() << QString("KoMacro::Variable(QDomElement) KoMacro::MetaParameter::TypeObject") << endl;
+ //kdDebug() << TQString("KoMacro::Variable(TQDomElement) KoMacro::MetaParameter::TypeObject") << endl;
//TODO setObject();
} break;
default: {
- kdWarning() << QString("KoMacro::Variable(QDomElement) KoMacro::MetaParameter::TypeNone") << endl;
+ kdWarning() << TQString("KoMacro::Variable(TQDomElement) KoMacro::MetaParameter::TypeNone") << endl;
} break;
}
}
@@ -134,35 +134,35 @@ Variable::~Variable()
delete d;
}
-QString Variable::name() const
+TQString Variable::name() const
{
return d->name;
}
-void Variable::setName(const QString& name)
+void Variable::setName(const TQString& name)
{
d->name = name;
}
-QString Variable::text() const
+TQString Variable::text() const
{
return d->text;
}
-void Variable::setText(const QString& text)
+void Variable::setText(const TQString& text)
{
d->text = text;
}
-const QVariant Variable::variant() const
+const TQVariant Variable::variant() const
{
//Q_ASSERT( type() == MetaParameter::TypeVariant );
- //Q_ASSERT( variantType() != QVariant::Invalid );
- //if(variantType() == QVariant::Invalid) return QVariant();
+ //Q_ASSERT( variantType() != TQVariant::Invalid );
+ //if(variantType() == TQVariant::Invalid) return TQVariant();
return d->variant;
}
-void Variable::setVariant(const QVariant& variant, bool detecttype)
+void Variable::setVariant(const TQVariant& variant, bool detecttype)
{
if(detecttype) {
setVariantType( variant.type() );
@@ -170,42 +170,42 @@ void Variable::setVariant(const QVariant& variant, bool detecttype)
d->variant = variant;
}
-const QObject* Variable::object() const
+const TQObject* Variable::object() const
{
Q_ASSERT( ! d->object );
return d->object;
}
-void Variable::setObject(const QObject* object)
+void Variable::setObject(const TQObject* object)
{
setType(TypeObject);
d->object = object;
}
-Variable::operator QVariant () const
+Variable::operator TQVariant () const
{
return variant();
}
-Variable::operator const QObject* () const
+Variable::operator const TQObject* () const
{
return object();
}
-const QString Variable::toString() const
+const TQString Variable::toString() const
{
switch( type() ) {
case KoMacro::MetaParameter::TypeVariant: {
return variant().toString();
} break;
case KoMacro::MetaParameter::TypeObject: {
- return QString("[%1]").arg( object()->name() );
+ return TQString("[%1]").tqarg( object()->name() );
} break;
default: {
throw Exception("Type is undefined.");
} break;
}
- return QString::null;
+ return TQString();
}
int Variable::toInt() const
@@ -213,24 +213,24 @@ int Variable::toInt() const
return variant().toInt();
}
-Variable::List Variable::children() const
+Variable::List Variable::tqchildren() const
{
- return d->children;
+ return d->tqchildren;
}
void Variable::appendChild(KSharedPtr<Variable> variable)
{
- d->children.append(variable);
+ d->tqchildren.append(variable);
}
void Variable::clearChildren()
{
- d->children.clear();
+ d->tqchildren.clear();
}
-void Variable::setChildren(const Variable::List& children)
+void Variable::setChildren(const Variable::List& tqchildren)
{
- d->children = children;
+ d->tqchildren = tqchildren;
}
/*