Monitor and Laptop device types

This commit is contained in:
Dmitry K
2025-05-16 02:34:39 +04:00
committed by Adam Honse
parent d296f770b6
commit 20f6565f44
22 changed files with 92 additions and 59 deletions

View File

@@ -28,7 +28,7 @@ RGBController_AlienwareAW3423DWF::RGBController_AlienwareAW3423DWF(AlienwareAW34
name = "Alienware AW3423DWF";
vendor = "Alienware";
type = DEVICE_TYPE_ACCESSORY;
type = DEVICE_TYPE_MONITOR;
description = "Alienware AW3423DWF Monitor Device";
location = controller->GetLocation();
serial = controller->GetSerialString();

View File

@@ -29,7 +29,7 @@ RGBController_AlienwareMonitor::RGBController_AlienwareMonitor(AlienwareMonitorC
name = "Alienware Monitor";
description = "Alienware Monitor";
vendor = "Alienware";
type = DEVICE_TYPE_ACCESSORY;
type = DEVICE_TYPE_MONITOR;
location = controller->GetLocation();
serial = controller->GetSerialString();

View File

@@ -41,7 +41,7 @@ RGBController_AsusAuraCoreLaptop::RGBController_AsusAuraCoreLaptop(AsusAuraCoreL
name = aura_dev->dmi_name;
vendor = "Asus";
type = DEVICE_TYPE_KEYBOARD;
type = DEVICE_TYPE_LAPTOP;
description = controller->GetDeviceDescription();
serial = controller->GetSerial();
location = controller->GetLocation();

View File

@@ -28,7 +28,7 @@ RGBController_AuraMonitor::RGBController_AuraMonitor(AuraMonitorController* cont
name = "ASUS Aura Monitor";
vendor = "ASUS";
type = DEVICE_TYPE_ACCESSORY;
type = DEVICE_TYPE_MONITOR;
description = "ASUS Aura Monitor Device";
location = controller->GetDeviceLocation();
serial = controller->GetSerialString();

View File

@@ -27,9 +27,9 @@ RGBController_AsusTUFLaptopLinux::RGBController_AsusTUFLaptopLinux(AsusTUFLaptop
{
controller = controller_ptr;
name = "ASUS TUF Keyboard";
name = "ASUS TUF Laptop Keyboard";
vendor = "ASUS";
type = DEVICE_TYPE_KEYBOARD;
type = DEVICE_TYPE_LAPTOP;
description = "Asus TUF Device";
location = ASUS_KBD_BACKLIGHT_BASE_PATH;

View File

@@ -24,9 +24,9 @@ using namespace std::chrono_literals;
RGBController_AsusTUFLaptopWMI::RGBController_AsusTUFLaptopWMI(AsusTUFLaptopController* controller_ptr)
{
name = "ASUS TUF Keyboard";
name = "ASUS TUF Laptop Keyboard";
vendor = "ASUS";
type = DEVICE_TYPE_KEYBOARD;
type = DEVICE_TYPE_LAPTOP;
description = "WMI Device";
location = "\\\\.\\ATKACPI";

View File

@@ -29,7 +29,7 @@ RGBController_CMMonitorController::RGBController_CMMonitorController(CMMonitorCo
controller = controller_ptr;
name = "CoolerMaster LED Controller A1";
vendor = "CoolerMaster";
type = DEVICE_TYPE_ACCESSORY;
type = DEVICE_TYPE_MONITOR;
description = name;
location = controller->GetDeviceLocation();
serial = controller->GetSerialString();

View File

@@ -11,7 +11,6 @@
#pragma once
#include <vector>
#include "RGBController.h"
#include "CMMonitorController.h"

View File

@@ -25,9 +25,9 @@
RGBController_Faustus::RGBController_Faustus(const std::string& dev_path)
{
name = "ASUS TUF Keyboard";
name = "ASUS TUF Laptop Keyboard";
vendor = "ASUS";
type = DEVICE_TYPE_KEYBOARD;
type = DEVICE_TYPE_LAPTOP;
description = "Faustus Device";
modes.resize(4);

View File

@@ -75,7 +75,7 @@ RGBController_GigabyteAorusLaptop::RGBController_GigabyteAorusLaptop(GigabyteAor
this->dev_type = dev_type;
controller = controller_ptr;
vendor = "Gigabyte";
type = DEVICE_TYPE_KEYBOARD;
type = DEVICE_TYPE_LAPTOP;
description = "Aorus Laptop";
location = controller->GetDeviceLocation();
serial = controller->GetSerialString();

View File

@@ -25,7 +25,7 @@
#define LG_27GN950_B_PID 0x9A8A
#define LG_38GL950G_PID 0x9A57
void DetectLGMonitorControllers(hid_device_info* info, const std::string& name)
static void DetectLGMonitorControllers(hid_device_info* info, const std::string& name)
{
hid_device* dev = hid_open_path(info->path);

View File

@@ -29,7 +29,7 @@ RGBController_LGMonitor::RGBController_LGMonitor(LGMonitorController* controller
{
controller = controller_ptr;
vendor = "LG";
type = DEVICE_TYPE_ACCESSORY;
type = DEVICE_TYPE_MONITOR;
description = "LG Monitor";
location = controller->GetDeviceLocation();
serial = controller->GetSerialString();

View File

@@ -37,7 +37,7 @@ RGBController_Lenovo4ZoneUSB::RGBController_Lenovo4ZoneUSB(Lenovo4ZoneUSBControl
controller = controller_ptr;
name = controller->getName();
type = DEVICE_TYPE_KEYBOARD;
type = DEVICE_TYPE_LAPTOP;
vendor = "Lenovo";

View File

@@ -28,7 +28,7 @@ RGBController_MSI3Zone::RGBController_MSI3Zone(MSI3ZoneController* controller_pt
name = "MSI 3-Zone Keyboard";
vendor = "MSI";
type = DEVICE_TYPE_KEYBOARD;
type = DEVICE_TYPE_LAPTOP;
description = "MSI 3-Zone Keyboard Device";
location = controller->GetDeviceLocation();
serial = controller->GetSerialString();

View File

@@ -2825,7 +2825,7 @@ static const razer_device blade_2016_device =
{
"Razer Blade (2016)",
RAZER_BLADE_2016_PID,
DEVICE_TYPE_KEYBOARD,
DEVICE_TYPE_LAPTOP,
RAZER_MATRIX_TYPE_STANDARD,
0x3F,
6,
@@ -2860,7 +2860,7 @@ static const razer_device blade_late_2016_device =
{
"Razer Blade (Late 2016)",
RAZER_BLADE_LATE_2016_PID,
DEVICE_TYPE_KEYBOARD,
DEVICE_TYPE_LAPTOP,
RAZER_MATRIX_TYPE_STANDARD,
0x3F,
6,
@@ -2895,7 +2895,7 @@ static const razer_device blade_15_2018_advanced_device =
{
"Razer Blade 15 (2018 Advanced)",
RAZER_BLADE_2018_ADVANCED_PID,
DEVICE_TYPE_KEYBOARD,
DEVICE_TYPE_LAPTOP,
RAZER_MATRIX_TYPE_STANDARD,
0x3F,
6,
@@ -2930,7 +2930,7 @@ static const razer_device blade_15_2018_base_device =
{
"Razer Blade 15 (2018 Base)",
RAZER_BLADE_2018_BASE_PID,
DEVICE_TYPE_KEYBOARD,
DEVICE_TYPE_LAPTOP,
RAZER_MATRIX_TYPE_STANDARD,
0x3F,
6,
@@ -2965,7 +2965,7 @@ static const razer_device blade_15_2018_mercury_device =
{
"Razer Blade 15 (2018 Mercury)",
RAZER_BLADE_2018_MERCURY_PID,
DEVICE_TYPE_KEYBOARD,
DEVICE_TYPE_LAPTOP,
RAZER_MATRIX_TYPE_STANDARD,
0x3F,
6,
@@ -3000,7 +3000,7 @@ static const razer_device blade_15_2019_advanced_device =
{
"Razer Blade 15 (2019 Advanced)",
RAZER_BLADE_2019_ADVANCED_PID,
DEVICE_TYPE_KEYBOARD,
DEVICE_TYPE_LAPTOP,
RAZER_MATRIX_TYPE_STANDARD,
0x3F,
6,
@@ -3035,7 +3035,7 @@ static const razer_device blade_15_2019_base_device =
{
"Razer Blade 15 (2019 Base)",
RAZER_BLADE_2019_BASE_PID,
DEVICE_TYPE_KEYBOARD,
DEVICE_TYPE_LAPTOP,
RAZER_MATRIX_TYPE_STANDARD,
0x3F,
1,
@@ -3070,7 +3070,7 @@ static const razer_device blade_15_2019_mercury_device =
{
"Razer Blade 15 (2019 Mercury)",
RAZER_BLADE_2019_MERCURY_PID,
DEVICE_TYPE_KEYBOARD,
DEVICE_TYPE_LAPTOP,
RAZER_MATRIX_TYPE_STANDARD,
0x3F,
6,
@@ -3105,7 +3105,7 @@ static const razer_device blade_15_2019_studio_device =
{
"Razer Blade 15 (2019 Studio)",
RAZER_BLADE_2019_STUDIO_PID,
DEVICE_TYPE_KEYBOARD,
DEVICE_TYPE_LAPTOP,
RAZER_MATRIX_TYPE_STANDARD,
0x3F,
6,
@@ -3140,7 +3140,7 @@ static const razer_device blade_15_2020_advanced_device =
{
"Razer Blade 15 (2020 Advanced)",
RAZER_BLADE_2020_ADVANCED_PID,
DEVICE_TYPE_KEYBOARD,
DEVICE_TYPE_LAPTOP,
RAZER_MATRIX_TYPE_STANDARD,
0x3F,
6,
@@ -3175,7 +3175,7 @@ static const razer_device blade_15_2020_base_device =
{
"Razer Blade 15 (2020 Base)",
RAZER_BLADE_2020_BASE_PID,
DEVICE_TYPE_KEYBOARD,
DEVICE_TYPE_LAPTOP,
RAZER_MATRIX_TYPE_STANDARD,
0x3F,
1,
@@ -3210,7 +3210,7 @@ static const razer_device blade_late_2020_device =
{
"Razer Blade (Late 2020)",
RAZER_BLADE_LATE_2020_PID,
DEVICE_TYPE_KEYBOARD,
DEVICE_TYPE_LAPTOP,
RAZER_MATRIX_TYPE_STANDARD,
0x3F,
6,
@@ -3245,7 +3245,7 @@ static const razer_device blade_15_2021_advanced_device =
{
"Razer Blade 15 (2021 Advanced)",
RAZER_BLADE_2021_ADVANCED_PID,
DEVICE_TYPE_KEYBOARD,
DEVICE_TYPE_LAPTOP,
RAZER_MATRIX_TYPE_STANDARD,
0x3F,
6,
@@ -3280,7 +3280,7 @@ static const razer_device blade_15_2021_base_device =
{
"Razer Blade 15 (2021 Base)",
RAZER_BLADE_2021_BASE_PID,
DEVICE_TYPE_KEYBOARD,
DEVICE_TYPE_LAPTOP,
RAZER_MATRIX_TYPE_STANDARD,
0x3F,
1,
@@ -3315,7 +3315,7 @@ static const razer_device blade_15_2021_base_v2_device =
{
"Razer Blade 15 (2021 Base)",
RAZER_BLADE_2021_BASE_V2_PID,
DEVICE_TYPE_KEYBOARD,
DEVICE_TYPE_LAPTOP,
RAZER_MATRIX_TYPE_STANDARD,
0x1F,
1,
@@ -3350,7 +3350,7 @@ static const razer_device blade_15_late_2021_advanced_device =
{
"Razer Blade 15 (Late 2021 Advanced)",
RAZER_BLADE_LATE_2021_ADVANCED_PID,
DEVICE_TYPE_KEYBOARD,
DEVICE_TYPE_LAPTOP,
RAZER_MATRIX_TYPE_STANDARD,
0x3F,
6,
@@ -3385,7 +3385,7 @@ static const razer_device blade_14_2021_device =
{
"Razer Blade 14 (2021)",
RAZER_BLADE_14_2021_PID,
DEVICE_TYPE_KEYBOARD,
DEVICE_TYPE_LAPTOP,
RAZER_MATRIX_TYPE_STANDARD,
0x3F,
6,
@@ -3420,7 +3420,7 @@ static const razer_device blade_14_2022_device =
{
"Razer Blade 14 (2022)",
RAZER_BLADE_14_2022_PID,
DEVICE_TYPE_KEYBOARD,
DEVICE_TYPE_LAPTOP,
RAZER_MATRIX_TYPE_STANDARD,
0x1F,
6,
@@ -3455,7 +3455,7 @@ static const razer_device blade_14_2023_device =
{
"Razer Blade 14 (2023)",
RAZER_BLADE_14_2023_PID,
DEVICE_TYPE_KEYBOARD,
DEVICE_TYPE_LAPTOP,
RAZER_MATRIX_TYPE_STANDARD,
0x1F,
6,
@@ -3490,7 +3490,7 @@ static const razer_device blade_15_2022_device =
{
"Razer Blade 15 (2022)",
RAZER_BLADE_15_2022_PID,
DEVICE_TYPE_KEYBOARD,
DEVICE_TYPE_LAPTOP,
RAZER_MATRIX_TYPE_STANDARD,
0x1F,
6,
@@ -3525,7 +3525,7 @@ static const razer_device book_13_2020_device =
{
"Razer Book 13 (2020)",
RAZER_BOOK_13_2020_PID,
DEVICE_TYPE_KEYBOARD,
DEVICE_TYPE_LAPTOP,
RAZER_MATRIX_TYPE_STANDARD,
0x3F,
6,
@@ -3560,7 +3560,7 @@ static const razer_device blade_pro_2016_device =
{
"Razer Blade Pro (2016)",
RAZER_BLADE_PRO_2016_PID,
DEVICE_TYPE_KEYBOARD,
DEVICE_TYPE_LAPTOP,
RAZER_MATRIX_TYPE_STANDARD,
0x3F,
6,
@@ -3595,7 +3595,7 @@ static const razer_device blade_pro_2017_device =
{
"Razer Blade Pro (2017)",
RAZER_BLADE_PRO_2017_PID,
DEVICE_TYPE_KEYBOARD,
DEVICE_TYPE_LAPTOP,
RAZER_MATRIX_TYPE_STANDARD,
0x3F,
6,
@@ -3630,7 +3630,7 @@ static const razer_device blade_pro_2017_fullhd_device =
{
"Razer Blade Pro (2017 FullHD)",
RAZER_BLADE_PRO_2017_FULLHD_PID,
DEVICE_TYPE_KEYBOARD,
DEVICE_TYPE_LAPTOP,
RAZER_MATRIX_TYPE_STANDARD,
0x3F,
6,
@@ -3664,7 +3664,7 @@ static const razer_device blade_pro_2019_device =
{
"Razer Blade Pro (2019)",
RAZER_BLADE_PRO_2019_PID,
DEVICE_TYPE_KEYBOARD,
DEVICE_TYPE_LAPTOP,
RAZER_MATRIX_TYPE_STANDARD,
0x3F,
6,
@@ -3699,7 +3699,7 @@ static const razer_device blade_pro_late_2019_device =
{
"Razer Blade Pro (Late 2019)",
RAZER_BLADE_PRO_LATE_2019_PID,
DEVICE_TYPE_KEYBOARD,
DEVICE_TYPE_LAPTOP,
RAZER_MATRIX_TYPE_STANDARD,
0x3F,
6,
@@ -3734,7 +3734,7 @@ static const razer_device blade_pro_17_2020_device =
{
"Razer Blade Pro 17 (2020)",
RAZER_BLADE_PRO_17_2020_PID,
DEVICE_TYPE_KEYBOARD,
DEVICE_TYPE_LAPTOP,
RAZER_MATRIX_TYPE_STANDARD,
0x3F,
6,
@@ -3769,7 +3769,7 @@ static const razer_device blade_pro_17_2021_device =
{
"Razer Blade Pro 17 (2021)",
RAZER_BLADE_PRO_17_2021_PID,
DEVICE_TYPE_KEYBOARD,
DEVICE_TYPE_LAPTOP,
RAZER_MATRIX_TYPE_STANDARD,
0x3F,
6,
@@ -3804,7 +3804,7 @@ static const razer_device blade_stealth_2016_device =
{
"Razer Blade Stealth (2016)",
RAZER_BLADE_STEALTH_2016_PID,
DEVICE_TYPE_KEYBOARD,
DEVICE_TYPE_LAPTOP,
RAZER_MATRIX_TYPE_STANDARD,
0x3F,
6,
@@ -3839,7 +3839,7 @@ static const razer_device blade_stealth_late_2016_device =
{
"Razer Blade Stealth (Late 2016)",
RAZER_BLADE_STEALTH_LATE_2016_PID,
DEVICE_TYPE_KEYBOARD,
DEVICE_TYPE_LAPTOP,
RAZER_MATRIX_TYPE_STANDARD,
0x3F,
6,
@@ -3874,7 +3874,7 @@ static const razer_device blade_stealth_2017_device =
{
"Razer Blade Stealth (2017)",
RAZER_BLADE_STEALTH_2017_PID,
DEVICE_TYPE_KEYBOARD,
DEVICE_TYPE_LAPTOP,
RAZER_MATRIX_TYPE_STANDARD,
0x3F,
6,
@@ -3909,7 +3909,7 @@ static const razer_device blade_stealth_late_2017_device =
{
"Razer Blade Stealth (Late 2017)",
RAZER_BLADE_STEALTH_LATE_2017_PID,
DEVICE_TYPE_KEYBOARD,
DEVICE_TYPE_LAPTOP,
RAZER_MATRIX_TYPE_STANDARD,
0x3F,
6,
@@ -3944,7 +3944,7 @@ static const razer_device blade_stealth_2019_device =
{
"Razer Blade Stealth (2019)",
RAZER_BLADE_STEALTH_2019_PID,
DEVICE_TYPE_KEYBOARD,
DEVICE_TYPE_LAPTOP,
RAZER_MATRIX_TYPE_STANDARD,
0x3F,
6,
@@ -3979,7 +3979,7 @@ static const razer_device blade_stealth_late_2019_device =
{
"Razer Blade Stealth (Late 2019)",
RAZER_BLADE_STEALTH_LATE_2019_PID,
DEVICE_TYPE_KEYBOARD,
DEVICE_TYPE_LAPTOP,
RAZER_MATRIX_TYPE_STANDARD,
0x3F,
1,
@@ -4014,7 +4014,7 @@ static const razer_device blade_stealth_2020_device =
{
"Razer Blade Stealth (2020)",
RAZER_BLADE_STEALTH_2020_PID,
DEVICE_TYPE_KEYBOARD,
DEVICE_TYPE_LAPTOP,
RAZER_MATRIX_TYPE_STANDARD,
0x3F,
1,
@@ -4049,7 +4049,7 @@ static const razer_device blade_stealth_late_2020_device =
{
"Razer Blade Stealth (Late 2020)",
RAZER_BLADE_STEALTH_LATE_2020_PID,
DEVICE_TYPE_KEYBOARD,
DEVICE_TYPE_LAPTOP,
RAZER_MATRIX_TYPE_STANDARD,
0x3F,
1,
@@ -8671,7 +8671,6 @@ const razer_device* razer_device_list[] =
&blade_pro_late_2019_device,
&blade_pro_17_2020_device,
&blade_pro_17_2021_device,
&blade_stealth_2019_device,
&blade_stealth_2016_device,
&blade_stealth_late_2016_device,
&blade_stealth_2017_device,

View File

@@ -11,7 +11,6 @@
#include <string>
#include "RGBController_XG270QG.h"
#include "LogManager.h"
/**------------------------------------------------------------------*\
@name Viewsonic Monitor
@@ -30,7 +29,7 @@ RGBController_XG270QG::RGBController_XG270QG(VS_XG270QG_Controller* controller_p
name = "ViewSonic Elite XG270QG";
vendor = "ViewSonic";
type = DEVICE_TYPE_ACCESSORY;
type = DEVICE_TYPE_MONITOR;
description = "ViewSonic Monitor";
location = controller->GetLocation();
serial = controller->GetSerial();

View File

@@ -11,8 +11,6 @@
#pragma once
#include <cstdint>
#include <vector>
#include "VS_XG270QG_Controller.h"
#include "RGBController.h"

View File

@@ -212,6 +212,8 @@ enum
DEVICE_TYPE_MICROPHONE,
DEVICE_TYPE_ACCESSORY,
DEVICE_TYPE_KEYPAD,
DEVICE_TYPE_LAPTOP,
DEVICE_TYPE_MONITOR,
DEVICE_TYPE_UNKNOWN,
};

View File

@@ -104,6 +104,12 @@ static int GetIcon(device_type type)
case DEVICE_TYPE_KEYPAD:
icon = OpenRGBFont::keypad;
break;
case DEVICE_TYPE_LAPTOP:
icon = OpenRGBFont::laptop;
break;
case DEVICE_TYPE_MONITOR:
icon = OpenRGBFont::monitor;
break;
default:
icon = OpenRGBFont::unknown;
break;

View File

@@ -46,7 +46,9 @@ public:
toolbox = 0xF019,
unknown = 0xF01A,
virtual_controller = 0xF01B,
usb = 0xF01C
usb = 0xF01C,
laptop = 0xF01D,
monitor = 0xF01E
};
static QString icon(int);

View File

Binary file not shown.

28
qt/fonts/README.md Normal file
View File

@@ -0,0 +1,28 @@
# OpenRGB Fonts
This folder contains OpenRGB.ttf - a special font that contains all monochrome
icons used in OpenRGB. The icons are assembled into a font in order to simplify
rendering them in accordance with the desired color palette, as well as ensure
the vector scalable format is supported by the platform.
The font is generated by a dedicated CI script located in:
https://gitlab.com/OpenRGBDevelopers/openrgb-icons
Most icons are taken from the open library CSS.GG, and it is preferred that new
icons are chosen from that library instead of making new ones.
In order to add a new icon, please do the following steps:
1) Choose the SVG icon in: https://github.com/astrit/css.gg/tree/main/icons/svg
2) Append the file name to the list in
https://gitlab.com/OpenRGBDevelopers/openrgb-icons/-/blob/main/OpenRGB.json
with a new glyph code. The code must be in the Unicode Private Use Area and it
is recommended to take the first available code after the last icon.
3) After changes were pushed to the `openrgb-icons` repo (or after a merge
request was filed), the CI script will generate a new TTF file that should be
placed in this folder, replacing the existing one
4) Add the new glyph code and it's name to the enumeration in
https://gitlab.com/CalcProgrammer1/OpenRGB/-/blob/master/qt/OpenRGBFont.
5) The icon is now available as a Unicode character, with the code you chose.
In order for the icon to be displayed correctly, the font must be assigned
to the widget, through `OpenRGBFont::GetFont()`.