QT_BEGIN_NAMESPACE
-Q_DECLARE_INTERFACE(EchoInterface,
- "com.trolltech.Plugin.EchoInterface/1.0");
+
+#define EchoInterface_iid "org.qt-project.Qt.Examples.EchoInterface"
+
+Q_DECLARE_INTERFACE(EchoInterface, EchoInterface_iid)
QT_END_NAMESPACE
//! [0]
return message;
}
//! [0]
-
-//! [1]
-Q_EXPORT_PLUGIN2(echoplugin, EchoPlugin);
-//! [1]
#define ECHOPLUGIN_H
#include <QObject>
+#include <QtPlugin>
#include "echoplugin.h"
#include "echointerface.h"
class EchoPlugin : public QObject, EchoInterface
{
Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.Examples.EchoInterface" FILE "echoplugin.json")
Q_INTERFACES(EchoInterface)
public:
INCLUDEPATH += ../echowindow
HEADERS = echoplugin.h
SOURCES = echoplugin.cpp
+OTHER_FILES += echoplugin.json
TARGET = $$qtLibraryTarget(echoplugin)
DESTDIR = ../plugins
#! [0]
QT_BEGIN_NAMESPACE
//! [3] //! [4]
-Q_DECLARE_INTERFACE(BrushInterface,
- "com.trolltech.PlugAndPaint.BrushInterface/1.0")
+#define BrushInterface_iid "org.qt-project.Qt.Examples.PlugAndPaint.BrushInterface"
+
+Q_DECLARE_INTERFACE(BrushInterface, BrushInterface_iid)
//! [3]
-Q_DECLARE_INTERFACE(ShapeInterface,
- "com.trolltech.PlugAndPaint.ShapeInterface/1.0")
+
+#define ShapeInterface_iid "org.qt-project.Qt.Examples.PlugAndPaint.ShapeInterface"
+
+Q_DECLARE_INTERFACE(ShapeInterface, ShapeInterface_iid)
//! [5]
-Q_DECLARE_INTERFACE(FilterInterface,
- "com.trolltech.PlugAndPaint.FilterInterface/1.0")
+#define FilterInterface_iid "org.qt-project.Qt.Examples.PlugAndPaint.FilterInterface"
+
+Q_DECLARE_INTERFACE(FilterInterface, FilterInterface_iid)
//! [4] //! [5]
QT_END_NAMESPACE
#include <QtPlugin>
#include <QApplication>
-QT_BEGIN_NAMESPACE
-Q_IMPORT_PLUGIN(pnp_basictools)
-QT_END_NAMESPACE
+Q_IMPORT_PLUGIN(BasicToolsPlugin)
int main(int argc, char *argv[])
{
INCLUDEPATH += ../..
HEADERS = basictoolsplugin.h
SOURCES = basictoolsplugin.cpp
+OTHER_FILES += basictools.json
TARGET = $$qtLibraryTarget(pnp_basictools)
DESTDIR = ../../plugandpaint/plugins
#! [0]
return result;
}
//! [8]
-
-QT_BEGIN_NAMESPACE
-//! [9]
-Q_EXPORT_PLUGIN2(pnp_basictools, BasicToolsPlugin)
-//! [9]
-QT_END_NAMESPACE
#include <QRect>
#include <QObject>
+#include <QtPlugin>
#include <QStringList>
#include <QPainterPath>
#include <QImage>
public FilterInterface
{
Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.Examples.PlugAndPaint.BrushInterface" FILE "basictools.json")
Q_INTERFACES(BrushInterface ShapeInterface FilterInterface)
//! [0]
INCLUDEPATH += ../..
HEADERS = extrafiltersplugin.h
SOURCES = extrafiltersplugin.cpp
+OTHER_FILES += extrafilters.json
TARGET = $$qtLibraryTarget(pnp_extrafilters)
DESTDIR = ../../plugandpaint/plugins
}
return result;
}
-
-Q_EXPORT_PLUGIN2(pnp_extrafilters, ExtraFiltersPlugin)
//! [0]
#include <QObject>
+#include <QtPlugin>
#include <QStringList>
#include <QImage>
class ExtraFiltersPlugin : public QObject, public FilterInterface
{
Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.Examples.PlugAndPaint.FilterInterface" FILE "extrafilters.json")
Q_INTERFACES(FilterInterface)
public:
simplestyleplugin.h
SOURCES = simplestyle.cpp \
simplestyleplugin.cpp
+OTHER_FILES += simplestyle.json
TARGET = simplestyleplugin
#! [0]
win32 {
--- /dev/null
+{
+ "Keys": [ "simplestyle" ]
+}
return 0;
}
//! [1]
-
-QT_BEGIN_NAMESPACE
-Q_EXPORT_PLUGIN2(simplestyleplugin, SimpleStylePlugin)
-QT_END_NAMESPACE
class SimpleStylePlugin : public QStylePlugin
{
Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QStyleFactoryInterface" FILE "simplestyle.json")
public:
- SimpleStylePlugin() {};
+ SimpleStylePlugin() {}
QStringList keys() const;
QStyle *create(const QString &key);
class AccessibleFactory : public QAccessiblePlugin
{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QAccessibleFactoryInterface" FILE "widgets.json")
+
public:
AccessibleFactory();
list << QLatin1String("QStatusBar");
list << QLatin1String("QProgressBar");
list << QLatin1String("QMenuBar");
- list << QLatin1String("Q3PopupMenu");
list << QLatin1String("QMenu");
list << QLatin1String("QHeaderView");
list << QLatin1String("QTabBar");
#ifndef QT_NO_MENU
} else if (classname == QLatin1String("QMenu")) {
iface = new QAccessibleMenu(widget);
- } else if (classname == QLatin1String("Q3PopupMenu")) {
- iface = new QAccessibleMenu(widget);
#endif
#ifndef QT_NO_ITEMVIEWS
} else if (classname == QLatin1String("QAbstractItemView")) {
return iface;
}
-Q_EXPORT_STATIC_PLUGIN(AccessibleFactory)
-Q_EXPORT_PLUGIN2(qtaccessiblewidgets, AccessibleFactory)
QT_END_NAMESPACE
+#include "main.moc"
+
#endif // QT_NO_ACCESSIBILITY
--- /dev/null
+{
+ "Keys": [
+ "QLineEdit",
+ "QComboBox",
+ "QAbstractSpinBox",
+ "QSpinBox",
+ "QDoubleSpinBox",
+ "QScrollBar",
+ "QSlider",
+ "QAbstractSlider",
+ "QToolButton",
+ "QCheckBox",
+ "QRadioButton",
+ "QPushButton",
+ "QAbstractButton",
+ "QDialog",
+ "QMessageBox",
+ "QMainWindow",
+ "QLabel",
+ "QLCDNumber",
+ "QGroupBox",
+ "QStatusBar",
+ "QProgressBar",
+ "QMenuBar",
+ "QMenu",
+ "QHeaderView",
+ "QTabBar",
+ "QToolBar",
+ "QWorkspaceChild",
+ "QSizeGrip",
+ "QAbstractItemView",
+ "QWidget",
+ "QSplitter",
+ "QSplitterHandle",
+ "QTextEdit",
+ "QTipLabel",
+ "QFrame",
+ "QStackedWidget",
+ "QToolBox",
+ "QMdiArea",
+ "QMdiSubWindow",
+ "QWorkspace",
+ "QDialogButtonBox",
+ "QDial",
+ "QRubberBand",
+ "QTextBrowser",
+ "QAbstractScrollArea",
+ "QScrollArea",
+ "QCalendarWidget",
+ "QDockWidget",
+ "QAccessibleWidget" ]
+}
class QWindowsPrinterSupportPlugin : public QPlatformPrinterSupportPlugin
{
Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org.qt-project.QPlatformPrinterSupportFactoryInterface" FILE "windows.json")
+
public:
QStringList keys() const;
QPlatformPrinterSupport *create(const QString &);
return 0;
}
-Q_EXPORT_PLUGIN2(windowsprint, QWindowsPrinterSupportPlugin)
-
QT_END_NAMESPACE
#include "main.moc"
--- /dev/null
+{
+ "Keys": [ "windowsprintsupport" ]
+}
HEADERS += \
qwindowsprintersupport.h
+OTHER_FILES += windows.json
+
target.path += $$[QT_INSTALL_PLUGINS]/printsupport
INSTALLS += target
LIBS += -lWinspool -lComdlg32