Rename dialog components from OpenAuraSDK to OpenRGB
This commit is contained in:
parent
f0c486c30d
commit
ffd0088378
5 changed files with 33 additions and 48 deletions
|
|
@ -22,7 +22,7 @@ INCLUDEPATH += \
|
|||
SOURCES += \
|
||||
main.cpp \
|
||||
OpenAuraSDK.cpp \
|
||||
qt/OpenAuraSDKQtDialog.cpp \
|
||||
qt/OpenRGBDialog.cpp \
|
||||
i2c_smbus/i2c_smbus.cpp \
|
||||
net_port/net_port.cpp \
|
||||
serial_port/serial_port.cpp \
|
||||
|
|
@ -49,7 +49,7 @@ SOURCES += \
|
|||
RGBController/RGBController_RGBFusion.cpp
|
||||
|
||||
HEADERS += \
|
||||
qt/OpenAuraSDKQtDialog.h \
|
||||
qt/OpenRGBDialog.h \
|
||||
i2c_smbus/i2c_smbus.h \
|
||||
net_port/net_port.h \
|
||||
serial_port/serial_port.h \
|
||||
|
|
@ -71,7 +71,7 @@ RESOURCES += \
|
|||
qt/resources.qrc
|
||||
|
||||
FORMS += \
|
||||
qt/openaurasdk.ui
|
||||
qt/OpenRGBDialog.ui
|
||||
|
||||
#-----------------------------------------------
|
||||
# Windows specific project configuration
|
||||
|
|
|
|||
19
main.cpp
19
main.cpp
|
|
@ -13,7 +13,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "OpenAuraSDKQtDialog.h"
|
||||
#include "OpenRGBDialog.h"
|
||||
|
||||
|
||||
extern std::vector<i2c_smbus_interface*> busses;
|
||||
|
|
@ -33,23 +33,8 @@ int main(int argc, char* argv[])
|
|||
|
||||
QApplication a(argc, argv);
|
||||
|
||||
Ui::OpenAuraSDKQtDialog dlg(busses, rgb_controllers);
|
||||
Ui::OpenRGBDialog dlg(busses, rgb_controllers);
|
||||
dlg.show();
|
||||
|
||||
return a.exec();
|
||||
}
|
||||
|
||||
/******************************************************************************************\
|
||||
* *
|
||||
* wWinMain *
|
||||
* *
|
||||
* Entry point for Windows. Calls main(). *
|
||||
* *
|
||||
\******************************************************************************************/
|
||||
|
||||
#ifdef WIN32
|
||||
//int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine, int nCmdShow)
|
||||
//{
|
||||
// main(0, NULL);
|
||||
//}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
#include "OpenAuraSDKQtDialog.h"
|
||||
#include "OpenRGBDialog.h"
|
||||
#include "OpenAuraSDK.h"
|
||||
|
||||
using namespace Ui;
|
||||
|
||||
OpenAuraSDKQtDialog::OpenAuraSDKQtDialog(std::vector<i2c_smbus_interface *>& bus, std::vector<RGBController *>& control, QWidget *parent) : QMainWindow(parent), busses(bus), controllers (control), ui(new OpenAuraSDKQtDialogUi)
|
||||
OpenRGBDialog::OpenRGBDialog(std::vector<i2c_smbus_interface *>& bus, std::vector<RGBController *>& control, QWidget *parent) : QMainWindow(parent), busses(bus), controllers (control), ui(new OpenRGBDialogUi)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
|
|
@ -63,59 +63,59 @@ OpenAuraSDKQtDialog::OpenAuraSDKQtDialog(std::vector<i2c_smbus_interface *>& bus
|
|||
ui->ComboDevices->setCurrentIndex(0);
|
||||
}
|
||||
|
||||
OpenAuraSDKQtDialog::~OpenAuraSDKQtDialog()
|
||||
OpenRGBDialog::~OpenRGBDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void OpenAuraSDKQtDialog::show()
|
||||
void OpenRGBDialog::show()
|
||||
{
|
||||
QMainWindow::show();
|
||||
}
|
||||
|
||||
void Ui::OpenAuraSDKQtDialog::on_ButtonRed_clicked()
|
||||
void Ui::OpenRGBDialog::on_ButtonRed_clicked()
|
||||
{
|
||||
ui->EditLED0R->setText("255");
|
||||
ui->EditLED0G->setText("0");
|
||||
ui->EditLED0B->setText("0");
|
||||
}
|
||||
|
||||
void Ui::OpenAuraSDKQtDialog::on_ButtonYellow_clicked()
|
||||
void Ui::OpenRGBDialog::on_ButtonYellow_clicked()
|
||||
{
|
||||
ui->EditLED0R->setText("255");
|
||||
ui->EditLED0G->setText("255");
|
||||
ui->EditLED0B->setText("0");
|
||||
}
|
||||
|
||||
void Ui::OpenAuraSDKQtDialog::on_ButtonGreen_clicked()
|
||||
void Ui::OpenRGBDialog::on_ButtonGreen_clicked()
|
||||
{
|
||||
ui->EditLED0R->setText("0");
|
||||
ui->EditLED0G->setText("255");
|
||||
ui->EditLED0B->setText("0");
|
||||
}
|
||||
|
||||
void Ui::OpenAuraSDKQtDialog::on_ButtonCyan_clicked()
|
||||
void Ui::OpenRGBDialog::on_ButtonCyan_clicked()
|
||||
{
|
||||
ui->EditLED0R->setText("0");
|
||||
ui->EditLED0G->setText("255");
|
||||
ui->EditLED0B->setText("255");
|
||||
}
|
||||
|
||||
void Ui::OpenAuraSDKQtDialog::on_ButtonBlue_clicked()
|
||||
void Ui::OpenRGBDialog::on_ButtonBlue_clicked()
|
||||
{
|
||||
ui->EditLED0R->setText("0");
|
||||
ui->EditLED0G->setText("0");
|
||||
ui->EditLED0B->setText("255");
|
||||
}
|
||||
|
||||
void Ui::OpenAuraSDKQtDialog::on_ButtonMagenta_clicked()
|
||||
void Ui::OpenRGBDialog::on_ButtonMagenta_clicked()
|
||||
{
|
||||
ui->EditLED0R->setText("255");
|
||||
ui->EditLED0G->setText("0");
|
||||
ui->EditLED0B->setText("255");
|
||||
}
|
||||
|
||||
void Ui::OpenAuraSDKQtDialog::on_ButtonSetAll_clicked()
|
||||
void Ui::OpenRGBDialog::on_ButtonSetAll_clicked()
|
||||
{
|
||||
RGBColor color = ToRGBColor(
|
||||
ui->EditLED0R->text().toInt(),
|
||||
|
|
@ -130,7 +130,7 @@ void Ui::OpenAuraSDKQtDialog::on_ButtonSetAll_clicked()
|
|||
}
|
||||
}
|
||||
|
||||
void Ui::OpenAuraSDKQtDialog::on_ButtonSetDevice_clicked()
|
||||
void Ui::OpenRGBDialog::on_ButtonSetDevice_clicked()
|
||||
{
|
||||
RGBColor color = ToRGBColor(
|
||||
ui->EditLED0R->text().toInt(),
|
||||
|
|
@ -141,7 +141,7 @@ void Ui::OpenAuraSDKQtDialog::on_ButtonSetDevice_clicked()
|
|||
controllers[ui->ComboDevices->currentIndex()]->SetAllLEDs(color);
|
||||
}
|
||||
|
||||
void Ui::OpenAuraSDKQtDialog::on_ButtonSetZone_clicked()
|
||||
void Ui::OpenRGBDialog::on_ButtonSetZone_clicked()
|
||||
{
|
||||
RGBColor color = ToRGBColor(
|
||||
ui->EditLED0R->text().toInt(),
|
||||
|
|
@ -152,7 +152,7 @@ void Ui::OpenAuraSDKQtDialog::on_ButtonSetZone_clicked()
|
|||
controllers[ui->ComboDevices->currentIndex()]->SetAllZoneLEDs(ui->ComboZones->currentIndex(), color);
|
||||
}
|
||||
|
||||
void Ui::OpenAuraSDKQtDialog::on_ButtonSetLED_clicked()
|
||||
void Ui::OpenRGBDialog::on_ButtonSetLED_clicked()
|
||||
{
|
||||
RGBColor color = ToRGBColor(
|
||||
ui->EditLED0R->text().toInt(),
|
||||
|
|
@ -163,7 +163,7 @@ void Ui::OpenAuraSDKQtDialog::on_ButtonSetLED_clicked()
|
|||
controllers[ui->ComboDevices->currentIndex()]->SetLED(ui->ComboLEDs->currentIndex(), color);
|
||||
}
|
||||
|
||||
void Ui::OpenAuraSDKQtDialog::on_ComboDevices_currentIndexChanged(int index)
|
||||
void Ui::OpenRGBDialog::on_ComboDevices_currentIndexChanged(int index)
|
||||
{
|
||||
ui->ComboModes->clear();
|
||||
|
||||
|
|
@ -193,7 +193,7 @@ void Ui::OpenAuraSDKQtDialog::on_ComboDevices_currentIndexChanged(int index)
|
|||
ui->ComboLEDs->setCurrentIndex(0);
|
||||
}
|
||||
|
||||
void Ui::OpenAuraSDKQtDialog::on_ComboModes_currentIndexChanged(int index)
|
||||
void Ui::OpenRGBDialog::on_ComboModes_currentIndexChanged(int index)
|
||||
{
|
||||
controllers[ui->ComboDevices->currentIndex()]->SetMode(ui->ComboModes->currentIndex());
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef OPENAURASDKQTDIALOG_H
|
||||
#define OPENAURASDKQTDIALOG_H
|
||||
#ifndef OPENRGBDIALOG_H
|
||||
#define OPENRGBDIALOG_H
|
||||
|
||||
#include "ui_openaurasdk.h"
|
||||
#include "ui_OpenRGBDialog.h"
|
||||
|
||||
#include <vector>
|
||||
#include "i2c_smbus.h"
|
||||
|
|
@ -14,16 +14,16 @@
|
|||
|
||||
namespace Ui
|
||||
{
|
||||
class OpenAuraSDKQtDialog;
|
||||
class OpenRGBDialog;
|
||||
}
|
||||
|
||||
class Ui::OpenAuraSDKQtDialog : public QMainWindow
|
||||
class Ui::OpenRGBDialog : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit OpenAuraSDKQtDialog(std::vector<i2c_smbus_interface *>& bus, std::vector<RGBController *>& control, QWidget *parent = 0);
|
||||
~OpenAuraSDKQtDialog();
|
||||
explicit OpenRGBDialog(std::vector<i2c_smbus_interface *>& bus, std::vector<RGBController *>& control, QWidget *parent = 0);
|
||||
~OpenRGBDialog();
|
||||
|
||||
void show();
|
||||
void setMode(unsigned char mode_val);
|
||||
|
|
@ -53,7 +53,7 @@ private slots:
|
|||
void on_ComboModes_currentIndexChanged(int index);
|
||||
|
||||
private:
|
||||
Ui::OpenAuraSDKQtDialogUi *ui;
|
||||
Ui::OpenRGBDialogUi *ui;
|
||||
};
|
||||
|
||||
#endif // OPENAURASDKQTDIALOG_H
|
||||
#endif // OPENRGBDIALOG_H
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>OpenAuraSDKQtDialogUi</class>
|
||||
<widget class="QMainWindow" name="OpenAuraSDKQtDialogUi">
|
||||
<class>OpenRGBDialogUi</class>
|
||||
<widget class="QMainWindow" name="OpenRGBDialogUi">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>OpenAuraSDK</string>
|
||||
<string>OpenRGB</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralWidget">
|
||||
<widget class="QPushButton" name="ButtonSetAll">
|
||||
Loading…
Add table
Add a link
Reference in a new issue