First round of user interface rework changes

This commit is contained in:
Adam Honse 2019-12-18 20:33:55 -06:00
parent ffd0088378
commit 7dd84c7ac8
25 changed files with 1393 additions and 15 deletions

View file

@ -22,9 +22,12 @@ INCLUDEPATH += \
SOURCES += \
main.cpp \
OpenAuraSDK.cpp \
qt/OpenRGBDevicePage.cpp \
qt/OpenRGBDialog.cpp \
i2c_smbus/i2c_smbus.cpp \
net_port/net_port.cpp \
qt/OpenRGBDialog2.cpp \
qt/hsv.cpp \
serial_port/serial_port.cpp \
Controllers/AuraController/AuraController.cpp \
Controllers/AuraController/AuraControllerDetect.cpp \
@ -49,9 +52,11 @@ SOURCES += \
RGBController/RGBController_RGBFusion.cpp
HEADERS += \
qt/OpenRGBDevicePage.h \
qt/OpenRGBDialog.h \
i2c_smbus/i2c_smbus.h \
net_port/net_port.h \
qt/OpenRGBDialog2.h \
serial_port/serial_port.h \
Controllers/AuraController/AuraController.h \
Controllers/CorsairController/CorsairController.h \
@ -71,7 +76,9 @@ RESOURCES += \
qt/resources.qrc
FORMS += \
qt/OpenRGBDialog.ui
qt/OpenRGBDevicePage.ui \
qt/OpenRGBDialog.ui \
qt/OpenRGBDialog2.ui
#-----------------------------------------------
# Windows specific project configuration

View file

@ -39,6 +39,21 @@ enum
ZONE_TYPE_MATRIX
};
typedef int device_type;
enum
{
DEVICE_TYPE_MOTHERBOARD,
DEVICE_TYPE_DRAM,
DEVICE_TYPE_GPU,
DEVICE_TYPE_COOLER,
DEVICE_TYPE_LEDSTRIP,
DEVICE_TYPE_KEYBOARD,
DEVICE_TYPE_MOUSE,
DEVICE_TYPE_HEADSET,
DEVICE_TYPE_UNKNOWN
};
typedef struct
{
std::string name; /* Zone name */
@ -55,6 +70,7 @@ public:
std::vector<zone> zones; /* Zones */
std::vector<mode> modes; /* Modes */
std::vector<RGBColor> colors; /* Color buffer */
device_type type; /* device type */
virtual int GetMode() = 0;
virtual void SetMode(int mode) = 0;
@ -63,4 +79,4 @@ public:
virtual void SetAllZoneLEDs(int zone, RGBColor color) = 0;
virtual void SetLED(int led, RGBColor color) = 0;
virtual void UpdateLEDs() = 0;
};
};

View file

@ -120,6 +120,15 @@ RGBController_Aura::RGBController_Aura(AuraController * aura_ptr)
name = aura->GetDeviceName();
if((name.rfind("DRAM", 0) == 0) || (name.rfind("AUDA", 0) == 0) )
{
type = DEVICE_TYPE_DRAM;
}
else
{
type = DEVICE_TYPE_MOTHERBOARD;
}
mode aura_modes[AURA_NUMBER_MODES + 1];
aura_modes[0].name = "Direct";
@ -200,4 +209,4 @@ RGBController_Aura::RGBController_Aura(AuraController * aura_ptr)
zones.push_back(*new_zone);
}
}
}
}

View file

@ -68,6 +68,8 @@ RGBController_Corsair::RGBController_Corsair(CorsairController* corsair_ptr)
name = corsair->GetDeviceName();
type = DEVICE_TYPE_DRAM;
mode corsair_modes[CORSAIR_NUMBER_MODES];
corsair_modes[0].name = "Static";
@ -104,4 +106,4 @@ RGBController_Corsair::RGBController_Corsair(CorsairController* corsair_ptr)
new_zone.map.push_back(zone_row);
zones.push_back(new_zone);
}
}

View file

@ -104,6 +104,8 @@ RGBController_CorsairPro::RGBController_CorsairPro(CorsairProController* corsair
name = corsair->GetDeviceName();
type = DEVICE_TYPE_DRAM;
mode corsair_modes[CORSAIR_PRO_NUMBER_MODES];
corsair_modes[0].name = "Color Shift";
@ -147,4 +149,4 @@ RGBController_CorsairPro::RGBController_CorsairPro(CorsairProController* corsair
new_zone.map.push_back(zone_row);
zones.push_back(new_zone);
}
}

View file

@ -15,6 +15,8 @@ RGBController_HuePlus::RGBController_HuePlus(HuePlusController* hueplus_ptr)
name = "LED Strip";
type = DEVICE_TYPE_LEDSTRIP;
mode led_mode;
led_mode.name = "Custom";
modes.push_back(led_mode);
@ -83,4 +85,4 @@ void RGBController_HuePlus::SetLED(int led, RGBColor color)
void RGBController_HuePlus::UpdateLEDs()
{
strip->SetLEDs(colors);
}
}

View file

@ -68,6 +68,8 @@ RGBController_HyperX::RGBController_HyperX(HyperXController* hyperx_ptr)
name = hyperx->GetDeviceName();
type = DEVICE_TYPE_DRAM;
mode hyperx_modes[HYPERX_NUMBER_MODES];
hyperx_modes[0].name = "Static";
@ -109,4 +111,4 @@ RGBController_HyperX::RGBController_HyperX(HyperXController* hyperx_ptr)
new_zone.map.push_back(zone_row);
zones.push_back(new_zone);
}
}

View file

@ -16,6 +16,8 @@ RGBController_LEDStrip::RGBController_LEDStrip(LEDStripController* ledstrip_ptr)
name = "LED Strip";
type = DEVICE_TYPE_LEDSTRIP;
mode led_mode;
led_mode.name = "Custom";
modes.push_back(led_mode);
@ -84,4 +86,4 @@ void RGBController_LEDStrip::SetLED(int led, RGBColor color)
void RGBController_LEDStrip::UpdateLEDs()
{
strip->SetLEDs(colors);
}
}

View file

@ -75,6 +75,8 @@ RGBController_RGBFusion::RGBController_RGBFusion(RGBFusionController* rgb_fusion
name = rgb_fusion->GetDeviceName();
type = DEVICE_TYPE_MOTHERBOARD;
mode rgb_fusion_modes[RGB_FUSION_NUMBER_MODES];
rgb_fusion_modes[0].name = "Static";
@ -110,4 +112,4 @@ RGBController_RGBFusion::RGBController_RGBFusion(RGBFusionController* rgb_fusion
// Push new zone to zones vector
zones.push_back(*new_zone);
}
}
}

View file

