Merge in next branch to upgrade to new API version and prepare for 1.0 release

This commit is contained in:
Adam Honse 2025-02-07 02:35:12 +00:00
parent 3d61f0eff8
commit 3b0d27a9c9
6 changed files with 46 additions and 36 deletions

@ -1 +1 @@
Subproject commit b5f46e3f1de03595656c682fc2f068b66e735e63 Subproject commit 85625a37b25ed0eea519df6a6b0822f54605db21

View file

@ -6,8 +6,10 @@
#include <QMessageBox> #include <QMessageBox>
#include <QSignalMapper> #include <QSignalMapper>
#include "filesystem.h" #include "filesystem.h"
#include "RGBController.h"
#include <e131.h> #include <e131.h>
#include <fstream> #include <fstream>
#include "json.hpp"
#ifndef _WIN32 #ifndef _WIN32
#include <unistd.h> #include <unistd.h>
@ -16,6 +18,8 @@
#define MAX_LEDS_PER_UNIVERSE 170 #define MAX_LEDS_PER_UNIVERSE 170
using json = nlohmann::json;
void DeviceListChanged_Callback(void * this_ptr) void DeviceListChanged_Callback(void * this_ptr)
{ {
OpenRGBE131ReceiverDialog * this_obj = (OpenRGBE131ReceiverDialog *)this_ptr; OpenRGBE131ReceiverDialog * this_obj = (OpenRGBE131ReceiverDialog *)this_ptr;
@ -72,7 +76,7 @@ public:
CheckBoxParameter parameter; CheckBoxParameter parameter;
}; };
OpenRGBE131ReceiverDialog::OpenRGBE131ReceiverDialog(ResourceManager* manager, QWidget *parent) : QWidget(parent), ui(new Ui::OpenRGBE131ReceiverDialog) OpenRGBE131ReceiverDialog::OpenRGBE131ReceiverDialog(ResourceManagerInterface* manager, QWidget *parent) : QWidget(parent), ui(new Ui::OpenRGBE131ReceiverDialog)
{ {
ui->setupUi(this); ui->setupUi(this);

View file

@ -1,7 +1,7 @@
#ifndef OPENRGBE131RECEIVERDIALOG_H #ifndef OPENRGBE131RECEIVERDIALOG_H
#define OPENRGBE131RECEIVERDIALOG_H #define OPENRGBE131RECEIVERDIALOG_H
#include "ResourceManager.h" #include "ResourceManagerInterface.h"
#include <QWidget> #include <QWidget>
@ -14,7 +14,7 @@ class OpenRGBE131ReceiverDialog : public QWidget
Q_OBJECT Q_OBJECT
public: public:
explicit OpenRGBE131ReceiverDialog(ResourceManager* manager, QWidget *parent = nullptr); explicit OpenRGBE131ReceiverDialog(ResourceManagerInterface* manager, QWidget *parent = nullptr);
~OpenRGBE131ReceiverDialog(); ~OpenRGBE131ReceiverDialog();
void AutoMap(); void AutoMap();
@ -39,7 +39,7 @@ private slots:
void CheckBox_updated_slot(QObject* checkbox_argument); void CheckBox_updated_slot(QObject* checkbox_argument);
private: private:
ResourceManager* resource_manager; ResourceManagerInterface *resource_manager;
Ui::OpenRGBE131ReceiverDialog *ui; Ui::OpenRGBE131ReceiverDialog *ui;
bool online; bool online;

View file

@ -33,7 +33,7 @@ unsigned int OpenRGBPlugin::GetPluginAPIVersion()
return(OPENRGB_PLUGIN_API_VERSION); return(OPENRGB_PLUGIN_API_VERSION);
} }
void OpenRGBPlugin::Load(bool dark_theme, ResourceManager* resource_manager_ptr) void OpenRGBPlugin::Load(ResourceManagerInterface* resource_manager_ptr)
{ {
/*-----------------------------------------------------*\ /*-----------------------------------------------------*\
| Save the arguments to Initialize based on what you | | Save the arguments to Initialize based on what you |

View file

@ -10,6 +10,7 @@
#pragma once #pragma once
#include "OpenRGBPluginInterface.h" #include "OpenRGBPluginInterface.h"
#include "ResourceManagerInterface.h"
#include <QObject> #include <QObject>
#include <QString> #include <QString>
@ -35,10 +36,10 @@ public:
/*-------------------------------------------------------------------------------------------------*\ /*-------------------------------------------------------------------------------------------------*\
| Plugin Functionality | | Plugin Functionality |
\*-------------------------------------------------------------------------------------------------*/ \*-------------------------------------------------------------------------------------------------*/
virtual void Load(bool dark_theme, ResourceManager* resource_manager_ptr) override; virtual void Load(ResourceManagerInterface* resource_manager_ptr) override;
virtual QWidget* GetWidget() override; virtual QWidget* GetWidget() override;
virtual QMenu* GetTrayMenu() override; virtual QMenu* GetTrayMenu() override;
virtual void Unload() override; virtual void Unload() override;
private: private:
ResourceManager* resource_manager; ResourceManagerInterface* resource_manager;
}; };

