Browse Source

small rework of NewFlightDialog

The New Flight Dialog had a bug which prevented it from correctly storing take-off and landing count when the user input deviated from the automatically calculated time of day/night.

This rework removes the option to manually adjust wether a take-off or landing is at day or night and instead uses the automatically calculated value in conjunction with the user's total input.

This should be the standard use case for the vast majority of users and streamlines the UX.

The option to manually edit the entry will be implemented in a separate dialog which allows custom entries, but warns the user that sensibility checks are disabled when doing so. This will allow for adding edge cases (e.g. day to night transition during touch and go's) manually, while keeping the 'standard' entry simpler.
Felix Turowsky 1 year ago
parent
commit
cded96f65e

+ 25 - 63
src/gui/dialogues/newflightdialog.cpp

@@ -168,8 +168,7 @@ void NewFlightDialog::readSettings()
 {
     ui->functionComboBox->setCurrentIndex(Settings::read(Settings::FlightLogging::Function).toInt());
     ui->approachComboBox->setCurrentIndex(Settings::read(Settings::FlightLogging::Approach).toInt());
-    ui->pilotFlyingCheckBox->setChecked(Settings::read(Settings::FlightLogging::PilotFlying).toBool());
-    ui->ifrCheckBox->setChecked(Settings::read(Settings::FlightLogging::LogIFR).toBool());
+    ui->flightRulesComboBox->setCurrentIndex(Settings::read(Settings::FlightLogging::LogIFR).toInt());
     ui->flightNumberLineEdit->setText(Settings::read(Settings::FlightLogging::FlightNumberPrefix).toString());
 }
 
@@ -214,19 +213,17 @@ void NewFlightDialog::fillWithEntryData()
     if(app != QString()){
         ui->approachComboBox->setCurrentText(app);
     }
-    // Task
-    bool PF = flight_data.value(OPL::Db::FLIGHTS_PILOTFLYING).toBool();
-    ui->pilotFlyingCheckBox->setChecked(PF);
     // Flight Rules
     bool time_ifr = flight_data.value(OPL::Db::FLIGHTS_TIFR).toBool();
-    ui->ifrCheckBox->setChecked(time_ifr);
+    int rulesIndex = time_ifr ? 1 : 0;
+    ui->flightRulesComboBox->setCurrentIndex(rulesIndex);
     // Take-Off and Landing
-    int TO =  flight_data.value(OPL::Db::FLIGHTS_TODAY).toInt()
+    int takeOffCount =  flight_data.value(OPL::Db::FLIGHTS_TODAY).toInt()
             + flight_data.value(OPL::Db::FLIGHTS_TONIGHT).toInt();
-    int LDG = flight_data.value(OPL::Db::FLIGHTS_LDGDAY).toInt()
+    int landingCount = flight_data.value(OPL::Db::FLIGHTS_LDGDAY).toInt()
             + flight_data.value(OPL::Db::FLIGHTS_LDGNIGHT).toInt();
-    ui->takeOffSpinBox->setValue(TO);
-    ui->landingSpinBox->setValue(LDG);
+    ui->takeOffSpinBox->setValue(takeOffCount);
+    ui->landingSpinBox->setValue(landingCount);
     // Remarks
     ui->remarksLineEdit->setText(flight_data.value(OPL::Db::FLIGHTS_REMARKS).toString());
     // Flight Number
@@ -265,8 +262,6 @@ void NewFlightDialog::onGoodInputReceived(QLineEdit *line_edit)
 
     if (validationState.timesValid()) {
         updateBlockTimeLabel();
-        if (validationState.nightDataValid())
-            updateNightCheckBoxes();
     }
 }
 
@@ -414,7 +409,7 @@ OPL::RowData_T NewFlightDialog::prepareFlightEntryData()
     new_data.insert(OPL::Db::FLIGHTS_SECONDPILOT, DBCache->getPilotNamesMap().key(ui->sicNameLineEdit->text()));
     new_data.insert(OPL::Db::FLIGHTS_THIRDPILOT, DBCache->getPilotNamesMap().key(ui->thirdPilotNameLineEdit->text()));
     // IFR time
