1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
|
#ifndef KLOG_INPUTWIDGETS_MAINWINDOWINPUTOTHERS_H
#define KLOG_INPUTWIDGETS_MAINWINDOWINPUTOTHERS_H
/***************************************************************************
mainwindowminputothers.h - description
-------------------
begin : ago 2016
copyright : (C) 2016 by Jaime Robles
email : jaime@robles.es
***************************************************************************/
/*****************************************************************************
* This file is part of KLog. *
* *
* KLog is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* KLog is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with KLog. If not, see <https://www.gnu.org/licenses/>. *
* *
*****************************************************************************/
//
// This class implement the tab of the mainwindow that supports the Others tab
//
#include <QWidget>
#include <QtWidgets>
#include "../dataproxy_sqlite.h"
#include "../utilities.h"
#include "../klogdefinitions.h"
#include "../world.h"
#include "../qso.h"
class MainWindowInputOthers : public QWidget
{
Q_OBJECT
friend class tst_MainWindowInputOthers;
public:
MainWindowInputOthers(DataProxy_SQLite *dp, World *injectedWorld, QWidget *parent = nullptr);
~MainWindowInputOthers();
void setDarkMode (const bool _dm);
QSO getQSOData(QSO _qso);
void setQSOData(const QSO &_qso);
void setEntitiesList();
void setEntity(const int _entity); // Move the external call to setEntityAndPrefix
int getEntity();
QString getEntityPrefix();
void setEntityAndPrefix(const int _entity, const QString &_qrz); // Receives the entity & prefix of the call to check if
// It is possible to focus the primary
// subdivision. Updates also the IOTA continent
void setPropMode(const QString &_qs, bool _keep);
QString getPropModeFromComboBox();
bool isSATPropagation();
bool setUserADIFTypeComboBox(const QString &_value);
QString getUserADIFTypeComboBox();
bool setUserADIFValue(const QString &_adifValue);
QString getUserADIFValue();
bool setSOTA(const QString &_op);
QString getSOTA();
bool setAge(const double _op);
double getAge();
bool setDistance(const double _op);
double getDistance();
bool setVUCCGrids(const QString &_op);
QString getVUCCGrids();
bool setPOTA_REF(const QString &_op);
QString getPOTA_REF();
bool setSIG(const QString &_op);
QString getSIG();
bool setSIG_INFO(const QString &_op);
QString getSIG_INFO();
bool setWWFF_Ref(const QString &_op);
QString getWWFF_Ref();
void setIOTA(const QString &_qs);
QString getIOTA();
void setIOTAContinent(const QString &_qs);
bool isIOTAModified();
void clearIOTA();
void setKeep(const bool _b);
bool getKeep();
bool setState(const QString &_op); // Sets a subdivision / State
QString getState(); // Reads the subdivision / State
void createUI();
void clear(bool _full = false); //full= false leaves the "keep this data"; full = true clears everything
void setLogLevel (const DebugLogLevel _l);
signals:
void setPropMode(const QString _p);
void debugLog (QString _func, QString _msg, DebugLogLevel _level);
//void showAll(bool _showAll);
private slots:
//void slotSetPropMode(const QString &_p); // To receive the signal from the SAT widget and set "SAT" propagation mode, of needed.
void slotPropModeComboBoxChanged();
void slotUserDefinedADIFComboBoxChanged();
void slotSetCurrentUserData();
void slotPrimarySubdivisionsComboBoxChanged();
void slotShowAllCheckBoxChanged();
void slotEntityNameComboBoxChanged();
private:
QString checkIfValidIOTA(const QString &_tiota); //TODO: There is an equivalent function in the Awards class. I should use only one!
void setColorsForUserDefinedADIFValueLineEdit();
bool checkVUCC_GRIDS(const QString &_string);
bool setInitialADIFValues();
void updateShowAll();
void setPaletteIOTA(const bool _ok);
void updatePrimarySubdivisionsComboBox(QList<PrimarySubdivision> _subdivisions);
//bool getDarkMode();
void readDarkMode();
void logEvent(const QString &_func, const QString &_msg, DebugLogLevel _level);
Utilities *util;
DataProxy_SQLite *dataProxy;
World *world;
bool darkMode;
QStringList propModeList; // entitiesList,
//QLabel *entityPrimLabel, *entitySecLabel, *iotaAwardLabel, *entityNameLabel, *propModeLabel;
QComboBox *iotaContinentComboBox, *entityPrimDivComboBox, *entitySecDivComboBox, *entityNameComboBox, *propModeComboBox;
QLineEdit *iotaNumberLineEdit;
QCheckBox *keepPropCheckBox, *showAllCheckBox;
QPalette palRed, palBlack, palWhite;
bool autoUpdating;
QComboBox *userDefinedADIFComboBox;
QLineEdit *userDefinedADIFValueLineEdit;
QStringList adifValidTypes;
QString currentPref;
int currentInt; // if the showAllCheckBox is toggled
QString sota_ref, vucc_grids, pota_ref, sig, sig_info, wwff_ref;
double age, distance;
DebugLogLevel logLevel;
};
#endif // MAINWINDOWINPUTOTHERS_H
|