diff --git a/ORGBExamplePlugin.cpp b/ORGBExamplePlugin.cpp index 6f63306..486f919 100644 --- a/ORGBExamplePlugin.cpp +++ b/ORGBExamplePlugin.cpp @@ -7,3 +7,20 @@ std::string ORGBPlugin::PluginName() const return "ExamplePlugin"; } +std::string ORGBPlugin::PluginDesc() const +{ + return "This is an Example plugin for OpenRGB"; +} + +std::string ORGBPlugin::PluginLocal() const +{ + return "InfoTab"; +} + +QWidget* ORGBPlugin::CreateGUI(QWidget *Parent) const +{ + QWidget *ORGBExamplePage = new QWidget(Parent); + QLabel *ORGBExampleLabel = new QLabel(ORGBExamplePage); + ORGBExampleLabel->setText("This is an example page added by plugins"); + return ORGBExamplePage; +} diff --git a/ORGBExamplePlugin.h b/ORGBExamplePlugin.h index 497ffa2..53f3357 100644 --- a/ORGBExamplePlugin.h +++ b/ORGBExamplePlugin.h @@ -5,6 +5,8 @@ #include #include #include +#include "QWidget" +#include "QLabel" class ORGBPlugin : public QObject, public ORGBPluginInterface { @@ -16,4 +18,8 @@ public: ~ORGBPlugin() override {} std::string PluginName() const override; + std::string PluginDesc() const override; + std::string PluginLocal() const override; + + QWidget* CreateGUI(QWidget *Parent) const override; }; diff --git a/ORGBExamplePlugin.pro b/ORGBExamplePlugin.pro index 66cf699..5480cb2 100644 --- a/ORGBExamplePlugin.pro +++ b/ORGBExamplePlugin.pro @@ -1,4 +1,6 @@ -QT -= gui +QT += gui +QT += widgets +QT += core TEMPLATE = lib DEFINES += ORGBEXAMPLEPLUGIN_LIBRARY diff --git a/ORGBExamplePlugin.pro.user b/ORGBExamplePlugin.pro.user index ca8bee6..ae6b5ba 100644 --- a/ORGBExamplePlugin.pro.user +++ b/ORGBExamplePlugin.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -56,7 +56,32 @@ ProjectExplorer.Project.PluginSettings - + + + true + true + true + true + true + + + 0 + true + + -fno-delayed-template-parsing + + true + Builtin.Questionable + + true + Builtin.DefaultTidyAndClazy + 6 + + + + true + + ProjectExplorer.Project.Target.0 @@ -65,7 +90,7 @@ Desktop Qt 5.15.1 MSVC2019 64bit Desktop Qt 5.15.1 MSVC2019 64bit qt.qt5.5151.win64_msvc2019_64_kit - 0 + 1 0 0 @@ -78,7 +103,7 @@ true QtProjectManager.QMakeBuildStep - false + true @@ -182,7 +207,7 @@ true QtProjectManager.QMakeBuildStep - false + true diff --git a/ORGBExamplePluginInterface.h b/ORGBExamplePluginInterface.h index d6de721..8c1abdb 100644 --- a/ORGBExamplePluginInterface.h +++ b/ORGBExamplePluginInterface.h @@ -11,6 +11,10 @@ public: virtual ~ORGBPluginInterface() {} virtual std::string PluginName() const = 0; + virtual std::string PluginDesc() const = 0; + virtual std::string PluginLocal() const = 0; + + virtual QWidget* CreateGUI(QWidget *Parent) const = 0; }; Q_DECLARE_INTERFACE(ORGBPluginInterface, ORGBPluginInterface_IID)