mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-07-21 08:12:08 +08:00
5b29fd0f2c
* Screen Timeout Fixes * rename * auto type --------- Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
33 lines
800 B
C++
33 lines
800 B
C++
#pragma once
|
|
|
|
#include <QStackedLayout>
|
|
#include <QWidget>
|
|
|
|
#include "selfdrive/ui/qt/home.h"
|
|
#include "selfdrive/ui/qt/offroad/onboarding.h"
|
|
#include "selfdrive/ui/qt/offroad/settings.h"
|
|
|
|
#ifdef SUNNYPILOT
|
|
#include "selfdrive/ui/sunnypilot/ui.h"
|
|
#endif
|
|
|
|
class MainWindow : public QWidget {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit MainWindow(QWidget *parent = 0) : MainWindow(parent, nullptr, nullptr) {}
|
|
|
|
protected:
|
|
explicit MainWindow(QWidget *parent, HomeWindow *hw = nullptr, SettingsWindow *sw = nullptr);
|
|
HomeWindow *homeWindow;
|
|
SettingsWindow *settingsWindow;
|
|
virtual void closeSettings();
|
|
|
|
private:
|
|
bool eventFilter(QObject *obj, QEvent *event) override;
|
|
void openSettings(int index = 0, const QString ¶m = "");
|
|
|
|
QStackedLayout *main_layout;
|
|
OnboardingWindow *onboardingWindow;
|
|
};
|