summaryrefslogtreecommitdiffstats
path: root/lib/kross/api/variant.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /lib/kross/api/variant.h
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/kross/api/variant.h')
-rw-r--r--lib/kross/api/variant.h82
1 files changed, 41 insertions, 41 deletions
diff --git a/lib/kross/api/variant.h b/lib/kross/api/variant.h
index 020e6e51..65b4c4e8 100644
--- a/lib/kross/api/variant.h
+++ b/lib/kross/api/variant.h
@@ -20,8 +20,8 @@
#ifndef KROSS_API_VARIANT_H
#define KROSS_API_VARIANT_H
-#include <qstring.h>
-#include <qvariant.h>
+#include <tqstring.h>
+#include <tqvariant.h>
#include "object.h"
#include "value.h"
@@ -32,22 +32,22 @@ namespace Kross { namespace Api {
class List;
/**
- * Variant value to wrap a QVariant into a \a Kross::Api::Value
+ * Variant value to wrap a TQVariant into a \a Kross::Api::Value
* to enable primitive types like strings or numerics.
*/
- class Variant : public Value<Variant, QVariant>
+ class Variant : public Value<Variant, TQVariant>
{
- friend class Value<Variant, QVariant>;
+ friend class Value<Variant, TQVariant>;
public:
/**
* Constructor.
*
- * \param value The initial QVariant-value
+ * \param value The initial TQVariant-value
* this Variant-Object has.
* \param name The name this Value has.
*/
- Variant(const QVariant& value);
+ Variant(const TQVariant& value);
inline operator bool () { return getValue().toBool(); }
inline operator int () { return getValue().toInt(); }
@@ -55,32 +55,32 @@ namespace Kross { namespace Api {
inline operator double () { return getValue().toDouble(); }
inline operator const char* () { return getValue().toString().latin1(); }
- inline operator QString () { return getValue().toString(); }
- inline operator const QString () { return getValue().toString(); }
- inline operator const QString& () { return getValue().asString(); }
+ inline operator TQString () { return getValue().toString(); }
+ inline operator const TQString () { return getValue().toString(); }
+ inline operator const TQString& () { return getValue().asString(); }
- inline operator QCString () { return getValue().toCString(); }
- inline operator const QCString () { return getValue().toCString(); }
- inline operator const QCString& () { return getValue().asCString(); }
+ inline operator TQCString () { return getValue().toCString(); }
+ inline operator const TQCString () { return getValue().toCString(); }
+ inline operator const TQCString& () { return getValue().asCString(); }
- inline operator QVariant () { return getValue(); }
- inline operator const QVariant () { return getValue(); }
- inline operator const QVariant& () { return getValue(); }
+ inline operator TQVariant () { return getValue(); }
+ inline operator const TQVariant () { return getValue(); }
+ inline operator const TQVariant& () { return getValue(); }
/**
- * Operator to return a QStringList.
+ * Operator to return a TQStringList.
*
* We can not just use getValue().toStringList() here cause maybe
* this Kross::Api::Variant is a Kross::Api::List which could be
* internaly used for list of strings as well. So, we use the
* toStringList() function which will take care of translating a
- * Kross::Api::List to a QStringList if possible or to throw an
- * exception if the Kross::Api::List isn't a QStringList.
+ * Kross::Api::List to a TQStringList if possible or to throw an
+ * exception if the Kross::Api::List isn't a TQStringList.
*/
- inline operator QStringList () {
+ inline operator TQStringList () {
return toStringList(this);
}
- inline operator QValueList<QVariant> () {
+ inline operator TQValueList<TQVariant> () {
return toList(this);
}
@@ -90,34 +90,34 @@ namespace Kross { namespace Api {
virtual ~Variant();
/// \see Kross::Api::Object::getClassName()
- virtual const QString getClassName() const;
+ virtual const TQString getClassName() const;
/**
* \return a string representation of the variant.
*
* \see Kross::Api::Object::toString()
*/
- virtual const QString toString();
+ virtual const TQString toString();
/**
* Try to convert the given \a Object into
- * a QVariant.
+ * a TQVariant.
*
* \throw TypeException If the convert failed.
* \param object The object to convert.
- * \return The to a QVariant converted object.
+ * \return The to a TQVariant converted object.
*/
- static const QVariant& toVariant(Object::Ptr object);
+ static const TQVariant& toVariant(Object::Ptr object);
/**
* Try to convert the given \a Object into
- * a QString.
+ * a TQString.
*
* \throw TypeException If the convert failed.
* \param object The object to convert.
- * \return The to a QString converted object.
+ * \return The to a TQString converted object.
*/
- static const QString toString(Object::Ptr object);
+ static const TQString toString(Object::Ptr object);
/**
* Try to convert the given \a Object into
@@ -151,23 +151,23 @@ namespace Kross { namespace Api {
/**
* Try to convert the given \a Object into
- * a Q_LLONG.
+ * a TQ_LLONG.
*
* \throw TypeException If the convert failed.
* \param object The object to convert.
- * \return The to a Q_LLONG converted object.
+ * \return The to a TQ_LLONG converted object.
*/
- static Q_LLONG toLLONG(Object::Ptr object);
+ static TQ_LLONG toLLONG(Object::Ptr object);
/**
* Try to convert the given \a Object into
- * a Q_ULLONG.
+ * a TQ_ULLONG.
*
* \throw TypeException If the convert failed.
* \param object The object to convert.
- * \return The to a Q_ULLONG converted object.
+ * \return The to a TQ_ULLONG converted object.
*/
- static Q_ULLONG toULLONG(Object::Ptr object);
+ static TQ_ULLONG toULLONG(Object::Ptr object);
/**
* Try to convert the given \a Object into
@@ -181,23 +181,23 @@ namespace Kross { namespace Api {
/**
* Try to convert the given \a Object into
- * a QStringList.
+ * a TQStringList.
*
* \throw TypeException If the convert failed.
* \param object The object to convert.
- * \return The to a QValueList converted object.
+ * \return The to a TQValueList converted object.
*/
- static QStringList toStringList(Object::Ptr object);
+ static TQStringList toStringList(Object::Ptr object);
/**
* Try to convert the given \a Object into
- * a QValueList of QVariant's.
+ * a TQValueList of TQVariant's.
*
* \throw TypeException If the convert failed.
* \param object The object to convert.
- * \return The to a QValueList converted object.
+ * \return The to a TQValueList converted object.
*/
- static QValueList<QVariant> toList(Object::Ptr object);
+ static TQValueList<TQVariant> toList(Object::Ptr object);
};