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
|
#ifndef KLOG_KLOGDEFINITIONS_H
#define KLOG_KLOGDEFINITIONS_H
/***************************************************************************
klogdefinitions.h - description
-------------------
begin : oct 2020
copyright : (C) 2020 by Jaime Robles
user : 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/>. *
* *
*****************************************************************************/
#include <QString>
//using namespace std;
enum ExportMode {ModeLotW, ModeADIF, ModeClubLog, ModeEQSL, ModeQRZ};
enum OnLineProvider {ClubLog, LoTW, eQSL, QRZ}; //, HamQTH, HRDLog
enum OnlineErrorCode {Ok, Fail};
enum OnlineErrorReason {Other, Auth, DupeQSO, WrongLogBook};
enum DebugLogLevel {None, Info, Debug, Devel};
enum ValidFieldsForStats {DXCC, GridSquare};
enum FilesToDownload {CTY, Sats};
enum QSOStatus {unknown, ATNO, needed, worked, confirmed};
enum WJTXStatus {NewContinent, NewContinentInBand, NewContinentInMode,
NewCQ, NewCQInBand, NewCQInMode,
NewITU, NewITUInBand, NewITUInMode,
NewDXCC, NewDXCCInBand, NewDXCCInMode,
NewGrid, NewGridInBand, NewGridInMode,
NewCall, NewCallInBand, NewCallInMode };
enum FreqUnits {Hz, KHz, MHz, GHz, THz};
enum MouseClicks {NoClick, RightClick, SingleClick, DoubleClick};
enum DataTableHash {WorldData, BandData, ModeData}; // Used by World & DataProxy to select the table to build a Hash
//struct EntityData { // Used to pass a list of data from World to dxccstatuswidget
// int dxcc;
// QString mainprefix;
// QString name;
// QString isoname;
//};
struct EntityData { // Used to pass a list of data from World to dxccstatuswidget
int dxcc;
QString mainprefix;
QString name;
QString isoname;
bool operator<(const EntityData &other) const {
return std::tie(dxcc, mainprefix, name, isoname) < std::tie(other.dxcc, other.mainprefix, other.name, other.isoname);
}
bool operator==(const EntityData &other) const {
return std::tie(dxcc, mainprefix, name, isoname) == std::tie(other.dxcc, other.mainprefix, other.name, other.isoname);
}
};
struct EntityStatus { // Used to pass a list of data from Awards to dxccstatuswidget
int dxcc;
int bandId;
int modeId;
QSOStatus status; // status of this Entity in this band
int qsoId; // QSOid that provides this status
int logId; // Log where we are checking the status (TODO: This may be redundant as the qsoId may be used to get the log)
};
struct Coordinate {
double lat;
double lon;
};
struct PrimarySubdivision { // Used to return data to MainWindow for each prefix
QString name;
QString shortName;
QString prefix;
int cqz;
int ituz;
int dxcc;
};
#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 2))
#define QT_SKIP Qt::SkipEmptyParts
#define QT_ENDL Qt::endl
#define QT_RETURNBYVALUE Qt::ReturnByValue
#else
#define QT_SKIP QString::SkipEmptyParts
#define QT_ENDL endl
#define QT_RETURNBYVALUE
#endif
#endif // KLOGDEFINITIONS_H
|