1 #ifndef AWARDSWIDGET_H 2 #define AWARDSWIDGET_H 3 /*************************************************************************** 4 awardswidget.h - description 5 ------------------- 6 begin : nov 2019 7 copyright : (C) 2019 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 implement the tab of the search widget 30 // 31 #include <QWidget> 32 #include <QtWidgets> 33 #include "dataproxy_sqlite.h" 34 #include "awards.h" 35 //#include "world.h" 36 //#include "utilities.h" 37 //#include "filemanager.h" 38 39 40 class AwardsWidget : public QWidget 41 { 42 Q_OBJECT 43 public: 44 explicit AwardsWidget(DataProxy_SQLite *dp, QWidget *parent = nullptr); 45 ~AwardsWidget(); 46 void setManageDXMarathon(const bool _dx); 47 void setLog(const int _log); 48 void setYear(const int _year); 49 void fillOperatingYears(); 50 void showAwards(); 51 52 void clear(); 53 54 private slots: 55 void slotRecalculateAwardsButtonClicked(); 56 void slotOperatingYearComboBoxChanged(); 57 58 59 signals: 60 //void actionQSODoubleClicked(const int _qsoid); 61 void debugLog (QString _func, QString _msg, DebugLogLevel _level); 62 void queryError(QString functionFailed, QString errorCodeS, QString nativeError, QString failedQuery); // To alert about any failed query execution 63 //void recalculateAwardsSignal(); 64 void requireCurrentLogSignal(); 65 void requireCurrentYearSignal(); 66 67 68 private: 69 void createUI(); 70 void setToolTips(); 71 72 void showDXMarathon(const int _year); 73 void checkIfValidLog(); 74 void reconfigureDXMarathonUI(const bool _dxM); 75 76 QLCDNumber *dxccConfirmedQLCDNumber, *dxccWorkedQLCDNumber, 77 *wazConfirmedQLCDNumber, *wazWorkedQLCDNumber, 78 *localConfirmedQLCDNumber, *localWorkedQLCDNumber, 79 *qsoConfirmedQLCDNumber, *qsoWorkedQLCDNumber, 80 *yearlyQSOLCDNumber, *yearlyDXCCQLCDNumber, *yearlyCQQLCDNumber, *yearlyScoreQLCDNumber; 81 QLabel *yearlyLabelN, *yearlyScoreLabelN; 82 QPushButton *recalculateAwardsButton; 83 QComboBox *operatingYearsComboBox; 84 85 DataProxy_SQLite *dataProxy; 86 bool manageDXMarathon; 87 int selectedYear; 88 int currentLog; 89 DebugLogLevel logSeverity; 90 91 Awards *awards; 92 93 94 }; 95 96 #endif // AWARDSWIDGET_H 97