@ -13,7 +13,7 @@
#include <stdio.h>
#include <stdlib.h>
#include "OpenRGBDialog.h"
#include "OpenRGBDialog2.h"
extern std::vector<i2c_smbus_interface*> busses;
@ -33,7 +33,7 @@ int main(int argc, char* argv[])
QApplication a(argc, argv);
Ui::OpenRGBDialog dlg(busses, rgb_controllers);
Ui::OpenRGBDialog2 dlg(busses, rgb_controllers);
dlg.show();
return a.exec();

293
qt/OpenRGBDevicePage.cpp Normal file
View file

@ -0,0 +1,293 @@
#include "OpenRGBDevicePage.h"
#include "hsv.h"
using namespace Ui;
OpenRGBDevicePage::OpenRGBDevicePage(RGBController *dev, QWidget *parent) :
QFrame(parent),
ui(new Ui::OpenRGBDevicePageUi)
{
ui->setupUi(this);
/*-----------------------------------------------------*\
| Store device pointer |
\*-----------------------------------------------------*/
device = dev;
/*-----------------------------------------------------*\
| Set up the color palette buttons |
\*-----------------------------------------------------*/
QPalette pal;
pal = ui->ButtonRed->palette();
pal.setColor(QPalette::Button, QColor(255, 0, 0));
ui->ButtonRed->setAutoFillBackground(true);
ui->ButtonRed->setPalette(pal);
ui->ButtonRed->setFlat(true);
ui->ButtonRed->update();
pal = ui->ButtonYellow->palette();
pal.setColor(QPalette::Button, QColor(255, 255, 0));
ui->ButtonYellow->setAutoFillBackground(true);
ui->ButtonYellow->setPalette(pal);
ui->ButtonYellow->setFlat(true);
ui->ButtonYellow->update();
pal = ui->ButtonGreen->palette();
pal.setColor(QPalette::Button, QColor(0, 255, 0));
ui->ButtonGreen->setAutoFillBackground(true);
ui->ButtonGreen->setPalette(pal);
ui->ButtonGreen->setFlat(true);
ui->ButtonGreen->update();
pal = ui->ButtonCyan->palette();
pal.setColor(QPalette::Button, QColor(0, 255, 255));
ui->ButtonCyan->setAutoFillBackground(true);
ui->ButtonCyan->setPalette(pal);
ui->ButtonCyan->setFlat(true);
ui->ButtonCyan->update();
pal = ui->ButtonBlue->palette();
pal.setColor(QPalette::Button, QColor(0, 0, 255));
ui->ButtonBlue->setAutoFillBackground(true);
ui->ButtonBlue->setPalette(pal);
ui->ButtonBlue->setFlat(true);
ui->ButtonBlue->update();
pal = ui->ButtonMagenta->palette();
pal.setColor(QPalette::Button, QColor(255, 0, 255));
ui->ButtonMagenta->setAutoFillBackground(true);
ui->ButtonMagenta->setPalette(pal);
ui->ButtonMagenta->setFlat(true);
ui->ButtonMagenta->update();
/*-----------------------------------------------------*\
| Fill in the combo boxes with device information |
\*-----------------------------------------------------*/
ui->ModeBox->clear();
for (int i = 0; i < device->modes.size(); i++)
{
ui->ModeBox->addItem(device->modes[i].name.c_str());
}
ui->ModeBox->setCurrentIndex(device->GetMode());
ui->ZoneBox->clear();
for (int i = 0; i < device->zones.size(); i++)
{
ui->ZoneBox->addItem(device->zones[i].name.c_str());
}
ui->ZoneBox->setCurrentIndex(0);
ui->LEDBox->clear();
for (int i = 0; i < device->leds.size(); i++)
{
ui->LEDBox->addItem(device->leds[i].name.c_str());
}
ui->LEDBox->setCurrentIndex(0);
}
OpenRGBDevicePage::~OpenRGBDevicePage()
{
delete ui;
}
void Ui::OpenRGBDevicePage::on_ZoneBox_currentIndexChanged(int index)
{
}
void Ui::OpenRGBDevicePage::on_LEDBox_currentIndexChanged(int index)
{
}
void Ui::OpenRGBDevicePage::on_ModeBox_currentIndexChanged(int index)
{
/*-----------------------------------------------------*\
| Change device mode |
\*-----------------------------------------------------*/
device->SetMode(ui->ModeBox->currentIndex());
}
void Ui::OpenRGBDevicePage::on_SetDeviceButton_clicked()
{
/*-----------------------------------------------------*\
| Set all device LEDs to the current color |
\*-----------------------------------------------------*/
RGBColor color = ToRGBColor(
ui->RedSpinBox->text().toInt(),
ui->GreenSpinBox->text().toInt(),
ui->BlueSpinBox->text().toInt()
);
device->SetAllLEDs(color);
}
void Ui::OpenRGBDevicePage::on_SetZoneButton_clicked()
{
/*-----------------------------------------------------*\
| Set all LEDs in the selected zone to the current color|
\*-----------------------------------------------------*/
RGBColor color = ToRGBColor(
ui->RedSpinBox->text().toInt(),
ui->GreenSpinBox->text().toInt(),
ui->BlueSpinBox->text().toInt()
);
device->SetAllZoneLEDs(ui->ZoneBox->currentIndex(), color);
}
void Ui::OpenRGBDevicePage::on_SetLEDButton_clicked()
{
/*-----------------------------------------------------*\
| Set the selected LED to the current color |
\*-----------------------------------------------------*/
RGBColor color = ToRGBColor(
ui->RedSpinBox->text().toInt(),
ui->GreenSpinBox->text().toInt(),
ui->BlueSpinBox->text().toInt()
);
device->SetLED(ui->LEDBox->currentIndex(), color);
}
void Ui::OpenRGBDevicePage::on_ButtonRed_clicked()
{
UpdatingColor = true;
ui->RedSpinBox->setValue(255);
ui->GreenSpinBox->setValue(0);
ui->BlueSpinBox->setValue(0);
UpdatingColor = false;
updateHSV();
}
void Ui::OpenRGBDevicePage::on_ButtonYellow_clicked()
{
UpdatingColor = true;
ui->RedSpinBox->setValue(255);
ui->GreenSpinBox->setValue(255);
ui->BlueSpinBox->setValue(0);
UpdatingColor = false;
updateHSV();
}
void Ui::OpenRGBDevicePage::on_ButtonGreen_clicked()
{
UpdatingColor = true;
ui->RedSpinBox->setValue(0);
ui->GreenSpinBox->setValue(255);
ui->BlueSpinBox->setValue(0);
UpdatingColor = false;
updateHSV();
}
void Ui::OpenRGBDevicePage::on_ButtonCyan_clicked()
{
UpdatingColor = true;
ui->RedSpinBox->setValue(0);
ui->GreenSpinBox->setValue(255);
ui->BlueSpinBox->setValue(255);
UpdatingColor = false;
updateHSV();
}
void Ui::OpenRGBDevicePage::on_ButtonBlue_clicked()
{
UpdatingColor = true;
ui->RedSpinBox->setValue(0);
ui->GreenSpinBox->setValue(0);
ui->BlueSpinBox->setValue(255);
UpdatingColor = false;
updateHSV();
}
void Ui::OpenRGBDevicePage::on_ButtonMagenta_clicked()
{
UpdatingColor = true;
ui->RedSpinBox->setValue(255);
ui->GreenSpinBox->setValue(0);
ui->BlueSpinBox->setValue(255);
UpdatingColor = false;
updateHSV();
}
void Ui::OpenRGBDevicePage::updateRGB()
{
if(UpdatingColor)
{
return;
}
UpdatingColor = true;
hsv_t hsv;
hsv.hue = ui->HueSpinBox->value();
hsv.saturation = ui->SatSpinBox->value();
hsv.value = ui->ValSpinBox->value();
RGBColor rgb = hsv2rgb(&hsv);
ui->RedSpinBox->setValue(RGBGetRValue(rgb));
ui->GreenSpinBox->setValue(RGBGetGValue(rgb));
ui->BlueSpinBox->setValue(RGBGetBValue(rgb));
UpdatingColor = false;
}
void Ui::OpenRGBDevicePage::updateHSV()
{
if(UpdatingColor)
{
return;
}
UpdatingColor = true;
RGBColor rgb = ToRGBColor(ui->RedSpinBox->value(), ui->GreenSpinBox->value(), ui->BlueSpinBox->value());
hsv_t hsv;
rgb2hsv(rgb, &hsv);
ui->HueSpinBox->setValue(hsv.hue);
ui->SatSpinBox->setValue(hsv.saturation);
ui->ValSpinBox->setValue(hsv.value);
UpdatingColor = false;
}
void Ui::OpenRGBDevicePage::on_RedSpinBox_valueChanged(int arg1)
{
updateHSV();
}
void Ui::OpenRGBDevicePage::on_HueSpinBox_valueChanged(int arg1)
{
updateRGB();
}
void Ui::OpenRGBDevicePage::on_GreenSpinBox_valueChanged(int arg1)
{
updateHSV();
}
void Ui::OpenRGBDevicePage::on_SatSpinBox_valueChanged(int arg1)
{
updateRGB();
}
void Ui::OpenRGBDevicePage::on_BlueSpinBox_valueChanged(int arg1)
{
updateHSV();
}
void Ui::OpenRGBDevicePage::on_ValSpinBox_valueChanged(int arg1)
{
updateRGB();
}

