Browse Source

Small UI fixes

- Message Box asking for confirmation of new database entry if it does not exist now defaults to Yes
- Removed email address regex validation (no point in doing)
- Adding a new Pilot in the NewFlightDialog now automatically pre-fills an entered last name
Felix Turowsky 1 year ago
parent
commit
5e6e8b3ddd

+ 10 - 4
src/gui/dialogues/newflightdialog.cpp

@@ -300,7 +300,7 @@ bool NewFlightDialog::addNewDatabaseElement(QLineEdit *parent, OPL::DbTable tabl
     if(userWantsToAddNewEntry(table)) {
         switch (table) {
         case OPL::DbTable::Pilots:
-            dialog = new NewPilotDialog(this);
+            dialog = new NewPilotDialog(parent->text(), this);
             break;
         case OPL::DbTable::Tails:
             dialog = new NewTailDialog(ui->acftLineEdit->text(), this);
@@ -354,7 +354,7 @@ bool NewFlightDialog::userWantsToAddNewEntry(OPL::DbTable table)
                                         "If this is the first time you log a flight with this pilot, "
                                         "you have to add the pilot to the database first."
                                         "<br><br>Would you like to add a new pilot to the database?"),
-                                     QMessageBox::Yes|QMessageBox::No);
+                                      QMessageBox::Yes|QMessageBox::No, QMessageBox::StandardButton::Yes);
         break;
     case OPL::DbTable::Tails:
         reply = QMessageBox::question(this, tr("No Aircraft found"),
@@ -362,7 +362,7 @@ bool NewFlightDialog::userWantsToAddNewEntry(OPL::DbTable table)
                                          "If this is the first time you log a flight with this aircraft, "
                                          "you have to add the registration to the database first."
                                          "<br><br>Would you like to add a new aircraft to the database?"),
-                                      QMessageBox::Yes|QMessageBox::No);
+                                      QMessageBox::Yes|QMessageBox::No, QMessageBox::StandardButton::Yes);
         break;
     case OPL::DbTable::Airports:
         reply = QMessageBox::question(this, tr("No Airport found"),
@@ -370,7 +370,7 @@ bool NewFlightDialog::userWantsToAddNewEntry(OPL::DbTable table)
                                          "If this is the first time you log a flight to this airport, "
                                          "you have to add the airport to the database first."
                                          "<br><br>Would you like to add a new airport to the database?"),
-                                      QMessageBox::Yes|QMessageBox::No);
+                                      QMessageBox::Yes|QMessageBox::No, QMessageBox::StandardButton::Yes);
         break;
     default:
         reply = QMessageBox::No;
@@ -524,7 +524,13 @@ void NewFlightDialog::onPilotNameLineEdit_editingFinshed()
     if(line_edit->text() == QString())
         return;
 
+    QString userInput = line_edit->text();
+
     if(!verifyUserInput(line_edit, PilotInput(line_edit->text()))) {
+        {
+            QSignalBlocker blocker(line_edit);
+            line_edit->setText(userInput);
+        }
         if(!addNewDatabaseElement(line_edit, OPL::DbTable::Pilots))
             onBadInputReceived(line_edit);
     }

+ 202 - 203
src/gui/dialogues/newflightdialog.ui

@@ -14,38 +14,54 @@
    <string>Add New Flight</string>
   </property>
   <layout class="QGridLayout" name="gridLayout">
-   <item row="13" column="0">
-    <widget class="QLabel" name="tblkLabel">
+   <item row="4" column="2">
+    <widget class="QLabel" name="destNameLabel">
+     <property name="enabled">
+      <bool>false</bool>
+     </property>
+     <property name="minimumSize">
+      <size>
+       <width>200</width>
+       <height>0</height>
+      </size>
+     </property>
+     <property name="maximumSize">
+      <size>
+       <width>200</width>
+       <height>16777215</height>
+      </size>
+     </property>
+     <property name="font">
+      <font>
+       <italic>true</italic>
+      </font>
+     </property>
      <property name="text">
-      <string>Total Time</string>
+      <string/>
      </property>
     </widget>
    </item>