View file

@ -74,7 +74,37 @@ GIT_COMMIT_ID = $$system(git --git-dir $$_PRO_FILE_PWD_/.git --work-tree $$_PR
#-----------------------------------------------------------------------------------------------# #-----------------------------------------------------------------------------------------------#
DEFINES += \ DEFINES += \
VERSION_STRING=\\"\"\"$$VERSION_STR\\"\"\" \ VERSION_STRING=\\"\"\"$$VERSION_STR\\"\"\" \
GIT_COMMIT_ID=\\"\"\"$$GIT_COMMIT_ID\\"\"\" BUILDDATE_STRING=\\"\"\"$$BUILDDATE\\"\"\" \
GIT_COMMIT_ID=\\"\"\"$$GIT_COMMIT_ID\\"\"\" \
GIT_COMMIT_DATE=\\"\"\"$$GIT_COMMIT_DATE\\"\"\" \
GIT_BRANCH=\\"\"\"$$GIT_BRANCH\\"\"\" \
LATEST_BUILD_URL=\\"\"\"$$LATEST_BUILD_URL\\"\"\" \
#-----------------------------------------------------------------------------------------------#
# OpenRGB Plugin SDK #
#-----------------------------------------------------------------------------------------------#
INCLUDEPATH += \
OpenRGB \
OpenRGB/RGBController \
OpenRGB/dependencies/json \
OpenRGB/qt \
OpenRGB/i2c_smbus \
OpenRGB/net_port \
HEADERS += \
OpenRGB/Colors.h \
OpenRGB/OpenRGBPluginInterface.h \
OpenRGB/ResourceManagerInterface.h \
SOURCES += \
OpenRGB/RGBController/RGBController.cpp \
OpenRGB/RGBController/RGBController_Network.cpp \
OpenRGB/NetworkServer.cpp \
OpenRGB/NetworkClient.cpp \
OpenRGB/NetworkProtocol.cpp \
OpenRGB/LogManager.cpp \
OpenRGB/net_port/net_port.cpp \
#-----------------------------------------------------------------------------------------------# #-----------------------------------------------------------------------------------------------#
# Plugin Project Files # # Plugin Project Files #
@ -95,31 +125,8 @@ HEADERS +=
FORMS += \ FORMS += \
OpenRGBE131ReceiverDialog.ui OpenRGBE131ReceiverDialog.ui
#-----------------------------------------------------------------------------------------------# RESOURCES += \
# OpenRGB Plugin SDK # resources.qrc
#-----------------------------------------------------------------------------------------------#
INCLUDEPATH += \
OpenRGB/ \
OpenRGB/dependencies/json \
OpenRGB/i2c_smbus \
OpenRGB/net_port \
OpenRGB/RGBController \
OpenRGB/dependencies/hidapi \
OpenRGB/hidapi_wrapper \
HEADERS += \
OpenRGB/NetworkClient.h \
OpenRGB/NetworkProtocol.h \
OpenRGB/NetworkServer.h \
OpenRGB/OpenRGBPluginInterface.h \
OpenRGB/ProfileManager.h \
OpenRGB/ResourceManager.h \
OpenRGB/SettingsManager.h \
OpenRGB/dependencies/json/json.hpp \
OpenRGB/i2c_smbus/i2c_smbus.h \
OpenRGB/net_port/net_port.h \
OpenRGB/RGBController/RGBController.h \
#-----------------------------------------------------------------------------------------------# #-----------------------------------------------------------------------------------------------#
# Windows-specific Configuration # # Windows-specific Configuration #
#-----------------------------------------------------------------------------------------------# #-----------------------------------------------------------------------------------------------#
@ -163,5 +170,3 @@ macx: {
CONFIG += c++17 CONFIG += c++17
} }
RESOURCES += \
resources.qrc