2 |
andreas |
1 |
/*
|
21 |
andreas |
2 |
* Copyright (C) 2020, 2021 by Andreas Theofilu <andreas@theosys.at>
|
2 |
andreas |
3 |
*
|
|
|
4 |
* This program is free software; you can redistribute it and/or modify
|
|
|
5 |
* it under the terms of the GNU General Public License as published by
|
|
|
6 |
* the Free Software Foundation; either version 3 of the License, or
|
|
|
7 |
* (at your option) any later version.
|
|
|
8 |
*
|
|
|
9 |
* This program is distributed in the hope that it will be useful,
|
|
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
12 |
* GNU General Public License for more details.
|
|
|
13 |
*
|
|
|
14 |
* You should have received a copy of the GNU General Public License
|
|
|
15 |
* along with this program; if not, write to the Free Software Foundation,
|
|
|
16 |
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
17 |
*/
|
|
|
18 |
|
|
|
19 |
#ifndef __TQTSETTINGS_H__
|
|
|
20 |
#define __TQTSETTINGS_H__
|
|
|
21 |
|
|
|
22 |
#include <QDialog>
|
|
|
23 |
|
|
|
24 |
namespace Ui
|
|
|
25 |
{
|
|
|
26 |
class TQtSettings;
|
|
|
27 |
}
|
|
|
28 |
|
|
|
29 |
class TQtSettings : public QDialog
|
|
|
30 |
{
|
|
|
31 |
Q_OBJECT
|
|
|
32 |
|
|
|
33 |
public:
|
|
|
34 |
explicit TQtSettings(QWidget *parent = nullptr);
|
|
|
35 |
~TQtSettings();
|
23 |
andreas |
36 |
bool hasChanged() { return mSetChanged; }
|
40 |
andreas |
37 |
void setScaleFactor(double sf) { mScaleFactor = sf; }
|
|
|
38 |
void doResize();
|
59 |
andreas |
39 |
uint getLogLevel() { return mLogLevel; }
|
122 |
andreas |
40 |
bool downloadForce() { return mDownloadForce; }
|
2 |
andreas |
41 |
|
22 |
andreas |
42 |
private slots:
|
118 |
andreas |
43 |
// Logging
|
43 |
andreas |
44 |
void on_kiconbutton_logFile_clicked();
|
|
|
45 |
void on_lineEdit_logFile_textChanged(const QString &arg1);
|
23 |
andreas |
46 |
void on_checkBox_Format_toggled(bool checked);
|
35 |
andreas |
47 |
void on_checkBox_Profiling_toggled(bool checked);
|
59 |
andreas |
48 |
void on_checkBox_LogInfo_toggled(bool checked);
|
|
|
49 |
void on_checkBox_LogWarning_toggled(bool checked);
|
|
|
50 |
void on_checkBox_LogError_toggled(bool checked);
|
|
|
51 |
void on_checkBox_LogTrace_toggled(bool checked);
|
|
|
52 |
void on_checkBox_LogDebug_toggled(bool checked);
|
|
|
53 |
void on_checkBox_LogProtocol_toggled(bool checked);
|
|
|
54 |
void on_checkBox_LogAll_toggled(bool checked);
|
43 |
andreas |
55 |
void on_kiconbutton_reset_clicked();
|
118 |
andreas |
56 |
// Controller
|
|
|
57 |
void on_lineEdit_Controller_textChanged(const QString &arg1);
|
|
|
58 |
void on_spinBox_Port_valueChanged(int arg1);
|
|
|
59 |
void on_spinBox_Channel_valueChanged(int arg1);
|
|
|
60 |
void on_lineEdit_PType_textChanged(const QString &arg1);
|
|
|
61 |
void on_lineEdit_FTPuser_textChanged(const QString &arg1);
|
|
|
62 |
void on_lineEdit_FTPpassword_textChanged(const QString &arg1);
|
122 |
andreas |
63 |
void on_comboBox_FTPsurface_currentIndexChanged(const QString &arg1);
|
|
|
64 |
void on_toolButton_Download_clicked();
|
118 |
andreas |
65 |
void on_checkBox_FTPpassive_toggled(bool checked);
|
|
|
66 |
// SIP
|
|
|
67 |
void on_lineEdit_SIPproxy_textChanged(const QString &arg1);
|
|
|
68 |
void on_spinBox_SIPport_valueChanged(int arg1);
|
|
|
69 |
void on_lineEdit_SIPstun_textChanged(const QString &arg1);
|
|
|
70 |
void on_lineEdit_SIPdomain_textChanged(const QString &arg1);
|
|
|
71 |
void on_lineEdit_SIPuser_textChanged(const QString &arg1);
|
|
|
72 |
void on_lineEdit_SIPpassword_textChanged(const QString &arg1);
|
|
|
73 |
void on_checkBox_SIPenabled_toggled(bool checked);
|
|
|
74 |
// View
|
|
|
75 |
void on_checkBox_Scale_toggled(bool checked);
|
|
|
76 |
void on_checkBox_Banner_toggled(bool checked);
|
120 |
andreas |
77 |
void on_checkBox_Toolbar_toggled(bool checked);
|
43 |
andreas |
78 |
|
22 |
andreas |
79 |
private:
|
43 |
andreas |
80 |
int scale(int value);
|
120 |
andreas |
81 |
#ifdef __ANDROID__
|
|
|
82 |
QPalette qt_fusionPalette();
|
|
|
83 |
#endif
|
|
|
84 |
template <typename T>
|
|
|
85 |
void scaleObject(T *obj);
|
23 |
andreas |
86 |
|
|
|
87 |
Ui::TQtSettings *ui{nullptr};
|
|
|
88 |
bool mSetChanged{false};
|
40 |
andreas |
89 |
double mScaleFactor{1.0};
|
59 |
andreas |
90 |
uint mLogLevel{0};
|
|
|
91 |
bool mInitRun{false};
|
122 |
andreas |
92 |
bool mDownloadForce{false};
|
2 |
andreas |
93 |
};
|
|
|
94 |
|
|
|
95 |
#endif
|