openPilotLog
|
This program is suppposed to replace a paper logbook with an electronic version. As a first step, I want to focus on the basics, and then add 'nice-to-haves' later. These are the guidelines for this project:
The most straight forward way is to get a copy of Qt and compile the project using cmake.
On first launch, you will run through a setup wizard for the database. If you want to test the program with a sample database, use the Backup
functionality. Select Restore external backup
from the GUI and import the file logbook.db
from the assets folder in the repository.
openssl-dev
package or similar from your distribution's package manager.Keeping a logbook of flights is a quintessential database task. This program could thus be seen as a user-friendly front-end to a database. The database is a sqlite3-Database, which is described in detail on the Database Wiki Page.
Access to the database is provided by the OPL::Database Class, which is responsible for managing the database connection and creating and executing queries. Data is retreived from the database in form of Row objects. The OPL::Row class and its subclasses represent 'lines' in a database table. Internally, they are structs holding a QQHash<QVariant, QVariant> with the key being the column name and the value its value. These Objects are then parsed by the different widgets and dialogues to read or write user-provided data.
The database contents are displayed to the user in the different widgets. Flights are displayed in the LogbookWidget, Pilots in the PilotsWidget and Aircraft in the AircraftWidget. These widgets also give convenient access to the Dialogues (NewFlightDialog, NewPilotDialog, NewTailDialog), enabling editing, adding or removing entries of their respective categories.
Widget class Elements of the User Interface dispay data from the database in a QTableView with a QSqlQueryModel. Dialog class UI Elements receive and return OPL::Row objects, which are read and written to and from the database via the OPL::Database class.
Settings are stored in a .ini
file at a standardized location. The Settings widget enables the user to adjust various settings, which are stored and accessed via the Settings class, based on the QSettings interface.
The BackupWidget enables creating and restoring backup copies of the database.