From ea318d1431c89e647598c510c4245c6571aa5f46 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 26 Jan 2012 23:32:43 -0600 Subject: Update to latest tqt3 automated conversion --- doc/html/qaxserver-example-hierarchy.html | 82 +++++++++++++++---------------- 1 file changed, 41 insertions(+), 41 deletions(-) (limited to 'doc/html/qaxserver-example-hierarchy.html') 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 TQWidget +The ActiveX control in this example is a TQWidget subclass with child widgets that are accessible as sub types.

-

    class TQParentWidget : public TQWidget
+
    class TQParentWidget : public TQWidget
     {
         Q_OBJECT
     public:
-        TQParentWidget( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 );
+        TQParentWidget( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 );
 
-        TQSize sizeHint() const;
+        TQSize sizeHint() const;
 
     public slots:
-        void createSubWidget( const TQString &name );
+        void createSubWidget( const TQString &name );
 
-        TQSubWidget *subWidget( const TQString &name );
+        TQSubWidget *subWidget( const TQString &name );
 
     private:
         TQVBoxLayout *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.
 

-

    TQParentWidget::TQParentWidget( TQWidget *parent, const char *name, WFlags f )
-    : TQWidget( parent, name, f )
+
    TQParentWidget::TQParentWidget( TQWidget *parent, const char *name, WFlags f )
+    : TQWidget( parent, name, f )
     {
         vbox = new TQVBoxLayout( this );
-        vbox->setAutoAdd( TRUE );
+        vbox->setAutoAdd( TRUE );
     }
 
The constructor of TQParentWidget creates a vertical box layout. New child widgets are automatically added to the layout. -

    void TQParentWidget::createSubWidget( const TQString &name )
+

    void TQParentWidget::createSubWidget( const TQString &name )
     {
         TQSubWidget *sw = new TQSubWidget( this, name );
         sw->setLabel( name );
-        sw->show();
+        sw->show();
     }
 
The createSubWidget slot creates a new TQSubWidget with the name provided in the parameter, and sets the label to that name. The widget is also shown explicitly. -

    TQSubWidget *TQParentWidget::subWidget( const TQString &name )
+

    TQSubWidget *TQParentWidget::subWidget( const TQString &name )
     {
-        return (TQSubWidget*)child( name, "TQSubWidget" );
+        return (TQSubWidget*)child( name, "TQSubWidget" );
     }
-
The subWidget slot uses the TQObject::child() function and +
The subWidget slot uses the TQObject::child() function and returns the first child of type TQSubWidget that has the requested name.

-

    class TQSubWidget : public TQWidget
+
    class TQSubWidget : public TQWidget
     {
         Q_OBJECT
         Q_PROPERTY( TQString label READ label WRITE setLabel )
     public:
-        TQSubWidget( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 );
+        TQSubWidget( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 );
 
-        void setLabel( const TQString &text );
-        TQString label() const;
+        void setLabel( const TQString &text );
+        TQString label() const;
 
-        TQSize sizeHint() const;
+        TQSize sizeHint() const;
 
     protected:
         void paintEvent( TQPaintEvent *e );
 
     private:
-        TQString lbl;
+        TQString lbl;
     };
 
The TQSubWidget class has a single string-property label, and implements the paintEvent to draw the label.

-

    TQSubWidget::TQSubWidget( TQWidget *parent, const char *name, WFlags f )
-    : TQWidget( parent, name, f )
+
    TQSubWidget::TQSubWidget( TQWidget *parent, const char *name, WFlags f )
+    : TQWidget( parent, name, f )
     {
     }
 
-    void TQSubWidget::setLabel( const TQString &text )
+    void TQSubWidget::setLabel( const TQString &text )
     {
         lbl = text;
-        setName( text );
-        update();
+        setName( text );
+        update();
     }
 
     TQString TQSubWidget::label() const
@@ -122,17 +122,17 @@ and implements the paintEvent to draw the label.
         return lbl;
     }
 
