work with icons - remove unused, organize and update to last oxygen add BusyIcon widget
68 lines
1.5 KiB
C++
68 lines
1.5 KiB
C++
#include "touchsliderplugin.h"
|
|
|
|
#include "touchslider.h"
|
|
|
|
#include <QDesignerFormEditorInterface>
|
|
#include <QDesignerPropertyEditorInterface>
|
|
#include <QtCore/QtPlugin>
|
|
|
|
|
|
TouchSliderPlugin::TouchSliderPlugin(QObject * parent): QObject(parent) {
|
|
m_initialized = false;
|
|
}
|
|
|
|
void TouchSliderPlugin::initialize(QDesignerFormEditorInterface * /* core */) {
|
|
if (m_initialized) return;
|
|
|
|
// Add extension registrations, etc. here
|
|
|
|
m_initialized = true;
|
|
}
|
|
|
|
bool TouchSliderPlugin::isInitialized() const {
|
|
return m_initialized;
|
|
}
|
|
|
|
QWidget * TouchSliderPlugin::createWidget(QWidget * parent) {
|
|
TouchSlider * ts = new TouchSlider(parent);
|
|
ts->setMinimum(-5.);
|
|
ts->setMaximum(5.);
|
|
ts->setPrecision(0.2);
|
|
ts->setValue(2.2);
|
|
ts->setPrefix("Distanse");
|
|
ts->setSuffix("meters");
|
|
return ts;
|
|
}
|
|
|
|
QString TouchSliderPlugin::name() const {
|
|
return QLatin1String("TouchSlider");
|
|
}
|
|
|
|
QString TouchSliderPlugin::group() const {
|
|
return QLatin1String("Touch Widgets");
|
|
}
|
|
|
|
QIcon TouchSliderPlugin::icon() const {
|
|
return QIcon(":/icons/widgets/touchslider.png");
|
|
}
|
|
|
|
QString TouchSliderPlugin::toolTip() const {
|
|
return QLatin1String("");
|
|
}
|
|
|
|
QString TouchSliderPlugin::whatsThis() const {
|
|
return QLatin1String("");
|
|
}
|
|
|
|
bool TouchSliderPlugin::isContainer() const {
|
|
return false;
|
|
}
|
|
|
|
QString TouchSliderPlugin::domXml() const {
|
|
return QLatin1String("<widget class=\"TouchSlider\" name=\"touchSlider\">\n</widget>\n");
|
|
}
|
|
|
|
QString TouchSliderPlugin::includeFile() const {
|
|
return QLatin1String("touchslider.h");
|
|
}
|