1202 lines
33 KiB
C++
Executable File
1202 lines
33 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* Das Designer-Plugin für nglwidgets
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
*/
|
|
|
|
#include <QtCore/QObject>
|
|
#include <qplugin.h>
|
|
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
|
|
|
#include <LtsCoordTrans/lts_coord_widget.h>
|
|
#include <LtsDataView/lts_data_view.h>
|
|
#include <LtsFileDialog/lts_file_dialog_widget.h>
|
|
#include <LtsReportDisplay/lts_report_display_widget.h>
|
|
#include "lts_dialog_button_box.h"
|
|
#include "lts_elided_label.h"
|
|
#include "lts_image_editor.h"
|
|
#include "lts_picture_view.h"
|
|
#include "lts_profile_button.h"
|
|
#include "lts_splitter.h"
|
|
#include "lts_tab_bar.h"
|
|
#include "lts_tab_widget.h"
|
|
#include "lts_tool_bar.h"
|
|
#include "lts_tool_bar_area.h"
|
|
#include "lts_tool_box.h"
|
|
#include "lts_frameless_dialog.h"
|
|
#include "lts_drag_icon.h"
|
|
#include "lts_combo_box.h"
|
|
#include "lts_spinbox.h"
|
|
#include "lts_multi_range_spinbox.h"
|
|
#include "lts_range_slider.h"
|
|
#include "lts_msec_date_time_edit.h"
|
|
#include "lts_bitfield_widget.h"
|
|
#include "lts_tab_sequence_widget.h"
|
|
|
|
#ifdef TABLET_MODE
|
|
#include "lts_date_time_edit_touch.h"
|
|
#else
|
|
#include "lts_date_time_edit.h"
|
|
#endif
|
|
|
|
#include "lts_led_widget.h"
|
|
#include "lts_base.h"
|
|
#include "LtsImageCropper/lts_image_cropper.h"
|
|
|
|
namespace LtsWidgets
|
|
{
|
|
|
|
class LtsDesignerCustomWidgetInterface : public QObject, public QDesignerCustomWidgetInterface
|
|
{
|
|
Q_OBJECT
|
|
|
|
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
|
public:
|
|
using QObject::QObject;
|
|
|
|
bool isContainer() const override final
|
|
{
|
|
return false;
|
|
}
|
|
bool isInitialized() const override final
|
|
{
|
|
return mInitialized;
|
|
}
|
|
QIcon icon() const override final
|
|
{
|
|
return QIcon(QStringLiteral(":style/icons/22x22/pushbutton.png")); // some dummy icon...
|
|
}
|
|
QString codeTemplate() const override final
|
|
{
|
|
return QString();
|
|
}
|
|
QString group() const override final
|
|
{
|
|
return QLatin1String("Lts Widgets");
|
|
}
|
|
void initialize(QDesignerFormEditorInterface *) override final
|
|
{
|
|
mInitialized = true;
|
|
}
|
|
|
|
private:
|
|
bool mInitialized = false;
|
|
};
|
|
|
|
class LtsCoordWidgetPlugin final : public LtsDesignerCustomWidgetInterface
|
|
{
|
|
Q_OBJECT
|
|
|
|
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
|
public:
|
|
using LtsDesignerCustomWidgetInterface::LtsDesignerCustomWidgetInterface;
|
|
|
|
QString includeFile() const override
|
|
{
|
|
return QLatin1String("LtsCoordTrans/lts_coord_widget.h");
|
|
}
|
|
QString name() const override
|
|
{
|
|
return QLatin1String("LtsCoordWidget::LtsCoordWidget");
|
|
}
|
|
QString toolTip() const override
|
|
{
|
|
return QLatin1String("Widget for entering a coordinate");
|
|
}
|
|
QString whatsThis() const override
|
|
{
|
|
return QLatin1String("Widget for entering a coordinate");
|
|
}
|
|
QString domXml() const override
|
|
{
|
|
return QStringLiteral("<widget class=\"LtsCoordWidget::LtsCoordWidget\" name=\"positionEdit\"/>");
|
|
}
|
|
QWidget *createWidget(QWidget *parent) override
|
|
{
|
|
return new LtsCoordWidget::LtsCoordWidget(parent);
|
|
}
|
|
};
|
|
|
|
|
|
class LtsDialogButtonBoxPlugin final : public LtsDesignerCustomWidgetInterface
|
|
{
|
|
Q_OBJECT
|
|
|
|
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
|
public:
|
|
using LtsDesignerCustomWidgetInterface::LtsDesignerCustomWidgetInterface;
|
|
|
|
QString includeFile() const override
|
|
{
|
|
return QLatin1String("LtsWidgets/lts_dialog_button_box.h");
|
|
}
|
|
QString name() const override
|
|
{
|
|
return QLatin1String("LtsWidgets::LtsDialogButtonBox");
|
|
}
|
|
QString toolTip() const override
|
|
{
|
|
return QLatin1String("Widget for a LTS version of the Button Box");
|
|
}
|
|
QString whatsThis() const override
|
|
{
|
|
return QLatin1String("Widget for a LTS version of the Botton Box");
|
|
}
|
|
QString domXml() const override
|
|
{
|
|
return QStringLiteral("<widget class=\"LtsWidgets::LtsDialogButtonBox\" name=\"ltsDialogButtonBox\"/>");
|
|
}
|
|
QWidget *createWidget(QWidget *parent) override
|
|
{
|
|
return new LtsWidgets::LtsDialogButtonBox(parent);
|
|
}
|
|
};
|
|
|
|
class LtsElidedLabelPlugin final : public LtsDesignerCustomWidgetInterface
|
|
{
|
|
Q_OBJECT
|
|
|
|
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
|
public:
|
|
using LtsDesignerCustomWidgetInterface::LtsDesignerCustomWidgetInterface;
|
|
|
|
QString includeFile() const override
|
|
{
|
|
return QStringLiteral("LtsWidgets/lts_elided_label.h");
|
|
}
|
|
QString name() const override
|
|
{
|
|
return QStringLiteral("LtsWidgets::LtsElidedLabel");
|
|
}
|
|
QString toolTip() const override
|
|
{
|
|
return QStringLiteral("A QLabel which automatically elided it's content if needed.");
|
|
}
|
|
QString whatsThis() const override
|
|
{
|
|
return toolTip();
|
|
}
|
|
QString domXml() const override
|
|
{
|
|
return QStringLiteral("<widget class=\"LtsWidgets::LtsElidedLabel\" name=\"ltsElidedLabel\"/>");
|
|
}
|
|
QWidget *createWidget(QWidget *parent) override
|
|
{
|
|
return new LtsWidgets::LtsElidedLabel(parent);
|
|
}
|
|
};
|
|
|
|
class LtsImageEditorPlugin final : public LtsDesignerCustomWidgetInterface
|
|
{
|
|
Q_OBJECT
|
|
|
|
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
|
public:
|
|
using LtsDesignerCustomWidgetInterface::LtsDesignerCustomWidgetInterface;
|
|
|
|
QString includeFile() const override
|
|
{
|
|
return QLatin1String("LtsWidgets/lts_image_editor.h");
|
|
}
|
|
QString name() const override
|
|
{
|
|
return QLatin1String("LtsWidgets::LtsImageEditor");
|
|
}
|
|
QString toolTip() const override
|
|
{
|
|
return QLatin1String("Image Editor");
|
|
}
|
|
QString whatsThis() const override
|
|
{
|
|
return QLatin1String("ImageEditor");
|
|
}
|
|
QString domXml() const override
|
|
{
|
|
return QStringLiteral("<widget class=\"LtsWidgets::LtsImageEditor\" name=\"ltsImageEditor\"/>");
|
|
}
|
|
QWidget *createWidget(QWidget *parent) override
|
|
{
|
|
return new LtsWidgets::LtsImageEditor(parent);
|
|
}
|
|
};
|
|
|
|
|
|
class LtsPictureViewPlugin final : public LtsDesignerCustomWidgetInterface
|
|
{
|
|
Q_OBJECT
|
|
|
|
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
|
public:
|
|
using LtsDesignerCustomWidgetInterface::LtsDesignerCustomWidgetInterface;
|
|
|
|
QString includeFile() const override
|
|
{
|
|
return QLatin1String("LtsWidgets/lts_picture_view.h");
|
|
}
|
|
QString name() const override
|
|
{
|
|
return QLatin1String("LtsWidgets::LtsPictureView");
|
|
}
|
|
QString toolTip() const override
|
|
{
|
|
return QLatin1String("Picture View Widget");
|
|
}
|
|
QString whatsThis() const override
|
|
{
|
|
return QLatin1String("Picture View Widget");
|
|
}
|
|
QString domXml() const override
|
|
{
|
|
return QStringLiteral("<widget class=\"LtsWidgets::LtsPictureView\" name=\"ltsPictureView\"/>");
|
|
}
|
|
QWidget *createWidget(QWidget *parent) override
|
|
{
|
|
return new LtsWidgets::LtsPictureView(parent);
|
|
}
|
|
};
|
|
|
|
|
|
class LtsProfileButtonPlugin final : public LtsDesignerCustomWidgetInterface
|
|
{
|
|
Q_OBJECT
|
|
|
|
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
|
public:
|
|
using LtsDesignerCustomWidgetInterface::LtsDesignerCustomWidgetInterface;
|
|
|
|
QString includeFile() const override
|
|
{
|
|
return QLatin1String("LtsWidgets/lts_profile_button.h");
|
|
}
|
|
QString name() const override
|
|
{
|
|
return QLatin1String("LtsWidgets::LtsProfileButton");
|
|
}
|
|
QString toolTip() const override
|
|
{
|
|
return QLatin1String("Profile Button");
|
|
}
|
|
QString whatsThis() const override
|
|
{
|
|
return QLatin1String("Profile Button");
|
|
}
|
|
QString domXml() const override
|
|
{
|
|
return QStringLiteral("<widget class=\"LtsWidgets::LtsProfileButton\" name=\"ltsProfileButton\"/>");
|
|
}
|
|
QWidget *createWidget(QWidget *parent) override
|
|
{
|
|
return new LtsWidgets::LtsProfileButton(parent);
|
|
}
|
|
};
|
|
|
|
|
|
class LtsSplitterPlugin final : public LtsDesignerCustomWidgetInterface
|
|
{
|
|
Q_OBJECT
|
|
|
|
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
|
public:
|
|
using LtsDesignerCustomWidgetInterface::LtsDesignerCustomWidgetInterface;
|
|
|
|
QString includeFile() const override
|
|
{
|
|
return QLatin1String("LtsWidgets/lts_splitter.h");
|
|
}
|
|
QString name() const override
|
|
{
|
|
return QLatin1String("LtsWidgets::LtsSplitter");
|
|
}
|
|
QString toolTip() const override
|
|
{
|
|
return QLatin1String("Splitter with sizes property");
|
|
}
|
|
QString whatsThis() const override
|
|
{
|
|
return QLatin1String("Splitter with sizes property");
|
|
}
|
|
QString domXml() const override
|
|
{
|
|
return QStringLiteral("<widget class=\"LtsWidgets::LtsSplitter\" name=\"ltsSplitter\"/>");
|
|
}
|
|
QWidget *createWidget(QWidget *parent) override
|
|
{
|
|
return new LtsWidgets::LtsSplitter(parent);
|
|
}
|
|
};
|
|
|
|
|
|
class LtsTabBarPlugin final : public LtsDesignerCustomWidgetInterface
|
|
{
|
|
Q_OBJECT
|
|
|
|
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
|
public:
|
|
using LtsDesignerCustomWidgetInterface::LtsDesignerCustomWidgetInterface;
|
|
|
|
QString includeFile() const override
|
|
{
|
|
return QLatin1String("LtsWidgets/lts_tab_bar.h");
|
|
}
|
|
QString name() const override
|
|
{
|
|
return QLatin1String("LtsWidgets::LtsTabBar");
|
|
}
|
|
QString toolTip() const override
|
|
{
|
|
return QLatin1String("Tab Bar");
|
|
}
|
|
QString whatsThis() const override
|
|
{
|
|
return QLatin1String("Tab Bar");
|
|
}
|
|
QString domXml() const override
|
|
{
|
|
return QStringLiteral("<widget class=\"LtsWidgets::LtsTabBar\" name=\"ltsTabBar\"/>");
|
|
}
|
|
QWidget *createWidget(QWidget *parent) override
|
|
{
|
|
return new LtsWidgets::LtsTabBar(parent);
|
|
}
|
|
};
|
|
|
|
|
|
class LtsTabWidgetPlugin final : public LtsDesignerCustomWidgetInterface
|
|
{
|
|
Q_OBJECT
|
|
|
|
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
|
public:
|
|
using LtsDesignerCustomWidgetInterface::LtsDesignerCustomWidgetInterface;
|
|
|
|
QString includeFile() const override
|
|
{
|
|
return QLatin1String("LtsWidgets/lts_tab_widget.h");
|
|
}
|
|
QString name() const override
|
|
{
|
|
return QLatin1String("LtsWidgets::LtsTabWidget");
|
|
}
|
|
QString toolTip() const override
|
|
{
|
|
return QLatin1String("Tab Widget");
|
|
}
|
|
QString whatsThis() const override
|
|
{
|
|
return QLatin1String("Tab Widget");
|
|
}
|
|
QString domXml() const override
|
|
{
|
|
return QStringLiteral("<widget class=\"LtsWidgets::LtsTabWidget\" name=\"ltsTabWidget\"/>");
|
|
}
|
|
QWidget *createWidget(QWidget *parent) override
|
|
{
|
|
return new LtsWidgets::LtsTabWidget(parent);
|
|
}
|
|
};
|
|
|
|
|
|
class LtsToolBarPlugin final : public LtsDesignerCustomWidgetInterface
|
|
{
|
|
Q_OBJECT
|
|
|
|
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
|
public:
|
|
using LtsDesignerCustomWidgetInterface::LtsDesignerCustomWidgetInterface;
|
|
|
|
QString includeFile() const override
|
|
{
|
|
return QLatin1String("LtsWidgets/lts_tool_bar.h");
|
|
}
|
|
QString name() const override
|
|
{
|
|
return QLatin1String("LtsWidgets::LtsToolBar");
|
|
}
|
|
QString toolTip() const override
|
|
{
|
|
return QLatin1String("Tool Bar");
|
|
}
|
|
QString whatsThis() const override
|
|
{
|
|
return QLatin1String("Tool Bar");
|
|
}
|
|
QString domXml() const override
|
|
{
|
|
return QStringLiteral("<widget class=\"LtsWidgets::LtsToolBar\" name=\"ltsToolBar\"/>");
|
|
}
|
|
QWidget *createWidget(QWidget *parent) override
|
|
{
|
|
return new LtsWidgets::LtsToolBar(parent);
|
|
}
|
|
};
|
|
|
|
|
|
class LtsToolBarAreaPlugin final : public LtsDesignerCustomWidgetInterface
|
|
{
|
|
Q_OBJECT
|
|
|
|
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
|
public:
|
|
using LtsDesignerCustomWidgetInterface::LtsDesignerCustomWidgetInterface;
|
|
|
|
QString includeFile() const override
|
|
{
|
|
return QLatin1String("LtsWidgets/lts_tool_bar_area.h");
|
|
}
|
|
QString name() const override
|
|
{
|
|
return QLatin1String("LtsWidgets::LtsToolBarArea");
|
|
}
|
|
QString toolTip() const override
|
|
{
|
|
return QLatin1String("Tool Bar Area");
|
|
}
|
|
QString whatsThis() const override
|
|
{
|
|
return QLatin1String("Tool Bar Area");
|
|
}
|
|
QString domXml() const override
|
|
{
|
|
return QStringLiteral("<widget class=\"LtsWidgets::LtsToolBarArea\" name=\"ltsToolBarArea\"/>");
|
|
}
|
|
QWidget *createWidget(QWidget *parent) override
|
|
{
|
|
return new LtsWidgets::LtsToolBarArea(parent);
|
|
}
|
|
};
|
|
|
|
|
|
class LtsToolBoxPlugin final : public LtsDesignerCustomWidgetInterface
|
|
{
|
|
Q_OBJECT
|
|
|
|
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
|
public:
|
|
using LtsDesignerCustomWidgetInterface::LtsDesignerCustomWidgetInterface;
|
|
|
|
QString includeFile() const override
|
|
{
|
|
return QLatin1String("LtsWidgets/lts_tool_box.h");
|
|
}
|
|
QString name() const override
|
|
{
|
|
return QLatin1String("LtsWidgets::LtsToolBox");
|
|
}
|
|
QString toolTip() const override
|
|
{
|
|
return QLatin1String("Tool Box");
|
|
}
|
|
QString whatsThis() const override
|
|
{
|
|
return QLatin1String("Tool Box");
|
|
}
|
|
QString domXml() const override
|
|
{
|
|
return QStringLiteral("<widget class=\"LtsWidgets::LtsToolBox\" name=\"ltsToolBox\"/>");
|
|
}
|
|
QWidget *createWidget(QWidget *parent) override
|
|
{
|
|
return new LtsWidgets::LtsToolBox(parent);
|
|
}
|
|
};
|
|
|
|
|
|
class LtsDataViewPlugin final : public LtsDesignerCustomWidgetInterface
|
|
{
|
|
Q_OBJECT
|
|
|
|
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
|
public:
|
|
using LtsDesignerCustomWidgetInterface::LtsDesignerCustomWidgetInterface;
|
|
|
|
QString includeFile() const override
|
|
{
|
|
return QLatin1String("LtsDataView/lts_data_view.h");
|
|
}
|
|
QString name() const override
|
|
{
|
|
return QLatin1String("LtsDataView::LtsDataView");
|
|
}
|
|
QString toolTip() const override
|
|
{
|
|
return QLatin1String("DataView");
|
|
}
|
|
QString whatsThis() const override
|
|
{
|
|
return QLatin1String("DataView");
|
|
}
|
|
QString domXml() const override
|
|
{
|
|
return QStringLiteral("<widget class=\"LtsDataView::LtsDataView\" name=\"ltsDataView\"/>");
|
|
}
|
|
QWidget *createWidget(QWidget *parent) override
|
|
{
|
|
return new LtsDataView::LtsDataView(parent);
|
|
}
|
|
};
|
|
|
|
|
|
class LtsFramelessDialogPlugin final : public LtsDesignerCustomWidgetInterface
|
|
{
|
|
Q_OBJECT
|
|
|
|
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
|
public:
|
|
using LtsDesignerCustomWidgetInterface::LtsDesignerCustomWidgetInterface;
|
|
|
|
QString includeFile() const override
|
|
{
|
|
return QLatin1String("LtsWidgets/lts_frameless_dialog.h");
|
|
}
|
|
QString name() const override
|
|
{
|
|
return QLatin1String("LtsWidgets::LtsFramelessDialog");
|
|
}
|
|
QString toolTip() const override
|
|
{
|
|
return QLatin1String("Enhanced QDialog");
|
|
}
|
|
QString whatsThis() const override
|
|
{
|
|
return QLatin1String("Dialog Widget");
|
|
}
|
|
QString domXml() const override
|
|
{
|
|
return QLatin1String("\
|
|
<widget class=\"LtsWidgets::LtsFramelessDialog\" name=\"ltsFramelessDialog\">\
|
|
<property name=\"geometry\" >\
|
|
<rect>\
|
|
<x>0</x>\
|
|
<y>0</y>\
|
|
<width>500</width>\
|
|
<height>200</height>\
|
|
</rect>\
|
|
</property>\
|
|
</widget>\
|
|
");
|
|
}
|
|
QWidget *createWidget(QWidget *parent) override
|
|
{
|
|
return new LtsWidgets::LtsFramelessDialog(parent);
|
|
}
|
|
};
|
|
|
|
|
|
class LtsDragIconPlugin final : public LtsDesignerCustomWidgetInterface
|
|
{
|
|
Q_OBJECT
|
|
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
|
public:
|
|
using LtsDesignerCustomWidgetInterface::LtsDesignerCustomWidgetInterface;
|
|
|
|
QString includeFile() const override
|
|
{
|
|
return QLatin1String("LtsWidgets/lts_drag_icon.h");
|
|
}
|
|
QString name() const override
|
|
{
|
|
return QLatin1String("LtsWidgets::LtsDragIcon");
|
|
}
|
|
QString toolTip() const override
|
|
{
|
|
return QLatin1String("Class for standard buttons with icons");
|
|
}
|
|
QString whatsThis() const override
|
|
{
|
|
return QLatin1String("Button Widget");
|
|
}
|
|
QString domXml() const override
|
|
{
|
|
return QLatin1String("\
|
|
<widget class=\"LtsWidgets::LtsDragIcon\" name=\"ltsDragIcon\">\
|
|
</widget>\
|
|
");
|
|
}
|
|
QWidget *createWidget(QWidget *parent) override
|
|
{
|
|
LtsWidgets::LtsDragIcon *b = new LtsWidgets::LtsDragIcon(parent);
|
|
return b;
|
|
}
|
|
};
|
|
|
|
|
|
class LtsComboBoxPlugin final : public LtsDesignerCustomWidgetInterface
|
|
{
|
|
Q_OBJECT
|
|
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
|
public:
|
|
using LtsDesignerCustomWidgetInterface::LtsDesignerCustomWidgetInterface;
|
|
|
|
QString includeFile() const override
|
|
{
|
|
return QLatin1String("LtsWidgets/lts_combo_box.h");
|
|
}
|
|
QString name() const override
|
|
{
|
|
return QLatin1String("LtsWidgets::LtsComboBox");
|
|
}
|
|
QString toolTip() const override
|
|
{
|
|
return QLatin1String("Class for standard ComBoBoxes");
|
|
}
|
|
QString whatsThis() const override
|
|
{
|
|
return QLatin1String("ComboBox Widget");
|
|
}
|
|
QString domXml() const override
|
|
{
|
|
return QLatin1String("\
|
|
<widget class=\"LtsWidgets::LtsComboBox\" name=\"ltsComboBox\">\
|
|
</widget>\
|
|
");
|
|
}
|
|
QWidget *createWidget(QWidget *parent) override
|
|
{
|
|
LtsWidgets::LtsComboBox *b = new LtsWidgets::LtsComboBox(parent);
|
|
return b;
|
|
}
|
|
};
|
|
|
|
|
|
class LtsSpinBoxPlugin final : public LtsDesignerCustomWidgetInterface
|
|
{
|
|
Q_OBJECT
|
|
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
|
public:
|
|
using LtsDesignerCustomWidgetInterface::LtsDesignerCustomWidgetInterface;
|
|
|
|
QString includeFile() const override
|
|
{
|
|
return QLatin1String("LtsWidgets/lts_spinbox.h");
|
|
}
|
|
QString name() const override
|
|
{
|
|
return QLatin1String("LtsWidgets::LtsSpinBox");
|
|
}
|
|
QString toolTip() const override
|
|
{
|
|
return QLatin1String("Class for standard SpinBoxes");
|
|
}
|
|
QString whatsThis() const override
|
|
{
|
|
return QLatin1String("SpinBox Widget");
|
|
}
|
|
QString domXml() const override
|
|
{
|
|
return QLatin1String("\
|
|
<widget class=\"LtsWidgets::LtsSpinBox\" name=\"ltsSpinBox\">\
|
|
</widget>\
|
|
");
|
|
}
|
|
QWidget *createWidget(QWidget *parent) override
|
|
{
|
|
LtsWidgets::LtsSpinBox *b = new LtsWidgets::LtsSpinBox(parent);
|
|
return b;
|
|
}
|
|
};
|
|
|
|
class LtsMultiRangeSpinBoxPlugin final : public LtsDesignerCustomWidgetInterface
|
|
{
|
|
Q_OBJECT
|
|
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
|
public:
|
|
using LtsDesignerCustomWidgetInterface::LtsDesignerCustomWidgetInterface;
|
|
|
|
QString includeFile() const override
|
|
{
|
|
return QLatin1String("LtsWidgets/lts_multi_range_spinbox.h");
|
|
}
|
|
QString name() const override
|
|
{
|
|
return QLatin1String("LtsWidgets::LtsMultiRangeSpinBox");
|
|
}
|
|
QString toolTip() const override
|
|
{
|
|
return QLatin1String("Class for standard SpinBoxes with multiple ranges");
|
|
}
|
|
QString whatsThis() const override
|
|
{
|
|
return QLatin1String("SpinBox Widget");
|
|
}
|
|
QString domXml() const override
|
|
{
|
|
return QLatin1String("\
|
|
<widget class=\"LtsWidgets::LtsMultiRangeSpinBox\" name=\"ltsMultiRangeSpinBox\">\
|
|
</widget>\
|
|
");
|
|
}
|
|
QWidget *createWidget(QWidget *parent) override
|
|
{
|
|
LtsWidgets::LtsMultiRangeSpinBox *b = new LtsWidgets::LtsMultiRangeSpinBox(parent);
|
|
return b;
|
|
}
|
|
};
|
|
|
|
|
|
|
|
class LtsDoubleSpinBoxPlugin final : public LtsDesignerCustomWidgetInterface
|
|
{
|
|
Q_OBJECT
|
|
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
|
public:
|
|
using LtsDesignerCustomWidgetInterface::LtsDesignerCustomWidgetInterface;
|
|
|
|
QString includeFile() const override
|
|
{
|
|
return QLatin1String("LtsWidgets/lts_spinbox.h");
|
|
}
|
|
QString name() const override
|
|
{
|
|
return QLatin1String("LtsWidgets::LtsDoubleSpinBox");
|
|
}
|
|
QString toolTip() const override
|
|
{
|
|
return QLatin1String("Class for standard DoubleSpinBoxes");
|
|
}
|
|
QString whatsThis() const override
|
|
{
|
|
return QLatin1String("DoubleSpinBox Widget");
|
|
}
|
|
QString domXml() const override
|
|
{
|
|
return QLatin1String("\
|
|
<widget class=\"LtsWidgets::LtsDoubleSpinBox\" name=\"ltsDoubleSpinBox\">\
|
|
</widget>\
|
|
");
|
|
}
|
|
QWidget *createWidget(QWidget *parent) override
|
|
{
|
|
LtsWidgets::LtsDoubleSpinBox *b = new LtsWidgets::LtsDoubleSpinBox(parent);
|
|
return b;
|
|
}
|
|
};
|
|
|
|
|
|
class LtsDateTimeEditPlugin final : public LtsDesignerCustomWidgetInterface
|
|
{
|
|
Q_OBJECT
|
|
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
|
public:
|
|
using LtsDesignerCustomWidgetInterface::LtsDesignerCustomWidgetInterface;
|
|
|
|
QString includeFile() const override
|
|
{
|
|
return QLatin1String("LtsWidgets/lts_date_time_edit.h");
|
|
}
|
|
QString name() const override
|
|
{
|
|
return QLatin1String("LtsWidgets::LtsDateTimeEdit");
|
|
}
|
|
QString toolTip() const override
|
|
{
|
|
return QLatin1String("Class for LTS Date Time Edit");
|
|
}
|
|
QString whatsThis() const override
|
|
{
|
|
return QLatin1String("LtsDateTimeEdit Widget");
|
|
}
|
|
QString domXml() const override
|
|
{
|
|
return QLatin1String("<widget class=\"LtsWidgets::LtsDateTimeEdit\" name=\"ltsDateTimeEdit\">\n"
|
|
" <property name=\"sizePolicy\">\n"
|
|
" <sizepolicy hsizetype=\"Maximum\" vsizetype=\"Preferred\">\n"
|
|
" <horstretch>0</horstretch>\n"
|
|
" <verstretch>0</verstretch>\n"
|
|
" </sizepolicy>\n"
|
|
" </property>\n"
|
|
"</widget>");
|
|
}
|
|
QWidget *createWidget(QWidget *parent) override
|
|
{
|
|
LtsWidgets::LtsDateTimeEdit *b = new LtsWidgets::LtsDateTimeEdit(parent);
|
|
return b;
|
|
}
|
|
};
|
|
|
|
class LtsFileDialogWidgetPlugin final : public LtsDesignerCustomWidgetInterface
|
|
{
|
|
Q_OBJECT
|
|
|
|
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
|
public:
|
|
using LtsDesignerCustomWidgetInterface::LtsDesignerCustomWidgetInterface;
|
|
|
|
QString includeFile() const override
|
|
{
|
|
return QLatin1String("LtsFileDialog/lts_file_dialog.h");
|
|
}
|
|
QString name() const override
|
|
{
|
|
return QLatin1String("LtsWidgets::LtsFileDialogWidget");
|
|
}
|
|
QString toolTip() const override
|
|
{
|
|
return QLatin1String("File Dialog Widget");
|
|
}
|
|
QString whatsThis() const override
|
|
{
|
|
return QLatin1String("FileDialogWidget");
|
|
}
|
|
QString domXml() const override
|
|
{
|
|
return QStringLiteral("<widget class=\"LtsWidgets::LtsFileDialogWidget\" name=\"ltsFileDialogWidget\"/>");
|
|
}
|
|
QWidget *createWidget(QWidget *parent) override
|
|
{
|
|
return new LtsWidgets::LtsFileDialogWidget(parent);
|
|
}
|
|
};
|
|
|
|
class LtsFileDialogPlugin final : public LtsDesignerCustomWidgetInterface
|
|
{
|
|
Q_OBJECT
|
|
|
|
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
|
public:
|
|
using LtsDesignerCustomWidgetInterface::LtsDesignerCustomWidgetInterface;
|
|
|
|
QString includeFile() const override
|
|
{
|
|
return QLatin1String("LtsFileDialog/lts_file_dialog.h");
|
|
}
|
|
QString name() const override
|
|
{
|
|
return QLatin1String("LtsWidgets::LtsFileDialog");
|
|
}
|
|
QString toolTip() const override
|
|
{
|
|
return QLatin1String("File Dialog Widget");
|
|
}
|
|
QString whatsThis() const override
|
|
{
|
|
return QLatin1String("FileDialog");
|
|
}
|
|
QString domXml() const override
|
|
{
|
|
return QStringLiteral("<widget class=\"LtsWidgets::LtsFileDialog\" name=\"ltsFileDialog\"/>");
|
|
}
|
|
QWidget *createWidget(QWidget *parent) override
|
|
{
|
|
return new LtsWidgets::LtsFileDialog(parent);
|
|
}
|
|
};
|
|
|
|
class LtsReportDisplayWidgetPlugin final : public LtsDesignerCustomWidgetInterface
|
|
{
|
|
Q_OBJECT
|
|
|
|
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
|
public:
|
|
using LtsDesignerCustomWidgetInterface::LtsDesignerCustomWidgetInterface;
|
|
|
|
QString includeFile() const override
|
|
{
|
|
return QLatin1String("LtsReportDisplay/lts_report_display_widget.h");
|
|
}
|
|
QString name() const override
|
|
{
|
|
return QLatin1String("LtsWidgets::LtsReportDisplayWidget");
|
|
}
|
|
QString toolTip() const override
|
|
{
|
|
return QLatin1String("Report Display Widget");
|
|
}
|
|
QString whatsThis() const override
|
|
{
|
|
return QLatin1String("ReportDisplayWidget");
|
|
}
|
|
QString domXml() const override
|
|
{
|
|
return QStringLiteral("<widget class=\"LtsWidgets::LtsReportDisplayWidget\" name=\"ltsReportDisplayWidget\"/>");
|
|
}
|
|
QWidget *createWidget(QWidget *parent) override
|
|
{
|
|
return new LtsWidgets::LtsReportDisplayWidget(parent);
|
|
}
|
|
};
|
|
|
|
class LtsLedWidgetPlugin final : public LtsDesignerCustomWidgetInterface
|
|
{
|
|
Q_OBJECT
|
|
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
|
public:
|
|
using LtsDesignerCustomWidgetInterface::LtsDesignerCustomWidgetInterface;
|
|
|
|
QString includeFile() const override
|
|
{
|
|
return QLatin1String("LtsWidgets/lts_led_widget.h");
|
|
}
|
|
QString name() const override
|
|
{
|
|
return QLatin1String("LtsWidgets::LtsLedWidget");
|
|
}
|
|
QString toolTip() const override
|
|
{
|
|
return QLatin1String("Class for an LED Widget");
|
|
}
|
|
QString whatsThis() const override
|
|
{
|
|
return QLatin1String("LED Widget");
|
|
}
|
|
QString domXml() const override
|
|
{
|
|
return QLatin1String("\
|
|
<widget class=\"LtsWidgets::LtsLedWidget\" name=\"ltsLedWidget\">\
|
|
</widget>\
|
|
");
|
|
}
|
|
QWidget *createWidget(QWidget *parent) override
|
|
{
|
|
return new LtsWidgets::LtsLedWidget(parent);
|
|
}
|
|
};
|
|
|
|
class LtsRangeSliderPlugin final : public LtsDesignerCustomWidgetInterface
|
|
{
|
|
Q_OBJECT
|
|
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
|
public:
|
|
using LtsDesignerCustomWidgetInterface::LtsDesignerCustomWidgetInterface;
|
|
|
|
QString includeFile() const override
|
|
{
|
|
return QLatin1String("LtsWidgets/lts_range_slider.h");
|
|
}
|
|
QString name() const override
|
|
{
|
|
return QLatin1String("LtsWidgets::LtsRangeSlider");
|
|
}
|
|
QString toolTip() const override
|
|
{
|
|
return QLatin1String("Class for an Range Slider");
|
|
}
|
|
QString whatsThis() const override
|
|
{
|
|
return QLatin1String("Range Slider");
|
|
}
|
|
QString domXml() const override
|
|
{
|
|
return QLatin1String("\
|
|
<widget class=\"LtsWidgets::LtsRangeSlider\" name=\"ltsRangeSlider\">\
|
|
</widget>\
|
|
");
|
|
}
|
|
QWidget *createWidget(QWidget *parent) override
|
|
{
|
|
return new LtsWidgets::LtsRangeSlider(parent);
|
|
}
|
|
};
|
|
|
|
class LtsImageCropperPlugin final : public LtsDesignerCustomWidgetInterface
|
|
{
|
|
Q_OBJECT
|
|
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
|
public:
|
|
using LtsDesignerCustomWidgetInterface::LtsDesignerCustomWidgetInterface;
|
|
|
|
QString name() const override
|
|
{
|
|
return QLatin1String("LtsWidgets::LtsImageCropper");
|
|
}
|
|
QString toolTip() const override
|
|
{
|
|
return QLatin1String("Class for an Image Cropper Widget");
|
|
}
|
|
QString whatsThis() const override
|
|
{
|
|
return QLatin1String("Image Cropper Widget");
|
|
}
|
|
QString includeFile() const override
|
|
{
|
|
return QLatin1String("LtsWidgets/LtsImageCropper/lts_image_cropper.h");
|
|
}
|
|
QWidget *createWidget(QWidget *parent) override
|
|
{
|
|
return new LtsWidgets::LtsImageCropper(parent);
|
|
}
|
|
QString domXml() const override
|
|
{
|
|
return QLatin1String("<widget class=\"LtsWidgets::LtsImageCropper\" name=\"ltsImageCropper\">\n"
|
|
" <property name=\"sizePolicy\">\n"
|
|
" <sizepolicy hsizetype=\"Fixed\" vsizetype=\"Fixed\">\n"
|
|
" <horstretch>0</horstretch>\n"
|
|
" <verstretch>0</verstretch>\n"
|
|
" </sizepolicy>\n"
|
|
" </property>\n"
|
|
" <property name=\"minimumSize\">\n"
|
|
" <size>\n"
|
|
" <width>100</width>\n"
|
|
" <height>100</height>\n"
|
|
" </size>\n"
|
|
" </property>\n"
|
|
" <property name=\"maximumSize\">\n"
|
|
" <size>\n"
|
|
" <width>0</width>\n"
|
|
" <height>0</height>\nitfield"
|
|
" </size>\n"
|
|
" </property>\n"
|
|
"</widget>");
|
|
}
|
|
};
|
|
|
|
class LtsMSecDateTimeEditPlugin final : public LtsDesignerCustomWidgetInterface
|
|
{
|
|
Q_OBJECT
|
|
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
|
public:
|
|
using LtsDesignerCustomWidgetInterface::LtsDesignerCustomWidgetInterface;
|
|
|
|
QString name() const override
|
|
{
|
|
return QLatin1String("LtsWidgets::LtsMSecDateTimeEdit");
|
|
}
|
|
QString toolTip() const override
|
|
{
|
|
return QLatin1String("Class for an Date/Time Widget with 40msecs step.");
|
|
}
|
|
QString whatsThis() const override
|
|
{
|
|
return QLatin1String("Date/Time Widget with 40msecs step");
|
|
}
|
|
QString includeFile() const override
|
|
{
|
|
return QLatin1String("LtsWidgets/lts_msec_date_time_edit.h");
|
|
}
|
|
QWidget *createWidget(QWidget *parent) override
|
|
{
|
|
return new LtsWidgets::LtsMSecDateTimeEdit(parent);
|
|
}
|
|
QString domXml() const override
|
|
{
|
|
return QLatin1String("<widget class=\"LtsWidgets::LtsMSecDateTimeEdit\" name=\"ltsMsecDateTimeEdit\">\n"
|
|
"</widget>");
|
|
}
|
|
};
|
|
|
|
class LtsBitfieldWidgetPlugin final : public LtsDesignerCustomWidgetInterface
|
|
{
|
|
Q_OBJECT
|
|
|
|
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
|
public:
|
|
using LtsDesignerCustomWidgetInterface::LtsDesignerCustomWidgetInterface;
|
|
|
|
QString includeFile() const override
|
|
{
|
|
return QLatin1String("lts_bitfield_widget.h");
|
|
}
|
|
QString name() const override
|
|
{
|
|
return QLatin1String("LtsWidgets::LtsBitfieldWidget");
|
|
}
|
|
QString toolTip() const override
|
|
{
|
|
return QLatin1String("Widget for bitwise displaying and editing of quint8");
|
|
}
|
|
QString whatsThis() const override
|
|
{
|
|
return QLatin1String("Widget for bitwise displaying and editing of quint8");
|
|
}
|
|
QString domXml() const override
|
|
{
|
|
return QStringLiteral("<widget class=\"LtsWidgets::LtsBitfieldWidget\" name=\"LtsBitfieldWidget\"/>");
|
|
}
|
|
QWidget *createWidget(QWidget *parent) override
|
|
{
|
|
return new LtsWidgets::LtsBitfieldWidget(parent);
|
|
}
|
|
};
|
|
|
|
|
|
class LtsTabSequenceWidgetPlugin final : public LtsDesignerCustomWidgetInterface
|
|
{
|
|
Q_OBJECT
|
|
|
|
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
|
public:
|
|
using LtsDesignerCustomWidgetInterface::LtsDesignerCustomWidgetInterface;
|
|
|
|
QString includeFile() const override
|
|
{
|
|
return QLatin1String("LtsWidgets/lts_tab_sequence_widget.h");
|
|
}
|
|
QString name() const override
|
|
{
|
|
return QLatin1String("LtsWidgets::LtsTabSequenceWidget");
|
|
}
|
|
QString toolTip() const override
|
|
{
|
|
return QLatin1String("Widget for a Tab Sequence");
|
|
}
|
|
QString whatsThis() const override
|
|
{
|
|
return QLatin1String("Widget for a Tab Sequence");
|
|
}
|
|
QString domXml() const override
|
|
{
|
|
return QStringLiteral("<widget class=\"LtsWidgets::LtsTabSequenceWidget\" name=\"LtsTabSequenceWidget\"/>");
|
|
}
|
|
QWidget *createWidget(QWidget *parent) override
|
|
{
|
|
return new LtsWidgets::LtsTabSequenceWidget(parent);
|
|
}
|
|
};
|
|
|
|
|
|
class Plugin final : public QObject, public QDesignerCustomWidgetCollectionInterface
|
|
{
|
|
Q_OBJECT
|
|
Q_PLUGIN_METADATA(IID "org.rde.sls.ltswidgetsplugin" FILE "ltswidgetsplugin.json")
|
|
Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
|
|
public:
|
|
explicit Plugin(QObject *parent = nullptr);
|
|
|
|
QList<QDesignerCustomWidgetInterface *> customWidgets() const override
|
|
{
|
|
return m_plugins;
|
|
}
|
|
|
|
private:
|
|
QList<QDesignerCustomWidgetInterface *> m_plugins;
|
|
};
|
|
|
|
|
|
Plugin::Plugin(QObject *parent)
|
|
: QObject(parent)
|
|
{
|
|
m_plugins.append(new LtsCoordWidgetPlugin(this));
|
|
m_plugins.append(new LtsDialogButtonBoxPlugin(this));
|
|
m_plugins.append(new LtsImageEditorPlugin(this));
|
|
m_plugins.append(new LtsElidedLabelPlugin(this));
|
|
m_plugins.append(new LtsPictureViewPlugin(this));
|
|
m_plugins.append(new LtsProfileButtonPlugin(this));
|
|
m_plugins.append(new LtsSplitterPlugin(this));
|
|
m_plugins.append(new LtsTabBarPlugin(this));
|
|
m_plugins.append(new LtsTabWidgetPlugin(this));
|
|
m_plugins.append(new LtsToolBarPlugin(this));
|
|
m_plugins.append(new LtsToolBarAreaPlugin(this));
|
|
m_plugins.append(new LtsToolBoxPlugin(this));
|
|
m_plugins.append(new LtsFramelessDialogPlugin(this));
|
|
m_plugins.append(new LtsDragIconPlugin(this));
|
|
m_plugins.append(new LtsComboBoxPlugin(this));
|
|
m_plugins.append(new LtsSpinBoxPlugin(this));
|
|
m_plugins.append(new LtsMultiRangeSpinBoxPlugin(this));
|
|
m_plugins.append(new LtsDoubleSpinBoxPlugin(this));
|
|
m_plugins.append(new LtsDateTimeEditPlugin(this));
|
|
m_plugins.append(new LtsDataViewPlugin(this));
|
|
m_plugins.append(new LtsFileDialogWidgetPlugin(this));
|
|
m_plugins.append(new LtsFileDialogPlugin(this));
|
|
m_plugins.append(new LtsReportDisplayWidgetPlugin(this));
|
|
m_plugins.append(new LtsLedWidgetPlugin(this));
|
|
m_plugins.append(new LtsRangeSliderPlugin(this));
|
|
m_plugins.append(new LtsImageCropperPlugin(this));
|
|
m_plugins.append(new LtsMSecDateTimeEditPlugin(this));
|
|
m_plugins.append(new LtsBitfieldWidgetPlugin(this));
|
|
m_plugins.append(new LtsTabSequenceWidgetPlugin(this));
|
|
}
|
|
|
|
} // namespace
|
|
#include "ltswidgetsplugin.moc"
|