mirror of
https://github.com/sudoxnym/open-hyperion.git
synced 2026-04-14 19:46:39 +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 "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
|
||||
{
|
||||
return "ExamplePlugin";
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "ORGBExamplePluginInterface.h"
|
||||
#include "ORGBPluginInterface.h"
|
||||
#include "Dependencies/ResourceManager.h"
|
||||
|
||||
#include <QObject>
|
||||
|
|
@ -21,9 +21,12 @@ class ORGBPlugin : public QObject, public ORGBPluginInterface
|
|||
public:
|
||||
~ORGBPlugin() override {}
|
||||
|
||||
std::string PluginName() const override;
|
||||
std::string PluginDesc() const override;
|
||||
std::string PluginLocal() const override;
|
||||
bool HasCustomIcon() const override;
|
||||
QLabel* TabLabel() 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;
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ SOURCES += \
|
|||
ORGBExamplePlugin.cpp
|
||||
|
||||
HEADERS += \
|
||||
ORGBExamplePluginInterface.h \
|
||||
ORGBExamplePlugin.h \
|
||||
Dependencies/ResourceManager.h \
|
||||
Dependencies/RGBController.h \
|
||||
|
|
@ -26,6 +25,7 @@ HEADERS += \
|
|||
Dependencies/NetworkProtocol.h \
|
||||
Dependencies/net_port.h \
|
||||
Dependencies/json.hpp \
|
||||
ORGBPluginInterface.h
|
||||
|
||||
# Default rules for deployment.
|
||||
unix {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <QtPlugin>
|
||||
#include <QLabel>
|
||||
#include "Dependencies/ResourceManager.h"
|
||||
|
||||
class QString;
|
||||
|
|
@ -11,9 +12,12 @@ class ORGBPluginInterface
|
|||
public:
|
||||
virtual ~ORGBPluginInterface() {}
|
||||
|
||||
virtual std::string PluginName() const = 0;
|
||||
virtual std::string PluginDesc() const = 0;
|
||||
virtual std::string PluginLocal() const = 0;
|
||||
virtual bool HasCustomIcon() const = 0;
|
||||
virtual QLabel* TabLabel() 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;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue