Implement monitor reset button
This commit is contained in:
parent
4bdedbc110
commit
5253dc1df6
@ -117,6 +117,7 @@ void MainWindow::setupMonitorsTab()
|
||||
{
|
||||
connect(m_ui.monitorDropdown, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &MainWindow::updateCurrentMonitorGUI);
|
||||
connect(m_ui.monitorEnumerateButton, &QAbstractButton::clicked, [this](bool) { enumMonitors(); });
|
||||
connect(m_ui.monitorResetButton, &QAbstractButton::clicked, [this](bool) { resetAllMonitorSettings(); });
|
||||
|
||||
setupLimitsSlider();
|
||||
setupOverallLimitsSlider();
|
||||
@ -266,6 +267,13 @@ void MainWindow::setupCallbackTimer()
|
||||
qDebug(ltr("Callback timer started"));
|
||||
}
|
||||
|
||||
void MainWindow::resetAllMonitorSettings()
|
||||
{
|
||||
m_ui.monitorOverallMinBrightnessSlider->setValue(0);
|
||||
m_ui.monitorOverallMaxBrightnessSlider->setValue(100);
|
||||
m_ui.monitorOverallOverrideCheck->setCheckState(Qt::CheckState::Unchecked);
|
||||
}
|
||||
|
||||
void MainWindow::updateCurrentMonitorGUI(int index)
|
||||
{
|
||||
if(index == -1) {
|
||||
|
@ -43,6 +43,8 @@ class MainWindow : public QMainWindow {
|
||||
void setupTrayIcon();
|
||||
void setupCallbackTimer();
|
||||
|
||||
void resetAllMonitorSettings();
|
||||
|
||||
void updateCurrentMonitorGUI(int index);
|
||||
|
||||
void updateState();
|
||||
|
Loading…
Reference in New Issue
Block a user