nav: add page to settings (#21208)
	
		
	
				
					
				
			* add navigation panel to settings
* am/pm display and dynamic width
old-commit-hash: 3c197953bc
			
			
				vw-mqb-aeb
			
			
		
							parent
							
								
									133723680b
								
							
						
					
					
						commit
						ba1a20414e
					
				
				 7 changed files with 62 additions and 13 deletions
			
			
		| @ -0,0 +1,20 @@ | |||||||
|  | #include "map_settings.h" | ||||||
|  | 
 | ||||||
|  | #include "selfdrive/ui/qt/widgets/controls.h" | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | MapPanel::MapPanel(QWidget* parent) : QWidget(parent) { | ||||||
|  |   QVBoxLayout *layout = new QVBoxLayout; | ||||||
|  |   Params params = Params(); | ||||||
|  | 
 | ||||||
|  |   QString dongle = QString::fromStdString(params.get("DongleId", false)); | ||||||
|  |   // TODO: Add buttons for home/work shortcuts
 | ||||||
|  | 
 | ||||||
|  |   layout->addWidget(new ParamControl("NavSettingTime24h", | ||||||
|  |                                     "Show ETA in 24h format", | ||||||
|  |                                     "Use 24h format instead of am/pm", | ||||||
|  |                                     "", | ||||||
|  |                                     this)); | ||||||
|  |   layout->addStretch(); | ||||||
|  |   setLayout(layout); | ||||||
|  | } | ||||||
| @ -0,0 +1,8 @@ | |||||||
|  | #pragma once | ||||||
|  | #include <QWidget> | ||||||
|  | 
 | ||||||
|  | class MapPanel : public QWidget { | ||||||
|  |   Q_OBJECT | ||||||
|  | public: | ||||||
|  |   explicit MapPanel(QWidget* parent = nullptr); | ||||||
|  | }; | ||||||
					Loading…
					
					
				
		Reference in new issue