1 #ifndef INFOWIDGET_H 2 #define INFOWIDGET_H 3 /*************************************************************************** 4 infowidget.h - description 5 ------------------- 6 begin : ago 2017 7 copyright : (C) 2017 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 Info widget where the band, bearing, CQ & ITU zones.... are shown 30 // 31 #include <QWidget> 32 #include <QtWidgets> 33 #include "locator.h" 34 #include "awards.h" 35 #include "world.h" 36 #include "dataproxy_sqlite.h" 37 #include "dataproxy_sqlite.h" 38 39 40 41 class InfoWidget : public QWidget 42 { 43 Q_OBJECT 44 public: 45 InfoWidget(DataProxy_SQLite *dp, QWidget *parent = 0); 46 void createUI(); 47 void clear(); 48 void setCurrentLog(const int _log); 49 void setColors (const QString &_newOne, const QString &_needed, const QString &_worked, const QString &_confirmed, const QString &_default); 50 void setImperialSystem (const bool _imp); 51 void showInfo(const int _entity); 52 void showDistanceAndBearing(const QString &_locLocal, const QString &_loc2); 53 void showEntityInfo(const int _enti, int _cq=-1, int _itu=-1); 54 void setLocalLocator(const QString &_loc); //MAYBE NOT NEEDED 55 void setDXLocator(const QString &_loc); //MAYBE NOT NEEDED 56 57 private: 58 void clearBandLabels(); 59 void clearInfoFromLocators(); 60 QString getStyleColorToLabelFromBand(const QString &_b, const QString &_q); 61 62 QLabel *bandLabel1, *bandLabel2, *bandLabel3, *bandLabel4; 63 QLabel *bandLabel5, *bandLabel6, *bandLabel7, *bandLabel8; 64 QLabel *bandLabel9, *bandLabel10, *bandLabel11, *bandLabel12; 65 QLabel *continentLabel, *prefixLabel, *cqzLabel, *ituzLabel; 66 QLabel *gradShortLabel, *distShortLabel; 67 QLabel *gradLongLabel, *distLongLabel; 68 QLabel *distShortLabelN; 69 QLabel *distLongLabelN; 70 71 Awards *awards; 72 DataProxy_SQLite *dataProxy; 73 Locator *locator; 74 World *world; 75 76 int currentLog; 77 bool imperialSystem; 78 QString dxLocator, localLocator; 79 80 }; 81 82 #endif // INFOWIDGET_H 83