Subversion Repositories tpanel

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 andreas 1
/*
141 andreas 2
 * Copyright (C) 2020, 2022 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>
141 andreas 23
#include <QAudio>
2 andreas 24
 
25
namespace Ui
26
{
27
	class TQtSettings;
28
}
29
 
141 andreas 30
class QAudioOutput;
31
 
2 andreas 32
class TQtSettings : public QDialog
33
{
34
	Q_OBJECT
35
 
36
	public:
37
		explicit TQtSettings(QWidget *parent = nullptr);
38
		~TQtSettings();
23 andreas 39
        bool hasChanged() { return mSetChanged; }
40 andreas 40
        void setScaleFactor(double sf) { mScaleFactor = sf; }
41
        void doResize();
59 andreas 42
        uint getLogLevel() { return mLogLevel; }
122 andreas 43
        bool downloadForce() { return mDownloadForce; }
2 andreas 44
 
22 andreas 45
    private slots:
118 andreas 46
        // Logging
43 andreas 47
        void on_kiconbutton_logFile_clicked();
48
        void on_lineEdit_logFile_textChanged(const QString &arg1);
23 andreas 49
        void on_checkBox_Format_toggled(bool checked);
35 andreas 50
        void on_checkBox_Profiling_toggled(bool checked);
59 andreas 51
        void on_checkBox_LogInfo_toggled(bool checked);
52
        void on_checkBox_LogWarning_toggled(bool checked);
53
        void on_checkBox_LogError_toggled(bool checked);
54
        void on_checkBox_LogTrace_toggled(bool checked);
55
        void on_checkBox_LogDebug_toggled(bool checked);
56
        void on_checkBox_LogProtocol_toggled(bool checked);
57
        void on_checkBox_LogAll_toggled(bool checked);
43 andreas 58
        void on_kiconbutton_reset_clicked();
118 andreas 59
        // Controller
60
        void on_lineEdit_Controller_textChanged(const QString &arg1);
61
        void on_spinBox_Port_valueChanged(int arg1);
62
        void on_spinBox_Channel_valueChanged(int arg1);
63
        void on_lineEdit_PType_textChanged(const QString &arg1);
64
        void on_lineEdit_FTPuser_textChanged(const QString &arg1);
65
        void on_lineEdit_FTPpassword_textChanged(const QString &arg1);
122 andreas 66
        void on_comboBox_FTPsurface_currentIndexChanged(const QString &arg1);
67
        void on_toolButton_Download_clicked();
118 andreas 68
        void on_checkBox_FTPpassive_toggled(bool checked);
69
        // SIP
70
        void on_lineEdit_SIPproxy_textChanged(const QString &arg1);
71
        void on_spinBox_SIPport_valueChanged(int arg1);
127 andreas 72
        void on_spinBox_SIPportTLS_valueChanged(int arg1);
118 andreas 73
        void on_lineEdit_SIPstun_textChanged(const QString &arg1);
74
        void on_lineEdit_SIPdomain_textChanged(const QString &arg1);
75
        void on_lineEdit_SIPuser_textChanged(const QString &arg1);
76
        void on_lineEdit_SIPpassword_textChanged(const QString &arg1);
127 andreas 77
        void on_checkBox_SIPnetworkIPv4_toggled(bool checked);
78
        void on_checkBox_SIPnetworkIPv6_toggled(bool checked);
79
        void on_comboBox_SIPfirewall_currentIndexChanged(int index);
118 andreas 80
        void on_checkBox_SIPenabled_toggled(bool checked);
139 andreas 81
        void on_checkBox_SIPiphone_toggled(bool checked);
118 andreas 82
        // View
83
        void on_checkBox_Scale_toggled(bool checked);
84
        void on_checkBox_Banner_toggled(bool checked);
120 andreas 85
        void on_checkBox_Toolbar_toggled(bool checked);
134 andreas 86
        void on_checkBox_Rotation_toggled(bool checked);
141 andreas 87
        // Sound
88
        void on_comboBox_SystemSound_currentIndexChanged(const QString& arg1);
89
        void on_toolButton_SystemSound_clicked();
90
        void on_comboBox_SingleBeep_currentIndexChanged(const QString& arg1);
91
        void on_toolButton_SingleBeep_clicked();
92
        void on_comboBox_DoubleBeep_currentIndexChanged(const QString& arg1);
93
        void on_toolButton_DoubleBeep_clicked();
94
        void on_checkBox_SystemSound_toggled(bool checked);
95
        void on_toolButton_TestSound_clicked();
96
        void on_horizontalSlider_Volume_valueChanged(int value);
97
        void on_horizontalSlider_Gain_valueChanged(int value);
43 andreas 98
 
22 andreas 99
    private:
43 andreas 100
        int scale(int value);
141 andreas 101
 
120 andreas 102
#ifdef __ANDROID__
103
        QPalette qt_fusionPalette();
104
#endif
105
        template <typename T>
106
        void scaleObject(T *obj);
23 andreas 107
 
108
        Ui::TQtSettings *ui{nullptr};
109
        bool mSetChanged{false};
40 andreas 110
        double mScaleFactor{1.0};
59 andreas 111
        uint mLogLevel{0};
112
        bool mInitRun{false};
122 andreas 113
        bool mDownloadForce{false};
2 andreas 114
};
115
 
116
#endif