-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathcsettingsdlg.h
More file actions
216 lines (192 loc) · 6.9 KB
/
csettingsdlg.h
File metadata and controls
216 lines (192 loc) · 6.9 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
/*********************** Information *************************\
| $HeadURL$
|
| Author: Jo2003
|
| Begin: 19.01.2010 / 15:41:34
|
| Last edited by: $Author$
|
| $Id$
\*************************************************************/
#ifndef __011910__CSETTINGSDLG_H
#define __011910__CSETTINGSDLG_H
#ifdef __QT_5
#include <QtWidgets/QDialog>
#else
#include <QtGui/QDialog>
#endif
#include <QFileDialog>
#include <QMessageBox>
#include <QDir>
#include <QTableWidget>
#include <QTimer>
#include <QSystemTrayIcon>
#include <QEvent>
#include "defdef.h"
#include "cshortcutex.h"
#include "cshortcutgrabber.h"
#include "clogfile.h"
#include "cparser.h"
#include "qstrstandarddlg.h"
#include "qspeedtestdlg.h"
#define CREDENTIALS_CHG (1 << 0)
#define PROXY_CHG (1 << 1)
#define API_SERVER_CHG (1 << 2)
#define STREAM_SERVER_CHG (1 << 3)
#define LANG_CHG (1 << 4)
#define RE_LOGIN_MASK (CREDENTIALS_CHG | PROXY_CHG | API_SERVER_CHG | STREAM_SERVER_CHG | LANG_CHG)
#define PLAY_MOD_CHG (1 << 16)
//===================================================================
// namespace
//===================================================================
namespace Ui
{
class CSettingsDlg;
}
/********************************************************************\
| Class: CSettingsDlg
| Date: 19.01.2010 / 15:42:24
| Author: Jo2003
| Description: dialog to configure needed settings
|
\********************************************************************/
class CSettingsDlg : public QDialog
{
Q_OBJECT
public:
CSettingsDlg(QWidget *parent = 0);
~CSettingsDlg();
QString GetVLCPath ();
QString GetTargetDir ();
QString GetUser ();
QString GetPasswd ();
QString GetErosPasswd ();
QString GetProxyHost ();
QString GetProxyUser ();
QString GetProxyPasswd ();
QString GetLanguage ();
QString GetShutdownCmd ();
QString GetPlayerModule ();
QString GetCookie ();
QString GetAPIServer ();
QString getDeinlMode ();
QString getStreamServer();
bool UseProxy ();
bool AllowEros ();
bool HideToSystray ();
bool AskForRecFile ();
bool TranslitRecFile ();
bool DetachPlayer ();
int getTimeShift();
bool doubleClickToPlay();
bool useGpuAcc();
bool showAds();
bool extEpg();
bool autoStrSrv();
int GetProxyPort ();
int GetBufferTime ();
vlclog::eLogLevel GetLogLevel ();
void SaveSplitterSizes (const QString &name, const QList<int> &sz);
QList<int> GetSplitterSizes (const QString &name, bool *ok = NULL);
void SaveFavourites (const QList<int> &favList);
QList<int> GetFavourites (bool *ok = NULL);
void SetStreamServerCbx (const QVector<cparser::SSrv>& vSrvList, const QString& sActSrv);
void SetBitrateCbx (const cparser::QBitratesMap& mBitRates, int iActrate);
void SaveCookie (const QString &str);
bool DisableSplashScreen ();
int GetBitRate ();
void addShortCut (const QString& descr, const QString& target, const QString& slot, const QString& keys);
void delShortCut (const QString& target, const QString& slot);
void updateShortcutDescr(const QString& descr, const QString& target, const QString& slot);
QString shortCut (const QString& target, const QString& slot) const;
int shortCutCount();
void readSettings ();
void fillTimeShiftCbx(const QVector<int> &vVals, int iAct);
void saveChannel(int cid);
int lastChannel();
void saveEpgDay(const QString &dateString);
QString lastEpgDay();
uint libVlcVerboseLevel();
void setAccountInfo(const cparser::SAccountInfo *pInfo);
void setGeometry(const QByteArray &ba);
QByteArray getGeometry();
int setLanguage (const QString& lng);
void setUser(const QString& str);
void setPasswd(const QString& str);
void setApiSrv(const QString& str);
void setActiveStreamServer(const QString& str);
void setActiveTimeshift(int val);
void setActiveBitrate(int val);
void setActiveBuffer(int val);
int getFontDelta ();
void setFontDelta (int i);
void setStrStdData(const cparser::QStrStdMap& data, const QString& curr);
void autoSetStreamServer (const QString& curr);
void getBrMap(QMap<int, QString>& brMap) const;
ulong savedChanges() const;
void checkChanges();
void autoStreamServerFeature (bool status);
protected:
virtual void changeEvent(QEvent *e);
virtual void showEvent(QShowEvent* e);
bool checkBitrateAndTimeShift(int iBitRate, int iTimeShift, const QString& what);
void handleStrStdDeps();
private:
Ui::CSettingsDlg *m_ui;
QString sTempPasswd;
CShortcutEx *pShortApiServer;
CShortcutEx *pShortVerbLevel;
QVector<float> vBuffs;
QVector<cparser::SChan> channelVector;
QVector<cparser::SVodRate> vodRatesVector;
const cparser::SAccountInfo *pAccountInfo;
bool bSettingsRead;
int m_iServerBitrate;
int m_iServerTimeShift;
QStrStandardDlg *m_pStrStdDlg;
QSpeedTestDlg *m_pSpdTestDlg;
ulong m_ulChgdMask;
signals:
void sigReloadLogos ();
void sigSetServer (QString sIp);
void sigSetBitRate (int iRate);
void sigSetBuffer (int iBuffer);
void sigSetTimeShift (int iShift);
void sigFontDeltaChgd (int i);
void sigSetStrStd(QString s);
void sigReqSpeedData();
private slots:
void on_btnResetShortcuts_clicked();
void on_checkAdvanced_clicked(bool checked);
void on_pushDelLogos_clicked();
void on_pushSave_clicked();
void on_pushDir_clicked();
void on_pushVLC_clicked();
void slotEnableApiServer ();
void slotEnableVlcVerbLine ();
void on_cbxStreamServer_activated(int index);
void on_cbxBitRate_activated(int index);
void on_cbxTimeShift_activated(int index);
void on_btnSaveExitManager_clicked();
void on_btnEnterManager_clicked();
void slotLockParentalManager ();
void on_btnChgPCode_clicked();
void on_linePasswd_returnPressed();
void on_cbxLanguage_currentIndexChanged(const QString &lng);
void on_cbxLanguage_activated(const QString &lng);
void on_spinBoxFontDelta_valueChanged(int arg1);
void on_pushStrStd_clicked();
void on_pushSpeedTest_clicked();
public slots:
void slotSplashStateChgd (bool bChecked);
void slotBuildChanManager (const QString &str);
void slotBuildVodManager (const QString &str);
void slotNewPCodeSet ();
void slotEnablePCodeForm ();
void slotSpeedTestData (QSpeedDataVector spdData);
};
#endif /* __011910__CSETTINGSDLG_H */
/************************* History ***************************\
| $Log$
\*************************************************************/