mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-04-04 06:11:07 -04:00
* Make the Get/Set RGBControler descriptor functions static * Add functions for getting the matrix_map_type for zone and segment matrix maps * Rename zone resize dialog to zone editor dialog * Add additional segment types * Add option to import segments configuration from JSON file in zone editor dialog * Update device view to be able to display matrix segment types * Add matrix map editor dialog for creating/editing segment matrix maps * Add option to export segments configuration to JSON file in zone editor dialog
65 lines
1.7 KiB
C++
65 lines
1.7 KiB
C++
/*---------------------------------------------------------*\
|
|
| OpenRGBZoneEditorDialog.h |
|
|
| |
|
|
| User interface for editing zones |
|
|
| |
|
|
| This file is part of the OpenRGB project |
|
|
| SPDX-License-Identifier: GPL-2.0-or-later |
|
|
\*---------------------------------------------------------*/
|
|
|
|
#pragma once
|
|
|
|
#include <QDialog>
|
|
#include <QTreeWidgetItem>
|
|
#include "RGBController.h"
|
|
|
|
namespace Ui
|
|
{
|
|
class OpenRGBZoneEditorDialog;
|
|
}
|
|
|
|
|
|
class SegmentTreeWidgetItem : public QObject, public QTreeWidgetItem
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
using QTreeWidgetItem::QTreeWidgetItem;
|
|
|
|
matrix_map_type matrix_map;
|
|
|
|
private slots:
|
|
void on_button_matrix_map_clicked();
|
|
};
|
|
|
|
class OpenRGBZoneEditorDialog : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit OpenRGBZoneEditorDialog(RGBController* edit_dev_ptr, unsigned int edit_zone_idx_val, QWidget *parent = nullptr);
|
|
~OpenRGBZoneEditorDialog();
|
|
|
|
int show();
|
|
|
|
private slots:
|
|
void changeEvent(QEvent *event);
|
|
void on_ResizeSlider_valueChanged(int value);
|
|
void on_ResizeBox_valueChanged(int arg1);
|
|
void on_AddSegmentButton_clicked();
|
|
void on_RemoveSegmentButton_clicked();
|
|
void on_segment_slider_valueChanged(int);
|
|
void on_segment_lineedit_textChanged();
|
|
void on_ImportConfigurationButton_clicked();
|
|
|
|
void on_ExportConfigurationButton_clicked();
|
|
|
|
private:
|
|
Ui::OpenRGBZoneEditorDialog *ui;
|
|
RGBController* edit_dev;
|
|
unsigned int edit_zone_idx;
|
|
|
|
void AddSegmentRow(QString name, unsigned int length, zone_type type, matrix_map_type matrix_map);
|
|
void CheckSegmentsValidity();
|
|
};
|