-   <item row="7" column="0">
+   <item row="9" column="0">
     <widget class="QLabel" name="functionLabel">
      <property name="text">
       <string>Function</string>
      </property>
     </widget>
    </item>
-   <item row="9" column="1">
-    <widget class="QComboBox" name="flightRulesComboBox">
-     <item>
-      <property name="text">
-       <string>VFR</string>
-      </property>
-     </item>
-     <item>
-      <property name="text">
-       <string>IFR</string>
-      </property>
-     </item>
+   <item row="5" column="0">
+    <widget class="QLabel" name="tofbLabel">
+     <property name="text">
+      <string>Off Blocks</string>
+     </property>
     </widget>
    </item>
-   <item row="10" column="0">
-    <widget class="QLabel" name="pilotFlyingLabel">
+   <item row="2" column="3">
+    <widget class="QLabel" name="picLabel">
      <property name="text">
-      <string>Pilot Flying</string>
+      <string>PIC</string>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
      </property>
     </widget>
    </item>
@@ -65,83 +81,86 @@
      </property>
     </widget>
    </item>
-   <item row="8" column="0">
-    <widget class="QLabel" name="approachLabel">
+   <item row="0" column="3">
+    <widget class="QLabel" name="acftLabel">
      <property name="text">
-      <string>Approach</string>
+      <string>Aircraft</string>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
      </property>
     </widget>
    </item>
-   <item row="9" column="0">
-    <widget class="QLabel" name="flightRulesLabel">
+   <item row="10" column="0">
+    <widget class="QLabel" name="approachLabel">
      <property name="text">
-      <string>Flight Rules</string>
+      <string>Approach</string>
      </property>
     </widget>
    </item>
-   <item row="13" column="3" colspan="2">
-    <widget class="QDialogButtonBox" name="buttonBox">
-     <property name="enabled">
-      <bool>true</bool>
-     </property>
-     <property name="orientation">
-      <enum>Qt::Horizontal</enum>
+   <item row="5" column="3">
+    <widget class="QLabel" name="thirdPilotLabel">
+     <property name="text">
+      <string>Third Pilot</string>
      </property>
-     <property name="standardButtons">
-      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     <property name="alignment">
+      <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
      </property>
     </widget>
    </item>
-   <item row="13" column="2">
-    <widget class="QLabel" name="submissionReadyLabel">
+   <item row="2" column="4">
+    <widget class="QLineEdit" name="picNameLineEdit">
      <property name="minimumSize">
       <size>
-       <width>200</width>
+       <width>160</width>
        <height>0</height>
       </size>
      </property>
      <property name="maximumSize">
       <size>
-       <width>200</width>
+       <width>120</width>
        <height>16777215</height>
       </size>
      </property>
+    </widget>
+   </item>
+   <item row="0" column="0">
+    <widget class="QPushButton" name="calendarPushButton">
      <property name="text">
-      <string/>
+      <string>Date Of flight</string>
      </property>
     </widget>
    </item>
-   <item row="2" column="2">
-    <widget class="QLabel" name="deptNameLabel">
-     <property name="enabled">
-      <bool>false</bool>
+   <item row="2" column="0">
+    <widget class="QLabel" name="deptLabel">
+     <property name="text">
+      <string>Departure</string>
      </property>
+    </widget>
+   </item>
+   <item row="0" column="1">
+    <widget class="QLineEdit" name="doftLineEdit">
      <property name="minimumSize">
       <size>
-       <width>200</width>
+       <width>160</width>
        <height>0</height>
       </size>
      </property>
      <property name="maximumSize">
       <size>
-       <width>200</width>
+       <width>120</width>
        <height>16777215</height>
       </size>
      </property>
-     <property name="font">
-      <font>
-       <italic>true</italic>
-      </font>
-     </property>
-     <property name="text">
-      <string/>
+     <property name="placeholderText">
+      <string>YYYY-MM-DD</string>
      </property>
     </widget>
    </item>
