AircraftWidget.3 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. .TH "AircraftWidget" 3 "Tue May 4 2021" "openPilotLog" \" -*- nroff -*-
  2. .ad l
  3. .nh
  4. .SH NAME
  5. AircraftWidget \- The \fBAircraftWidget\fP is used to view, edit, delete or add new tails\&.
  6. .SH SYNOPSIS
  7. .br
  8. .PP
  9. .PP
  10. \fC#include <aircraftwidget\&.h>\fP
  11. .PP
  12. Inherits QWidget\&.
  13. .SS "Public Slots"
  14. .in +1c
  15. .ti -1c
  16. .RI "void \fBonAircraftWidget_settingChanged\fP (\fBSettingsWidget::SettingSignal\fP signal)"
  17. .br
  18. .RI "invokes setupModelAndView() to account for changes the user has made in the \fBSettingsWidget\fP "
  19. .ti -1c
  20. .RI "void \fBonAircraftWidget_dataBaseUpdated\fP ()"
  21. .br
  22. .RI "Refreshes the view if the Database has been altered from outside the \fBAircraftWidget\fP\&. "
  23. .ti -1c
  24. .RI "void \fBrepopulateModel\fP ()"
  25. .br
  26. .RI "\fBAircraftWidget::repopulateModel\fP (public slot) - re-populates the model to cater for a change to the database connection (for example, when a backup is created) "
  27. .in -1c
  28. .SS "Public Member Functions"
  29. .in +1c
  30. .ti -1c
  31. .RI "\fBAircraftWidget\fP (QWidget *parent=nullptr)"
  32. .br
  33. .in -1c
  34. .SS "Protected Member Functions"
  35. .in +1c
  36. .ti -1c
  37. .RI "void \fBchangeEvent\fP (QEvent *event) override"
  38. .br
  39. .RI "Handles change events, like updating the UI to new localisation\&. "
  40. .in -1c
  41. .SH "Detailed Description"
  42. .PP
  43. The \fBAircraftWidget\fP is used to view, edit, delete or add new tails\&.
  44. The widget consists of two main parts, a \fIQTableView\fP on the left side and a \fIQStackedWidget\fP on the right side\&.
  45. .PP
  46. In the QTableView, a QSqlTableModel is used to access a view from the database, which holds a tails' Registration, Type and Company\&.
  47. .PP
  48. The welcome page shown on the QStackedWidget on the right side has a QLineEdit that functions as a search box and a QCombobox holding the possible columns that can be used to filter what is displayed\&. The text of the QLineEdit is used as a filter for the QSqlTableModel, so the view is updated in real time\&.
  49. .PP
  50. The \fI\fBNewTailDialog\fP\fP is used for creating a new entry as well as for editing an existing entry\&. If the user selects a row in the QTableView, the NewTailDilog is displayed on the right side of the Widget, inside the QStackedWidget\&. In order to avoid leaks from any previously made selections, existing Dialogs are deleted before a new one is created\&. The \fBNewTailDialog\fP's \fCaccepted\fP and \fCrejected\fP signals are connected to refresh the view as required\&.
  51. .PP
  52. Note: The \fBATailEntry\fP class is used to operate on individual aircraft, whereas the \fBAAircraftEntry\fP class is used to retreive templates of aircraft types\&. For example, 'D-ABCD' and 'N-XYZ' are different tails (Registrations), but they might be the same type of aircraft, for example 'Boeing 737-800'\&.
  53. .SH "Author"
  54. .PP
  55. Generated automatically by Doxygen for openPilotLog from the source code\&.