-
Notifications
You must be signed in to change notification settings - Fork 172
/
Copy pathpreferencesdlg.h
150 lines (131 loc) · 4.38 KB
/
preferencesdlg.h
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
/*
* Copyright (C) 2023, Bjørn D. Rasmussen, BearWare.dk
*
* 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/>.
*/
#ifndef PREFERENCESDLG_H
#define PREFERENCESDLG_H
#include "ui_preferences.h"
#include "common.h"
#include "utilhotkey.h"
#include "uservideodlg.h"
#include <QSet>
#include <QLineEdit>
class PreferencesDlg : public QDialog
{
Q_OBJECT
public:
PreferencesDlg(SoundDevice& devin, SoundDevice& devout, QWidget * parent = 0);
~PreferencesDlg();
enum
{
GENERAL_TAB,
DISPLAY_TAB,
CONNECTION_TAB,
SOUND_TAB,
SOUNDEVENTS_TAB,
TTSEVENTS_TAB,
SHORTCUTS_TAB,
VIDCAP_TAB
};
private:
Ui::PreferencesDlg ui;
QSet<int> m_modtab;
private:
void slotTabChange(int index);
void slotSaveChanges();
void slotCancelChanges();
// general tab
void initGeneralTab();
void slotEnableBearWareID(bool checked);
void slotEnablePushToTalk(bool checked);
void slotSetupHotkey();
void updatePushtoTalk();
//display tab
void initDisplayTab();
void slotLanguageChange(int index);
void slotSelectVideoText();
void slotConfigureStatusBar();
void slotUpdateUpdDlgChkBox();
void insertTSFVariable();
//connection tab
void initConnectionTab();
void slotDesktopAccess();
//sound tab
void initSoundSystemTab();
void initDevices();
SoundSystem getSoundSystem();
void showDevices(SoundSystem snd);
QVector<SoundDevice> m_sounddevices;
void slotSoundInputChange(int index);
void slotSoundOutputChange(int index);
void slotSoundRestart();
void slotSoundTestDevices(bool checked);
void slotSoundDefaults();
void slotUpdateSoundCheckBoxes();
SoundDevice& m_devin, &m_devout;
TTSoundLoop* m_sndloop;
//sound events
void initSoundEventsTab();
void slotSoundEventToggled(const QModelIndex &index);
void SoundEventSelected(const QModelIndex &index);
void saveCurrentFile();
void soundEventsRestoreDefaultFile();
void slotSoundEventsEnableAll(bool checked);
void slotSoundEventsClearAll(bool checked);
void slotSoundEventsRevert(bool checked);
bool getSoundFile(QString& filename);
void slotBrowseSoundEvent();
class SoundEventsModel* m_soundmodel = nullptr;
QModelIndex m_currentSoundEventsIndex;
//TTS
void initTTSEventsTab();
void slotUpdateTTSTab();
void slotTTSLocaleChanged(const QString& locale);
void slotTTSEventToggled(const QModelIndex &index);
void TTSEventSelected(const QModelIndex &index);
void insertVariable();
void saveCurrentMessage();
void TTSRestoreDefaultMessage();
void TTSRestoreAllDefaultMessage();
void slotTTSEnableAll(bool checked);
void slotTTSClearAll(bool checked);
void slotTTSRevert(bool checked);
void slotUpdateASBAccessibleName();
void slotSPackChange();
void updateSoundEventFileEdit();
QMenu* m_TTSVarMenu;
QModelIndex m_currentTTSIndex;
class TTSEventsModel* m_ttsmodel = nullptr;
//keyboard shortcuts
void initShortcutsTab();
void shortcutSetup(const QModelIndex &index);
class ShortcutsModel* m_shortcutsmodel = nullptr;
hotkeys_t m_hotkeys;
//video tab
void initVideoCaptureTab();
void slotVideoCaptureDevChange(int index);
void slotTestVideoFormat();
void slotVideoResolutionChange(int index);
void slotImageFormatChange(bool checked);
void slotCustomImageFormat();
void slotDefaultVideoSettings();
QVector<VideoCaptureDevice> m_videodevices;
UserVideoDlg* m_uservideo;
bool m_video_ready;
VideoFormat m_vidfmt;
public:
void slotNewVideoFrame(int userid, int stream_id);
};
#endif