1 | // SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. |
---|---|
2 | // |
3 | // SPDX-License-Identifier: GPL-3.0-or-later |
4 | |
5 | #ifndef ADAPTERCONFIGURE_H |
6 | #define ADAPTERCONFIGURE_H |
7 | |
8 | #include "common/common.h" |
9 | |
10 | #include <QWidget> |
11 | #include <QCheckBox> |
12 | #include <QButtonGroup> |
13 | #include <QLabel> |
14 | #include <QLineEdit> |
15 | #include <QHBoxLayout> |
16 | |
17 | class ProcConfigure : public QWidget |
18 | { |
19 | Q_OBJECT |
20 | public: |
21 | explicit ProcConfigure(QWidget *parent = nullptr); |
22 | QLineEdit *LineEditlauchCmd(){ return lauchCmd; } |
23 | |
24 | protected: |
25 | QLineEdit *lauchCmd {nullptr}; |
26 | QVBoxLayout *vLayout {nullptr}; |
27 | }; |
28 | |
29 | class SockConfigure : public ProcConfigure |
30 | { |
31 | Q_OBJECT |
32 | public: |
33 | explicit SockConfigure(QWidget *parent = nullptr); |
34 | QLineEdit *lineEditIP() {return ip;} |
35 | QLineEdit *lineEditPort() {return port;} |
36 | |
37 | protected: |
38 | QLineEdit *ip {nullptr}; |
39 | QLineEdit *port {nullptr}; |
40 | }; |
41 | |
42 | class AdapterConfigure : public PageWidget |
43 | { |
44 | Q_OBJECT |
45 | public: |
46 | explicit AdapterConfigure(QWidget *parent = nullptr); |
47 | virtual void saveConfig(){qInfo() <<__FUNCTION__;} |
48 | virtual void readConfig(){qInfo() <<__FUNCTION__;} |
49 | private slots: |
50 | void clicked(); |
51 | |
52 | protected: |
53 | QCheckBox *checkBoxProc {nullptr}; |
54 | QCheckBox *checkBoxSock {nullptr}; |
55 | QVBoxLayout *mainVLayout {nullptr}; |
56 | QButtonGroup *checkBoxGroup {nullptr}; |
57 | QHash<QCheckBox*, ProcConfigure*> sections {}; |
58 | }; |
59 | |
60 | #endif // ADAPTERCONFIGURE_H |
61 |