openPilotLog
OPL Namespace Reference

A namespace to collect constants and enums used throughout the application. More...

Namespaces

 Db
 

Classes

struct  UserDataState
 The UserDateState struct caches the current number of entries in relevant database tables for fast access. More...
 
class  Database
 The DB class encapsulates the SQL database by providing fast access to hot database data. More...
 
class  DbCompletionData
 Provides data for QCompleters and QHashs. More...
 
class  DbSummary
 The DbSummary class collects summaries of entries and relevant data from the database. More...
 
class  Row
 The Row class provides an interface for retreiving and submitting entries from the database. It is a bass class and when instantiated, the appropriate subclass should be used. More...
 
class  AircraftEntry
 
class  TailEntry
 
class  PilotEntry
 
class  SimulatorEntry
 
class  FlightEntry
 
class  CurrencyEntry
 
class  ANotificationHandler
 The ANotificationHandler class handles displaying of user-directed messages. It displays information to the user in a QMessageBox and forwards the displayed message to ALog so it is written to the console and log files. The INFO, WARN and CRIT makros provide convenient access. More...
 
class  OplGlobals
 The OplGlobals class encapsulates non-POD globals to avoid making them static. It is available as a global static object via the OPL::GLOBAL makro and may be used as if it were a pointer, guaranteed to be initialized exactly once. For more information, see (Q_GLOBAL_STATIC)[https://doc.qt.io/qt-5/qglobalstatic.html#details]. More...
 

Typedefs

using RowData_T = QHash< QString, QVariant >
 

Enumerations

enum class  CompleterTarget {
  AirportIdentifierICAO , AirportIdentifierIATA , AirportIdentifier , AirportNames ,
  Registrations , Companies , PilotNames , AircraftTypes
}
 The DatabaseTarget enum lists database items that are used by completers, for content matching or need to be accessed programatically.
 
enum class  DbSummaryKey {
  total_flights , total_tails , total_pilots , last_flight ,
  total_time
}
 Enumerates the QHash keys used when summarising a database.
 
enum class  DateFormat { ISODate , DE , EN }
 ADateFormats enumerates the accepted date formats for QDateEdits. More...
 
enum class  FlightTimeFormat { Default , Decimal }
 
enum class  DateTimeFormat { Default , Backup }
 
enum class  PilotFunction {
  PIC = 0 , PICUS = 1 , SIC = 2 , DUAL = 3 ,
  FI = 4
}
 PilotFunction Pilot in Command, Pilot in Command under Supervision, Second in Command (Co-Pilot), Dual, Flight Instructor.
 
enum class  Translation { English , German , Spanish }
 Enumerates the available translations.
 
enum class  DbViewName {
  Default , DefaultWithSim , Easa , EasaWithSim ,
  SimulatorOnly
}
 Enumerates the available SQL views in the database.
 
enum class  SimulatorType { FNPTI = 0 , FNPTII = 1 , FSTD = 2 }
 Enumerates the Simulator Types: Flight and Navigation Procedures Trainer 1/2, Flight Simulation Training Device.
 
enum class  DbTable {
  Flights , Simulators , Pilots , Tails ,
  Aircraft , Airports , Currencies , Changelog
}
 Enumerates the tables in the database.
 
enum class  CurrencyName {
  Licence = 1 , TypeRating = 2 , LineCheck = 3 , Medical = 4 ,
  Custom1 = 5 , Custom2 = 6
}
 Enumerates the currency names.
 

Detailed Description

A namespace to collect constants and enums used throughout the application.

The opl namespace collects enums and constants that are used throughout the application and provide uniform access.

The date, time and datetime namespaces include enums used to differentiate date and time formats for QDate, QTime and QDateTime that deviate from standard values included in the Qt Framework like Qt::ISODate and are to be used in conjunction with the .toString() members of these classes.

The db namespace contains constants for programatically accessing the database in a fast and uniform manner.

Enumeration Type Documentation

◆ DateFormat

enum OPL::DateFormat
strong

ADateFormats enumerates the accepted date formats for QDateEdits.

Todo:
At the moment, only ISODate is accepet as a valid date format.