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.
78 lines
1.5 KiB
78 lines
1.5 KiB
#pragma once
|
|
|
|
#include <QButtonGroup>
|
|
#include <QFileSystemWatcher>
|
|
#include <QFrame>
|
|
#include <QLabel>
|
|
#include <QPushButton>
|
|
#include <QStackedWidget>
|
|
#include <QWidget>
|
|
|
|
|
|
#include "selfdrive/ui/qt/widgets/controls.h"
|
|
|
|
// ********** settings window + top-level panels **********
|
|
class SettingsWindow : public QFrame {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit SettingsWindow(QWidget *parent = 0);
|
|
|
|
protected:
|
|
void showEvent(QShowEvent *event) override;
|
|
|
|
signals:
|
|
void closeSettings();
|
|
void reviewTrainingGuide();
|
|
void showDriverView();
|
|
|
|
private:
|
|
QPushButton *sidebar_alert_widget;
|
|
QWidget *sidebar_widget;
|
|
QButtonGroup *nav_btns;
|
|
QStackedWidget *panel_widget;
|
|
};
|
|
|
|
class DevicePanel : public ListWidget {
|
|
Q_OBJECT
|
|
public:
|
|
explicit DevicePanel(SettingsWindow *parent);
|
|
signals:
|
|
void reviewTrainingGuide();
|
|
void showDriverView();
|
|
|
|
private slots:
|
|
void poweroff();
|
|
void reboot();
|
|
void updateCalibDescription();
|
|
|
|
private:
|
|
Params params;
|
|
};
|
|
|
|
class TogglesPanel : public ListWidget {
|
|
Q_OBJECT
|
|
public:
|
|
explicit TogglesPanel(SettingsWindow *parent);
|
|
};
|
|
|
|
class SoftwarePanel : public ListWidget {
|
|
Q_OBJECT
|
|
public:
|
|
explicit SoftwarePanel(QWidget* parent = nullptr);
|
|
|
|
private:
|
|
void showEvent(QShowEvent *event) override;
|
|
void updateLabels();
|
|
|
|
LabelControl *gitBranchLbl;
|
|
LabelControl *gitCommitLbl;
|
|
LabelControl *osVersionLbl;
|
|
LabelControl *versionLbl;
|
|
LabelControl *lastUpdateLbl;
|
|
ButtonControl *updateBtn;
|
|
ButtonControl *branchSwitcherBtn;
|
|
|
|
Params params;
|
|
QFileSystemWatcher *fs_watch;
|
|
};
|
|
|