mirror of
https://github.com/sudoxnym/open-hyperion.git
synced 2026-07-12 15:05:05 +00:00
Re-Meet standards of the OpenRGB Plugin interface
This commit is contained in:
parent
87b161e157
commit
0f3bc7d0e0
4 changed files with 27 additions and 8 deletions
|
|
@ -1,6 +1,18 @@
|
||||||
#include "ORGBExamplePlugin.h"
|
#include "ORGBExamplePlugin.h"
|
||||||
#include "Dependencies/ResourceManager.h"
|
#include "Dependencies/ResourceManager.h"
|
||||||
|
|
||||||
|
bool ORGBPlugin::HasCustomIcon() const
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
QLabel* ORGBPlugin::TabLabel() const
|
||||||
|
{
|
||||||
|
QLabel *TLabel = new QLabel();
|
||||||
|
TLabel->setText("Example");
|
||||||
|
return TLabel;
|
||||||
|
}
|
||||||
|
|
||||||
std::string ORGBPlugin::PluginName() const
|
std::string ORGBPlugin::PluginName() const
|
||||||
{
|
{
|
||||||
return "ExamplePlugin";
|
return "ExamplePlugin";
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "ORGBExamplePluginInterface.h"
|
#include "ORGBPluginInterface.h"
|
||||||
#include "Dependencies/ResourceManager.h"
|
#include "Dependencies/ResourceManager.h"
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
@ -21,9 +21,12 @@ class ORGBPlugin : public QObject, public ORGBPluginInterface
|
||||||
public:
|
public:
|
||||||
~ORGBPlugin() override {}
|
~ORGBPlugin() override {}
|
||||||
|
|
||||||
std::string PluginName() const override;
|
bool HasCustomIcon() const override;
|
||||||
std::string PluginDesc() const override;
|
QLabel* TabLabel() const override;
|
||||||
std::string PluginLocal() const override;
|
|
||||||
|
std::string PluginName() const override;
|
||||||
|
std::string PluginDesc() const override;
|
||||||
|
std::string PluginLocal() const override;
|
||||||
|
|
||||||
QWidget* CreateGUI(QWidget *Parent, ResourceManager *RM = nullptr) const override;
|
QWidget* CreateGUI(QWidget *Parent, ResourceManager *RM = nullptr) const override;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ SOURCES += \
|
||||||
ORGBExamplePlugin.cpp
|
ORGBExamplePlugin.cpp
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
ORGBExamplePluginInterface.h \
|
|
||||||
ORGBExamplePlugin.h \
|
ORGBExamplePlugin.h \
|
||||||
Dependencies/ResourceManager.h \
|
Dependencies/ResourceManager.h \
|
||||||
Dependencies/RGBController.h \
|
Dependencies/RGBController.h \
|
||||||
|
|
@ -26,6 +25,7 @@ HEADERS += \
|
||||||
Dependencies/NetworkProtocol.h \
|
Dependencies/NetworkProtocol.h \
|
||||||
Dependencies/net_port.h \
|
Dependencies/net_port.h \
|
||||||
Dependencies/json.hpp \
|
Dependencies/json.hpp \
|
||||||
|
ORGBPluginInterface.h
|
||||||
|
|
||||||
# Default rules for deployment.
|
# Default rules for deployment.
|
||||||
unix {
|
unix {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QtPlugin>
|
#include <QtPlugin>
|
||||||
|
#include <QLabel>
|
||||||
#include "Dependencies/ResourceManager.h"
|
#include "Dependencies/ResourceManager.h"
|
||||||
|
|
||||||
class QString;
|
class QString;
|
||||||
|
|
@ -11,9 +12,12 @@ class ORGBPluginInterface
|
||||||
public:
|
public:
|
||||||
virtual ~ORGBPluginInterface() {}
|
virtual ~ORGBPluginInterface() {}
|
||||||
|
|
||||||
virtual std::string PluginName() const = 0;
|
virtual bool HasCustomIcon() const = 0;
|
||||||
virtual std::string PluginDesc() const = 0;
|
virtual QLabel* TabLabel() const = 0;
|
||||||
virtual std::string PluginLocal() const = 0;
|
|
||||||
|
virtual std::string PluginName() const = 0;
|
||||||
|
virtual std::string PluginDesc() const = 0;
|
||||||
|
virtual std::string PluginLocal() const = 0;
|
||||||
|
|
||||||
virtual QWidget* CreateGUI(QWidget *Parent, ResourceManager *RM = nullptr) const = 0;
|
virtual QWidget* CreateGUI(QWidget *Parent, ResourceManager *RM = nullptr) const = 0;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue