You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
1.0 KiB
61 lines
1.0 KiB
4 years ago
|
#pragma once
|
||
|
|
||
4 years ago
|
#include <QFrame>
|
||
4 years ago
|
#include <QLabel>
|
||
4 years ago
|
#include <QPushButton>
|
||
4 years ago
|
#include <QStackedLayout>
|
||
|
#include <QTimer>
|
||
|
#include <QWidget>
|
||
4 years ago
|
|
||
4 years ago
|
#include "sidebar.h"
|
||
|
#include "onroad.h"
|
||
|
#include "ui/ui.h"
|
||
|
#include "widgets/offroad_alerts.h"
|
||
4 years ago
|
|
||
4 years ago
|
class OffroadHome : public QFrame {
|
||
4 years ago
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
4 years ago
|
explicit OffroadHome(QWidget* parent = 0);
|
||
4 years ago
|
|
||
|
private:
|
||
4 years ago
|
QTimer* timer;
|
||
4 years ago
|
|
||
4 years ago
|
QLabel* date;
|
||
|
QStackedLayout* center_layout;
|
||
|
OffroadAlert* alerts_widget;
|
||
|
QPushButton* alert_notification;
|
||
4 years ago
|
|
||
|
public slots:
|
||
4 years ago
|
void closeAlerts();
|
||
4 years ago
|
void openAlerts();
|
||
|
void refresh();
|
||
|
};
|
||
|
|
||
4 years ago
|
class HomeWindow : public QWidget {
|
||
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
4 years ago
|
explicit HomeWindow(QWidget* parent = 0);
|
||
4 years ago
|
|
||
|
signals:
|
||
|
void openSettings();
|
||
4 years ago
|
void closeSettings();
|
||
4 years ago
|
|
||
|
// forwarded signals
|
||
|
void displayPowerChanged(bool on);
|
||
|
void update(const UIState &s);
|
||
4 years ago
|
|
||
4 years ago
|
public slots:
|
||
|
void offroadTransition(bool offroad);
|
||
|
|
||
4 years ago
|
protected:
|
||
4 years ago
|
void mousePressEvent(QMouseEvent* e) override;
|
||
4 years ago
|
|
||
|
private:
|
||
4 years ago
|
Sidebar *sidebar;
|
||
4 years ago
|
OffroadHome *home;
|
||
|
OnroadWindow *onroad;
|
||
4 years ago
|
QStackedLayout *slayout;
|
||
4 years ago
|
};
|