1 #ifndef AIRPORTWIDGET_H
2 #define AIRPORTWIDGET_H
5 #include <QSqlTableModel>
21 void airportDatabaseUpdated();
24 void on_searchLineEdit_textChanged(
const QString &arg1);
26 void on_searchComboBox_currentIndexChanged(
int index);
28 void on_newAirportPushButton_clicked();
30 void onSelectionChanged();
32 void on_deletePushButton_clicked();
34 void on_editAirportPushButton_clicked();
39 Ui::AirportWidget *ui;
40 QSqlTableModel *model;
42 QList<int> selectedEntries;
44 void setupModelAndeView();
47 inline const static QString TABLE_NAME = QStringLiteral(
"airports");
48 inline const static QMap<int, QString> FILTER_MAP = {
49 {0, QStringLiteral(
"icao LIKE \"%")},
50 {1, QStringLiteral(
"iata LIKE \"%")},
51 {2, QStringLiteral(
"name LIKE \"%")},
52 {3, QStringLiteral(
"country LIKE \"%")},
54 inline const static QMap<int, QString> HEADER_MAP = {
55 {0, QStringLiteral(
"ICAO")},
56 {1, QStringLiteral(
"IATA")},
57 {2, QStringLiteral(
"Name")},
58 {3, QStringLiteral(
"Country")},