Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4c1ec2f187 | ||
|
|
7dadc8d9ee | ||
|
|
cd7146d611 | ||
|
|
853833d18a | ||
|
|
c500803d95 |
@@ -101,6 +101,7 @@ HEADERS += \
|
|||||||
i2c_smbus/i2c_smbus.h \
|
i2c_smbus/i2c_smbus.h \
|
||||||
i2c_tools/i2c_tools.h \
|
i2c_tools/i2c_tools.h \
|
||||||
net_port/net_port.h \
|
net_port/net_port.h \
|
||||||
|
qt/DeviceView.h \
|
||||||
qt/OpenRGBDialog2.h \
|
qt/OpenRGBDialog2.h \
|
||||||
qt/OpenRGBProfileSaveDialog.h \
|
qt/OpenRGBProfileSaveDialog.h \
|
||||||
qt/OpenRGBServerInfoPage.h \
|
qt/OpenRGBServerInfoPage.h \
|
||||||
@@ -225,6 +226,7 @@ SOURCES += \
|
|||||||
i2c_smbus/i2c_smbus.cpp \
|
i2c_smbus/i2c_smbus.cpp \
|
||||||
i2c_tools/i2c_tools.cpp \
|
i2c_tools/i2c_tools.cpp \
|
||||||
net_port/net_port.cpp \
|
net_port/net_port.cpp \
|
||||||
|
qt/DeviceView.cpp \
|
||||||
qt/OpenRGBDialog2.cpp \
|
qt/OpenRGBDialog2.cpp \
|
||||||
qt/OpenRGBProfileSaveDialog.cpp \
|
qt/OpenRGBProfileSaveDialog.cpp \
|
||||||
qt/OpenRGBServerInfoPage.cpp \
|
qt/OpenRGBServerInfoPage.cpp \
|
||||||
|
|||||||
@@ -1327,9 +1327,31 @@ void RGBController::SetMode(int mode)
|
|||||||
UpdateMode();
|
UpdateMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RGBController::RegisterUpdateCallback(RGBControllerCallback new_callback, void * new_callback_arg)
|
||||||
|
{
|
||||||
|
UpdateCallbacks.push_back(new_callback);
|
||||||
|
UpdateCallbackArgs.push_back(new_callback_arg);
|
||||||
|
}
|
||||||
|
|
||||||
|
void RGBController::SignalUpdate()
|
||||||
|
{
|
||||||
|
UpdateMutex.lock();
|
||||||
|
|
||||||
|
/*-------------------------------------------------*\
|
||||||
|
| Client info has changed, call the callbacks |
|
||||||
|
\*-------------------------------------------------*/
|
||||||
|
for(unsigned int callback_idx = 0; callback_idx < UpdateCallbacks.size(); callback_idx++)
|
||||||
|
{
|
||||||
|
UpdateCallbacks[callback_idx](UpdateCallbackArgs[callback_idx]);
|
||||||
|
}
|
||||||
|
|
||||||
|
UpdateMutex.unlock();
|
||||||
|
}
|
||||||
void RGBController::UpdateLEDs()
|
void RGBController::UpdateLEDs()
|
||||||
{
|
{
|
||||||
CallFlag_UpdateLEDs = true;
|
CallFlag_UpdateLEDs = true;
|
||||||
|
|
||||||
|
SignalUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RGBController::UpdateMode()
|
void RGBController::UpdateMode()
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
#include <mutex>
|
||||||
|
|
||||||
typedef unsigned int RGBColor;
|
typedef unsigned int RGBColor;
|
||||||
|
|
||||||
@@ -139,6 +140,8 @@ typedef struct
|
|||||||
matrix_map_type * matrix_map; /* Matrix map pointer */
|
matrix_map_type * matrix_map; /* Matrix map pointer */
|
||||||
} zone;
|
} zone;
|
||||||
|
|
||||||
|
typedef void (*RGBControllerCallback)(void *);
|
||||||
|
|
||||||
class RGBController
|
class RGBController
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -188,6 +191,9 @@ public:
|
|||||||
unsigned char * GetSingleLEDColorDescription(int led);
|
unsigned char * GetSingleLEDColorDescription(int led);
|
||||||
void SetSingleLEDColorDescription(unsigned char* data_buf);
|
void SetSingleLEDColorDescription(unsigned char* data_buf);
|
||||||
|
|
||||||
|
void RegisterUpdateCallback(RGBControllerCallback new_callback, void * new_callback_arg);
|
||||||
|
void SignalUpdate();
|
||||||
|
|
||||||
void UpdateLEDs();
|
void UpdateLEDs();
|
||||||
//void UpdateZoneLEDs(int zone);
|
//void UpdateZoneLEDs(int zone);
|
||||||
//void UpdateSingleLED(int led);
|
//void UpdateSingleLED(int led);
|
||||||
@@ -219,4 +225,8 @@ private:
|
|||||||
//bool CallFlag_UpdateZoneLEDs = false;
|
//bool CallFlag_UpdateZoneLEDs = false;
|
||||||
//bool CallFlag_UpdateSingleLED = false;
|
//bool CallFlag_UpdateSingleLED = false;
|
||||||
//bool CallFlag_UpdateMode = false;
|
//bool CallFlag_UpdateMode = false;
|
||||||
|
|
||||||
|
std::mutex UpdateMutex;
|
||||||
|
std::vector<RGBControllerCallback> UpdateCallbacks;
|
||||||
|
std::vector<void *> UpdateCallbackArgs;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -0,0 +1,147 @@
|
|||||||
|
/*-----------------------------------------------------*\
|
||||||
|
| DeviceView.cpp |
|
||||||
|
| |
|
||||||
|
| OpenRGB Device view widget for Qt |
|
||||||
|
| |
|
||||||
|
| Adam Honse ([email protected]) |
|
||||||
|
\*-----------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "DeviceView.h"
|
||||||
|
#include "RGBController.h"
|
||||||
|
#include <QPainter>
|
||||||
|
#include <QResizeEvent>
|
||||||
|
#include <QStyleOption>
|
||||||
|
#include <QtCore/qmath.h>
|
||||||
|
#include <QDebug>
|
||||||
|
|
||||||
|
DeviceView::DeviceView(QWidget *parent) :
|
||||||
|
QWidget(parent),
|
||||||
|
initSize(128,128),
|
||||||
|
mouseDown(false)
|
||||||
|
{
|
||||||
|
controller = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DeviceView::setController(RGBController * controller_ptr)
|
||||||
|
{
|
||||||
|
controller = controller_ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
QSize DeviceView::sizeHint () const
|
||||||
|
{
|
||||||
|
return QSize(height(),height());
|
||||||
|
}
|
||||||
|
|
||||||
|
QSize DeviceView::minimumSizeHint () const
|
||||||
|
{
|
||||||
|
return initSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DeviceView::mousePressEvent(QMouseEvent *event)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void DeviceView::mouseMoveEvent(QMouseEvent *event)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void DeviceView::mouseReleaseEvent(QMouseEvent *)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void DeviceView::resizeEvent(QResizeEvent *event)
|
||||||
|
{
|
||||||
|
unsigned int size = 0;
|
||||||
|
|
||||||
|
if(event->size().width() < event->size().height())
|
||||||
|
{
|
||||||
|
size = event->size().width();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
size = event->size().height();
|
||||||
|
}
|
||||||
|
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
void DeviceView::paintEvent(QPaintEvent *event)
|
||||||
|
{
|
||||||
|
int width = event->rect().width();
|
||||||
|
int height = event->rect().height();
|
||||||
|
int zone_width = 0;
|
||||||
|
int zone_offset = 0;
|
||||||
|
int row = 0;
|
||||||
|
int col = 0;
|
||||||
|
int box_size = 20;
|
||||||
|
int box_margin = 2;
|
||||||
|
int max_cols = ( width / (box_size + box_margin) ) - 1;
|
||||||
|
|
||||||
|
QPainter painter(this);
|
||||||
|
QStyleOption opt;
|
||||||
|
opt.initFrom(this);
|
||||||
|
|
||||||
|
if(controller != NULL)
|
||||||
|
{
|
||||||
|
for(int zone_idx = 0; zone_idx < controller->zones.size(); zone_idx++)
|
||||||
|
{
|
||||||
|
if((controller->zones[zone_idx].type == ZONE_TYPE_MATRIX)
|
||||||
|
&&(controller->zones[zone_idx].matrix_map != NULL))
|
||||||
|
{
|
||||||
|
unsigned int x_count = controller->zones[zone_idx].matrix_map->width;
|
||||||
|
unsigned int y_count = controller->zones[zone_idx].matrix_map->height;
|
||||||
|
|
||||||
|
zone_width = x_count * (box_size + box_margin);
|
||||||
|
zone_offset = (width - zone_width) / 2;
|
||||||
|
|
||||||
|
for(int x = 0; x < x_count; x++)
|
||||||
|
{
|
||||||
|
for(int y = 0; y < y_count; y++)
|
||||||
|
{
|
||||||
|
unsigned int map_idx = (y * x_count) + x;
|
||||||
|
unsigned int color_idx = controller->zones[zone_idx].matrix_map->map[map_idx];
|
||||||
|
|
||||||
|
if( color_idx != 0xFFFFFFFF )
|
||||||
|
{
|
||||||
|
painter.fillRect((zone_offset + (x * (box_size + box_margin))), ((y + row) * (box_size + box_margin)), box_size, box_size, QColor::fromRgb(RGBGetRValue(controller->zones[zone_idx].colors[color_idx]), RGBGetGValue(controller->zones[zone_idx].colors[color_idx]), RGBGetBValue(controller->zones[zone_idx].colors[color_idx])));
|
||||||
|
painter.drawRect((zone_offset + (x * (box_size + box_margin))), ((y + row) * (box_size + box_margin)), box_size, box_size);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
row += y_count;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
unsigned int x_count = controller->zones[zone_idx].leds_count;
|
||||||
|
|
||||||
|
zone_width = x_count * (box_size + box_margin);
|
||||||
|
|
||||||
|
if(zone_width > width)
|
||||||
|
{
|
||||||
|
zone_width = width;
|
||||||
|
}
|
||||||
|
|
||||||
|
zone_offset = (width - zone_width) / 2;
|
||||||
|
|
||||||
|
for(int led_idx = 0; led_idx < x_count; led_idx++)
|
||||||
|
{
|
||||||
|
painter.fillRect((zone_offset + (col * (box_size + box_margin))), (row * (box_size + box_margin)), box_size, box_size, QColor::fromRgb(RGBGetRValue(controller->zones[zone_idx].colors[led_idx]), RGBGetGValue(controller->zones[zone_idx].colors[led_idx]), RGBGetBValue(controller->zones[zone_idx].colors[led_idx])));
|
||||||
|
painter.drawRect((zone_offset + (col * (box_size + box_margin))), (row * (box_size + box_margin)), box_size, box_size);
|
||||||
|
col++;
|
||||||
|
|
||||||
|
if(col > max_cols)
|
||||||
|
{
|
||||||
|
row++;
|
||||||
|
col = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
row += 2;
|
||||||
|
col = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
#ifndef DEVICEVIEW_H
|
||||||
|
#define DEVICEVIEW_H
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
#include "RGBController.h"
|
||||||
|
|
||||||
|
class DeviceView : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit DeviceView(QWidget *parent = 0);
|
||||||
|
|
||||||
|
virtual QSize sizeHint () const;
|
||||||
|
virtual QSize minimumSizeHint () const;
|
||||||
|
|
||||||
|
void setController(RGBController * controller_ptr);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void mousePressEvent(QMouseEvent *event);
|
||||||
|
void mouseMoveEvent(QMouseEvent *event);
|
||||||
|
void mouseReleaseEvent(QMouseEvent *);
|
||||||
|
void resizeEvent(QResizeEvent *event);
|
||||||
|
void paintEvent(QPaintEvent *);
|
||||||
|
private:
|
||||||
|
QSize initSize;
|
||||||
|
bool mouseDown;
|
||||||
|
QPoint lastPos;
|
||||||
|
|
||||||
|
RGBController* controller;
|
||||||
|
|
||||||
|
QColor posColor(const QPoint &point);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // DEVICEVIEW_H
|
||||||
@@ -4,6 +4,13 @@
|
|||||||
|
|
||||||
using namespace Ui;
|
using namespace Ui;
|
||||||
|
|
||||||
|
static void UpdateCallback(void * this_ptr)
|
||||||
|
{
|
||||||
|
OpenRGBDevicePage * this_obj = (OpenRGBDevicePage *)this_ptr;
|
||||||
|
|
||||||
|
QMetaObject::invokeMethod(this_obj, "UpdateInterface", Qt::QueuedConnection);
|
||||||
|
}
|
||||||
|
|
||||||
OpenRGBDevicePage::OpenRGBDevicePage(RGBController *dev, QWidget *parent) :
|
OpenRGBDevicePage::OpenRGBDevicePage(RGBController *dev, QWidget *parent) :
|
||||||
QFrame(parent),
|
QFrame(parent),
|
||||||
ui(new Ui::OpenRGBDevicePageUi)
|
ui(new Ui::OpenRGBDevicePageUi)
|
||||||
@@ -20,6 +27,10 @@ OpenRGBDevicePage::OpenRGBDevicePage(RGBController *dev, QWidget *parent) :
|
|||||||
\*-----------------------------------------------------*/
|
\*-----------------------------------------------------*/
|
||||||
QPalette pal;
|
QPalette pal;
|
||||||
|
|
||||||
|
ui->widget->setController(device);
|
||||||
|
|
||||||
|
device->RegisterUpdateCallback(UpdateCallback, this);
|
||||||
|
|
||||||
pal = ui->ButtonRed->palette();
|
pal = ui->ButtonRed->palette();
|
||||||
pal.setColor(QPalette::Button, QColor(255, 0, 0));
|
pal.setColor(QPalette::Button, QColor(255, 0, 0));
|
||||||
ui->ButtonRed->setAutoFillBackground(true);
|
ui->ButtonRed->setAutoFillBackground(true);
|
||||||
@@ -268,6 +279,12 @@ void Ui::OpenRGBDevicePage::on_DirectionBox_currentIndexChanged(int /*index*/)
|
|||||||
UpdateMode();
|
UpdateMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Ui::OpenRGBDevicePage::UpdateInterface()
|
||||||
|
{
|
||||||
|
UpdateModeUi();
|
||||||
|
ui->widget->repaint();
|
||||||
|
}
|
||||||
|
|
||||||
void Ui::OpenRGBDevicePage::UpdateModeUi()
|
void Ui::OpenRGBDevicePage::UpdateModeUi()
|
||||||
{
|
{
|
||||||
/*-----------------------------------------------------*\
|
/*-----------------------------------------------------*\
|
||||||
|
|||||||
@@ -60,6 +60,8 @@ private slots:
|
|||||||
|
|
||||||
void on_ColorWheelBox_colorChanged(const QColor color);
|
void on_ColorWheelBox_colorChanged(const QColor color);
|
||||||
|
|
||||||
|
void UpdateInterface();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::OpenRGBDevicePageUi *ui;
|
Ui::OpenRGBDevicePageUi *ui;
|
||||||
RGBController *device;
|
RGBController *device;
|
||||||
|
|||||||
+254
-232
@@ -6,265 +6,265 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>556</width>
|
<width>875</width>
|
||||||
<height>300</height>
|
<height>374</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Frame</string>
|
<string>Frame</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="7" column="6">
|
<item row="8" column="0">
|
||||||
<widget class="QLabel" name="BlueLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>B:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="7" column="1" colspan="4">
|
|
||||||
<widget class="QSlider" name="SpeedSlider">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="4">
|
|
||||||
<widget class="QRadioButton" name="RandomCheck">
|
|
||||||
<property name="text">
|
|
||||||
<string>Random</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="9" column="9">
|
|
||||||
<widget class="QPushButton" name="ButtonCyan">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="0">
|
|
||||||
<widget class="QLabel" name="ColorLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Colors:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1" colspan="4">
|
|
||||||
<widget class="QComboBox" name="LEDBox"/>
|
|
||||||
</item>
|
|
||||||
<item row="9" column="8">
|
|
||||||
<widget class="QPushButton" name="ButtonGreen">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="10" colspan="2">
|
|
||||||
<widget class="QSpinBox" name="SatSpinBox">
|
|
||||||
<property name="maximum">
|
|
||||||
<number>255</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="9">
|
|
||||||
<widget class="QLabel" name="SatLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>S:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="6">
|
|
||||||
<widget class="QLabel" name="RedLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>R:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="4">
|
|
||||||
<widget class="QPushButton" name="ResizeButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Resize</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="9" column="10">
|
|
||||||
<widget class="QPushButton" name="ButtonBlue">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="7" colspan="2">
|
|
||||||
<widget class="QSpinBox" name="GreenSpinBox">
|
|
||||||
<property name="maximum">
|
|
||||||
<number>255</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="1">
|
|
||||||
<widget class="QRadioButton" name="PerLEDCheck">
|
|
||||||
<property name="text">
|
|
||||||
<string>Per-LED</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="7" colspan="2">
|
|
||||||
<widget class="QSpinBox" name="RedSpinBox">
|
|
||||||
<property name="maximum">
|
|
||||||
<number>255</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="9" column="11">
|
|
||||||
<widget class="QPushButton" name="ButtonMagenta">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="2" colspan="2">
|
|
||||||
<widget class="QPushButton" name="SetZoneButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Zone</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="4">
|
|
||||||
<widget class="QPushButton" name="SetLEDButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>LED</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1" colspan="4">
|
|
||||||
<widget class="QPushButton" name="SetAllButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Set All Devices</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="6">
|
|
||||||
<widget class="QLabel" name="GreenLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>G:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="7" column="9">
|
|
||||||
<widget class="QLabel" name="ValLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>V:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1" colspan="3">
|
|
||||||
<widget class="QComboBox" name="ZoneBox"/>
|
|
||||||
</item>
|
|
||||||
<item row="9" column="6">
|
|
||||||
<widget class="QPushButton" name="ButtonRed">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="9" column="0">
|
|
||||||
<widget class="QLabel" name="DirectionLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Dir:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="2" colspan="2">
|
|
||||||
<widget class="QRadioButton" name="ModeSpecificCheck">
|
|
||||||
<property name="text">
|
|
||||||
<string>Mode-Specific</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="9" column="7">
|
|
||||||
<widget class="QPushButton" name="ButtonYellow">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="7" column="7" colspan="2">
|
|
||||||
<widget class="QSpinBox" name="BlueSpinBox">
|
|
||||||
<property name="maximum">
|
|
||||||
<number>255</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="LEDLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>LED:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="10" colspan="2">
|
|
||||||
<widget class="QSpinBox" name="HueSpinBox">
|
|
||||||
<property name="maximum">
|
|
||||||
<number>359</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="0">
|
|
||||||
<widget class="QLabel" name="ModeLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Mode:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="SetLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Set:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="ZoneLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Zone:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="7" column="0">
|
|
||||||
<widget class="QLabel" name="SpeedLabel">
|
<widget class="QLabel" name="SpeedLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Speed:</string>
|
<string>Speed:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="10" colspan="2">
|
<item row="6" column="6" colspan="2">
|
||||||
|
<widget class="QSpinBox" name="RedSpinBox">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>255</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="ZoneLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Zone:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="8">
|
||||||
|
<widget class="QLabel" name="SatLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>S:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="11" column="6">
|
||||||
|
<widget class="QPushButton" name="ButtonYellow">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="5">
|
||||||
|
<widget class="QLabel" name="GreenLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>G:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="11" column="8">
|
||||||
|
<widget class="QPushButton" name="ButtonCyan">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="1">
|
||||||
|
<widget class="QRadioButton" name="PerLEDCheck">
|
||||||
|
<property name="text">
|
||||||
|
<string>Per-LED</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="2" colspan="2">
|
||||||
|
<widget class="QRadioButton" name="ModeSpecificCheck">
|
||||||
|
<property name="text">
|
||||||
|
<string>Mode-Specific</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="5">
|
||||||
|
<widget class="QLabel" name="RedLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>R:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="4">
|
||||||
|
<widget class="QRadioButton" name="RandomCheck">
|
||||||
|
<property name="text">
|
||||||
|
<string>Random</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="11" column="10">
|
||||||
|
<widget class="QPushButton" name="ButtonMagenta">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="0">
|
||||||
|
<widget class="QLabel" name="ModeLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Mode:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="8" column="9" colspan="2">
|
||||||
<widget class="QSpinBox" name="ValSpinBox">
|
<widget class="QSpinBox" name="ValSpinBox">
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<number>255</number>
|
<number>255</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="1" colspan="4">
|
<item row="8" column="6" colspan="2">
|
||||||
<widget class="QComboBox" name="ModeBox"/>
|
<widget class="QSpinBox" name="BlueSpinBox">
|
||||||
</item>
|
<property name="maximum">
|
||||||
<item row="9" column="1" colspan="4">
|
<number>255</number>
|
||||||
<widget class="QComboBox" name="DirectionBox"/>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QPushButton" name="SetDeviceButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Device</string>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="9">
|
<item row="7" column="6" colspan="2">
|
||||||
|
<widget class="QSpinBox" name="GreenSpinBox">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>255</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="4">
|
||||||
|
<widget class="QPushButton" name="SetLEDButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>LED</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="LEDLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>LED:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="8">
|
||||||
<widget class="QLabel" name="HueLabel">
|
<widget class="QLabel" name="HueLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>H:</string>
|
<string>H:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="6" rowspan="4" colspan="6">
|
<item row="7" column="0">
|
||||||
|
<widget class="QLabel" name="ColorLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Colors:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="1" colspan="4">
|
||||||
|
<widget class="QComboBox" name="ModeBox"/>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1" colspan="4">
|
||||||
|
<widget class="QPushButton" name="SetAllButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Set All Devices</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="8" column="1" colspan="4">
|
||||||
|
<widget class="QSlider" name="SpeedSlider">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="11" column="0">
|
||||||
|
<widget class="QLabel" name="DirectionLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Dir:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="SetLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Set:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="8" column="8">
|
||||||
|
<widget class="QLabel" name="ValLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>V:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="11" column="7">
|
||||||
|
<widget class="QPushButton" name="ButtonGreen">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="11" column="9">
|
||||||
|
<widget class="QPushButton" name="ButtonBlue">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QPushButton" name="SetDeviceButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Device</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="8" column="5">
|
||||||
|
<widget class="QLabel" name="BlueLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>B:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1" colspan="3">
|
||||||
|
<widget class="QComboBox" name="ZoneBox"/>
|
||||||
|
</item>
|
||||||
|
<item row="11" column="1" colspan="4">
|
||||||
|
<widget class="QComboBox" name="DirectionBox"/>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="2" colspan="2">
|
||||||
|
<widget class="QPushButton" name="SetZoneButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Zone</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1" colspan="4">
|
||||||
|
<widget class="QComboBox" name="LEDBox"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="4">
|
||||||
|
<widget class="QPushButton" name="ResizeButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Resize</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="11" column="5">
|
||||||
|
<widget class="QPushButton" name="ButtonRed">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="9" colspan="2">
|
||||||
|
<widget class="QSpinBox" name="SatSpinBox">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>255</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="9" colspan="2">
|
||||||
|
<widget class="QSpinBox" name="HueSpinBox">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>359</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="5" rowspan="4" colspan="6">
|
||||||
<widget class="ColorWheel" name="ColorWheelBox" native="true">
|
<widget class="ColorWheel" name="ColorWheelBox" native="true">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
@@ -274,6 +274,22 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="0" colspan="11">
|
||||||
|
<widget class="DeviceView" name="widget" native="true">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>100</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
@@ -286,6 +302,12 @@
|
|||||||
<signal>colorChanged(QColor)</signal>
|
<signal>colorChanged(QColor)</signal>
|
||||||
</slots>
|
</slots>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>DeviceView</class>
|
||||||
|
<extends>QWidget</extends>
|
||||||
|
<header location="global">DeviceView.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>ZoneBox</tabstop>
|
<tabstop>ZoneBox</tabstop>
|
||||||
|
|||||||
Reference in New Issue
Block a user