QGCParamSliderPlugin.cc 1.53 KB
Newer Older
1 2 3 4 5 6
#include "QGCParamSliderPlugin.h"
#include "QGCParamSlider.h"

#include <QtPlugin>

QGCParamSliderPlugin::QGCParamSliderPlugin(QObject *parent) :
7
    QObject(parent)
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
{
    initialized = false;
}

void QGCParamSliderPlugin::initialize(QDesignerFormEditorInterface * /* core */)
{
    if (initialized)
        return;

    initialized = true;
}

bool QGCParamSliderPlugin::isInitialized() const
{
    return initialized;
}

QWidget *QGCParamSliderPlugin::createWidget(QWidget *parent)
{
    return new QGCParamSlider(parent);
}

QString QGCParamSliderPlugin::name() const
{
    return "QGCParamSlider";
}

QString QGCParamSliderPlugin::group() const
{
    return "QGroundControl";
}

QIcon QGCParamSliderPlugin::icon() const
{
    return QIcon();
}

QString QGCParamSliderPlugin::toolTip() const
{
    return "";
}

QString QGCParamSliderPlugin::whatsThis() const
{
    return "";
}

bool QGCParamSliderPlugin::isContainer() const
{
    return false;
}

QString QGCParamSliderPlugin::domXml() const
{
    return "<ui language=\"c++\">\n"
63 64 65 66 67 68 69 70 71 72 73
           " <widget class=\"QGCParamSlider\" name=\"paramSlider\">\n"
           "  <property name=\"geometry\">\n"
           "   <rect>\n"
           "    <x>0</x>\n"
           "    <y>0</y>\n"
           "    <width>150</width>\n"
           "    <height>16</height>\n"
           "   </rect>\n"
           "  </property>\n"
           " </widget>\n"
           "</ui>";
74 75 76 77 78 79 80 81
}

QString QGCParamSliderPlugin::includeFile() const
{
    return "QGCParamSlider.h";
}

Q_EXPORT_PLUGIN2(qgcparamsliderplugin, QGCParamSliderPlugin)