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/qaxfactory.cpp:75 -->
|
---|
3 | <html>
|
---|
4 | <head>
|
---|
5 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
---|
6 | <title>QAxFactory Class</title>
|
---|
7 | <style type="text/css"><!--
|
---|
8 | fn { margin-left: 1cm; text-indent: -1cm; }
|
---|
9 | a:link { color: #004faf; text-decoration: none }
|
---|
10 | a:visited { color: #672967; text-decoration: none }
|
---|
11 | body { 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 Classes</font></a>
|
---|
23 | | <a href="mainclasses.html">
|
---|
24 | <font color="#004faf">Main 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 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>QAxFactory Class Reference<br><small>[<a href="qaxserver.html">QAxServer module</a>]</small></h1>
|
---|
33 |
|
---|
34 | <p>The QAxFactory class defines a factory for the creation of COM components.
|
---|
35 | <a href="#details">More...</a>
|
---|
36 | <p>This class is part of the <b>Qt ActiveQt Extension</b>.
|
---|
37 | <p><tt>#include <<a href="qaxfactory-h.html">qaxfactory.h</a>></tt>
|
---|
38 | <p><a href="qaxfactory-members.html">List of all member functions.</a>
|
---|
39 | <h2>Public Members</h2>
|
---|
40 | <ul>
|
---|
41 | <li class=fn><a href="#QAxFactory"><b>QAxFactory</b></a> ( const QUuid & libid, const QUuid & appid )</li>
|
---|
42 | <li class=fn>virtual <a href="#~QAxFactory"><b>~QAxFactory</b></a> ()</li>
|
---|
43 | <li class=fn>virtual QStringList <a href="#featureList"><b>featureList</b></a> () const = 0</li>
|
---|
44 | <li class=fn>virtual QWidget * <a href="#create"><b>create</b></a> ( const QString & key, QWidget * parent = 0, const char * name = 0 )</li>
|
---|
45 | <li class=fn>virtual QObject * <a href="#createObject"><b>createObject</b></a> ( const QString & key, QObject * parent = 0, const char * name = 0 )</li>
|
---|
46 | <li class=fn>virtual QMetaObject * <a href="#metaObject"><b>metaObject</b></a> ( const QString & key ) const</li>
|
---|
47 | <li class=fn>virtual bool <a href="#createObjectWrapper"><b>createObjectWrapper</b></a> ( QObject * object, IDispatch ** wrapper )</li>
|
---|
48 | <li class=fn>virtual QUuid <a href="#classID"><b>classID</b></a> ( const QString & key ) const</li>
|
---|
49 | <li class=fn>virtual QUuid <a href="#interfaceID"><b>interfaceID</b></a> ( const QString & key ) const</li>
|
---|
50 | <li class=fn>virtual QUuid <a href="#eventsID"><b>eventsID</b></a> ( const QString & key ) const</li>
|
---|
51 | <li class=fn>virtual QUuid <a href="#typeLibID"><b>typeLibID</b></a> () const</li>
|
---|
52 | <li class=fn>virtual QUuid <a href="#appID"><b>appID</b></a> () const</li>
|
---|
53 | <li class=fn>virtual void <a href="#registerClass"><b>registerClass</b></a> ( const QString & key, QSettings * settings ) const</li>
|
---|
54 | <li class=fn>virtual void <a href="#unregisterClass"><b>unregisterClass</b></a> ( const QString & key, QSettings * settings ) const</li>
|
---|
55 | <li class=fn>virtual bool <a href="#validateLicenseKey"><b>validateLicenseKey</b></a> ( const QString & key, const QString & licenseKey ) const</li>
|
---|
56 | <li class=fn>virtual QString <a href="#exposeToSuperClass"><b>exposeToSuperClass</b></a> ( const QString & key ) const</li>
|
---|
57 | <li class=fn>virtual bool <a href="#stayTopLevel"><b>stayTopLevel</b></a> ( const QString & key ) const</li>
|
---|
58 | <li class=fn>virtual bool <a href="#hasStockEvents"><b>hasStockEvents</b></a> ( const QString & key ) const</li>
|
---|
59 | <li class=fn>virtual bool <a href="#isService"><b>isService</b></a> () const</li>
|
---|
60 | <li class=fn>enum <a href="#ServerType-enum"><b>ServerType</b></a> { SingleInstance, MultipleInstances }</li>
|
---|
61 | </ul>
|
---|
62 | <h2>Static Public Members</h2>
|
---|
63 | <ul>
|
---|
64 | <li class=fn>bool <a href="#isServer"><b>isServer</b></a> ()</li>
|
---|
65 | <li class=fn>QString <a href="#serverDirPath"><b>serverDirPath</b></a> ()</li>
|
---|
66 | <li class=fn>QString <a href="#serverFilePath"><b>serverFilePath</b></a> ()</li>
|
---|
67 | <li class=fn>bool <a href="#startServer"><b>startServer</b></a> ( ServerType type = MultipleInstances )</li>
|
---|
68 | <li class=fn>bool <a href="#stopServer"><b>stopServer</b></a> ()</li>
|
---|
69 | </ul>
|
---|
70 | <hr><a name="details"></a><h2>Detailed Description</h2>
|
---|
71 | <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.
|
---|
72 | <p>
|
---|
73 |
|
---|
74 | The QAxFactory class defines a factory for the creation of COM components.
|
---|
75 |
|
---|
76 | <p>
|
---|
77 |
|
---|
78 | <!-- index QAXFACTORY_DEFAULT --><a name="QAXFACTORY_DEFAULT"></a><!-- index QAXFACTORY_EXPORT --><a name="QAXFACTORY_EXPORT"></a><!-- index QAXFACTORY_BEGIN --><a name="QAXFACTORY_BEGIN"></a><!-- index QAXFACTORY_END --><a name="QAXFACTORY_END"></a><!-- index QAXCLASS --><a name="QAXCLASS"></a>
|
---|
79 | <p> Implement this factory once in your ActiveX server to provide
|
---|
80 | information about the components the server can create. If your
|
---|
81 | server supports just a single ActiveX control, you can use the
|
---|
82 | default factory implementation instead of implementing the factory
|
---|
83 | yourself. Use the <a href="qaxfactory.html#QAXFACTORY_DEFAULT">QAXFACTORY_DEFAULT</a> macro in any
|
---|
84 | implementation file (e.g. main.cpp) to instantiate and export the
|
---|
85 | default factory:
|
---|
86 | <p> <pre>
|
---|
87 | #include <<a href="qapplication-h.html">qapplication.h</a>>
|
---|
88 | #include <<a href="qaxfactory-h.html">qaxfactory.h</a>>
|
---|
89 |
|
---|
90 | #include "theactivex.h"
|
---|
91 |
|
---|
92 | QAXFACTORY_DEFAULT(
|
---|
93 | TheActiveX, // widget class
|
---|
94 | "{01234567-89AB-CDEF-0123-456789ABCDEF}", // class ID
|
---|
95 | "{01234567-89AB-CDEF-0123-456789ABCDEF}", // interface ID
|
---|
96 | "{01234567-89AB-CDEF-0123-456789ABCDEF}", // event interface ID
|
---|
97 | "{01234567-89AB-CDEF-0123-456789ABCDEF}", // type library ID
|
---|
98 | "{01234567-89AB-CDEF-0123-456789ABCDEF}" // application ID
|
---|
99 | )
|
---|
100 | </pre>
|
---|
101 |
|
---|
102 | <p> If you implement your own factory reimplement the pure virtual
|
---|
103 | functions, provide the unique identifiers for the ActiveX
|
---|
104 | controls, and use the <a href="qaxfactory.html#QAXFACTORY_EXPORT">QAXFACTORY_EXPORT</a> macro to instantiate
|
---|
105 | and export it:
|
---|
106 | <p> <pre>
|
---|
107 | QStringList ActiveQtFactory::featureList() const
|
---|
108 | {
|
---|
109 | <a href="qstringlist.html">QStringList</a> list;
|
---|
110 | list << "ActiveX1";
|
---|
111 | list << "ActiveX2";
|
---|
112 | ...
|
---|
113 | return list;
|
---|
114 | }
|
---|
115 |
|
---|
116 | QWidget *ActiveQtFactory::create( const <a href="qstring.html">QString</a> &key, QWidget *parent, const char *name )
|
---|
117 | {
|
---|
118 | if ( key == "ActiveX1" )
|
---|
119 | return new ActiveX1( parent, name );
|
---|
120 | if ( key == "ActiveX2" )
|
---|
121 | return new ActiveX2( parent, name );
|
---|
122 | ...
|
---|
123 | return 0;
|
---|
124 | }
|
---|
125 |
|
---|
126 | QUuid ActiveQtFactory::classID( const <a href="qstring.html">QString</a> &key ) const
|
---|
127 | {
|
---|
128 | if ( key == "ActiveX1" )
|
---|
129 | return "{01234567-89AB-CDEF-0123-456789ABCDEF}";
|
---|
130 | ...
|
---|
131 | return QUuid();
|
---|
132 | }
|
---|
133 |
|
---|
134 | QUuid ActiveQtFactory::interfaceID( const <a href="qstring.html">QString</a> &key ) const
|
---|
135 | {
|
---|
136 | if ( key == "ActiveX1" )
|
---|
137 | return "{01234567-89AB-CDEF-0123-456789ABCDEF}";
|
---|
138 | ...
|
---|
139 | return QUuid();
|
---|
140 | }
|
---|
141 |
|
---|
142 | QUuid ActiveQtFactory::eventsID( const <a href="qstring.html">QString</a> &key ) const
|
---|
143 | {
|
---|
144 | if ( key == "ActiveX1" )
|
---|
145 | return "{01234567-89AB-CDEF-0123-456789ABCDEF}";
|
---|
146 | ...
|
---|
147 | return QUuid();
|
---|
148 | }
|
---|
149 |
|
---|
150 | QAXFACTORY_EXPORT(
|
---|
151 | MyFactory, // factory class
|
---|
152 | "{01234567-89AB-CDEF-0123-456789ABCDEF}", // type library ID
|
---|
153 | "{01234567-89AB-CDEF-0123-456789ABCDEF}" // application ID
|
---|
154 | )
|
---|
155 | </pre>
|
---|
156 |
|
---|
157 | <p> If you use the <tt>Q_CLASSINFO</tt> macro to provide the unique identifiers
|
---|
158 | or other attributes for your class you can use the <a href="qaxfactory.html#QAXFACTORY_BEGIN">QAXFACTORY_BEGIN</a>,
|
---|
159 | <a href="qaxfactory.html#QAXCLASS">QAXCLASS</a> and <a href="qaxfactory.html#QAXFACTORY_END">QAXFACTORY_END</a> macros to expose one or more classes
|
---|
160 | as COM objects.
|
---|
161 | <p> <pre>
|
---|
162 | QAXFACTORY_BEGIN(
|
---|
163 | "{01234567-89AB-CDEF-0123-456789ABCDEF}", // type library ID
|
---|
164 | "{01234567-89AB-CDEF-0123-456789ABCDEF}" // application ID
|
---|
165 | )
|
---|
166 | QAXCLASS(Class1)
|
---|
167 | QAXCLASS(Class2)
|
---|
168 | QAXFACTORY_END()
|
---|
169 | </pre>
|
---|
170 |
|
---|
171 | <p> Only one QAxFactory implementation may be instantiated and
|
---|
172 | exported by an ActiveX server application. This instance is accessible
|
---|
173 | through the global qAxFactory() function.
|
---|
174 | <p> A factory can also reimplement the <a href="#registerClass">registerClass</a>() and
|
---|
175 | <a href="#unregisterClass">unregisterClass</a>() functions to set additional flags for an ActiveX
|
---|
176 | control in the registry. To limit the number of methods or
|
---|
177 | properties a widget class exposes from its parent classes
|
---|
178 | reimplement <a href="#exposeToSuperClass">exposeToSuperClass</a>().
|
---|
179 |
|
---|
180 | <hr><h2>Member Type Documentation</h2>
|
---|
181 | <h3 class=fn><a name="ServerType-enum"></a>QAxFactory::ServerType</h3>
|
---|
182 |
|
---|
183 | <p> This enum specifies the different types of servers that can be
|
---|
184 | started with startServer.
|
---|
185 | <ul>
|
---|
186 | <li><tt>QAxFactory::SingleInstance</tt> - The server can create only one instance of each
|
---|
187 | supplied class.
|
---|
188 | <li><tt>QAxFactory::MultipleInstances</tt> - The server can create multiple instances of
|
---|
189 | each supplied class.
|
---|
190 | </ul>
|
---|
191 | <hr><h2>Member Function Documentation</h2>
|
---|
192 | <h3 class=fn><a name="QAxFactory"></a>QAxFactory::QAxFactory ( const <a href="quuid.html">QUuid</a> & libid, const <a href="quuid.html">QUuid</a> & appid )
|
---|
193 | </h3>
|
---|
194 | Constructs a QAxFactory object that returns <em>libid</em> and <em>appid</em>
|
---|
195 | in the implementation of the respective interface functions.
|
---|
196 |
|
---|
197 | <h3 class=fn><a name="~QAxFactory"></a>QAxFactory::~QAxFactory ()<tt> [virtual]</tt>
|
---|
198 | </h3>
|
---|
199 | Destroys the QAxFactory object.
|
---|
200 |
|
---|
201 | <h3 class=fn><a href="quuid.html">QUuid</a> <a name="appID"></a>QAxFactory::appID () const<tt> [virtual]</tt>
|
---|
202 | </h3>
|
---|
203 |
|
---|
204 | <p> Reimplement this function to return the ActiveX server's
|
---|
205 | application identifier.
|
---|
206 |
|
---|
207 | <h3 class=fn><a href="quuid.html">QUuid</a> <a name="classID"></a>QAxFactory::classID ( const <a href="qstring.html">QString</a> & key ) const<tt> [virtual]</tt>
|
---|
208 | </h3>
|
---|
209 | Reimplement this function to return the class identifier for each
|
---|
210 | <em>key</em> returned by the <a href="#featureList">featureList</a>() implementation, or an empty
|
---|
211 | <a href="quuid.html">QUuid</a> if this factory doesn't support the value of <em>key</em>.
|
---|
212 | <p> The default implementation interprets <em>key</em> as the class name,
|
---|
213 | and returns the value of the Q_CLASSINFO entry "ClassID".
|
---|
214 |
|
---|
215 | <h3 class=fn><a href="qwidget.html">QWidget</a> * <a name="create"></a>QAxFactory::create ( const <a href="qstring.html">QString</a> & key, <a href="qwidget.html">QWidget</a> * parent = 0, const char * name = 0 )<tt> [virtual]</tt>
|
---|
216 | </h3>
|
---|
217 | Reimplement this function to return a new widget for <em>key</em>.
|
---|
218 | Propagate <em>parent</em> and <em>name</em> to the <a href="qwidget.html">QWidget</a> constructor. Return
|
---|
219 | 0 if this factory doesn't support the value of <em>key</em>.
|
---|
220 | <p> The returned widget will be exposed as an ActiveX control, e.g.
|
---|
221 | a COM object that can be embedded as a control into applications.
|
---|
222 | <p> The default implementation returns 0.
|
---|
223 |
|
---|
224 | <h3 class=fn><a href="qobject.html">QObject</a> * <a name="createObject"></a>QAxFactory::createObject ( const <a href="qstring.html">QString</a> & key, <a href="qobject.html">QObject</a> * parent = 0, const char * name = 0 )<tt> [virtual]</tt>
|
---|
225 | </h3>
|
---|
226 | Reimplement this function to return a new object for <em>key</em>.
|
---|
227 | Propagate <em>parent</em> and <em>name</em> to the <a href="qwidget.html">QWidget</a> constructor. Return
|
---|
228 | 0 if this factory doesn't support the value of <em>key</em>.
|
---|
229 | <p> If the object returned is a QWidget it will be exposed as an ActiveX
|
---|
230 | control, otherwise the returned object will be exposed as a COM object.
|
---|
231 | <p> The default implementation returns the result <a href="#create">QAxFactory::create</a>() if
|
---|
232 | <em>parent</em> is 0 or a widget, otherwise returns 0.
|
---|
233 |
|
---|
234 | <h3 class=fn>bool <a name="createObjectWrapper"></a>QAxFactory::createObjectWrapper ( <a href="qobject.html">QObject</a> * object, IDispatch ** wrapper )<tt> [virtual]</tt>
|
---|
235 | </h3>
|
---|
236 |
|
---|
237 | <p> Reimplement this function to provide the COM object for <em>object</em>
|
---|
238 | in <em>wrapper</em>. Return TRUE if the function was successfull, otherwise
|
---|
239 | return FALSE.
|
---|
240 | <p> The default implementation creates a generic automation wrapper based
|
---|
241 | on the <a href="metaobjects.html#meta-object">meta object</a> information of <em>object</em>.
|
---|
242 |
|
---|
243 | <h3 class=fn><a href="quuid.html">QUuid</a> <a name="eventsID"></a>QAxFactory::eventsID ( const <a href="qstring.html">QString</a> & key ) const<tt> [virtual]</tt>
|
---|
244 | </h3>
|
---|
245 | Reimplement this function to return the identifier of the event
|
---|
246 | interface for each <em>key</em> returned by the <a href="#featureList">featureList</a>()
|
---|
247 | implementation, or an empty <a href="quuid.html">QUuid</a> if this factory doesn't support
|
---|
248 | the value of <em>key</em>.
|
---|
249 | <p> The default implementation interprets <em>key</em> as the class name,
|
---|
250 | and returns the value of the Q_CLASSINFO entry "EventsID".
|
---|
251 |
|
---|
252 | <h3 class=fn><a href="qstring.html">QString</a> <a name="exposeToSuperClass"></a>QAxFactory::exposeToSuperClass ( const <a href="qstring.html">QString</a> & key ) const<tt> [virtual]</tt>
|
---|
253 | </h3>
|
---|
254 | Reimplement this function to return the name of the super class of
|
---|
255 | <em>key</em> up to which methods and properties should be exposed by the
|
---|
256 | ActiveX control.
|
---|
257 | <p> The default implementation interprets <em>key</em> as the class name,
|
---|
258 | and returns the value of the Q_CLASSINFO entry "ToSuperClass". If
|
---|
259 | no such value is set the null-string is returned, and the functions
|
---|
260 | and properties of all the super classes including <a href="qwidget.html">QWidget</a> will be
|
---|
261 | exposed.
|
---|
262 | <p> To only expose the functions and properties of the class itself,
|
---|
263 | reimplement this function to return <em>key</em>.
|
---|
264 |
|
---|
265 | <h3 class=fn><a href="qstringlist.html">QStringList</a> <a name="featureList"></a>QAxFactory::featureList () const<tt> [pure virtual]</tt>
|
---|
266 | </h3>
|
---|
267 |
|
---|
268 | <p> Reimplement this function to return a list of the widgets (class
|
---|
269 | names) supported by this factory.
|
---|
270 |
|
---|
271 | <h3 class=fn>bool <a name="hasStockEvents"></a>QAxFactory::hasStockEvents ( const <a href="qstring.html">QString</a> & key ) const<tt> [virtual]</tt>
|
---|
272 | </h3>
|
---|
273 | Reimplement this function to return TRUE if the ActiveX control
|
---|
274 | <em>key</em> should support the standard ActiveX events
|
---|
275 | <ul>
|
---|
276 | <li> Click
|
---|
277 | <li> DblClick
|
---|
278 | <li> KeyDown
|
---|
279 | <li> KeyPress
|
---|
280 | <li> KeyUp
|
---|
281 | <li> MouseDown
|
---|
282 | <li> MouseUp
|
---|
283 | <li> MouseMove
|
---|
284 | </ul>
|
---|
285 | <p> The default implementation interprets <em>key</em> as the class name,
|
---|
286 | and returns TRUE if the value of the Q_CLASSINFO entry "StockEvents"
|
---|
287 | is "yes". Otherwise this function returns FALSE.
|
---|
288 |
|
---|
289 | <h3 class=fn><a href="quuid.html">QUuid</a> <a name="interfaceID"></a>QAxFactory::interfaceID ( const <a href="qstring.html">QString</a> & key ) const<tt> [virtual]</tt>
|
---|
290 | </h3>
|
---|
291 | Reimplement this function to return the interface identifier for
|
---|
292 | each <em>key</em> returned by the <a href="#featureList">featureList</a>() implementation, or an
|
---|
293 | empty <a href="quuid.html">QUuid</a> if this factory doesn't support the value of <em>key</em>.
|
---|
294 | <p> The default implementation interprets <em>key</em> as the class name,
|
---|
295 | and returns the value of the Q_CLASSINFO entry "InterfaceID".
|
---|
296 |
|
---|
297 | <h3 class=fn>bool <a name="isServer"></a>QAxFactory::isServer ()<tt> [static]</tt>
|
---|
298 | </h3>
|
---|
299 | Returns TRUE if the application has been started (by COM) as an ActiveX
|
---|
300 | server, otherwise returns FALSE.
|
---|
301 | <p> <pre>
|
---|
302 | int main( int argc, char**argv )
|
---|
303 | {
|
---|
304 | <a href="qapplication.html">QApplication</a> app( argc, argv );
|
---|
305 |
|
---|
306 | if ( !QAxFactory::isServer() ) {
|
---|
307 | // initialize for stand-alone execution
|
---|
308 | }
|
---|
309 |
|
---|
310 | return app.<a href="qapplication.html#exec">exec</a>() // standard event processing
|
---|
311 | }
|
---|
312 | </pre>
|
---|
313 |
|
---|
314 |
|
---|
315 | <h3 class=fn>bool <a name="isService"></a>QAxFactory::isService () const<tt> [virtual]</tt>
|
---|
316 | </h3>
|
---|
317 | Reimplement this function to return TRUE if the server is
|
---|
318 | running as a persistent service (e.g. an NT service) and should
|
---|
319 | not terminate even when all objects provided have been released.
|
---|
320 | <p> The default implementation returns FALSE.
|
---|
321 |
|
---|
322 | <h3 class=fn><a href="qmetaobject.html">QMetaObject</a> * <a name="metaObject"></a>QAxFactory::metaObject ( const <a href="qstring.html">QString</a> & key ) const<tt> [virtual]</tt>
|
---|
323 | </h3>
|
---|
324 | Reimplement this function to return the <a href="qmetaobject.html">QMetaObject</a> corresponding to
|
---|
325 | <em>key</em>, or 0 if this factory doesn't support the value of <em>key</em>.
|
---|
326 | <p> The default implementation returns the QMetaObject for the class
|
---|
327 | <em>key</em>.
|
---|
328 |
|
---|
329 | <h3 class=fn>void <a name="registerClass"></a>QAxFactory::registerClass ( const <a href="qstring.html">QString</a> & key, <a href="qsettings.html">QSettings</a> * settings ) const<tt> [virtual]</tt>
|
---|
330 | </h3>
|
---|
331 | Registers additional values for the class <em>key</em> in the system
|
---|
332 | registry using the <em>settings</em> object. The standard values have
|
---|
333 | already been registed by the framework, but additional values,
|
---|
334 | e.g. implemented categories, can be added in an implementation of
|
---|
335 | this function.
|
---|
336 | <p> <pre>
|
---|
337 | settings->writeEntry( "/CLSID/" + classID(key) + "/Implemented Categories/{00000000-0000-0000-000000000000}/.", QString::null );
|
---|
338 | </pre>
|
---|
339 |
|
---|
340 | <p> If you reimplement this function you must also reimplement
|
---|
341 | <a href="#unregisterClass">unregisterClass</a>() to remove the additional registry values.
|
---|
342 | <p> <p>See also <a href="qsettings.html">QSettings</a>.
|
---|
343 |
|
---|
344 | <h3 class=fn><a href="qstring.html">QString</a> <a name="serverDirPath"></a>QAxFactory::serverDirPath ()<tt> [static]</tt>
|
---|
345 | </h3>
|
---|
346 | Returns the directory that contains the server binary.
|
---|
347 | <p> For out-of-process servers this is the same as
|
---|
348 | <a href="qapplication.html#applicationDirPath">QApplication::applicationDirPath</a>(). For in-process servers
|
---|
349 | that function returns the directory that contains the hosting
|
---|
350 | application.
|
---|
351 |
|
---|
352 | <h3 class=fn><a href="qstring.html">QString</a> <a name="serverFilePath"></a>QAxFactory::serverFilePath ()<tt> [static]</tt>
|
---|
353 | </h3>
|
---|
354 | Returns the file path of the server binary.
|
---|
355 | <p> For out-of-process servers this is the same as
|
---|
356 | <a href="qapplication.html#applicationFilePath">QApplication::applicationFilePath</a>(). For in-process servers
|
---|
357 | that function returns the file path of the hosting application.
|
---|
358 |
|
---|
359 | <h3 class=fn>bool <a name="startServer"></a>QAxFactory::startServer ( <a href="qaxfactory.html#ServerType-enum">ServerType</a> type = MultipleInstances )<tt> [static]</tt>
|
---|
360 | </h3>
|
---|
361 |
|
---|
362 | <p> Starts the COM server with <em>type</em> and returns TRUE if successful,
|
---|
363 | otherwise returns FALSE.
|
---|
364 | <p> Calling this function if the server is already running (or for an
|
---|
365 | in-process server) does nothing and returns TRUE.
|
---|
366 | <p> The server is started automatically with <em>type</em> set to MultipleUse
|
---|
367 | if the server executable has been started with the <tt>-activex</tt>
|
---|
368 | command line parameter.
|
---|
369 |
|
---|
370 | <h3 class=fn>bool <a name="stayTopLevel"></a>QAxFactory::stayTopLevel ( const <a href="qstring.html">QString</a> & key ) const<tt> [virtual]</tt>
|
---|
371 | </h3>
|
---|
372 | Reimplement this function to return TRUE if the ActiveX control <em>key</em>
|
---|
373 | should be a top level window, e.g. a dialog. The default implementation
|
---|
374 | returns FALSE.
|
---|
375 |
|
---|
376 | <h3 class=fn>bool <a name="stopServer"></a>QAxFactory::stopServer ()<tt> [static]</tt>
|
---|
377 | </h3>
|
---|
378 |
|
---|
379 | <p> Stops the COM server and returns TRUE if successful, otherwise
|
---|
380 | returns FALSE.
|
---|
381 | <p> Calling this function if the server is not running (or for an
|
---|
382 | in-process server) does nothing and returns TRUE.
|
---|
383 | <p> Stopping the server will not invalidate existing objects, but no
|
---|
384 | new objects can be created from the existing server process. Usually
|
---|
385 | COM will start a new server process if additional objects are requested.
|
---|
386 | <p> The server is stopped automatically when the main() function returns.
|
---|
387 |
|
---|
388 | <h3 class=fn><a href="quuid.html">QUuid</a> <a name="typeLibID"></a>QAxFactory::typeLibID () const<tt> [virtual]</tt>
|
---|
389 | </h3>
|
---|
390 |
|
---|
391 | <p> Reimplement this function to return the ActiveX server's type
|
---|
392 | library identifier.
|
---|
393 |
|
---|
394 | <h3 class=fn>void <a name="unregisterClass"></a>QAxFactory::unregisterClass ( const <a href="qstring.html">QString</a> & key, <a href="qsettings.html">QSettings</a> * settings ) const<tt> [virtual]</tt>
|
---|
395 | </h3>
|
---|
396 | Unregisters any additional values for the class <em>key</em> from the
|
---|
397 | system registry using the <em>settings</em> object.
|
---|
398 | <p> <pre>
|
---|
399 | settings->removeEntry( "/CLSID/" + classID(key) + "/Implemented Categories/{00000000-0000-0000-000000000000}/." );
|
---|
400 | </pre>
|
---|
401 |
|
---|
402 | <p> <p>See also <a href="#registerClass">registerClass</a>() and <a href="qsettings.html">QSettings</a>.
|
---|
403 |
|
---|
404 | <h3 class=fn>bool <a name="validateLicenseKey"></a>QAxFactory::validateLicenseKey ( const <a href="qstring.html">QString</a> & key, const <a href="qstring.html">QString</a> & licenseKey ) const<tt> [virtual]</tt>
|
---|
405 | </h3>
|
---|
406 | Reimplement this function to return TRUE if <em>licenseKey</em> is a valid
|
---|
407 | license for the class <em>key</em>, or if the current machine is licensed.
|
---|
408 | <p> The default implementation returns TRUE if the class <em>key</em> is not
|
---|
409 | licensed (ie. no Q_CLASSINFO attribute "LicenseKey"), or if
|
---|
410 | <em>licenseKey</em> matches the value of the "LicenseKey" attribute, or
|
---|
411 | if the machine is licensed through a .LIC file with the same filename
|
---|
412 | as this COM server.
|
---|
413 |
|
---|
414 | <!-- eof -->
|
---|
415 | <hr><p>
|
---|
416 | This file is part of the <a href="index.html">Qt toolkit</a>.
|
---|
417 | Copyright © 1995-2007
|
---|
418 | <a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
|
---|
419 | <table width=100% cellspacing=0 border=0><tr>
|
---|
420 | <td>Copyright © 2007
|
---|
421 | <a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
|
---|
422 | <td align=right><div align=right>Qt 3.3.8</div>
|
---|
423 | </table></div></address></body>
|
---|
424 | </html>
|
---|