Jelajahi Sumber

Redesign of home and currency widget

Separating the Home Widget into more digestible parts. And placing them in a tabbed widget. De-clutter the welcome screen.

Handling of currencies in a single QTableView based widget instead of with multiple line edits, settings etc.
Felix Turowsky 1 tahun lalu
induk
melakukan
0f9d01fa05

+ 2 - 0
CMakeLists.txt

@@ -95,6 +95,8 @@ set(PROJECT_SOURCES
     src/gui/verification/completerprovider.cpp
     src/gui/verification/tailinput.h
     src/gui/verification/tailinput.cpp
+    src/gui/widgets/currencywidget.h
+    src/gui/widgets/currencywidget.cpp
 
 
     # Classes

+ 156 - 0
src/gui/widgets/currencywidget.cpp

@@ -0,0 +1,156 @@
+#include "currencywidget.h"
+#include "QtSql/qsqltablemodel.h"
+#include "QtWidgets/qgridlayout.h"
+#include "QtWidgets/qheaderview.h"
+#include "src/database/database.h"
+#include <QCalendarWidget>
+#include <QInputDialog>
+#include <QLabel>
+
+
+CurrencyWidget::CurrencyWidget(QWidget *parent)
+    : QWidget{parent}
+{
+    dateFormat = QStringLiteral("yyyy-MM-dd"); // TODO implement date formats
+    setupModelAndView();
+    setupUI();
+}
+
+void CurrencyWidget::setupModelAndView()
+{
+    model = new QSqlTableModel(this, DB->database());
+    model->setTable(OPL::GLOBALS->getDbTableName(OPL::DbTable::Currencies));
+    model->select();
+    model->setHeaderData(2, Qt::Horizontal, "Expiry Date");
+    model->setHeaderData(3, Qt::Horizontal, "Name");
+
+    tableView = new QTableView(this);
+    tableView->setModel(model);
+    tableView->setSelectionMode(QAbstractItemView::SingleSelection);
+    tableView->setSelectionBehavior(QAbstractItemView::SelectItems);
+    tableView->setEditTriggers(QAbstractItemView::NoEditTriggers);
+    tableView->resizeColumnsToContents();
+    tableView->horizontalHeader()->setStretchLastSection(QHeaderView::Stretch);
+    tableView->verticalHeader()->hide();
+    tableView->setAlternatingRowColors(true);
+    tableView->hideColumn(0);
+    tableView->hideColumn(1); // TODO remove once sql table is adjusted
+}
+
+void CurrencyWidget::setupUI()
+{
+    // create a 3-column grid layout
+    int colL = 0; // left column
+    int colM = 1; // middle column
+    int colR = 2; // right column
+    int allColSpan = 3; // span all columns
+    int noRowSpan = 1; // span only a single row
+    int row = 0;
+    auto gridLayout = new QGridLayout(this);
+
+    // Take-off and Landing Currency
+    gridLayout->addWidget(takeOffLandingHeaderLabel, row, colM, Qt::AlignCenter);
+    row++;
+    gridLayout->addWidget(getHorizontalLine(), row, colL, noRowSpan, allColSpan);
+    row++;
+
+    gridLayout->addWidget(takeOffCountLabel, row, colL, Qt::AlignLeft);
+    gridLayout->addWidget(takeOffCountDisplayLabel, row, colR, Qt::AlignRight);
+    row++;
+
+    gridLayout->addWidget(landingCountLabel, row, colL, Qt::AlignLeft);
+    gridLayout->addWidget(landingCountDisplayLabel, row, colR, Qt::AlignRight);
+    row++;
+
+    gridLayout->addWidget(takeOffLandingExpiryLabel, row, colL, Qt::AlignLeft);
+    gridLayout->addWidget(takeOffLandingExpiryDisplayLabel, row, colR, Qt::AlignRight);
+    row++;
+
+    // Flight Time Limitations
+    gridLayout->addWidget(flightTimeHeaderLabel, row, colM, Qt::AlignCenter);
+    row++;
+    gridLayout->addWidget(getHorizontalLine(), row, colL, noRowSpan, allColSpan);
+    row++;
+
+    gridLayout->addWidget(flightTime28DaysLabel, row, colL, Qt::AlignLeft);
+    gridLayout->addWidget(flightTime28DaysDisplayLabel, row, colR, Qt::AlignRight);
+    row++;
+
+    gridLayout->addWidget(flightTime365DaysLabel, row, colL, Qt::AlignLeft);
+    gridLayout->addWidget(flightTime365DaysDisplayLabel, row, colR, Qt::AlignRight);
+    row++;
+
+    gridLayout->addWidget(flightTimeCalendarYearLabel, row, colL, Qt::AlignLeft);
+    gridLayout->addWidget(flightTimeCalendarYearDisplayLabel, row, colR, Qt::AlignRight);
+    row++;
+
+    // Expiries (currencies table)
+    gridLayout->addWidget(expiriesHeaderLabel, row, colM, Qt::AlignCenter);
+    row++;
+    gridLayout->addWidget(getHorizontalLine(), row, colL, noRowSpan, allColSpan);
+    row++;
+    gridLayout->addWidget(tableView, row, colL, noRowSpan, allColSpan);
+
+    // set the layout active
+    layout = gridLayout;
+
+    // allocate a widget for date selection
+    calendar = new QCalendarWidget(this);
+    calendar->setVisible(false);
+    calendar->setWindowFlags(Qt::Dialog);
+
+
+    // connect signals
+    QObject::connect(tableView,	&QTableView::activated,
+                     this, &CurrencyWidget::editRequested);
+    QObject::connect(calendar, &QCalendarWidget::selectionChanged,
+                     this, &CurrencyWidget::newExpiryDateSelected);
+}
+
+
+
+void CurrencyWidget::editRequested(const QModelIndex &index)
+{
+    LOG << "Edit requested at: " << index.data();
+    lastSelection = index;
+    const QString selection = index.data().toString();
+    const QDate selectedDate = QDate::fromString(selection, dateFormat);
+    if(selectedDate.isValid()) {
+        // the date column has been selected for editing
+        const QSignalBlocker blocker(calendar);
+        calendar->setSelectedDate(selectedDate);
+        calendar->show();
+    } else {
+        // the displayName column has been selected for editing
+        LOG << "Other edit requested";
+        displayNameEditRequested(index);
+    }
+}
+
+void CurrencyWidget::newExpiryDateSelected()
+{
+    calendar->hide();
+    const QString selectedDate = calendar->selectedDate().toString(dateFormat);
+    model->setData(lastSelection, selectedDate);
+    model->submitAll();
+}
+
+void CurrencyWidget::displayNameEditRequested(QModelIndex index)
+{
+    const QString text = QInputDialog::getText(
+        this,
+        tr("Edit Currency Name"),
+        tr("Please enter a name for this currency"),
+        QLineEdit::Normal,
+        index.data().toString());
+
+    model->setData(index, text);
+    model->submitAll();
+}
+
+QFrame *CurrencyWidget::getHorizontalLine()
+{
+    QFrame* newFrame = new QFrame(this);
+    newFrame->setFrameShape(QFrame::HLine);
+    return newFrame;
+}

+ 52 - 0
src/gui/widgets/currencywidget.h

@@ -0,0 +1,52 @@
+#ifndef CURRENCYWIDGET_H
+#define CURRENCYWIDGET_H
+
+#include <QWidget>
+#include <QCalendarWidget>
+#include <QTableView>
+#include <QSqlTableModel>
+#include <QLabel>
+class CurrencyWidget : public QWidget
+{
+    Q_OBJECT
+    QLayout* layout;
+    QTableView *tableView;
+    QSqlTableModel *model;
+    QCalendarWidget *calendar;
+    QString dateFormat;
+    QModelIndex lastSelection;
+
+    void setupModelAndView();
+    void setupUI();
+    void displayNameEditRequested(QModelIndex index);
+
+    QFrame *getHorizontalLine();
+    QLabel *takeOffLandingHeaderLabel   		= new QLabel(tr("<b>Take-off and Landing Currency<\b>"), this);
+    QLabel *takeOffCountLabel					= new QLabel(tr("Take offs ( last 90 days)"), this);
+    QLabel *takeOffCountDisplayLabel 			= new QLabel(QStringLiteral("<b>%1<\b>"), this);
+    QLabel *landingCountLabel 					= new QLabel(tr("Landings ( last 90 days)"), this);
+    QLabel *landingCountDisplayLabel			= new QLabel(QStringLiteral("<b>%1<\b>"), this);
+    QLabel *takeOffLandingExpiryLabel   		= new QLabel(tr("3 Take-offs and Landings expiry date"), this);
+    QLabel *takeOffLandingExpiryDisplayLabel    = new QLabel(QStringLiteral("<b>%1<\b>"), this);
+    QLabel *flightTimeHeaderLabel		   		= new QLabel(tr("<b>Flight Time Limitations<\b>"), this);
+    QLabel *flightTime28DaysLabel 	    		= new QLabel(tr("Flight time (last 28 days)"), this);
+    QLabel *flightTime28DaysDisplayLabel 	    = new QLabel(QStringLiteral("<b>%1<\b>"), this);
+    QLabel *flightTime365DaysLabel 	    		= new QLabel(tr("FLight time (last 365 days)"), this);
+    QLabel *flightTime365DaysDisplayLabel 	    = new QLabel(QStringLiteral("<b>%1<\b>"), this);
+    QLabel *flightTimeCalendarYearLabel 		= new QLabel(tr("Flight time (this calendar year"),this);
+    QLabel *flightTimeCalendarYearDisplayLabel  = new QLabel(QStringLiteral("<b>%1<\b>"), this);
+    QLabel *expiriesHeaderLabel			   		= new QLabel(tr("<b>Expiries<\b>"), this);
+
+
+private slots:
+    void editRequested(const QModelIndex &index);
+    void newExpiryDateSelected();
+
+public:
+    explicit CurrencyWidget(QWidget *parent = nullptr);
+
+signals:
+
+};
+
+#endif // CURRENCYWIDGET_H

+ 117 - 110
src/gui/widgets/homewidget.cpp

@@ -17,6 +17,7 @@
  */
 #include "homewidget.h"
 #include "src/functions/statistics.h"
+#include "src/gui/widgets/currencywidget.h"
 #include "src/gui/widgets/totalswidget.h"
 #include "ui_homewidget.h"
 #include "src/database/database.h"
@@ -38,23 +39,24 @@ HomeWidget::HomeWidget(QWidget *parent) :
     ui(new Ui::HomeWidget)
 {
     ui->setupUi(this);
-    today = QDate::currentDate();
-    ftlWarningThreshold = Settings::getFtlWarningThreshold();
-    currWarningThreshold = Settings::getCurrencyWarningThreshold();
+
     auto logo = QPixmap(OPL::Assets::LOGO);
     ui->logoLabel->setPixmap(logo);
     ui->welcomeLabel->setText(tr("Welcome to openPilotLog, %1!").arg(getLogbookOwnerName()));
 
-
-    limitationDisplayLabels = {
-        ui->TakeOffDisplayLabel,       ui->LandingsDisplayLabel,
-        ui->FlightTime28dDisplayLabel, ui->FlightTimeCalYearDisplayLabel,
-        ui->FlightTime12mDisplayLabel
-    };
+// 	today = QDate::currentDate();
+//    ftlWarningThreshold = Settings::getFtlWarningThreshold();
+//    currWarningThreshold = Settings::getCurrencyWarningThreshold();
+//    limitationDisplayLabels = {
+//        ui->TakeOffDisplayLabel,       ui->LandingsDisplayLabel,
+//        ui->FlightTime28dDisplayLabel, ui->FlightTimeCalYearDisplayLabel,
+//        ui->FlightTime12mDisplayLabel
+//    };
 
     fillTotals();
-    fillSelectedCurrencies();
-    fillLimitations();
+    fillCurrencies();
+//    fillSelectedCurrencies();
+//    fillLimitations();
 
     QObject::connect(DB,    &OPL::Database::dataBaseUpdated,
                      this,  &HomeWidget::onPilotsDatabaseChanged);
@@ -67,15 +69,15 @@ HomeWidget::~HomeWidget()
 
 void HomeWidget::refresh()
 {
-    const auto label_list = this->findChildren<QLabel *>();
-    for (const auto label : label_list)
-        label->setVisible(true);
-    for (const auto &label : qAsConst(limitationDisplayLabels))
-        label->setStyleSheet(QString());
-
-    fillTotals();
-    fillSelectedCurrencies();
-    fillLimitations();
+//    const auto label_list = this->findChildren<QLabel *>();
+//    for (const auto label : label_list)
+//        label->setVisible(true);
+//    for (const auto &label : qAsConst(limitationDisplayLabels))
+//        label->setStyleSheet(QString());
+
+//    fillTotals();
+//    fillSelectedCurrencies();
+//    fillLimitations();
 }
 
 void HomeWidget::onPilotsDatabaseChanged(const OPL::DbTable table)
@@ -99,37 +101,42 @@ void HomeWidget::changeEvent(QEvent *event)
 void HomeWidget::fillTotals()
 {
     auto tw = new TotalsWidget(TotalsWidget::TotalTimeWidget, this);
-    ui->totalsStackedWidget->addWidget(tw);
-    ui->totalsStackedWidget->setCurrentWidget(tw);
+    ui->tabWidget->insertTab(0, tw, tr("Totals"));
+}
+
+void HomeWidget::fillCurrencies()
+{
+    auto cw = new CurrencyWidget(this);
+    ui->tabWidget->insertTab(1, cw, tr("Currencies"));
 }
 
 void HomeWidget::fillCurrency(OPL::CurrencyEntry::Currency currency, QLabel* display_label)
 {
-    const auto currency_entry = DB->getCurrencyEntry(currency);
-
-    if (currency_entry.isValid()) {
-        // set label for custom currencies
-        if (currency == OPL::CurrencyEntry::Custom1) {
-            ui->currCustom1Label->setText(currency_entry.getDisplayName());
-        } else if (currency == OPL::CurrencyEntry::Custom2) {
-            ui->currCustom2Label->setText(currency_entry.getDisplayName());
-        }
-        // get date and set visible
-        const QDate date = currency_entry.getExpiryDate();
-        display_label->setText(date.toString(Qt::ISODate));
-        setLabelColour(display_label, Colour::None);
-
-        if (today >= date) {
-            // currency is expired
-            setLabelColour(display_label, Colour::Red);
-            return;
-        } else if (today.addDays(currWarningThreshold) >= date) {
-            // currency expires less than <currWarningThreshold> days from current Date
-            setLabelColour(display_label, Colour::Orange);
-        }
-    } else {
-        display_label->setText(tr("Invalid Date"));
-    }
+//    const auto currency_entry = DB->getCurrencyEntry(currency);
+
+//    if (currency_entry.isValid()) {
+//        // set label for custom currencies
+//        if (currency == OPL::CurrencyEntry::Custom1) {
+//            ui->currCustom1Label->setText(currency_entry.getDisplayName());
+//        } else if (currency == OPL::CurrencyEntry::Custom2) {
+//            ui->currCustom2Label->setText(currency_entry.getDisplayName());
+//        }
+//        // get date and set visible
+//        const QDate date = currency_entry.getExpiryDate();
+//        display_label->setText(date.toString(Qt::ISODate));
+//        setLabelColour(display_label, Colour::None);
+
+//        if (today >= date) {
+//            // currency is expired
+//            setLabelColour(display_label, Colour::Red);
+//            return;
+//        } else if (today.addDays(currWarningThreshold) >= date) {
+//            // currency expires less than <currWarningThreshold> days from current Date
+//            setLabelColour(display_label, Colour::Orange);
+//        }
+//    } else {
+//        display_label->setText(tr("Invalid Date"));
+//    }
 }
 
 /*!
@@ -138,26 +145,26 @@ void HomeWidget::fillCurrency(OPL::CurrencyEntry::Currency currency, QLabel* dis
  */
 void HomeWidget::fillSelectedCurrencies()
 {
-    fillCurrencyTakeOffLanding();
-
-    Settings::getShowCurrency(OPL::CurrencyEntry::Licence) ?
-                fillCurrency(OPL::CurrencyEntry::Licence, ui->currLicDisplayLabel)
-              : hideLabels(ui->currLicLabel, ui->currLicDisplayLabel);
-    Settings::getShowCurrency(OPL::CurrencyEntry::TypeRating) ?
-                fillCurrency(OPL::CurrencyEntry::TypeRating, ui->currTrDisplayLabel)
-              : hideLabels(ui->currTrLabel, ui->currTrDisplayLabel);
-    Settings::getShowCurrency(OPL::CurrencyEntry::LineCheck) ?
-                fillCurrency(OPL::CurrencyEntry::LineCheck, ui->currLckDisplayLabel)
-              : hideLabels(ui->currLckLabel, ui->currLckDisplayLabel);
-    Settings::getShowCurrency(OPL::CurrencyEntry::Medical) ?
-                fillCurrency(OPL::CurrencyEntry::Medical, ui->currMedDisplayLabel)
-              : hideLabels(ui->currMedLabel, ui->currMedDisplayLabel);
-    Settings::getShowCurrency(OPL::CurrencyEntry::Custom1) ?
-                fillCurrency(OPL::CurrencyEntry::Custom1, ui->currCustom1DisplayLabel)
-              : hideLabels(ui->currCustom1Label, ui->currCustom1DisplayLabel);
-    Settings::getShowCurrency(OPL::CurrencyEntry::Custom2) ?
-                fillCurrency(OPL::CurrencyEntry::Custom2, ui->currCustom2DisplayLabel)
-              : hideLabels(ui->currCustom2Label, ui->currCustom2DisplayLabel);
+//    fillCurrencyTakeOffLanding();
+
+//    Settings::getShowCurrency(OPL::CurrencyEntry::Licence) ?
+//                fillCurrency(OPL::CurrencyEntry::Licence, ui->currLicDisplayLabel)
+//              : hideLabels(ui->currLicLabel, ui->currLicDisplayLabel);
+//    Settings::getShowCurrency(OPL::CurrencyEntry::TypeRating) ?
+//                fillCurrency(OPL::CurrencyEntry::TypeRating, ui->currTrDisplayLabel)
+//              : hideLabels(ui->currTrLabel, ui->currTrDisplayLabel);
+//    Settings::getShowCurrency(OPL::CurrencyEntry::LineCheck) ?
+//                fillCurrency(OPL::CurrencyEntry::LineCheck, ui->currLckDisplayLabel)
+//              : hideLabels(ui->currLckLabel, ui->currLckDisplayLabel);
+//    Settings::getShowCurrency(OPL::CurrencyEntry::Medical) ?
+//                fillCurrency(OPL::CurrencyEntry::Medical, ui->currMedDisplayLabel)
+//              : hideLabels(ui->currMedLabel, ui->currMedDisplayLabel);
+//    Settings::getShowCurrency(OPL::CurrencyEntry::Custom1) ?
+//                fillCurrency(OPL::CurrencyEntry::Custom1, ui->currCustom1DisplayLabel)
+//              : hideLabels(ui->currCustom1Label, ui->currCustom1DisplayLabel);
+//    Settings::getShowCurrency(OPL::CurrencyEntry::Custom2) ?
+//                fillCurrency(OPL::CurrencyEntry::Custom2, ui->currCustom2DisplayLabel)
+//              : hideLabels(ui->currCustom2Label, ui->currCustom2DisplayLabel);
 }
 
 /*!
@@ -167,26 +174,26 @@ void HomeWidget::fillSelectedCurrencies()
  */
 void HomeWidget::fillCurrencyTakeOffLanding()
 {
-    const auto takeoff_landings = OPL::Statistics::countTakeOffLanding();
-    if(takeoff_landings.isEmpty())
-        return;
-
-    ui->TakeOffDisplayLabel->setText(takeoff_landings[0].toString());
-    if (takeoff_landings[0].toUInt() < 3)
-        setLabelColour(ui->TakeOffDisplayLabel, Colour::Red);
-    ui->LandingsDisplayLabel->setText(takeoff_landings[1].toString());
-    if (takeoff_landings[1].toUInt() < 3)
-        setLabelColour(ui->LandingsDisplayLabel, Colour::Red);
-
-    if (Settings::getShowCurrency(OPL::CurrencyEntry::TakeOffLanding)) {
-        QDate expiration_date = OPL::Statistics::currencyTakeOffLandingExpiry();
-        if (expiration_date <= QDate::currentDate())
-            setLabelColour(ui->currToLdgDisplayLabel, Colour::Red);
-        ui->currToLdgDisplayLabel->setText(expiration_date.toString(Qt::TextDate));
-    } else {
-        ui->currToLdgLabel->hide();
-        ui->currToLdgDisplayLabel->hide();
-    }
+//    const auto takeoff_landings = OPL::Statistics::countTakeOffLanding();
+//    if(takeoff_landings.isEmpty())
+//        return;
+
+//    ui->TakeOffDisplayLabel->setText(takeoff_landings[0].toString());
+//    if (takeoff_landings[0].toUInt() < 3)
+//        setLabelColour(ui->TakeOffDisplayLabel, Colour::Red);
+//    ui->LandingsDisplayLabel->setText(takeoff_landings[1].toString());
+//    if (takeoff_landings[1].toUInt() < 3)
+//        setLabelColour(ui->LandingsDisplayLabel, Colour::Red);
+
+//    if (Settings::getShowCurrency(OPL::CurrencyEntry::TakeOffLanding)) {
+//        QDate expiration_date = OPL::Statistics::currencyTakeOffLandingExpiry();
+//        if (expiration_date <= QDate::currentDate())
+//            setLabelColour(ui->currToLdgDisplayLabel, Colour::Red);
+//        ui->currToLdgDisplayLabel->setText(expiration_date.toString(Qt::TextDate));
+//    } else {
+//        ui->currToLdgLabel->hide();
+//        ui->currToLdgDisplayLabel->hide();
+//    }
 }
 
 /*!
@@ -195,29 +202,29 @@ void HomeWidget::fillCurrencyTakeOffLanding()
  */
 void HomeWidget::fillLimitations()
 {
-    int minutes = OPL::Statistics::totalTime(OPL::Statistics::TimeFrame::Rolling28Days);
-    ui->FlightTime28dDisplayLabel->setText(OPL::Time(minutes).toString());
-    if (minutes >= ROLLING_28_DAYS) {
-        setLabelColour(ui->FlightTime28dDisplayLabel, Colour::Red);
-    } else if (minutes >= ROLLING_28_DAYS * ftlWarningThreshold) {
-        setLabelColour(ui->FlightTime28dDisplayLabel, Colour::Orange);
-    }
-
-    minutes = OPL::Statistics::totalTime(OPL::Statistics::TimeFrame::Rolling12Months);
-    ui->FlightTime12mDisplayLabel->setText(OPL::Time(minutes).toString());
-    if (minutes >= ROLLING_12_MONTHS) {
-        setLabelColour(ui->FlightTime12mDisplayLabel, Colour::Red);
-    } else if (minutes >= ROLLING_12_MONTHS * ftlWarningThreshold) {
-        setLabelColour(ui->FlightTime12mDisplayLabel, Colour::Orange);
-    }
-
-    minutes = OPL::Statistics::totalTime(OPL::Statistics::TimeFrame::CalendarYear);
-    ui->FlightTimeCalYearDisplayLabel->setText(OPL::Time(minutes).toString());
-    if (minutes >= CALENDAR_YEAR) {
-        setLabelColour(ui->FlightTimeCalYearDisplayLabel, Colour::Red);
-    } else if (minutes >= CALENDAR_YEAR * ftlWarningThreshold) {
-        setLabelColour(ui->FlightTimeCalYearDisplayLabel, Colour::Orange);
-    }
+//    int minutes = OPL::Statistics::totalTime(OPL::Statistics::TimeFrame::Rolling28Days);
+//    ui->FlightTime28dDisplayLabel->setText(OPL::Time(minutes).toString());
+//    if (minutes >= ROLLING_28_DAYS) {
+//        setLabelColour(ui->FlightTime28dDisplayLabel, Colour::Red);
+//    } else if (minutes >= ROLLING_28_DAYS * ftlWarningThreshold) {
+//        setLabelColour(ui->FlightTime28dDisplayLabel, Colour::Orange);
+//    }
+
+//    minutes = OPL::Statistics::totalTime(OPL::Statistics::TimeFrame::Rolling12Months);
+//    ui->FlightTime12mDisplayLabel->setText(OPL::Time(minutes).toString());
+//    if (minutes >= ROLLING_12_MONTHS) {
+//        setLabelColour(ui->FlightTime12mDisplayLabel, Colour::Red);
+//    } else if (minutes >= ROLLING_12_MONTHS * ftlWarningThreshold) {
+//        setLabelColour(ui->FlightTime12mDisplayLabel, Colour::Orange);
+//    }
+
+//    minutes = OPL::Statistics::totalTime(OPL::Statistics::TimeFrame::CalendarYear);
+//    ui->FlightTimeCalYearDisplayLabel->setText(OPL::Time(minutes).toString());
+//    if (minutes >= CALENDAR_YEAR) {
+//        setLabelColour(ui->FlightTimeCalYearDisplayLabel, Colour::Red);
+//    } else if (minutes >= CALENDAR_YEAR * ftlWarningThreshold) {
+//        setLabelColour(ui->FlightTimeCalYearDisplayLabel, Colour::Orange);
+//    }
 }
 
 const QString HomeWidget::getLogbookOwnerName()

+ 1 - 0
src/gui/widgets/homewidget.h

@@ -62,6 +62,7 @@ private:
     double ftlWarningThreshold;
 
     void fillTotals();
+    void fillCurrencies();
     void fillSelectedCurrencies();
     void fillCurrencyTakeOffLanding();
     void fillCurrency(OPL::CurrencyEntry::Currency currency, QLabel *display_label);

+ 8 - 394
src/gui/widgets/homewidget.ui

@@ -6,396 +6,24 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>1087</width>
-    <height>777</height>
+    <width>670</width>
+    <height>442</height>
    </rect>
   </property>
   <property name="windowTitle">
    <string>Form</string>
   </property>
-  <layout class="QGridLayout" name="gridLayout_4">
-   <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="10" 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="font">
-        <font>
-         <bold>true</bold>
-        </font>
-       </property>
-       <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="font">
-        <font>
-         <bold>true</bold>
-        </font>
-       </property>
-       <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="currToLdgLabel">
-       <property name="font">
-        <font>
-         <italic>false</italic>
-        </font>
-       </property>
-       <property name="text">
-        <string>Take-Off / Landing</string>
-       </property>
-      </widget>
-     </item>
-     <item row="2" column="1">
-      <widget class="QLabel" name="currToLdgDisplayLabel">
-       <property name="font">
-        <font>
-         <bold>true</bold>
-        </font>
-       </property>
-       <property name="text">
-        <string/>
-       </property>
-       <property name="alignment">
-        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-       </property>
-      </widget>
-     </item>
-     <item row="3" column="0">
-      <widget class="QLabel" name="currLicLabel">
-       <property name="font">
-        <font>
-         <italic>false</italic>
-        </font>
-       </property>
-       <property name="text">
-        <string>Licence</string>
-       </property>
-      </widget>
-     </item>
-     <item row="3" column="1">
-      <widget class="QLabel" name="currLicDisplayLabel">
-       <property name="font">
-        <font>
-         <bold>true</bold>
-        </font>
-       </property>
-       <property name="text">
-        <string/>
-       </property>
-       <property name="alignment">
-        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-       </property>
-      </widget>
-     </item>
-     <item row="4" column="0">
-      <widget class="QLabel" name="currTrLabel">
-       <property name="font">
-        <font>
-         <italic>false</italic>
-        </font>
-       </property>
-       <property name="text">
-        <string>Type Rating</string>
-       </property>
-      </widget>
-     </item>
-     <item row="4" column="1">
-      <widget class="QLabel" name="currTrDisplayLabel">
-       <property name="font">
-        <font>
-         <bold>true</bold>
-        </font>
-       </property>
-       <property name="text">
-        <string/>
-       </property>
-       <property name="alignment">
-        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-       </property>
-      </widget>
-     </item>
-     <item row="5" column="0">
-      <widget class="QLabel" name="currLckLabel">
-       <property name="font">
-        <font>
-         <italic>false</italic>
-        </font>
-       </property>
-       <property name="text">
-        <string>Line Check</string>
-       </property>
-      </widget>
-     </item>
-     <item row="5" column="1">
-      <widget class="QLabel" name="currLckDisplayLabel">
-       <property name="font">
-        <font>
-         <bold>true</bold>
-        </font>
-       </property>
-       <property name="text">
-        <string/>
-       </property>
-       <property name="alignment">
-        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-       </property>
-      </widget>
-     </item>
-     <item row="6" column="0">
-      <widget class="QLabel" name="currMedLabel">
-       <property name="font">
-        <font>
-         <italic>false</italic>
-        </font>
-       </property>
-       <property name="text">
-        <string>Medical</string>
-       </property>
-      </widget>
-     </item>
-     <item row="6" column="1">
-      <widget class="QLabel" name="currMedDisplayLabel">
-       <property name="font">
-        <font>
-         <bold>true</bold>
-        </font>
-       </property>
-       <property name="text">
-        <string/>
-       </property>
-       <property name="alignment">
-        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-       </property>
-      </widget>
-     </item>
-     <item row="7" column="0">
-      <widget class="QLabel" name="currCustom1Label">
-       <property name="font">
-        <font>
-         <italic>false</italic>
-        </font>
-       </property>
-       <property name="text">
-        <string>Custom1</string>
-       </property>
-      </widget>
-     </item>
-     <item row="7" column="1">
-      <widget class="QLabel" name="currCustom1DisplayLabel">
-       <property name="font">
-        <font>
-         <bold>true</bold>
-        </font>
-       </property>
-       <property name="text">
-        <string/>
-       </property>
-       <property name="alignment">
-        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-       </property>
-      </widget>
-     </item>
-     <item row="8" column="0">
-      <widget class="QLabel" name="currCustom2Label">
-       <property name="font">
-        <font>
-         <italic>false</italic>
-        </font>
-       </property>
-       <property name="text">
-        <string>Custom2</string>
-       </property>
-      </widget>
-     </item>
-     <item row="8" column="1">
-      <widget class="QLabel" name="currCustom2DisplayLabel">
-       <property name="font">
-        <font>
-         <bold>true</bold>
-        </font>
-       </property>
-       <property name="text">
-        <string/>
-       </property>
-       <property name="alignment">
-        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-       </property>
-      </widget>
-     </item>
-    </layout>
-   </item>
-   <item row="9" column="0">
-    <widget class="Line" name="line_4">
-     <property name="orientation">
-      <enum>Qt::Horizontal</enum>
-     </property>
-    </widget>
-   </item>
-   <item row="8" column="0">
-    <widget class="QLabel" name="currencyLabel">
-     <property name="font">
-      <font>
-       <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="12" column="0">
-    <widget class="Line" name="line_3">
-     <property name="orientation">
-      <enum>Qt::Horizontal</enum>
-     </property>
-    </widget>
-   </item>
-   <item row="5" column="0">
-    <widget class="QLabel" name="totalsLabel">
-     <property name="font">
-      <font>
-       <bold>true</bold>
-      </font>
-     </property>
-     <property name="text">
-      <string>Your Totals</string>
-     </property>
-     <property name="alignment">
-      <set>Qt::AlignBottom|Qt::AlignHCenter</set>
-     </property>
-    </widget>
-   </item>
-   <item row="4" column="0">
-    <widget class="Line" name="line_7">
-     <property name="orientation">
-      <enum>Qt::Horizontal</enum>
-     </property>
-    </widget>
-   </item>
+  <layout class="QGridLayout" name="gridLayout">
    <item row="0" column="0">
     <widget class="QLabel" name="logoLabel">
      <property name="text">
-      <string/>
+      <string>[openPilotLog Logo]</string>
      </property>
      <property name="alignment">
       <set>Qt::AlignCenter</set>
      </property>
     </widget>
    </item>
-   <item row="6" column="0">
-    <widget class="Line" name="line">
-     <property name="orientation">
-      <enum>Qt::Horizontal</enum>
-     </property>
-    </widget>
-   </item>
-   <item row="2" column="0">
-    <widget class="Line" name="line_2">
-     <property name="orientation">
-      <enum>Qt::Horizontal</enum>
-     </property>
-    </widget>
-   </item>
    <item row="1" column="0">
     <widget class="QLabel" name="welcomeLabel">
      <property name="text">
@@ -406,27 +34,13 @@
      </property>
     </widget>
    </item>
-   <item row="11" column="0">
-    <widget class="QLabel" name="limitationsLabel">
-     <property name="font">
-      <font>
-       <bold>true</bold>
-      </font>
-     </property>
-     <property name="text">
-      <string>Limitations</string>
-     </property>
-     <property name="alignment">
-      <set>Qt::AlignBottom|Qt::AlignHCenter</set>
+   <item row="2" column="0">
+    <widget class="QTabWidget" name="tabWidget">
+     <property name="currentIndex">
+      <number>-1</number>
      </property>
     </widget>
    </item>
-   <item row="7" column="0">
-    <widget class="QStackedWidget" name="totalsStackedWidget">
-     <widget class="QWidget" name="page"/>
-     <widget class="QWidget" name="page_2"/>
-    </widget>
-   </item>
   </layout>
  </widget>
  <resources/>

+ 525 - 529
src/gui/widgets/totalswidget.ui

@@ -15,535 +15,531 @@
   </property>
   <layout class="QGridLayout" name="gridLayout">
    <item row="0" column="0">
-    <layout class="QGridLayout" name="gridLayout_3">
-     <item row="2" column="2">
-      <widget class="QLabel" name="nightLabel_2">
-       <property name="maximumSize">
-        <size>
-         <width>120</width>
-         <height>16777215</height>
-        </size>
-       </property>
-       <property name="text">
-        <string>Night</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="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::TabFocus</enum>
-       </property>
-       <property name="text">
-        <string>0</string>
-       </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="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::TabFocus</enum>
-       </property>
-       <property name="text">
-        <string>0</string>
-       </property>
-      </widget>
-     </item>
-     <item row="3" column="1">
-      <widget class="QLineEdit" name="tMPLineEdit">
-       <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::TabFocus</enum>
-       </property>
-      </widget>
-     </item>
-     <item row="7" column="1">
-      <widget class="QLineEdit" name="tFILineEdit">
-       <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::TabFocus</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="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="1" column="1">
-      <widget class="QLineEdit" name="tSPSELineEdit">
-       <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::TabFocus</enum>
-       </property>
-      </widget>
-     </item>
-     <item row="5" column="1">
-      <widget class="QLineEdit" name="tSICLineEdit">
-       <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::TabFocus</enum>
-       </property>
-      </widget>
-     </item>
-     <item row="6" column="1">
-      <widget class="QLineEdit" name="tDUALLineEdit">
-       <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::TabFocus</enum>
-       </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::TabFocus</enum>
-       </property>
-       <property name="text">
-        <string>0</string>
-       </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="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="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="0" column="3">
-      <widget class="QLineEdit" name="tPICUSLineEdit">
-       <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::TabFocus</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="2" column="3">
-      <widget class="QLineEdit" name="tNIGHTLineEdit">
-       <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::TabFocus</enum>
-       </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::TabFocus</enum>
-       </property>
-       <property name="text">
-        <string>0</string>
-       </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="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="tSIMLineEdit">
-       <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::TabFocus</enum>
-       </property>
-      </widget>
-     </item>
-     <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="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="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="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="0" column="1">
-      <widget class="QLineEdit" name="tblkLineEdit">
-       <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::TabFocus</enum>
-       </property>
-       <property name="text">
-        <string/>
-       </property>
-      </widget>
-     </item>
-     <item row="1" column="3">
-      <widget class="QLineEdit" name="tIFRLineEdit">
-       <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::TabFocus</enum>
-       </property>
-      </widget>
-     </item>
-     <item row="2" column="1">
-      <widget class="QLineEdit" name="tSPMELineEdit">
-       <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::TabFocus</enum>
-       </property>
-      </widget>
-     </item>
-     <item row="4" column="1">
-      <widget class="QLineEdit" name="tPICLineEdit">
-       <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::TabFocus</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>
-    </layout>
+    <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="tblkLineEdit">
+     <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::TabFocus</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="tPICUSLineEdit">
+     <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::TabFocus</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="tSPSELineEdit">
+     <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::TabFocus</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="tIFRLineEdit">
+     <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::TabFocus</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="tSPMELineEdit">
+     <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::TabFocus</enum>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="2">
+    <widget class="QLabel" name="nightLabel_2">
+     <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="tNIGHTLineEdit">
+     <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::TabFocus</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="tMPLineEdit">
+     <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::TabFocus</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="tSIMLineEdit">
+     <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::TabFocus</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="tPICLineEdit">
+     <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::TabFocus</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::TabFocus</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="tSICLineEdit">
+     <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::TabFocus</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::TabFocus</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="tDUALLineEdit">
+     <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::TabFocus</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::TabFocus</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="1">
+    <widget class="QLineEdit" name="tFILineEdit">
+     <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::TabFocus</enum>
+     </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::TabFocus</enum>
+     </property>
+     <property name="text">
+      <string>0</string>
+     </property>
+    </widget>
    </item>
   </layout>
  </widget>