Fri, 01 Jul 2022 16:46:43 +0300
Fix right click to delete not really working properly
Instead of removing the point that had been added, it would remove
the point that is being drawn, which would cause it to overwrite the
previous point using the new point, causing a bit of a delay
#pragma once #include <QObject> #include <QDesignerCustomWidgetInterface> class PluginCollection final : public QObject, public QDesignerCustomWidgetCollectionInterface { Q_OBJECT Q_PLUGIN_METADATA(IID "org.qgis.customwidgets") Q_INTERFACES(QDesignerCustomWidgetCollectionInterface) // QDesignerCustomWidgetCollectionInterface interface QList<QDesignerCustomWidgetInterface*> interfaces; public: PluginCollection(QObject* parent = nullptr); QList<QDesignerCustomWidgetInterface*> customWidgets() const override; }; class Vec3EditorPlugin final : public QObject, public QDesignerCustomWidgetInterface { Q_OBJECT Q_INTERFACES(QDesignerCustomWidgetInterface) // QDesignerCustomWidgetInterface interface public: Vec3EditorPlugin(QObject* parent) : QObject{parent}{} QString name() const override; QString group() const override; QString toolTip() const override; QString whatsThis() const override; QString includeFile() const override; QIcon icon() const override; bool isContainer() const override; QWidget* createWidget(QWidget* parent) override; }; class MatrixEditorPlugin final : public QObject, public QDesignerCustomWidgetInterface { Q_OBJECT Q_INTERFACES(QDesignerCustomWidgetInterface) // QDesignerCustomWidgetInterface interface public: MatrixEditorPlugin(QObject* parent) : QObject{parent}{} QString name() const override; QString group() const override; QString toolTip() const override; QString whatsThis() const override; QString includeFile() const override; QIcon icon() const override; bool isContainer() const override; QWidget* createWidget(QWidget* parent) override; }; class ColorButtonPlugin final : public QObject, public QDesignerCustomWidgetInterface { Q_OBJECT Q_INTERFACES(QDesignerCustomWidgetInterface) public: ColorButtonPlugin(QObject* parent) : QObject{parent}{} // QDesignerCustomWidgetInterface interface QString name() const override; QString group() const override; QString toolTip() const override; QString whatsThis() const override; QString includeFile() const override; QIcon icon() const override; bool isContainer() const override; QWidget* createWidget(QWidget* parent) override; };