Sat, 08 Apr 2023 15:15:41 +0300
Rename ColorButtonPlugin -> ColorEditPlugin
widgets/designerplugins.cpp | file | annotate | diff | comparison | revisions | |
widgets/designerplugins.h | file | annotate | diff | comparison | revisions |
--- a/widgets/designerplugins.cpp Sat Apr 08 15:15:20 2023 +0300 +++ b/widgets/designerplugins.cpp Sat Apr 08 15:15:41 2023 +0300 @@ -8,7 +8,7 @@ { this->interfaces.append(new Vec3EditorPlugin{this}); this->interfaces.append(new MatrixEditorPlugin{this}); - this->interfaces.append(new ColorButtonPlugin{this}); + this->interfaces.append(new ColorEditPlugin{this}); } QList<QDesignerCustomWidgetInterface*> PluginCollection::customWidgets() const @@ -97,42 +97,42 @@ } -QString ColorButtonPlugin::name() const +QString ColorEditPlugin::name() const { return "ColorEdit"; } -QString ColorButtonPlugin::group() const +QString ColorEditPlugin::group() const { return CMAKE_PROJECT_NAME; } -QString ColorButtonPlugin::toolTip() const +QString ColorEditPlugin::toolTip() const { return ""; } -QString ColorButtonPlugin::whatsThis() const +QString ColorEditPlugin::whatsThis() const { return ""; } -QString ColorButtonPlugin::includeFile() const +QString ColorEditPlugin::includeFile() const { return "widgets/coloredit.h"; } -QIcon ColorButtonPlugin::icon() const +QIcon ColorEditPlugin::icon() const { return {}; } -bool ColorButtonPlugin::isContainer() const +bool ColorEditPlugin::isContainer() const { return false; } -QWidget* ColorButtonPlugin::createWidget(QWidget* parent) +QWidget* ColorEditPlugin::createWidget(QWidget* parent) { return new ColorEdit{parent}; }
--- a/widgets/designerplugins.h Sat Apr 08 15:15:20 2023 +0300 +++ b/widgets/designerplugins.h Sat Apr 08 15:15:41 2023 +0300 @@ -48,12 +48,12 @@ QWidget* createWidget(QWidget* parent) override; }; -class ColorButtonPlugin final : public QObject, public QDesignerCustomWidgetInterface +class ColorEditPlugin final : public QObject, public QDesignerCustomWidgetInterface { Q_OBJECT Q_INTERFACES(QDesignerCustomWidgetInterface) public: - ColorButtonPlugin(QObject* parent) : QObject{parent}{} + ColorEditPlugin(QObject* parent) : QObject{parent}{} // QDesignerCustomWidgetInterface interface QString name() const override; QString group() const override;