QtPdWidgets  2.3.1
Plugin.h
Go to the documentation of this file.
1 /*****************************************************************************
2  *
3  * Copyright (C) 2009 - 2012 Florian Pose <fp@igh-essen.com>
4  *
5  * This file is part of the QtPdWidgets library.
6  *
7  * The QtPdWidgets library is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public License as
9  * published by the Free Software Foundation, either version 3 of the License,
10  * or (at your option) any later version.
11  *
12  * The QtPdWidgets library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
15  * General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public License
18  * along with the QtPdWidgets Library. If not, see
19  * <http://www.gnu.org/licenses/>.
20  *
21  ****************************************************************************/
22 
23 #ifndef PLUGIN_H
24 #define PLUGIN_H
25 
26 #include <qglobal.h>
27 
28 #if QT_VERSION >= 0x050500
29 #include <QtUiPlugin/QDesignerCustomWidgetInterface>
30 #else
31 #include <QDesignerCustomWidgetInterface>
32 #endif
33 
34 /****************************************************************************/
35 
38 class Plugin:
39  public QObject,
40  public QDesignerCustomWidgetInterface
41 {
42  Q_OBJECT
43  Q_INTERFACES(QDesignerCustomWidgetInterface)
44 
45  public:
46  Plugin(const QString &, QObject *parent = 0);
47 
48  bool isContainer() const;
49  bool isInitialized() const;
50  QIcon icon() const;
51  QString domXml() const;
52  QString group() const;
53  QString includeFile() const;
54  QString name() const;
55  QString toolTip() const;
56  QString whatsThis() const;
57  void initialize(QDesignerFormEditorInterface *core);
58 
59  private:
60  bool initialized;
61  QString widgetClassName;
62 
63  Plugin();
64 };
65 
66 /****************************************************************************/
67 
68 #endif
QString toolTip() const
Returns the plugin&#39;s tooltip.
Definition: Plugin.cpp:95
QString group() const
Returns the name of the plugin group to display in the list of plugins.
Definition: Plugin.cpp:77
bool initialized
true, if initialized.
Definition: Plugin.h:60
QString name() const
Returns the name of the Plugin class.
Definition: Plugin.cpp:68
QString domXml() const
Returns the recommended default setting for the plugin as an XML tree.
Definition: Plugin.cpp:122
bool isInitialized() const
Returns the initialized state.
Definition: Plugin.cpp:59
Plugin interface class.
Definition: Plugin.h:38
QIcon icon() const
Returns the icon of the plugin.
Definition: Plugin.cpp:86
bool isContainer() const
Returns, if the widget is a container.
Definition: Plugin.cpp:113
QString includeFile() const
Returns the name of the header needed to use the plugin class.
Definition: Plugin.cpp:138
QString whatsThis() const
Returns the text for the "What is this?" function.
Definition: Plugin.cpp:104
QString widgetClassName
Definition: Plugin.h:61
void initialize(QDesignerFormEditorInterface *core)
Initializes static plugin objects.
Definition: Plugin.cpp:44