Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b3b2a9f482 | ||
|
|
36d36fab40 | ||
|
|
d330dc0344 | ||
|
|
369e568ce4 | ||
|
|
25c829ac2a |
No files matched your search
@@ -137,7 +137,7 @@ void HyperXKeyboardController::SetLEDsDirect(std::vector<RGBColor> colors)
|
|||||||
red_color_data
|
red_color_data
|
||||||
);
|
);
|
||||||
|
|
||||||
Sleep(5);
|
Sleep(2);
|
||||||
|
|
||||||
SendDirect
|
SendDirect
|
||||||
(
|
(
|
||||||
@@ -145,7 +145,7 @@ void HyperXKeyboardController::SetLEDsDirect(std::vector<RGBColor> colors)
|
|||||||
grn_color_data
|
grn_color_data
|
||||||
);
|
);
|
||||||
|
|
||||||
Sleep(5);
|
Sleep(2);
|
||||||
|
|
||||||
SendDirect
|
SendDirect
|
||||||
(
|
(
|
||||||
@@ -153,7 +153,7 @@ void HyperXKeyboardController::SetLEDsDirect(std::vector<RGBColor> colors)
|
|||||||
blu_color_data
|
blu_color_data
|
||||||
);
|
);
|
||||||
|
|
||||||
Sleep(5);
|
Sleep(2);
|
||||||
|
|
||||||
SendDirectExtended
|
SendDirectExtended
|
||||||
(
|
(
|
||||||
@@ -189,8 +189,6 @@ void HyperXKeyboardController::SetLEDs(std::vector<RGBColor> colors)
|
|||||||
red_color_data
|
red_color_data
|
||||||
);
|
);
|
||||||
|
|
||||||
Sleep(5);
|
|
||||||
|
|
||||||
SendColor
|
SendColor
|
||||||
(
|
(
|
||||||
0x01,
|
0x01,
|
||||||
@@ -198,8 +196,6 @@ void HyperXKeyboardController::SetLEDs(std::vector<RGBColor> colors)
|
|||||||
grn_color_data
|
grn_color_data
|
||||||
);
|
);
|
||||||
|
|
||||||
Sleep(5);
|
|
||||||
|
|
||||||
SendColor
|
SendColor
|
||||||
(
|
(
|
||||||
0x01,
|
0x01,
|
||||||
@@ -207,8 +203,6 @@ void HyperXKeyboardController::SetLEDs(std::vector<RGBColor> colors)
|
|||||||
blu_color_data
|
blu_color_data
|
||||||
);
|
);
|
||||||
|
|
||||||
Sleep(5);
|
|
||||||
|
|
||||||
SendExtendedColor
|
SendExtendedColor
|
||||||
(
|
(
|
||||||
0x01,
|
0x01,
|
||||||
|
|||||||
@@ -104,9 +104,6 @@ void PoseidonZRGBController::SetLEDsDirect(std::vector<RGBColor> colors)
|
|||||||
| Send packets |
|
| Send packets |
|
||||||
\*-----------------------------------------------------*/
|
\*-----------------------------------------------------*/
|
||||||
hid_send_feature_report(dev, red_grn_buf, 264);
|
hid_send_feature_report(dev, red_grn_buf, 264);
|
||||||
|
|
||||||
Sleep(5);
|
|
||||||
|
|
||||||
hid_send_feature_report(dev, blu_buf, 264);
|
hid_send_feature_report(dev, blu_buf, 264);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+13
-21
@@ -5,20 +5,6 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
|||||||
TARGET = OpenRGB
|
TARGET = OpenRGB
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
|
|
||||||
VERSION = 0.0
|
|
||||||
win32:BUILDDATE = $$system(date /t)
|
|
||||||
unix:BUILDDATE = $$system(date -R)
|
|
||||||
GIT_COMMIT_ID = $$system(git --git-dir $$_PRO_FILE_PWD_/.git --work-tree $$_PRO_FILE_PWD_ rev-parse HEAD)
|
|
||||||
GIT_COMMIT_DATE = $$system(git --git-dir $$_PRO_FILE_PWD_/.git --work-tree $$_PRO_FILE_PWD_ show -s --format=%ci HEAD)
|
|
||||||
GIT_BRANCH = $$system(git --git-dir $$_PRO_FILE_PWD_/.git --work-tree $$_PRO_FILE_PWD_ rev-parse --abbrev-ref HEAD)
|
|
||||||
|
|
||||||
DEFINES += \
|
|
||||||
VERSION_STRING=\\"\"\"$$VERSION\\"\"\" \
|
|
||||||
BUILDDATE_STRING=\\"\"\"$$BUILDDATE\\"\"\" \
|
|
||||||
GIT_COMMIT_ID=\\"\"\"$$GIT_COMMIT_ID\\"\"\" \
|
|
||||||
GIT_COMMIT_DATE=\\"\"\"$$GIT_COMMIT_DATE\\"\"\" \
|
|
||||||
GIT_BRANCH=\\"\"\"$$GIT_BRANCH\\"\"\"
|
|
||||||
|
|
||||||
RC_ICONS = qt/OpenRGB.ico
|
RC_ICONS = qt/OpenRGB.ico
|
||||||
|
|
||||||
INCLUDEPATH += \
|
INCLUDEPATH += \
|
||||||
@@ -67,7 +53,6 @@ SOURCES += \
|
|||||||
net_port/net_port.cpp \
|
net_port/net_port.cpp \
|
||||||
qt/OpenRGBDialog2.cpp \
|
qt/OpenRGBDialog2.cpp \
|
||||||
qt/OpenRGBProfileSaveDialog.cpp \
|
qt/OpenRGBProfileSaveDialog.cpp \
|
||||||
qt/OpenRGBSoftwareInfoPage.cpp \
|
|
||||||
qt/OpenRGBSystemInfoPage.cpp \
|
qt/OpenRGBSystemInfoPage.cpp \
|
||||||
qt/hsv.cpp \
|
qt/hsv.cpp \
|
||||||
serial_port/serial_port.cpp \
|
serial_port/serial_port.cpp \
|
||||||
@@ -155,7 +140,6 @@ HEADERS += \
|
|||||||
net_port/net_port.h \
|
net_port/net_port.h \
|
||||||
qt/OpenRGBDialog2.h \
|
qt/OpenRGBDialog2.h \
|
||||||
qt/OpenRGBProfileSaveDialog.h \
|
qt/OpenRGBProfileSaveDialog.h \
|
||||||
qt/OpenRGBSoftwareInfoPage.h \
|
|
||||||
qt/OpenRGBSystemInfoPage.h \
|
qt/OpenRGBSystemInfoPage.h \
|
||||||
serial_port/find_usb_serial_port.h \
|
serial_port/find_usb_serial_port.h \
|
||||||
serial_port/serial_port.h \
|
serial_port/serial_port.h \
|
||||||
@@ -218,7 +202,6 @@ FORMS += \
|
|||||||
qt/OpenRGBDialog.ui \
|
qt/OpenRGBDialog.ui \
|
||||||
qt/OpenRGBDialog2.ui \
|
qt/OpenRGBDialog2.ui \
|
||||||
qt/OpenRGBProfileSaveDialog.ui \
|
qt/OpenRGBProfileSaveDialog.ui \
|
||||||
qt/OpenRGBSoftwareInfoPage.ui \
|
|
||||||
qt/OpenRGBSystemInfoPage.ui
|
qt/OpenRGBSystemInfoPage.ui
|
||||||
|
|
||||||
#-----------------------------------------------
|
#-----------------------------------------------
|
||||||
@@ -234,7 +217,6 @@ win32:INCLUDEPATH += \
|
|||||||
|
|
||||||
win32:SOURCES += \
|
win32:SOURCES += \
|
||||||
dependencies/NVFC/nvapi.cpp \
|
dependencies/NVFC/nvapi.cpp \
|
||||||
dependencies/hidapi/hid_win.c \
|
|
||||||
i2c_smbus/i2c_smbus_i801.cpp \
|
i2c_smbus/i2c_smbus_i801.cpp \
|
||||||
i2c_smbus/i2c_smbus_nct6775.cpp \
|
i2c_smbus/i2c_smbus_nct6775.cpp \
|
||||||
i2c_smbus/i2c_smbus_nvapi.cpp \
|
i2c_smbus/i2c_smbus_nvapi.cpp \
|
||||||
@@ -259,6 +241,7 @@ win32:contains(QMAKE_TARGET.arch, x86_64) {
|
|||||||
-lws2_32 \
|
-lws2_32 \
|
||||||
-L"$$PWD/dependencies/inpout32_1501/x64/" -linpoutx64 \
|
-L"$$PWD/dependencies/inpout32_1501/x64/" -linpoutx64 \
|
||||||
-L"$$PWD/dependencies/libusb-1.0.22/MS64/dll" -llibusb-1.0 \
|
-L"$$PWD/dependencies/libusb-1.0.22/MS64/dll" -llibusb-1.0 \
|
||||||
|
-L"$$PWD/dependencies/hidapi-win/x64/" -lhidapi
|
||||||
}
|
}
|
||||||
|
|
||||||
win32:contains(QMAKE_TARGET.arch, x86) {
|
win32:contains(QMAKE_TARGET.arch, x86) {
|
||||||
@@ -266,6 +249,7 @@ win32:contains(QMAKE_TARGET.arch, x86) {
|
|||||||
-lws2_32 \
|
-lws2_32 \
|
||||||
-L"$$PWD/dependencies/inpout32_1501/Win32/" -linpout32 \
|
-L"$$PWD/dependencies/inpout32_1501/Win32/" -linpout32 \
|
||||||
-L"$$PWD/dependencies/libusb-1.0.22/MS32/dll" -llibusb-1.0 \
|
-L"$$PWD/dependencies/libusb-1.0.22/MS32/dll" -llibusb-1.0 \
|
||||||
|
-L"$$PWD/dependencies/hidapi-win/x86/" -lhidapi
|
||||||
}
|
}
|
||||||
|
|
||||||
win32:DEFINES -= \
|
win32:DEFINES -= \
|
||||||
@@ -299,7 +283,6 @@ win32:contains(QMAKE_TARGET.arch, x86) {
|
|||||||
# Linux specific project configuration
|
# Linux specific project configuration
|
||||||
#-----------------------------------------------
|
#-----------------------------------------------
|
||||||
unix:INCLUDEPATH += \
|
unix:INCLUDEPATH += \
|
||||||
dependencies/hidapi \
|
|
||||||
|
|
||||||
unix:HEADERS += \
|
unix:HEADERS += \
|
||||||
i2c_smbus/i2c_smbus_linux.h \
|
i2c_smbus/i2c_smbus_linux.h \
|
||||||
@@ -307,10 +290,19 @@ unix:HEADERS += \
|
|||||||
|
|
||||||
unix:LIBS += \
|
unix:LIBS += \
|
||||||
-lusb-1.0 \
|
-lusb-1.0 \
|
||||||
-lstdc++fs \
|
|
||||||
|
packagesExist(hidapi-libusb){
|
||||||
|
unix:LIBS += -lhidapi-libusb
|
||||||
|
} else {
|
||||||
|
packagesExist(hidapi) {
|
||||||
|
unix:LIBS += -lhidapi
|
||||||
|
} else {
|
||||||
|
unix:LIBS += -lhidapi-libusb
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
unix:SOURCES += \
|
unix:SOURCES += \
|
||||||
dependencies/hidapi/hid_win.c \
|
|
||||||
i2c_smbus/i2c_smbus_linux.cpp \
|
i2c_smbus/i2c_smbus_linux.cpp \
|
||||||
serial_port/find_usb_serial_port_linux.cpp \
|
serial_port/find_usb_serial_port_linux.cpp \
|
||||||
RGBController/OpenRazerDetect.cpp \
|
RGBController/OpenRazerDetect.cpp \
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
#include "RGBController.h"
|
#include "RGBController.h"
|
||||||
#include <cstring>
|
|
||||||
|
|
||||||
unsigned char * RGBController::GetDeviceDescription()
|
unsigned char * RGBController::GetDeviceDescription()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,41 +9,6 @@
|
|||||||
|
|
||||||
#include "RGBController_HyperXKeyboard.h"
|
#include "RGBController_HyperXKeyboard.h"
|
||||||
|
|
||||||
//Include thread libraries for Windows or Linux
|
|
||||||
#ifdef WIN32
|
|
||||||
#include <process.h>
|
|
||||||
#else
|
|
||||||
#include "pthread.h"
|
|
||||||
#include "unistd.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//Thread functions have different types in Windows and Linux
|
|
||||||
#ifdef WIN32
|
|
||||||
#define THREAD static void
|
|
||||||
#define THREADRETURN
|
|
||||||
#else
|
|
||||||
#define THREAD static void*
|
|
||||||
#define THREADRETURN return(NULL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef WIN32
|
|
||||||
#include <Windows.h>
|
|
||||||
#else
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
static void Sleep(unsigned int milliseconds)
|
|
||||||
{
|
|
||||||
usleep(1000 * milliseconds);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
THREAD keepalive_thread(void *param)
|
|
||||||
{
|
|
||||||
RGBController_HyperXKeyboard* controller = static_cast<RGBController_HyperXKeyboard*>(param);
|
|
||||||
controller->KeepaliveThread();
|
|
||||||
THREADRETURN
|
|
||||||
}
|
|
||||||
|
|
||||||
static const char* zone_names[] =
|
static const char* zone_names[] =
|
||||||
{
|
{
|
||||||
"Keyboard",
|
"Keyboard",
|
||||||
@@ -258,19 +223,6 @@ RGBController_HyperXKeyboard::RGBController_HyperXKeyboard(HyperXKeyboardControl
|
|||||||
|
|
||||||
zones.push_back(new_zone);
|
zones.push_back(new_zone);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-----------------------------------------------------*\
|
|
||||||
| The Corsair Lighting Node Pro requires a packet within|
|
|
||||||
| 20 seconds of sending the lighting change in order |
|
|
||||||
| to not revert back into rainbow mode. Start a thread |
|
|
||||||
| to continuously send a keepalive packet every 5s |
|
|
||||||
\*-----------------------------------------------------*/
|
|
||||||
#ifdef WIN32
|
|
||||||
_beginthread(keepalive_thread, 0, this);
|
|
||||||
#else
|
|
||||||
pthread_t thread;
|
|
||||||
pthread_create(&thread, NULL, &keepalive_thread, this);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RGBController_HyperXKeyboard::~RGBController_HyperXKeyboard()
|
RGBController_HyperXKeyboard::~RGBController_HyperXKeyboard()
|
||||||
@@ -317,15 +269,3 @@ void RGBController_HyperXKeyboard::UpdateMode()
|
|||||||
hyperx->SetMode(modes[active_mode].value, modes[active_mode].direction, modes[active_mode].speed, temp_colors);
|
hyperx->SetMode(modes[active_mode].value, modes[active_mode].direction, modes[active_mode].speed, temp_colors);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RGBController_HyperXKeyboard::KeepaliveThread()
|
|
||||||
{
|
|
||||||
while(1)
|
|
||||||
{
|
|
||||||
if(active_mode == 0)
|
|
||||||
{
|
|
||||||
hyperx->SetLEDsDirect(colors);
|
|
||||||
}
|
|
||||||
Sleep(200);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -23,8 +23,6 @@ public:
|
|||||||
void SetCustomMode();
|
void SetCustomMode();
|
||||||
void UpdateMode();
|
void UpdateMode();
|
||||||
|
|
||||||
void KeepaliveThread();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
HyperXKeyboardController* hyperx;
|
HyperXKeyboardController* hyperx;
|
||||||
};
|
};
|
||||||
@@ -31,9 +31,7 @@ struct Options
|
|||||||
void PrintHelp()
|
void PrintHelp()
|
||||||
{
|
{
|
||||||
std::string help_text;
|
std::string help_text;
|
||||||
help_text += "OpenRGB ";
|
help_text += "OpenRGB, for controlling RGB lighting.\n";
|
||||||
help_text += VERSION_STRING;
|
|
||||||
help_text += ", for controlling RGB lighting.\n";
|
|
||||||
help_text += "Usage: OpenRGB (--device [--mode] [--color])...\n";
|
help_text += "Usage: OpenRGB (--device [--mode] [--color])...\n";
|
||||||
help_text += "\nOptions:\n";
|
help_text += "\nOptions:\n";
|
||||||
help_text += "--gui\t\t\t\t\t Show GUI, also appears when not passing any parameters\n";
|
help_text += "--gui\t\t\t\t\t Show GUI, also appears when not passing any parameters\n";
|
||||||
@@ -43,32 +41,10 @@ void PrintHelp()
|
|||||||
help_text += "-c, --color \"FFFFFF,00AAFF...\"\t\t Sets colors on each device directly if no effect is specified, and sets the effect color if an effect is specified\n";
|
help_text += "-c, --color \"FFFFFF,00AAFF...\"\t\t Sets colors on each device directly if no effect is specified, and sets the effect color if an effect is specified\n";
|
||||||
help_text += "\t\t\t\t\t If there are more LEDs than colors given, the last color will be applied to the remaining LEDs\n";
|
help_text += "\t\t\t\t\t If there are more LEDs than colors given, the last color will be applied to the remaining LEDs\n";
|
||||||
help_text += "-m, --mode [breathing | static | ...] Sets the mode to be applied, check --list-devices to see which modes are supported on your device\n";
|
help_text += "-m, --mode [breathing | static | ...] Sets the mode to be applied, check --list-devices to see which modes are supported on your device\n";
|
||||||
help_text += "-v, --version\t\t\t\t Display version and software build information\n";
|
|
||||||
|
|
||||||
std::cout << help_text << std::endl;
|
std::cout << help_text << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintVersion()
|
|
||||||
{
|
|
||||||
std::string version_text;
|
|
||||||
version_text += "OpenRGB ";
|
|
||||||
version_text += VERSION_STRING;
|
|
||||||
version_text += ", for controlling RGB lighting.\n";
|
|
||||||
version_text += " Version:\t\t ";
|
|
||||||
version_text += VERSION_STRING;
|
|
||||||
version_text += "\n Build Date\t\t ";
|
|
||||||
version_text += BUILDDATE_STRING;
|
|
||||||
version_text += "\n Git Commit ID\t\t ";
|
|
||||||
version_text += GIT_COMMIT_ID;
|
|
||||||
version_text += "\n Git Commit Date\t ";
|
|
||||||
version_text += GIT_COMMIT_DATE;
|
|
||||||
version_text += "\n Git Branch\t\t ";
|
|
||||||
version_text += GIT_BRANCH;
|
|
||||||
version_text += "\n";
|
|
||||||
|
|
||||||
std::cout << version_text << std::endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ParseColors(std::string colors_string, DeviceOptions *options)
|
bool ParseColors(std::string colors_string, DeviceOptions *options)
|
||||||
{
|
{
|
||||||
while (colors_string.length() >= 6)
|
while (colors_string.length() >= 6)
|
||||||
@@ -333,12 +309,6 @@ int cli_main(int argc, char *argv[])
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (argc == 2 && (!strcmp(argv[1], "--version") || !strcmp(argv[1], "-v")))
|
|
||||||
{
|
|
||||||
PrintVersion();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
DetectRGBControllers();
|
DetectRGBControllers();
|
||||||
|
|
||||||
Options options;
|
Options options;
|
||||||
|
|||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Vendored
-1383
File diff suppressed because it is too large.
Load diff
Vendored
+32
-28
@@ -30,7 +30,7 @@
|
|||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define HID_API_EXPORT
|
#define HID_API_EXPORT __declspec(dllexport)
|
||||||
#define HID_API_CALL
|
#define HID_API_CALL
|
||||||
#else
|
#else
|
||||||
#define HID_API_EXPORT /**< API export macro */
|
#define HID_API_EXPORT /**< API export macro */
|
||||||
@@ -69,9 +69,13 @@ extern "C" {
|
|||||||
(Windows/Mac only).*/
|
(Windows/Mac only).*/
|
||||||
unsigned short usage;
|
unsigned short usage;
|
||||||
/** The USB interface which this logical device
|
/** The USB interface which this logical device
|
||||||
represents. Valid on both Linux implementations
|
represents.
|
||||||
in all cases, and valid on the Windows implementation
|
|
||||||
only if the device contains more than one interface. */
|
* Valid on both Linux implementations in all cases.
|
||||||
|
* Valid on the Windows implementation only if the device
|
||||||
|
contains more than one interface.
|
||||||
|
* Valid on the Mac implementation if and only if the device
|
||||||
|
is a USB HID device. */
|
||||||
int interface_number;
|
int interface_number;
|
||||||
|
|
||||||
/** Pointer to the next device */
|
/** Pointer to the next device */
|
||||||
@@ -125,7 +129,7 @@ extern "C" {
|
|||||||
|
|
||||||
@returns
|
@returns
|
||||||
This function returns a pointer to a linked list of type
|
This function returns a pointer to a linked list of type
|
||||||
struct #hid_device, containing information about the HID devices
|
struct #hid_device_info, containing information about the HID devices
|
||||||
attached to the system, or NULL in the case of failure. Free
|
attached to the system, or NULL in the case of failure. Free
|
||||||
this linked list by calling hid_free_enumeration().
|
this linked list by calling hid_free_enumeration().
|
||||||
*/
|
*/
|
||||||
@@ -191,7 +195,7 @@ extern "C" {
|
|||||||
the Control Endpoint (Endpoint 0).
|
the Control Endpoint (Endpoint 0).
|
||||||
|
|
||||||
@ingroup API
|
@ingroup API
|
||||||
@param device A device handle returned from hid_open().
|
@param dev A device handle returned from hid_open().
|
||||||
@param data The data to send, including the report number as
|
@param data The data to send, including the report number as
|
||||||
the first byte.
|
the first byte.
|
||||||
@param length The length in bytes of the data to send.
|
@param length The length in bytes of the data to send.
|
||||||
@@ -200,7 +204,7 @@ extern "C" {
|
|||||||
This function returns the actual number of bytes written and
|
This function returns the actual number of bytes written and
|
||||||
-1 on error.
|
-1 on error.
|
||||||
*/
|
*/
|
||||||
int HID_API_EXPORT HID_API_CALL hid_write(hid_device *device, const unsigned char *data, size_t length);
|
int HID_API_EXPORT HID_API_CALL hid_write(hid_device *dev, const unsigned char *data, size_t length);
|
||||||
|
|
||||||
/** @brief Read an Input report from a HID device with timeout.
|
/** @brief Read an Input report from a HID device with timeout.
|
||||||
|
|
||||||
@@ -209,7 +213,7 @@ extern "C" {
|
|||||||
contain the Report number if the device uses numbered reports.
|
contain the Report number if the device uses numbered reports.
|
||||||
|
|
||||||
@ingroup API
|
@ingroup API
|
||||||
@param device A device handle returned from hid_open().
|
@param dev A device handle returned from hid_open().
|
||||||
@param data A buffer to put the read data into.
|
@param data A buffer to put the read data into.
|
||||||
@param length The number of bytes to read. For devices with
|
@param length The number of bytes to read. For devices with
|
||||||
multiple reports, make sure to read an extra byte for
|
multiple reports, make sure to read an extra byte for
|
||||||
@@ -230,7 +234,7 @@ extern "C" {
|
|||||||
contain the Report number if the device uses numbered reports.
|
contain the Report number if the device uses numbered reports.
|
||||||
|
|
||||||
@ingroup API
|
@ingroup API
|
||||||
@param device A device handle returned from hid_open().
|
@param dev A device handle returned from hid_open().
|
||||||
@param data A buffer to put the read data into.
|
@param data A buffer to put the read data into.
|
||||||
@param length The number of bytes to read. For devices with
|
@param length The number of bytes to read. For devices with
|
||||||
multiple reports, make sure to read an extra byte for
|
multiple reports, make sure to read an extra byte for
|
||||||
@@ -241,7 +245,7 @@ extern "C" {
|
|||||||
-1 on error. If no packet was available to be read and
|
-1 on error. If no packet was available to be read and
|
||||||
the handle is in non-blocking mode, this function returns 0.
|
the handle is in non-blocking mode, this function returns 0.
|
||||||
*/
|
*/
|
||||||
int HID_API_EXPORT HID_API_CALL hid_read(hid_device *device, unsigned char *data, size_t length);
|
int HID_API_EXPORT HID_API_CALL hid_read(hid_device *dev, unsigned char *data, size_t length);
|
||||||
|
|
||||||
/** @brief Set the device handle to be non-blocking.
|
/** @brief Set the device handle to be non-blocking.
|
||||||
|
|
||||||
@@ -253,7 +257,7 @@ extern "C" {
|
|||||||
Nonblocking can be turned on and off at any time.
|
Nonblocking can be turned on and off at any time.
|
||||||
|
|
||||||
@ingroup API
|
@ingroup API
|
||||||
@param device A device handle returned from hid_open().
|
@param dev A device handle returned from hid_open().
|
||||||
@param nonblock enable or not the nonblocking reads
|
@param nonblock enable or not the nonblocking reads
|
||||||
- 1 to enable nonblocking
|
- 1 to enable nonblocking
|
||||||
- 0 to disable nonblocking.
|
- 0 to disable nonblocking.
|
||||||
@@ -261,7 +265,7 @@ extern "C" {
|
|||||||
@returns
|
@returns
|
||||||
This function returns 0 on success and -1 on error.
|
This function returns 0 on success and -1 on error.
|
||||||
*/
|
*/
|
||||||
int HID_API_EXPORT HID_API_CALL hid_set_nonblocking(hid_device *device, int nonblock);
|
int HID_API_EXPORT HID_API_CALL hid_set_nonblocking(hid_device *dev, int nonblock);
|
||||||
|
|
||||||
/** @brief Send a Feature report to the device.
|
/** @brief Send a Feature report to the device.
|
||||||
|
|
||||||
@@ -279,7 +283,7 @@ extern "C" {
|
|||||||
in would be 17.
|
in would be 17.
|
||||||
|
|
||||||
@ingroup API
|
@ingroup API
|
||||||
@param device A device handle returned from hid_open().
|
@param dev A device handle returned from hid_open().
|
||||||
@param data The data to send, including the report number as
|
@param data The data to send, including the report number as
|
||||||
the first byte.
|
the first byte.
|
||||||
@param length The length in bytes of the data to send, including
|
@param length The length in bytes of the data to send, including
|
||||||
@@ -289,7 +293,7 @@ extern "C" {
|
|||||||
This function returns the actual number of bytes written and
|
This function returns the actual number of bytes written and
|
||||||
-1 on error.
|
-1 on error.
|
||||||
*/
|
*/
|
||||||
int HID_API_EXPORT HID_API_CALL hid_send_feature_report(hid_device *device, const unsigned char *data, size_t length);
|
int HID_API_EXPORT HID_API_CALL hid_send_feature_report(hid_device *dev, const unsigned char *data, size_t length);
|
||||||
|
|
||||||
/** @brief Get a feature report from a HID device.
|
/** @brief Get a feature report from a HID device.
|
||||||
|
|
||||||
@@ -300,7 +304,7 @@ extern "C" {
|
|||||||
start in data[1].
|
start in data[1].
|
||||||
|
|
||||||
@ingroup API
|
@ingroup API
|
||||||
@param device A device handle returned from hid_open().
|
@param dev A device handle returned from hid_open().
|
||||||
@param data A buffer to put the read data into, including
|
@param data A buffer to put the read data into, including
|
||||||
the Report ID. Set the first byte of @p data[] to the
|
the Report ID. Set the first byte of @p data[] to the
|
||||||
Report ID of the report to be read, or set it to zero
|
Report ID of the report to be read, or set it to zero
|
||||||
@@ -314,55 +318,55 @@ extern "C" {
|
|||||||
one for the report ID (which is still in the first
|
one for the report ID (which is still in the first
|
||||||
byte), or -1 on error.
|
byte), or -1 on error.
|
||||||
*/
|
*/
|
||||||
int HID_API_EXPORT HID_API_CALL hid_get_feature_report(hid_device *device, unsigned char *data, size_t length);
|
int HID_API_EXPORT HID_API_CALL hid_get_feature_report(hid_device *dev, unsigned char *data, size_t length);
|
||||||
|
|
||||||
/** @brief Close a HID device.
|
/** @brief Close a HID device.
|
||||||
|
|
||||||
@ingroup API
|
@ingroup API
|
||||||
@param device A device handle returned from hid_open().
|
@param dev A device handle returned from hid_open().
|
||||||
*/
|
*/
|
||||||
void HID_API_EXPORT HID_API_CALL hid_close(hid_device *device);
|
void HID_API_EXPORT HID_API_CALL hid_close(hid_device *dev);
|
||||||
|
|
||||||
/** @brief Get The Manufacturer String from a HID device.
|
/** @brief Get The Manufacturer String from a HID device.
|
||||||
|
|
||||||
@ingroup API
|
@ingroup API
|
||||||
@param device A device handle returned from hid_open().
|
@param dev A device handle returned from hid_open().
|
||||||
@param string A wide string buffer to put the data into.
|
@param string A wide string buffer to put the data into.
|
||||||
@param maxlen The length of the buffer in multiples of wchar_t.
|
@param maxlen The length of the buffer in multiples of wchar_t.
|
||||||
|
|
||||||
@returns
|
@returns
|
||||||
This function returns 0 on success and -1 on error.
|
This function returns 0 on success and -1 on error.
|
||||||
*/
|
*/
|
||||||
int HID_API_EXPORT_CALL hid_get_manufacturer_string(hid_device *device, wchar_t *string, size_t maxlen);
|
int HID_API_EXPORT_CALL hid_get_manufacturer_string(hid_device *dev, wchar_t *string, size_t maxlen);
|
||||||
|
|
||||||
/** @brief Get The Product String from a HID device.
|
/** @brief Get The Product String from a HID device.
|
||||||
|
|
||||||
@ingroup API
|
@ingroup API
|
||||||
@param device A device handle returned from hid_open().
|
@param dev A device handle returned from hid_open().
|
||||||
@param string A wide string buffer to put the data into.
|
@param string A wide string buffer to put the data into.
|
||||||
@param maxlen The length of the buffer in multiples of wchar_t.
|
@param maxlen The length of the buffer in multiples of wchar_t.
|
||||||
|
|
||||||
@returns
|
@returns
|
||||||
This function returns 0 on success and -1 on error.
|
This function returns 0 on success and -1 on error.
|
||||||
*/
|
*/
|
||||||
int HID_API_EXPORT_CALL hid_get_product_string(hid_device *device, wchar_t *string, size_t maxlen);
|
int HID_API_EXPORT_CALL hid_get_product_string(hid_device *dev, wchar_t *string, size_t maxlen);
|
||||||
|
|
||||||
/** @brief Get The Serial Number String from a HID device.
|
/** @brief Get The Serial Number String from a HID device.
|
||||||
|
|
||||||
@ingroup API
|
@ingroup API
|
||||||
@param device A device handle returned from hid_open().
|
@param dev A device handle returned from hid_open().
|
||||||
@param string A wide string buffer to put the data into.
|
@param string A wide string buffer to put the data into.
|
||||||
@param maxlen The length of the buffer in multiples of wchar_t.
|
@param maxlen The length of the buffer in multiples of wchar_t.
|
||||||
|
|
||||||
@returns
|
@returns
|
||||||
This function returns 0 on success and -1 on error.
|
This function returns 0 on success and -1 on error.
|
||||||
*/
|
*/
|
||||||
int HID_API_EXPORT_CALL hid_get_serial_number_string(hid_device *device, wchar_t *string, size_t maxlen);
|
int HID_API_EXPORT_CALL hid_get_serial_number_string(hid_device *dev, wchar_t *string, size_t maxlen);
|
||||||
|
|
||||||
/** @brief Get a string from a HID device, based on its string index.
|
/** @brief Get a string from a HID device, based on its string index.
|
||||||
|
|
||||||
@ingroup API
|
@ingroup API
|
||||||
@param device A device handle returned from hid_open().
|
@param dev A device handle returned from hid_open().
|
||||||
@param string_index The index of the string to get.
|
@param string_index The index of the string to get.
|
||||||
@param string A wide string buffer to put the data into.
|
@param string A wide string buffer to put the data into.
|
||||||
@param maxlen The length of the buffer in multiples of wchar_t.
|
@param maxlen The length of the buffer in multiples of wchar_t.
|
||||||
@@ -370,18 +374,18 @@ extern "C" {
|
|||||||
@returns
|
@returns
|
||||||
This function returns 0 on success and -1 on error.
|
This function returns 0 on success and -1 on error.
|
||||||
*/
|
*/
|
||||||
int HID_API_EXPORT_CALL hid_get_indexed_string(hid_device *device, int string_index, wchar_t *string, size_t maxlen);
|
int HID_API_EXPORT_CALL hid_get_indexed_string(hid_device *dev, int string_index, wchar_t *string, size_t maxlen);
|
||||||
|
|
||||||
/** @brief Get a string describing the last error which occurred.
|
/** @brief Get a string describing the last error which occurred.
|
||||||
|
|
||||||
@ingroup API
|
@ingroup API
|
||||||
@param device A device handle returned from hid_open().
|
@param dev A device handle returned from hid_open().
|
||||||
|
|
||||||
@returns
|
@returns
|
||||||
This function returns a string containing the last error
|
This function returns a string containing the last error
|
||||||
which occurred or NULL if none has occurred.
|
which occurred or NULL if none has occurred.
|
||||||
*/
|
*/
|
||||||
HID_API_EXPORT const wchar_t* HID_API_CALL hid_error(hid_device *device);
|
HID_API_EXPORT const wchar_t* HID_API_CALL hid_error(hid_device *dev);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
@@ -597,11 +597,7 @@ void Ui::OpenRGBDevicePage::UpdateMode()
|
|||||||
| Change device mode |
|
| Change device mode |
|
||||||
\*-----------------------------------------------------*/
|
\*-----------------------------------------------------*/
|
||||||
device->SetMode(current_mode);
|
device->SetMode(current_mode);
|
||||||
|
device->UpdateLEDs();
|
||||||
if(device->modes[current_mode].color_mode == MODE_COLORS_PER_LED)
|
|
||||||
{
|
|
||||||
device->UpdateLEDs();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-155
@@ -2,7 +2,6 @@
|
|||||||
#include "OpenRGBDialog2.h"
|
#include "OpenRGBDialog2.h"
|
||||||
#include "OpenRGBDevicePage.h"
|
#include "OpenRGBDevicePage.h"
|
||||||
#include "OpenRGBDeviceInfoPage.h"
|
#include "OpenRGBDeviceInfoPage.h"
|
||||||
#include "OpenRGBSoftwareInfoPage.h"
|
|
||||||
#include "OpenRGBSystemInfoPage.h"
|
#include "OpenRGBSystemInfoPage.h"
|
||||||
#include "OpenRGBProfileSaveDialog.h"
|
#include "OpenRGBProfileSaveDialog.h"
|
||||||
#include "RGBController_Dummy.h"
|
#include "RGBController_Dummy.h"
|
||||||
@@ -30,7 +29,7 @@ OpenRGBDialog2::OpenRGBDialog2(std::vector<i2c_smbus_interface *>& bus, std::vec
|
|||||||
{
|
{
|
||||||
std::string filename = entry.path().filename().string();
|
std::string filename = entry.path().filename().string();
|
||||||
|
|
||||||
if(filename.find(".orp") != std::string::npos)
|
if(filename.find(".orp"))
|
||||||
{
|
{
|
||||||
/*---------------------------------------------------------*\
|
/*---------------------------------------------------------*\
|
||||||
| Open input file in binary mode |
|
| Open input file in binary mode |
|
||||||
@@ -72,18 +71,6 @@ OpenRGBDialog2::OpenRGBDialog2(std::vector<i2c_smbus_interface *>& bus, std::vec
|
|||||||
connect(actionShowHide, SIGNAL(triggered()), this, SLOT(on_ShowHide()));
|
connect(actionShowHide, SIGNAL(triggered()), this, SLOT(on_ShowHide()));
|
||||||
trayIconMenu->addAction(actionShowHide);
|
trayIconMenu->addAction(actionShowHide);
|
||||||
|
|
||||||
QMenu* profileMenu = new QMenu("Profiles", this);
|
|
||||||
|
|
||||||
for(int profile_index = 0; profile_index < ui->comboBox->count(); profile_index++)
|
|
||||||
{
|
|
||||||
QAction* actionProfileSelected = new QAction(ui->comboBox->itemText(profile_index), this);
|
|
||||||
actionProfileSelected->setObjectName(ui->comboBox->itemText(profile_index));
|
|
||||||
connect(actionProfileSelected, SIGNAL(triggered()), this, SLOT(on_ProfileSelected()));
|
|
||||||
profileMenu->addAction(actionProfileSelected);
|
|
||||||
}
|
|
||||||
|
|
||||||
trayIconMenu->addMenu(profileMenu);
|
|
||||||
|
|
||||||
QMenu* quickColorsMenu = new QMenu("Quick Colors", this);
|
QMenu* quickColorsMenu = new QMenu("Quick Colors", this);
|
||||||
|
|
||||||
QAction* actionQuickRed = new QAction("Red", this);
|
QAction* actionQuickRed = new QAction("Red", this);
|
||||||
@@ -259,25 +246,6 @@ OpenRGBDialog2::OpenRGBDialog2(std::vector<i2c_smbus_interface *>& bus, std::vec
|
|||||||
SystemTabLabel->setGeometry(0, 0, 200, 20);
|
SystemTabLabel->setGeometry(0, 0, 200, 20);
|
||||||
|
|
||||||
InformationTabBar->setTabButton(control.size(), QTabBar::LeftSide, SystemTabLabel);
|
InformationTabBar->setTabButton(control.size(), QTabBar::LeftSide, SystemTabLabel);
|
||||||
|
|
||||||
OpenRGBSoftwareInfoPage *SoftInfoPage = new OpenRGBSoftwareInfoPage();
|
|
||||||
ui->InformationTabBar->addTab(SoftInfoPage, "");
|
|
||||||
|
|
||||||
/*-----------------------------------------------------*\
|
|
||||||
| Use Qt's HTML capabilities to display both icon and |
|
|
||||||
| text in the tab label. Choose icon based on device |
|
|
||||||
| type and append device name string. |
|
|
||||||
\*-----------------------------------------------------*/
|
|
||||||
QString SoftwareLabelString = "<html><table><tr><td width='30'><img src='";
|
|
||||||
SoftwareLabelString += ":/keyboard.svg";
|
|
||||||
SoftwareLabelString += "' height='15' width='15'></td><td>Software</td></tr></table></html>";
|
|
||||||
|
|
||||||
QLabel *SoftwareTabLabel = new QLabel();
|
|
||||||
SoftwareTabLabel->setText(SoftwareLabelString);
|
|
||||||
SoftwareTabLabel->setIndent(20);
|
|
||||||
SoftwareTabLabel->setGeometry(0, 0, 200, 20);
|
|
||||||
|
|
||||||
InformationTabBar->setTabButton(control.size() + 1, QTabBar::LeftSide, SoftwareTabLabel);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
OpenRGBDialog2::~OpenRGBDialog2()
|
OpenRGBDialog2::~OpenRGBDialog2()
|
||||||
@@ -356,128 +324,6 @@ void OpenRGBDialog2::on_ShowHide()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Ui::OpenRGBDialog2::on_ProfileSelected()
|
|
||||||
{
|
|
||||||
std::vector<RGBController*> temp_controllers;
|
|
||||||
unsigned int controller_size;
|
|
||||||
unsigned int controller_offset = 0;
|
|
||||||
|
|
||||||
std::string filename = QObject::sender()->objectName().toStdString();
|
|
||||||
|
|
||||||
/*---------------------------------------------------------*\
|
|
||||||
| Open input file in binary mode |
|
|
||||||
\*---------------------------------------------------------*/
|
|
||||||
std::ifstream controller_file(filename, std::ios::in | std::ios::binary);
|
|
||||||
|
|
||||||
/*---------------------------------------------------------*\
|
|
||||||
| Read and verify file header |
|
|
||||||
\*---------------------------------------------------------*/
|
|
||||||
char header_string[16];
|
|
||||||
unsigned int header_version;
|
|
||||||
|
|
||||||
controller_file.read(header_string, 16);
|
|
||||||
controller_file.read((char *)&header_version, sizeof(unsigned int));
|
|
||||||
|
|
||||||
controller_offset += 16 + sizeof(unsigned int);
|
|
||||||
controller_file.seekg(controller_offset);
|
|
||||||
|
|
||||||
if(strcmp(header_string, "OPENRGB_PROFILE") == 0)
|
|
||||||
{
|
|
||||||
if(header_version == 1)
|
|
||||||
{
|
|
||||||
/*---------------------------------------------------------*\
|
|
||||||
| Read controller data from file until EOF |
|
|
||||||
\*---------------------------------------------------------*/
|
|
||||||
while(!(controller_file.peek() == EOF))
|
|
||||||
{
|
|
||||||
controller_file.read((char *)&controller_size, sizeof(controller_size));
|
|
||||||
|
|
||||||
unsigned char *controller_data = new unsigned char[controller_size];
|
|
||||||
|
|
||||||
controller_file.seekg(controller_offset);
|
|
||||||
|
|
||||||
controller_file.read((char *)controller_data, controller_size);
|
|
||||||
|
|
||||||
RGBController_Dummy *temp_controller = new RGBController_Dummy();
|
|
||||||
|
|
||||||
temp_controller->ReadDeviceDescription(controller_data);
|
|
||||||
|
|
||||||
temp_controllers.push_back(temp_controller);
|
|
||||||
|
|
||||||
delete[] controller_data;
|
|
||||||
|
|
||||||
controller_offset += controller_size;
|
|
||||||
controller_file.seekg(controller_offset);
|
|
||||||
}
|
|
||||||
|
|
||||||
for(int controller_index = 0; controller_index < controllers.size(); controller_index++)
|
|
||||||
{
|
|
||||||
RGBController *temp_controller = temp_controllers[controller_index];
|
|
||||||
RGBController *controller_ptr = controllers[controller_index];
|
|
||||||
|
|
||||||
/*---------------------------------------------------------*\
|
|
||||||
| Test if saved controller data matches this controller |
|
|
||||||
\*---------------------------------------------------------*/
|
|
||||||
if((temp_controller->type == controller_ptr->type )
|
|
||||||
&&(temp_controller->name == controller_ptr->name )
|
|
||||||
&&(temp_controller->description == controller_ptr->description)
|
|
||||||
&&(temp_controller->version == controller_ptr->version )
|
|
||||||
&&(temp_controller->serial == controller_ptr->serial )
|
|
||||||
&&(temp_controller->location == controller_ptr->location ))
|
|
||||||
{
|
|
||||||
/*---------------------------------------------------------*\
|
|
||||||
| Update all modes |
|
|
||||||
\*---------------------------------------------------------*/
|
|
||||||
if(temp_controller->modes.size() == controller_ptr->modes.size())
|
|
||||||
{
|
|
||||||
for(int mode_index = 0; mode_index < temp_controller->modes.size(); mode_index++)
|
|
||||||
{
|
|
||||||
if((temp_controller->modes[mode_index].name == controller_ptr->modes[mode_index].name )
|
|
||||||
&&(temp_controller->modes[mode_index].value == controller_ptr->modes[mode_index].value )
|
|
||||||
&&(temp_controller->modes[mode_index].flags == controller_ptr->modes[mode_index].flags )
|
|
||||||
&&(temp_controller->modes[mode_index].speed_min == controller_ptr->modes[mode_index].speed_min )
|
|
||||||
&&(temp_controller->modes[mode_index].speed_max == controller_ptr->modes[mode_index].speed_max )
|
|
||||||
&&(temp_controller->modes[mode_index].colors_min == controller_ptr->modes[mode_index].colors_min)
|
|
||||||
&&(temp_controller->modes[mode_index].colors_max == controller_ptr->modes[mode_index].colors_max))
|
|
||||||
{
|
|
||||||
controller_ptr->modes[mode_index].speed = temp_controller->modes[mode_index].speed;
|
|
||||||
controller_ptr->modes[mode_index].direction = temp_controller->modes[mode_index].direction;
|
|
||||||
controller_ptr->modes[mode_index].color_mode = temp_controller->modes[mode_index].color_mode;
|
|
||||||
|
|
||||||
controller_ptr->modes[mode_index].colors.resize(temp_controller->modes[mode_index].colors.size());
|
|
||||||
|
|
||||||
for(int mode_color_index = 0; mode_color_index < temp_controller->modes[mode_index].colors.size(); mode_color_index++)
|
|
||||||
{
|
|
||||||
controller_ptr->modes[mode_index].colors[mode_color_index] = temp_controller->modes[mode_index].colors[mode_color_index];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
controller_ptr->active_mode = temp_controller->active_mode;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*---------------------------------------------------------*\
|
|
||||||
| Update all colors |
|
|
||||||
\*---------------------------------------------------------*/
|
|
||||||
if(temp_controller->colors.size() == controller_ptr->colors.size())
|
|
||||||
{
|
|
||||||
for(int color_index = 0; color_index < temp_controller->colors.size(); color_index++)
|
|
||||||
{
|
|
||||||
controller_ptr->colors[color_index] = temp_controller->colors[color_index];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for(int device = 0; device < ui->DevicesTabBar->count(); device++)
|
|
||||||
{
|
|
||||||
qobject_cast<OpenRGBDevicePage *>(ui->DevicesTabBar->widget(device))->UpdateDevice();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Ui::OpenRGBDialog2::on_ButtonSaveProfile_clicked()
|
void Ui::OpenRGBDialog2::on_ButtonSaveProfile_clicked()
|
||||||
{
|
{
|
||||||
OpenRGBProfileSaveDialog dialog;
|
OpenRGBProfileSaveDialog dialog;
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ private slots:
|
|||||||
void on_QuickWhite();
|
void on_QuickWhite();
|
||||||
void on_SetAllDevices(unsigned char red, unsigned char green, unsigned char blue);
|
void on_SetAllDevices(unsigned char red, unsigned char green, unsigned char blue);
|
||||||
void on_ShowHide();
|
void on_ShowHide();
|
||||||
void on_ProfileSelected();
|
|
||||||
void on_ButtonSaveProfile_clicked();
|
void on_ButtonSaveProfile_clicked();
|
||||||
void on_ButtonLoadProfile_clicked();
|
void on_ButtonLoadProfile_clicked();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
#include "OpenRGBSoftwareInfoPage.h"
|
|
||||||
|
|
||||||
using namespace Ui;
|
|
||||||
|
|
||||||
OpenRGBSoftwareInfoPage::OpenRGBSoftwareInfoPage(QWidget *parent) :
|
|
||||||
QFrame(parent),
|
|
||||||
ui(new Ui::OpenRGBSoftwareInfoPageUi)
|
|
||||||
{
|
|
||||||
ui->setupUi(this);
|
|
||||||
|
|
||||||
ui->VersionValue->setText(VERSION_STRING);
|
|
||||||
ui->BuildDateValue->setText(BUILDDATE_STRING);
|
|
||||||
ui->GitCommitIDValue->setText(GIT_COMMIT_ID);
|
|
||||||
ui->GitCommitDateValue->setText(GIT_COMMIT_DATE);
|
|
||||||
ui->GitBranchValue->setText(GIT_BRANCH);
|
|
||||||
}
|
|
||||||
|
|
||||||
OpenRGBSoftwareInfoPage::~OpenRGBSoftwareInfoPage()
|
|
||||||
{
|
|
||||||
delete ui;
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
#ifndef OPENRGBSOFTWAREINFOPAGE_H
|
|
||||||
#define OPENRGBSOFTWAREINFOPAGE_H
|
|
||||||
|
|
||||||
#include <QFrame>
|
|
||||||
#include "ui_OpenRGBSoftwareInfoPage.h"
|
|
||||||
|
|
||||||
namespace Ui {
|
|
||||||
class OpenRGBSoftwareInfoPage;
|
|
||||||
}
|
|
||||||
|
|
||||||
class Ui::OpenRGBSoftwareInfoPage : public QFrame
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit OpenRGBSoftwareInfoPage(QWidget *parent = nullptr);
|
|
||||||
~OpenRGBSoftwareInfoPage();
|
|
||||||
|
|
||||||
private:
|
|
||||||
Ui::OpenRGBSoftwareInfoPageUi *ui;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // OPENRGBSOFTWAREINFOPAGE_H
|
|
||||||
@@ -1,91 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>OpenRGBSoftwareInfoPageUi</class>
|
|
||||||
<widget class="QFrame" name="OpenRGBSoftwareInfoPageUi">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>500</width>
|
|
||||||
<height>300</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Frame</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
|
||||||
<item row="4" column="0" alignment="Qt::AlignHCenter">
|
|
||||||
<widget class="QLabel" name="GitBranchLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Git Branch:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QLabel" name="GitCommitIDValue">
|
|
||||||
<property name="text">
|
|
||||||
<string>Git Commit ID Value</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0" alignment="Qt::AlignHCenter">
|
|
||||||
<widget class="QLabel" name="VersionLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Version:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0" alignment="Qt::AlignHCenter">
|
|
||||||
<widget class="QLabel" name="BuildDateLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Build Date:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0" alignment="Qt::AlignHCenter">
|
|
||||||
<widget class="QLabel" name="GitCommitDateLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Git Commit Date:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0" alignment="Qt::AlignHCenter">
|
|
||||||
<widget class="QLabel" name="GitCommitIDLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Git Commit ID:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QLabel" name="BuildDateValue">
|
|
||||||
<property name="text">
|
|
||||||
<string>Build Date Value</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="1">
|
|
||||||
<widget class="QLabel" name="GitBranchValue">
|
|
||||||
<property name="text">
|
|
||||||
<string>Git Branch Value</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QLabel" name="GitCommitDateValue">
|
|
||||||
<property name="text">
|
|
||||||
<string>Git Commit Date Value</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLabel" name="VersionValue">
|
|
||||||
<property name="text">
|
|
||||||
<string>Version Value</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
||||||
Reference in new issue
Block a user