openpilot is an open source driver assistance system. openpilot performs the functions of Automated Lane Centering and Adaptive Cruise Control for over 200 supported car makes and models.
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.
 
 
 
 
 
 

72 lines
1.4 KiB

#pragma once
#include <QButtonGroup>
#include <QFileSystemWatcher>
#include <QFrame>
#include <QLabel>
#include <QPushButton>
#include <QScrollArea>
#include <QStackedWidget>
#include <QTimer>
#include <QWidget>
#include "selfdrive/ui/qt/widgets/controls.h"
// ********** settings window + top-level panels **********
class DevicePanel : public QWidget {
Q_OBJECT
public:
explicit DevicePanel(QWidget* parent = nullptr);
signals:
void reviewTrainingGuide();
void showDriverView();
};
class TogglesPanel : public QWidget {
Q_OBJECT
public:
explicit TogglesPanel(QWidget *parent = nullptr);
};
class SoftwarePanel : public QFrame {
Q_OBJECT
public:
explicit SoftwarePanel(QWidget* parent = nullptr);
protected:
void showEvent(QShowEvent *event) override;
private:
QList<LabelControl *> labels;
LabelControl *versionLbl;
LabelControl *lastUpdateTimeLbl;
ButtonControl *updateButton;
void updateLabels();
QFileSystemWatcher *fs_watch;
};
class SettingsWindow : public QFrame {
Q_OBJECT
public:
explicit SettingsWindow(QWidget *parent = 0);
protected:
void hideEvent(QHideEvent *event) override;
void showEvent(QShowEvent *event) override;
signals:
void closeSettings();
void offroadTransition(bool offroad);
void reviewTrainingGuide();
void showDriverView();
private:
QPushButton *sidebar_alert_widget;
QWidget *sidebar_widget;
QButtonGroup *nav_btns;
QStackedWidget *panel_widget;
};