openPilotLog
OPL Namespace Reference

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

Namespaces

 Calc
 The ACalc namespace provides various functions for calculations that are performed outside of the database. This includes tasks like converting different units and formats, or functions calculating block time or night time.
 
 Db
 
 Log
 The OPL::Log namespace encapsulates constants and functions used to provide logging to files and logging to console (stdout)
 

Classes

class  Paths
 
struct  StyleSheet
 The StyleSheet struct holds the Display Name and File Name (in the resource system) for the available stylesheets. More...
 
class  Style
 The AStyle class encapsulates style and stylesheet logic. 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. More...
 
class  AircraftEntry
 A Row representing an Aircraft entry. See Row class for details. More...
 
class  TailEntry
 A Row representing a Tail (Registration) entry. See Row class for details. More...
 
class  PilotEntry
 A Row representing a Pilot entry. See Row class for details. More...
 
class  SimulatorEntry
 A Row representing a Simulator entry. See Row class for details. More...
 
class  FlightEntry
 A Row representing a Flight entry. See Row class for details. More...
 
class  CurrencyEntry
 A Row representing a Currency entry. See Row class for details. More...
 
class  AirportEntry
 A Row representing an Airport entry. See Row class for details. More...
 
class  DateTime
 
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 {
  Any , 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.