1 #ifndef SETUPPAGEELOG_H
2 #define SETUPPAGEELOG_H
3 /***************************************************************************
4                           setuppageelog.h  -  description
5                              -------------------
6     begin                : oct 2020
7     copyright            : (C) 2020 by Jaime Robles
8     email                : jaime@robles.es
9  ***************************************************************************/
10 
11 /*****************************************************************************
12  * This file is part of KLog.                                                *
13  *                                                                           *
14  *    KLog is free software: you can redistribute it and/or modify           *
15  *    it under the terms of the GNU General Public License as published by   *
16  *    the Free Software Foundation, either version 3 of the License, or      *
17  *    (at your option) any later version.                                    *
18  *                                                                           *
19  *    KLog is distributed in the hope that it will be useful,                *
20  *    but WITHOUT ANY WARRANTY; without even the implied warranty of         *
21  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
22  *    GNU General Public License for more details.                           *
23  *                                                                           *
24  *    You should have received a copy of the GNU General Public License      *
25  *    along with KLog.  If not, see <https://www.gnu.org/licenses/>.         *
26  *                                                                           *
27  *****************************************************************************/
28 
29 
30 #include <QtWidgets>
31 #include "utilities.h"
32 
33 class SetupPageELog : public QWidget {
34     Q_OBJECT
35 
36 public:
37     SetupPageELog(QWidget *parent=nullptr);
38     ~SetupPageELog();
39 
40     //Clublog
41     void setClubLogEmail(const QString &c);
42     void setClubLogPassword(const QString &c);
43     void setClubLogActive(const bool &_b);
44     void setClubLogRealTime(const bool &_s);
45 
46     QString getClubLogEmail();
47     QString getClubLogPassword();
48     bool getClubLogActive();
49     bool getClubLogRealTime();
50 
51 
52     // LoTW
53     void setTQSLPath(const QString &c);
54     QString getTQSLPath();
55     void setLoTWActive(const bool &_s);
56     QString getLoTWActive();
57     void setLoTWUser(const QString &_s);
58     QString getLoTWUser();
59     void setLoTWPass(const QString &_s);
60     QString getLoTWPass();
61 
62     // eQSL
63     void setEQSLUser(const QString &c);
64     void setEQSLPassword(const QString &c);
65     void setEQSLActive(const bool _b);
66     //void setEQSLRealTime(const QString &_s);
67 
68     QString getEQSLUser();
69     QString getEQSLPassword();
70     bool getEQSLActive();
71     //QString getEQSLRealTime();
72 
73     //QRZ.COM
74     void setQRZCOMUser(const QString &_s);
75     void setQRZCOMPassword(const QString &_s);
76 
77     void setQRZCOMLogBookKEY(const QString &_s);
78     void setQRZCOMActive(const QString &_s);
79     void setQRZCOMAutoCheck(const QString &_s);
80 
81     QString getQRZCOMUser();
82     QString getQRZCOMPassword();
83 
84     QString getQRZCOMLogBookKEY();
85     bool getQRZCOMActive();
86     bool getQRZCOMAutoCheck();
87 
88 
89 private slots:
90 
91     void slotClubLogActive(const bool _s);
92     void slotEQSLActive(const bool _s);
93     void slotTQSLActive(const bool _s);
94     void slotQRZCOMActive(const bool _s);
95     void slotQRZCOMAuto(const bool _s);
96     void slotQRZCallTextChanged();
97 
98     void slotSelectTQSLClicked();
99     void slotPathLineEditChanged(const QString &_q);
100     void slotEnterKeyPressed();
101     void slotClubLogEmailDefineColor();
102     void slotLoTWEmailDefineColor();
103     void sloteQSLCallTextChanged();
104 signals:
105     void enterKey();
106     void qrzcomAuto(bool _s);
107 
108 protected:
109     //void closeEvent(QCloseEvent *event);
110     void showEvent(QShowEvent *event);
111 private:
112     void setDefaults();
113     //QString defaultFileName;
114     QGroupBox *clubLogGroup;
115     QCheckBox *clubLogSendInRealTimeCheckBox, *clubLogActiveCheckBox;//, *useQSOStationCallCheckBox;
116     QLineEdit *clubLogPasswordLineEdit, *clubLogEmailLineEdit;//, *callLineEdit;
117     QLabel *clubLogPasswordLabel, *clubLogEmailLabel; //*callLabel,
118     QString clubLogEmail, clubLogPass;
119     bool clubLogActive, clubLogRealTime;
120 
121     QGroupBox *eQSLccGroup;
122     QLineEdit *eQSLUserLineEdit, *eQSLPasswordLineEdit;
123     QCheckBox *eQSLActiveCheckBox; //*eQSLSendInRealTimeCheckBox,
124     QLabel *eQSLpasswordLabel, *eQSLemailLabel;
125     bool eqslActive;
126     QString eqslUser, eqslPass;
127 
128     QGroupBox *lotwGroup, *lotwUpGroup, *lotwDownGroup;
129     QLineEdit *lotwUserLineEdit, *lotwPasswordLineEdit;
130     QLineEdit *lotwTQSLPathLineEdit;
131     QPushButton *lotwSearchTQSLPushButton;
132     QCheckBox *lotwUseTQSLCheckBox;
133     QLabel *lotwpasswordLabel, *lotwemailLabel;
134     bool lotwTQSL;
135     QString lotwPath, lotwUser, lotwPass;
136 
137     QGroupBox *QRZCOMGroup;
138     //QLineEdit *QRZCOMAPILineEdit;
139     QLineEdit *QRZCOMUserLineEdit, *QRZCOMPasswordLineEdit, *QRZCOMLogBookKEYLineEdit;
140     QLabel *QRZCOMPasswordLabel, *QRZCOMUserLabel, *QRZLogBookKeyLabel;
141     QCheckBox *QRZCOMActiveCheckBox, *QRZCOMAutoCheckCheckBox;
142 
143     bool qrzcomActive, qrzcomAutoFill;
144     QString qrzComUser, qrzcomPass, qrcomLogbookKey;
145 
146     Utilities *util;
147 
148     QPalette palRed, palBlack;
149 
150 
151 };
152 
153 #endif // SETUPPAGEELOG_H
154