forked from SpriteOvO/AirPodsDesktop
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSettingsWindow.h
More file actions
92 lines (74 loc) · 2.69 KB
/
SettingsWindow.h
File metadata and controls
92 lines (74 loc) · 2.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
//
// AirPodsWindows - AirPods Desktop User Experience Enhancement Program.
// Copyright (C) 2021-2022 SpriteOvO
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//
#pragma once
#include <QLabel>
#include <QDialog>
#include <QSlider>
#include <QCheckBox>
#include "../Core/Settings.h"
#include "../Utils.h"
#include "ui_SettingsWindow.h"
namespace Gui {
using namespace Core::Settings;
class SettingsWindow : public QDialog
{
Q_OBJECT
public:
SettingsWindow(QWidget *parent = nullptr);
int GetTabCount() const;
int GetTabCurrentIndex() const;
int GetTabLastVisibleIndex() const;
void SetTabIndex(int index);
private:
Ui::SettingsWindow _ui;
bool _trigger{true};
int _lastLanguageIndex{0};
void InitCreditsText();
void RestoreDefaults();
void Update(const Fields &fields, bool trigger);
void UpdateAdvOverride();
void showEvent(QShowEvent *event) override;
// General
void On_cbLanguages_currentIndexChanged(int index);
void On_cbAutoRun_toggled(bool checked);
void On_pbUnbind_clicked();
// Visual
void On_cbDisplayBatteryOnTrayIcon_toggled(TrayIconBatteryBehavior behavior);
void On_cbDisplayBatteryOnTaskbar_toggled(TaskbarStatusBehavior behavior);
// Features
void On_cbLowAudioLatency_toggled(bool checked);
void On_cbAutoEarDetection_toggled(bool checked);
void On_cbConversationalAwareness_toggled(bool checked);
void On_sliderConversationalAwarenessVolume_valueChanged(int value);
void On_cbPersonalizedVolume_toggled(bool checked);
void On_cbLoudSoundReduction_toggled(bool checked);
void On_cbNoiseControlMode_currentIndexChanged(int index);
void On_hsAdaptiveTransparencyLevel_valueChanged(int value);
void On_hsMaxReceivingRange_valueChanged(int value);
// About
void On_pbOpenLogsDirectory_clicked();
// Debug
void On_cbAdvOverride_toggled(bool checked);
void On_teAdvOverride_textChanged();
UTILS_QT_DISABLE_ESC_QUIT(QDialog);
UTILS_QT_REGISTER_LANGUAGECHANGE(QDialog, [this] {
_ui.retranslateUi(this);
InitCreditsText();
});
};
} // namespace Gui