-    if (ui->ifrCheckBox->isChecked()) {
+    if (ui->flightRulesComboBox->currentIndex() > 0) {
         new_data.insert(OPL::Db::FLIGHTS_TIFR, block_minutes);
     } else {
         new_data.insert(OPL::Db::FLIGHTS_TIFR, QString());
@@ -450,26 +445,26 @@ OPL::RowData_T NewFlightDialog::prepareFlightEntryData()
         }
         break;
     }
-    // Pilot flying / Pilot monitoring
-    new_data.insert(OPL::Db::FLIGHTS_PILOTFLYING, ui->pilotFlyingCheckBox->isChecked());
     // Take-Off and Landing
-    if (ui->toNightCheckBox->isChecked()) {
-        new_data.insert(OPL::Db::FLIGHTS_TONIGHT, ui->takeOffSpinBox->value());
-        new_data.insert(OPL::Db::FLIGHTS_TODAY, 0);
-    } else {
-        new_data.insert(OPL::Db::FLIGHTS_TONIGHT, 0);
-        new_data.insert(OPL::Db::FLIGHTS_TODAY, ui->takeOffSpinBox->value());
-    }
-    if (ui->ldgNightCheckBox->isChecked()) {
-        new_data.insert(OPL::Db::FLIGHTS_LDGNIGHT, ui->landingSpinBox->value());
-        new_data.insert(OPL::Db::FLIGHTS_LDGDAY, 0);
-    } else {
-        new_data.insert(OPL::Db::FLIGHTS_LDGNIGHT, 0);
-        new_data.insert(OPL::Db::FLIGHTS_LDGDAY, ui->landingSpinBox->value());
-    }
+
+    int toDay = night_time_data.takeOffNight ? 0 : ui->takeOffSpinBox->value();
+    int toNight = night_time_data.takeOffNight ? toNight = ui->takeOffSpinBox->value() : 0;
+    int ldgDay = night_time_data.landingNight ? 0 : ui->landingSpinBox->value();
+    int ldgNight = night_time_data.landingNight ? ui->landingSpinBox->value() : 0;
+
+    LOG << "Entering To/Ldg: " << toDay << "," << toNight << "," << ldgDay << ", " << ldgNight << "\n";
+
+    new_data.insert(OPL::Db::FLIGHTS_TODAY, toDay);
+    new_data.insert(OPL::Db::FLIGHTS_TONIGHT, toNight);
+    new_data.insert(OPL::Db::FLIGHTS_LDGDAY, ldgDay);
+    new_data.insert(OPL::Db::FLIGHTS_LDGNIGHT, ldgNight);
     if (ui->approachComboBox->currentText() == CAT_3) // ILS CAT III
         new_data.insert(OPL::Db::FLIGHTS_AUTOLAND, ui->landingSpinBox->value());
 
+    // Pilot flying / Pilot monitoring
+    bool isPilotFlying = toDay + toNight + ldgDay + ldgNight > 0;
+    new_data.insert(OPL::Db::FLIGHTS_PILOTFLYING, isPilotFlying);
+
     // Additional Data
     new_data.insert(OPL::Db::FLIGHTS_APPROACHTYPE, ui->approachComboBox->currentText());
     new_data.insert(OPL::Db::FLIGHTS_FLIGHTNUMBER, ui->flightNumberLineEdit->text());
@@ -477,40 +472,6 @@ OPL::RowData_T NewFlightDialog::prepareFlightEntryData()
     return new_data;
 }
 
-/*!
- * \brief NewFlightDialog::updateNightCheckBoxes updates the check boxes for take-off and landing
- * at night. Returns the number of minutes of night time.
- * \return
- */
-void NewFlightDialog::updateNightCheckBoxes()
-{
-    // calculate Block Time
-    const OPL::Time tofb = OPL::Time::fromString(ui->tofbTimeLineEdit->text());
-    const OPL::Time tonb = OPL::Time::fromString(ui->tonbTimeLineEdit->text());
-    const int block_minutes = OPL::Time::blockMinutes(tofb, tonb);
-
-    // Calculate Night Time
-    const QString dept_date = (ui->doftLineEdit->text() + ui->tofbTimeLineEdit->text());
-    const auto dept_date_time = OPL::DateTime::fromString(dept_date);
-    const int night_angle = Settings::read(Settings::FlightLogging::NightAngle).toInt();
-    const auto night_values = OPL::Calc::NightTimeValues(
-                ui->deptLocationLineEdit->text(),
-                ui->destLocationLineEdit->text(),
-                dept_date_time,
-                block_minutes,
-                night_angle);
-    // set check boxes
-    if (night_values.takeOffNight)
-        ui->toNightCheckBox->setCheckState(Qt::Checked);
-    else
-        ui->toNightCheckBox->setCheckState(Qt::Unchecked);
-
-    if (night_values.landingNight)
-        ui->ldgNightCheckBox->setCheckState(Qt::Checked);
-    else
-        ui->ldgNightCheckBox->setCheckState(Qt::Unchecked);
-}
-
 /*!
  * \brief NewFlightDialog::toUpper - changes inserted text to upper case for IATA/ICAO airport codes and registrations.
  */