-   <item row="10" column="1">
-    <widget class="QCheckBox" name="pilotFlyingCheckBox">
+   <item row="11" column="0">
+    <widget class="QLabel" name="flightRulesLabel">
      <property name="text">
-      <string/>
+      <string>Flight Rules</string>
      </property>
     </widget>
    </item>
@@ -152,28 +171,36 @@
      </property>
     </widget>
    </item>
-   <item row="8" column="1">
-    <widget class="QComboBox" name="approachComboBox"/>
-   </item>
-   <item row="5" column="2">
-    <widget class="QLabel" name="tofbSpacerLabel">
-     <property name="enabled">
-      <bool>false</bool>
-     </property>
+   <item row="5" column="1">
+    <widget class="QLineEdit" name="tofbTimeLineEdit">
      <property name="minimumSize">
       <size>
-       <width>200</width>
+       <width>160</width>
        <height>0</height>
       </size>
      </property>
      <property name="maximumSize">
       <size>
-       <width>200</width>
+       <width>120</width>
        <height>16777215</height>
       </size>
      </property>
+    </widget>
+   </item>
+   <item row="4" column="3">
+    <widget class="QLabel" name="sicLabel">
      <property name="text">
-      <string/>
+      <string>SIC</string>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+     </property>
+    </widget>
+   </item>
+   <item row="11" column="3">
+    <widget class="QLabel" name="landingLabel">
+     <property name="text">
+      <string>Landing</string>
      </property>
     </widget>
    </item>
@@ -199,51 +226,29 @@
      </property>
     </widget>
    </item>
-   <item row="6" column="1">
-    <widget class="QLineEdit" name="tonbTimeLineEdit">
-     <property name="minimumSize">
-      <size>
-       <width>160</width>
-       <height>0</height>
-      </size>
-     </property>
-     <property name="maximumSize">
-      <size>
-       <width>120</width>
-       <height>16777215</height>
-      </size>
-     </property>
-    </widget>
+   <item row="9" column="1">
+    <widget class="QComboBox" name="functionComboBox"/>
    </item>
-   <item row="4" column="2">
-    <widget class="QLabel" name="destNameLabel">
-     <property name="enabled">
-      <bool>false</bool>
-     </property>
+   <item row="7" column="1">
+    <widget class="QLabel" name="tblkDisplayLabel">
      <property name="minimumSize">
       <size>
-       <width>200</width>
+       <width>160</width>
        <height>0</height>
       </size>
      </property>
-     <property name="maximumSize">
-      <size>
-       <width>200</width>
-       <height>16777215</height>
-      </size>
-     </property>
      <property name="font">
       <font>
-       <italic>true</italic>
+       <bold>true</bold>
       </font>
      </property>
      <property name="text">
-      <string/>
+      <string>00:00</string>
      </property>
     </widget>
    </item>
-   <item row="5" column="1">
-    <widget class="QLineEdit" name="tofbTimeLineEdit">
+   <item row="2" column="1">
+    <widget class="QLineEdit" name="deptLocationLineEdit">
      <property name="minimumSize">
       <size>
        <width>160</width>
@@ -258,18 +263,8 @@
      </property>
     </widget>
    </item>
-   <item row="7" column="1">
-    <widget class="QComboBox" name="functionComboBox"/>
-   </item>
-   <item row="2" column="0">
-    <widget class="QLabel" name="deptLabel">
-     <property name="text">
-      <string>Departure</string>
-     </property>
-    </widget>
-   </item>
-   <item row="2" column="1">
-    <widget class="QLineEdit" name="deptLocationLineEdit">
+   <item row="7" column="4">
+    <widget class="QLineEdit" name="remarksLineEdit">
      <property name="minimumSize">
       <size>
        <width>160</width>
@@ -284,71 +279,57 @@
      </property>
     </widget>
    </item>
