summaryrefslogtreecommitdiffstats
path: root/lib/koproperty/factory.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/koproperty/factory.h')
-rw-r--r--lib/koproperty/factory.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/lib/koproperty/factory.h b/lib/koproperty/factory.h
index eba55f62..8abc93b3 100644
--- a/lib/koproperty/factory.h
+++ b/lib/koproperty/factory.h
@@ -24,9 +24,9 @@
#include "koproperty_global.h"
#include <kstaticdeleter.h>
-#include <qobject.h>
+#include <tqobject.h>
-template<class U> class QValueList;
+template<class U> class TQValueList;
namespace KoProperty {
@@ -40,20 +40,20 @@ class FactoryManagerPrivate;
//typedef CustomProperty *(*createCustomProperty) (Property*);
//! \brief A prototype for custom property factory
-class KOPROPERTY_EXPORT CustomPropertyFactory : public QObject
+class KOPROPERTY_EXPORT CustomPropertyFactory : public TQObject
{
public:
- CustomPropertyFactory(QObject *parent);
+ CustomPropertyFactory(TQObject *tqparent);
virtual ~CustomPropertyFactory();
- /*! \return a new instance of custom property for \a parent.
+ /*! \return a new instance of custom property for \a tqparent.
Implement this for property types you want to support.
- Use parent->type() to get type of the property. */
- virtual CustomProperty* createCustomProperty(Property *parent) = 0;
+ Use tqparent->type() to get type of the property. */
+ virtual CustomProperty* createCustomProperty(Property *tqparent) = 0;
/*! \return a new instance of custom property for \a property.
Implement this for property editor types you want to support.
- Use parent->type() to get type of the property. */
+ Use tqparent->type() to get type of the property. */
virtual Widget* createCustomWidget(Property *property) = 0;
};
@@ -81,15 +81,15 @@ class KOPROPERTY_EXPORT CustomPropertyFactory : public QObject
\section custom_prop_composed Using Custom Properties to create composed properties
Use a composed property when you need more than one editor for a property. Examples
are rect, size or point properties.
- If you create a composed property, both parent and children properties must have custom
+ If you create a composed property, both tqparent and tqchildren properties must have custom
(different) types.
- Child properties are created in CustomProperty constructor of the <b>parent</b> type,
- by adding CustomProperty::property() as parent in Property constructor.\n
+ Child properties are created in CustomProperty constructor of the <b>tqparent</b> type,
+ by adding CustomProperty::property() as tqparent in Property constructor.\n
Child properties should return handleValue() == true and in CustomProperty::setValue(),
- parent's Property::setValue() should be called, making sure that useCustomProperty argument is set
+ tqparent's Property::setValue() should be called, making sure that useCustomProperty argument is set
to false.\n
- Parent's handleValue() should be set to false, unless you cannot store the property in a QVariant.
- You just need to update children's value, making sure that useCustomProperty argument is set
+ Parent's handleValue() should be set to false, unless you cannot store the property in a TQVariant.
+ You just need to update tqchildren's value, making sure that useCustomProperty argument is set
to false.
\section custom_editor Using Custom Editors
@@ -102,21 +102,21 @@ class KOPROPERTY_EXPORT CustomPropertyFactory : public QObject
To use your new editor, just create properties with the type number you registered using
\ref registerFactoryForEditor() . Your editor will automatically appear in the Editor.
- \section custom_prop_composed Using Custom Properties with value that cannot be stored in a QVariant
+ \section custom_prop_composed Using Custom Properties with value that cannot be stored in a TQVariant
You then need to set handleValue() to true. The Widget you create also have
to call directly CustomProperty member to store the value. just make sure you call emitPropertyChanged()
- when the proerty value changes. Also make sure to avoid infinite recursion if you use children properties.
+ when the proerty value changes. Also make sure to avoid infinite recursion if you use tqchildren properties.
\author Cedric Pasteur <cedric.pasteur@free.fr>
\author Alexander Dymo <cloudtemple@mskat.net>
*/
-class KOPROPERTY_EXPORT FactoryManager : public QObject
+class KOPROPERTY_EXPORT FactoryManager : public TQObject
{
public:
/*! Registers a custom factory \a factory for handling property editor for \a editorType.
This custom factory will be used before defaults when widgetForProperty() is called.
\a creator is not owned by this Factory object, but it's good idea
- to instantiate CustomPropertyFactory object itself as a child of Factory parent. For example:
+ to instantiate CustomPropertyFactory object itself as a child of Factory tqparent. For example:
\code
MyCustomPropertyFactory *f = new MyCustomPropertyFactory(KoProperty::Factory::self());
KoProperty::Factory::self()->registerEditor( MyCustomType, f );
@@ -125,7 +125,7 @@ class KOPROPERTY_EXPORT FactoryManager : public QObject
/*! Registers custom factory \a factory for handling property editors for \a editorTypes.
@see registerFactoryForEditor(). */
- void registerFactoryForEditors(const QValueList<int> &editorTypes, CustomPropertyFactory *factory);
+ void registerFactoryForEditors(const TQValueList<int> &editorTypes, CustomPropertyFactory *factory);
/*! \return custom factory for type \a type or NULL if there
is no such property type registered.
@@ -133,7 +133,7 @@ class KOPROPERTY_EXPORT FactoryManager : public QObject
CustomPropertyFactory *factoryForEditorType(int type);
/*! Creates and returns the editor for given property type.
- Warning: editor and viewer widgets won't have parent widget. Property editor
+ Warning: editor and viewer widgets won't have tqparent widget. Property editor
cares about reparenting and deletion of returned widgets in machines.
If \a createWidget is false, just create child properties, not widget.*/
Widget* createWidgetForProperty(Property *property);
@@ -144,13 +144,13 @@ class KOPROPERTY_EXPORT FactoryManager : public QObject
/*! Registers a custom property factory that handles a CustomProperty for \a types.
@see registerFactoryForProperty() */
- void registerFactoryForProperties(const QValueList<int> &propertyTypes,
+ void registerFactoryForProperties(const TQValueList<int> &propertyTypes,
CustomPropertyFactory *factory);
/*! This function is called in Property::Property() to create (optional)
custom property. It creates the custom property for built-in types, or
calls one of createCustomProperty function previously registered for other types. */
- CustomProperty* createCustomProperty(Property *parent);
+ CustomProperty* createCustomProperty(Property *tqparent);
/*! \return a pointer to a property factory instance.*/
static FactoryManager* self();