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.
		
		
		
		
		
			
		
			
				
					
					
						
							28 lines
						
					
					
						
							593 B
						
					
					
				
			
		
		
	
	
							28 lines
						
					
					
						
							593 B
						
					
					
				| #pragma once
 | |
| 
 | |
| #include <QPushButton>
 | |
| 
 | |
| #include "selfdrive/ui/ui.h"
 | |
| 
 | |
| const int btn_size = 192;
 | |
| const int img_size = (btn_size / 4) * 3;
 | |
| 
 | |
| class ExperimentalButton : public QPushButton {
 | |
|   Q_OBJECT
 | |
| 
 | |
| public:
 | |
|   explicit ExperimentalButton(QWidget *parent = 0);
 | |
|   void updateState(const UIState &s);
 | |
| 
 | |
| private:
 | |
|   void paintEvent(QPaintEvent *event) override;
 | |
|   void changeMode();
 | |
| 
 | |
|   Params params;
 | |
|   QPixmap engage_img;
 | |
|   QPixmap experimental_img;
 | |
|   bool experimental_mode;
 | |
|   bool engageable;
 | |
| };
 | |
| 
 | |
| void drawIcon(QPainter &p, const QPoint ¢er, const QPixmap &img, const QBrush &bg, float opacity);
 | |
| 
 |