-    TQSize TQSubWidget::sizeHint() const
+    TQSize TQSubWidget::sizeHint() const
     {
-        TQFontMetrics fm( font() );
-        return TQSize( fm.width(lbl), fm.height() );
+        TQFontMetrics fm( font() );
+        return TQSize( fm.width(lbl), fm.height() );
     }
 
-    void TQSubWidget::paintEvent( TQPaintEvent * )
+    void TQSubWidget::paintEvent( TQPaintEvent * )
     {
-        TQPainter painter(this);
-        painter.setPen( colorGroup().text() );
-        painter.drawText( rect(), AlignCenter, lbl );
+        TQPainter painter(this);
+        painter.setPen( colorGroup().text() );
+        painter.drawText( rect(), AlignCenter, lbl );
     }
 
The implementation of the TQSubWidget class is self-explanatory.

@@ -140,12 +140,12 @@ and implements the paintEvent to draw the label.

    class ActiveTQtFactory : public TQAxFactory
     {
     public:
-        ActiveTQtFactory( const TQUuid &lib, const TQUuid &app )
+        ActiveTQtFactory( const TQUuid &lib, const TQUuid &app )
             : TQAxFactory( lib, app )
         {}
-        TQStringList featureList() const
+        TQStringList featureList() const
         {
-            TQStringList list;
+            TQStringList list;
             list << "TQParentWidget";
             list << "TQSubWidget";
             return list;
@@ -153,7 +153,7 @@ and implements the paintEvent to draw the label.
 
The ActiveTQtFactory class implements a TQAxFactory. It returns the class names of all supported types, TQParentWidget and TQSubWidget, from the featureList() reimplementation. -

        TQWidget *create( const TQString &key, TQWidget *parent, const char *name )
+

        TQWidget *create( const TQString &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, TQParentWidget and
 
The factory can however only create objects of the TQParentWidget type directly - objects of subtypes can only be created through the interface of TQParentWidget objects. -

        TQUuid classID( const TQString &key ) const
+

        TQUuid classID( const TQString &key ) const
         {
             if ( key == "TQParentWidget" )
                 return TQUuid( "{d574a747-8016-46db-a07c-b2b4854ee75c}" );
@@ -172,7 +172,7 @@ interface of TQParentWidget objects.
 
             return TQUuid();
         }
-        TQUuid interfaceID( const TQString &key ) const
+        TQUuid interfaceID( const TQString &key ) const
         {
             if ( key == "TQParentWidget" )
                 return TQUuid( "{4a30719d-d9c2-4659-9d16-67378209f822}" );
@@ -181,7 +181,7 @@ interface of TQParentWidget objects.
 
             return TQUuid();
         }
-        TQUuid eventsID( const TQString &key ) const
+        TQUuid eventsID( const TQString &key ) const
         {
             if ( key == "TQParentWidget" )
                 return TQUuid( "{aac9f855-c3dc-4cae-b747-c77f4d509f4c}" );
@@ -192,7 +192,7 @@ interface of TQParentWidget objects.
         }
 
COM however requires the IDs for the interfaces of the sub types as well to be able to marshal calls correctly. -

        TQString exposeToSuperClass( const TQString &key ) const
+

        TQString exposeToSuperClass( const TQString &key ) const
         {
             if ( key == "TQSubWidget" )
                 return key;
@@ -200,7 +200,7 @@ well to be able to marshal calls correctly.
         }
     };
 
Objects of the TQSubWidget type should not expose the full -functionality of e.g. TQWidget. Only those properties and slots +functionality of e.g. TQWidget. Only those properties and slots explicitly declared in the type are accessible.

    TQAXFACTORY_EXPORT( ActiveTQtFactory, "{9e626211-be62-4d18-9483-9419358fbb03}", "{75c276de-1df5-451f-a004-e4fa1a587df1}" )
 
The factory is then exported using the TQAXFACTORY_EXPORT -- cgit v1.2.1