Get rid of old early prototype OpenRGBDialog, rename OpenRGBDialog2 to OpenRGBDialog
parent
014ae33f0b
commit
648c0fce92
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,203 +0,0 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| OpenRGBDialog2.h |
|
||||
| |
|
||||
| User interface for OpenRGB main window |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <QMainWindow>
|
||||
#include <QTimer>
|
||||
#include <QSystemTrayIcon>
|
||||
#include <QMenu>
|
||||
#include <QSlider>
|
||||
|
||||
#include "ui_OpenRGBDialog2.h"
|
||||
|
||||
#include "OpenRGBClientInfoPage.h"
|
||||
#include "OpenRGBPluginsPage/OpenRGBPluginsPage.h"
|
||||
#include "OpenRGBSoftwareInfoPage.h"
|
||||
#include "OpenRGBSystemInfoPage.h"
|
||||
#include "OpenRGBSupportedDevicesPage.h"
|
||||
#include "OpenRGBSettingsPage.h"
|
||||
#include "OpenRGBDMXSettingsPage/OpenRGBDMXSettingsPage.h"
|
||||
#include "OpenRGBE131SettingsPage/OpenRGBE131SettingsPage.h"
|
||||
#include "OpenRGBElgatoKeyLightSettingsPage/OpenRGBElgatoKeyLightSettingsPage.h"
|
||||
#include "OpenRGBElgatoLightStripSettingsPage/OpenRGBElgatoLightStripSettingsPage.h"
|
||||
#include "OpenRGBKasaSmartSettingsPage/OpenRGBKasaSmartSettingsPage.h"
|
||||
#include "OpenRGBLIFXSettingsPage/OpenRGBLIFXSettingsPage.h"
|
||||
#include "OpenRGBPhilipsHueSettingsPage/OpenRGBPhilipsHueSettingsPage.h"
|
||||
#include "OpenRGBPhilipsWizSettingsPage/OpenRGBPhilipsWizSettingsPage.h"
|
||||
#include "OpenRGBQMKORGBSettingsPage/OpenRGBQMKORGBSettingsPage.h"
|
||||
#include "OpenRGBSerialSettingsPage/OpenRGBSerialSettingsPage.h"
|
||||
#include "OpenRGBYeelightSettingsPage/OpenRGBYeelightSettingsPage.h"
|
||||
#include "OpenRGBNanoleafSettingsPage/OpenRGBNanoleafSettingsPage.h"
|
||||
#include "PluginManager.h"
|
||||
#include "SuspendResume.h"
|
||||
|
||||
#include "i2c_smbus.h"
|
||||
#include "LogManager.h"
|
||||
#include "RGBController.h"
|
||||
#include "ProfileManager.h"
|
||||
#include "NetworkClient.h"
|
||||
#include "NetworkServer.h"
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class OpenRGBDialog2;
|
||||
}
|
||||
|
||||
class Ui::OpenRGBDialog2 : public QMainWindow, private SuspendResumeListener
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit OpenRGBDialog2(QWidget *parent = 0);
|
||||
~OpenRGBDialog2();
|
||||
|
||||
void AddClient(NetworkClient* new_client);
|
||||
void AddClientTab();
|
||||
void AddI2CToolsPage();
|
||||
void AddServerTab();
|
||||
|
||||
void AddPlugin(OpenRGBPluginEntry* plugin);
|
||||
void RemovePlugin(OpenRGBPluginEntry* plugin);
|
||||
|
||||
void setMode(unsigned char mode_val);
|
||||
|
||||
static bool IsMinimizeOnClose();
|
||||
|
||||
void SetDialogMessage(PLogMessage msg);
|
||||
|
||||
bool DontShowAgain;
|
||||
|
||||
signals:
|
||||
void ProfileListChanged();
|
||||
|
||||
public slots:
|
||||
void changeEvent(QEvent *event);
|
||||
void SetTrayIcon(bool tray_icon);
|
||||
void handleAboutToQuit();
|
||||
|
||||
protected:
|
||||
void keyPressEvent(QKeyEvent *event) override;
|
||||
|
||||
private:
|
||||
const char* context = "Ui::OpenRGBDialog2";
|
||||
|
||||
/*-------------------------------------*\
|
||||
| Page pointers |
|
||||
\*-------------------------------------*/
|
||||
OpenRGBClientInfoPage *ClientInfoPage;
|
||||
OpenRGBPluginsPage *PluginsPage;
|
||||
OpenRGBSystemInfoPage *SMBusToolsPage;
|
||||
OpenRGBSoftwareInfoPage *SoftInfoPage;
|
||||
OpenRGBSupportedDevicesPage *SupportedPage;
|
||||
OpenRGBSettingsPage *SettingsPage;
|
||||
OpenRGBDMXSettingsPage *DMXSettingsPage;
|
||||
OpenRGBE131SettingsPage *E131SettingsPage;
|
||||
OpenRGBElgatoKeyLightSettingsPage *ElgatoKeyLightSettingsPage;
|
||||
OpenRGBElgatoLightStripSettingsPage *ElgatoLightStripSettingsPage;
|
||||
OpenRGBKasaSmartSettingsPage *KasaSmartSettingsPage;
|
||||
OpenRGBLIFXSettingsPage *LIFXSettingsPage;
|
||||
OpenRGBPhilipsHueSettingsPage *PhilipsHueSettingsPage;
|
||||
OpenRGBPhilipsWizSettingsPage *PhilipsWizSettingsPage;
|
||||
OpenRGBQMKORGBSettingsPage *QMKORGBSettingsPage;
|
||||
OpenRGBSerialSettingsPage *SerialSettingsPage;
|
||||
OpenRGBYeelightSettingsPage *YeelightSettingsPage;
|
||||
OpenRGBNanoleafSettingsPage *NanoleafSettingsPage;
|
||||
|
||||
bool ShowI2CTools = false;
|
||||
bool plugins_loaded = false;
|
||||
|
||||
/*-------------------------------------*\
|
||||
| System tray icon and menu |
|
||||
\*-------------------------------------*/
|
||||
QSystemTrayIcon* trayIcon;
|
||||
QMenu* trayIconMenu;
|
||||
QMenu* profileMenu;
|
||||
|
||||
/*-------------------------------------*\
|
||||
| User interface |
|
||||
\*-------------------------------------*/
|
||||
Ui::OpenRGBDialog2Ui *ui;
|
||||
|
||||
void AddSoftwareInfoPage();
|
||||
void AddSupportedDevicesPage();
|
||||
void AddSettingsPage();
|
||||
void AddDMXSettingsPage();
|
||||
void AddE131SettingsPage();
|
||||
void AddElgatoKeyLightSettingsPage();
|
||||
void AddElgatoLightStripSettingsPage();
|
||||
void AddKasaSmartSettingsPage();
|
||||
void AddLIFXSettingsPage();
|
||||
void AddPhilipsHueSettingsPage();
|
||||
void AddPhilipsWizSettingsPage();
|
||||
void AddQMKORGBSettingsPage();
|
||||
void AddSerialSettingsPage();
|
||||
void AddYeelightSettingsPage();
|
||||
void AddNanoleafSettingsPage();
|
||||
void AddPluginsPage();
|
||||
void AddConsolePage();
|
||||
|
||||
void ClearDevicesList();
|
||||
void UpdateDevicesList();
|
||||
void UpdateProfileList();
|
||||
void closeEvent(QCloseEvent *event);
|
||||
bool SelectConfigProfile(const std::string name);
|
||||
|
||||
void SetDetectionViewState(bool detection_showing);
|
||||
void SaveProfile();
|
||||
void SaveProfileAs();
|
||||
|
||||
void TogglePluginsVisibility(int, QTabWidget*);
|
||||
|
||||
bool device_view_showing = false;
|
||||
|
||||
PluginManager* plugin_manager = nullptr;
|
||||
|
||||
QAction* actionExit;
|
||||
QString dialog_message;
|
||||
|
||||
void ShowLEDView();
|
||||
void HideLEDView();
|
||||
|
||||
void OnSuspend();
|
||||
void OnResume();
|
||||
|
||||
private slots:
|
||||
void on_Exit();
|
||||
void on_LightsOff();
|
||||
void on_QuickRed();
|
||||
void on_QuickYellow();
|
||||
void on_QuickGreen();
|
||||
void on_QuickCyan();
|
||||
void on_QuickBlue();
|
||||
void on_QuickMagenta();
|
||||
void on_QuickWhite();
|
||||
void onDeviceListUpdated();
|
||||
void onDetectionProgressUpdated();
|
||||
void onDetectionEnded();
|
||||
void on_SetAllDevices(unsigned char red, unsigned char green, unsigned char blue);
|
||||
void on_SaveSizeProfile();
|
||||
void on_ShowHide();
|
||||
void onShowDialogMessage();
|
||||
void on_ReShow(QSystemTrayIcon::ActivationReason reason);
|
||||
void on_ProfileSelected();
|
||||
void on_ButtonLoadProfile_clicked();
|
||||
void on_ButtonDeleteProfile_clicked();
|
||||
void on_ButtonToggleDeviceView_clicked();
|
||||
void on_ButtonStopDetection_clicked();
|
||||
void on_ButtonRescan_clicked();
|
||||
void on_ActionSaveProfile_triggered();
|
||||
void on_ActionSaveProfileAs_triggered();
|
||||
void on_MainTabBar_currentChanged(int);
|
||||
void on_InformationTabBar_currentChanged(int);
|
||||
void on_DevicesTabBar_currentChanged(int);
|
||||
void on_SettingsTabBar_currentChanged(int);
|
||||
};
|
||||
@ -1,206 +0,0 @@
|
||||
<?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">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="2" column="0" colspan="5">
|
||||
<widget class="QTabWidget" name="MainTabBar">
|
||||
<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>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="1" column="0">
|
||||
<widget class="QTabWidget" name="DevicesTabBar">
|
||||
<property name="tabPosition">
|
||||
<enum>QTabWidget::West</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="TabInformation">
|
||||
<attribute name="title">
|
||||
<string>Information</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QTabWidget" name="InformationTabBar">
|
||||
<property name="tabPosition">
|
||||
<enum>QTabWidget::West</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="TabSettings">
|
||||
<attribute name="title">
|
||||
<string>Settings</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<item row="0" column="0">
|
||||
<widget class="QTabWidget" name="SettingsTabBar">
|
||||
<property name="tabPosition">
|
||||
<enum>QTabWidget::West</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="5">
|
||||
<layout class="QHBoxLayout" name="MainButtonsLayout">
|
||||
<item>
|
||||
<widget class="QFrame" name="MainButtonsFrame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_5">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QPushButton" name="ButtonToggleDeviceView">
|
||||
<property name="text">
|
||||
<string>Toggle LED View</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="ButtonRescan">
|
||||
<property name="text">
|
||||
<string>Rescan Devices</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QToolButton" name="ButtonSaveProfile">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Save Profile</string>
|
||||
</property>
|
||||
<property name="popupMode">
|
||||
<enum>QToolButton::MenuButtonPopup</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QPushButton" name="ButtonDeleteProfile">
|
||||
<property name="text">
|
||||
<string>Delete Profile</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QPushButton" name="ButtonLoadProfile">
|
||||
<property name="text">
|
||||
<string>Load Profile</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="5">
|
||||
<widget class="QComboBox" name="ProfileBox"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="5">
|
||||
<layout class="QHBoxLayout" name="DetectorLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="DetectionProgressLabel">
|
||||
<property name="text">
|
||||
<string>OpenRGB is detecting devices...</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QProgressBar" name="DetectionProgressBar">
|
||||
<property name="value">
|
||||
<number>24</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="ButtonStopDetection">
|
||||
<property name="text">
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<action name="ActionSaveProfile">
|
||||
<property name="text">
|
||||
<string>Save Profile</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Save Profile</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="ActionSaveProfileAs">
|
||||
<property name="text">
|
||||
<string>Save Profile As...</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Save Profile with custom name</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
Loading…
Reference in New Issue