18 #ifndef OPLCONSTANTS_H
19 #define OPLCONSTANTS_H
22 #include "src/database/adatabasetypes.h"
40 #if defined(__GNUC__) || defined(__clang__)
41 #define FUNC_IDENT __PRETTY_FUNCTION__
42 #elif defined(_MSC_VER)
43 #define FUNC_IDENT __FUNCSIG__
45 #define FUNC_IDENT __func__
48 #define DEB qDebug() << FUNC_IDENT << "\n\t" // Use for debugging
49 #define LOG qInfo() // Use for logging milestones (silently, will be written to log file and console out only)
50 #define INFO qInfo() // Use for messages of interest to the user (will be displayed in GUI)
51 #define WARN qWarning() // Use for warnings (will be displayed in GUI)
52 #define CRIT qCritical() // Use for critical warnings (will be displayed in GUI)
53 #define TODO qCritical() << "!\n\tTo Do:\t"
55 static const auto ApproachTypes = QStringList{
56 QLatin1String(
"VISUAL"),
57 QLatin1String(
"ILS CAT I"),
58 QLatin1String(
"ILS CAT II"),
59 QLatin1String(
"ILS CAT III"),
63 QLatin1String(
"LOC/DME"),
64 QLatin1String(
"RNAV"),
65 QLatin1String(
"RNAV (LNAV)"),
66 QLatin1String(
"RNAV (LNAV/VNAV)"),
67 QLatin1String(
"RNAV (LPV)"),
68 QLatin1String(
"RNAV (RNP)"),
69 QLatin1String(
"RNAV (RNP-AR)"),
71 QLatin1String(
"VOR/DME"),
73 QLatin1String(
"NDB/DME"),
74 QLatin1String(
"TACAN"),
77 QLatin1String(
"OTHER")
82 enum DateFormat {Default, Text};
88 enum FlightTimeFormat {Default, Decimal};
94 enum DateTimeFormat {Default, Backup};
117 static const auto TABLE_FLIGHTS = QLatin1String(
"flights");
118 static const auto TABLE_PILOTS = QLatin1String(
"pilots");
119 static const auto TABLE_TAILS = QLatin1String(
"tails");
120 static const auto TABLE_AIRCRAFT = QLatin1String(
"aircraft");
121 static const auto TABLE_AIRPORTS = QLatin1String(
"airports");
122 static const auto TABLE_CURRENCIES = QLatin1String(
"currencies");
125 static const auto FLIGHTS_DOFT = QLatin1String(
"doft");
126 static const auto FLIGHTS_DEPT = QLatin1String(
"dept");
127 static const auto FLIGHTS_DEST = QLatin1String(
"dest");
128 static const auto FLIGHTS_TOFB = QLatin1String(
"tofb");
129 static const auto FLIGHTS_TONB = QLatin1String(
"tonb");
130 static const auto FLIGHTS_PIC = QLatin1String(
"pic");
131 static const auto FLIGHTS_ACFT = QLatin1String(
"acft");
132 static const auto FLIGHTS_TBLK = QLatin1String(
"tblk");
133 static const auto FLIGHTS_TSPSE = QLatin1String(
"tSPSE");
134 static const auto FLIGHTS_TSPME = QLatin1String(
"tSPME");
135 static const auto FLIGHTS_TMP = QLatin1String(
"tMP");
136 static const auto FLIGHTS_TNIGHT = QLatin1String(
"tNIGHT");
137 static const auto FLIGHTS_TIFR = QLatin1String(
"tIFR");
138 static const auto FLIGHTS_TPIC = QLatin1String(
"tPIC");
139 static const auto FLIGHTS_TPICUS = QLatin1String(
"tPICUS");
140 static const auto FLIGHTS_TSIC = QLatin1String(
"tSIC");
141 static const auto FLIGHTS_TDUAL = QLatin1String(
"tDUAL");
142 static const auto FLIGHTS_TFI = QLatin1String(
"tFI");
143 static const auto FLIGHTS_TSIM = QLatin1String(
"tSIM");
144 static const auto FLIGHTS_PILOTFLYING = QLatin1String(
"pilotFlying");
145 static const auto FLIGHTS_TODAY = QLatin1String(
"toDay");
146 static const auto FLIGHTS_TONIGHT = QLatin1String(
"toNight");
147 static const auto FLIGHTS_LDGDAY = QLatin1String(
"ldgDay");
148 static const auto FLIGHTS_LDGNIGHT = QLatin1String(
"ldgNight");
149 static const auto FLIGHTS_AUTOLAND = QLatin1String(
"autoland");
150 static const auto FLIGHTS_SECONDPILOT = QLatin1String(
"secondPilot");
151 static const auto FLIGHTS_THIRDPILOT = QLatin1String(
"thirdPilot");
152 static const auto FLIGHTS_APPROACHTYPE = QLatin1String(
"approachType");
153 static const auto FLIGHTS_FLIGHTNUMBER = QLatin1String(
"flightNumber");
154 static const auto FLIGHTS_REMARKS = QLatin1String(
"remarks");
158 static const auto TAILS_REGISTRATION = QLatin1String(
"registration");
159 static const auto TAILS_COMPANY = QLatin1String(
"company");
160 static const auto TAILS_MAKE = QLatin1String(
"make");
161 static const auto TAILS_MODEL = QLatin1String(
"model");
162 static const auto TAILS_VARIANT = QLatin1String(
"variant");
163 static const auto TAILS_MULTIPILOT = QLatin1String(
"multipilot");
164 static const auto TAILS_MULTIENGINE = QLatin1String(
"multiengine");
165 static const auto TAILS_ENGINETYPE = QLatin1String(
"engineType");
166 static const auto TAILS_WEIGHTCLASS = QLatin1String(
"weightClass");
170 static const auto PILOTS_LASTNAME = QLatin1String(
"lastname");
171 static const auto PILOTS_FIRSTNAME = QLatin1String(
"firstname");
172 static const auto PILOTS_ALIAS = QLatin1String(
"alias");
173 static const auto PILOTS_COMPANY = QLatin1String(
"company");
174 static const auto PILOTS_EMPLOYEEID = QLatin1String(
"employeeid");
175 static const auto PILOTS_PHONE = QLatin1String(
"phone");
176 static const auto PILOTS_EMAIL = QLatin1String(
"email");
179 static const auto CURRENCIES_EXPIRYDATE = QLatin1String(
"expiryDate");
182 static const auto ROWID = QLatin1String(
"ROWID");
183 static const auto NULL_TIME_hhmm = QLatin1String(
"00:00");
185 static const auto DEFAULT_FLIGHT_POSITION =
DataPosition(TABLE_FLIGHTS, 0);
186 static const auto DEFAULT_PILOT_POSITION =
DataPosition(TABLE_PILOTS, 0);
187 static const auto DEFAULT_TAIL_POSITION =
DataPosition(TABLE_TAILS, 0);
188 static const auto DEFAULT_AIRCRAFT_POSITION =
DataPosition(TABLE_AIRCRAFT, 0);
194 static const auto LOGO = QLatin1String(
":/icons/opl-icons/logos/logo_text.png");
195 static const auto ICON_MAIN = QLatin1String(
":/icons/opl-icons/app/icon_main.png");
196 static const auto ICON_APPICON_LINUX = QLatin1String(
":/icons/opl-icons/app/icon_linux.svg");
197 static const auto ICON_APPICON_IOS = QLatin1String(
":/icons/opl-icons/app/icon_ios.svg");
198 static const auto ICON_APPICON_WIN = QLatin1String(
":/icons/opl-icons/app/icon_windows.ico");
200 static const auto ICON_TOOLBAR_HOME = QLatin1String(
":/icons/opl-icons/toolbar/thick/light/icon_home.svg");
201 static const auto ICON_TOOLBAR_NEW_FLIGHT = QLatin1String(
":/icons/opl-icons/toolbar/thick/light/icon_new_flight.svg");
202 static const auto ICON_TOOLBAR_LOGBOOK = QLatin1String(
":/icons/opl-icons/toolbar/thick/light/icon_logbook.svg");
203 static const auto ICON_TOOLBAR_AIRCRAFT = QLatin1String(
":/icons/opl-icons/toolbar/thick/light/icon_airplane.svg");
204 static const auto ICON_TOOLBAR_PILOT = QLatin1String(
":/icons/opl-icons/toolbar/thick/light/icon_pilot.svg");
205 static const auto ICON_TOOLBAR_SETTINGS = QLatin1String(
":/icons/opl-icons/toolbar/thick/light/icon_settings.svg");
206 static const auto ICON_TOOLBAR_QUIT = QLatin1String(
":/icons/opl-icons/toolbar/thick/light/icon_exit.svg");
208 static const auto ICON_TOOLBAR_BACKUP = QLatin1String(
":/icons/opl-icons/toolbar/thick/light/icon_backup.svg");
210 static const auto ICON_TOOLBAR_HOME_DARK = QLatin1String(
":/icons/opl-icons/toolbar/thick/dark/icon_home_dm.svg");
211 static const auto ICON_TOOLBAR_NEW_FLIGHT_DARK = QLatin1String(
":/icons/opl-icons/toolbar/thick/dark/icon_new_flight_dm.svg");
212 static const auto ICON_TOOLBAR_LOGBOOK_DARK = QLatin1String(
":/icons/opl-icons/toolbar/thick/dark/icon_logbook_dm.svg");
213 static const auto ICON_TOOLBAR_AIRCRAFT_DARK = QLatin1String(
":/icons/opl-icons/toolbar/thick/dark/icon_airplane_dm.svg");
214 static const auto ICON_TOOLBAR_PILOT_DARK = QLatin1String(
":/icons/opl-icons/toolbar/thick/dark/icon_pilot_dm.svg");
215 static const auto ICON_TOOLBAR_SETTINGS_DARK = QLatin1String(
":/icons/opl-icons/toolbar/thick/dark/icon_settings_dm.svg");
216 static const auto ICON_TOOLBAR_QUIT_DARK = QLatin1String(
":/icons/opl-icons/toolbar/thick/dark/icon_exit_dm.svg");
218 static const auto ICON_TOOLBAR_BACKUP_DARK = QLatin1String(
":/icons/opl-icons/toolbar/thick/dark/icon_backup_dm.svg");
224 #endif // OPLCONSTANTS_H