git-svn-id: svn://db.shs.com.ru/libs@586 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
1
test/qad/widgets/plugin/CMakeLists.txt
Normal file
1
test/qad/widgets/plugin/CMakeLists.txt
Normal file
@@ -0,0 +1 @@
|
||||
qad_plugin(widgets "Gui;Widgets" "")
|
||||
69
test/qad/widgets/plugin/chardialogplugin.cpp
Normal file
69
test/qad/widgets/plugin/chardialogplugin.cpp
Normal file
@@ -0,0 +1,69 @@
|
||||
#include "chardialog.h"
|
||||
#include "chardialogplugin.h"
|
||||
#include <QtCore/QtPlugin>
|
||||
|
||||
|
||||
CharDialogPlugin::CharDialogPlugin(QObject * parent): QObject(parent) {
|
||||
m_initialized = false;
|
||||
}
|
||||
|
||||
|
||||
void CharDialogPlugin::initialize(QDesignerFormEditorInterface * /* core */) {
|
||||
if (m_initialized)
|
||||
return;
|
||||
|
||||
// Add extension registrations, etc. here
|
||||
|
||||
m_initialized = true;
|
||||
}
|
||||
|
||||
|
||||
bool CharDialogPlugin::isInitialized() const {
|
||||
return m_initialized;
|
||||
}
|
||||
|
||||
|
||||
QWidget * CharDialogPlugin::createWidget(QWidget * parent) {
|
||||
return new CharDialog(parent);
|
||||
}
|
||||
|
||||
|
||||
QString CharDialogPlugin::name() const {
|
||||
return QLatin1String("CharDialog");
|
||||
}
|
||||
|
||||
|
||||
QString CharDialogPlugin::group() const {
|
||||
return QLatin1String("Dialogs");
|
||||
}
|
||||
|
||||
|
||||
QIcon CharDialogPlugin::icon() const {
|
||||
return QIcon(":/icons/chardialog.png");
|
||||
}
|
||||
|
||||
|
||||
QString CharDialogPlugin::toolTip() const {
|
||||
return QLatin1String("Character Select Dialog");
|
||||
}
|
||||
|
||||
|
||||
QString CharDialogPlugin::whatsThis() const {
|
||||
return QLatin1String("Character Select Dialog");
|
||||
}
|
||||
|
||||
|
||||
bool CharDialogPlugin::isContainer() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
QString CharDialogPlugin::domXml() const {
|
||||
return QLatin1String("<widget class=\"CharDialog\" name=\"charDialog\">\n</widget>\n");
|
||||
}
|
||||
|
||||
|
||||
QString CharDialogPlugin::includeFile() const {
|
||||
return QLatin1String("chardialog.h");
|
||||
}
|
||||
|
||||
36
test/qad/widgets/plugin/chardialogplugin.h
Normal file
36
test/qad/widgets/plugin/chardialogplugin.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#ifndef CHARDIALOGPLUGIN_H
|
||||
#define CHARDIALOGPLUGIN_H
|
||||
|
||||
#include <QObject>
|
||||
#if QT_VERSION >= 0x050000
|
||||
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#else
|
||||
# include <QDesignerCustomWidgetInterface>
|
||||
#endif
|
||||
|
||||
class CharDialogPlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
||||
|
||||
public:
|
||||
CharDialogPlugin(QObject * parent = 0);
|
||||
|
||||
bool isContainer() const;
|
||||
bool isInitialized() const;
|
||||
QIcon icon() const;
|
||||
QString domXml() const;
|
||||
QString group() const;
|
||||
QString includeFile() const;
|
||||
QString name() const;
|
||||
QString toolTip() const;
|
||||
QString whatsThis() const;
|
||||
QWidget * createWidget(QWidget * parent);
|
||||
void initialize(QDesignerFormEditorInterface * core);
|
||||
|
||||
private:
|
||||
bool m_initialized;
|
||||
|
||||
};
|
||||
|
||||
#endif // CHARDIALOGPLUGIN_H
|
||||
69
test/qad/widgets/plugin/clineeditplugin.cpp
Normal file
69
test/qad/widgets/plugin/clineeditplugin.cpp
Normal file
@@ -0,0 +1,69 @@
|
||||
#include "clineedit.h"
|
||||
#include "clineeditplugin.h"
|
||||
#include <QtCore/QtPlugin>
|
||||
|
||||
|
||||
CLineEditPlugin::CLineEditPlugin(QObject * parent): QObject(parent) {
|
||||
m_initialized = false;
|
||||
}
|
||||
|
||||
|
||||
void CLineEditPlugin::initialize(QDesignerFormEditorInterface * /* core */) {
|
||||
if (m_initialized)
|
||||
return;
|
||||
|
||||
// Add extension registrations, etc. here
|
||||
|
||||
m_initialized = true;
|
||||
}
|
||||
|
||||
|
||||
bool CLineEditPlugin::isInitialized() const {
|
||||
return m_initialized;
|
||||
}
|
||||
|
||||
|
||||
QWidget * CLineEditPlugin::createWidget(QWidget * parent) {
|
||||
return new CLineEdit(parent);
|
||||
}
|
||||
|
||||
|
||||
QString CLineEditPlugin::name() const {
|
||||
return QLatin1String("CLineEdit");
|
||||
}
|
||||
|
||||
|
||||
QString CLineEditPlugin::group() const {
|
||||
return QLatin1String("Input Widgets");
|
||||
}
|
||||
|
||||
|
||||
QIcon CLineEditPlugin::icon() const {
|
||||
return QIcon(":/icons/clineedit.png");
|
||||
}
|
||||
|
||||
|
||||
QString CLineEditPlugin::toolTip() const {
|
||||
return QLatin1String("Clearable Line Edit");
|
||||
}
|
||||
|
||||
|
||||
QString CLineEditPlugin::whatsThis() const {
|
||||
return QLatin1String("Clearable Line Edit");
|
||||
}
|
||||
|
||||
|
||||
bool CLineEditPlugin::isContainer() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
QString CLineEditPlugin::domXml() const {
|
||||
return QLatin1String("<widget class=\"CLineEdit\" name=\"lineEdit\">\n</widget>\n");
|
||||
}
|
||||
|
||||
|
||||
QString CLineEditPlugin::includeFile() const {
|
||||
return QLatin1String("clineedit.h");
|
||||
}
|
||||
|
||||
36
test/qad/widgets/plugin/clineeditplugin.h
Normal file
36
test/qad/widgets/plugin/clineeditplugin.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#ifndef CLINEEDITPLUGIN_H
|
||||
#define CLINEEDITPLUGIN_H
|
||||
|
||||
#include <QObject>
|
||||
#if QT_VERSION >= 0x050000
|
||||
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#else
|
||||
# include <QDesignerCustomWidgetInterface>
|
||||
#endif
|
||||
|
||||
class CLineEditPlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
||||
|
||||
public:
|
||||
CLineEditPlugin(QObject * parent = 0);
|
||||
|
||||
bool isContainer() const;
|
||||
bool isInitialized() const;
|
||||
QIcon icon() const;
|
||||
QString domXml() const;
|
||||
QString group() const;
|
||||
QString includeFile() const;
|
||||
QString name() const;
|
||||
QString toolTip() const;
|
||||
QString whatsThis() const;
|
||||
QWidget * createWidget(QWidget * parent);
|
||||
void initialize(QDesignerFormEditorInterface * core);
|
||||
|
||||
private:
|
||||
bool m_initialized;
|
||||
|
||||
};
|
||||
|
||||
#endif // CLINEEDITPLUGIN_H
|
||||
69
test/qad/widgets/plugin/colorbuttonplugin.cpp
Normal file
69
test/qad/widgets/plugin/colorbuttonplugin.cpp
Normal file
@@ -0,0 +1,69 @@
|
||||
#include "colorbutton.h"
|
||||
#include "colorbuttonplugin.h"
|
||||
#include <QtCore/QtPlugin>
|
||||
|
||||
|
||||
ColorButtonPlugin::ColorButtonPlugin(QObject * parent): QObject(parent) {
|
||||
m_initialized = false;
|
||||
}
|
||||
|
||||
|
||||
void ColorButtonPlugin::initialize(QDesignerFormEditorInterface * /* core */) {
|
||||
if (m_initialized)
|
||||
return;
|
||||
|
||||
// Add extension registrations, etc. here
|
||||
|
||||
m_initialized = true;
|
||||
}
|
||||
|
||||
|
||||
bool ColorButtonPlugin::isInitialized() const {
|
||||
return m_initialized;
|
||||
}
|
||||
|
||||
|
||||
QWidget * ColorButtonPlugin::createWidget(QWidget * parent) {
|
||||
return new ColorButton(parent);
|
||||
}
|
||||
|
||||
|
||||
QString ColorButtonPlugin::name() const {
|
||||
return QLatin1String("ColorButton");
|
||||
}
|
||||
|
||||
|
||||
QString ColorButtonPlugin::group() const {
|
||||
return QLatin1String("Buttons");
|
||||
}
|
||||
|
||||
|
||||
QIcon ColorButtonPlugin::icon() const {
|
||||
return QIcon(":/icons/colorbutton.png");
|
||||
}
|
||||
|
||||
|
||||
QString ColorButtonPlugin::toolTip() const {
|
||||
return QLatin1String("Color Button");
|
||||
}
|
||||
|
||||
|
||||
QString ColorButtonPlugin::whatsThis() const {
|
||||
return QLatin1String("Color Button");
|
||||
}
|
||||
|
||||
|
||||
bool ColorButtonPlugin::isContainer() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
QString ColorButtonPlugin::domXml() const {
|
||||
return QLatin1String("<widget class=\"ColorButton\" name=\"colorButton\">\n</widget>\n");
|
||||
}
|
||||
|
||||
|
||||
QString ColorButtonPlugin::includeFile() const {
|
||||
return QLatin1String("colorbutton.h");
|
||||
}
|
||||
|
||||
36
test/qad/widgets/plugin/colorbuttonplugin.h
Normal file
36
test/qad/widgets/plugin/colorbuttonplugin.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#ifndef COLORBUTTONPLUGIN_H
|
||||
#define COLORBUTTONPLUGIN_H
|
||||
|
||||
#include <QObject>
|
||||
#if QT_VERSION >= 0x050000
|
||||
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#else
|
||||
# include <QDesignerCustomWidgetInterface>
|
||||
#endif
|
||||
|
||||
class ColorButtonPlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
||||
|
||||
public:
|
||||
ColorButtonPlugin(QObject * parent = 0);
|
||||
|
||||
bool isContainer() const;
|
||||
bool isInitialized() const;
|
||||
QIcon icon() const;
|
||||
QString domXml() const;
|
||||
QString group() const;
|
||||
QString includeFile() const;
|
||||
QString name() const;
|
||||
QString toolTip() const;
|
||||
QString whatsThis() const;
|
||||
QWidget * createWidget(QWidget * parent);
|
||||
void initialize(QDesignerFormEditorInterface * core);
|
||||
|
||||
private:
|
||||
bool m_initialized;
|
||||
|
||||
};
|
||||
|
||||
#endif // COLORBUTTONPLUGIN_H
|
||||
69
test/qad/widgets/plugin/ecomboboxplugin.cpp
Normal file
69
test/qad/widgets/plugin/ecomboboxplugin.cpp
Normal file
@@ -0,0 +1,69 @@
|
||||
#include "ecombobox.h"
|
||||
#include "ecomboboxplugin.h"
|
||||
#include <QtCore/QtPlugin>
|
||||
|
||||
|
||||
EComboBoxPlugin::EComboBoxPlugin(QObject * parent): QObject(parent) {
|
||||
m_initialized = false;
|
||||
}
|
||||
|
||||
|
||||
void EComboBoxPlugin::initialize(QDesignerFormEditorInterface * /* core */) {
|
||||
if (m_initialized)
|
||||
return;
|
||||
|
||||
// Add extension registrations, etc. here
|
||||
|
||||
m_initialized = true;
|
||||
}
|
||||
|
||||
|
||||
bool EComboBoxPlugin::isInitialized() const {
|
||||
return m_initialized;
|
||||
}
|
||||
|
||||
|
||||
QWidget * EComboBoxPlugin::createWidget(QWidget * parent) {
|
||||
return new EComboBox(parent);
|
||||
}
|
||||
|
||||
|
||||
QString EComboBoxPlugin::name() const {
|
||||
return QLatin1String("EComboBox");
|
||||
}
|
||||
|
||||
|
||||
QString EComboBoxPlugin::group() const {
|
||||
return QLatin1String("Input Widgets");
|
||||
}
|
||||
|
||||
|
||||
QIcon EComboBoxPlugin::icon() const {
|
||||
return QIcon(":/icons/ecombobox.png");
|
||||
}
|
||||
|
||||
|
||||
QString EComboBoxPlugin::toolTip() const {
|
||||
return QLatin1String("Combo Box with Search");
|
||||
}
|
||||
|
||||
|
||||
QString EComboBoxPlugin::whatsThis() const {
|
||||
return QLatin1String("Combo Box with Search");
|
||||
}
|
||||
|
||||
|
||||
bool EComboBoxPlugin::isContainer() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
QString EComboBoxPlugin::domXml() const {
|
||||
return QLatin1String("<widget class=\"EComboBox\" name=\"comboBox\">\n</widget>\n");
|
||||
}
|
||||
|
||||
|
||||
QString EComboBoxPlugin::includeFile() const {
|
||||
return QLatin1String("ecombobox.h");
|
||||
}
|
||||
|
||||
36
test/qad/widgets/plugin/ecomboboxplugin.h
Normal file
36
test/qad/widgets/plugin/ecomboboxplugin.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#ifndef ECOMBOBOXPLUGIN_H
|
||||
#define ECOMBOBOXPLUGIN_H
|
||||
|
||||
#include <QObject>
|
||||
#if QT_VERSION >= 0x050000
|
||||
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#else
|
||||
# include <QDesignerCustomWidgetInterface>
|
||||
#endif
|
||||
|
||||
class EComboBoxPlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
||||
|
||||
public:
|
||||
EComboBoxPlugin(QObject * parent = 0);
|
||||
|
||||
bool isContainer() const;
|
||||
bool isInitialized() const;
|
||||
QIcon icon() const;
|
||||
QString domXml() const;
|
||||
QString group() const;
|
||||
QString includeFile() const;
|
||||
QString name() const;
|
||||
QString toolTip() const;
|
||||
QString whatsThis() const;
|
||||
QWidget * createWidget(QWidget * parent);
|
||||
void initialize(QDesignerFormEditorInterface * core);
|
||||
|
||||
private:
|
||||
bool m_initialized;
|
||||
|
||||
};
|
||||
|
||||
#endif // ECOMBOBOXPLUGIN_H
|
||||
69
test/qad/widgets/plugin/evalspinboxplugin.cpp
Normal file
69
test/qad/widgets/plugin/evalspinboxplugin.cpp
Normal file
@@ -0,0 +1,69 @@
|
||||
#include "evalspinbox.h"
|
||||
#include "evalspinboxplugin.h"
|
||||
#include <QtCore/QtPlugin>
|
||||
|
||||
|
||||
EvalSpinBoxPlugin::EvalSpinBoxPlugin(QObject * parent): QObject(parent) {
|
||||
m_initialized = false;
|
||||
}
|
||||
|
||||
|
||||
void EvalSpinBoxPlugin::initialize(QDesignerFormEditorInterface * /* core */) {
|
||||
if (m_initialized)
|
||||
return;
|
||||
|
||||
// Add extension registrations, etc. here
|
||||
|
||||
m_initialized = true;
|
||||
}
|
||||
|
||||
|
||||
bool EvalSpinBoxPlugin::isInitialized() const {
|
||||
return m_initialized;
|
||||
}
|
||||
|
||||
|
||||
QWidget * EvalSpinBoxPlugin::createWidget(QWidget * parent) {
|
||||
return new EvalSpinBox(parent);
|
||||
}
|
||||
|
||||
|
||||
QString EvalSpinBoxPlugin::name() const {
|
||||
return QLatin1String("EvalSpinBox");
|
||||
}
|
||||
|
||||
|
||||
QString EvalSpinBoxPlugin::group() const {
|
||||
return QLatin1String("Input Widgets");
|
||||
}
|
||||
|
||||
|
||||
QIcon EvalSpinBoxPlugin::icon() const {
|
||||
return QIcon(":/icons/evalspinbox.png");
|
||||
}
|
||||
|
||||
|
||||
QString EvalSpinBoxPlugin::toolTip() const {
|
||||
return QLatin1String("Evaluation double SpinBox");
|
||||
}
|
||||
|
||||
|
||||
QString EvalSpinBoxPlugin::whatsThis() const {
|
||||
return QLatin1String("Evaluation double SpinBox");
|
||||
}
|
||||
|
||||
|
||||
bool EvalSpinBoxPlugin::isContainer() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
QString EvalSpinBoxPlugin::domXml() const {
|
||||
return QLatin1String("<widget class=\"EvalSpinBox\" name=\"evalSpin\">\n</widget>\n");
|
||||
}
|
||||
|
||||
|
||||
QString EvalSpinBoxPlugin::includeFile() const {
|
||||
return QLatin1String("evalspinbox.h");
|
||||
}
|
||||
|
||||
36
test/qad/widgets/plugin/evalspinboxplugin.h
Normal file
36
test/qad/widgets/plugin/evalspinboxplugin.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#ifndef EVALSPINBOXPLUGIN_H
|
||||
#define EVALSPINBOXPLUGIN_H
|
||||
|
||||
#include <QObject>
|
||||
#if QT_VERSION >= 0x050000
|
||||
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#else
|
||||
# include <QDesignerCustomWidgetInterface>
|
||||
#endif
|
||||
|
||||
class EvalSpinBoxPlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
||||
|
||||
public:
|
||||
EvalSpinBoxPlugin(QObject * parent = 0);
|
||||
|
||||
bool isContainer() const;
|
||||
bool isInitialized() const;
|
||||
QIcon icon() const;
|
||||
QString domXml() const;
|
||||
QString group() const;
|
||||
QString includeFile() const;
|
||||
QString name() const;
|
||||
QString toolTip() const;
|
||||
QString whatsThis() const;
|
||||
QWidget * createWidget(QWidget * parent);
|
||||
void initialize(QDesignerFormEditorInterface * core);
|
||||
|
||||
private:
|
||||
bool m_initialized;
|
||||
|
||||
};
|
||||
|
||||
#endif // EVALSPINBOXPLUGIN_H
|
||||
36
test/qad/widgets/plugin/iconedlabelplugin.h
Normal file
36
test/qad/widgets/plugin/iconedlabelplugin.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#ifndef ICONEDLABEPLUGIN_H
|
||||
#define ICONEDLABEPLUGIN_H
|
||||
|
||||
#include <QObject>
|
||||
#if QT_VERSION >= 0x050000
|
||||
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#else
|
||||
# include <QDesignerCustomWidgetInterface>
|
||||
#endif
|
||||
|
||||
class IconedLabelPlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
||||
|
||||
public:
|
||||
IconedLabelPlugin(QObject * parent = 0);
|
||||
|
||||
bool isContainer() const;
|
||||
bool isInitialized() const;
|
||||
QIcon icon() const;
|
||||
QString domXml() const;
|
||||
QString group() const;
|
||||
QString includeFile() const;
|
||||
QString name() const;
|
||||
QString toolTip() const;
|
||||
QString whatsThis() const;
|
||||
QWidget * createWidget(QWidget * parent);
|
||||
void initialize(QDesignerFormEditorInterface * core);
|
||||
|
||||
private:
|
||||
bool m_initialized;
|
||||
|
||||
};
|
||||
|
||||
#endif // ICONEDLABEPLUGIN_H
|
||||
69
test/qad/widgets/plugin/imageviewplugin.cpp
Normal file
69
test/qad/widgets/plugin/imageviewplugin.cpp
Normal file
@@ -0,0 +1,69 @@
|
||||
#include "image_view.h"
|
||||
#include "imageviewplugin.h"
|
||||
#include <QtCore/QtPlugin>
|
||||
|
||||
|
||||
ImageViewPlugin::ImageViewPlugin(QObject * parent): QObject(parent) {
|
||||
m_initialized = false;
|
||||
}
|
||||
|
||||
|
||||
void ImageViewPlugin::initialize(QDesignerFormEditorInterface * /* core */) {
|
||||
if (m_initialized)
|
||||
return;
|
||||
|
||||
// Add extension registrations, etc. here
|
||||
|
||||
m_initialized = true;
|
||||
}
|
||||
|
||||
|
||||
bool ImageViewPlugin::isInitialized() const {
|
||||
return m_initialized;
|
||||
}
|
||||
|
||||
|
||||
QWidget * ImageViewPlugin::createWidget(QWidget * parent) {
|
||||
return new ImageView(parent);
|
||||
}
|
||||
|
||||
|
||||
QString ImageViewPlugin::name() const {
|
||||
return QLatin1String("ImageView");
|
||||
}
|
||||
|
||||
|
||||
QString ImageViewPlugin::group() const {
|
||||
return QLatin1String("Display Widgets");
|
||||
}
|
||||
|
||||
|
||||
QIcon ImageViewPlugin::icon() const {
|
||||
return QIcon(/*":/icons/spinslider.png"*/);
|
||||
}
|
||||
|
||||
|
||||
QString ImageViewPlugin::toolTip() const {
|
||||
return QLatin1String("Image viewer");
|
||||
}
|
||||
|
||||
|
||||
QString ImageViewPlugin::whatsThis() const {
|
||||
return QLatin1String("Image viewer");
|
||||
}
|
||||
|
||||
|
||||
bool ImageViewPlugin::isContainer() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
QString ImageViewPlugin::domXml() const {
|
||||
return QLatin1String("<widget class=\"ImageView\" name=\"imageView\">\n</widget>\n");
|
||||
}
|
||||
|
||||
|
||||
QString ImageViewPlugin::includeFile() const {
|
||||
return QLatin1String("image_view.h");
|
||||
}
|
||||
|
||||
36
test/qad/widgets/plugin/imageviewplugin.h
Normal file
36
test/qad/widgets/plugin/imageviewplugin.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#ifndef IMAGEVIEWPLUGIN_H
|
||||
#define IMAGEVIEWPLUGIN_H
|
||||
|
||||
#include <QObject>
|
||||
#if QT_VERSION >= 0x050000
|
||||
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#else
|
||||
# include <QDesignerCustomWidgetInterface>
|
||||
#endif
|
||||
|
||||
class ImageViewPlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
||||
|
||||
public:
|
||||
ImageViewPlugin(QObject * parent = 0);
|
||||
|
||||
bool isContainer() const;
|
||||
bool isInitialized() const;
|
||||
QIcon icon() const;
|
||||
QString domXml() const;
|
||||
QString group() const;
|
||||
QString includeFile() const;
|
||||
QString name() const;
|
||||
QString toolTip() const;
|
||||
QString whatsThis() const;
|
||||
QWidget * createWidget(QWidget * parent);
|
||||
void initialize(QDesignerFormEditorInterface * core);
|
||||
|
||||
private:
|
||||
bool m_initialized;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
69
test/qad/widgets/plugin/lconedlabelplugin.cpp
Normal file
69
test/qad/widgets/plugin/lconedlabelplugin.cpp
Normal file
@@ -0,0 +1,69 @@
|
||||
#include "iconedlabel.h"
|
||||
#include "iconedlabelplugin.h"
|
||||
#include <QtCore/QtPlugin>
|
||||
|
||||
|
||||
IconedLabelPlugin::IconedLabelPlugin(QObject * parent): QObject(parent) {
|
||||
m_initialized = false;
|
||||
}
|
||||
|
||||
|
||||
void IconedLabelPlugin::initialize(QDesignerFormEditorInterface * /* core */) {
|
||||
if (m_initialized)
|
||||
return;
|
||||
|
||||
// Add extension registrations, etc. here
|
||||
|
||||
m_initialized = true;
|
||||
}
|
||||
|
||||
|
||||
bool IconedLabelPlugin::isInitialized() const {
|
||||
return m_initialized;
|
||||
}
|
||||
|
||||
|
||||
QWidget * IconedLabelPlugin::createWidget(QWidget * parent) {
|
||||
return new IconedLabel(parent);
|
||||
}
|
||||
|
||||
|
||||
QString IconedLabelPlugin::name() const {
|
||||
return QLatin1String("IconedLabel");
|
||||
}
|
||||
|
||||
|
||||
QString IconedLabelPlugin::group() const {
|
||||
return QLatin1String("Display Widgets");
|
||||
}
|
||||
|
||||
|
||||
QIcon IconedLabelPlugin::icon() const {
|
||||
return QIcon();
|
||||
}
|
||||
|
||||
|
||||
QString IconedLabelPlugin::toolTip() const {
|
||||
return QLatin1String("Label with Icon");
|
||||
}
|
||||
|
||||
|
||||
QString IconedLabelPlugin::whatsThis() const {
|
||||
return QLatin1String("Label with Icon");
|
||||
}
|
||||
|
||||
|
||||
bool IconedLabelPlugin::isContainer() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
QString IconedLabelPlugin::domXml() const {
|
||||
return QLatin1String("<widget class=\"IconedLabel\" name=\"iconedLabel\">\n</widget>\n");
|
||||
}
|
||||
|
||||
|
||||
QString IconedLabelPlugin::includeFile() const {
|
||||
return QLatin1String("iconedlabel.h");
|
||||
}
|
||||
|
||||
47
test/qad/widgets/plugin/qad_widgets.cpp
Normal file
47
test/qad/widgets/plugin/qad_widgets.cpp
Normal file
@@ -0,0 +1,47 @@
|
||||
#include "qad_widgets.h"
|
||||
#include "spinsliderplugin.h"
|
||||
#include "colorbuttonplugin.h"
|
||||
#include "chardialogplugin.h"
|
||||
#include "shortcutsplugin.h"
|
||||
#include "clineeditplugin.h"
|
||||
#include "qipeditplugin.h"
|
||||
#include "qpointeditplugin.h"
|
||||
#include "qrecteditplugin.h"
|
||||
#include "ecomboboxplugin.h"
|
||||
#include "qpiconsoleplugin.h"
|
||||
#include "iconedlabelplugin.h"
|
||||
#include "qcodeeditplugin.h"
|
||||
#include "qvarianteditplugin.h"
|
||||
#include "qpiconfigplugin.h"
|
||||
#include "evalspinboxplugin.h"
|
||||
#include "imageviewplugin.h"
|
||||
|
||||
|
||||
QADWidgets::QADWidgets(QObject * parent): QObject(parent) {
|
||||
m_widgets.append(new SpinSliderPlugin(this));
|
||||
m_widgets.append(new ColorButtonPlugin(this));
|
||||
m_widgets.append(new CharDialogPlugin(this));
|
||||
m_widgets.append(new ShortcutsPlugin(this));
|
||||
m_widgets.append(new CLineEditPlugin(this));
|
||||
m_widgets.append(new QIPEditPlugin(this));
|
||||
m_widgets.append(new QPointEditPlugin(this));
|
||||
m_widgets.append(new QRectEditPlugin(this));
|
||||
m_widgets.append(new EComboBoxPlugin(this));
|
||||
m_widgets.append(new QPIConsolePlugin(this));
|
||||
m_widgets.append(new IconedLabelPlugin(this));
|
||||
m_widgets.append(new QCodeEditPlugin(this));
|
||||
m_widgets.append(new QVariantEditPlugin(this));
|
||||
m_widgets.append(new QPIConfigPlugin(this));
|
||||
m_widgets.append(new EvalSpinBoxPlugin(this));
|
||||
m_widgets.append(new ImageViewPlugin(this));
|
||||
}
|
||||
|
||||
|
||||
QList<QDesignerCustomWidgetInterface * > QADWidgets::customWidgets() const {
|
||||
return m_widgets;
|
||||
}
|
||||
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(qad_widgets_plugin, QADWidgets)
|
||||
#endif
|
||||
23
test/qad/widgets/plugin/qad_widgets.h
Normal file
23
test/qad/widgets/plugin/qad_widgets.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef QAD_WIDGETS_H
|
||||
#define QAD_WIDGETS_H
|
||||
|
||||
#include <QtDesigner/QtDesigner>
|
||||
#include <QtCore/qplugin.h>
|
||||
|
||||
class QADWidgets: public QObject, public QDesignerCustomWidgetCollectionInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "qad.widgets")
|
||||
#endif
|
||||
public:
|
||||
explicit QADWidgets(QObject * parent = 0);
|
||||
virtual QList<QDesignerCustomWidgetInterface * > customWidgets() const;
|
||||
|
||||
private:
|
||||
QList<QDesignerCustomWidgetInterface * > m_widgets;
|
||||
|
||||
};
|
||||
|
||||
#endif // QAD_WIDGETS_H
|
||||
69
test/qad/widgets/plugin/qcodeeditplugin.cpp
Normal file
69
test/qad/widgets/plugin/qcodeeditplugin.cpp
Normal file
@@ -0,0 +1,69 @@
|
||||
#include "qcodeedit.h"
|
||||
#include "qcodeeditplugin.h"
|
||||
#include <QtCore/QtPlugin>
|
||||
|
||||
|
||||
QCodeEditPlugin::QCodeEditPlugin(QObject * parent): QObject(parent) {
|
||||
m_initialized = false;
|
||||
}
|
||||
|
||||
|
||||
void QCodeEditPlugin::initialize(QDesignerFormEditorInterface * /* core */) {
|
||||
if (m_initialized)
|
||||
return;
|
||||
|
||||
// Add extension registrations, etc. here
|
||||
|
||||
m_initialized = true;
|
||||
}
|
||||
|
||||
|
||||
bool QCodeEditPlugin::isInitialized() const {
|
||||
return m_initialized;
|
||||
}
|
||||
|
||||
|
||||
QWidget * QCodeEditPlugin::createWidget(QWidget * parent) {
|
||||
return new QCodeEdit(parent);
|
||||
}
|
||||
|
||||
|
||||
QString QCodeEditPlugin::name() const {
|
||||
return QLatin1String("QCodeEdit");
|
||||
}
|
||||
|
||||
|
||||
QString QCodeEditPlugin::group() const {
|
||||
return QLatin1String("Input Widgets");
|
||||
}
|
||||
|
||||
|
||||
QIcon QCodeEditPlugin::icon() const {
|
||||
return QIcon(":/icons/qcodeedit.png");
|
||||
}
|
||||
|
||||
|
||||
QString QCodeEditPlugin::toolTip() const {
|
||||
return QLatin1String("QCodeEdit");
|
||||
}
|
||||
|
||||
|
||||
QString QCodeEditPlugin::whatsThis() const {
|
||||
return QLatin1String("QCodeEdit");
|
||||
}
|
||||
|
||||
|
||||
bool QCodeEditPlugin::isContainer() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
QString QCodeEditPlugin::domXml() const {
|
||||
return QLatin1String("<widget class=\"QCodeEdit\" name=\"codeEdit\">\n</widget>\n");
|
||||
}
|
||||
|
||||
|
||||
QString QCodeEditPlugin::includeFile() const {
|
||||
return QLatin1String("qcodeedit.h");
|
||||
}
|
||||
|
||||
36
test/qad/widgets/plugin/qcodeeditplugin.h
Normal file
36
test/qad/widgets/plugin/qcodeeditplugin.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#ifndef QCODEEDITPLUGIN_H
|
||||
#define QCODEEDITPLUGIN_H
|
||||
|
||||
#include <QObject>
|
||||
#if QT_VERSION >= 0x050000
|
||||
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#else
|
||||
# include <QDesignerCustomWidgetInterface>
|
||||
#endif
|
||||
|
||||
class QCodeEditPlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
||||
|
||||
public:
|
||||
QCodeEditPlugin(QObject * parent = 0);
|
||||
|
||||
bool isContainer() const;
|
||||
bool isInitialized() const;
|
||||
QIcon icon() const;
|
||||
QString domXml() const;
|
||||
QString group() const;
|
||||
QString includeFile() const;
|
||||
QString name() const;
|
||||
QString toolTip() const;
|
||||
QString whatsThis() const;
|
||||
QWidget * createWidget(QWidget * parent);
|
||||
void initialize(QDesignerFormEditorInterface * core);
|
||||
|
||||
private:
|
||||
bool m_initialized;
|
||||
|
||||
};
|
||||
|
||||
#endif // QCODEEDITPLUGIN_H
|
||||
69
test/qad/widgets/plugin/qipeditplugin.cpp
Normal file
69
test/qad/widgets/plugin/qipeditplugin.cpp
Normal file
@@ -0,0 +1,69 @@
|
||||
#include "qipedit.h"
|
||||
#include "qipeditplugin.h"
|
||||
#include <QtCore/QtPlugin>
|
||||
|
||||
|
||||
QIPEditPlugin::QIPEditPlugin(QObject * parent): QObject(parent) {
|
||||
m_initialized = false;
|
||||
}
|
||||
|
||||
|
||||
void QIPEditPlugin::initialize(QDesignerFormEditorInterface * /* core */) {
|
||||
if (m_initialized)
|
||||
return;
|
||||
|
||||
// Add extension registrations, etc. here
|
||||
|
||||
m_initialized = true;
|
||||
}
|
||||
|
||||
|
||||
bool QIPEditPlugin::isInitialized() const {
|
||||
return m_initialized;
|
||||
}
|
||||
|
||||
|
||||
QWidget * QIPEditPlugin::createWidget(QWidget * parent) {
|
||||
return new QIPEdit(parent);
|
||||
}
|
||||
|
||||
|
||||
QString QIPEditPlugin::name() const {
|
||||
return QLatin1String("QIPEdit");
|
||||
}
|
||||
|
||||
|
||||
QString QIPEditPlugin::group() const {
|
||||
return QLatin1String("Input Widgets");
|
||||
}
|
||||
|
||||
|
||||
QIcon QIPEditPlugin::icon() const {
|
||||
return QIcon();
|
||||
}
|
||||
|
||||
|
||||
QString QIPEditPlugin::toolTip() const {
|
||||
return QLatin1String("IP Edit");
|
||||
}
|
||||
|
||||
|
||||
QString QIPEditPlugin::whatsThis() const {
|
||||
return QLatin1String("IP Edit");
|
||||
}
|
||||
|
||||
|
||||
bool QIPEditPlugin::isContainer() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
QString QIPEditPlugin::domXml() const {
|
||||
return QLatin1String("<widget class=\"QIPEdit\" name=\"ipEdit\">\n</widget>\n");
|
||||
}
|
||||
|
||||
|
||||
QString QIPEditPlugin::includeFile() const {
|
||||
return QLatin1String("qipedit.h");
|
||||
}
|
||||
|
||||
36
test/qad/widgets/plugin/qipeditplugin.h
Normal file
36
test/qad/widgets/plugin/qipeditplugin.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#ifndef QIPEDITPLUGIN_H
|
||||
#define QIPEDITPLUGIN_H
|
||||
|
||||
#include <QObject>
|
||||
#if QT_VERSION >= 0x050000
|
||||
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#else
|
||||
# include <QDesignerCustomWidgetInterface>
|
||||
#endif
|
||||
|
||||
class QIPEditPlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
||||
|
||||
public:
|
||||
QIPEditPlugin(QObject * parent = 0);
|
||||
|
||||
bool isContainer() const;
|
||||
bool isInitialized() const;
|
||||
QIcon icon() const;
|
||||
QString domXml() const;
|
||||
QString group() const;
|
||||
QString includeFile() const;
|
||||
QString name() const;
|
||||
QString toolTip() const;
|
||||
QString whatsThis() const;
|
||||
QWidget * createWidget(QWidget * parent);
|
||||
void initialize(QDesignerFormEditorInterface * core);
|
||||
|
||||
private:
|
||||
bool m_initialized;
|
||||
|
||||
};
|
||||
|
||||
#endif // QIPEDITPLUGIN_H
|
||||
69
test/qad/widgets/plugin/qpiconfigplugin.cpp
Normal file
69
test/qad/widgets/plugin/qpiconfigplugin.cpp
Normal file
@@ -0,0 +1,69 @@
|
||||
#include "qpiconfigwidget.h"
|
||||
#include "qpiconfigplugin.h"
|
||||
#include <QtCore/QtPlugin>
|
||||
|
||||
|
||||
QPIConfigPlugin::QPIConfigPlugin(QObject * parent): QObject(parent) {
|
||||
m_initialized = false;
|
||||
}
|
||||
|
||||
|
||||
void QPIConfigPlugin::initialize(QDesignerFormEditorInterface * /* core */) {
|
||||
if (m_initialized)
|
||||
return;
|
||||
|
||||
// Add extension registrations, etc. here
|
||||
|
||||
m_initialized = true;
|
||||
}
|
||||
|
||||
|
||||
bool QPIConfigPlugin::isInitialized() const {
|
||||
return m_initialized;
|
||||
}
|
||||
|
||||
|
||||
QWidget * QPIConfigPlugin::createWidget(QWidget * parent) {
|
||||
return new QPIConfigWidget(parent, 0, false);
|
||||
}
|
||||
|
||||
|
||||
QString QPIConfigPlugin::name() const {
|
||||
return QLatin1String("QPIConfigWidget");
|
||||
}
|
||||
|
||||
|
||||
QString QPIConfigPlugin::group() const {
|
||||
return QLatin1String("Editor Widgets");
|
||||
}
|
||||
|
||||
|
||||
QIcon QPIConfigPlugin::icon() const {
|
||||
return QIcon();
|
||||
}
|
||||
|
||||
|
||||
QString QPIConfigPlugin::toolTip() const {
|
||||
return QLatin1String("");
|
||||
}
|
||||
|
||||
|
||||
QString QPIConfigPlugin::whatsThis() const {
|
||||
return QLatin1String("");
|
||||
}
|
||||
|
||||
|
||||
bool QPIConfigPlugin::isContainer() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
QString QPIConfigPlugin::domXml() const {
|
||||
return QLatin1String("<widget class=\"QPIConfigWidget\" name=\"piConfigWidget\">\n</widget>\n");
|
||||
}
|
||||
|
||||
|
||||
QString QPIConfigPlugin::includeFile() const {
|
||||
return QLatin1String("qpiconfigwidget.h");
|
||||
}
|
||||
|
||||
36
test/qad/widgets/plugin/qpiconfigplugin.h
Normal file
36
test/qad/widgets/plugin/qpiconfigplugin.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#ifndef QPICONFIGPLUGIN_H
|
||||
#define QPICONFIGPLUGIN_H
|
||||
|
||||
#include <QObject>
|
||||
#if QT_VERSION >= 0x050000
|
||||
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#else
|
||||
# include <QDesignerCustomWidgetInterface>
|
||||
#endif
|
||||
|
||||
class QPIConfigPlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
||||
|
||||
public:
|
||||
QPIConfigPlugin(QObject * parent = 0);
|
||||
|
||||
bool isContainer() const;
|
||||
bool isInitialized() const;
|
||||
QIcon icon() const;
|
||||
QString domXml() const;
|
||||
QString group() const;
|
||||
QString includeFile() const;
|
||||
QString name() const;
|
||||
QString toolTip() const;
|
||||
QString whatsThis() const;
|
||||
QWidget * createWidget(QWidget * parent);
|
||||
void initialize(QDesignerFormEditorInterface * core);
|
||||
|
||||
private:
|
||||
bool m_initialized;
|
||||
|
||||
};
|
||||
|
||||
#endif // QPICONFIGPLUGIN_H
|
||||
69
test/qad/widgets/plugin/qpiconsoleplugin.cpp
Normal file
69
test/qad/widgets/plugin/qpiconsoleplugin.cpp
Normal file
@@ -0,0 +1,69 @@
|
||||
#include "qpiconsole.h"
|
||||
#include "qpiconsoleplugin.h"
|
||||
#include <QtCore/QtPlugin>
|
||||
|
||||
|
||||
QPIConsolePlugin::QPIConsolePlugin(QObject * parent): QObject(parent) {
|
||||
m_initialized = false;
|
||||
}
|
||||
|
||||
|
||||
void QPIConsolePlugin::initialize(QDesignerFormEditorInterface * /* core */) {
|
||||
if (m_initialized)
|
||||
return;
|
||||
|
||||
// Add extension registrations, etc. here
|
||||
|
||||
m_initialized = true;
|
||||
}
|
||||
|
||||
|
||||
bool QPIConsolePlugin::isInitialized() const {
|
||||
return m_initialized;
|
||||
}
|
||||
|
||||
|
||||
QWidget * QPIConsolePlugin::createWidget(QWidget * parent) {
|
||||
return new QPIConsole(parent);
|
||||
}
|
||||
|
||||
|
||||
QString QPIConsolePlugin::name() const {
|
||||
return QLatin1String("QPIConsole");
|
||||
}
|
||||
|
||||
|
||||
QString QPIConsolePlugin::group() const {
|
||||
return QLatin1String("Display Widgets");
|
||||
}
|
||||
|
||||
|
||||
QIcon QPIConsolePlugin::icon() const {
|
||||
return QIcon(":/icons/qpiconsole.png");
|
||||
}
|
||||
|
||||
|
||||
QString QPIConsolePlugin::toolTip() const {
|
||||
return QLatin1String("QPIConsole");
|
||||
}
|
||||
|
||||
|
||||
QString QPIConsolePlugin::whatsThis() const {
|
||||
return QLatin1String("QPIConsole");
|
||||
}
|
||||
|
||||
|
||||
bool QPIConsolePlugin::isContainer() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
QString QPIConsolePlugin::domXml() const {
|
||||
return QLatin1String("<widget class=\"QPIConsole\" name=\"piConsole\">\n</widget>\n");
|
||||
}
|
||||
|
||||
|
||||
QString QPIConsolePlugin::includeFile() const {
|
||||
return QLatin1String("qpiconsole.h");
|
||||
}
|
||||
|
||||
36
test/qad/widgets/plugin/qpiconsoleplugin.h
Normal file
36
test/qad/widgets/plugin/qpiconsoleplugin.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#ifndef QPICONSOLEPLUGIN_H
|
||||
#define QPICONSOLEPLUGIN_H
|
||||
|
||||
#include <QObject>
|
||||
#if QT_VERSION >= 0x050000
|
||||
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#else
|
||||
# include <QDesignerCustomWidgetInterface>
|
||||
#endif
|
||||
|
||||
class QPIConsolePlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
||||
|
||||
public:
|
||||
QPIConsolePlugin(QObject * parent = 0);
|
||||
|
||||
bool isContainer() const;
|
||||
bool isInitialized() const;
|
||||
QIcon icon() const;
|
||||
QString domXml() const;
|
||||
QString group() const;
|
||||
QString includeFile() const;
|
||||
QString name() const;
|
||||
QString toolTip() const;
|
||||
QString whatsThis() const;
|
||||
QWidget * createWidget(QWidget * parent);
|
||||
void initialize(QDesignerFormEditorInterface * core);
|
||||
|
||||
private:
|
||||
bool m_initialized;
|
||||
|
||||
};
|
||||
|
||||
#endif // QPICONSOLEPLUGIN_H
|
||||
69
test/qad/widgets/plugin/qpointeditplugin.cpp
Normal file
69
test/qad/widgets/plugin/qpointeditplugin.cpp
Normal file
@@ -0,0 +1,69 @@
|
||||
#include "qpointedit.h"
|
||||
#include "qpointeditplugin.h"
|
||||
#include <QtCore/QtPlugin>
|
||||
|
||||
|
||||
QPointEditPlugin::QPointEditPlugin(QObject * parent): QObject(parent) {
|
||||
m_initialized = false;
|
||||
}
|
||||
|
||||
|
||||
void QPointEditPlugin::initialize(QDesignerFormEditorInterface * /* core */) {
|
||||
if (m_initialized)
|
||||
return;
|
||||
|
||||
// Add extension registrations, etc. here
|
||||
|
||||
m_initialized = true;
|
||||
}
|
||||
|
||||
|
||||
bool QPointEditPlugin::isInitialized() const {
|
||||
return m_initialized;
|
||||
}
|
||||
|
||||
|
||||
QWidget * QPointEditPlugin::createWidget(QWidget * parent) {
|
||||
return new QPointEdit(parent);
|
||||
}
|
||||
|
||||
|
||||
QString QPointEditPlugin::name() const {
|
||||
return QLatin1String("QPointEdit");
|
||||
}
|
||||
|
||||
|
||||
QString QPointEditPlugin::group() const {
|
||||
return QLatin1String("Input Widgets");
|
||||
}
|
||||
|
||||
|
||||
QIcon QPointEditPlugin::icon() const {
|
||||
return QIcon(":/icons/qpointedit.png");
|
||||
}
|
||||
|
||||
|
||||
QString QPointEditPlugin::toolTip() const {
|
||||
return QLatin1String("Point Edit");
|
||||
}
|
||||
|
||||
|
||||
QString QPointEditPlugin::whatsThis() const {
|
||||
return QLatin1String("Point Edit");
|
||||
}
|
||||
|
||||
|
||||
bool QPointEditPlugin::isContainer() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
QString QPointEditPlugin::domXml() const {
|
||||
return QLatin1String("<widget class=\"QPointEdit\" name=\"pointEdit\">\n</widget>\n");
|
||||
}
|
||||
|
||||
|
||||
QString QPointEditPlugin::includeFile() const {
|
||||
return QLatin1String("qpointedit.h");
|
||||
}
|
||||
|
||||
36
test/qad/widgets/plugin/qpointeditplugin.h
Normal file
36
test/qad/widgets/plugin/qpointeditplugin.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#ifndef QPOINTEDITPLUGIN_H
|
||||
#define QPOINTEDITPLUGIN_H
|
||||
|
||||
#include <QObject>
|
||||
#if QT_VERSION >= 0x050000
|
||||
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#else
|
||||
# include <QDesignerCustomWidgetInterface>
|
||||
#endif
|
||||
|
||||
class QPointEditPlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
||||
|
||||
public:
|
||||
QPointEditPlugin(QObject * parent = 0);
|
||||
|
||||
bool isContainer() const;
|
||||
bool isInitialized() const;
|
||||
QIcon icon() const;
|
||||
QString domXml() const;
|
||||
QString group() const;
|
||||
QString includeFile() const;
|
||||
QString name() const;
|
||||
QString toolTip() const;
|
||||
QString whatsThis() const;
|
||||
QWidget * createWidget(QWidget * parent);
|
||||
void initialize(QDesignerFormEditorInterface * core);
|
||||
|
||||
private:
|
||||
bool m_initialized;
|
||||
|
||||
};
|
||||
|
||||
#endif // QPOINTEDITPLUGIN_H
|
||||
69
test/qad/widgets/plugin/qrecteditplugin.cpp
Normal file
69
test/qad/widgets/plugin/qrecteditplugin.cpp
Normal file
@@ -0,0 +1,69 @@
|
||||
#include "qrectedit.h"
|
||||
#include "qrecteditplugin.h"
|
||||
#include <QtCore/QtPlugin>
|
||||
|
||||
|
||||
QRectEditPlugin::QRectEditPlugin(QObject * parent): QObject(parent) {
|
||||
m_initialized = false;
|
||||
}
|
||||
|
||||
|
||||
void QRectEditPlugin::initialize(QDesignerFormEditorInterface * /* core */) {
|
||||
if (m_initialized)
|
||||
return;
|
||||
|
||||
// Add extension registrations, etc. here
|
||||
|
||||
m_initialized = true;
|
||||
}
|
||||
|
||||
|
||||
bool QRectEditPlugin::isInitialized() const {
|
||||
return m_initialized;
|
||||
}
|
||||
|
||||
|
||||
QWidget * QRectEditPlugin::createWidget(QWidget * parent) {
|
||||
return new QRectEdit(parent);
|
||||
}
|
||||
|
||||
|
||||
QString QRectEditPlugin::name() const {
|
||||
return QLatin1String("QRectEdit");
|
||||
}
|
||||
|
||||
|
||||
QString QRectEditPlugin::group() const {
|
||||
return QLatin1String("Input Widgets");
|
||||
}
|
||||
|
||||
|
||||
QIcon QRectEditPlugin::icon() const {
|
||||
return QIcon(":/icons/qrectedit.png");
|
||||
}
|
||||
|
||||
|
||||
QString QRectEditPlugin::toolTip() const {
|
||||
return QLatin1String("Rect Edit");
|
||||
}
|
||||
|
||||
|
||||
QString QRectEditPlugin::whatsThis() const {
|
||||
return QLatin1String("Rect Edit");
|
||||
}
|
||||
|
||||
|
||||
bool QRectEditPlugin::isContainer() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
QString QRectEditPlugin::domXml() const {
|
||||
return QLatin1String("<widget class=\"QRectEdit\" name=\"rectEdit\">\n</widget>\n");
|
||||
}
|
||||
|
||||
|
||||
QString QRectEditPlugin::includeFile() const {
|
||||
return QLatin1String("qrectedit.h");
|
||||
}
|
||||
|
||||
36
test/qad/widgets/plugin/qrecteditplugin.h
Normal file
36
test/qad/widgets/plugin/qrecteditplugin.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#ifndef QRECTEDITPLUGIN_H
|
||||
#define QRECTEDITPLUGIN_H
|
||||
|
||||
#include <QObject>
|
||||
#if QT_VERSION >= 0x050000
|
||||
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#else
|
||||
# include <QDesignerCustomWidgetInterface>
|
||||
#endif
|
||||
|
||||
class QRectEditPlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
||||
|
||||
public:
|
||||
QRectEditPlugin(QObject * parent = 0);
|
||||
|
||||
bool isContainer() const;
|
||||
bool isInitialized() const;
|
||||
QIcon icon() const;
|
||||
QString domXml() const;
|
||||
QString group() const;
|
||||
QString includeFile() const;
|
||||
QString name() const;
|
||||
QString toolTip() const;
|
||||
QString whatsThis() const;
|
||||
QWidget * createWidget(QWidget * parent);
|
||||
void initialize(QDesignerFormEditorInterface * core);
|
||||
|
||||
private:
|
||||
bool m_initialized;
|
||||
|
||||
};
|
||||
|
||||
#endif // QRECTEDITPLUGIN_H
|
||||
69
test/qad/widgets/plugin/qvarianteditplugin.cpp
Normal file
69
test/qad/widgets/plugin/qvarianteditplugin.cpp
Normal file
@@ -0,0 +1,69 @@
|
||||
#include "qvariantedit.h"
|
||||
#include "qvarianteditplugin.h"
|
||||
#include <QtCore/QtPlugin>
|
||||
|
||||
|
||||
QVariantEditPlugin::QVariantEditPlugin(QObject * parent): QObject(parent) {
|
||||
m_initialized = false;
|
||||
}
|
||||
|
||||
|
||||
void QVariantEditPlugin::initialize(QDesignerFormEditorInterface * /* core */) {
|
||||
if (m_initialized)
|
||||
return;
|
||||
|
||||
// Add extension registrations, etc. here
|
||||
|
||||
m_initialized = true;
|
||||
}
|
||||
|
||||
|
||||
bool QVariantEditPlugin::isInitialized() const {
|
||||
return m_initialized;
|
||||
}
|
||||
|
||||
|
||||
QWidget * QVariantEditPlugin::createWidget(QWidget * parent) {
|
||||
return new QVariantEdit(parent);
|
||||
}
|
||||
|
||||
|
||||
QString QVariantEditPlugin::name() const {
|
||||
return QLatin1String("QVariantEdit");
|
||||
}
|
||||
|
||||
|
||||
QString QVariantEditPlugin::group() const {
|
||||
return QLatin1String("Input Widgets");
|
||||
}
|
||||
|
||||
|
||||
QIcon QVariantEditPlugin::icon() const {
|
||||
return QIcon(":/icons/qvariantedit.png");
|
||||
}
|
||||
|
||||
|
||||
QString QVariantEditPlugin::toolTip() const {
|
||||
return QLatin1String("QVariant Edit");
|
||||
}
|
||||
|
||||
|
||||
QString QVariantEditPlugin::whatsThis() const {
|
||||
return QLatin1String("QVariant Edit");
|
||||
}
|
||||
|
||||
|
||||
bool QVariantEditPlugin::isContainer() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
QString QVariantEditPlugin::domXml() const {
|
||||
return QLatin1String("<widget class=\"QVariantEdit\" name=\"variantEdit\">\n</widget>\n");
|
||||
}
|
||||
|
||||
|
||||
QString QVariantEditPlugin::includeFile() const {
|
||||
return QLatin1String("qvariantedit.h");
|
||||
}
|
||||
|
||||
36
test/qad/widgets/plugin/qvarianteditplugin.h
Normal file
36
test/qad/widgets/plugin/qvarianteditplugin.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#ifndef QVARIANTEDITPLUGIN_H
|
||||
#define QVARIANTEDITPLUGIN_H
|
||||
|
||||
#include <QObject>
|
||||
#if QT_VERSION >= 0x050000
|
||||
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#else
|
||||
# include <QDesignerCustomWidgetInterface>
|
||||
#endif
|
||||
|
||||
class QVariantEditPlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
||||
|
||||
public:
|
||||
QVariantEditPlugin(QObject * parent = 0);
|
||||
|
||||
bool isContainer() const;
|
||||
bool isInitialized() const;
|
||||
QIcon icon() const;
|
||||
QString domXml() const;
|
||||
QString group() const;
|
||||
QString includeFile() const;
|
||||
QString name() const;
|
||||
QString toolTip() const;
|
||||
QString whatsThis() const;
|
||||
QWidget * createWidget(QWidget * parent);
|
||||
void initialize(QDesignerFormEditorInterface * core);
|
||||
|
||||
private:
|
||||
bool m_initialized;
|
||||
|
||||
};
|
||||
|
||||
#endif // QVARIANTEDITPLUGIN_H
|
||||
69
test/qad/widgets/plugin/shortcutsplugin.cpp
Normal file
69
test/qad/widgets/plugin/shortcutsplugin.cpp
Normal file
@@ -0,0 +1,69 @@
|
||||
#include "shortcuts.h"
|
||||
#include "shortcutsplugin.h"
|
||||
#include <QtCore/QtPlugin>
|
||||
|
||||
|
||||
ShortcutsPlugin::ShortcutsPlugin(QObject * parent): QObject(parent) {
|
||||
m_initialized = false;
|
||||
}
|
||||
|
||||
|
||||
void ShortcutsPlugin::initialize(QDesignerFormEditorInterface * /* core */) {
|
||||
if (m_initialized)
|
||||
return;
|
||||
|
||||
// Add extension registrations, etc. here
|
||||
|
||||
m_initialized = true;
|
||||
}
|
||||
|
||||
|
||||
bool ShortcutsPlugin::isInitialized() const {
|
||||
return m_initialized;
|
||||
}
|
||||
|
||||
|
||||
QWidget * ShortcutsPlugin::createWidget(QWidget * parent) {
|
||||
return new Shortcuts(parent, false);
|
||||
}
|
||||
|
||||
|
||||
QString ShortcutsPlugin::name() const {
|
||||
return QLatin1String("Shortcuts");
|
||||
}
|
||||
|
||||
|
||||
QString ShortcutsPlugin::group() const {
|
||||
return QLatin1String("Input Widgets");
|
||||
}
|
||||
|
||||
|
||||
QIcon ShortcutsPlugin::icon() const {
|
||||
return QIcon();
|
||||
}
|
||||
|
||||
|
||||
QString ShortcutsPlugin::toolTip() const {
|
||||
return QLatin1String("Shortcuts Edit");
|
||||
}
|
||||
|
||||
|
||||
QString ShortcutsPlugin::whatsThis() const {
|
||||
return QLatin1String("Shortcuts Edit");
|
||||
}
|
||||
|
||||
|
||||
bool ShortcutsPlugin::isContainer() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
QString ShortcutsPlugin::domXml() const {
|
||||
return QLatin1String("<widget class=\"Shortcuts\" name=\"shortcuts\">\n</widget>\n");
|
||||
}
|
||||
|
||||
|
||||
QString ShortcutsPlugin::includeFile() const {
|
||||
return QLatin1String("shortcuts.h");
|
||||
}
|
||||
|
||||
36
test/qad/widgets/plugin/shortcutsplugin.h
Normal file
36
test/qad/widgets/plugin/shortcutsplugin.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#ifndef SHORTCUTSPLUGIN_H
|
||||
#define SHORTCUTSPLUGIN_H
|
||||
|
||||
#include <QObject>
|
||||
#if QT_VERSION >= 0x050000
|
||||
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#else
|
||||
# include <QDesignerCustomWidgetInterface>
|
||||
#endif
|
||||
|
||||
class ShortcutsPlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
||||
|
||||
public:
|
||||
ShortcutsPlugin(QObject * parent = 0);
|
||||
|
||||
bool isContainer() const;
|
||||
bool isInitialized() const;
|
||||
QIcon icon() const;
|
||||
QString domXml() const;
|
||||
QString group() const;
|
||||
QString includeFile() const;
|
||||
QString name() const;
|
||||
QString toolTip() const;
|
||||
QString whatsThis() const;
|
||||
QWidget * createWidget(QWidget * parent);
|
||||
void initialize(QDesignerFormEditorInterface * core);
|
||||
|
||||
private:
|
||||
bool m_initialized;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
69
test/qad/widgets/plugin/spinsliderplugin.cpp
Normal file
69
test/qad/widgets/plugin/spinsliderplugin.cpp
Normal file
@@ -0,0 +1,69 @@
|
||||
#include "spinslider.h"
|
||||
#include "spinsliderplugin.h"
|
||||
#include <QtCore/QtPlugin>
|
||||
|
||||
|
||||
SpinSliderPlugin::SpinSliderPlugin(QObject * parent): QObject(parent) {
|
||||
m_initialized = false;
|
||||
}
|
||||
|
||||
|
||||
void SpinSliderPlugin::initialize(QDesignerFormEditorInterface * /* core */) {
|
||||
if (m_initialized)
|
||||
return;
|
||||
|
||||
// Add extension registrations, etc. here
|
||||
|
||||
m_initialized = true;
|
||||
}
|
||||
|
||||
|
||||
bool SpinSliderPlugin::isInitialized() const {
|
||||
return m_initialized;
|
||||
}
|
||||
|
||||
|
||||
QWidget * SpinSliderPlugin::createWidget(QWidget * parent) {
|
||||
return new SpinSlider(parent);
|
||||
}
|
||||
|
||||
|
||||
QString SpinSliderPlugin::name() const {
|
||||
return QLatin1String("SpinSlider");
|
||||
}
|
||||
|
||||
|
||||
QString SpinSliderPlugin::group() const {
|
||||
return QLatin1String("Input Widgets");
|
||||
}
|
||||
|
||||
|
||||
QIcon SpinSliderPlugin::icon() const {
|
||||
return QIcon(":/icons/spinslider.png");
|
||||
}
|
||||
|
||||
|
||||
QString SpinSliderPlugin::toolTip() const {
|
||||
return QLatin1String("Spin with Slider");
|
||||
}
|
||||
|
||||
|
||||
QString SpinSliderPlugin::whatsThis() const {
|
||||
return QLatin1String("Spin with Slider");
|
||||
}
|
||||
|
||||
|
||||
bool SpinSliderPlugin::isContainer() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
QString SpinSliderPlugin::domXml() const {
|
||||
return QLatin1String("<widget class=\"SpinSlider\" name=\"spinSlider\">\n</widget>\n");
|
||||
}
|
||||
|
||||
|
||||
QString SpinSliderPlugin::includeFile() const {
|
||||
return QLatin1String("spinslider.h");
|
||||
}
|
||||
|
||||
36
test/qad/widgets/plugin/spinsliderplugin.h
Normal file
36
test/qad/widgets/plugin/spinsliderplugin.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#ifndef SPINSLIDERPLUGIN_H
|
||||
#define SPINSLIDERPLUGIN_H
|
||||
|
||||
#include <QObject>
|
||||
#if QT_VERSION >= 0x050000
|
||||
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#else
|
||||
# include <QDesignerCustomWidgetInterface>
|
||||
#endif
|
||||
|
||||
class SpinSliderPlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
||||
|
||||
public:
|
||||
SpinSliderPlugin(QObject * parent = 0);
|
||||
|
||||
bool isContainer() const;
|
||||
bool isInitialized() const;
|
||||
QIcon icon() const;
|
||||
QString domXml() const;
|
||||
QString group() const;
|
||||
QString includeFile() const;
|
||||
QString name() const;
|
||||
QString toolTip() const;
|
||||
QString whatsThis() const;
|
||||
QWidget * createWidget(QWidget * parent);
|
||||
void initialize(QDesignerFormEditorInterface * core);
|
||||
|
||||
private:
|
||||
bool m_initialized;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user