Subversion Repositories tpanel

Rev

Details | Last modification | View Log | RSS feed

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