-   <item row="5" column="0">
-    <widget class="QLabel" name="tofbLabel">
-     <property name="text">
-      <string>Off Blocks</string>
-     </property>
-    </widget>
-   </item>
-   <item row="4" column="0">
-    <widget class="QLabel" name="destLabel">
-     <property name="text">
-      <string>Destination</string>
-     </property>
+   <item row="11" column="1">
+    <widget class="QComboBox" name="flightRulesComboBox">
+     <item>
+      <property name="text">
+       <string>VFR</string>
+      </property>
+     </item>
+     <item>
+      <property name="text">
+       <string>IFR</string>
+      </property>
+     </item>
     </widget>
    </item>
-   <item row="13" column="1">
-    <widget class="QLabel" name="tblkDisplayLabel">
+   <item row="4" column="4">
+    <widget class="QLineEdit" name="sicNameLineEdit">
      <property name="minimumSize">
       <size>
        <width>160</width>
        <height>0</height>
       </size>
      </property>
-     <property name="text">
-      <string>00:00</string>
-     </property>
-    </widget>
-   </item>
-   <item row="0" column="0">
-    <widget class="QPushButton" name="calendarPushButton">
-     <property name="text">
-      <string>Date Of flight</string>
+     <property name="maximumSize">
+      <size>
+       <width>120</width>
+       <height>16777215</height>
+      </size>
      </property>
     </widget>
    </item>
-   <item row="0" column="1">
-    <widget class="QLineEdit" name="doftLineEdit">
+   <item row="15" column="2">
+    <widget class="QLabel" name="submissionReadyLabel">
      <property name="minimumSize">
       <size>
-       <width>160</width>
+       <width>200</width>
        <height>0</height>
       </size>
      </property>
      <property name="maximumSize">
       <size>
-       <width>120</width>
+       <width>200</width>
        <height>16777215</height>
       </size>
      </property>
-     <property name="placeholderText">
-      <string>YYYY-MM-DD</string>
-     </property>
-    </widget>
-   </item>
-   <item row="0" column="3">
-    <widget class="QLabel" name="acftLabel">
      <property name="text">
-      <string>Aircraft</string>
-     </property>
-     <property name="alignment">
-      <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+      <string/>
      </property>
     </widget>
    </item>
-   <item row="0" column="4">
-    <widget class="QLineEdit" name="acftLineEdit">
+   <item row="6" column="1">
+    <widget class="QLineEdit" name="tonbTimeLineEdit">
      <property name="minimumSize">
       <size>
        <width>160</width>
@@ -363,18 +344,8 @@
      </property>
     </widget>
    </item>
-   <item row="2" column="3">
-    <widget class="QLabel" name="picLabel">
-     <property name="text">
-      <string>PIC</string>
-     </property>
-     <property name="alignment">
-      <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
-     </property>
-    </widget>
-   </item>
-   <item row="2" column="4">
-    <widget class="QLineEdit" name="picNameLineEdit">
+   <item row="0" column="4">
+    <widget class="QLineEdit" name="acftLineEdit">
      <property name="minimumSize">
       <size>
        <width>160</width>
@@ -389,18 +360,8 @@
      </property>
     </widget>
    </item>
-   <item row="4" column="3">
-    <widget class="QLabel" name="sicLabel">
-     <property name="text">
-      <string>SIC</string>
-     </property>
-     <property name="alignment">
-      <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
-     </property>
-    </widget>
-   </item>
-   <item row="4" column="4">
-    <widget class="QLineEdit" name="sicNameLineEdit">
+   <item row="5" column="4">
+    <widget class="QLineEdit" name="thirdPilotNameLineEdit">
      <property name="minimumSize">
       <size>
        <width>160</width>
@@ -415,18 +376,28 @@
      </property>
     </widget>
    </item>
-   <item row="5" column="3">
-    <widget class="QLabel" name="thirdPilotLabel">
+   <item row="6" column="3">
+    <widget class="QLabel" name="flightNumberLabel">
      <property name="text">
-      <string>Third Pilot</string>
+      <string>Flight Number</string>
      </property>
      <property name="alignment">
       <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
      </property>
     </widget>
    </item>
