homewidget.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. *openPilotLog - A FOSS Pilot Logbook Application
  3. *Copyright (C) 2020-2021 Felix Turowsky
  4. *
  5. *This program is free software: you can redistribute it and/or modify
  6. *it under the terms of the GNU General Public License as published by
  7. *the Free Software Foundation, either version 3 of the License, or
  8. *(at your option) any later version.
  9. *
  10. *This program is distributed in the hope that it will be useful,
  11. *but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. *GNU General Public License for more details.
  14. *
  15. *You should have received a copy of the GNU General Public License
  16. *along with this program. If not, see <https://www.gnu.org/licenses/>.
  17. */
  18. #ifndef HOMEWIDGET_H
  19. #define HOMEWIDGET_H
  20. #include <QWidget>
  21. #include <QStackedLayout>
  22. #include <QLabel>
  23. #include <QLineEdit>
  24. #include <QSettings>
  25. #include "src/functions/astat.h"
  26. #include "src/database/adatabase.h"
  27. namespace Ui {
  28. class HomeWidget;
  29. }
  30. class HomeWidget : public QWidget
  31. {
  32. Q_OBJECT
  33. public:
  34. explicit HomeWidget(QWidget *parent = nullptr);
  35. ~HomeWidget();
  36. private:
  37. Ui::HomeWidget *ui;
  38. void fillTotals();
  39. void fillCurrency();
  40. void fillLimitations();
  41. /*!
  42. * \brief Retreives the users first name from the database.
  43. */
  44. const QString userName();
  45. public slots:
  46. void onHomeWidget_dataBaseUpdated();
  47. };
  48. #endif // HOMEWIDGET_H