52
qt/OpenRGBDevicePage.h Normal file
View file

@ -0,0 +1,52 @@
#ifndef OPENRGBDEVICEPAGE_H
#define OPENRGBDEVICEPAGE_H
#include "ui_OpenRGBDevicePage.h"
#include "RGBController.h"
#include <QFrame>
namespace Ui {
class OpenRGBDevicePage;
}
class Ui::OpenRGBDevicePage : public QFrame
{
Q_OBJECT
public:
explicit OpenRGBDevicePage(RGBController *dev, QWidget *parent = nullptr);
~OpenRGBDevicePage();
private slots:
void on_ButtonRed_clicked();
void on_ButtonYellow_clicked();
void on_ButtonGreen_clicked();
void on_ButtonCyan_clicked();
void on_ButtonBlue_clicked();
void on_ButtonMagenta_clicked();
void on_ZoneBox_currentIndexChanged(int index);
void on_LEDBox_currentIndexChanged(int index);
void on_ModeBox_currentIndexChanged(int index);
void on_SetDeviceButton_clicked();
void on_SetZoneButton_clicked();
void on_SetLEDButton_clicked();
void on_RedSpinBox_valueChanged(int arg1);
void on_HueSpinBox_valueChanged(int arg1);
void on_GreenSpinBox_valueChanged(int arg1);
void on_SatSpinBox_valueChanged(int arg1);
void on_BlueSpinBox_valueChanged(int arg1);
void on_ValSpinBox_valueChanged(int arg1);
private:
Ui::OpenRGBDevicePageUi *ui;
RGBController *device;
bool UpdatingColor = false;
void updateRGB();
void updateHSV();
};
#endif // OPENRGBDEVICEPAGE_H

374
qt/OpenRGBDevicePage.ui Normal file
View file

