source: trunk/doc/html/qaxbindable.html@ 208

Last change on this file since 208 was 190, checked in by rudi, 14 years ago

reference documentation added

File size: 8.1 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/extensions/activeqt/control/qaxbindable.cpp:36 -->
3<html>
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6<title>QAxBindable Class</title>
7<style type="text/css"><!--
8fn { margin-left: 1cm; text-indent: -1cm; }
9a:link { color: #004faf; text-decoration: none }
10a:visited { color: #672967; text-decoration: none }
11body { background: #ffffff; color: black; }
12--></style>
13</head>
14<body>
15
16<table border="0" cellpadding="0" cellspacing="0" width="100%">
17<tr bgcolor="#E5E5E5">
18<td valign=center>
19 <a href="index.html">
20<font color="#004faf">Home</font></a>
21 | <a href="classes.html">
22<font color="#004faf">All&nbsp;Classes</font></a>
23 | <a href="mainclasses.html">
24<font color="#004faf">Main&nbsp;Classes</font></a>
25 | <a href="annotated.html">
26<font color="#004faf">Annotated</font></a>
27 | <a href="groups.html">
28<font color="#004faf">Grouped&nbsp;Classes</font></a>
29 | <a href="functions.html">
30<font color="#004faf">Functions</font></a>
31</td>
32<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QAxBindable Class Reference<br><small>[<a href="qaxserver.html">QAxServer module</a>]</small></h1>
33
34<p>The QAxBindable class provides an interface between a
35QWidget and an ActiveX client.
36<a href="#details">More...</a>
37<p>This class is part of the <b>Qt ActiveQt Extension</b>.
38<p><tt>#include &lt;<a href="qaxbindable-h.html">qaxbindable.h</a>&gt;</tt>
39<p><a href="qaxbindable-members.html">List of all member functions.</a>
40<h2>Public Members</h2>
41<ul>
42<li class=fn><a href="#QAxBindable"><b>QAxBindable</b></a> ()</li>
43<li class=fn>virtual <a href="#~QAxBindable"><b>~QAxBindable</b></a> ()</li>
44<li class=fn>virtual QAxAggregated * <a href="#createAggregate"><b>createAggregate</b></a> ()</li>
45</ul>
46<h2>Static Public Members</h2>
47<ul>
48<li class=fn>void <a href="#reportError"><b>reportError</b></a> ( int&nbsp;code, const&nbsp;QString&nbsp;&amp;&nbsp;src, const&nbsp;QString&nbsp;&amp;&nbsp;desc, const&nbsp;QString&nbsp;&amp;&nbsp;context = QString::null )</li>
49</ul>
50<h2>Protected Members</h2>
51<ul>
52<li class=fn>bool <a href="#requestPropertyChange"><b>requestPropertyChange</b></a> ( const&nbsp;char&nbsp;*&nbsp;property )</li>
53<li class=fn>void <a href="#propertyChanged"><b>propertyChanged</b></a> ( const&nbsp;char&nbsp;*&nbsp;property )</li>
54<li class=fn>IUnknown * <a href="#clientSite"><b>clientSite</b></a> () const</li>
55</ul>
56<hr><a name="details"></a><h2>Detailed Description</h2>
57<p> This class is defined in the <b>Qt <a href="activeqt.html#ActiveQt">ActiveQt</a> Extension</b>, which can be found in the <tt>qt/extensions</tt> directory. It is not included in the main Qt API.
58<p>
59
60The QAxBindable class provides an interface between a
61<a href="qwidget.html">QWidget</a> and an ActiveX client.
62
63<p>
64
65<p> The functions provided by this class allow an ActiveX control to
66communicate property changes to a client application. Inherit
67your control class from both QWidget (directly or indirectly) and
68this class to get access to this class's functions. The <a href="moc.html">meta object compiler</a> requires you to inherit from
69QWidget <em>first</em>.
70<p> <pre>
71 class MyActiveX : public <a href="qwidget.html">QWidget</a>, public QAxBindable
72 {
73 <a href="metaobjects.html#Q_OBJECT">Q_OBJECT</a>
74 Q_PROPERTY( int value READ value WRITE setValue )
75 public:
76 MyActiveX( <a href="qwidget.html">QWidget</a> *parent = 0, const char *name = 0 );
77 ...
78
79 int value() const;
80 void setValue( int );
81 };
82 </pre>
83
84<p> When implementing the property write function, use
85<a href="#requestPropertyChange">requestPropertyChange</a>() to get permission from the ActiveX client
86application to change this property. When the property changes,
87call <a href="#propertyChanged">propertyChanged</a>() to notify the ActiveX client application
88about the change. If a fatal error occurs in the control, use the
89static <a href="#reportError">reportError</a>() function to notify the client.
90<p> Use the interface returned by <a href="#clientSite">clientSite</a>() to call the ActiveX
91client. To implement additional COM interfaces in your ActiveX
92control, reimplement <a href="#createAggregate">createAggregate</a>() to return a new object of a
93<a href="qaxaggregated.html">QAxAggregated</a> subclass.
94
95<hr><h2>Member Function Documentation</h2>
96<h3 class=fn><a name="QAxBindable"></a>QAxBindable::QAxBindable ()
97</h3>
98Constructs an empty QAxBindable object.
99
100<h3 class=fn><a name="~QAxBindable"></a>QAxBindable::~QAxBindable ()<tt> [virtual]</tt>
101</h3>
102Destroys the QAxBindable object.
103
104<h3 class=fn>IUnknown * <a name="clientSite"></a>QAxBindable::clientSite () const<tt> [protected]</tt>
105</h3>
106Returns a pointer to the client site interface for this ActiveX object,
107or null if no client site has been set.
108<p> Call QueryInterface() on the returned interface to get the interface you
109want to call.
110
111<h3 class=fn><a href="qaxaggregated.html">QAxAggregated</a>&nbsp;* <a name="createAggregate"></a>QAxBindable::createAggregate ()<tt> [virtual]</tt>
112</h3>
113Reimplement this function when you want to implement additional
114COM interfaces in the ActiveX control, or when you want to provide
115alternative implementations of COM interfaces. Return a new object
116of a <a href="qaxaggregated.html">QAxAggregated</a> subclass.
117<p> The default implementation returns the null pointer.
118
119<h3 class=fn>void <a name="propertyChanged"></a>QAxBindable::propertyChanged ( const&nbsp;char&nbsp;*&nbsp;property )<tt> [protected]</tt>
120</h3>
121Call this function to notify the client that is hosting this
122ActiveX control that the property <em>property</em> has been changed.
123<p> This function is usually called at the end of the property's write
124function.
125<p> <p>See also <a href="#requestPropertyChange">requestPropertyChange</a>().
126
127<h3 class=fn>void <a name="reportError"></a>QAxBindable::reportError ( int&nbsp;code, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;src, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;desc, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;context = QString::null )<tt> [static]</tt>
128</h3>
129
130<p> Reports an error to the client application. <em>code</em> is a
131control-defined error code. <em>desc</em> is a human-readable description
132of the error intended for the application user. <em>src</em> is the name
133of the source for the error, typically the ActiveX server name. <em>context</em> can be the location of a help file with more information
134about the error. If <em>context</em> ends with a number in brackets,
135e.g. [12], this number will be interpreted as the context ID in
136the help file.
137
138<h3 class=fn>bool <a name="requestPropertyChange"></a>QAxBindable::requestPropertyChange ( const&nbsp;char&nbsp;*&nbsp;property )<tt> [protected]</tt>
139</h3>
140Call this function to request permission to change the property
141<em>property</em> from the client that is hosting this ActiveX control.
142Returns TRUE if the client allows the change; otherwise returns
143FALSE.
144<p> This function is usually called first in the write function for <em>property</em>, and writing is abandoned if the function returns FALSE.
145<p> <pre>
146 void MyActiveQt::setText( const <a href="qstring.html">QString</a> &amp;text )
147 {
148 if ( !requestPropertyChange( "text" ) )
149 return;
150
151 // update property
152
153 <a href="#propertyChanged">propertyChanged</a>( "text" );
154 }
155 </pre>
156
157<p> <p>See also <a href="#propertyChanged">propertyChanged</a>().
158
159<!-- eof -->
160<hr><p>
161This file is part of the <a href="index.html">Qt toolkit</a>.
162Copyright &copy; 1995-2007
163<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
164<table width=100% cellspacing=0 border=0><tr>
165<td>Copyright &copy; 2007
166<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
167<td align=right><div align=right>Qt 3.3.8</div>
168</table></div></address></body>
169</html>
Note: See TracBrowser for help on using the repository browser.