@@ -721,3 +682,4 @@ void NewFlightDialog::on_buttonBox_accepted()
         QDialog::accept();
     }
 }
+

+ 0 - 1
src/gui/dialogues/newflightdialog.h

@@ -125,7 +125,6 @@ private:
     void onBadInputReceived(QLineEdit *line_edit);
 
     void updateBlockTimeLabel();
-    void updateNightCheckBoxes();
     void setNightCheckboxes();
 
     bool addNewTail(QLineEdit& parent_line_edit);

+ 480 - 563
src/gui/dialogues/newflightdialog.ui

@@ -6,579 +6,182 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>1022</width>
-    <height>262</height>
+    <width>767</width>
+    <height>362</height>
    </rect>
   </property>
   <property name="windowTitle">
    <string>Add New Flight</string>
   </property>
-  <layout class="QGridLayout" name="gridLayout_4">
-   <item row="0" column="0">
-    <spacer name="leftSpacer">
-     <property name="orientation">
-      <enum>Qt::Horizontal</enum>
+  <layout class="QGridLayout" name="gridLayout">
+   <item row="5" column="5">
+    <widget class="QLineEdit" name="flightNumberLineEdit">
+     <property name="minimumSize">
+      <size>
+       <width>160</width>
+       <height>0</height>
+      </size>
      </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>23</width>
