Publish LumaOps source
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,97 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| OpenRGBSettingsPage.h |
|
||||
| |
|
||||
| User interface for general settings page |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QDirIterator>
|
||||
#include <QTranslator>
|
||||
#include <QWidget>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class OpenRGBSettingsPage;
|
||||
}
|
||||
|
||||
class OpenRGBSettingsPage : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit OpenRGBSettingsPage(QWidget *parent = nullptr);
|
||||
~OpenRGBSettingsPage();
|
||||
|
||||
signals:
|
||||
void TrayIconChanged(bool tray_icon);
|
||||
|
||||
public slots:
|
||||
void UpdateProfiles();
|
||||
|
||||
private:
|
||||
Ui::OpenRGBSettingsPage *ui;
|
||||
void SaveSettings();
|
||||
|
||||
void CreateAutoStartSettings();
|
||||
void ConfigureAutoStart();
|
||||
void RemediateAutoStartProfile(json &autostart_settings);
|
||||
void SetAutoStartVisibility(bool visible);
|
||||
void SaveAutoStartSetting(std::string name, QString value);
|
||||
void SaveAutoStartSetting(std::string name, bool value);
|
||||
|
||||
bool theme_initialized = false;
|
||||
bool autostart_initialized = false;
|
||||
bool hex_format_initialized = false;
|
||||
QTranslator translator;
|
||||
|
||||
private slots:
|
||||
void changeEvent(QEvent *event);
|
||||
void on_ComboBoxLanguage_currentTextChanged(const QString);
|
||||
void on_ComboBoxTheme_currentTextChanged(const QString);
|
||||
void on_ComboBoxHexFormat_currentTextChanged(const QString);
|
||||
void on_CheckboxMinimizeOnClose_clicked();
|
||||
void on_CheckboxTrayIconGreyscale_clicked();
|
||||
void on_CheckboxLoadGeometry_clicked();
|
||||
void on_CheckboxSaveGeometry_clicked();
|
||||
void on_CheckboxAutoStart_clicked();
|
||||
void on_CheckboxAutoStartMinimized_clicked();
|
||||
void on_CheckboxAutoStartServer_clicked();
|
||||
void on_CheckboxAutoStartClient_clicked();
|
||||
void on_CheckboxAutoStartProfile_clicked();
|
||||
void on_TextServerHost_textChanged(const QString);
|
||||
void on_TextServerPort_valueChanged(int);
|
||||
void on_TextClientHost_textChanged(const QString);
|
||||
void on_TextCustomArgs_textChanged(const QString);
|
||||
void on_ComboBoxAutoStartProfile_currentTextChanged(const QString);
|
||||
void on_CheckboxAutoStartSetServerHost_clicked();
|
||||
void on_CheckboxAutoStartSetServerPort_clicked();
|
||||
void on_CheckboxAutoStartCustom_clicked();
|
||||
void on_CheckboxRunZoneChecks_clicked();
|
||||
void on_OpenSettingsFolderButton_clicked();
|
||||
void on_CheckboxLogConsole_clicked();
|
||||
void on_CheckboxLogFile_clicked();
|
||||
void on_CheckboxHIDSafeMode_clicked();
|
||||
void on_TextDetectionDelay_valueChanged(int);
|
||||
void on_CheckboxAMDSMBusReduceCPU_clicked();
|
||||
void on_CheckboxSharedSMBusAccess_clicked();
|
||||
void on_ComboBoxSMBusSleepMode_currentIndexChanged(int index);
|
||||
|
||||
void on_CheckboxSetOnExit_clicked(bool checked);
|
||||
void on_ComboBoxExitProfile_currentTextChanged(const QString exit_profile_name);
|
||||
void on_CheckboxSetOnResume_clicked(bool checked);
|
||||
void on_ComboBoxResumeProfile_currentTextChanged(const QString resume_profile_name);
|
||||
void on_CheckboxSetOnSuspend_clicked(bool checked);
|
||||
void on_ComboBoxSuspendProfile_currentTextChanged(const QString suspend_profile_name);
|
||||
void on_CheckboxDisableKeyExpansion_clicked();
|
||||
void on_CheckboxShowLEDView_clicked();
|
||||
void on_CheckboxAllDevices_clicked(bool checked);
|
||||
void on_CheckboxLegacyWorkaround_clicked(bool checked);
|
||||
};
|
||||
@@ -0,0 +1,375 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>OpenRGBSettingsPage</class>
|
||||
<widget class="QWidget" name="OpenRGBSettingsPage">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>475</width>
|
||||
<height>500</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string notr="true">Settings Page</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="1" column="1" colspan="6">
|
||||
<widget class="QPushButton" name="OpenSettingsFolderButton">
|
||||
<property name="text">
|
||||
<string>Open Settings Folder</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="6">
|
||||
<widget class="QScrollArea" name="scrollArea">
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="scrollAreaWidgetContents_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>-321</y>
|
||||
<width>508</width>
|
||||
<height>1137</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="16" column="0">
|
||||
<widget class="QLabel" name="DetectionSettingsLabel">
|
||||
<property name="text">
|
||||
<string>Detection Settings:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="33" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAutoStartSetServerHost">
|
||||
<property name="text">
|
||||
<string>Set Server Host</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="34" column="1">
|
||||
<widget class="QSpinBox" name="TextServerPort">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>65535</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>6742</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="UserInterfaceSettingsLabel">
|
||||
<property name="text">
|
||||
<string>User Interface Settings:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="40" column="1">
|
||||
<widget class="QComboBox" name="ComboBoxExitProfile"/>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="ThemeLabel">
|
||||
<property name="text">
|
||||
<string>Theme (restart required)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="38" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxSetOnSuspend">
|
||||
<property name="text">
|
||||
<string>Set Profile on Suspend</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxLoadGeometry">
|
||||
<property name="text">
|
||||
<string>Load Window Geometry</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QComboBox" name="ComboBoxLanguage"/>
|
||||
</item>
|
||||
<item row="23" column="0">
|
||||
<widget class="QLabel" name="ServerSettingsLabel">
|
||||
<property name="text">
|
||||
<string>Server Settings:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="14" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxLogFile">
|
||||
<property name="text">
|
||||
<string>Enable Log File (restart required)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="19" column="0">
|
||||
<widget class="QLabel" name="DriversSettingsLabel">
|
||||
<property name="text">
|
||||
<string>Drivers Settings:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="LabelLanguage">
|
||||
<property name="text">
|
||||
<string>Language</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="25" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxLegacyWorkaround">
|
||||
<property name="text">
|
||||
<string>Legacy Workaround</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="18" column="1">
|
||||
<widget class="QSpinBox" name="TextDetectionDelay">
|
||||
<property name="maximum">
|
||||
<number>2147483647</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="41" column="0">
|
||||
<widget class="QLabel" name="AutoStartStatusLabel">
|
||||
<property name="text">
|
||||
<string>Start at Login Status</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxMinimizeOnClose">
|
||||
<property name="text">
|
||||
<string>Minimize on Close</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="35" column="1">
|
||||
<widget class="QLineEdit" name="TextClientHost"/>
|
||||
</item>
|
||||
<item row="21" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxSharedSMBusAccess">
|
||||
<property name="text">
|
||||
<string>Shared SMBus Access (restart required)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxTrayIconGreyscale">
|
||||
<property name="text">
|
||||
<string>Greyscale Tray Icon</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="15" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxLogConsole">
|
||||
<property name="text">
|
||||
<string>Enable Log Console (restart required)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="34" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAutoStartSetServerPort">
|
||||
<property name="text">
|
||||
<string>Set Server Port</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="39" column="1">
|
||||
<widget class="QComboBox" name="ComboBoxResumeProfile"/>
|
||||
</item>
|
||||
<item row="26" column="0">
|
||||
<widget class="QLabel" name="AutoStartLabel">
|
||||
<property name="text">
|
||||
<string>Start at Login Settings:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="35" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAutoStartClient">
|
||||
<property name="text">
|
||||
<string>Start Client</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="37" column="1">
|
||||
<widget class="QComboBox" name="ComboBoxAutoStartProfile"/>
|
||||
</item>
|
||||
<item row="37" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAutoStartProfile">
|
||||
<property name="text">
|
||||
<string>Load Profile</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="33" column="1">
|
||||
<widget class="QLineEdit" name="TextServerHost"/>
|
||||
</item>
|
||||
<item row="40" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxSetOnExit">
|
||||
<property name="text">
|
||||
<string>Set Profile on Exit</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="1">
|
||||
<widget class="QComboBox" name="ComboBoxHexFormat"/>
|
||||
</item>
|
||||
<item row="12" column="0">
|
||||
<widget class="QLabel" name="HexFormatLabel">
|
||||
<property name="text">
|
||||
<string>Hex Format</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="27" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAutoStart">
|
||||
<property name="text">
|
||||
<string>Start at Login</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="36" column="1">
|
||||
<widget class="QLineEdit" name="TextCustomArgs"/>
|
||||
</item>
|
||||
<item row="42" column="0">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Policy::MinimumExpanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxSaveGeometry">
|
||||
<property name="text">
|
||||
<string>Save Geometry on Close</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="20" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAMDSMBusReduceCPU">
|
||||
<property name="text">
|
||||
<string>AMD SMBus: Reduce CPU Usage (restart required)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="32" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAutoStartServer">
|
||||
<property name="text">
|
||||
<string>Start Server</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="17" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxHIDSafeMode">
|
||||
<property name="text">
|
||||
<string>HID Safe Mode</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="18" column="0">
|
||||
<widget class="QLabel" name="DetectionDelayLabel">
|
||||
<property name="text">
|
||||
<string>Initial Detection Delay (milliseconds, 0 to disable)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxDisableKeyExpansion">
|
||||
<property name="text">
|
||||
<string>Disable Key Expansion in Device View</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="24" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAllDevices">
|
||||
<property name="text">
|
||||
<string>Serve All Devices (Including those from client connections)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QComboBox" name="ComboBoxTheme"/>
|
||||
</item>
|
||||
<item row="31" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAutoStartMinimized">
|
||||
<property name="text">
|
||||
<string>Start Minimized</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxShowLEDView">
|
||||
<property name="text">
|
||||
<string>Show LED View by Default</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="38" column="1">
|
||||
<widget class="QComboBox" name="ComboBoxSuspendProfile"/>
|
||||
</item>
|
||||
<item row="13" column="0">
|
||||
<widget class="QLabel" name="LogManagerSettingsLabel">
|
||||
<property name="text">
|
||||
<string>Log Manager Settings:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="39" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxSetOnResume">
|
||||
<property name="text">
|
||||
<string>Set Profile on Resume</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxRunZoneChecks">
|
||||
<property name="text">
|
||||
<string>Run Zone Checks on Rescan</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="36" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAutoStartCustom">
|
||||
<property name="text">
|
||||
<string>Custom Arguments</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="22" column="0">
|
||||
<widget class="QLabel" name="LabelSMBusSleepMode">
|
||||
<property name="text">
|
||||
<string>SMBus Sleep Mode (restart required)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="22" column="1">
|
||||
<widget class="QComboBox" name="ComboBoxSMBusSleepMode"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
Reference in New Issue
Block a user