@ -0,0 +1,374 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>OpenRGBDevicePageUi</class>
<widget class="QFrame" name="OpenRGBDevicePageUi">
<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>
<widget class="QComboBox" name="ZoneBox">
<property name="geometry">
<rect>
<x>71</x>
<y>50</y>
<width>160</width>
<height>22</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="ZoneLabel">
<property name="geometry">
<rect>
<x>31</x>
<y>50</y>
<width>40</width>
<height>22</height>
</rect>
</property>
<property name="text">
<string>Zone:</string>
</property>
</widget>
<widget class="QLabel" name="LEDLabel">
<property name="geometry">
<rect>
<x>31</x>
<y>90</y>
<width>40</width>
<height>22</height>
</rect>
</property>
<property name="text">
<string>LED:</string>
</property>
</widget>
<widget class="QComboBox" name="LEDBox">
<property name="geometry">
<rect>
<x>71</x>
<y>90</y>
<width>160</width>
<height>22</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="ModeLabel">
<property name="geometry">
<rect>
<x>31</x>
<y>210</y>
<width>40</width>
<height>22</height>
</rect>
</property>
<property name="text">
<string>Mode:</string>
</property>
</widget>
<widget class="QComboBox" name="ModeBox">
<property name="geometry">
<rect>
<x>71</x>
<y>210</y>
<width>160</width>
<height>22</height>
</rect>
</property>
</widget>
<widget class="QPushButton" name="SetLEDButton">
<property name="geometry">
<rect>
<x>190</x>
<y>150</y>
<width>41</width>
<height>22</height>
</rect>
</property>
<property name="text">
<string>LED</string>
</property>
</widget>
<widget class="QPushButton" name="SetZoneButton">
<property name="geometry">
<rect>
<x>130</x>
<y>150</y>
<width>41</width>
<height>22</height>
</rect>
</property>
<property name="text">
<string>Zone</string>
</property>
</widget>
<widget class="QSpinBox" name="RedSpinBox">
<property name="geometry">
<rect>
<x>310</x>
<y>120</y>
<width>50</width>
<height>22</height>
</rect>
</property>
<property name="maximum">
<number>255</number>
</property>
</widget>
<widget class="QSpinBox" name="GreenSpinBox">
<property name="geometry">
<rect>
<x>310</x>
<y>160</y>
<width>50</width>
<height>22</height>
</rect>
</property>
<property name="maximum">
<number>255</number>
</property>
</widget>
<widget class="QSpinBox" name="BlueSpinBox">
<property name="geometry">
<rect>
<x>310</x>
<y>200</y>
<width>50</width>
<height>22</height>
</rect>
</property>
<property name="maximum">
<number>255</number>
</property>
</widget>
<widget class="QLabel" name="RedLabel">
<property name="geometry">
<rect>
<x>290</x>
<y>120</y>
<width>20</width>
<height>22</height>
</rect>
</property>
<property name="text">
<string>R:</string>
</property>
</widget>
<widget class="QLabel" name="GreenLabel">
<property name="geometry">
<rect>
<x>290</x>
<y>160</y>
<width>20</width>
<height>22</height>
</rect>
</property>
<property name="text">
<string>G:</string>
</property>
</widget>
<widget class="QLabel" name="BlueLabel">
<property name="geometry">
<rect>
<x>290</x>
<y>200</y>
<width>20</width>
<height>22</height>
</rect>
</property>
<property name="text">
<string>B:</string>
</property>
</widget>
<widget class="QPushButton" name="ButtonGreen">
<property name="geometry">
<rect>
<x>350</x>
<y>250</y>
<width>21</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QPushButton" name="ButtonBlue">
<property name="geometry">
<rect>
<x>410</x>
<y>250</y>
<width>21</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QPushButton" name="ButtonCyan">
<property name="geometry">
<rect>
<x>380</x>
<y>250</y>
<width>21</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QPushButton" name="ButtonMagenta">
<property name="geometry">
<rect>
<x>440</x>
<y>250</y>
<width>21</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QPushButton" name="ButtonRed">
<property name="geometry">
<rect>
<x>290</x>
<y>250</y>
<width>21</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QPushButton" name="ButtonYellow">
<property name="geometry">
<rect>
<x>320</x>
<y>250</y>
<width>21</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QSpinBox" name="HueSpinBox">
<property name="geometry">
<rect>
<x>410</x>
<y>120</y>
<width>50</width>
<height>22</height>
</rect>
</property>
<property name="maximum">
<number>359</number>
</property>
</widget>
<widget class="QLabel" name="HueLabel">
<property name="geometry">
<rect>
<x>390</x>
<y>120</y>
<width>20</width>
<height>22</height>
</rect>
</property>
<property name="text">
<string>H:</string>
</property>
</widget>
<widget class="QLabel" name="SatLabel">
<property name="geometry">
<rect>
<x>390</x>
<y>160</y>
<width>20</width>
<height>22</height>
</rect>
</property>
<property name="text">
<string>S:</string>
</property>
</widget>
<widget class="QSpinBox" name="SatSpinBox">
<property name="geometry">
<rect>
<x>410</x>
<y>160</y>
<width>50</width>
<height>22</height>
</rect>
</property>
<property name="maximum">
<number>255</number>
</property>
</widget>
<widget class="QSpinBox" name="ValSpinBox">
<property name="geometry">
<rect>
<x>410</x>
<y>200</y>
<width>50</width>
<height>22</height>
</rect>
</property>
<property name="maximum">
<number>255</number>
</property>
</widget>
<widget class="QLabel" name="ValLabel">
<property name="geometry">
<rect>
<x>390</x>
<y>200</y>
<width>20</width>
<height>22</height>
</rect>
</property>
<property name="text">
<string>V:</string>
</property>
</widget>
<widget class="QPushButton" name="SetDeviceButton">
<property name="geometry">
<rect>
<x>70</x>
<y>150</y>
<width>41</width>
<height>22</height>
</rect>
</property>
<property name="text">
<string>Device</string>
</property>
</widget>
<widget class="QLabel" name="SetLabel">
<property name="geometry">
<rect>
<x>30</x>
<y>150</y>
<width>40</width>
<height>22</height>
</rect>
</property>
<property name="text">
<string>Set:</string>
</property>
</widget>
</widget>
<resources/>
<connections/>
</ui>

78
qt/OpenRGBDialog2.cpp Normal file
View file

