Working and displaying

This commit is contained in:
silas 2020-12-12 11:39:01 -06:00
parent 6675733e7e
commit 37cf8bcf23
5 changed files with 60 additions and 6 deletions

View file

@ -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;
}

View file

@ -5,6 +5,8 @@
#include <QObject>
#include <QString>
#include <QtPlugin>
#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;
};

View file

@ -1,4 +1,6 @@
QT -= gui
QT += gui
QT += widgets
QT += core
TEMPLATE = lib
DEFINES += ORGBEXAMPLEPLUGIN_LIBRARY

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.13.3, 2020-12-11T17:29:17. -->
<!-- Written by QtCreator 4.13.3, 2020-12-12T10:11:53. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
@ -56,7 +56,32 @@
</data>
<data>
<variable>ProjectExplorer.Project.PluginSettings</variable>
<valuemap type="QVariantMap"/>
<valuemap type="QVariantMap">
<valuemap type="QVariantMap" key="AutoTest.ActiveFrameworks">
<value type="bool" key="AutoTest.Framework.Boost">true</value>
<value type="bool" key="AutoTest.Framework.Catch">true</value>
<value type="bool" key="AutoTest.Framework.GTest">true</value>
<value type="bool" key="AutoTest.Framework.QtQuickTest">true</value>
<value type="bool" key="AutoTest.Framework.QtTest">true</value>
</valuemap>
<valuemap type="QVariantMap" key="AutoTest.CheckStates"/>
<value type="int" key="AutoTest.RunAfterBuild">0</value>
<value type="bool" key="AutoTest.UseGlobal">true</value>
<valuelist type="QVariantList" key="ClangCodeModel.CustomCommandLineKey">
<value type="QString">-fno-delayed-template-parsing</value>
</valuelist>
<value type="bool" key="ClangCodeModel.UseGlobalConfig">true</value>
<value type="QString" key="ClangCodeModel.WarningConfigId">Builtin.Questionable</value>
<valuemap type="QVariantMap" key="ClangTools">
<value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
<value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value>
<value type="int" key="ClangTools.ParallelJobs">6</value>
<valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
<valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
<valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
<value type="bool" key="ClangTools.UseGlobalSettings">true</value>
</valuemap>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.Target.0</variable>
@ -65,7 +90,7 @@
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.15.1 MSVC2019 64bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.15.1 MSVC2019 64bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt5.5151.win64_msvc2019_64_kit</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
@ -78,7 +103,7 @@
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">true</value>
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
@ -182,7 +207,7 @@
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">true</value>
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">

View file

@ -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)