-   <item row="5" column="4">
-    <widget class="QLineEdit" name="thirdPilotNameLineEdit">
+   <item row="7" column="0">
+    <widget class="QLabel" name="tblkLabel">
+     <property name="text">
+      <string>Total Time</string>
+     </property>
+    </widget>
+   </item>
+   <item row="10" column="1">
+    <widget class="QComboBox" name="approachComboBox"/>
+   </item>
+   <item row="6" column="4">
+    <widget class="QLineEdit" name="flightNumberLineEdit">
      <property name="minimumSize">
       <size>
        <width>160</width>
@@ -441,30 +412,39 @@
      </property>
     </widget>
    </item>
-   <item row="6" column="3">
-    <widget class="QLabel" name="flightNumberLabel">
-     <property name="text">
-      <string>Flight Number</string>
+   <item row="15" column="3" colspan="2">
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="enabled">
+      <bool>true</bool>
      </property>
-     <property name="alignment">
-      <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
      </property>
     </widget>
    </item>
-   <item row="6" column="4">
-    <widget class="QLineEdit" name="flightNumberLineEdit">
+   <item row="5" column="2">
+    <widget class="QLabel" name="tofbSpacerLabel">
+     <property name="enabled">
+      <bool>false</bool>
+     </property>
      <property name="minimumSize">
       <size>
-       <width>160</width>
+       <width>200</width>
        <height>0</height>
       </size>
      </property>
      <property name="maximumSize">
       <size>
-       <width>120</width>
+       <width>200</width>
        <height>16777215</height>
       </size>
      </property>
+     <property name="text">
+      <string/>
+     </property>
     </widget>
    </item>
    <item row="7" column="3">
@@ -477,41 +457,66 @@
      </property>
     </widget>
    </item>
-   <item row="7" column="4">
-    <widget class="QLineEdit" name="remarksLineEdit">
+   <item row="2" column="2">
+    <widget class="QLabel" name="deptNameLabel">
+     <property name="enabled">
+      <bool>false</bool>
+     </property>
      <property name="minimumSize">
       <size>
-       <width>160</width>
+       <width>200</width>
        <height>0</height>
       </size>
      </property>
      <property name="maximumSize">
       <size>
-       <width>120</width>
+       <width>200</width>
        <height>16777215</height>
       </size>
      </property>
+     <property name="font">
+      <font>
+       <italic>true</italic>
+      </font>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+   </item>
+   <item row="4" column="0">
+    <widget class="QLabel" name="destLabel">
+     <property name="text">
+      <string>Destination</string>
+     </property>
     </widget>
    </item>
-   <item row="8" column="3">
+   <item row="11" column="4">
+    <widget class="QSpinBox" name="landingSpinBox"/>
+   </item>
+   <item row="10" column="3">
     <widget class="QLabel" name="takeOffLabel">
      <property name="text">
       <string>Take Off</string>
      </property>
     </widget>
    </item>
-   <item row="8" column="4">
+   <item row="10" column="4">
     <widget class="QSpinBox" name="takeOffSpinBox"/>
    </item>
    <item row="9" column="3">
-    <widget class="QLabel" name="landingLabel">
+    <widget class="QLabel" name="pilotFlyingLabel">
      <property name="text">
-      <string>Landing</string>
+      <string>Pilot Flying</string>
      </property>
     </widget>
    </item>
    <item row="9" column="4">
-    <widget class="QSpinBox" name="landingSpinBox"/>
+    <widget class="QCheckBox" name="pilotFlyingCheckBox">
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
    </item>
   </layout>
  </widget>
@@ -521,18 +526,12 @@
   <tabstop>destLocationLineEdit</tabstop>
   <tabstop>tofbTimeLineEdit</tabstop>
   <tabstop>tonbTimeLineEdit</tabstop>
-  <tabstop>functionComboBox</tabstop>
-  <tabstop>approachComboBox</tabstop>
-  <tabstop>flightRulesComboBox</tabstop>
-  <tabstop>pilotFlyingCheckBox</tabstop>
   <tabstop>acftLineEdit</tabstop>
   <tabstop>picNameLineEdit</tabstop>
   <tabstop>sicNameLineEdit</tabstop>
   <tabstop>thirdPilotNameLineEdit</tabstop>
   <tabstop>flightNumberLineEdit</tabstop>
   <tabstop>remarksLineEdit</tabstop>
