1 #ifndef SETUPPAGESUBDIVISIONNEW_H 2 #define SETUPPAGESUBDIVISIONNEW_H 3 /*************************************************************************** 4 setuppagesubdivisionnew.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 // This class implements the Dialog to add a new log 30 // 31 #include "dataproxy_sqlite.h" 32 33 #include <QDialog> 34 #include <QtWidgets> 35 #include <QSqlQuery> 36 37 //TODO: Read the data when the user clicks the OK button 38 //TODO: Fill the data from the list of logs when the user wants to edit a log 39 40 class SetupPageSubdivisionNew : public QDialog 41 { 42 Q_OBJECT 43 44 public: 45 //SetupPageLogsNew(QWidget *parent = 0); 46 SetupPageSubdivisionNew(DataProxy_SQLite *dp, QWidget *parent = nullptr); 47 48 void setEditing(const bool b); 49 void setStationCallSign(const QString &_st); 50 void setOperators(const QString &_st); 51 void setComment(const QString &_st); 52 void setDateString(const QString &_st); 53 54 55 private slots: 56 void slotOKButtonClicked(); 57 void slotCancelButtonClicked(); 58 59 void slotStationCallSignTextChanged(); 60 void slotOperatorsTextChanged(); 61 62 signals: 63 void newLogData(const QStringList _qs); // 64 void cancelled(const bool _c); // Cancel button is clicked 65 66 private: 67 68 //bool isThereAnyNotManagedLog(); 69 void createWidget(); 70 void gatherAndSend(); 71 //QStringList getValidCatOptions(const int _currentCat, const int _higherCat); 72 //int getSelectedTypeContest(); 73 //void fillWithType(const int _n); 74 //void updateAllCats(); 75 void showOK(); 76 void showNOK(); 77 void clear(); 78 79 80 DataProxy_SQLite *dataProxy; 81 82 QDateEdit *dateEdit; 83 84 QLineEdit *stationCallsignLineEdit; 85 QLineEdit *operatorsLineEdit, *commentLineEdit; 86 87 QString stationCallsign, operators, comment, dateString;//, typeConteststr; 88 //int typeContest, typeContestSelected, contestCatMode, contestCatOperators, contestCatAssisted, contestCatPower, contestCatBands, contestBands, contestCatOverlay; 89 90 bool stationCallsignFilled, operatorsFilled; 91 //int typeOperation; // DX, CQ-WW-SSB, CQ-WW-CW, CQ-WPX-SSB, CQ-WPX-CW 92 93 QPushButton *okButton, *cancelButton; 94 95 QStringList logData; 96 bool editing; 97 98 //QLabel *catAsLabel, *catOpLabel, *catModeLabel, *catPowerLabel, *catBandsLabel, *overlayLabel; 99 //QLabel *typeLabel, *validCats, 100 QLabel *stationCallsignLabel, *operatorsLabel, *commentLabel, *dateLabel; 101 102 //nameLabel->setBuddy(); 103 104 bool checking; //, bCass, bCOp, bCMo, bCPo, bCBa, bCOv, bCTy; 105 106 }; 107 108 #endif // SETUPPAGEREGIONALAWARDSNEW_H 109