forked from BearWare/TeamTalk5
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpreferencesdlg.h
166 lines (152 loc) · 4.63 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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
/*
* Copyright (c) 2005-2018, BearWare.dk
*
* Contact Information:
*
* Bjoern D. Rasmussen
* Kirketoften 5
* DK-8260 Viby J
* Denmark
* Email: [email protected]
* Phone: +45 20 20 54 59
* Web: http://www.bearware.dk
*
* This source code is part of the TeamTalk SDK owned by
* BearWare.dk. Use of this file, or its compiled unit, requires a
* TeamTalk SDK License Key issued by BearWare.dk.
*
* The TeamTalk SDK License Agreement along with its Terms and
* Conditions are outlined in the file License.txt included with the
* TeamTalk SDK distribution.
*
*/
#ifndef PREFERENCESDLG_H
#define PREFERENCESDLG_H
#include "ui_preferences.h"
#include "common.h"
#include "utilhotkey.h"
#include "uservideodlg.h"
#include <QSet>
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
};
protected:
void keyPressEvent(QKeyEvent* e) override;
private:
Ui::PreferencesDlg ui;
SoundDevice& m_devin, &m_devout;
/* hotkey tab */
hotkey_t m_hotkey;
/* sound tab */
void initDevices();
SoundSystem getSoundSystem();
void showDevices(SoundSystem snd);
QVector<SoundDevice> m_sounddevices;
/* sound events */
bool getSoundFile(QString& filename);
typedef QMap<HotKeyID, hotkey_t> hotkeys_t;
hotkeys_t m_hotkeys;
/* video tab */
QVector<VideoCaptureDevice> m_videodevices;
UserVideoDlg* m_uservideo;
/* text-to-speech */
class TTSEventsModel* m_ttsmodel = nullptr;
QSet<int> m_modtab;
bool m_video_ready;
VideoFormat m_vidfmt;
TTSoundLoop* m_sndloop;
private:
void slotTabChange(int index);
void slotSaveChanges();
void slotCancelChanges();
// general tab
void slotEnableBearWareID(bool checked);
void slotEnablePushToTalk(bool checked);
void slotSetupHotkey();
//display tab
void slotLanguageChange(int index);
void slotSelectVideoText();
void slotConfigureStatusBar();
void slotUpdateUpdDlgChkBox();
//connection tab
void slotDesktopAccess();
//sound tab
void slotSoundSystemChange();
void slotSoundInputChange(int index);
void slotSoundOutputChange(int index);
void slotSoundRestart();
void slotSoundTestDevices(bool checked);
void slotSoundDefaults();
void slotUpdateSoundCheckBoxes();
//sound events
void slotEventNewUser();
void slotEventRemoveUser();
void slotEventServerLost();
void slotEventUserTextMsg();
void slotEventSentTextMsg();
void slotEventChannelTextMsg();
void slotEventSentChannelMsg();
void slotEventBroadcastTextMsg();
void slotEventHotKey();
void slotEventSilence();
void slotEventNewVideo();
void slotEventNewDesktop();
void slotEventFilesUpdated();
void slotEventFileTxDone();
void slotEventQuestionMode();
void slotEventDesktopAccess();
void slotEventUserLoggedIn();
void slotEventUserLoggedOut();
void slotEventVoiceActOn();
void slotEventVoiceActOff();
void slotEventMuteAllOn();
void slotEventMuteAllOff();
void slotEventTransmitQueueHead();
void slotEventTransmitQueueStop();
void slotEventVoiceActTrig();
void slotEventVoiceActStop();
void slotEventVoiceActMeOn();
void slotEventVoiceActMeOff();
//TTS
void slotUpdateTTSTab();
//keyboard shortcuts
void slotShortcutVoiceActivation(bool checked);
void slotShortcutIncVolume(bool checked);
void slotShortcutDecVolume(bool checked);
void slotShortcutMuteAll(bool checked);
void slotShortcutIncVoiceGain(bool checked);
void slotShortcutDecVoiceGain(bool checked);
void slotShortcutVideoTx(bool checked);
void slotShortcutReinitSound(bool checked);
//video tab
void slotVideoCaptureDevChange(int index);
void slotTestVideoFormat();
void slotVideoResolutionChange(int index);
void slotImageFormatChange(bool checked);
void slotCustomImageFormat();
void slotDefaultVideoSettings();
//tts tab
void slotTTSEventToggled(const QModelIndex &index);
void slotTTSEnableAll(bool checked);
void slotTTSClearAll(bool checked);
void slotTTSRevert(bool checked);
void slotUpdateASBAccessibleName();
void slotSPackChange();
public:
void slotNewVideoFrame(int userid, int stream_id);
};
#endif