summaryrefslogtreecommitdiffstats
path: root/doc/object.doc
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2012-10-20 20:01:48 -0500
committerTimothy Pearson <[email protected]>2012-10-20 20:01:48 -0500
commit7608f0043b6dfc0b1adcaa8912793e1d3fe7b636 (patch)
tree7ffddfefaf990c9a33ee6a0f317b9133dc58305c /doc/object.doc
parentedec8306fb4f7dab5e6b0f368e889581f38ea3bc (diff)
downloadtqt3-7608f0043b6dfc0b1adcaa8912793e1d3fe7b636.tar.gz
tqt3-7608f0043b6dfc0b1adcaa8912793e1d3fe7b636.zip
Automated update from Qt3
Diffstat (limited to 'doc/object.doc')
-rw-r--r--doc/object.doc36
1 files changed, 18 insertions, 18 deletions
diff --git a/doc/object.doc b/doc/object.doc
index cd8ffb279..b5d6180cb 100644
--- a/doc/object.doc
+++ b/doc/object.doc
@@ -223,11 +223,11 @@ features like \c __property or \c [property]. Our solution works with
on the meta-object system that also provides object communication
through \link signalsandslots.html signals and slots\endlink.
-The \c Q_PROPERTY macro in a class declaration declares a
+The \c TQ_PROPERTY macro in a class declaration declares a
property. Properties can only be declared in classes that inherit \l
-QObject. A second macro, \c Q_OVERRIDE, can be used to override some
+QObject. A second macro, \c TQ_OVERRIDE, can be used to override some
aspects of an inherited property in a subclass. (See \link #override
-Q_OVERRIDE\endlink.)
+TQ_OVERRIDE\endlink.)
To the outer world, a property appears to be similar to a data member.
But properties have several features that distinguish them from
@@ -303,10 +303,10 @@ functions in use:
The class has a property "priority" that is not yet known to the meta
object system. In order to make the property known, you must
-declare it with the \c Q_PROPERTY macro. The syntax is as follows:
+declare it with the \c TQ_PROPERTY macro. The syntax is as follows:
\code
-Q_PROPERTY( type name READ getFunction [WRITE setFunction]
+TQ_PROPERTY( type name READ getFunction [WRITE setFunction]
[RESET resetFunction] [DESIGNABLE bool]
[SCRIPTABLE bool] [STORED bool] )
\endcode
@@ -335,15 +335,15 @@ It is possible to set a value by name, like this:
In the case of \c QValueList and \c QMap properties the value passes
is a QVariant whose value is the entire list or map.
-Enumeration types are registered with the \c Q_ENUMS macro. Here's the
+Enumeration types are registered with the \c TQ_ENUMS macro. Here's the
final class declaration including the property related declarations:
\code
class MyClass : public QObject
{
TQ_OBJECT
- Q_PROPERTY( Priority priority READ priority WRITE setPriority )
- Q_ENUMS( Priority )
+ TQ_PROPERTY( Priority priority READ priority WRITE setPriority )
+ TQ_ENUMS( Priority )
public:
MyClass( QObject * parent=0, const char * name=0 );
~MyClass();
@@ -354,13 +354,13 @@ final class declaration including the property related declarations:
};
\endcode
-Another similar macro is \c Q_SETS. Like \c Q_ENUMS, it registers an
+Another similar macro is \c TQ_SETS. Like \c TQ_ENUMS, it registers an
enumeration type but marks it in addition as a "set", i.e. the
enumeration values can be OR-ed together. An I/O class might have
enumeration values "Read" and "Write" and accept "Read|Write": such an
-enum is best handled with \c Q_SETS, rather than \c Q_ENUMS.
+enum is best handled with \c TQ_SETS, rather than \c TQ_ENUMS.
-The remaining keywords in the \c Q_PROPERTY section are \c RESET, \c
+The remaining keywords in the \c TQ_PROPERTY section are \c RESET, \c
DESIGNABLE, \c SCRIPTABLE and \c STORED.
\c RESET names a function that will set the property to its default
@@ -383,19 +383,19 @@ properties (like QPoint pos if QRect geometry is already a property)
define this to be \c FALSE.
-Connected to the property system is an additional macro, "Q_CLASSINFO",
+Connected to the property system is an additional macro, "TQ_CLASSINFO",
that can be used to attach additional name/value-pairs to a class'
meta object, for example:
\code
- Q_CLASSINFO( "Version", "3.0.0" )
+ TQ_CLASSINFO( "Version", "3.0.0" )
\endcode
Like other meta data, class information is accessible at runtime
through the meta object, see \l QMetaObject::classInfo() for details.
\target override
-\section1 Q_OVERRIDE
+\section1 TQ_OVERRIDE
When you inherit a QObject subclass you may wish to override some
aspects of some of the class's properties.
@@ -403,7 +403,7 @@ aspects of some of the class's properties.
For example, in QWidget we have the autoMask property defined like
this:
\code
- Q_PROPERTY( bool autoMask READ autoMask WRITE setAutoMask DESIGNABLE false SCRIPTABLE false )
+ TQ_PROPERTY( bool autoMask READ autoMask WRITE setAutoMask DESIGNABLE false SCRIPTABLE false )
\endcode
But we need to make the auto mask property designable in some QWidget
@@ -412,20 +412,20 @@ scriptable (e.g. for QSA). This is achieved by overriding these
features of the property in a subclass. In QCheckBox, for example, we
achieve this using the following code:
\code
- Q_OVERRIDE( bool autoMask DESIGNABLE true SCRIPTABLE true )
+ TQ_OVERRIDE( bool autoMask DESIGNABLE true SCRIPTABLE true )
\endcode
Another example is QToolButton. By default QToolButton has a read-only
"toggleButton" property, because that's what it inherits from QButton:
\code
- Q_PROPERTY( bool toggleButton READ isToggleButton )
+ TQ_PROPERTY( bool toggleButton READ isToggleButton )
\endcode
But we want to make our tool buttons able to be toggled, so we write a
WRITE function in QToolButton, and use the following property override
to make it acessible:
\code
- Q_OVERRIDE( bool toggleButton WRITE setToggleButton )
+ TQ_OVERRIDE( bool toggleButton WRITE setToggleButton )
\endcode
The result is read-write (and scriptable and designable, since we now
have a WRITE function) boolean property "toggleButton" for tool