new cmake build
git-svn-id: svn://db.shs.com.ru/libs@90 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
20
qad_widgets/plugin/CMakeLists.txt
Normal file
20
qad_widgets/plugin/CMakeLists.txt
Normal file
@@ -0,0 +1,20 @@
|
||||
project(qad_widgets_plugin)
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
find_package(Qt4 REQUIRED)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${QT_INCLUDES} "..")
|
||||
option(DEBUG "Build with -g3" 0)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -Wall")
|
||||
if (DEBUG)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3")
|
||||
endif ()
|
||||
set(LIBS ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
|
||||
add_definitions(-DQT_PLUGIN)
|
||||
add_definitions(-DQT_NO_DEBUG)
|
||||
add_definitions(-DQT_SHARED)
|
||||
add_definitions(-DQDESIGNER_EXPORT_WIDGETS)
|
||||
file(GLOB PMOCS "./*.h")
|
||||
file(GLOB PCPPS "./*.cpp")
|
||||
qt4_wrap_cpp(PCMOCS ${PMOCS} OPTIONS -nw)
|
||||
add_library(${PROJECT_NAME} SHARED ${PCMOCS} ${PCPPS} ${PMOCS})
|
||||
target_link_libraries(${PROJECT_NAME} ${LIBS} ${QT_QTDESIGNER_LIBRARY} qad_widgets)
|
||||
install(TARGETS ${PROJECT_NAME} DESTINATION ${QT_PLUGINS_DIR}/designer)
|
||||
69
qad_widgets/plugin/chardialogplugin.cpp
Normal file
69
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");
|
||||
}
|
||||
|
||||
31
qad_widgets/plugin/chardialogplugin.h
Normal file
31
qad_widgets/plugin/chardialogplugin.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef CHARDIALOGPLUGIN_H
|
||||
#define CHARDIALOGPLUGIN_H
|
||||
|
||||
#include <QDesignerCustomWidgetInterface>
|
||||
|
||||
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
qad_widgets/plugin/clineeditplugin.cpp
Normal file
69
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");
|
||||
}
|
||||
|
||||
31
qad_widgets/plugin/clineeditplugin.h
Normal file
31
qad_widgets/plugin/clineeditplugin.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef CLINEEDITPLUGIN_H
|
||||
#define CLINEEDITPLUGIN_H
|
||||
|
||||
#include <QDesignerCustomWidgetInterface>
|
||||
|
||||
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
qad_widgets/plugin/colorbuttonplugin.cpp
Normal file
69
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");
|
||||
}
|
||||
|
||||
31
qad_widgets/plugin/colorbuttonplugin.h
Normal file
31
qad_widgets/plugin/colorbuttonplugin.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef COLORBUTTONPLUGIN_H
|
||||
#define COLORBUTTONPLUGIN_H
|
||||
|
||||
#include <QDesignerCustomWidgetInterface>
|
||||
|
||||
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
qad_widgets/plugin/ecomboboxplugin.cpp
Normal file
69
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");
|
||||
}
|
||||
|
||||
31
qad_widgets/plugin/ecomboboxplugin.h
Normal file
31
qad_widgets/plugin/ecomboboxplugin.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef ECOMBOBOXPLUGIN_H
|
||||
#define ECOMBOBOXPLUGIN_H
|
||||
|
||||
#include <QDesignerCustomWidgetInterface>
|
||||
|
||||
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
|
||||
31
qad_widgets/plugin/iconedlabelplugin.h
Normal file
31
qad_widgets/plugin/iconedlabelplugin.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef ICONEDLABEPLUGIN_H
|
||||
#define ICONEDLABEPLUGIN_H
|
||||
|
||||
#include <QDesignerCustomWidgetInterface>
|
||||
|
||||
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
qad_widgets/plugin/lconedlabelplugin.cpp
Normal file
69
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");
|
||||
}
|
||||
|
||||
38
qad_widgets/plugin/qad_widgets.cpp
Normal file
38
qad_widgets/plugin/qad_widgets.cpp
Normal file
@@ -0,0 +1,38 @@
|
||||
#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 "qad_widgets.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));
|
||||
}
|
||||
|
||||
|
||||
QList<QDesignerCustomWidgetInterface * > QADWidgets::customWidgets() const {
|
||||
return m_widgets;
|
||||
}
|
||||
|
||||
Q_EXPORT_PLUGIN2(qad_widgets_plugin, QADWidgets)
|
||||
21
qad_widgets/plugin/qad_widgets.h
Normal file
21
qad_widgets/plugin/qad_widgets.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#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)
|
||||
|
||||
public:
|
||||
explicit QADWidgets(QObject * parent = 0);
|
||||
virtual QList<QDesignerCustomWidgetInterface * > customWidgets() const;
|
||||
|
||||
private:
|
||||
QList<QDesignerCustomWidgetInterface * > m_widgets;
|
||||
|
||||
};
|
||||
|
||||
#endif // QAD_WIDGETS_H
|
||||
69
qad_widgets/plugin/qcodeeditplugin.cpp
Normal file
69
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");
|
||||
}
|
||||
|
||||
31
qad_widgets/plugin/qcodeeditplugin.h
Normal file
31
qad_widgets/plugin/qcodeeditplugin.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef QCODEEDITPLUGIN_H
|
||||
#define QCODEEDITPLUGIN_H
|
||||
|
||||
#include <QDesignerCustomWidgetInterface>
|
||||
|
||||
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
qad_widgets/plugin/qipeditplugin.cpp
Normal file
69
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");
|
||||
}
|
||||
|
||||
31
qad_widgets/plugin/qipeditplugin.h
Normal file
31
qad_widgets/plugin/qipeditplugin.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef QIPEDITPLUGIN_H
|
||||
#define QIPEDITPLUGIN_H
|
||||
|
||||
#include <QDesignerCustomWidgetInterface>
|
||||
|
||||
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
qad_widgets/plugin/qpiconsoleplugin.cpp
Normal file
69
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");
|
||||
}
|
||||
|
||||
31
qad_widgets/plugin/qpiconsoleplugin.h
Normal file
31
qad_widgets/plugin/qpiconsoleplugin.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef QPICONSOLEPLUGIN_H
|
||||
#define QPICONSOLEPLUGIN_H
|
||||
|
||||
#include <QDesignerCustomWidgetInterface>
|
||||
|
||||
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
qad_widgets/plugin/qpointeditplugin.cpp
Normal file
69
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");
|
||||
}
|
||||
|
||||
31
qad_widgets/plugin/qpointeditplugin.h
Normal file
31
qad_widgets/plugin/qpointeditplugin.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef QPOINTEDITPLUGIN_H
|
||||
#define QPOINTEDITPLUGIN_H
|
||||
|
||||
#include <QDesignerCustomWidgetInterface>
|
||||
|
||||
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
qad_widgets/plugin/qrecteditplugin.cpp
Normal file
69
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");
|
||||
}
|
||||
|
||||
31
qad_widgets/plugin/qrecteditplugin.h
Normal file
31
qad_widgets/plugin/qrecteditplugin.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef QRECTEDITPLUGIN_H
|
||||
#define QRECTEDITPLUGIN_H
|
||||
|
||||
#include <QDesignerCustomWidgetInterface>
|
||||
|
||||
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
qad_widgets/plugin/qvarianteditplugin.cpp
Normal file
69
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");
|
||||
}
|
||||
|
||||
31
qad_widgets/plugin/qvarianteditplugin.h
Normal file
31
qad_widgets/plugin/qvarianteditplugin.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef QVARIANTEDITPLUGIN_H
|
||||
#define QVARIANTEDITPLUGIN_H
|
||||
|
||||
#include <QDesignerCustomWidgetInterface>
|
||||
|
||||
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
qad_widgets/plugin/shortcutsplugin.cpp
Normal file
69
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");
|
||||
}
|
||||
|
||||
31
qad_widgets/plugin/shortcutsplugin.h
Normal file
31
qad_widgets/plugin/shortcutsplugin.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef SHORTCUTSPLUGIN_H
|
||||
#define SHORTCUTSPLUGIN_H
|
||||
|
||||
#include <QDesignerCustomWidgetInterface>
|
||||
|
||||
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
qad_widgets/plugin/spinsliderplugin.cpp
Normal file
69
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");
|
||||
}
|
||||
|
||||
31
qad_widgets/plugin/spinsliderplugin.h
Normal file
31
qad_widgets/plugin/spinsliderplugin.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef SPINSLIDERPLUGIN_H
|
||||
#define SPINSLIDERPLUGIN_H
|
||||
|
||||
#include <QDesignerCustomWidgetInterface>
|
||||
|
||||
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