OPL_DbSummary.3 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. .TH "OPL::DbSummary" 3 "Tue Aug 9 2022" "openPilotLog" \" -*- nroff -*-
  2. .ad l
  3. .nh
  4. .SH NAME
  5. OPL::DbSummary \- The \fBDbSummary\fP class collects summaries of entries and relevant data from the database\&.
  6. .SH SYNOPSIS
  7. .br
  8. .PP
  9. .PP
  10. \fC#include <dbsummary\&.h>\fP
  11. .PP
  12. Inherits QObject\&.
  13. .SS "Static Public Member Functions"
  14. .in +1c
  15. .ti -1c
  16. .RI "static const QMap< \fBDbSummaryKey\fP, QString > \fBdatabaseSummary\fP (const QString &db_path)"
  17. .br
  18. .RI "Return a summary of a database\&. "
  19. .ti -1c
  20. .RI "static const QString \fBsummaryString\fP (const QString &db_path)"
  21. .br
  22. .RI "returns a short summary string of the database, containing total time and date of last flight\&. "
  23. .in -1c
  24. .SH "Detailed Description"
  25. .PP
  26. The \fBDbSummary\fP class collects summaries of entries and relevant data from the database\&.
  27. Summaries are used mainly in the \fBBackupWidget\fP to give the user a quick overview about the contents of a database so they can decide which backup to delete/restore\&. This class is a helper class to avoid interfacing with the database directly\&. It uses a separate database connection in order to not interfere with the currently active database\&.
  28. .SH "Member Function Documentation"
  29. .PP
  30. .SS "const QMap< \fBDbSummaryKey\fP, QString > OPL::DbSummary::databaseSummary (const QString & db_path)\fC [static]\fP"
  31. .PP
  32. Return a summary of a database\&. Creates a summary of the database giving a quick overview of the relevant contents\&. The function runs several specialised SQL queries to create a QHash<DatabaseSummaryKey, QString> containing Total Flight Time, Number of unique aircraft and pilots, as well as the date of last flight\&. Uses a temporary database connection separate from the default connection in order to not tamper with the currently active database connection\&. The full path to the database to be summarized has to be provided\&.
  33. .SH "Author"
  34. .PP
  35. Generated automatically by Doxygen for openPilotLog from the source code\&.