@ -0,0 +1,78 @@
#include "OpenRGBDialog2.h"
#include "OpenRGBDevicePage.h"
#include "OpenAuraSDK.h"
#include <QLabel>
#include <QTabBar>
using namespace Ui;
OpenRGBDialog2::OpenRGBDialog2(std::vector<i2c_smbus_interface *>& bus, std::vector<RGBController *>& control, QWidget *parent) : QMainWindow(parent), busses(bus), controllers (control), ui(new OpenRGBDialog2Ui)
{
ui->setupUi(this);
QIcon logo(":OpenRGB.png");
setWindowIcon(logo);
/*-----------------------------------------------------*\
| Set up list of devices |
\*-----------------------------------------------------*/
QTabBar *DevicesTabBar = ui->DevicesTabBar->tabBar();
for(int dev_idx = 0; dev_idx < control.size(); dev_idx++)
{
OpenRGBDevicePage *NewPage = new OpenRGBDevicePage(control[dev_idx]);
ui->DevicesTabBar->addTab(NewPage, "");
/*-----------------------------------------------------*\
| 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 NewLabelString = "<html><table><tr><td width='30'><img src='";
switch(control[dev_idx]->type)
{
case DEVICE_TYPE_MOTHERBOARD:
NewLabelString += ":/motherboard.svg";
break;
case DEVICE_TYPE_DRAM:
NewLabelString += ":/ram.svg";
break;
case DEVICE_TYPE_GPU:
NewLabelString += ":/graphics-card.svg";
break;
case DEVICE_TYPE_COOLER:
NewLabelString += ":/fan.svg";
break;
case DEVICE_TYPE_LEDSTRIP:
//break;
case DEVICE_TYPE_KEYBOARD:
//break;
case DEVICE_TYPE_MOUSE:
//break;
case DEVICE_TYPE_HEADSET:
//break;
case DEVICE_TYPE_UNKNOWN:
NewLabelString += ":/keyboard.svg";
break;
}
NewLabelString += "' height='15' width='15'></td><td>" + QString::fromStdString(control[dev_idx]->name) + "</td></tr></table></html>";
QLabel *NewTabLabel = new QLabel();
NewTabLabel->setText(NewLabelString);
NewTabLabel->setIndent(20);
NewTabLabel->setGeometry(0, 0, 200, 20);
DevicesTabBar->setTabButton(dev_idx, QTabBar::LeftSide, NewTabLabel);
}
}
OpenRGBDialog2::~OpenRGBDialog2()
{
delete ui;
}
void OpenRGBDialog2::show()
{
QMainWindow::show();
}

39
qt/OpenRGBDialog2.h Normal file
View file

@ -0,0 +1,39 @@
#ifndef OPENRGBDIALOG2_H
#define OPENRGBDIALOG2_H
#include "ui_OpenRGBDialog2.h"
#include <vector>
#include "i2c_smbus.h"
#include "RGBController.h"
#include <QMainWindow>
#include <QTimer>
#include <QSystemTrayIcon>
#include <QMenu>
namespace Ui
{
class OpenRGBDialog2;
}
class Ui::OpenRGBDialog2 : public QMainWindow
{
Q_OBJECT
public:
explicit OpenRGBDialog2(std::vector<i2c_smbus_interface *>& bus, std::vector<RGBController *>& control, QWidget *parent = 0);
~OpenRGBDialog2();
void show();
void setMode(unsigned char mode_val);
protected:
std::vector<i2c_smbus_interface *>& busses;
std::vector<RGBController *>& controllers;
private:
Ui::OpenRGBDialog2Ui *ui;
};
#endif // OPENRGBDIALOG2_H

123
qt/OpenRGBDialog2.ui Normal file
View file

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>OpenRGBDialog2Ui</class>
<widget class="QMainWindow" name="OpenRGBDialog2Ui">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>700</width>
<height>350</height>
</rect>
</property>
<property name="windowTitle">
<string>OpenRGB</string>
</property>
<widget class="QWidget" name="centralWidget">
<widget class="QTabWidget" name="MainTabBar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>700</width>
<height>351</height>
</rect>
</property>
<property name="tabShape">
<enum>QTabWidget::Rounded</enum>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<property name="iconSize">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
<widget class="QWidget" name="TabDevices">
<attribute name="title">
<string>Devices</string>
</attribute>
<widget class="QTabWidget" name="DevicesTabBar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>700</width>
<height>320</height>
</rect>
</property>
<property name="tabPosition">
<enum>QTabWidget::West</enum>
</property>
</widget>
</widget>
<widget class="QWidget" name="TabEffects">
<attribute name="title">
<string>Synchronized Effects</string>
</attribute>
<widget class="QTabWidget" name="EffectsTabBar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>700</width>
<height>321</height>
</rect>
</property>
<property name="tabPosition">
<enum>QTabWidget::West</enum>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="TabStaticEffect">
<attribute name="title">
<string>Static</string>
</attribute>
</widget>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>Tab 2</string>
</attribute>
</widget>
</widget>
</widget>
<widget class="QWidget" name="TabInformation">
<attribute name="title">
<string>Information</string>
</attribute>
<widget class="QTabWidget" name="InformationTabBar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>700</width>
<height>321</height>
</rect>
</property>
<property name="tabPosition">
<enum>QTabWidget::West</enum>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="TabSystemInfo">
<attribute name="title">
<string>System</string>
</attribute>
</widget>
<widget class="QWidget" name="tab_4">
<attribute name="title">
<string>Tab 2</string>
</attribute>
</widget>
</widget>
</widget>
</widget>
</widget>
</widget>
<resources/>
<connections/>
</ui>

1
qt/fan.svg Normal file
View file

@ -0,0 +1 @@
<svg height="512pt" viewBox="0 0 512 512" width="512pt" xmlns="http://www.w3.org/2000/svg"><path d="m462 40c-5.519531 0-10 4.480469-10 10s4.480469 10 10 10 10-4.480469 10-10-4.480469-10-10-10zm0 0"/><path d="m462 452c-5.519531 0-10 4.480469-10 10s4.480469 10 10 10 10-4.480469 10-10-4.480469-10-10-10zm0 0"/><path d="m50 60c5.519531 0 10-4.480469 10-10s-4.480469-10-10-10-10 4.480469-10 10 4.480469 10 10 10zm0 0"/><path d="m50 452c-5.519531 0-10 4.480469-10 10s4.480469 10 10 10 10-4.480469 10-10-4.480469-10-10-10zm0 0"/><path d="m56 266h.25c5.410156-.140625 9.75-4.558594 9.75-10s-4.339844-9.859375-9.75-10c-.078125 0-.171875 0-.25 0-5.519531 0-10 4.480469-10 10s4.480469 10 10 10zm0 0"/><path d="m462 0h-412c-27.570312 0-50 22.429688-50 50v412c0 27.570312 22.429688 50 50 50h412c27.570312 0 50-22.429688 50-50v-412c0-27.570312-22.429688-50-50-50zm30 462c0 16.542969-13.457031 30-30 30h-412c-16.542969 0-30-13.457031-30-30v-412c0-16.542969 13.457031-30 30-30h412c16.542969 0 30 13.457031 30 30zm0 0"/><path d="m256 46c-102.023438 0-186.207031 72.140625-205.839844 168.1875-1.101562 5.410156 2.386719 10.695312 7.796875 11.800781 5.410157 1.101563 10.695313-2.386719 11.800781-7.796875 18.023438-88.183594 96.347657-152.191406 186.242188-152.191406 104.765625 0 190 85.234375 190 190s-85.234375 190-190 190c-90.453125 0-167.050781-62.621094-186.261719-152.285156-1.15625-5.398438-6.476562-8.839844-11.875-7.683594-5.398437 1.15625-8.839843 6.472656-7.683593 11.875 20.566406 95.96875 102.238281 168.09375 205.820312 168.09375 116.34375 0 210-93.570312 210-210 0-115.792969-94.207031-210-210-210zm0 0"/><path d="m366 176c0-49.625-40.375-90-90-90h-20c-5.523438 0-10 4.476562-10 10v83.390625c-16.683594-20.613281-42.121094-33.390625-70-33.390625-49.625 0-90 40.375-90 90v20c0 5.523438 4.476562 9.988281 10 9.988281h83.390625c-20.613281 16.6875-33.390625 42.132813-33.390625 70.011719 0 49.625 40.375 90 90 90h20c5.523438 0 10-4.476562 10-10v-83.390625c16.683594 20.613281 42.121094 33.390625 70 33.390625 49.625 0 90-40.375 90-90v-20c0-5.523438-4.476562-10-10-10h-83.390625c20.613281-16.683594 33.390625-42.121094 33.390625-70zm-90-70c38.597656 0 70 31.402344 70 70 0 28.402344-17.035156 53.550781-42.503906 64.390625-5.566406-16.921875-19.910156-29.785156-37.496094-33.375v-101.015625zm-18.097656 179.9375c-16.96875 1.023438-30.847656-11.925781-31.839844-28.035156-1.054688-17.496094 12.804688-31.902344 29.9375-31.902344 16.417969 0 30 13.316406 30 30 0 15.816406-12.351562 28.96875-28.097656 29.9375zm-151.902344-49.9375c0-38.597656 31.402344-70 70-70 28.402344 0 53.550781 17.035156 64.390625 42.503906-16.921875 5.566406-29.785156 19.910156-33.375 37.496094h-101.015625zm130 170c-38.597656 0-70-31.402344-70-70 0-28.402344 17.035156-53.550781 42.503906-64.390625 5.566406 16.921875 19.910156 29.785156 37.496094 33.375v101.015625zm170-130c0 38.597656-31.402344 70-70 70-28.402344 0-53.550781-17.035156-64.390625-42.503906 16.921875-5.566406 29.785156-19.910156 33.375-37.496094h101.015625zm0 0"/></svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

1
qt/graphics-card.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 7.1 KiB

157
qt/hsv.cpp Normal file
View file

@ -0,0 +1,157 @@
/*
* RGB <--> HSV conversion in integer arithmetics, to be used on Windows.
* Copyright (c) 2013 Martin Mitas
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
#include "hsv.h"
#define MIN(a,b) ((a) < (b) ? (a) : (b))
#define MAX(a,b) ((a) > (b) ? (a) : (b))
#define MIN3(a,b,c) MIN((a), MIN((b), (c)))
#define MAX3(a,b,c) MAX((a), MAX((b), (c)))
#define RGBGetRValue(rgb) (rgb & 0x000000FF)
#define RGBGetGValue(rgb) ((rgb >> 8) & 0x000000FF)
#define RGBGetBValue(rgb) ((rgb >> 16) & 0x000000FF)
#define ToRGBColor(r, g, b) ((b << 16) | (g << 8) | (r))
void rgb2hsv(unsigned int rgb, hsv_t* hsv)
{
int r = RGBGetRValue(rgb);
int g = RGBGetGValue(rgb);
int b = RGBGetBValue(rgb);
int m = MIN3(r, g, b);
int M = MAX3(r, g, b);
int delta = M - m;
if (delta == 0) {
/* Achromatic case (i.e. grayscale) */
hsv->hue = -1; /* undefined */
hsv->saturation = 0;
}
else {
int h;
if (r == M)
h = ((g - b) * 60 * HUE_DEGREE) / delta;
else if (g == M)
h = ((b - r) * 60 * HUE_DEGREE) / delta + 120 * HUE_DEGREE;
else /*if(b == M)*/
h = ((r - g) * 60 * HUE_DEGREE) / delta + 240 * HUE_DEGREE;
if (h < 0)
h += 360 * HUE_DEGREE;
hsv->hue = h;
/* The constatnt 8 is tuned to statistically cause as little
* tolerated mismatches as possible in RGB -> HSV -> RGB conversion.
* (See the unit test at the bottom of this file.)
*/
hsv->saturation = (256 * delta - 8) / M;
}
hsv->value = M;
}
unsigned int hsv2rgb(hsv_t* hsv)
{
unsigned char r, g, b;
if (hsv->saturation == 0) {
r = g = b = hsv->value;
}
else {
int h = (hsv->hue)%360;
int s = hsv->saturation;
int v = hsv->value;
int i = h / (60 * HUE_DEGREE);
int p = (256 * v - s*v) / 256;
if (i & 1) {
int q = (256 * 60 * HUE_DEGREE*v - h*s*v + 60 * HUE_DEGREE*s*v*i) / (256 * 60 * HUE_DEGREE);
switch (i) {
case 1: r = q; g = v; b = p; break;
case 3: r = p; g = q; b = v; break;
case 5: r = v; g = p; b = q; break;
}
}
else {
int t = (256 * 60 * HUE_DEGREE*v + h*s*v - 60 * HUE_DEGREE*s*v*(i + 1)) / (256 * 60 * HUE_DEGREE);
switch (i) {
case 0: r = v; g = t; b = p; break;
case 2: r = p; g = v; b = t; break;
case 4: r = t; g = p; b = v; break;
}
}
}
return ToRGBColor(r, g, b);
}
#ifdef TEST
#include <stdio.h>
#define DIFF(a,b) ((a) >= (b) ? (a) - (b) : (b) - (a))
int
main(int argc, char** argv)
{
int r0, g0, b0;
hsv_t hsv;
int r1, g1, b1;
int ok = 0, fuzzy = 0, ko = 0, total;
for (r0 = 0; r0 < 256; r0++) {
for (g0 = 0; g0 < 256; g0++) {
for (b0 = 0; b0 < 256; b0++) {
COLORREF tmp;
rgb2hsv(RGB(r0, g0, b0), &hsv);
tmp = hsv2rgb(&hsv);
r1 = GetRValue(tmp);
g1 = GetGValue(tmp);
b1 = GetBValue(tmp);
if (r0 == r1 && b0 == b1 && g0 == g1)
ok++;
else if (DIFF(r0, r1) <= 1 && DIFF(b0, b1) <= 1 && DIFF(g0, g1) <= 1)
fuzzy++;
else
ko++;
}
}
}
total = ok + fuzzy + ko;
printf("Test results:\n");
printf(" * exact matches: %8d (%5.2f%%)\n", ok, (100.0 * ok) / total);
printf(" * fuzzy matches: %8d (%5.2f%%)\n", fuzzy, (100.0 * fuzzy) / total);
printf(" * mismatches: %8d (%5.2f%%)\n", ko, (100.0 * ko) / total);
return (ko == 0 ? 0 : 1);
}
#endif /* TEST */

