diff options
author | Timothy Pearson <[email protected]> | 2011-12-03 22:23:44 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-12-03 22:23:44 -0600 |
commit | 203ba231d0276943aae36111f9ec1e949f3c6a4c (patch) | |
tree | f039f7a5b5fc2da88a96876971bac580d87f6788 /sip/kio/kservicetype.sip | |
parent | fd35f4a8382b7d223bc0325b9ca3f88515778aa0 (diff) | |
download | pytde-203ba231d0276943aae36111f9ec1e949f3c6a4c.tar.gz pytde-203ba231d0276943aae36111f9ec1e949f3c6a4c.zip |
Initial TQt conversion
Diffstat (limited to 'sip/kio/kservicetype.sip')
-rw-r--r-- | sip/kio/kservicetype.sip | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/sip/kio/kservicetype.sip b/sip/kio/kservicetype.sip index adb6897..da8099b 100644 --- a/sip/kio/kservicetype.sip +++ b/sip/kio/kservicetype.sip @@ -32,32 +32,32 @@ class KServiceType : KSycocaEntry public: - typedef QValueList<KServiceType::Ptr> List; + typedef TQValueList<KServiceType::Ptr> List; public: - KServiceType (const QString&, const QString&, const QString&, const QString&); - KServiceType (const QString&); + KServiceType (const TQString&, const TQString&, const TQString&, const TQString&); + KServiceType (const TQString&); KServiceType (KDesktopFile*); - KServiceType (QDataStream&, int); - QString icon () const; - QString comment () const; - QString name () const; - QString desktopEntryPath () const; + KServiceType (TQDataStream&, int); + TQString icon () const; + TQString comment () const; + TQString name () const; + TQString desktopEntryPath () const; bool isDerived () const; - QString parentServiceType () const; + TQString parentServiceType () const; %If ( KDE_3_1_0 - ) - bool inherits (const QString&) const; + bool inherits (const TQString&) const; %End - virtual QVariant property (const QString&) const; - virtual QStringList propertyNames () const; + virtual TQVariant property (const TQString&) const; + virtual TQStringList propertyNames () const; bool isValid () const; - virtual QVariant::Type propertyDef (const QString&) const; - virtual QStringList propertyDefNames () const; - virtual const QMap<QString,QVariant::Type>& propertyDefs () const; - virtual void save (QDataStream&); - virtual void load (QDataStream&); + virtual TQVariant::Type propertyDef (const TQString&) const; + virtual TQStringList propertyDefNames () const; + virtual const TQMap<TQString,TQVariant::Type>& propertyDefs () const; + virtual void save (TQDataStream&); + virtual void load (TQDataStream&); %If ( KDE_3_2_0 - ) KServiceType::Ptr parentType (); @@ -65,8 +65,8 @@ public: KService::List services (); %End - static KServiceType::Ptr serviceType (const QString&); - static KService::List offers (const QString&); + static KServiceType::Ptr serviceType (const TQString&); + static KService::List offers (const TQString&); static KServiceType::List allServiceTypes (); protected: @@ -124,8 +124,8 @@ protected: }; -%MappedType QMap<QString,QVariant::Type> -//converts a Python dict of QString:QVariant +%MappedType TQMap<TQString,TQVariant::Type> +//converts a Python dict of TQString:TQVariant { %TypeHeaderCode #include <qmap.h> @@ -147,16 +147,16 @@ protected: // Get it. - const QMap<QString,QVariant::Type> cppmap = *sipCpp; - QMap<QString,QVariant::Type>::ConstIterator it; + const TQMap<TQString,TQVariant::Type> cppmap = *sipCpp; + TQMap<TQString,TQVariant::Type>::ConstIterator it; for (it = cppmap.begin (); it != cppmap.end (); ++it) { - QString acpp = it.key (); + TQString acpp = it.key (); int bcpp = (int) it.data (); PyObject *ainst; PyObject *binst = PyInt_FromLong (bcpp); - if (((ainst = sipConvertFromNewType(new QString (acpp), sipType_QString, sipTransferObj)) == NULL) + if (((ainst = sipConvertFromNewType(new TQString (acpp), sipType_QString, sipTransferObj)) == NULL) || (PyDict_SetItem (dict, ainst, binst) < 0)) { Py_XDECREF (ainst); @@ -171,23 +171,23 @@ protected: %ConvertToTypeCode - // Convert a Python dictionary to a QMap on the heap. + // Convert a Python dictionary to a TQMap on the heap. if (sipIsErr == NULL) return PyDict_Check(sipPy); - QMap<QString,QVariant::Type> *cppmap = new QMap<QString,QVariant::Type>; + TQMap<TQString,TQVariant::Type> *cppmap = new TQMap<TQString,TQVariant::Type>; PyObject *aelem, *belem; SIP_SSIZE_T pos = 0; - QString *acpp; - QVariant::Type bcpp; + TQString *acpp; + TQVariant::Type bcpp; while (PyDict_Next(sipPy, &pos, &aelem, &belem)) { int iserr = 0, acpp_state; - acpp = (QString *)sipForceConvertToType(aelem, sipType_QString, sipTransferObj, SIP_NOT_NONE, &acpp_state, &iserr); + acpp = (TQString *)sipForceConvertToType(aelem, sipType_QString, sipTransferObj, SIP_NOT_NONE, &acpp_state, &iserr); if (iserr || !PyInt_Check(belem)) { @@ -199,7 +199,7 @@ protected: return 0; } - bcpp = (QVariant::Type) PyInt_AS_LONG(belem); + bcpp = (TQVariant::Type) PyInt_AS_LONG(belem); cppmap->insert (*acpp, bcpp); @@ -213,7 +213,7 @@ protected: }; -%MappedType QValueList<KServiceType::Ptr> +%MappedType TQValueList<KServiceType::Ptr> //converts a Python list of KServiceType { %TypeHeaderCode @@ -233,11 +233,11 @@ protected: return NULL; // Get it. - QValueList<KServiceType::Ptr> *cList = (QValueList<KServiceType::Ptr> *)sipCpp; + TQValueList<KServiceType::Ptr> *cList = (TQValueList<KServiceType::Ptr> *)sipCpp; PyObject *inst; KSharedPtr <KServiceType> *svc; - QValueList<KServiceType::Ptr>::Iterator it; + TQValueList<KServiceType::Ptr>::Iterator it; for( it = cList->begin(); it != cList->end(); ++it ) { KSharedPtr <KServiceType> svcptr = static_cast<KServiceType::Ptr>(*it); @@ -261,7 +261,7 @@ protected: if (sipIsErr == NULL) return PyList_Check(sipPy); - QValueList<KServiceType::Ptr> *cList = new QValueList<KServiceType::Ptr>; + TQValueList<KServiceType::Ptr> *cList = new TQValueList<KServiceType::Ptr>; PyObject *elem; KServiceType *service; |