-       <height>203</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-   <item row="0" column="1" colspan="3">
-    <layout class="QGridLayout" name="gridLayout_3">
-     <item row="0" column="0">
-      <layout class="QGridLayout" name="gridLayout">
-       <item row="0" column="0">
-        <widget class="QLabel" name="doftLabel">
-         <property name="text">
-          <string>Date of flight</string>
-         </property>
-        </widget>
-       </item>
-       <item row="4" column="3">
-        <widget class="QLabel" name="flightNumberLabel">
-         <property name="text">
-          <string>Flight Number</string>
-         </property>
-         <property name="alignment">
-          <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
-         </property>
-        </widget>
-       </item>
-       <item row="2" 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="0">
-        <widget class="QLabel" name="tonbLabel">
-         <property name="text">
-          <string>On Blocks</string>
-         </property>
-        </widget>
-       </item>
-       <item row="0" column="4">
-        <widget class="QLineEdit" name="acftLineEdit">
-         <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>
-       <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>
-         </property>
-        </widget>
-       </item>
-       <item row="1" 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="5" column="0">
-        <widget class="QLabel" name="tblkLabel">
-         <property name="text">
-          <string>Total Time</string>
-         </property>
-        </widget>
-       </item>
-       <item row="5" column="3">
-        <widget class="QLabel" name="remarksLabel">
-         <property name="text">
-          <string>Remarks</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="flightNumberLineEdit">
-         <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>
-       <item row="1" 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>160</width>
-           <height>0</height>
-          </size>
-         </property>
-         <property name="maximumSize">
-          <size>
-           <width>120</width>
-           <height>16777215</height>
-          </size>
-         </property>
-         <property name="placeholderText">
-          <string>YYYY-MM-DD</string>
-         </property>
-        </widget>
-       </item>
-       <item row="2" column="0">
-        <widget class="QLabel" name="destLabel">
-         <property name="text">
-          <string>Destination</string>
-         </property>
-        </widget>
-       </item>
-       <item row="2" column="1">
-        <widget class="QLineEdit" name="destLocationLineEdit">
-         <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>
-       <item row="0" column="2">
-        <widget class="QLabel" name="doftDisplayLabel">
-         <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="text">
-          <string/>
-         </property>
-        </widget>
-       </item>
-       <item row="1" column="1">
-        <widget class="QLineEdit" name="deptLocationLineEdit">
-         <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>
-       <item row="1" column="2">
-        <widget class="QLabel" name="deptNameLabel">
-         <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/>
-         </property>
-        </widget>
-       </item>
-       <item row="1" column="4">
-        <widget class="QLineEdit" name="picNameLineEdit">
-         <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>
-       <item row="2" column="4">
-        <widget class="QLineEdit" name="sicNameLineEdit">
-         <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>
-       <item row="2" 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/>
-         </property>
-        </widget>
-       </item>
-       <item row="3" column="0">
-        <widget class="QLabel" name="tofbLabel">
-         <property name="text">
-          <string>Off Blocks</string>
-         </property>
-        </widget>
-       </item>
-       <item row="3" column="2">
-        <widget class="QLabel" name="tofbSpacerLabel">
-         <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="text">
-          <string/>
-         </property>
-        </widget>
-       </item>
-       <item row="4" column="2">
-        <widget class="QLabel" name="tonbSpacerLabel">
-         <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="text">
-          <string/>
-         </property>
-        </widget>
-       </item>
-       <item row="5" column="1">
-        <widget class="QLabel" name="tblkDisplayLabel">
-         <property name="minimumSize">
-          <size>
-           <width>160</width>
-           <height>0</height>
-          </size>
-         </property>
-         <property name="text">
-          <string>00:00</string>
-         </property>
-        </widget>
-       </item>
-       <item row="3" column="3">
-        <widget class="QLabel" name="thirdPilotLabel">
-         <property name="text">
-          <string>Third Pilot</string>
-         </property>
-         <property name="alignment">
-          <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
-         </property>
-        </widget>
-       </item>
-       <item row="4" 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>
-       <item row="5" column="4">
-        <widget class="QLineEdit" name="remarksLineEdit">
-         <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>
-       <item row="3" column="1">
-        <widget class="QLineEdit" name="tofbTimeLineEdit">
-         <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>
-       <item row="3" column="4">
-        <widget class="QLineEdit" name="thirdPilotNameLineEdit">
-         <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>
-       <item row="5" column="2">
-        <widget class="QLabel" name="submissionReadyLabel">
-         <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="text">
-          <string/>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </item>
-     <item row="0" column="1">
-      <widget class="Line" name="line_2">
-       <property name="orientation">
-        <enum>Qt::Vertical</enum>
-       </property>
-      </widget>
-     </item>
-     <item row="0" column="2">
-      <layout class="QGridLayout" name="gridLayout_2">
-       <item row="0" column="0" colspan="2">
-        <widget class="QCheckBox" name="pilotFlyingCheckBox">
-         <property name="text">
-          <string>Pilot Flying</string>
-         </property>
-        </widget>
-       </item>
-       <item row="0" column="2">
-        <widget class="QCheckBox" name="ifrCheckBox">
-         <property name="text">
-          <string>IFR</string>
-         </property>
-        </widget>
-       </item>
-       <item row="1" column="0">
-        <widget class="QLabel" name="takeOffLabel">
-         <property name="text">
-          <string>Take Off</string>
-         </property>
-        </widget>
-       </item>
-       <item row="1" column="1">
-        <widget class="QSpinBox" name="takeOffSpinBox"/>
-       </item>
-       <item row="1" column="2">
-        <widget class="QCheckBox" name="toNightCheckBox">
-         <property name="text">
-          <string>Night</string>
-         </property>
-        </widget>
-       </item>
-       <item row="2" column="0">
-        <widget class="QLabel" name="landingLabel">
-         <property name="text">
-          <string>Landing</string>
-         </property>
-        </widget>
-       </item>
-       <item row="2" column="1">
-        <widget class="QSpinBox" name="landingSpinBox"/>
-       </item>
-       <item row="2" column="2">
-        <widget class="QCheckBox" name="ldgNightCheckBox">
-         <property name="text">
-          <string>Night</string>
-         </property>
-        </widget>
-       </item>
-       <item row="3" column="0">
-        <widget class="QLabel" name="functionLabel">
-         <property name="text">
-          <string>Function</string>
-         </property>
-        </widget>
-       </item>
-       <item row="3" column="1" colspan="2">
-        <widget class="QComboBox" name="functionComboBox"/>
-       </item>
-       <item row="4" column="0">
-        <widget class="QLabel" name="approachLabel">
-         <property name="text">
-          <string>Approach</string>
-         </property>
-        </widget>
-       </item>
-       <item row="4" column="1" colspan="2">
-        <widget class="QComboBox" name="approachComboBox"/>
-       </item>
-       <item row="5" column="0" colspan="3">
-        <widget class="QLabel" name="spacerLabel">
-         <property name="text">
-          <string/>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </item>
-    </layout>
+     <property name="maximumSize">
+      <size>
+       <width>120</width>
+       <height>16777215</height>
+      </size>
+     </property>
+    </widget>
    </item>
