123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- #include "homewidget.h"
- #include "ui_homewidget.h"
- #include "calc.h"
- #include "dbstat.h"
- #include "dbpilots.h"
- #include <QDebug>
- homeWidget::homeWidget(QWidget *parent) :
- QWidget(parent),
- ui(new Ui::homeWidget)
- {
- ui->setupUi(this);
- qDebug() << "homeWidget: Activated";
-
- ui->totalTimeDisplayLabel->setText(calc::minutes_to_string(dbStat::retreiveTotalTime()));
- QString blockMinutesThisYear = dbStat::retreiveTotalTimeThisCalendarYear();
- ui->blockHoursCalDisplayLabel->setText(calc::minutes_to_string(blockMinutesThisYear));
- if (blockMinutesThisYear.toInt() > 900*60) {
- qDebug() << "More than 900 block hours this calendar year!";
-
- }
- QString blockMinutesRollingYear = dbStat::retreiveTotalTimeRollingYear();
- ui->blockHoursRolDisplayLabel->setText(calc::minutes_to_string(blockMinutesRollingYear));
- QVector<QString> currency = dbStat::retreiveCurrencyTakeoffLanding();
- ui->currencyDisplayLabel->setText(currency[0] + " Take Offs\n" + currency[1] + " Landings");
- if (currency[0].toInt() < 3 || currency[1].toInt() < 3){
- qDebug() << "Less than 3 TO/LDG in last 90 days!";
-
- }
- }
- homeWidget::~homeWidget()
- {
- delete ui;
- }
- void homeWidget::on_debugButton_clicked()
- {
- qDebug() << "Debug: ";
- dbPilots::retreivePilotList();
- }
|