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.
		
		
		
		
			
				
					61 lines
				
				1.0 KiB
			
		
		
			
		
	
	
					61 lines
				
				1.0 KiB
			| 
								 
											5 years ago
										 
									 | 
							
								#pragma once
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								#include <QFrame>
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								#include <QLabel>
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								#include <QPushButton>
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								#include <QStackedLayout>
							 | 
						||
| 
								 | 
							
								#include <QTimer>
							 | 
						||
| 
								 | 
							
								#include <QWidget>
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								#include "sidebar.h"
							 | 
						||
| 
								 | 
							
								#include "onroad.h"
							 | 
						||
| 
								 | 
							
								#include "ui/ui.h"
							 | 
						||
| 
								 | 
							
								#include "widgets/offroad_alerts.h"
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								class OffroadHome : public QFrame {
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								  Q_OBJECT
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								public:
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								  explicit OffroadHome(QWidget* parent = 0);
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 | 
							
								private:
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								  QTimer* timer;
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								  QLabel* date;
							 | 
						||
| 
								 | 
							
								  QStackedLayout* center_layout;
							 | 
						||
| 
								 | 
							
								  OffroadAlert* alerts_widget;
							 | 
						||
| 
								 | 
							
								  QPushButton* alert_notification;
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 | 
							
								public slots:
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								  void closeAlerts();
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								  void openAlerts();
							 | 
						||
| 
								 | 
							
								  void refresh();
							 | 
						||
| 
								 | 
							
								};
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								class HomeWindow : public QWidget {
							 | 
						||
| 
								 | 
							
								  Q_OBJECT
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								public:
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								  explicit HomeWindow(QWidget* parent = 0);
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 | 
							
								signals:
							 | 
						||
| 
								 | 
							
								  void openSettings();
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								  void closeSettings();
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 | 
							
								  // forwarded signals
							 | 
						||
| 
								 | 
							
								  void displayPowerChanged(bool on);
							 | 
						||
| 
								 | 
							
								  void update(const UIState &s);
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								public slots:
							 | 
						||
| 
								 | 
							
								  void offroadTransition(bool offroad);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								protected:
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								  void mousePressEvent(QMouseEvent* e) override;
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 | 
							
								private:
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								  Sidebar *sidebar;
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								  OffroadHome *home;
							 | 
						||
| 
								 | 
							
								  OnroadWindow *onroad;
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								  QStackedLayout *slayout;
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								};
							 |