-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsettings.h
More file actions
355 lines (345 loc) · 12.2 KB
/
settings.h
File metadata and controls
355 lines (345 loc) · 12.2 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
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
/*
* Copyright (c) 2013-2016 Thomas Isaac Lightburn
*
*
* This file is part of OpenKJ.
*
* OpenKJ 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 <http://www.gnu.org/licenses/>.
*/
#ifndef SETTINGS_H
#define SETTINGS_H
#include <QHeaderView>
#include <QObject>
#include <QSettings>
#include <QSplitter>
#include <QTableView>
#include <QTreeView>
#include <QWidget>
class Settings : public QObject
{
Q_OBJECT
private:
QSettings *settings;
public:
qint64 hash(const QString & str);
QString storeDownloadDir();
void setPassword(QString password);
void clearPassword();
bool chkPassword(QString password);
bool passIsSet();
void setCC(QString ccn, QString month, QString year, QString ccv, QString passwd);
void setSaveCC(bool save);
bool saveCC();
void clearCC();
void clearKNAccount();
void setSaveKNAccount(bool save);
bool saveKNAccount();
QString getCCN(QString password);
QString getCCM(QString password);
QString getCCY(QString password);
QString getCCV(QString password);
void setKaroakeDotNetUser(QString username, QString password);
void setKaraokeDotNetPass(QString KDNPassword, QString password);
QString karoakeDotNetUser(QString password);
QString karoakeDotNetPass(QString password);
enum BgMode { BG_MODE_IMAGE = 0, BG_MODE_SLIDESHOW };
explicit Settings(QObject *parent = 0);
bool cdgWindowFullscreen();
bool showCdgWindow();
void setCdgWindowFullscreenMonitor(int monitor);
int cdgWindowFullScreenMonitor();
bool controlBreakMusic();
void setControlBreakMusic(bool control);
bool fadeBreakMusic();
void setFadeBreakMusic(bool fade);
bool pauseBreakMusic();
void setPauseBreakMusic(bool pause);
bool fadeToStop();
void setFadeToStop(bool fade);
bool fadedPause();
void setFadedPause(bool faded);
bool silenceDetection();
bool setSilenceDetection(bool detect);
void saveWindowState(QWidget *window);
void restoreWindowState(QWidget *window);
void saveColumnWidths(QTreeView *treeView);
void saveColumnWidths(QTableView *tableView);
void restoreColumnWidths(QTreeView *treeView);
void restoreColumnWidths(QTableView *tableView);
void saveSplitterState(QSplitter *splitter);
void restoreSplitterState(QSplitter *splitter);
void setTickerFont(QFont font);
void setApplicationFont(QFont font);
QFont tickerFont();
QFont applicationFont();
int tickerHeight();
void setTickerHeight(int height);
int tickerSpeed();
void setTickerSpeed(int speed);
QColor tickerTextColor();
void setTickerTextColor(QColor color);
QColor tickerBgColor();
void setTickerBgColor(QColor color);
bool tickerFullRotation();
void setTickerFullRotation(bool full);
int tickerShowNumSingers();
void setTickerShowNumSingers(int limit);
void setTickerEnabled(bool enable);
bool tickerEnabled();
QString tickerCustomString();
void setTickerCustomString(QString value);
bool tickerShowRotationInfo();
bool requestServerEnabled();
void setRequestServerEnabled(bool enable);
QString requestServerUrl();
void setRequestServerUrl(QString url);
int requestServerVenue();
void setRequestServerVenue(int venueId);
QString requestServerApiKey();
void setRequestServerApiKey(QString apiKey);
bool requestServerIgnoreCertErrors();
void setRequestServerIgnoreCertErrors(bool ignore);
bool audioUseFader();
bool audioUseFaderBm();
void setAudioUseFader(bool fader);
void setAudioUseFaderBm(bool fader);
int audioVolume();
void setAudioVolume(int volume);
QString cdgDisplayBackgroundImage();
void setCdgDisplayBackgroundImage(QString imageFile);
BgMode bgMode();
void setBgMode(BgMode mode);
QString bgSlideShowDir();
void setBgSlideShowDir(QString dir);
bool audioDownmix();
void setAudioDownmix(bool downmix);
bool audioDownmixBm();
void setAudioDownmixBm(bool downmix);
bool audioDetectSilence();
bool audioDetectSilenceBm();
void setAudioDetectSilence(bool enabled);
void setAudioDetectSilenceBm(bool enabled);
QString audioOutputDevice();
QString audioOutputDeviceBm();
void setAudioOutputDevice(QString device);
void setAudioOutputDeviceBm(QString device);
int audioBackend();
void setAudioBackend(int index);
QString recordingContainer();
void setRecordingContainer(QString container);
QString recordingCodec();
void setRecordingCodec(QString codec);
QString recordingInput();
void setRecordingInput(QString input);
QString recordingOutputDir();
void setRecordingOutputDir(QString path);
bool recordingEnabled();
void setRecordingEnabled(bool enabled);
QString recordingRawExtension();
void setRecordingRawExtension(QString extension);
int cdgVOffset();
int cdgHOffset();
int cdgVSizeAdjustment();
int cdgHSizeAdjustment();
bool ignoreAposInSearch();
bool bmShowFilenames();
void bmSetShowFilenames(bool show);
bool bmShowMetadata();
void bmSetShowMetadata(bool show);
int bmVolume();
void bmSetVolume(int bmVolume);
int bmPlaylistIndex();
void bmSetPlaylistIndex(int index);
int mplxMode();
void setMplxMode(int mode);
bool karaokeAutoAdvance();
int karaokeAATimeout();
void setKaraokeAATimeout(int secs);
bool karaokeAAAlertEnabled();
void setKaraokeAAAlertEnabled(bool enabled);
QFont karaokeAAAlertFont();
void setKaraokeAAAlertFont(QFont font);
bool showQueueRemovalWarning();
bool showSingerRemovalWarning();
bool showSongInterruptionWarning();
bool showSongPauseStopWarning();
QColor alertTxtColor();
QColor alertBgColor();
bool bmAutoStart();
void setBmAutoStart(bool enabled);
int cdgDisplayOffset();
QFont bookCreatorTitleFont();
QFont bookCreatorArtistFont();
QFont bookCreatorHeaderFont();
QFont bookCreatorFooterFont();
QString bookCreatorHeaderText();
QString bookCreatorFooterText();
bool bookCreatorPageNumbering();
int bookCreatorSortCol();
double bookCreatorMarginRt();
double bookCreatorMarginLft();
double bookCreatorMarginTop();
double bookCreatorMarginBtm();
int bookCreatorCols();
int bookCreatorPageSize();
bool eqKBypass();
bool eqBBypass();
int eqKLevel1();
int eqKLevel2();
int eqKLevel3();
int eqKLevel4();
int eqKLevel5();
int eqKLevel6();
int eqKLevel7();
int eqKLevel8();
int eqKLevel9();
int eqKLevel10();
int eqBLevel1();
int eqBLevel2();
int eqBLevel3();
int eqBLevel4();
int eqBLevel5();
int eqBLevel6();
int eqBLevel7();
int eqBLevel8();
int eqBLevel9();
int eqBLevel10();
int requestServerInterval();
bool bmKCrossFade();
bool requestRemoveOnRotAdd();
bool requestDialogAutoShow();
bool checkUpdates();
int updatesBranch();
int theme();
signals:
void applicationFontChanged(QFont font);
void tickerFontChanged();
void tickerHeightChanged(int height);
void tickerSpeedChanged();
void tickerTextColorChanged();
void tickerBgColorChanged();
void tickerOutputModeChanged();
void tickerEnableChanged();
void tickerShowRotationInfoChanged(bool show);
void audioBackendChanged(int index);
void recordingSetupChanged();
void cdgBgImageChanged();
void cdgShowCdgWindowChanged(bool show);
void cdgWindowFullscreenChanged(bool fullscreen);
void cdgWindowFullscreenMonitorChanged(int monitor);
void cdgHSizeAdjustmentChanged(int pixels);
void cdgVSizeAdjustmentChanged(int pixels);
void cdgHOffsetChanged(int pixels);
void cdgVOffsetChanged(int pixels);
void bgModeChanged(BgMode mode);
void bgSlideShowDirChanged(QString dir);
void requestServerVenueChanged(int venueId);
void tickerCustomStringChanged();
void mplxModeChanged(int mode);
void karaokeAAAlertFontChanged(QFont font);
void karaokeAutoAdvanceChanged(bool enabled);
void showQueueRemovalWarningChanged(bool enabled);
void showSingerRemovalWarningChanged(bool enabled);
void showSongInterruptionWarningChanged(bool enabled);
void alertTxtColorChanged(QColor color);
void alertBgColorChanged(QColor color);
void cdgDisplayOffsetChanged(int offset);
void showSongStopPauseWarningChanged(bool enabled);
void eqKBypassChanged(bool bypass);
void eqBBypassChanged(bool bypass);
void eqKLevel1Changed(int level);
void eqKLevel2Changed(int level);
void eqKLevel3Changed(int level);
void eqKLevel4Changed(int level);
void eqKLevel5Changed(int level);
void eqKLevel6Changed(int level);
void eqKLevel7Changed(int level);
void eqKLevel8Changed(int level);
void eqKLevel9Changed(int level);
void eqKLevel10Changed(int level);
void eqBLevel1Changed(int level);
void eqBLevel2Changed(int level);
void eqBLevel3Changed(int level);
void eqBLevel4Changed(int level);
void eqBLevel5Changed(int level);
void eqBLevel6Changed(int level);
void eqBLevel7Changed(int level);
void eqBLevel8Changed(int level);
void eqBLevel9Changed(int level);
void eqBLevel10Changed(int level);
void requestServerIntervalChanged(int interval);
void requestServerEnabledChanged(bool enabled);
public slots:
void setBmKCrossfade(bool enabled);
void setShowCdgWindow(bool show);
void setCdgWindowFullscreen(bool fullScreen);
void setCdgHSizeAdjustment(int pixels);
void setCdgVSizeAdjustment(int pixels);
void setCdgHOffset(int pixels);
void setCdgVOffset(int pixels);
void setShowQueueRemovalWarning(bool show);
void setShowSingerRemovalWarning(bool show);
void setKaraokeAutoAdvance(bool enabled);
void setShowSongInterruptionWarning(bool enabled);
void setAlertBgColor(QColor color);
void setAlertTxtColor(QColor color);
void setIgnoreAposInSearch(bool ignore);
void setCdgDisplayOffset(int offset);
void setShowSongPauseStopWarning(bool enabled);
void setBookCreatorArtistFont(QFont font);
void setBookCreatorTitleFont(QFont font);
void setBookCreatorHeaderFont(QFont font);
void setBookCreatorFooterFont(QFont font);
void setBookCreatorHeaderText(QString text);
void setBookCreatorFooterText(QString text);
void setBookCreatorPageNumbering(bool show);
void setBookCreatorSortCol(int col);
void setBookCreatorMarginRt(double margin);
void setBookCreatorMarginLft(double margin);
void setBookCreatorMarginTop(double margin);
void setBookCreatorMarginBtm(double margin);
void setEqKBypass(bool bypass);
void setEqBBypass(bool bypass);
void setEqKLevel1(int level);
void setEqKLevel2(int level);
void setEqKLevel3(int level);
void setEqKLevel4(int level);
void setEqKLevel5(int level);
void setEqKLevel6(int level);
void setEqKLevel7(int level);
void setEqKLevel8(int level);
void setEqKLevel9(int level);
void setEqKLevel10(int level);
void setEqBLevel1(int level);
void setEqBLevel2(int level);
void setEqBLevel3(int level);
void setEqBLevel4(int level);
void setEqBLevel5(int level);
void setEqBLevel6(int level);
void setEqBLevel7(int level);
void setEqBLevel8(int level);
void setEqBLevel9(int level);
void setEqBLevel10(int level);
void setRequestServerInterval(int interval);
void setTickerShowRotationInfo(bool show);
void setRequestRemoveOnRotAdd(bool remove);
void setRequestDialogAutoShow(bool enabled);
void setCheckUpdates(bool enabled);
void setUpdatesBranch(int index);
void setTheme(int theme);
void setBookCreatorCols(int cols);
void setBookCreatorPageSize(int size);
void setStoreDownloadDir(QString path);
};
#endif // KHSETTINGS_H