Vehicle Researcher 4fca6dec8e openpilot v0.9.8 release
date: 2025-01-29T09:09:56
master commit: 227bb68e1891619b360b89809e6822d50d34228f
2025-01-29 09:09:58 +00:00

29 lines
593 B
C++

#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 &center, const QPixmap &img, const QBrush &bg, float opacity);