22 #include <QRegularExpression>
23 #include <QMessageBox>
26 #include <QStringList>
27 #include <QButtonGroup>
30 #include <QCalendarWidget>
34 #include "src/gui/dialogues/newtaildialog.h"
35 #include "src/gui/dialogues/newpilotdialog.h"
37 #include "src/experimental/adatabase.h"
38 #include "src/experimental/aflightentry.h"
39 #include "src/experimental/apilotentry.h"
40 #include "src/experimental/atailentry.h"
41 #include "src/functions/acalc.h"
42 #include "src/testing/atimer.h"
66 void onInputRejected();
69 void onToUpperTriggered_textChanged(
const QString&);
70 void onPilotNameLineEdit_editingFinished();
71 void onLocationEditingFinished(QLineEdit*, QLabel*);
72 void onTimeLineEdit_editingFinished();
73 void onCompleter_highlighted(
const QString&);
74 void onCompleter_activated(
const QString &);
75 void onCalendarWidget_clicked(
const QDate &date);
76 void onCalendarWidget_selected(
const QDate &date);
77 void onDoftLineEdit_entered();
78 void on_calendarCheckBox_stateChanged(
int arg1);
79 void on_doftLineEdit_editingFinished();
80 void on_cancelButton_clicked();
81 void on_submitButton_clicked();
82 void on_setAsDefaultButton_clicked();
83 void on_restoreDefaultButton_clicked();
84 void on_PilotFlyingCheckBox_stateChanged(
int arg1);
85 void on_IfrCheckBox_stateChanged(
int);
86 void on_manualEditingCheckBox_stateChanged(
int arg1);
87 void on_ApproachComboBox_currentTextChanged(
const QString &arg1);
88 void on_FunctionComboBox_currentIndexChanged(
int index);
89 void on_deptLocLineEdit_editingFinished();
90 void on_destLocLineEdit_editingFinished();
91 void on_acftLineEdit_editingFinished();
103 QList<QLineEdit*> mandatoryLineEdits;
104 QList<QLineEdit*> primaryTimeLineEdits;
105 QList<QLineEdit*> pilotsLineEdits;
111 QBitArray mandatoryLineEditsGood;
116 QStringList pilotList;
117 QStringList tailsList;
118 QStringList airportList;
123 QMap<QString, int> pilotsIdMap;
124 QMap<QString, int> tailsIdMap;
125 QMap<QString, int> airportIcaoIdMap;
126 QMap<QString, int> airportIataIdMap;
127 QMap<QString, int> airportNameIdMap;
137 void writeSettings();
138 void setupButtonGroups();
139 void setPopUpCalendarEnabled(
bool state);
140 void setupRawInputValidation();
141 void setupSignalsAndSlots();
143 void fillDeductibleData();
145 void onMandatoryLineEditsFilled();
146 void onGoodInputReceived(QLineEdit*);
147 void onBadInputReceived(QLineEdit *);
148 bool eventFilter(QObject *
object, QEvent *event);
149 bool isLessOrEqualThanBlockTime(
const QString time_string);
151 void addNewTail(QLineEdit*);
152 void addNewPilot(QLineEdit *);
154 experimental::TableData collectInput();
158 #endif // NEWFLIGHT_H