2021-01-06 06:36:42 +00:00
|
|
|
/*-----------------------------------------*\
|
|
|
|
|
| OpenRGBE131ReceiverPlugin.cpp |
|
|
|
|
|
| |
|
|
|
|
|
| OpenRGB E1.31 Receiver Plugin |
|
|
|
|
|
| |
|
|
|
|
|
| herosilas12 (CoffeeIsLife) 12/11/2020 |
|
|
|
|
|
| Adam Honse (CalcProgrammer1) 1/5/2021 |
|
|
|
|
|
\*-----------------------------------------*/
|
|
|
|
|
|
|
|
|
|
#include "OpenRGBE131ReceiverPlugin.h"
|
|
|
|
|
#include "OpenRGBE131ReceiverDialog.h"
|
|
|
|
|
|
2021-08-30 16:36:58 +00:00
|
|
|
OpenRGBPluginInfo OpenRGBPlugin::GetPluginInfo()
|
2021-01-06 06:36:42 +00:00
|
|
|
{
|
2021-08-30 16:36:58 +00:00
|
|
|
OpenRGBPluginInfo info;
|
2021-01-06 06:36:42 +00:00
|
|
|
|
2021-08-30 16:36:58 +00:00
|
|
|
info.Name = "OpenRGB E1.31 Receiver Plugin";
|
|
|
|
|
info.Description = "Receive E1.31 lighting control data from external applications to control OpenRGB devices";
|
2022-12-03 08:30:06 +00:00
|
|
|
info.Version = VERSION_STRING;
|
|
|
|
|
info.Commit = GIT_COMMIT_ID;
|
2021-08-30 16:36:58 +00:00
|
|
|
info.URL = "https://gitlab.com/OpenRGBDevelopers/OpenRGBE131ReceiverPlugin";
|
|
|
|
|
|
|
|
|
|
info.Location = OPENRGB_PLUGIN_LOCATION_TOP;
|
|
|
|
|
info.Label = "E1.31 Receiver";
|
2022-12-03 08:30:06 +00:00
|
|
|
info.TabIcon.load(":/OpenRGBE131ReceiverPlugin.png");
|
|
|
|
|
info.Icon.load(":/OpenRGBE131ReceiverPlugin.png");
|
2021-01-06 06:36:42 +00:00
|
|
|
|
2021-08-30 16:36:58 +00:00
|
|
|
return(info);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
unsigned int OpenRGBPlugin::GetPluginAPIVersion()
|
|
|
|
|
{
|
|
|
|
|
return(OPENRGB_PLUGIN_API_VERSION);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void OpenRGBPlugin::Load(bool dark_theme, ResourceManager* resource_manager_ptr)
|
|
|
|
|
{
|
2021-01-06 06:36:42 +00:00
|
|
|
/*-----------------------------------------------------*\
|
|
|
|
|
| Save the arguments to Initialize based on what you |
|
|
|
|
|
| need for this plugin's functionality. In this example|
|
|
|
|
|
| we will need the Resource Manager to access the device|
|
|
|
|
|
| list, so save the Resource Manager pointer locally. |
|
|
|
|
|
\*-----------------------------------------------------*/
|
|
|
|
|
resource_manager = resource_manager_ptr;
|
|
|
|
|
}
|
|
|
|
|
|
2021-08-30 16:36:58 +00:00
|
|
|
QWidget* OpenRGBPlugin::GetWidget()
|
2021-01-06 06:36:42 +00:00
|
|
|
{
|
|
|
|
|
/*-----------------------------------------------------*\
|
|
|
|
|
| Create the main widget for this plugin tab |
|
|
|
|
|
\*-----------------------------------------------------*/
|
2021-08-30 16:36:58 +00:00
|
|
|
QWidget* plugin_widget = new OpenRGBE131ReceiverDialog(resource_manager, nullptr);
|
2021-01-06 06:36:42 +00:00
|
|
|
|
|
|
|
|
/*-----------------------------------------------------*\
|
|
|
|
|
| The CreateGUI function must return the main widget |
|
|
|
|
|
\*-----------------------------------------------------*/
|
|
|
|
|
return plugin_widget;
|
|
|
|
|
}
|
2021-08-30 16:36:58 +00:00
|
|
|
|
|
|
|
|
QMenu* OpenRGBPlugin::GetTrayMenu()
|
|
|
|
|
{
|
|
|
|
|
return(nullptr);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void OpenRGBPlugin::Unload()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|