~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to src/corelib/plugin/qplugin.qdoc

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-11-02 18:30:08 UTC
  • mfrom: (1.2.2 upstream)
  • mto: (15.2.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 88.
  • Revision ID: james.westby@ubuntu.com-20091102183008-b6a4gcs128mvfb3m
Tags: upstream-4.6.0~beta1
ImportĀ upstreamĀ versionĀ 4.6.0~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/****************************************************************************
 
2
**
 
3
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
 
4
** All rights reserved.
 
5
** Contact: Nokia Corporation (qt-info@nokia.com)
 
6
**
 
7
** This file is part of the documentation of the Qt Toolkit.
 
8
**
 
9
** $QT_BEGIN_LICENSE:LGPL$
 
10
** No Commercial Usage
 
11
** This file contains pre-release code and may not be distributed.
 
12
** You may use this file in accordance with the terms and conditions
 
13
** contained in the Technology Preview License Agreement accompanying
 
14
** this package.
 
15
**
 
16
** GNU Lesser General Public License Usage
 
17
** Alternatively, this file may be used under the terms of the GNU Lesser
 
18
** General Public License version 2.1 as published by the Free Software
 
19
** Foundation and appearing in the file LICENSE.LGPL included in the
 
20
** packaging of this file.  Please review the following information to
 
21
** ensure the GNU Lesser General Public License version 2.1 requirements
 
22
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 
23
**
 
24
** In addition, as a special exception, Nokia gives you certain additional
 
25
** rights.  These rights are described in the Nokia Qt LGPL Exception
 
26
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
 
27
**
 
28
** If you have questions regarding the use of this file, please contact
 
29
** Nokia at qt-info@nokia.com.
 
30
**
 
31
**
 
32
**
 
33
**
 
34
**
 
35
**
 
36
**
 
37
**
 
38
** $QT_END_LICENSE$
 
39
**
 
40
****************************************************************************/
 
41
 
 
42
/*!
 
43
    \headerfile <QtPlugin>
 
44
    \title Macros for Defining Plugins
 
45
 
 
46
    \brief The <QtPlugin> header files defines macros for defining plugins.
 
47
 
 
48
    \sa {How to Create Qt Plugins}
 
49
*/
 
50
 
 
51
/*!
 
52
    \macro Q_DECLARE_INTERFACE(ClassName, Identifier)
 
53
    \relates <QtPlugin>
 
54
 
 
55
    This macro associates the given \a Identifier (a string literal)
 
56
    to the interface class called \a ClassName. The \a Identifier must
 
57
    be unique. For example:
 
58
 
 
59
    \snippet examples/tools/plugandpaint/interfaces.h 3
 
60
 
 
61
    This macro is normally used right after the class definition for
 
62
    \a ClassName, in a header file. See the
 
63
    \l{tools/plugandpaint}{Plug & Paint} example for details.
 
64
 
 
65
    If you want to use Q_DECLARE_INTERFACE with interface classes
 
66
    declared in a namespace then you have to make sure the Q_DECLARE_INTERFACE
 
67
    is not inside a namespace though. For example:
 
68
    \snippet doc/src/snippets/code/doc_src_qplugin.qdoc 0
 
69
 
 
70
    \sa Q_INTERFACES(), Q_EXPORT_PLUGIN2(), {How to Create Qt Plugins}
 
71
*/
 
72
 
 
73
/*!
 
74
    \macro Q_EXPORT_PLUGIN(ClassName)
 
75
    \relates <QtPlugin>
 
76
    \obsolete
 
77
 
 
78
    Use Q_EXPORT_PLUGIN2() instead. This macro is equivalent to
 
79
    Q_EXPORT_PLUGIN2(\a ClassName, \a ClassName).
 
80
*/
 
81
 
 
82
/*!
 
83
    \macro Q_EXPORT_PLUGIN2(PluginName, ClassName)
 
84
    \relates <QtPlugin>
 
85
    \since 4.1
 
86
    \keyword Q_EXPORT_PLUGIN2
 
87
 
 
88
    This macro exports the plugin class \a ClassName for the plugin specified
 
89
    by \a PluginName. The value of \a PluginName should correspond to the
 
90
    \l{qmake Variable Reference#TARGET}{TARGET} specified in the plugin's
 
91
    project file.
 
92
 
 
93
    There should be exactly one occurrence of this macro in the source code
 
94
    for a Qt plugin, and it should be used where the implementation is written
 
95
    rather than in a header file.
 
96
 
 
97
    Example:
 
98
 
 
99
    \snippet doc/src/snippets/code/doc_src_qplugin.qdoc 1
 
100
 
 
101
    See the \l{tools/plugandpaint}{Plug & Paint} example for details.
 
102
 
 
103
    \sa Q_DECLARE_INTERFACE(), {How to Create Qt Plugins}
 
104
*/
 
105
 
 
106
/*!
 
107
    \macro Q_IMPORT_PLUGIN(PluginName)
 
108
    \relates <QtPlugin>
 
109
 
 
110
    This macro imports the plugin named \a PluginName, corresponding
 
111
    to the \l{qmake Variable Reference#TARGET}{TARGET} specified in the
 
112
    plugin's project file.
 
113
 
 
114
    Inserting this macro into your application's source code will allow
 
115
    you to make use of a static plugin.
 
116
 
 
117
    Example:
 
118
 
 
119
    \snippet doc/src/snippets/code/doc_src_qplugin.qdoc 2
 
120
 
 
121
    Static plugins must also be included by the linker when your
 
122
    application is built. For Qt's predefined plugins,
 
123
    you can use the \c QTPLUGIN to add
 
124
    the required plugins to your build. For example:
 
125
 
 
126
    \snippet doc/src/snippets/code/doc_src_qplugin.qdoc 3
 
127
 
 
128
    \sa {Static Plugins}, {How to Create Qt Plugins}, {Using qmake}
 
129
*/
 
130
 
 
131
/*!
 
132
    \macro Q_EXPORT_STATIC_PLUGIN(ClassName)
 
133
    \relates <QtPlugin>
 
134
    \internal
 
135
*/