-   <item row="0" column="4" rowspan="2">
-    <spacer name="rightSpacer">
-     <property name="orientation">
-      <enum>Qt::Horizontal</enum>
+   <item row="2" column="2">
+    <widget class="QLineEdit" name="deptLocationLineEdit">
+     <property name="minimumSize">
+      <size>
+       <width>160</width>
+       <height>0</height>
+      </size>
      </property>
-     <property name="sizeHint" stdset="0">
+     <property name="maximumSize">
       <size>
-       <width>22</width>
-       <height>228</height>
+       <width>120</width>
+       <height>16777215</height>
       </size>
      </property>
-    </spacer>
+    </widget>
    </item>
-   <item row="1" column="1">
-    <widget class="QPushButton" name="pushButton_2">
+   <item row="3" column="5">
+    <widget class="QLineEdit" name="sicNameLineEdit">
+     <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>
+   <item row="7" column="4">
+    <widget class="QLabel" name="takeOffLabel">
      <property name="text">
-      <string>Details</string>
+      <string>Take Off</string>
      </property>
     </widget>
    </item>
-   <item row="1" column="2">
-    <widget class="QToolButton" name="toolButton">
+   <item row="2" column="3">
+    <widget class="QLabel" name="deptNameLabel">
+     <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>?</string>
+      <string/>
      </property>
     </widget>
    </item>
-   <item row="1" column="3">
+   <item row="1" column="5">
+    <widget class="QLineEdit" name="acftLineEdit">
+     <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>
+   <item row="7" column="5">
+    <widget class="QSpinBox" name="takeOffSpinBox"/>
+   </item>
+   <item row="2" column="0">
+    <widget class="QLabel" name="deptLabel">
+     <property name="text">
+      <string>Departure</string>
+     </property>
+    </widget>
+   </item>
+   <item row="4" column="5">
+    <widget class="QLineEdit" name="thirdPilotNameLineEdit">
+     <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>
+   <item row="5" column="0">
+    <widget class="QLabel" name="tonbLabel">
+     <property name="text">
+      <string>On Blocks</string>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="2">
+    <widget class="QLineEdit" name="destLocationLineEdit">
+     <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>
+   <item row="11" column="0">
+    <widget class="QLabel" name="tblkLabel">
+     <property name="text">
+      <string>Total Time</string>
+     </property>
+    </widget>
+   </item>
+   <item row="11" column="2">
+    <widget class="QLabel" name="tblkDisplayLabel">
+     <property name="minimumSize">
+      <size>
+       <width>160</width>
+       <height>0</height>
+      </size>
+     </property>
+     <property name="text">
+      <string>00:00</string>
+     </property>
+    </widget>
+   </item>
+   <item row="11" column="4" colspan="2">
     <widget class="QDialogButtonBox" name="buttonBox">
      <property name="enabled">
       <bool>true</bool>
@@ -591,30 +194,344 @@
      </property>
     </widget>
    </item>
