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.
		
		
		
		
		
			
		
			
				
					
					
						
							71 lines
						
					
					
						
							1.4 KiB
						
					
					
				
			
		
		
	
	
							71 lines
						
					
					
						
							1.4 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 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;
 | 
						|
};
 | 
						|
 | 
						|
class DevicePanel : public ListWidget {
 | 
						|
  Q_OBJECT
 | 
						|
public:
 | 
						|
  explicit DevicePanel(QWidget* parent = nullptr);
 | 
						|
signals:
 | 
						|
  void reviewTrainingGuide();
 | 
						|
  void showDriverView();
 | 
						|
};
 | 
						|
 | 
						|
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;
 | 
						|
 | 
						|
  Params params;
 | 
						|
  QFileSystemWatcher *fs_watch;
 | 
						|
};
 | 
						|
 |