![]() |
openPilotLog
|
Provides data for QCompleters and QHashs. More...
#include <dbcompletiondata.h>
Public Member Functions | |
void | init () |
init Retrieves Data and populates Lists and Maps | |
void | update () |
updates data from the user modifiable tables | |
void | updateTails () |
void | updatePilots () |
void | updateAirports () |
Static Public Member Functions | |
static const QStringList | getCompletionList (CompleterTarget target) |
getCompletionList returns a QStringList of values for a QCompleter based on database values | |
static const QHash< int, QString > | getIdMap (CompleterTarget target) |
returns a QHash of a human-readable database value and its row id. Used in the Dialogs to map user input to unique database entries. | |
Provides data for QCompleters and QHashs.
QCompleters and QHashes are used for mapping user input to database keys. The required data is retreived from the database and cached for fast access without the need to query the database. The DbCompletionData class holds the last state of the database (state of user-modifiable data) in order to intelligently refresh the completion data when needed.