diff options
author | Timothy Pearson <[email protected]> | 2012-01-26 23:32:43 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2012-01-26 23:32:43 -0600 |
commit | ea318d1431c89e647598c510c4245c6571aa5f46 (patch) | |
tree | 996d29b80c30d453dda86d1a23162d441628f169 /doc/html/qaxserver-example-hierarchy.html | |
parent | aaf89d4b48f69c9293feb187db26362e550b5561 (diff) | |
download | tqt3-ea318d1431c89e647598c510c4245c6571aa5f46.tar.gz tqt3-ea318d1431c89e647598c510c4245c6571aa5f46.zip |
Update to latest tqt3 automated conversion
Diffstat (limited to 'doc/html/qaxserver-example-hierarchy.html')
-rw-r--r-- | doc/html/qaxserver-example-hierarchy.html | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/doc/html/qaxserver-example-hierarchy.html b/doc/html/qaxserver-example-hierarchy.html index 1bede5f03..1a1ef5f78 100644 --- a/doc/html/qaxserver-example-hierarchy.html +++ b/doc/html/qaxserver-example-hierarchy.html @@ -33,22 +33,22 @@ body { background: #ffffff; color: black; } -The ActiveX control in this example is a <a href="qwidget.html">TQWidget</a> +The ActiveX control in this example is a <a href="ntqwidget.html">TQWidget</a> subclass with child widgets that are accessible as sub types. <p> -<pre> class TQParentWidget : public <a href="qwidget.html">TQWidget</a> +<pre> class TQParentWidget : public <a href="ntqwidget.html">TQWidget</a> { <a href="metaobjects.html#Q_OBJECT">Q_OBJECT</a> public: - TQParentWidget( <a href="qwidget.html">TQWidget</a> *parent = 0, const char *name = 0, WFlags f = 0 ); + TQParentWidget( <a href="ntqwidget.html">TQWidget</a> *parent = 0, const char *name = 0, WFlags f = 0 ); - <a href="qsize.html">TQSize</a> sizeHint() const; + <a href="ntqsize.html">TQSize</a> sizeHint() const; public slots: - void createSubWidget( const <a href="qstring.html">TQString</a> &name ); + void createSubWidget( const <a href="ntqstring.html">TQString</a> &name ); - TQSubWidget *subWidget( const <a href="qstring.html">TQString</a> &name ); + TQSubWidget *subWidget( const <a href="ntqstring.html">TQString</a> &name ); private: <a href="qvboxlayout.html">TQVBoxLayout</a> *vbox; @@ -57,64 +57,64 @@ subclass with child widgets that are accessible as sub types. with a name, and to return a pointer to a named widget. <p> -<pre> TQParentWidget::TQParentWidget( <a href="qwidget.html">TQWidget</a> *parent, const char *name, WFlags f ) - : <a href="qwidget.html">TQWidget</a>( parent, name, f ) +<pre> TQParentWidget::TQParentWidget( <a href="ntqwidget.html">TQWidget</a> *parent, const char *name, WFlags f ) + : <a href="ntqwidget.html">TQWidget</a>( parent, name, f ) { vbox = new <a href="qvboxlayout.html">TQVBoxLayout</a>( this ); - <a name="x2649"></a> vbox-><a href="qlayout.html#setAutoAdd">setAutoAdd</a>( TRUE ); + <a name="x2649"></a> vbox-><a href="ntqlayout.html#setAutoAdd">setAutoAdd</a>( TRUE ); } </pre>The constructor of TQParentWidget creates a vertical box layout. New child widgets are automatically added to the layout. -<p> <pre> void TQParentWidget::createSubWidget( const <a href="qstring.html">TQString</a> &name ) +<p> <pre> void TQParentWidget::createSubWidget( const <a href="ntqstring.html">TQString</a> &name ) { TQSubWidget *sw = new TQSubWidget( this, name ); sw->setLabel( name ); - sw-><a href="qwidget.html#show">show</a>(); + sw-><a href="ntqwidget.html#show">show</a>(); } </pre>The <tt>createSubWidget</tt> slot creates a new <tt>TQSubWidget</tt> with the name provided in the parameter, and sets the label to that name. The widget is also shown explicitly. -<p> <pre> TQSubWidget *TQParentWidget::subWidget( const <a href="qstring.html">TQString</a> &name ) +<p> <pre> TQSubWidget *TQParentWidget::subWidget( const <a href="ntqstring.html">TQString</a> &name ) { - return (TQSubWidget*)<a href="qobject.html#child">child</a>( name, "TQSubWidget" ); + return (TQSubWidget*)<a href="ntqobject.html#child">child</a>( name, "TQSubWidget" ); } -</pre>The <tt>subWidget</tt> slot uses the <a href="qobject.html#child">TQObject::child</a>() function and +</pre>The <tt>subWidget</tt> slot uses the <a href="ntqobject.html#child">TQObject::child</a>() function and returns the first child of type <tt>TQSubWidget</tt> that has the requested name. <p> -<pre> class TQSubWidget : public <a href="qwidget.html">TQWidget</a> +<pre> class TQSubWidget : public <a href="ntqwidget.html">TQWidget</a> { Q_OBJECT Q_PROPERTY( TQString label READ label WRITE setLabel ) public: - TQSubWidget( <a href="qwidget.html">TQWidget</a> *parent = 0, const char *name = 0, WFlags f = 0 ); + TQSubWidget( <a href="ntqwidget.html">TQWidget</a> *parent = 0, const char *name = 0, WFlags f = 0 ); - void setLabel( const <a href="qstring.html">TQString</a> &text ); - <a href="qstring.html">TQString</a> label() const; + void setLabel( const <a href="ntqstring.html">TQString</a> &text ); + <a href="ntqstring.html">TQString</a> label() const; - <a href="qsize.html">TQSize</a> sizeHint() const; + <a href="ntqsize.html">TQSize</a> sizeHint() const; protected: void paintEvent( <a href="qpaintevent.html">TQPaintEvent</a> *e ); private: - <a href="qstring.html">TQString</a> lbl; + <a href="ntqstring.html">TQString</a> lbl; }; </pre>The <tt>TQSubWidget</tt> class has a single string-property <tt>label</tt>, and implements the paintEvent to draw the label. <p> -<pre> TQSubWidget::TQSubWidget( <a href="qwidget.html">TQWidget</a> *parent, const char *name, WFlags f ) - : <a href="qwidget.html">TQWidget</a>( parent, name, f ) +<pre> TQSubWidget::TQSubWidget( <a href="ntqwidget.html">TQWidget</a> *parent, const char *name, WFlags f ) + : <a href="ntqwidget.html">TQWidget</a>( parent, name, f ) { } - void TQSubWidget::setLabel( const <a href="qstring.html">TQString</a> &text ) + void TQSubWidget::setLabel( const <a href="ntqstring.html">TQString</a> &text ) { lbl = text; - <a href="qobject.html#setName">setName</a>( text ); - <a href="qwidget.html#update">update</a>(); + <a href="ntqobject.html#setName">setName</a>( text ); + <a href="ntqwidget.html#update">update</a>(); } TQString TQSubWidget::label() const @@ -122,17 +122,17 @@ and implements the paintEvent to draw the label. return lbl; } - TQSize TQSubWidget::<a href="qwidget.html#sizeHint">sizeHint</a>() const + TQSize TQSubWidget::<a href="ntqwidget.html#sizeHint">sizeHint</a>() const { - <a href="qfontmetrics.html">TQFontMetrics</a> fm( <a href="qwidget.html#font">font</a>() ); - return TQSize( fm.<a href="qfontmetrics.html#width">width</a>(lbl), fm.<a href="qfontmetrics.html#height">height</a>() ); + <a href="ntqfontmetrics.html">TQFontMetrics</a> fm( <a href="ntqwidget.html#font">font</a>() ); + return TQSize( fm.<a href="ntqfontmetrics.html#width">width</a>(lbl), fm.<a href="ntqfontmetrics.html#height">height</a>() ); } - void TQSubWidget::<a href="qwidget.html#paintEvent">paintEvent</a>( <a href="qpaintevent.html">TQPaintEvent</a> * ) + void TQSubWidget::<a href="ntqwidget.html#paintEvent">paintEvent</a>( <a href="qpaintevent.html">TQPaintEvent</a> * ) { - <a href="qpainter.html">TQPainter</a> painter(this); - painter.<a href="qpainter.html#setPen">setPen</a>( <a href="qwidget.html#colorGroup">colorGroup</a>().text() ); - painter.<a href="qpainter.html#drawText">drawText</a>( <a href="qwidget.html#rect">rect</a>(), AlignCenter, lbl ); + <a href="ntqpainter.html">TQPainter</a> painter(this); + painter.<a href="ntqpainter.html#setPen">setPen</a>( <a href="ntqwidget.html#colorGroup">colorGroup</a>().text() ); + painter.<a href="ntqpainter.html#drawText">drawText</a>( <a href="ntqwidget.html#rect">rect</a>(), AlignCenter, lbl ); } </pre>The implementation of the TQSubWidget class is self-explanatory. <p> @@ -140,12 +140,12 @@ and implements the paintEvent to draw the label. <pre> class ActiveTQtFactory : public <a href="qaxfactory.html">TQAxFactory</a> { public: - ActiveTQtFactory( const <a href="quuid.html">TQUuid</a> &lib, const <a href="quuid.html">TQUuid</a> &app ) + ActiveTQtFactory( const <a href="ntquuid.html">TQUuid</a> &lib, const <a href="ntquuid.html">TQUuid</a> &app ) : <a href="qaxfactory.html">TQAxFactory</a>( lib, app ) {} - <a href="qstringlist.html">TQStringList</a> featureList() const + <a href="ntqstringlist.html">TQStringList</a> featureList() const { - <a href="qstringlist.html">TQStringList</a> list; + <a href="ntqstringlist.html">TQStringList</a> list; list << "TQParentWidget"; list << "TQSubWidget"; return list; @@ -153,7 +153,7 @@ and implements the paintEvent to draw the label. </pre>The <tt>ActiveTQtFactory</tt> class implements a <a href="qaxfactory.html">TQAxFactory</a>. It returns the class names of all supported types, <tt>TQParentWidget</tt> and <tt>TQSubWidget</tt>, from the <tt>featureList()</tt> reimplementation. -<p> <pre> <a href="qwidget.html">TQWidget</a> *create( const <a href="qstring.html">TQString</a> &key, TQWidget *parent, const char *name ) +<p> <pre> <a href="ntqwidget.html">TQWidget</a> *create( const <a href="ntqstring.html">TQString</a> &key, TQWidget *parent, const char *name ) { if ( key == "TQParentWidget" ) return new TQParentWidget( parent, name ); @@ -163,7 +163,7 @@ the class names of all supported types, <tt>TQParentWidget</tt> and </pre>The factory can however only create objects of the <tt>TQParentWidget</tt> type directly - objects of subtypes can only be created through the interface of <tt>TQParentWidget</tt> objects. -<p> <pre> <a href="quuid.html">TQUuid</a> classID( const <a href="qstring.html">TQString</a> &key ) const +<p> <pre> <a href="ntquuid.html">TQUuid</a> classID( const <a href="ntqstring.html">TQString</a> &key ) const { if ( key == "TQParentWidget" ) return TQUuid( "{d574a747-8016-46db-a07c-b2b4854ee75c}" ); @@ -172,7 +172,7 @@ interface of <tt>TQParentWidget</tt> objects. return TQUuid(); } - <a href="quuid.html">TQUuid</a> interfaceID( const <a href="qstring.html">TQString</a> &key ) const + <a href="ntquuid.html">TQUuid</a> interfaceID( const <a href="ntqstring.html">TQString</a> &key ) const { if ( key == "TQParentWidget" ) return TQUuid( "{4a30719d-d9c2-4659-9d16-67378209f822}" ); @@ -181,7 +181,7 @@ interface of <tt>TQParentWidget</tt> objects. return TQUuid(); } - <a href="quuid.html">TQUuid</a> eventsID( const <a href="qstring.html">TQString</a> &key ) const + <a href="ntquuid.html">TQUuid</a> eventsID( const <a href="ntqstring.html">TQString</a> &key ) const { if ( key == "TQParentWidget" ) return TQUuid( "{aac9f855-c3dc-4cae-b747-c77f4d509f4c}" ); @@ -192,7 +192,7 @@ interface of <tt>TQParentWidget</tt> objects. } </pre>COM however requires the IDs for the interfaces of the sub types as well to be able to marshal calls correctly. -<p> <pre> <a href="qstring.html">TQString</a> exposeToSuperClass( const <a href="qstring.html">TQString</a> &key ) const +<p> <pre> <a href="ntqstring.html">TQString</a> exposeToSuperClass( const <a href="ntqstring.html">TQString</a> &key ) const { if ( key == "TQSubWidget" ) return key; @@ -200,7 +200,7 @@ well to be able to marshal calls correctly. } }; </pre>Objects of the <tt>TQSubWidget</tt> type should not expose the full -functionality of e.g. <a href="qwidget.html">TQWidget</a>. Only those properties and slots +functionality of e.g. <a href="ntqwidget.html">TQWidget</a>. Only those properties and slots explicitly declared in the type are accessible. <p> <pre> TQAXFACTORY_EXPORT( ActiveTQtFactory, "{9e626211-be62-4d18-9483-9419358fbb03}", "{75c276de-1df5-451f-a004-e4fa1a587df1}" ) </pre>The factory is then exported using the <a href="qaxfactory.html#TQAXFACTORY_EXPORT">TQAXFACTORY_EXPORT</a> |