42
qt/hsv.h Normal file
View file

@ -0,0 +1,42 @@
/*
* RGB <--> HSV conversion in integer arithmetics, to be used on Windows.
* Copyright (c) 2013 Martin Mitas
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
#ifndef HSV_H
#define HSV_H
#define HUE_DEGREE 1
typedef struct hsv_tag hsv_t;
struct hsv_tag {
unsigned int hue; /* 0 ... (360*HUE_DEGREE - 1) */
unsigned char saturation; /* 0 ... 255 */
unsigned char value; /* 0 ... 255 */
};
void rgb2hsv(unsigned int rgb, hsv_t* hsv);
unsigned int hsv2rgb(hsv_t* hsv);
#endif /* HSV_H */

82
qt/keyboard.svg Normal file
View file

@ -0,0 +1,82 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 463 463" style="enable-background:new 0 0 463 463;" xml:space="preserve">
<g>
<g>
<g>
<path d="M431.5,120h-400C14.131,120,0,134.131,0,151.5v160C0,328.869,14.131,343,31.5,343h400c17.369,0,31.5-14.131,31.5-31.5
v-160C463,134.131,448.869,120,431.5,120z M448,311.5c0,9.099-7.402,16.5-16.5,16.5h-400c-9.098,0-16.5-7.401-16.5-16.5v-160
c0-9.099,7.402-16.5,16.5-16.5h400c9.098,0,16.5,7.401,16.5,16.5V311.5z"/>
<path d="M327.5,280h-192c-4.142,0-7.5,3.357-7.5,7.5s3.358,7.5,7.5,7.5h192c4.142,0,7.5-3.357,7.5-7.5S331.642,280,327.5,280z"/>
<path d="M103.5,280h-16c-4.142,0-7.5,3.357-7.5,7.5s3.358,7.5,7.5,7.5h16c4.142,0,7.5-3.357,7.5-7.5S107.642,280,103.5,280z"/>
<path d="M55.5,280h-16c-4.142,0-7.5,3.357-7.5,7.5s3.358,7.5,7.5,7.5h16c4.142,0,7.5-3.357,7.5-7.5S59.642,280,55.5,280z"/>
<path d="M423.5,280h-16c-4.142,0-7.5,3.357-7.5,7.5s3.358,7.5,7.5,7.5h16c4.142,0,7.5-3.357,7.5-7.5S427.642,280,423.5,280z"/>
<path d="M375.5,280h-16c-4.142,0-7.5,3.357-7.5,7.5s3.358,7.5,7.5,7.5h16c4.142,0,7.5-3.357,7.5-7.5S379.642,280,375.5,280z"/>
<path d="M423.5,248h-32c-4.142,0-7.5,3.357-7.5,7.5s3.358,7.5,7.5,7.5h32c4.142,0,7.5-3.357,7.5-7.5S427.642,248,423.5,248z"/>
<path d="M367,255.5c0-4.143-3.358-7.5-7.5-7.5h-16c-4.142,0-7.5,3.357-7.5,7.5s3.358,7.5,7.5,7.5h16
C363.642,263,367,259.643,367,255.5z"/>
<path d="M295.5,263h16c4.142,0,7.5-3.357,7.5-7.5s-3.358-7.5-7.5-7.5h-16c-4.142,0-7.5,3.357-7.5,7.5S291.358,263,295.5,263z"/>
<path d="M247.5,263h16c4.142,0,7.5-3.357,7.5-7.5s-3.358-7.5-7.5-7.5h-16c-4.142,0-7.5,3.357-7.5,7.5S243.358,263,247.5,263z"/>
<path d="M199.5,263h16c4.142,0,7.5-3.357,7.5-7.5s-3.358-7.5-7.5-7.5h-16c-4.142,0-7.5,3.357-7.5,7.5S195.358,263,199.5,263z"/>
<path d="M151.5,263h16c4.142,0,7.5-3.357,7.5-7.5s-3.358-7.5-7.5-7.5h-16c-4.142,0-7.5,3.357-7.5,7.5S147.358,263,151.5,263z"/>
<path d="M119.5,248h-16c-4.142,0-7.5,3.357-7.5,7.5s3.358,7.5,7.5,7.5h16c4.142,0,7.5-3.357,7.5-7.5S123.642,248,119.5,248z"/>
<path d="M71.5,248h-32c-4.142,0-7.5,3.357-7.5,7.5s3.358,7.5,7.5,7.5h32c4.142,0,7.5-3.357,7.5-7.5S75.642,248,71.5,248z"/>
<path d="M423.5,184h-32c-4.142,0-7.5,3.357-7.5,7.5s3.358,7.5,7.5,7.5h32c4.142,0,7.5-3.357,7.5-7.5S427.642,184,423.5,184z"/>
<path d="M343.5,199h16c4.142,0,7.5-3.357,7.5-7.5s-3.358-7.5-7.5-7.5h-16c-4.142,0-7.5,3.357-7.5,7.5S339.358,199,343.5,199z"/>
<path d="M295.5,199h16c4.142,0,7.5-3.357,7.5-7.5s-3.358-7.5-7.5-7.5h-16c-4.142,0-7.5,3.357-7.5,7.5S291.358,199,295.5,199z"/>
<path d="M247.5,199h16c4.142,0,7.5-3.357,7.5-7.5s-3.358-7.5-7.5-7.5h-16c-4.142,0-7.5,3.357-7.5,7.5S243.358,199,247.5,199z"/>
<path d="M199.5,199h16c4.142,0,7.5-3.357,7.5-7.5s-3.358-7.5-7.5-7.5h-16c-4.142,0-7.5,3.357-7.5,7.5S195.358,199,199.5,199z"/>
<path d="M151.5,199h16c4.142,0,7.5-3.357,7.5-7.5s-3.358-7.5-7.5-7.5h-16c-4.142,0-7.5,3.357-7.5,7.5S147.358,199,151.5,199z"/>
<path d="M103.5,199h16c4.142,0,7.5-3.357,7.5-7.5s-3.358-7.5-7.5-7.5h-16c-4.142,0-7.5,3.357-7.5,7.5S99.358,199,103.5,199z"/>
<path d="M39.5,199h32c4.142,0,7.5-3.357,7.5-7.5s-3.358-7.5-7.5-7.5h-32c-4.142,0-7.5,3.357-7.5,7.5S35.358,199,39.5,199z"/>
<path d="M423.5,216h-16c-4.142,0-7.5,3.357-7.5,7.5s3.358,7.5,7.5,7.5h16c4.142,0,7.5-3.357,7.5-7.5S427.642,216,423.5,216z"/>
<path d="M375.5,216h-16c-4.142,0-7.5,3.357-7.5,7.5s3.358,7.5,7.5,7.5h16c4.142,0,7.5-3.357,7.5-7.5S379.642,216,375.5,216z"/>
<path d="M327.5,216h-16c-4.142,0-7.5,3.357-7.5,7.5s3.358,7.5,7.5,7.5h16c4.142,0,7.5-3.357,7.5-7.5S331.642,216,327.5,216z"/>
<path d="M279.5,216h-16c-4.142,0-7.5,3.357-7.5,7.5s3.358,7.5,7.5,7.5h16c4.142,0,7.5-3.357,7.5-7.5S283.642,216,279.5,216z"/>
<path d="M231.5,216h-16c-4.142,0-7.5,3.357-7.5,7.5s3.358,7.5,7.5,7.5h16c4.142,0,7.5-3.357,7.5-7.5S235.642,216,231.5,216z"/>
<path d="M183.5,216h-16c-4.142,0-7.5,3.357-7.5,7.5s3.358,7.5,7.5,7.5h16c4.142,0,7.5-3.357,7.5-7.5S187.642,216,183.5,216z"/>
<path d="M135.5,216h-16c-4.142,0-7.5,3.357-7.5,7.5s3.358,7.5,7.5,7.5h16c4.142,0,7.5-3.357,7.5-7.5S139.642,216,135.5,216z"/>
<path d="M39.5,231h48c4.142,0,7.5-3.357,7.5-7.5s-3.358-7.5-7.5-7.5h-48c-4.142,0-7.5,3.357-7.5,7.5S35.358,231,39.5,231z"/>
<path d="M423.5,152h-16c-4.142,0-7.5,3.357-7.5,7.5s3.358,7.5,7.5,7.5h16c4.142,0,7.5-3.357,7.5-7.5S427.642,152,423.5,152z"/>
<path d="M375.5,152h-16c-4.142,0-7.5,3.357-7.5,7.5s3.358,7.5,7.5,7.5h16c4.142,0,7.5-3.357,7.5-7.5S379.642,152,375.5,152z"/>
<path d="M327.5,152h-16c-4.142,0-7.5,3.357-7.5,7.5s3.358,7.5,7.5,7.5h16c4.142,0,7.5-3.357,7.5-7.5S331.642,152,327.5,152z"/>
<path d="M263.5,167h16c4.142,0,7.5-3.357,7.5-7.5s-3.358-7.5-7.5-7.5h-16c-4.142,0-7.5,3.357-7.5,7.5S259.358,167,263.5,167z"/>
<path d="M215.5,167h16c4.142,0,7.5-3.357,7.5-7.5s-3.358-7.5-7.5-7.5h-16c-4.142,0-7.5,3.357-7.5,7.5S211.358,167,215.5,167z"/>
<path d="M167.5,167h16c4.142,0,7.5-3.357,7.5-7.5s-3.358-7.5-7.5-7.5h-16c-4.142,0-7.5,3.357-7.5,7.5S163.358,167,167.5,167z"/>
<path d="M119.5,167h16c4.142,0,7.5-3.357,7.5-7.5s-3.358-7.5-7.5-7.5h-16c-4.142,0-7.5,3.357-7.5,7.5S115.358,167,119.5,167z"/>
<path d="M39.5,167h48c4.142,0,7.5-3.357,7.5-7.5s-3.358-7.5-7.5-7.5h-48c-4.142,0-7.5,3.357-7.5,7.5S35.358,167,39.5,167z"/>
</g>
</g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.4 KiB

