1QAxBindable(3qt)                                              QAxBindable(3qt)
2
3
4

NAME

6       QAxBindable - Interface between a QWidget and an ActiveX client
7

SYNOPSIS

9       This class is part of the Qt ActiveQt Extension.
10
11       #include <qaxbindable.h>
12
13   Public Members
14       QAxBindable ()
15       virtual ~QAxBindable ()
16       virtual QAxAggregated * createAggregate ()
17
18   Static Public Members
19       void reportError ( int code, const QString & src, const QString & desc,
20           const QString & context = QString::null )
21
22   Protected Members
23       bool requestPropertyChange ( const char * property )
24       void propertyChanged ( const char * property )
25       IUnknown * clientSite () const
26

DESCRIPTION

28       This class is defined in the Qt ActiveQt Extension, which can be found
29       in the qt/extensions directory. It is not included in the main Qt API.
30
31       The QAxBindable class provides an interface between a QWidget and an
32       ActiveX client.
33
34       The functions provided by this class allow an ActiveX control to
35       communicate property changes to a client application. Inherit your
36       control class from both QWidget (directly or indirectly) and this class
37       to get access to this class's functions. The meta object compiler
38       requires you to inherit from QWidget first.
39
40           class MyActiveX : public QWidget, public QAxBindable
41           {
42               Q_OBJECT
43               Q_PROPERTY( int value READ value WRITE setValue )
44           public:
45               MyActiveX( QWidget *parent = 0, const char *name = 0 );
46               ...
47               int value() const;
48               void setValue( int );
49           };
50
51       When implementing the property write function, use
52       requestPropertyChange() to get permission from the ActiveX client
53       application to change this property. When the property changes, call
54       propertyChanged() to notify the ActiveX client application about the
55       change. If a fatal error occurs in the control, use the static
56       reportError() function to notify the client.
57
58       Use the interface returned by clientSite() to call the ActiveX client.
59       To implement additional COM interfaces in your ActiveX control,
60       reimplement createAggregate() to return a new object of a QAxAggregated
61       subclass.
62

MEMBER FUNCTION DOCUMENTATION

QAxBindable::QAxBindable ()

65       Constructs an empty QAxBindable object.
66

QAxBindable::~QAxBindable () [virtual]

68       Destroys the QAxBindable object.
69

IUnknown * QAxBindable::clientSite () const [protected]

71       Returns a pointer to the client site interface for this ActiveX object,
72       or null if no client site has been set.
73
74       Call QueryInterface() on the returned interface to get the interface
75       you want to call.
76

QAxAggregated * QAxBindable::createAggregate () [virtual]

78       Reimplement this function when you want to implement additional COM
79       interfaces in the ActiveX control, or when you want to provide
80       alternative implementations of COM interfaces. Return a new object of a
81       QAxAggregated subclass.
82
83       The default implementation returns the null pointer.
84

void QAxBindable::propertyChanged ( const char * property ) [protected]

86       Call this function to notify the client that is hosting this ActiveX
87       control that the property property has been changed.
88
89       This function is usually called at the end of the property's write
90       function.
91
92       See also requestPropertyChange().
93

void QAxBindable::reportError ( int code, const QString & src, const QString &

95       desc, const QString & context = QString::null ) [static]
96       Reports an error to the client application. code is a control-defined
97       error code. desc is a human-readable description of the error intended
98       for the application user. src is the name of the source for the error,
99       typically the ActiveX server name. context can be the location of a
100       help file with more information about the error. If context ends with a
101       number in brackets, e.g. [12], this number will be interpreted as the
102       context ID in the help file.
103

bool QAxBindable::requestPropertyChange ( const char * property ) [protected]

105       Call this function to request permission to change the property
106       property from the client that is hosting this ActiveX control. Returns
107       TRUE if the client allows the change; otherwise returns FALSE.
108
109       This function is usually called first in the write function for
110       property, and writing is abandoned if the function returns FALSE.
111
112           void MyActiveQt::setText( const QString &text )
113           {
114               if ( !requestPropertyChange( "text" ) )
115                   return;
116               // update property
117               propertyChanged( "text" );
118           }
119
120       See also propertyChanged().
121
122

SEE ALSO

124       http://doc.trolltech.com/qaxbindable.html
125       http://www.trolltech.com/faq/tech.html
126
128       Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com.  See the
129       license file included in the distribution for a complete license
130       statement.
131

AUTHOR

133       Generated automatically from the source code.
134

BUGS

136       If you find a bug in Qt, please report it as described in
137       http://doc.trolltech.com/bughowto.html.  Good bug reports help us to
138       help you. Thank you.
139
140       The definitive Qt documentation is provided in HTML format; it is
141       located at $QTDIR/doc/html and can be read using Qt Assistant or with a
142       web browser. This man page is provided as a convenience for those users
143       who prefer man pages, although this format is not officially supported
144       by Trolltech.
145
146       If you find errors in this manual page, please report them to qt-
147       bugs@trolltech.com.  Please include the name of the manual page
148       (qaxbindable.3qt) and the Qt version (3.3.8).
149
150
151
152Trolltech AS                    2 February 2007               QAxBindable(3qt)
Impressum