git-svn-id: svn://db.shs.com.ru/libs@468 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2018-12-12 11:01:32 +00:00
parent 6260046885
commit 765c314bbf
9 changed files with 83 additions and 80 deletions

View 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

View 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

View File

@@ -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

View File

@@ -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