-  <tabstop>takeOffSpinBox</tabstop>
-  <tabstop>landingSpinBox</tabstop>
   <tabstop>calendarPushButton</tabstop>
  </tabstops>
  <resources/>

+ 3 - 2
src/gui/dialogues/newpilotdialog.cpp

@@ -21,16 +21,17 @@
 #include "src/opl.h"
 
 #include "src/database/database.h"
-#include "src/database/row.h"
 
 /*!
  * \brief NewPilotDialog::NewPilotDialog - creates a new pilot dialog which can be used to add a new entry to the database
  */
-NewPilotDialog::NewPilotDialog(QWidget *parent)
+NewPilotDialog::NewPilotDialog(const QString &userInput, QWidget* parent)
     : EntryEditDialog{parent},
     ui(new Ui::NewPilot)
 {
     setup();
+    if(userInput != QString())
+        ui->lastnameLineEdit->setText(userInput);
     ui->lastnameLineEdit->setFocus();
 }
 

+ 1 - 1
src/gui/dialogues/newpilotdialog.h

@@ -46,7 +46,7 @@ class NewPilotDialog : public EntryEditDialog
 {
     Q_OBJECT
 public:
-    explicit NewPilotDialog(QWidget *parent = nullptr);
+    explicit NewPilotDialog(const QString& userInput = QString(), QWidget *parent = nullptr);
     explicit NewPilotDialog(int rowId, QWidget *parent = nullptr);
     ~NewPilotDialog();
 

+ 1 - 0
src/gui/widgets/logbooktableeditwidget.cpp

@@ -48,6 +48,7 @@ void LogbookTableEditWidget::setupUI()
     m_deleteEntryPushButton->setText(tr("Delete selected Entry"));
     m_filterWidget->hide();
     m_stackedWidget->hide();
+
     m_format = Settings::getDisplayFormat();
 }
 

+ 1 - 1
src/gui/widgets/pilottableeditwidget.cpp

@@ -45,7 +45,7 @@ void PilotTableEditWidget::setupUI()
 
 EntryEditDialog *PilotTableEditWidget::getEntryEditDialog(QWidget *parent)
 {
-    return new NewPilotDialog(parent);
+    return new NewPilotDialog(QString(), parent);
 }
 
 QString PilotTableEditWidget::deleteErrorString(int pilotId)

+ 0 - 1
src/gui/widgets/settingswidget.cpp

@@ -134,7 +134,6 @@ void SettingsWidget::readSettings()
 void SettingsWidget::setupValidators()
 {
     ui->phoneLineEdit->setValidator(new QRegularExpressionValidator(OPL::RegEx::RX_PHONE_NUMBER, ui->phoneLineEdit));
-    ui->emailLineEdit->setValidator(new QRegularExpressionValidator(OPL::RegEx::RX_EMAIL_ADDRESS, ui->emailLineEdit));
 }
 
 /*!

+ 0 - 1
src/opl.h

@@ -371,7 +371,6 @@ const inline auto  RED_BORDER = QStringLiteral("border: 1px solid red");
 namespace RegEx {
 
 const inline auto RX_PHONE_NUMBER  = QRegularExpression(QStringLiteral("^[+]{0,1}[0-9\\-\\s]+"));
-const inline auto RX_EMAIL_ADDRESS = QRegularExpression(QStringLiteral("\\A[a-z0-9!#$%&'*+/=?^_‘{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_‘{|}~-]+)*@"));
 const inline auto RX_TIME_ENTRY    = QRegularExpression(QStringLiteral("^(?:(?:([01]?\\d|2[0-3])(?::?)([0-5]\\d))|(?:([01]?\\d|2[0-3])([0-5]\\d))|(?:([1-9]|[1-9]\\d)\\:([0-5]\\d)?)|(?:([01]?\\d|2[0-3])\\.([0-5]?\\d)))$"));
 const inline auto RX_AIRPORT_CODE  = QRegularExpression(QStringLiteral("[a-zA-Z0-9]{1,4}"));