Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/gui/kernel/qgenericplugin.cpp |
Source code | Switch to Preprocessed file |
Line | Source | Count |
---|---|---|
1 | /**************************************************************************** | - |
2 | ** | - |
3 | ** Copyright (C) 2015 The Qt Company Ltd. | - |
4 | ** Contact: http://www.qt.io/licensing/ | - |
5 | ** | - |
6 | ** This file is part of the QtGui module of the Qt Toolkit. | - |
7 | ** | - |
8 | ** $QT_BEGIN_LICENSE:LGPL21$ | - |
9 | ** Commercial License Usage | - |
10 | ** Licensees holding valid commercial Qt licenses may use this file in | - |
11 | ** accordance with the commercial license agreement provided with the | - |
12 | ** Software or, alternatively, in accordance with the terms contained in | - |
13 | ** a written agreement between you and The Qt Company. For licensing terms | - |
14 | ** and conditions see http://www.qt.io/terms-conditions. For further | - |
15 | ** information use the contact form at http://www.qt.io/contact-us. | - |
16 | ** | - |
17 | ** GNU Lesser General Public License Usage | - |
18 | ** Alternatively, this file may be used under the terms of the GNU Lesser | - |
19 | ** General Public License version 2.1 or version 3 as published by the Free | - |
20 | ** Software Foundation and appearing in the file LICENSE.LGPLv21 and | - |
21 | ** LICENSE.LGPLv3 included in the packaging of this file. Please review the | - |
22 | ** following information to ensure the GNU Lesser General Public License | - |
23 | ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and | - |
24 | ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. | - |
25 | ** | - |
26 | ** As a special exception, The Qt Company gives you certain additional | - |
27 | ** rights. These rights are described in The Qt Company LGPL Exception | - |
28 | ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. | - |
29 | ** | - |
30 | ** $QT_END_LICENSE$ | - |
31 | ** | - |
32 | ****************************************************************************/ | - |
33 | - | |
34 | #include "qgenericplugin.h" | - |
35 | - | |
36 | #ifndef QT_NO_LIBRARY | - |
37 | - | |
38 | QT_BEGIN_NAMESPACE | - |
39 | - | |
40 | /*! | - |
41 | \class QGenericPlugin | - |
42 | \ingroup plugins | - |
43 | \inmodule QtGui | - |
44 | - | |
45 | \brief The QGenericPlugin class is an abstract base class for | - |
46 | plugins. | - |
47 | - | |
48 | A mouse plugin can be created by subclassing | - |
49 | QGenericPlugin and reimplementing the pure virtual create() | - |
50 | function. By exporting the derived class using the | - |
51 | Q_PLUGIN_METADATA() macro, The default implementation of the | - |
52 | QGenericPluginFactory class will automatically detect the plugin and | - |
53 | load the driver into the server application at run-time. See \l | - |
54 | {How to Create Qt Plugins} for details. | - |
55 | - | |
56 | The json metadata file should contain a list of keys supported by this | - |
57 | plugin. | - |
58 | - | |
59 | \sa QGenericPluginFactory | - |
60 | */ | - |
61 | - | |
62 | /*! | - |
63 | Constructs a plugin with the given \a parent. | - |
64 | - | |
65 | Note that this constructor is invoked automatically by the | - |
66 | moc generated code that exports the plugin, so there is no need for calling it | - |
67 | explicitly. | - |
68 | */ | - |
69 | QGenericPlugin::QGenericPlugin(QObject *parent) | - |
70 | : QObject(parent) | - |
71 | { | - |
72 | } never executed: end of block | 0 |
73 | - | |
74 | /*! | - |
75 | Destroys the plugin. | - |
76 | - | |
77 | Note that Qt destroys a plugin automatically when it is no longer | - |
78 | used, so there is no need for calling the destructor explicitly. | - |
79 | */ | - |
80 | QGenericPlugin::~QGenericPlugin() | - |
81 | { | - |
82 | } | - |
83 | - | |
84 | /*! | - |
85 | \fn QObject* QGenericPlugin::create(const QString &key, const QString& specification) | - |
86 | - | |
87 | Implement this function to create a driver matching the type | - |
88 | specified by the given \a key and \a specification parameters. Note that | - |
89 | keys are case-insensitive. | - |
90 | */ | - |
91 | - | |
92 | QT_END_NAMESPACE | - |
93 | - | |
94 | #endif // QT_NO_LIBRARY | - |
Source code | Switch to Preprocessed file |