summaryrefslogtreecommitdiffstats
path: root/doc/html/properties.html
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-01-26 23:32:43 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-01-26 23:32:43 -0600
commitea318d1431c89e647598c510c4245c6571aa5f46 (patch)
tree996d29b80c30d453dda86d1a23162d441628f169 /doc/html/properties.html
parentaaf89d4b48f69c9293feb187db26362e550b5561 (diff)
downloadtqt3-ea318d1431c89e647598c510c4245c6571aa5f46.tar.gz
tqt3-ea318d1431c89e647598c510c4245c6571aa5f46.zip
Update to latest tqt3 automated conversion
Diffstat (limited to 'doc/html/properties.html')
-rw-r--r--doc/html/properties.html52
1 files changed, 26 insertions, 26 deletions
diff --git a/doc/html/properties.html b/doc/html/properties.html
index 45a972779..bba5d99ca 100644
--- a/doc/html/properties.html
+++ b/doc/html/properties.html
@@ -41,31 +41,31 @@ features like <tt>__property</tt> or <tt>[property]</tt>. Our solution works wit
on the meta-object system that also provides object communication
through <a href="signalsandslots.html">signals and slots</a>.
<p> The <tt>Q_PROPERTY</tt> macro in a class declaration declares a
-property. Properties can only be declared in classes that inherit <a href="qobject.html">TQObject</a>. A second macro, <tt>Q_OVERRIDE</tt>, can be used to override some
+property. Properties can only be declared in classes that inherit <a href="ntqobject.html">TQObject</a>. A second macro, <tt>Q_OVERRIDE</tt>, can be used to override some
aspects of an inherited property in a subclass. (See <a href="#override">Q_OVERRIDE</a>.)
<p> To the outer world, a property appears to be similar to a data member.
But properties have several features that distinguish them from
ordinary data members:
<p> <ul>
<li> A read function. This always exists.
-<p> <li> A write function. This is optional: read-only properties like <a href="qwidget.html#isDesktop">TQWidget::isDesktop</a>() do not have one.
+<p> <li> A write function. This is optional: read-only properties like <a href="ntqwidget.html#isDesktop">TQWidget::isDesktop</a>() do not have one.
<p> <li> An attribute "stored" that indicates persistence. Most properties
-are stored, but a few virtual properties are not. For example, <a href="qwidget.html#minimumWidth">TQWidget::minimumWidth</a>() isn't stored, since it's just a view of
-<a href="qwidget.html#minimumSize">TQWidget::minimumSize</a>(), and has no data of its own.
+are stored, but a few virtual properties are not. For example, <a href="ntqwidget.html#minimumWidth">TQWidget::minimumWidth</a>() isn't stored, since it's just a view of
+<a href="ntqwidget.html#minimumSize">TQWidget::minimumSize</a>(), and has no data of its own.
<p> <li> A reset function to set a property back to its context specific
-default value. This is very rare, but for example, <a href="qwidget.html#font">TQWidget::font</a>()
-needs this, since no call to <a href="qwidget.html#setFont">TQWidget::setFont</a>() can mean 'reset to
+default value. This is very rare, but for example, <a href="ntqwidget.html#font">TQWidget::font</a>()
+needs this, since no call to <a href="ntqwidget.html#setFont">TQWidget::setFont</a>() can mean 'reset to
the context specific font'.
<p> <li> An attribute "designable" that indicates whether it makes sense to
make the property available in a GUI builder (e.g. <a href="designer-manual.html">TQt Designer</a>). For most properties this
-makes sense, but not for all, e.g. <a href="qbutton.html#isDown">TQButton::isDown</a>(). The user can
+makes sense, but not for all, e.g. <a href="ntqbutton.html#isDown">TQButton::isDown</a>(). The user can
press buttons, and the application programmer can make the program
press its own buttons, but a GUI design tool can't press buttons.
<p> </ul>
<p> The read, write, and reset functions must be public member functions
from the class in which the property is defined.
<p> Properties can be read and written through generic functions in
-<a href="qobject.html">TQObject</a> without knowing anything about the class in use. These two
+<a href="ntqobject.html">TQObject</a> without knowing anything about the class in use. These two
function calls are equivalent:
<p> <pre>
// TQButton *b and TQObject *o point to the same button
@@ -76,21 +76,21 @@ function calls are equivalent:
<p> Equivalent, that is, except that the first is faster, and provides
much better diagnostics at compile time. When practical, the first is
better. However, since you can get a list of all available properties
-for any TQObject through its <a href="qmetaobject.html">TQMetaObject</a>, <a href="qobject.html#setProperty">TQObject::setProperty</a>()
+for any TQObject through its <a href="ntqmetaobject.html">TQMetaObject</a>, <a href="ntqobject.html#setProperty">TQObject::setProperty</a>()
can give you control over classes that weren't available at compile
time.
-<p> As well as <a href="qobject.html#setProperty">TQObject::setProperty</a>(), there is a corresponding <a href="qobject.html#property">TQObject::property</a>() function. <a href="qmetaobject.html#propertyNames">TQMetaObject::propertyNames</a>() returns
-the names of all available properties. <a href="qmetaobject.html#property">TQMetaObject::property</a>()
+<p> As well as <a href="ntqobject.html#setProperty">TQObject::setProperty</a>(), there is a corresponding <a href="ntqobject.html#property">TQObject::property</a>() function. <a href="ntqmetaobject.html#propertyNames">TQMetaObject::propertyNames</a>() returns
+the names of all available properties. <a href="ntqmetaobject.html#property">TQMetaObject::property</a>()
returns the property data for a named property: a <a href="qmetaproperty.html">TQMetaProperty</a>
object.
<p> Here's a simple example that shows the most important property
functions in use:
<p> <pre>
- class MyClass : public <a href="qobject.html">TQObject</a>
+ class MyClass : public <a href="ntqobject.html">TQObject</a>
{
<a href="metaobjects.html#Q_OBJECT">Q_OBJECT</a>
public:
- MyClass( <a href="qobject.html">TQObject</a> * parent=0, const char * name=0 );
+ MyClass( <a href="ntqobject.html">TQObject</a> * parent=0, const char * name=0 );
~MyClass();
enum Priority { High, Low, VeryHigh, VeryLow };
@@ -112,31 +112,31 @@ to return either the type itself, a pointer to it, or a reference to
it. The optional write function must return void and must take exactly
one argument, either the type itself, a pointer or a const reference
to it. The meta object compiler enforces this.
-<p> The type of a property can be any <a href="qvariant.html">TQVariant</a> supported type or an
+<p> The type of a property can be any <a href="ntqvariant.html">TQVariant</a> supported type or an
enumeration type declared in the class itself. Since <tt>MyClass</tt> uses
the enumeration type <tt>Priority</tt> for the property, this type must be
registered with the property system as well.
<p> There are two exceptions to the above: The type of a property can also
-be either <a href="qvaluelist.html">TQValueList&lt;TQVariant&gt;</a> or <a href="qmap.html">TQMap&lt;TQString,TQVariant&gt;</a>. In
-these cases the type must be specified as <a href="qvaluelist.html">TQValueList</a> or as <a href="qmap.html">TQMap</a>
+be either <a href="ntqvaluelist.html">TQValueList&lt;TQVariant&gt;</a> or <a href="ntqmap.html">TQMap&lt;TQString,TQVariant&gt;</a>. In
+these cases the type must be specified as <a href="ntqvaluelist.html">TQValueList</a> or as <a href="ntqmap.html">TQMap</a>
(i.e. without their template parameters).
<p> It is possible to set a value by name, like this:
<pre>
obj-&gt;setProperty( "priority", "VeryHigh" );
</pre>
-In the case of <a href="qvaluelist.html">TQValueList</a> and <a href="qmap.html">TQMap</a> properties the value passes
-is a <a href="qvariant.html">TQVariant</a> whose value is the entire list or map.
+In the case of <a href="ntqvaluelist.html">TQValueList</a> and <a href="ntqmap.html">TQMap</a> properties the value passes
+is a <a href="ntqvariant.html">TQVariant</a> whose value is the entire list or map.
<p> Enumeration types are registered with the <tt>Q_ENUMS</tt> macro. Here's the
final class declaration including the property related declarations:
<p> <pre>
- class MyClass : public <a href="qobject.html">TQObject</a>
+ class MyClass : public <a href="ntqobject.html">TQObject</a>
{
Q_OBJECT
Q_PROPERTY( Priority priority READ priority WRITE setPriority )
Q_ENUMS( Priority )
public:
- MyClass( <a href="qobject.html">TQObject</a> * parent=0, const char * name=0 );
+ MyClass( <a href="ntqobject.html">TQObject</a> * parent=0, const char * name=0 );
~MyClass();
enum Priority { High, Low, VeryHigh, VeryLow };
@@ -163,7 +163,7 @@ you can specify a boolean member function.
<p> <tt>STORED</tt> declares whether the property's value must be remembered
when storing an object's state. Stored makes only sense for writable
properties. The default value is <tt>TRUE</tt>. Technically superfluous
-properties (like <a href="qpoint.html">TQPoint</a> pos if <a href="qrect.html">TQRect</a> geometry is already a property)
+properties (like <a href="ntqpoint.html">TQPoint</a> pos if <a href="ntqrect.html">TQRect</a> geometry is already a property)
define this to be <tt>FALSE</tt>.
<p> Connected to the property system is an additional macro, "Q_CLASSINFO",
that can be used to attach additional name/value-pairs to a class'
@@ -173,13 +173,13 @@ meta object, for example:
</pre>
<p> Like other meta data, class information is accessible at runtime
-through the meta object, see <a href="qmetaobject.html#classInfo">TQMetaObject::classInfo</a>() for details.
+through the meta object, see <a href="ntqmetaobject.html#classInfo">TQMetaObject::classInfo</a>() for details.
<p> <a name="override"></a>
<h2> Q_OVERRIDE
</h2>
-<a name="1"></a><p> When you inherit a <a href="qobject.html">TQObject</a> subclass you may wish to override some
+<a name="1"></a><p> When you inherit a <a href="ntqobject.html">TQObject</a> subclass you may wish to override some
aspects of some of the class's properties.
-<p> For example, in <a href="qwidget.html">TQWidget</a> we have the autoMask property defined like
+<p> For example, in <a href="ntqwidget.html">TQWidget</a> we have the autoMask property defined like
this:
<pre>
Q_PROPERTY( bool autoMask READ autoMask WRITE setAutoMask DESIGNABLE false SCRIPTABLE false )
@@ -188,13 +188,13 @@ this:
<p> But we need to make the auto mask property designable in some TQWidget
subclasses. Similarly some classes will need this property to be
scriptable (e.g. for TQSA). This is achieved by overriding these
-features of the property in a subclass. In <a href="qcheckbox.html">TQCheckBox</a>, for example, we
+features of the property in a subclass. In <a href="ntqcheckbox.html">TQCheckBox</a>, for example, we
achieve this using the following code:
<pre>
Q_OVERRIDE( bool autoMask DESIGNABLE true SCRIPTABLE true )
</pre>
-<p> Another example is <a href="qtoolbutton.html">TQToolButton</a>. By default TQToolButton has a read-only
+<p> Another example is <a href="ntqtoolbutton.html">TQToolButton</a>. By default TQToolButton has a read-only
"toggleButton" property, because that's what it inherits from TQButton:
<pre>
Q_PROPERTY( bool toggleButton READ isToggleButton )