Initial commit for Plugins

Commits squashed, code style and naming changes by Adam Honse <calcprogrammer1@gmail.com>
This commit is contained in:
silas 2020-12-07 19:14:54 -06:00 committed by Adam Honse
parent 5f5d50ffd8
commit 93231c3225
14 changed files with 344 additions and 24 deletions

43
OpenRGBPluginInterface.h Normal file
View file

@ -0,0 +1,43 @@
/*-----------------------------------------*\
| OpenRGBPluginInterface.h |
| |
| OpenRGB Plugin Interface Class |
| |
| herosilas12 (CoffeeIsLife) 12/11/2020 |
| Adam Honse (CalcProgrammer1) 1/5/2021 |
\*-----------------------------------------*/
#pragma once
#include "ResourceManager.h"
#include <QtPlugin>
#include <QLabel>
#define OpenRGBPluginInterface_IID "com.OpenRGBPluginInterface"
struct OpenRGBPluginInfo
{
std::string PluginName;
std::string PluginDescription;
std::string PluginLocation;
bool HasCustom;
QLabel *PluginLabel;
std::string SettingName;
};
class OpenRGBPluginInterface
{
public:
virtual ~OpenRGBPluginInterface() {}
virtual OpenRGBPluginInfo Initialize(bool dark_theme, ResourceManager* resource_manager_ptr) = 0;
virtual QWidget *CreateGUI(QWidget* parent) = 0;
OpenRGBPluginInfo info;
};
Q_DECLARE_INTERFACE(OpenRGBPluginInterface, OpenRGBPluginInterface_IID)