git-svn-id: svn://db.shs.com.ru/libs@468 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
21
qad/touch_widgets/plugin/qad_touch_widgets.cpp
Normal file
21
qad/touch_widgets/plugin/qad_touch_widgets.cpp
Normal file
@@ -0,0 +1,21 @@
|
||||
#include "qad_touch_widgets.h"
|
||||
#include "touchsliderplugin.h"
|
||||
#include "touchbuttframeplugin.h"
|
||||
#include "touchbuttonplugin.h"
|
||||
|
||||
|
||||
QADTouchWidgets::QADTouchWidgets(QObject * parent): QObject(parent) {
|
||||
m_widgets.append(new TouchSliderPlugin(this));
|
||||
m_widgets.append(new TouchButtFramePlugin(this));
|
||||
m_widgets.append(new TouchButtonPlugin(this));
|
||||
}
|
||||
|
||||
|
||||
QList<QDesignerCustomWidgetInterface*> QADTouchWidgets::customWidgets() const {
|
||||
return m_widgets;
|
||||
}
|
||||
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(qad_touch_widgets_plugin, QADTouchWidgets)
|
||||
#endif
|
||||
23
qad/touch_widgets/plugin/qad_touch_widgets.h
Normal file
23
qad/touch_widgets/plugin/qad_touch_widgets.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef QAD_TOUCH_WIDGETS_H
|
||||
#define QAD_TOUCH_WIDGETS_H
|
||||
|
||||
#include <QtDesigner/QtDesigner>
|
||||
#include <QtCore/qplugin.h>
|
||||
|
||||
class QADTouchWidgets: public QObject, public QDesignerCustomWidgetCollectionInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "qad.touch_widgets")
|
||||
#endif
|
||||
public:
|
||||
explicit QADTouchWidgets(QObject *parent = 0);
|
||||
virtual QList<QDesignerCustomWidgetInterface * > customWidgets() const;
|
||||
|
||||
private:
|
||||
QList<QDesignerCustomWidgetInterface * > m_widgets;
|
||||
|
||||
};
|
||||
|
||||
#endif // QAD_TOUCH_WIDGETS_H
|
||||
@@ -1,22 +0,0 @@
|
||||
#include "touch_widgets.h"
|
||||
#include "touchsliderplugin.h"
|
||||
#include "touchbuttframeplugin.h"
|
||||
#include "touchbuttonplugin.h"
|
||||
|
||||
TW::TW(QObject *parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
m_widgets.append(new TouchSliderPlugin(this));
|
||||
m_widgets.append(new TouchButtFramePlugin(this));
|
||||
m_widgets.append(new TouchButtonPlugin(this));
|
||||
}
|
||||
|
||||
QList<QDesignerCustomWidgetInterface*> TW::customWidgets() const
|
||||
{
|
||||
return m_widgets;
|
||||
}
|
||||
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(twplugin, TW)
|
||||
#endif
|
||||
@@ -1,23 +0,0 @@
|
||||
#ifndef TW_H
|
||||
#define TW_H
|
||||
|
||||
#include <QtDesigner/QtDesigner>
|
||||
#include <QtCore/qplugin.h>
|
||||
|
||||
class TW : public QObject, public QDesignerCustomWidgetCollectionInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "qad.touch_widgets")
|
||||
#endif
|
||||
public:
|
||||
explicit TW(QObject *parent = 0);
|
||||
|
||||
virtual QList<QDesignerCustomWidgetInterface*> customWidgets() const;
|
||||
|
||||
private:
|
||||
QList<QDesignerCustomWidgetInterface*> m_widgets;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user