+   <item row="5" column="2">
+    <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>
+   <item row="3" column="0">
+    <widget class="QLabel" name="destLabel">
+     <property name="text">
+      <string>Destination</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="4">
+    <widget class="QLabel" name="acftLabel">
+     <property name="text">
+      <string>Aircraft</string>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+     </property>
+    </widget>
+   </item>
+   <item row="4" column="0">
+    <widget class="QLabel" name="tofbLabel">
+     <property name="text">
+      <string>Off Blocks</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="2">
+    <widget class="QLineEdit" name="doftLineEdit">
+     <property name="minimumSize">
+      <size>
+       <width>160</width>
+       <height>0</height>
+      </size>
+     </property>
+     <property name="maximumSize">
+      <size>
+       <width>120</width>
+       <height>16777215</height>
+      </size>
+     </property>
+     <property name="placeholderText">
+      <string>YYYY-MM-DD</string>
+     </property>
+    </widget>
+   </item>
+   <item row="4" column="3">
+    <widget class="QLabel" name="tofbSpacerLabel">
+     <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="text">
+      <string/>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="5">
+    <widget class="QLineEdit" name="picNameLineEdit">
+     <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>
+   <item row="3" column="3">
+    <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/>
+     </property>
+    </widget>
+   </item>
+   <item row="5" column="3">
+    <widget class="QLabel" name="tonbSpacerLabel">
+     <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="text">
+      <string/>
+     </property>
+    </widget>
+   </item>
+   <item row="6" column="5">
+    <widget class="QLineEdit" name="remarksLineEdit">
+     <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>
+   <item row="6" column="4">
+    <widget class="QLabel" name="remarksLabel">
+     <property name="text">
+      <string>Remarks</string>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+     </property>
+    </widget>
+   </item>
+   <item row="5" column="4">
+    <widget class="QLabel" name="flightNumberLabel">
+     <property name="text">
+      <string>Flight Number</string>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="4">
+    <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="3" column="4">
+    <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="1" column="0">
+    <widget class="QLabel" name="doftLabel">
+     <property name="text">
+      <string>Date of flight</string>
+     </property>
+    </widget>
+   </item>
+   <item row="4" column="4">
+    <widget class="QLabel" name="thirdPilotLabel">
+     <property name="text">
+      <string>Third Pilot</string>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+     </property>
+    </widget>
+   </item>
+   <item row="6" column="0">
+    <widget class="QLabel" name="functionLabel">
+     <property name="text">
+      <string>Function</string>
+     </property>
+    </widget>
+   </item>
+   <item row="7" column="0">
+    <widget class="QLabel" name="approachLabel">
+     <property name="text">
+      <string>Approach</string>
+     </property>
+    </widget>
+   </item>
+   <item row="4" column="2">
+    <widget class="QLineEdit" name="tofbTimeLineEdit">
+     <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>
+   <item row="8" column="0">
+    <widget class="QLabel" name="flightRulesLabel">
+     <property name="text">
+      <string>Flight Rules</string>
+     </property>
+    </widget>
+   </item>
+   <item row="6" column="2">
+    <widget class="QComboBox" name="functionComboBox"/>
+   </item>
+   <item row="7" column="2">
+    <widget class="QComboBox" name="approachComboBox"/>
+   </item>
+   <item row="8" column="2">
+    <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="8" column="4">
+    <widget class="QLabel" name="landingLabel">
+     <property name="text">
+      <string>Landing</string>
+     </property>
+    </widget>
+   </item>
+   <item row="8" column="5">
+    <widget class="QSpinBox" name="landingSpinBox"/>
+   </item>
+   <item row="1" column="3">
+    <widget class="QLabel" name="doftDisplayLabel">
+     <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="text">
+      <string/>
+     </property>
+    </widget>
+   </item>
+   <item row="11" column="3">
+    <widget class="QLabel" name="submissionReadyLabel">
+     <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="text">
+      <string/>
+     </property>
+    </widget>
+   </item>
   </layout>
  </widget>
  <tabstops>
-  <tabstop>doftLineEdit</tabstop>
   <tabstop>deptLocationLineEdit</tabstop>
   <tabstop>destLocationLineEdit</tabstop>
   <tabstop>tofbTimeLineEdit</tabstop>
   <tabstop>tonbTimeLineEdit</tabstop>
-  <tabstop>acftLineEdit</tabstop>
   <tabstop>picNameLineEdit</tabstop>
   <tabstop>sicNameLineEdit</tabstop>
   <tabstop>thirdPilotNameLineEdit</tabstop>
   <tabstop>flightNumberLineEdit</tabstop>
   <tabstop>remarksLineEdit</tabstop>
-  <tabstop>pilotFlyingCheckBox</tabstop>
-  <tabstop>ifrCheckBox</tabstop>
   <tabstop>takeOffSpinBox</tabstop>
-  <tabstop>toNightCheckBox</tabstop>
-  <tabstop>landingSpinBox</tabstop>
-  <tabstop>ldgNightCheckBox</tabstop>
-  <tabstop>functionComboBox</tabstop>
   <tabstop>approachComboBox</tabstop>
-  <tabstop>pushButton_2</tabstop>
-  <tabstop>toolButton</tabstop>
  </tabstops>
  <resources/>
  <connections>