80
qt/motherboard.svg Normal file
View file

@ -0,0 +1,80 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
<g>
<g>
<path d="M497,0H15C6.716,0,0,6.716,0,15v482c0,8.284,6.716,15,15,15h482c8.284,0,15-6.716,15-15V15C512,6.716,505.284,0,497,0z
M482,482H30V30h452V482z"/>
</g>
</g>
<g>
<g>
<path d="M216.974,330.026H90c-8.284,0-15,6.716-15,15V432c0,8.284,6.716,15,15,15h126.974c8.284,0,15-6.716,15-15v-86.974
C231.974,336.742,225.258,330.026,216.974,330.026z M138.487,417H105v-56.974h33.487V417z M201.974,417h-33.487v-56.974h33.487
V417z"/>
</g>
</g>
<g>
<g>
<path d="M90,65c-8.284,0-15,6.716-15,15v191c0,8.284,6.716,15,15,15s15-6.716,15-15V80C105,71.716,98.284,65,90,65z"/>
</g>
</g>
<g>
<g>
<path d="M153.487,65c-8.284,0-15,6.716-15,15v191c0,8.284,6.716,15,15,15s15-6.716,15-15V80C168.487,71.716,161.771,65,153.487,65
z"/>
</g>
</g>
<g>
<g>
<path d="M442,181.974h-35V165h35c8.284,0,15-6.716,15-15s-6.716-15-15-15h-35v-5c0-8.284-6.716-15-15-15h-5V80
c0-8.284-6.716-15-15-15s-15,6.716-15,15v35h-16.974V80c0-8.284-6.716-15-15-15s-15,6.716-15,15v35h-5c-8.284,0-15,6.716-15,15v5
h-35c-8.284,0-15,6.716-15,15s6.716,15,15,15h35v16.974h-35c-8.284,0-15,6.716-15,15s6.716,15,15,15h35v5c0,8.284,6.716,15,15,15
h5v35c0,8.284,6.716,15,15,15s15-6.716,15-15v-35H357v35c0,8.284,6.716,15,15,15s15-6.716,15-15v-35h5c8.284,0,15-6.716,15-15v-5
h35c8.284,0,15-6.716,15-15S450.284,181.974,442,181.974z M377,201.974h-56.974V145H377V201.974z"/>
</g>
</g>
<g>
<g>
<path d="M392,330.026h-86.974c-8.284,0-15,6.716-15,15s6.716,15,15,15H392c8.284,0,15-6.716,15-15S400.284,330.026,392,330.026z"
/>
</g>
</g>
<g>
<g>
<path d="M392,393.513h-86.974c-8.284,0-15,6.716-15,15s6.716,15,15,15H392c8.284,0,15-6.716,15-15S400.284,393.513,392,393.513z"
/>
</g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

