ui for tetoo

This commit is contained in:
Rick Lan
2024-07-06 18:33:02 +08:00
parent f9ff917bc6
commit 79733f5a63
3 changed files with 12 additions and 1 deletions
@@ -47,6 +47,7 @@ AnnotatedCameraWidget::AnnotatedCameraWidget(VisionStreamType type, QWidget* par
rainbow_path = new RainbowPath;
flight_panel = new FlightPanel;
chevron_ext = new ChevronExt;
tt_indicator = new TeTooIndicator;
#endif
}
@@ -94,6 +95,7 @@ void AnnotatedCameraWidget::updateState(const UIState &s) {
rainbow_path->update_states(s);
flight_panel->update_states(s, is_metric);
chevron_ext->update_states(s, is_metric);
tt_indicator->update_states(s, is_metric);
#endif
}
@@ -145,6 +147,11 @@ void AnnotatedCameraWidget::drawHud(QPainter &p) {
p.setFont(InterFont(66));
drawText(p, rect().center().x(), 290, speedUnit, 200);
#ifdef DP
tt_indicator->paint_speed_camera(p, rect());
tt_indicator->paint_maxspeed(p, set_speed_rect.topRight());
#endif
p.restore();
}
@@ -395,6 +402,7 @@ void AnnotatedCameraWidget::paintGL() {
update_model(s, model);
#ifdef DP
tt_indicator->paint_road_name(painter, rect().left(), rect().bottom(), rect().width());
flight_panel->paint(painter, width(), height());
#endif
+2 -1
View File
@@ -44,7 +44,8 @@ private:
PersonalityButton *personality_btn;
KnightScanner *knight_scanner;
RainbowPath *rainbow_path;
ChevronExt * chevron_ext;
ChevronExt *chevron_ext;
TeTooIndicator *tt_indicator;
#endif
protected:
+2
View File
@@ -252,6 +252,8 @@ UIState::UIState(QObject *parent) : QObject(parent) {
"carControl", "controlsStateExt",
// de2e
"longitudinalPlanExt",
// TeToo
"teToo",
});
Params params;