1 | /****************************************************************************
|
---|
2 | **
|
---|
3 | ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
---|
4 | ** All rights reserved.
|
---|
5 | ** Contact: Nokia Corporation ([email protected])
|
---|
6 | **
|
---|
7 | ** This file is part of the documentation of the Qt Toolkit.
|
---|
8 | **
|
---|
9 | ** $QT_BEGIN_LICENSE:FDL$
|
---|
10 | ** Commercial Usage
|
---|
11 | ** Licensees holding valid Qt Commercial licenses may use this file in
|
---|
12 | ** accordance with the Qt Commercial License Agreement provided with the
|
---|
13 | ** Software or, alternatively, in accordance with the terms contained in a
|
---|
14 | ** written agreement between you and Nokia.
|
---|
15 | **
|
---|
16 | ** GNU Free Documentation License
|
---|
17 | ** Alternatively, this file may be used under the terms of the GNU Free
|
---|
18 | ** Documentation License version 1.3 as published by the Free Software
|
---|
19 | ** Foundation and appearing in the file included in the packaging of this
|
---|
20 | ** file.
|
---|
21 | **
|
---|
22 | ** If you have questions regarding the use of this file, please contact
|
---|
23 | ** Nokia at [email protected].
|
---|
24 | ** $QT_END_LICENSE$
|
---|
25 | **
|
---|
26 | ****************************************************************************/
|
---|
27 |
|
---|
28 | /*!
|
---|
29 | \page qaxserver-demo-multiple.html
|
---|
30 | \title Two Simple Qt Widgets
|
---|
31 |
|
---|
32 | \input examples/activeqt/multiple-demo.qdocinc
|
---|
33 | */
|
---|
34 |
|
---|
35 | /*!
|
---|
36 | \example activeqt/multiple
|
---|
37 | \title Multiple Example (ActiveQt)
|
---|
38 |
|
---|
39 | The Multiple example demonstrates the implementation of a
|
---|
40 | QAxFactory to provide multiple ActiveX controls in a single in
|
---|
41 | process ActiveX server using the \c QAXFACTORY_EXPORT() macro.
|
---|
42 | The ActiveX controls in this example are simple QWidget
|
---|
43 | subclasses that reimplement QWidget::paintEvent().
|
---|
44 |
|
---|
45 | \snippet examples/activeqt/multiple/ax1.h 0
|
---|
46 |
|
---|
47 | The first control draws a filled rectangle. The fill color is exposed
|
---|
48 | as a property. \c Q_CLASSINFO() is used to specify the COM identifiers.
|
---|
49 |
|
---|
50 | \snippet examples/activeqt/multiple/ax2.h 0
|
---|
51 |
|
---|
52 | The second control draws a circle. The linewith is exposed as a property.
|
---|
53 | \c Q_CLASSINFO() is used to specify the COM identifiers, and to set the
|
---|
54 | attributes \e ToSuperClass and \e StockEvents to expose only the API of
|
---|
55 | the class itself, and to add COM stock events to the ActiveX control.
|
---|
56 |
|
---|
57 | \snippet examples/activeqt/multiple/main.cpp 0
|
---|
58 |
|
---|
59 | The classes are exported from the server using the QAxFactory macros.
|
---|
60 |
|
---|
61 | To build the example you must first build the QAxServer library.
|
---|
62 | Then run \c qmake and your make tool in \c
|
---|
63 | examples/activeqt/multiple.
|
---|
64 |
|
---|
65 | The \l{qaxserver-demo-multiple.html}{demonstration} requires your
|
---|
66 | WebBrowser to support ActiveX controls, and scripting to be
|
---|
67 | enabled.
|
---|
68 |
|
---|
69 | \snippet examples/activeqt/multiple-demo.qdocinc 0
|
---|
70 | */
|
---|