5
qt/mouse.svg Normal file
View file

@ -0,0 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 401.396 401.396" xmlns:xlink="http://www.w3.org/1999/xlink" enable-background="new 0 0 401.396 401.396">
<path d="m200.698,0c-68.997,0-125.13,56.133-125.13,125.129v151.137c0,68.997 56.133,125.129 125.13,125.129s125.129-56.133 125.129-125.129v-151.137c0-68.996-56.132-125.129-125.129-125.129zm110.129,125.129v1.973c-32.303,16.982-68.429,26.282-105.133,27.057v-41.835c10.585-2.298 18.539-11.734 18.539-22.997v-31.367c0-11.263-7.954-20.699-18.539-22.997v-19.845c58.416,2.622 105.133,50.961 105.133,110.011zm-110.129-80.705c7.463-7.10543e-15 13.536,6.072 13.536,13.536v31.368c0,7.463-6.072,13.536-13.536,13.536s-13.536-6.072-13.536-13.536v-31.368c0-7.463 6.073-13.536 13.536-13.536zm-5.003-29.305v19.846c-10.581,2.301-18.532,11.735-18.532,22.995v31.368c0,11.26 7.951,20.694 18.532,22.995v41.837c-36.699-0.775-72.823-10.076-105.126-27.059v-1.971c-0.001-59.049 46.714-107.386 105.126-110.011zm5.003,371.277c-60.726-5.68434e-14-110.13-49.404-110.13-110.129v-137.928c34.015,16.958 71.851,25.88 110.126,25.88 38.28,0 76.118-8.921 110.133-25.878v137.925c0,60.726-49.403,110.13-110.129,110.13z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

1
qt/ram.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.5 KiB

View file

@ -1,5 +1,11 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
<file>OpenRGB.png</file>
</qresource>
<RCC>
<qresource prefix="/">
<file>OpenRGB.png</file>
<file>motherboard.svg</file>
<file>ram.svg</file>
<file>graphics-card.svg</file>
<file>fan.svg</file>
<file>keyboard.svg</file>
<file>mouse.svg</file>
</qresource>
</RCC>