Browse Source

Reworked Home Widget

Home widget now shows the former totalswidget (which has been removed) and some additional information.

Reworked some functions in AStat namespace.

Fixed a bug in ADataBase::customQuery and changed return type from QVector<QString> to QVector<QVariant> for communality in database returns and easier access to non-string datatypes that are returned from the database.
Felix Turo 4 years ago
parent
commit
33e4f3b12b

+ 0 - 3
CMakeLists.txt

@@ -47,7 +47,6 @@ set(PROJECT_SOURCES
     src/gui/widgets/logbookwidget.cpp
     src/gui/widgets/pilotswidget.cpp
     src/gui/widgets/settingswidget.cpp
-    src/gui/widgets/totalswidget.cpp
     src/testing/abenchmark.cpp
     src/testing/atimer.cpp
     
@@ -80,7 +79,6 @@ set(PROJECT_SOURCES
     src/gui/widgets/logbookwidget.h
     src/gui/widgets/pilotswidget.h
     src/gui/widgets/settingswidget.h
-    src/gui/widgets/totalswidget.h
     src/oplconstants.h
     src/testing/abenchmark.h
     src/testing/adebug.h
@@ -97,7 +95,6 @@ set(PROJECT_SOURCES
     src/gui/widgets/logbookwidget.ui
     src/gui/widgets/pilotswidget.ui
     src/gui/widgets/settingswidget.ui
-    src/gui/widgets/totalswidget.ui
 
     assets/icons.qrc
     assets/themes/stylesheets/breeze/breeze.qrc

+ 2 - 0
mainwindow.cpp

@@ -129,6 +129,8 @@ void MainWindow::connectWidgets()
                      pilotsWidget, &PilotsWidget::onDisplayModel_dataBaseUpdated);
     QObject::connect(aDB, &ADatabase::dataBaseUpdated,
                      aircraftWidget, &AircraftWidget::onDisplayModel_dataBaseUpdated);
+    QObject::connect(aDB, &ADatabase::dataBaseUpdated,
+                     homeWidget, &HomeWidget::onHomeWidget_dataBaseUpdated);
 
     QObject::connect(settingsWidget, &SettingsWidget::viewSelectionChanged,
                      logbookWidget, &LogbookWidget::onLogbookWidget_viewSelectionChanged);

+ 2 - 0
mainwindow.h

@@ -26,6 +26,7 @@
 #include <QMessageBox>
 #include <QDir>
 #include <QFile>
+#include <QKeyEvent>
 
 #include "src/gui/widgets/homewidget.h"
 #include "src/gui/widgets/settingswidget.h"
@@ -35,6 +36,7 @@
 #include "src/gui/widgets/debugwidget.h"
 #include "src/gui/dialogues/newtaildialog.h"
 #include "src/gui/dialogues/newpilotdialog.h"
+#include "src/gui/dialogues/newflightdialog.h"
 #include "src/classes/arunguard.h"
 #include "src/testing/atimer.h"
 

+ 1 - 4
openPilotLog.pro

@@ -45,7 +45,6 @@ SOURCES += \
     src/gui/widgets/logbookwidget.cpp \
     src/gui/widgets/pilotswidget.cpp \
     src/gui/widgets/settingswidget.cpp \
-    src/gui/widgets/totalswidget.cpp \
     src/testing/abenchmark.cpp \
     src/testing/atimer.cpp
 
@@ -79,7 +78,6 @@ HEADERS += \
     src/gui/widgets/logbookwidget.h \
     src/gui/widgets/pilotswidget.h \
     src/gui/widgets/settingswidget.h \
-    src/gui/widgets/totalswidget.h \
     src/oplconstants.h \
     src/testing/abenchmark.h \
     src/testing/adebug.h \
@@ -96,8 +94,7 @@ FORMS += \
     src/gui/widgets/homewidget.ui \
     src/gui/widgets/logbookwidget.ui \
     src/gui/widgets/pilotswidget.ui \
-    src/gui/widgets/settingswidget.ui \
-    src/gui/widgets/totalswidget.ui
+    src/gui/widgets/settingswidget.ui
 
 # Default rules for deployment.
 qnx: target.path = /tmp/$${TARGET}/bin

+ 4 - 5
src/database/adatabase.cpp

@@ -620,7 +620,7 @@ ATailEntry ADatabase::resolveForeignTail(RowId_T foreign_key)
     return aDB->getTailEntry(foreign_key);
 }
 
-QVector<QString> ADatabase::customQuery(QString statement, int return_values)
+QVector<QVariant> ADatabase::customQuery(QString statement, int return_values)
 {
     QSqlQuery query(statement);
     query.exec();
@@ -630,17 +630,16 @@ QVector<QString> ADatabase::customQuery(QString statement, int return_values)
         DEB << "Error: " << query.lastError().text();
         DEB << "Statement: " << statement;
         lastError = query.lastError().text();
-        return QVector<QString>();
+        return QVector<QVariant>();
     } else {
         query.first();
         query.previous();
-        QVector<QString> result;
+        QVector<QVariant> result;
         while (query.next()) {
             for (int i = 0; i < return_values ; i++) {
-                result.append(query.value(i).toString());
+                result.append(query.value(i));
             }
         }
-        emit dataBaseUpdated();
         lastError = QString();
         return result;
     }

+ 1 - 1
src/database/adatabase.h

@@ -131,7 +131,7 @@ public:
      * \param query - the full sql query statement
      * \param returnValues - the number of return values
      */
-    QVector<QString> customQuery(QString statement, int return_values);
+    QVector<QVariant> customQuery(QString statement, int return_values);
 
     /*!
      * \brief Checks if an entry exists in the database, based on position data

+ 43 - 40
src/functions/astat.cpp

@@ -21,82 +21,82 @@
 
 /*!
  * \brief AStat::totalTime Looks up Total Blocktime in the flights database
- * \param yearType - Whether the calculation is based on total time, last
- * calendar year or the last rolling year
+ * \param TimeFrame - The timeframe used for the calculations.
  * \return Amount of Total Block Time in minutes
  */
-QString AStat::totalTime(yearType year_type)
+int AStat::totalTime(TimeFrame time_frame)
 {
     QString statement;
     QDate start;
     QString start_date;
 
-    switch (year_type) {
-    case AStat::allYears:
-        statement = "SELECT SUM(tblk) FROM flights";
+    switch (time_frame) {
+    case AStat::AllTime:
+        statement = QStringLiteral("SELECT SUM(tblk) FROM flights");
         break;
-    case AStat::calendarYear:
+    case AStat::CalendarYear:
         start.setDate(QDate::currentDate().year(), 1, 1);
         start_date = start.toString(Qt::ISODate);
         start_date.append(QLatin1Char('\''));
         start_date.prepend(QLatin1Char('\''));
-        statement = "SELECT SUM(tblk) FROM flights WHERE doft >= " + start_date;
+        statement = QLatin1String("SELECT SUM(tblk) FROM flights WHERE doft >= ") + start_date;
         break;
-    case AStat::rollingYear:
+    case AStat::RollingYear:
         start = QDate::fromJulianDay(QDate::currentDate().toJulianDay() - 365);
         start_date = start.toString(Qt::ISODate);
         start_date.append(QLatin1Char('\''));
         start_date.prepend(QLatin1Char('\''));
-        statement = "SELECT SUM(tblk) FROM flights WHERE doft >= " + start_date;
+        statement = QLatin1String("SELECT SUM(tblk) FROM flights WHERE doft >= ") + start_date;
+        break;
+    case AStat::Rolling28Days:
+        start = QDate::fromJulianDay(QDate::currentDate().toJulianDay() - 28);
+        start_date = start.toString(Qt::ISODate);
+        start_date.append(QLatin1Char('\''));
+        start_date.prepend(QLatin1Char('\''));
+        statement = QLatin1String("SELECT SUM(tblk) FROM flights WHERE doft >= ") + start_date;
         break;
     }
 
-    //QVector<QString> result = Db::customQuery(query, 1);
-    QSqlQuery query(statement);
+    auto db_return = aDB->customQuery(statement, 1);
 
-    if (!query.first()) {
-        DEB << "No result found. Check Query and Error.";
-        DEB << "Error: " << query.lastError().text();
-        return "00:00";
-    } else {
-        query.previous();
-        return query.value(0).toString();
-    }
+    if (!db_return.isEmpty())
+        return db_return.first().toInt();
+
+    return 0;
 }
 
 /*!
  * \brief AStat::currencyTakeOffLanding Returns the amount of Take Offs and
- * Landings performed in the last x days. Normally, 90 would be used. (EASA)
- * \param days Number of days to check
- * \return {TO,LDG}
+ * Landings performed in the last x days. If no vallue for days is provided, 90 is used,
+ * as per EASA FTL
+ * \return QVector<QString>{#TO,#LDG}
  */
-QVector<QString> AStat::currencyTakeOffLanding(int days)
+QVector<QVariant> AStat::currencyTakeOffLanding(int days)
 {
     QDate start = QDate::fromJulianDay(QDate::currentDate().toJulianDay() - days);
     QString startdate = start.toString(Qt::ISODate);
     startdate.append(QLatin1Char('\''));
     startdate.prepend(QLatin1Char('\''));
 
-
-    QString statement = "SELECT "
-            "CAST(SUM(flights.TOday) + SUM(flights.TOnight) AS INTEGER) 'TO', "
+    QString statement = QLatin1String("SELECT "
+            "CAST(SUM(flights.TOday) + SUM(flights.TOnight) AS INTEGER) AS 'TO', "
             "CAST(SUM(flights.LDGday) + SUM(flights.LDGnight) AS INTEGER) AS 'LDG' "
             "FROM flights "
-            "WHERE doft >= \"" + startdate + "\"";
-
-    QVector<QString> result = aDB->customQuery(statement, 2);
+            "WHERE doft >=") + startdate;
 
-    if (!result.isEmpty()) {
-        return result;
-    } else {
-        return QVector<QString>();
+    QVector<QVariant> result = aDB->customQuery(statement, 2);
+    // make sure a value is returned instead of NULL
+    for (const auto var : result) {
+        if (var.isNull())
+            result.replace(result.indexOf(var), 0);
     }
 
+    return result;
 }
 
 QVector<QPair<QString, QString>> AStat::totals()
 {
-    QString statement = "SELECT "
+    QString statement = QStringLiteral("SELECT "
             "printf('%02d',CAST(SUM(tblk) AS INT)/60)||':'||printf('%02d',CAST(SUM(tblk) AS INT)%60) AS 'TOTAL', "
             "printf('%02d',CAST(SUM(tSPSE) AS INT)/60)||':'||printf('%02d',CAST(SUM(tSPSE) AS INT)%60) AS 'SP SE', "
             "printf('%02d',CAST(SUM(tSPME) AS INT)/60)||':'||printf('%02d',CAST(SUM(tSPME) AS INT)%60) AS 'SP ME', "
@@ -111,10 +111,13 @@ QVector<QPair<QString, QString>> AStat::totals()
             "printf('%02d',CAST(SUM(tMP) AS INT)/60)||':'||printf('%02d',CAST(SUM(tMP) AS INT)%60) AS 'MultPilot', "
             "CAST(SUM(toDay) AS INT) AS 'TO Day', CAST(SUM(toNight) AS INT) AS 'TO Night', "
             "CAST(SUM(ldgDay) AS INT) AS 'LDG Day', CAST(SUM(ldgNight) AS INT) AS 'LDG Night' "
-            "FROM flights";
-    QVector<QString> columns = {"total", "spse", "spme", "night", "ifr",
-                                "pic", "picus", "sic", "dual", "fi", "sim", "multipilot",
-                                "today", "tonight", "ldgday", "ldgnight"
+            "FROM flights");
+    QVector<QString> columns = {QLatin1String("total"), QLatin1String("spse"), QLatin1String("spme"),
+                                QLatin1String("night"), QLatin1String("ifr"),  QLatin1String("pic"),
+                                QLatin1String("picus"), QLatin1String("sic"),  QLatin1String("dual"),
+                                QLatin1String("fi"),    QLatin1String("sim"),  QLatin1String("multipilot"),
+                                QLatin1String("today"), QLatin1String("tonight"), QLatin1String("ldgday"),
+                                QLatin1String("ldgnight")
                                };
     QSqlQuery query(statement);
     QVector<QPair<QString, QString>> output;
@@ -125,7 +128,7 @@ QVector<QPair<QString, QString>> AStat::totals()
         if (!value.isEmpty()) {
             output.append(QPair<QString, QString>{column, value});
         } else {
-            output.append(QPair<QString, QString>{column, QString("00:00")});
+            output.append(QPair<QString, QString>{column, QLatin1String("00:00")});
         }
     }
     return output;

+ 3 - 3
src/functions/astat.h

@@ -30,11 +30,11 @@ namespace AStat {
  */
 
 
-    enum yearType {allYears, calendarYear, rollingYear};
+    enum TimeFrame {AllTime, CalendarYear, RollingYear, Rolling28Days};
 
-    QString totalTime(yearType);
+    int totalTime(TimeFrame time_frame);
 
-    QVector<QString> currencyTakeOffLanding(int days);
+    QVector<QVariant> currencyTakeOffLanding(int days = 90);
 
     QVector<QPair<QString, QString>> totals();
 

+ 52 - 6
src/gui/widgets/homewidget.cpp

@@ -16,22 +16,68 @@
  *along with this program.  If not, see <https://www.gnu.org/licenses/>.
  */
 #include "homewidget.h"
-#include "ui_homewidget.h"
+#include "ui_totalswidget.h"
 #include "src/testing/adebug.h"
-
+#include "src/database/adatabase.h"
+#include "src/functions/atime.h"
 
 HomeWidget::HomeWidget(QWidget *parent) :
     QWidget(parent),
     ui(new Ui::HomeWidget)
 {
     ui->setupUi(this);
-    totalsWidget = new TotalsWidget(this);
-    ui->stackedWidget->addWidget(totalsWidget);
-    ui->stackedWidget->setCurrentWidget(totalsWidget);
-    ui->stackedWidget->show();
+    ui->welcomeLabel->setText(tr("Welcome to openPilotLog, %1!").arg(userName()));
+
+    fillTotals();
+    fillCurrency();
+    fillLimitations();
 }
 
 HomeWidget::~HomeWidget()
 {
     delete ui;
 }
+
+void HomeWidget::onHomeWidget_dataBaseUpdated()
+{
+    fillTotals();
+    fillCurrency();
+    fillLimitations();
+}
+
+void HomeWidget::fillTotals()
+{
+    auto data = AStat::totals();
+    DEB << "Filling Totals Line Edits...";
+    for (const auto &field : data) {
+        auto line_edit = this->findChild<QLineEdit *>(field.first + QLatin1String("LineEdit"));
+        line_edit->setText(field.second);
+    }
+}
+
+void HomeWidget::fillCurrency()
+{
+    DEB << "Filling currency labels...";
+    auto takeoff_landings = AStat::currencyTakeOffLanding();
+
+    ui->TakeOffDisplayLabel->setText(takeoff_landings[0].toString());
+    ui->LandingsDisplayLabel->setText(takeoff_landings[1].toString());
+}
+
+void HomeWidget::fillLimitations()
+{
+    DEB << "Filling limitations labels...";
+    ui->FlightTime28dDisplayLabel->setText(ATime::toString(AStat::totalTime(AStat::Rolling28Days)));
+    ui->FlightTime12mDisplayLabel->setText(ATime::toString(AStat::totalTime(AStat::RollingYear)));
+    ui->FlightTimeCalYearDisplayLabel->setText(ATime::toString(AStat::totalTime(AStat::CalendarYear)));
+}
+
+const QString HomeWidget::userName()
+{
+    auto statement = QStringLiteral("SELECT firstname FROM pilots WHERE ROWID=1");
+    auto name = aDB->customQuery(statement, 1);
+    if (!name.isEmpty())
+        return name.first().toString();
+
+    return QString();
+}

+ 11 - 8
src/gui/widgets/homewidget.h

@@ -22,14 +22,8 @@
 #include <QStackedLayout>
 #include <QLabel>
 #include <QLineEdit>
+#include <QSettings>
 #include "src/functions/astat.h"
-#include "src/functions/acalc.h"
-#include "src/gui/dialogues/newtaildialog.h"
-#include "src/gui/dialogues/newpilotdialog.h"
-#include "src/gui/widgets/totalswidget.h"
-#include "src/gui/dialogues/firstrundialog.h"
-#include "src/gui/dialogues/newflightdialog.h"
-
 #include "src/database/adatabase.h"
 
 namespace Ui {
@@ -47,7 +41,16 @@ public:
 private:
     Ui::HomeWidget *ui;
 
-    TotalsWidget* totalsWidget;
+    void fillTotals();
+    void fillCurrency();
+    void fillLimitations();
+
+    /*!
+     * \brief Retreives the users first name from the database.
+     */
+    const QString userName();
+public slots:
+    void onHomeWidget_dataBaseUpdated();
 };
 
 #endif // HOMEWIDGET_H

+ 731 - 46
src/gui/widgets/homewidget.ui

@@ -1,79 +1,764 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <ui version="4.0">
- <class>HomeWidget</class>
- <widget class="QWidget" name="HomeWidget">
+ <class>TotalsWidget</class>
+ <widget class="QWidget" name="TotalsWidget">
   <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>1280</width>
-    <height>720</height>
+    <width>1087</width>
+    <height>652</height>
    </rect>
   </property>
   <property name="windowTitle">
    <string>Form</string>
   </property>
-  <layout class="QGridLayout" name="gridLayout">
-   <item row="0" column="2">
-    <spacer name="verticalSpacer">
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
+  <layout class="QGridLayout" name="gridLayout_4">
+   <item row="3" column="0">
+    <widget class="QLabel" name="totalsLabel">
+     <property name="font">
+      <font>
+       <weight>75</weight>
+       <bold>true</bold>
+      </font>
+     </property>
+     <property name="text">
+      <string>Your Totals</string>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignBottom|Qt::AlignHCenter</set>
      </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>20</width>
-       <height>205</height>
-      </size>
+    </widget>
+   </item>
+   <item row="1" column="0">
+    <widget class="Line" name="line_2">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
      </property>
-    </spacer>
+    </widget>
    </item>
-   <item row="1" column="1" colspan="2">
-    <widget class="QStackedWidget" name="stackedWidget">
-     <property name="currentIndex">
-      <number>1</number>
+   <item row="10" column="0">
+    <widget class="Line" name="line_6">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
      </property>
-     <widget class="QWidget" name="page"/>
-     <widget class="QWidget" name="page_2"/>
     </widget>
    </item>
-   <item row="1" column="3">
-    <spacer name="horizontalSpacer_2">
+   <item row="5" column="0">
+    <layout class="QGridLayout" name="gridLayout">
+     <item row="0" column="0">
+      <widget class="QLabel" name="totalLabel">
+       <property name="maximumSize">
+        <size>
+         <width>120</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <property name="text">
+        <string>Total</string>
+       </property>
+      </widget>
+     </item>
+     <item row="0" column="1">
+      <widget class="QLineEdit" name="totalLineEdit">
+       <property name="minimumSize">
+        <size>
+         <width>100</width>
+         <height>0</height>
+        </size>
+       </property>
+       <property name="maximumSize">
+        <size>
+         <width>120</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <property name="focusPolicy">
+        <enum>Qt::NoFocus</enum>
+       </property>
+       <property name="text">
+        <string/>
+       </property>
+      </widget>
+     </item>
+     <item row="0" column="2">
+      <widget class="QLabel" name="picusLabel">
+       <property name="maximumSize">
+        <size>
+         <width>120</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <property name="text">
+        <string>PICus</string>
+       </property>
+      </widget>
+     </item>
+     <item row="0" column="3">
+      <widget class="QLineEdit" name="picusLineEdit">
+       <property name="minimumSize">
+        <size>
+         <width>100</width>
+         <height>0</height>
+        </size>
+       </property>
+       <property name="maximumSize">
+        <size>
+         <width>120</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <property name="focusPolicy">
+        <enum>Qt::NoFocus</enum>
+       </property>
+      </widget>
+     </item>
+     <item row="1" column="0">
+      <widget class="QLabel" name="spseLabel">
+       <property name="maximumSize">
+        <size>
+         <width>120</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <property name="text">
+        <string>SP SE</string>
+       </property>
+      </widget>
+     </item>
+     <item row="1" column="1">
+      <widget class="QLineEdit" name="spseLineEdit">
+       <property name="minimumSize">
+        <size>
+         <width>100</width>
+         <height>0</height>
+        </size>
+       </property>
+       <property name="maximumSize">
+        <size>
+         <width>120</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <property name="focusPolicy">
+        <enum>Qt::NoFocus</enum>
+       </property>
+      </widget>
+     </item>
+     <item row="1" column="2">
+      <widget class="QLabel" name="ifrLabel">
+       <property name="maximumSize">
+        <size>
+         <width>120</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <property name="text">
+        <string>IFR</string>
+       </property>
+      </widget>
+     </item>
+     <item row="1" column="3">
+      <widget class="QLineEdit" name="ifrLineEdit">
+       <property name="minimumSize">
+        <size>
+         <width>100</width>
+         <height>0</height>
+        </size>
+       </property>
+       <property name="maximumSize">
+        <size>
+         <width>120</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <property name="focusPolicy">
+        <enum>Qt::NoFocus</enum>
+       </property>
+      </widget>
+     </item>
+     <item row="2" column="0">
+      <widget class="QLabel" name="spmeLabel">
+       <property name="maximumSize">
+        <size>
+         <width>120</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <property name="text">
+        <string>SP ME</string>
+       </property>
+      </widget>
+     </item>
+     <item row="2" column="1">
+      <widget class="QLineEdit" name="spmeLineEdit">
+       <property name="minimumSize">
+        <size>
+         <width>100</width>
+         <height>0</height>
+        </size>
+       </property>
+       <property name="maximumSize">
+        <size>
+         <width>120</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <property name="focusPolicy">
+        <enum>Qt::NoFocus</enum>
+       </property>
+      </widget>
+     </item>
+     <item row="2" column="2">
+      <widget class="QLabel" name="nightLabel">
+       <property name="maximumSize">
+        <size>
+         <width>120</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <property name="text">
+        <string>Night</string>
+       </property>
+      </widget>
+     </item>
+     <item row="2" column="3">
+      <widget class="QLineEdit" name="nightLineEdit">
+       <property name="minimumSize">
+        <size>
+         <width>100</width>
+         <height>0</height>
+        </size>
+       </property>
+       <property name="maximumSize">
+        <size>
+         <width>120</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <property name="focusPolicy">
+        <enum>Qt::NoFocus</enum>
+       </property>
+      </widget>
+     </item>
+     <item row="3" column="0">
+      <widget class="QLabel" name="multipilotLabel">
+       <property name="maximumSize">
+        <size>
+         <width>120</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <property name="text">
+        <string>Multi Pilot</string>
+       </property>
+      </widget>
+     </item>
+     <item row="3" column="1">
+      <widget class="QLineEdit" name="multipilotLineEdit">
+       <property name="minimumSize">
+        <size>
+         <width>100</width>
+         <height>0</height>
+        </size>
+       </property>
+       <property name="maximumSize">
+        <size>
+         <width>120</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <property name="focusPolicy">
+        <enum>Qt::NoFocus</enum>
+       </property>
+      </widget>
+     </item>
+     <item row="3" column="2">
+      <widget class="QLabel" name="simLabel">
+       <property name="maximumSize">
+        <size>
+         <width>120</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <property name="text">
+        <string>Simulator</string>
+       </property>
+      </widget>
+     </item>
+     <item row="3" column="3">
+      <widget class="QLineEdit" name="simLineEdit">
+       <property name="minimumSize">
+        <size>
+         <width>100</width>
+         <height>0</height>
+        </size>
+       </property>
+       <property name="maximumSize">
+        <size>
+         <width>120</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <property name="focusPolicy">
+        <enum>Qt::NoFocus</enum>
+       </property>
+      </widget>
+     </item>
+     <item row="4" column="0">
+      <widget class="QLabel" name="piclabel">
+       <property name="maximumSize">
+        <size>
+         <width>120</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <property name="text">
+        <string>PIC</string>
+       </property>
+      </widget>
+     </item>
+     <item row="4" column="1">
+      <widget class="QLineEdit" name="picLineEdit">
+       <property name="minimumSize">
+        <size>
+         <width>100</width>
+         <height>0</height>
+        </size>
+       </property>
+       <property name="maximumSize">
+        <size>
+         <width>120</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <property name="focusPolicy">
+        <enum>Qt::NoFocus</enum>
+       </property>
+      </widget>
+     </item>
+     <item row="4" column="2">
+      <widget class="QLabel" name="todayLabel">
+       <property name="maximumSize">
+        <size>
+         <width>120</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <property name="text">
+        <string>TO Day</string>
+       </property>
+      </widget>
+     </item>
+     <item row="4" column="3">
+      <widget class="QLineEdit" name="todayLineEdit">
+       <property name="minimumSize">
+        <size>
+         <width>100</width>
+         <height>0</height>
+        </size>
+       </property>
+       <property name="maximumSize">
+        <size>
+         <width>120</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <property name="focusPolicy">
+        <enum>Qt::NoFocus</enum>
+       </property>
+       <property name="text">
+        <string>0</string>
+       </property>
+      </widget>
+     </item>
+     <item row="5" column="0">
+      <widget class="QLabel" name="sicLabel">
+       <property name="maximumSize">
+        <size>
+         <width>120</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <property name="text">
+        <string>SIC</string>
+       </property>
+      </widget>
+     </item>
+     <item row="5" column="1">
+      <widget class="QLineEdit" name="sicLineEdit">
+       <property name="minimumSize">
+        <size>
+         <width>100</width>
+         <height>0</height>
+        </size>
+       </property>
+       <property name="maximumSize">
+        <size>
+         <width>120</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <property name="focusPolicy">
+        <enum>Qt::NoFocus</enum>
+       </property>
+      </widget>
+     </item>
+     <item row="5" column="2">
+      <widget class="QLabel" name="tonightLabel">
+       <property name="maximumSize">
+        <size>
+         <width>120</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <property name="text">
+        <string>TO Night</string>
+       </property>
+      </widget>
+     </item>
+     <item row="5" column="3">
+      <widget class="QLineEdit" name="tonightLineEdit">
+       <property name="minimumSize">
+        <size>
+         <width>100</width>
+         <height>0</height>
+        </size>
+       </property>
+       <property name="maximumSize">
+        <size>
+         <width>120</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <property name="focusPolicy">
+        <enum>Qt::NoFocus</enum>
+       </property>
+       <property name="text">
+        <string>0</string>
+       </property>
+      </widget>
+     </item>
+     <item row="6" column="0">
+      <widget class="QLabel" name="dualLabel">
+       <property name="maximumSize">
+        <size>
+         <width>120</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <property name="text">
+        <string>DUAL</string>
+       </property>
+      </widget>
+     </item>
+     <item row="6" column="1">
+      <widget class="QLineEdit" name="dualLineEdit">
+       <property name="minimumSize">
+        <size>
+         <width>100</width>
+         <height>0</height>
+        </size>
+       </property>
+       <property name="maximumSize">
+        <size>
+         <width>120</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <property name="focusPolicy">
+        <enum>Qt::NoFocus</enum>
+       </property>
+      </widget>
+     </item>
+     <item row="6" column="2">
+      <widget class="QLabel" name="ldgdayLabel">
+       <property name="maximumSize">
+        <size>
+         <width>120</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <property name="text">
+        <string>LDG Day</string>
+       </property>
+      </widget>
+     </item>
+     <item row="6" column="3">
+      <widget class="QLineEdit" name="ldgdayLineEdit">
+       <property name="minimumSize">
+        <size>
+         <width>100</width>
+         <height>0</height>
+        </size>
+       </property>
+       <property name="maximumSize">
+        <size>
+         <width>120</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <property name="focusPolicy">
+        <enum>Qt::NoFocus</enum>
+       </property>
+       <property name="text">
+        <string>0</string>
+       </property>
+      </widget>
+     </item>
+     <item row="7" column="0">
+      <widget class="QLabel" name="fiLabel">
+       <property name="maximumSize">
+        <size>
+         <width>120</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <property name="text">
+        <string>FI</string>
+       </property>
+      </widget>
+     </item>
+     <item row="7" column="2">
+      <widget class="QLabel" name="ldgnightLabel">
+       <property name="maximumSize">
+        <size>
+         <width>120</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <property name="text">
+        <string>LDG Night</string>
+       </property>
+      </widget>
+     </item>
+     <item row="7" column="3">
+      <widget class="QLineEdit" name="ldgnightLineEdit">
+       <property name="minimumSize">
+        <size>
+         <width>100</width>
+         <height>0</height>
+        </size>
+       </property>
+       <property name="maximumSize">
+        <size>
+         <width>120</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <property name="focusPolicy">
+        <enum>Qt::NoFocus</enum>
+       </property>
+       <property name="text">
+        <string>0</string>
+       </property>
+      </widget>
+     </item>
+     <item row="7" column="1">
+      <widget class="QLineEdit" name="fiLineEdit">
+       <property name="minimumSize">
+        <size>
+         <width>100</width>
+         <height>0</height>
+        </size>
+       </property>
+       <property name="maximumSize">
+        <size>
+         <width>120</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <property name="focusPolicy">
+        <enum>Qt::NoFocus</enum>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item row="12" column="0">
+    <widget class="Line" name="line_3">
      <property name="orientation">
       <enum>Qt::Horizontal</enum>
      </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>414</width>
-       <height>20</height>
-      </size>
+    </widget>
+   </item>
+   <item row="0" column="0">
+    <widget class="QLabel" name="welcomeLabel">
+     <property name="text">
+      <string>Welcome to openPilotLog!</string>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignCenter</set>
+     </property>
+    </widget>
+   </item>
+   <item row="4" column="0">
+    <widget class="Line" name="line">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
      </property>
-    </spacer>
+    </widget>
+   </item>
+   <item row="13" column="0">
+    <layout class="QGridLayout" name="gridLayout_2">
+     <item row="0" column="0">
+      <widget class="QLabel" name="FlightTime28dLabel">
+       <property name="text">
+        <string>Flight Time (last 28 days)</string>
+       </property>
+      </widget>
+     </item>
+     <item row="0" column="1">
+      <widget class="QLabel" name="FlightTime28dDisplayLabel">
+       <property name="layoutDirection">
+        <enum>Qt::LeftToRight</enum>
+       </property>
+       <property name="text">
+        <string>0</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+       </property>
+      </widget>
+     </item>
+     <item row="1" column="0">
+      <widget class="QLabel" name="FlightTimeCalYearLabel">
+       <property name="text">
+        <string>Flight Time (this calendar year)</string>
+       </property>
+      </widget>
+     </item>
+     <item row="1" column="1">
+      <widget class="QLabel" name="FlightTimeCalYearDisplayLabel">
+       <property name="layoutDirection">
+        <enum>Qt::LeftToRight</enum>
+       </property>
+       <property name="text">
+        <string>0</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+       </property>
+      </widget>
+     </item>
+     <item row="2" column="0">
+      <widget class="QLabel" name="FlightTime12mLabel">
+       <property name="text">
+        <string>Flight Time (last 12 calendar months)</string>
+       </property>
+      </widget>
+     </item>
+     <item row="2" column="1">
+      <widget class="QLabel" name="FlightTime12mDisplayLabel">
+       <property name="layoutDirection">
+        <enum>Qt::LeftToRight</enum>
+       </property>
+       <property name="text">
+        <string>0</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+       </property>
+      </widget>
+     </item>
+    </layout>
    </item>
-   <item row="2" column="2">
-    <spacer name="verticalSpacer_2">
+   <item row="6" column="0">
+    <widget class="Line" name="line_5">
      <property name="orientation">
-      <enum>Qt::Vertical</enum>
+      <enum>Qt::Horizontal</enum>
+     </property>
+    </widget>
+   </item>
+   <item row="11" column="0">
+    <widget class="QLabel" name="limitationsLabel">
+     <property name="font">
+      <font>
+       <weight>75</weight>
+       <bold>true</bold>
+      </font>
+     </property>
+     <property name="text">
+      <string>Limitations</string>
      </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>20</width>
-       <height>205</height>
-      </size>
+     <property name="alignment">
+      <set>Qt::AlignBottom|Qt::AlignHCenter</set>
      </property>
-    </spacer>
+    </widget>
    </item>
-   <item row="1" column="0">
-    <spacer name="horizontalSpacer">
+   <item row="7" column="0">
+    <widget class="QLabel" name="currencyLabel">
+     <property name="font">
+      <font>
+       <weight>75</weight>
+       <bold>true</bold>
+      </font>
+     </property>
+     <property name="text">
+      <string>Currency</string>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignBottom|Qt::AlignHCenter</set>
+     </property>
+    </widget>
+   </item>
+   <item row="8" column="0">
+    <widget class="Line" name="line_4">
      <property name="orientation">
       <enum>Qt::Horizontal</enum>
      </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>414</width>
-       <height>20</height>
-      </size>
+    </widget>
+   </item>
+   <item row="9" column="0">
+    <layout class="QGridLayout" name="gridLayout_3">
+     <item row="0" column="0">
+      <widget class="QLabel" name="TakeOffLabel">
+       <property name="text">
+        <string>Take offs (last 90 days)</string>
+       </property>
+      </widget>
+     </item>
+     <item row="0" column="1">
+      <widget class="QLabel" name="TakeOffDisplayLabel">
+       <property name="layoutDirection">
+        <enum>Qt::LeftToRight</enum>
+       </property>
+       <property name="text">
+        <string>0</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+       </property>
+      </widget>
+     </item>
+     <item row="1" column="0">
+      <widget class="QLabel" name="LandingsLabel">
+       <property name="text">
+        <string>Landings (last 90 days)</string>
+       </property>
+      </widget>
+     </item>
+     <item row="1" column="1">
+      <widget class="QLabel" name="LandingsDisplayLabel">
+       <property name="layoutDirection">
+        <enum>Qt::LeftToRight</enum>
+       </property>
+       <property name="text">
+        <string>0</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item row="2" column="0">
+    <widget class="Line" name="line_7">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
      </property>
-    </spacer>
+    </widget>
    </item>
   </layout>
  </widget>

+ 0 - 54
src/gui/widgets/totalswidget.cpp

@@ -1,54 +0,0 @@
-/*
- *openPilotLog - A FOSS Pilot Logbook Application
- *Copyright (C) 2020-2021 Felix Turowsky
- *
- *This program is free software: you can redistribute it and/or modify
- *it under the terms of the GNU General Public License as published by
- *the Free Software Foundation, either version 3 of the License, or
- *(at your option) any later version.
- *
- *This program is distributed in the hope that it will be useful,
- *but WITHOUT ANY WARRANTY; without even the implied warranty of
- *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *GNU General Public License for more details.
- *
- *You should have received a copy of the GNU General Public License
- *along with this program.  If not, see <https://www.gnu.org/licenses/>.
- */
-#include "totalswidget.h"
-#include "ui_totalswidget.h"
-#include "src/testing/adebug.h"
-#include "src/database/adatabase.h"
-
-TotalsWidget::TotalsWidget(QWidget *parent) :
-    QWidget(parent),
-    ui(new Ui::TotalsWidget)
-{
-    ui->setupUi(this);
-    auto data = AStat::totals();
-    DEB << "Filling Totals Line Edits...";
-    for (const auto &field : data) {
-        auto line_edit = parent->findChild<QLineEdit *>(field.first + "LineEdit");
-        line_edit->setText(field.second);
-    }
-
-    QString salutation = tr("Welcome to openPilotLog");
-    salutation.append(QStringLiteral(", ") + userName() + QLatin1Char('!'));
-
-    ui->welcomeLabel->setText(salutation);
-}
-
-TotalsWidget::~TotalsWidget()
-{
-    delete ui;
-}
-
-const QString TotalsWidget::userName()
-{
-    auto namestring = aDB->getPilotEntry(1).name();
-    auto names = namestring.split(',');
-    if (!names.isEmpty())
-        return names[0];
-
-    return QString();
-}

+ 0 - 45
src/gui/widgets/totalswidget.h

@@ -1,45 +0,0 @@
-/*
- *openPilotLog - A FOSS Pilot Logbook Application
- *Copyright (C) 2020-2021 Felix Turowsky
- *
- *This program is free software: you can redistribute it and/or modify
- *it under the terms of the GNU General Public License as published by
- *the Free Software Foundation, either version 3 of the License, or
- *(at your option) any later version.
- *
- *This program is distributed in the hope that it will be useful,
- *but WITHOUT ANY WARRANTY; without even the implied warranty of
- *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *GNU General Public License for more details.
- *
- *You should have received a copy of the GNU General Public License
- *along with this program.  If not, see <https://www.gnu.org/licenses/>.
- */
-#ifndef TOTALSWIDGET_H
-#define TOTALSWIDGET_H
-
-#include <QWidget>
-#include <QStackedLayout>
-#include <QLabel>
-#include <QLineEdit>
-#include <QSettings>
-#include "src/functions/astat.h"
-
-namespace Ui {
-class TotalsWidget;
-}
-
-class TotalsWidget : public QWidget
-{
-    Q_OBJECT
-
-public:
-    explicit TotalsWidget(QWidget *parent = nullptr);
-    ~TotalsWidget();
-
-private:
-    Ui::TotalsWidget *ui;
-    const QString userName();
-};
-
-#endif // TOTALSWIDGET_H

+ 0 - 481
src/gui/widgets/totalswidget.ui

@@ -1,481 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>TotalsWidget</class>
- <widget class="QWidget" name="TotalsWidget">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>634</width>
-    <height>382</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>Form</string>
-  </property>
-  <layout class="QGridLayout" name="gridLayout_2">
-   <item row="0" column="0">
-    <widget class="QLabel" name="welcomeLabel">
-     <property name="text">
-      <string>Welcome to openPilotLog!</string>
-     </property>
-     <property name="alignment">
-      <set>Qt::AlignCenter</set>
-     </property>
-    </widget>
-   </item>
-   <item row="4" column="0">
-    <layout class="QGridLayout" name="gridLayout">
-     <item row="0" column="0">
-      <widget class="QLabel" name="totalLabel">
-       <property name="maximumSize">
-        <size>
-         <width>120</width>
-         <height>16777215</height>
-        </size>
-       </property>
-       <property name="text">
-        <string>Total</string>
-       </property>
-      </widget>
-     </item>
-     <item row="0" column="1">
-      <widget class="QLineEdit" name="totalLineEdit">
-       <property name="maximumSize">
-        <size>
-         <width>120</width>
-         <height>16777215</height>
-        </size>
-       </property>
-       <property name="focusPolicy">
-        <enum>Qt::NoFocus</enum>
-       </property>
-      </widget>
-     </item>
-     <item row="0" column="2">
-      <widget class="QLabel" name="picusLabel">
-       <property name="maximumSize">
-        <size>
-         <width>120</width>
-         <height>16777215</height>
-        </size>
-       </property>
-       <property name="text">
-        <string>PICus</string>
-       </property>
-      </widget>
-     </item>
-     <item row="0" column="3">
-      <widget class="QLineEdit" name="picusLineEdit">
-       <property name="maximumSize">
-        <size>
-         <width>120</width>
-         <height>16777215</height>
-        </size>
-       </property>
-       <property name="focusPolicy">
-        <enum>Qt::NoFocus</enum>
-       </property>
-      </widget>
-     </item>
-     <item row="1" column="0">
-      <widget class="QLabel" name="spseLabel">
-       <property name="maximumSize">
-        <size>
-         <width>120</width>
-         <height>16777215</height>
-        </size>
-       </property>
-       <property name="text">
-        <string>SP SE</string>
-       </property>
-      </widget>
-     </item>
-     <item row="1" column="1">
-      <widget class="QLineEdit" name="spseLineEdit">
-       <property name="maximumSize">
-        <size>
-         <width>120</width>
-         <height>16777215</height>
-        </size>
-       </property>
-       <property name="focusPolicy">
-        <enum>Qt::NoFocus</enum>
-       </property>
-      </widget>
-     </item>
-     <item row="1" column="2">
-      <widget class="QLabel" name="ifrLabel">
-       <property name="maximumSize">
-        <size>
-         <width>120</width>
-         <height>16777215</height>
-        </size>
-       </property>
-       <property name="text">
-        <string>IFR</string>
-       </property>
-      </widget>
-     </item>
-     <item row="1" column="3">
-      <widget class="QLineEdit" name="ifrLineEdit">
-       <property name="maximumSize">
-        <size>
-         <width>120</width>
-         <height>16777215</height>
-        </size>
-       </property>
-       <property name="focusPolicy">
-        <enum>Qt::NoFocus</enum>
-       </property>
-      </widget>
-     </item>
-     <item row="2" column="0">
-      <widget class="QLabel" name="spmeLabel">
-       <property name="maximumSize">
-        <size>
-         <width>120</width>
-         <height>16777215</height>
-        </size>
-       </property>
-       <property name="text">
-        <string>SP ME</string>
-       </property>
-      </widget>
-     </item>
-     <item row="2" column="1">
-      <widget class="QLineEdit" name="spmeLineEdit">
-       <property name="maximumSize">
-        <size>
-         <width>120</width>
-         <height>16777215</height>
-        </size>
-       </property>
-       <property name="focusPolicy">
-        <enum>Qt::NoFocus</enum>
-       </property>
-      </widget>
-     </item>
-     <item row="2" column="2">
-      <widget class="QLabel" name="nightLabel">
-       <property name="maximumSize">
-        <size>
-         <width>120</width>
-         <height>16777215</height>
-        </size>
-       </property>
-       <property name="text">
-        <string>Night</string>
-       </property>
-      </widget>
-     </item>
-     <item row="2" column="3">
-      <widget class="QLineEdit" name="nightLineEdit">
-       <property name="maximumSize">
-        <size>
-         <width>120</width>
-         <height>16777215</height>
-        </size>
-       </property>
-       <property name="focusPolicy">
-        <enum>Qt::NoFocus</enum>
-       </property>
-      </widget>
-     </item>
-     <item row="3" column="0">
-      <widget class="QLabel" name="multipilotLabel">
-       <property name="maximumSize">
-        <size>
-         <width>120</width>
-         <height>16777215</height>
-        </size>
-       </property>
-       <property name="text">
-        <string>Multi Pilot</string>
-       </property>
-      </widget>
-     </item>
-     <item row="3" column="1">
-      <widget class="QLineEdit" name="multipilotLineEdit">
-       <property name="maximumSize">
-        <size>
-         <width>120</width>
-         <height>16777215</height>
-        </size>
-       </property>
-       <property name="focusPolicy">
-        <enum>Qt::NoFocus</enum>
-       </property>
-      </widget>
-     </item>
-     <item row="3" column="2">
-      <widget class="QLabel" name="simLabel">
-       <property name="maximumSize">
-        <size>
-         <width>120</width>
-         <height>16777215</height>
-        </size>
-       </property>
-       <property name="text">
-        <string>Simulator</string>
-       </property>
-      </widget>
-     </item>
-     <item row="3" column="3">
-      <widget class="QLineEdit" name="simLineEdit">
-       <property name="maximumSize">
-        <size>
-         <width>120</width>
-         <height>16777215</height>
-        </size>
-       </property>
-       <property name="focusPolicy">
-        <enum>Qt::NoFocus</enum>
-       </property>
-      </widget>
-     </item>
-     <item row="4" column="0">
-      <widget class="QLabel" name="piclabel">
-       <property name="maximumSize">
-        <size>
-         <width>120</width>
-         <height>16777215</height>
-        </size>
-       </property>
-       <property name="text">
-        <string>PIC</string>
-       </property>
-      </widget>
-     </item>
-     <item row="4" column="1">
-      <widget class="QLineEdit" name="picLineEdit">
-       <property name="maximumSize">
-        <size>
-         <width>120</width>
-         <height>16777215</height>
-        </size>
-       </property>
-       <property name="focusPolicy">
-        <enum>Qt::NoFocus</enum>
-       </property>
-      </widget>
-     </item>
-     <item row="4" column="2">
-      <widget class="QLabel" name="todayLabel">
-       <property name="maximumSize">
-        <size>
-         <width>120</width>
-         <height>16777215</height>
-        </size>
-       </property>
-       <property name="text">
-        <string>TO Day</string>
-       </property>
-      </widget>
-     </item>
-     <item row="4" column="3">
-      <widget class="QLineEdit" name="todayLineEdit">
-       <property name="maximumSize">
-        <size>
-         <width>120</width>
-         <height>16777215</height>
-        </size>
-       </property>
-       <property name="focusPolicy">
-        <enum>Qt::NoFocus</enum>
-       </property>
-      </widget>
-     </item>
-     <item row="5" column="0">
-      <widget class="QLabel" name="sicLabel">
-       <property name="maximumSize">
-        <size>
-         <width>120</width>
-         <height>16777215</height>
-        </size>
-       </property>
-       <property name="text">
-        <string>SIC</string>
-       </property>
-      </widget>
-     </item>
-     <item row="5" column="1">
-      <widget class="QLineEdit" name="sicLineEdit">
-       <property name="maximumSize">
-        <size>
-         <width>120</width>
-         <height>16777215</height>
-        </size>
-       </property>
-       <property name="focusPolicy">
-        <enum>Qt::NoFocus</enum>
-       </property>
-      </widget>
-     </item>
-     <item row="5" column="2">
-      <widget class="QLabel" name="tonightLabel">
-       <property name="maximumSize">
-        <size>
-         <width>120</width>
-         <height>16777215</height>
-        </size>
-       </property>
-       <property name="text">
-        <string>TO Night</string>
-       </property>
-      </widget>
-     </item>
-     <item row="5" column="3">
-      <widget class="QLineEdit" name="tonightLineEdit">
-       <property name="maximumSize">
-        <size>
-         <width>120</width>
-         <height>16777215</height>
-        </size>
-       </property>
-       <property name="focusPolicy">
-        <enum>Qt::NoFocus</enum>
-       </property>
-      </widget>
-     </item>
-     <item row="6" column="0">
-      <widget class="QLabel" name="dualLabel">
-       <property name="maximumSize">
-        <size>
-         <width>120</width>
-         <height>16777215</height>
-        </size>
-       </property>
-       <property name="text">
-        <string>DUAL</string>
-       </property>
-      </widget>
-     </item>
-     <item row="6" column="1">
-      <widget class="QLineEdit" name="dualLineEdit">
-       <property name="maximumSize">
-        <size>
-         <width>120</width>
-         <height>16777215</height>
-        </size>
-       </property>
-       <property name="focusPolicy">
-        <enum>Qt::NoFocus</enum>
-       </property>
-      </widget>
-     </item>
-     <item row="6" column="2">
-      <widget class="QLabel" name="ldgdayLabel">
-       <property name="maximumSize">
-        <size>
-         <width>120</width>
-         <height>16777215</height>
-        </size>
-       </property>
-       <property name="text">
-        <string>LDG Day</string>
-       </property>
-      </widget>
-     </item>
-     <item row="6" column="3">
-      <widget class="QLineEdit" name="ldgdayLineEdit">
-       <property name="maximumSize">
-        <size>
-         <width>120</width>
-         <height>16777215</height>
-        </size>
-       </property>
-       <property name="focusPolicy">
-        <enum>Qt::NoFocus</enum>
-       </property>
-      </widget>
-     </item>
-     <item row="7" column="0">
-      <widget class="QLabel" name="fiLabel">
-       <property name="maximumSize">
-        <size>
-         <width>120</width>
-         <height>16777215</height>
-        </size>
-       </property>
-       <property name="text">
-        <string>FI</string>
-       </property>
-      </widget>
-     </item>
-     <item row="7" column="2">
-      <widget class="QLabel" name="ldgnightLabel">
-       <property name="maximumSize">
-        <size>
-         <width>120</width>
-         <height>16777215</height>
-        </size>
-       </property>
-       <property name="text">
-        <string>LDG Night</string>
-       </property>
-      </widget>
-     </item>
-     <item row="7" column="3">
-      <widget class="QLineEdit" name="ldgnightLineEdit">
-       <property name="maximumSize">
-        <size>
-         <width>120</width>
-         <height>16777215</height>
-        </size>
-       </property>
-       <property name="focusPolicy">
-        <enum>Qt::NoFocus</enum>
-       </property>
-      </widget>
-     </item>
-     <item row="7" column="1">
-      <widget class="QLineEdit" name="fiLineEdit">
-       <property name="maximumSize">
-        <size>
-         <width>120</width>
-         <height>16777215</height>
-        </size>
-       </property>
-       <property name="focusPolicy">
-        <enum>Qt::NoFocus</enum>
-       </property>
-      </widget>
-     </item>
-    </layout>
-   </item>
-   <item row="2" column="0">
-    <widget class="QLabel" name="totalsLabel">
-     <property name="font">
-      <font>
-       <weight>75</weight>
-       <bold>true</bold>
-      </font>
-     </property>
-     <property name="text">
-      <string>Your Totals</string>
-     </property>
-     <property name="alignment">
-      <set>Qt::AlignCenter</set>
-     </property>
-    </widget>
-   </item>
-   <item row="3" column="0">
-    <widget class="Line" name="line">
-     <property name="orientation">
-      <enum>Qt::Horizontal</enum>
-     </property>
-    </widget>
-   </item>
-   <item row="1" column="0">
-    <widget class="Line" name="line_2">
-     <property name="orientation">
-      <enum>Qt::Horizontal</enum>
-     </property>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>