mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-01-02 20:27:52 -05:00
101 lines
2.6 KiB
C++
101 lines
2.6 KiB
C++
#ifndef OPENRGBDIALOG2_H
|
|
#define OPENRGBDIALOG2_H
|
|
|
|
#include "ui_OpenRGBDialog2.h"
|
|
|
|
#include "OpenRGBClientInfoPage.h"
|
|
#include "OpenRGBSoftwareInfoPage.h"
|
|
#include "OpenRGBSystemInfoPage.h"
|
|
|
|
#include <vector>
|
|
#include "i2c_smbus.h"
|
|
#include "RGBController.h"
|
|
#include "ProfileManager.h"
|
|
#include "NetworkClient.h"
|
|
#include "NetworkServer.h"
|
|
|
|
#include <QMainWindow>
|
|
#include <QTimer>
|
|
#include <QSystemTrayIcon>
|
|
#include <QMenu>
|
|
|
|
namespace Ui
|
|
{
|
|
class OpenRGBDialog2;
|
|
}
|
|
|
|
class Ui::OpenRGBDialog2 : public QMainWindow
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit OpenRGBDialog2(std::vector<i2c_smbus_interface *>& bus, std::vector<RGBController *>& control, ProfileManager* manager, QWidget *parent = 0);
|
|
~OpenRGBDialog2();
|
|
|
|
void AddClient(NetworkClient* new_client);
|
|
void AddClientTab();
|
|
void AddI2CToolsPage();
|
|
void AddServerTab(NetworkServer* network_server);
|
|
|
|
void setMode(unsigned char mode_val);
|
|
|
|
protected:
|
|
std::vector<i2c_smbus_interface *>& busses;
|
|
std::vector<RGBController *>& controllers;
|
|
ProfileManager* profile_manager;
|
|
|
|
private:
|
|
/*-------------------------------------*\
|
|
| Page pointers |
|
|
\*-------------------------------------*/
|
|
OpenRGBClientInfoPage *ClientInfoPage;
|
|
OpenRGBSystemInfoPage *SMBusToolsPage;
|
|
OpenRGBSoftwareInfoPage *SoftInfoPage;
|
|
|
|
bool ShowI2CTools = false;
|
|
|
|
/*-------------------------------------*\
|
|
| System tray icon and menu |
|
|
\*-------------------------------------*/
|
|
QSystemTrayIcon* trayIcon;
|
|
QMenu* profileMenu;
|
|
|
|
/*-------------------------------------*\
|
|
| User interface |
|
|
\*-------------------------------------*/
|
|
Ui::OpenRGBDialog2Ui *ui;
|
|
|
|
void AddSoftwareInfoPage();
|
|
|
|
void ClearDevicesList();
|
|
void UpdateDevicesList();
|
|
void UpdateProfileList();
|
|
void closeEvent(QCloseEvent *event);
|
|
|
|
bool device_view_showing = false;
|
|
bool darkTheme = false;
|
|
|
|
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 on_ClientListUpdated();
|
|
void on_SetAllDevices(unsigned char red, unsigned char green, unsigned char blue);
|
|
void on_SaveSizeProfile();
|
|
void on_ShowHide();
|
|
void on_ProfileSelected();
|
|
void on_ButtonSaveProfile_clicked();
|
|
void on_ButtonLoadProfile_clicked();
|
|
void on_ButtonDeleteProfile_clicked();
|
|
void on_ButtonToggleDeviceView_clicked();
|
|
void on_ButtonStopDetection_clicked();
|
|
};
|
|
|
|
#endif // OPENRGBDIALOG2_H
|