RangeSlider
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include "evalspinboxplugin.h"
|
||||
#include "imageviewplugin.h"
|
||||
#include "scroll_spin_boxplugin.h"
|
||||
#include "rangesliderplugin.h"
|
||||
|
||||
|
||||
QADWidgets::QADWidgets(QObject * parent): QObject(parent) {
|
||||
@@ -36,6 +37,7 @@ QADWidgets::QADWidgets(QObject * parent): QObject(parent) {
|
||||
m_widgets.append(new EvalSpinBoxPlugin(this));
|
||||
m_widgets.append(new ImageViewPlugin(this));
|
||||
m_widgets.append(new ScrollSpinBoxPlugin(this));
|
||||
m_widgets.append(new RangeSliderPlugin(this));
|
||||
}
|
||||
|
||||
|
||||
|
||||
69
libs/widgets/plugin/rangesliderplugin.cpp
Normal file
69
libs/widgets/plugin/rangesliderplugin.cpp
Normal file
@@ -0,0 +1,69 @@
|
||||
#include "rangeslider.h"
|
||||
#include "rangesliderplugin.h"
|
||||
#include <QtCore/QtPlugin>
|
||||
|
||||
|
||||
RangeSliderPlugin::RangeSliderPlugin(QObject * parent): QObject(parent) {
|
||||
m_initialized = false;
|
||||
}
|
||||
|
||||
|
||||
void RangeSliderPlugin::initialize(QDesignerFormEditorInterface * /* core */) {
|
||||
if (m_initialized)
|
||||
return;
|
||||
|
||||
// Add extension registrations, etc. here
|
||||
|
||||
m_initialized = true;
|
||||
}
|
||||
|
||||
|
||||
bool RangeSliderPlugin::isInitialized() const {
|
||||
return m_initialized;
|
||||
}
|
||||
|
||||
|
||||
QWidget * RangeSliderPlugin::createWidget(QWidget * parent) {
|
||||
return new RangeSlider(parent);
|
||||
}
|
||||
|
||||
|
||||
QString RangeSliderPlugin::name() const {
|
||||
return QLatin1String("RangeSlider");
|
||||
}
|
||||
|
||||
|
||||
QString RangeSliderPlugin::group() const {
|
||||
return QLatin1String("Input Widgets");
|
||||
}
|
||||
|
||||
|
||||
QIcon RangeSliderPlugin::icon() const {
|
||||
return QIcon();
|
||||
}
|
||||
|
||||
|
||||
QString RangeSliderPlugin::toolTip() const {
|
||||
return QLatin1String("Range Slider");
|
||||
}
|
||||
|
||||
|
||||
QString RangeSliderPlugin::whatsThis() const {
|
||||
return QLatin1String("Range Slider");
|
||||
}
|
||||
|
||||
|
||||
bool RangeSliderPlugin::isContainer() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
QString RangeSliderPlugin::domXml() const {
|
||||
return QLatin1String("<widget class=\"RangeSlider\" name=\"rangeSlider\">\n</widget>\n");
|
||||
}
|
||||
|
||||
|
||||
QString RangeSliderPlugin::includeFile() const {
|
||||
return QLatin1String("rangeslider.h");
|
||||
}
|
||||
|
||||
36
libs/widgets/plugin/rangesliderplugin.h
Normal file
36
libs/widgets/plugin/rangesliderplugin.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#ifndef RANGESLIDERPLUGIN_H
|
||||
#define RANGESLIDERPLUGIN_H
|
||||
|
||||
#include <QObject>
|
||||
#if QT_VERSION >= 0x050000
|
||||
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#else
|
||||
# include <QDesignerCustomWidgetInterface>
|
||||
#endif
|
||||
|
||||
class RangeSliderPlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
||||
|
||||
public:
|
||||
RangeSliderPlugin(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 // RANGESLIDERPLUGIN_H
|
||||
Reference in New Issue
Block a user