git-svn-id: svn://db.shs.com.ru/libs@586 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
1
test/qad/utils/plugin/CMakeLists.txt
Normal file
1
test/qad/utils/plugin/CMakeLists.txt
Normal file
@@ -0,0 +1 @@
|
||||
qad_plugin(utils "Gui" "")
|
||||
16
test/qad/utils/plugin/qad_utils.cpp
Normal file
16
test/qad/utils/plugin/qad_utils.cpp
Normal file
@@ -0,0 +1,16 @@
|
||||
//#include "qpiconfigplugin.h"
|
||||
#include "qad_utils.h"
|
||||
|
||||
QADUtils::QADUtils(QObject * parent): QObject(parent) {
|
||||
//m_widgets.append(new QPIConfigPlugin(this));
|
||||
}
|
||||
|
||||
|
||||
QList<QDesignerCustomWidgetInterface * > QADUtils::customWidgets() const {
|
||||
return m_widgets;
|
||||
}
|
||||
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(qad_utils_plugin, QADUtils)
|
||||
#endif
|
||||
24
test/qad/utils/plugin/qad_utils.h
Normal file
24
test/qad/utils/plugin/qad_utils.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#ifndef QAD_UTILS_H
|
||||
#define QAD_UTILS_H
|
||||
|
||||
#include <QtDesigner/QtDesigner>
|
||||
#include <QtCore/qplugin.h>
|
||||
|
||||
class QADUtils: public QObject, public QDesignerCustomWidgetCollectionInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
//Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerCustomWidgetInterface")
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "qad.utils")
|
||||
#endif
|
||||
Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
|
||||
public:
|
||||
explicit QADUtils(QObject * parent = 0);
|
||||
virtual QList<QDesignerCustomWidgetInterface * > customWidgets() const;
|
||||
|
||||
private:
|
||||
QList<QDesignerCustomWidgetInterface * > m_widgets;
|
||||
|
||||
};
|
||||
|
||||
#endif // QAD_UTILS_H
|
||||
Reference in New Issue
Block a user