From 86fa1734084b0eaf6837596bd010d6769101e3d4 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 17 May 2024 11:27:44 -0500 Subject: [PATCH] wip --- selfdrive/ui/qt/onroad.cc | 50 +++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/selfdrive/ui/qt/onroad.cc b/selfdrive/ui/qt/onroad.cc index e5fbfa4..8e5c7a5 100755 --- a/selfdrive/ui/qt/onroad.cc +++ b/selfdrive/ui/qt/onroad.cc @@ -14,32 +14,32 @@ #include "common/timing.h" #include "selfdrive/ui/qt/util.h" -static void drawIcon(QPainter &p, const QPoint ¢er, const QPixmap &img, const QBrush &bg, float opacity, const int angle = 0) { - p.setRenderHint(QPainter::Antialiasing); - p.setOpacity(1.0); // bg dictates opacity of ellipse - p.setPen(Qt::NoPen); - p.setBrush(bg); - p.drawEllipse(center, btn_size / 2, btn_size / 2); - p.save(); - p.translate(center); - p.rotate(-angle); - p.setOpacity(opacity); - p.drawPixmap(-QPoint(img.width() / 2, img.height() / 2), img); - p.setOpacity(1.0); - p.restore(); -} +// static void drawIcon(QPainter &p, const QPoint ¢er, const QPixmap &img, const QBrush &bg, float opacity, const int angle = 0) { +// p.setRenderHint(QPainter::Antialiasing); +// p.setOpacity(1.0); // bg dictates opacity of ellipse +// p.setPen(Qt::NoPen); +// p.setBrush(bg); +// p.drawEllipse(center, btn_size / 2, btn_size / 2); +// p.save(); +// p.translate(center); +// p.rotate(-angle); +// p.setOpacity(opacity); +// p.drawPixmap(-QPoint(img.width() / 2, img.height() / 2), img); +// p.setOpacity(1.0); +// p.restore(); +// } -static void drawIconGif(QPainter &p, const QPoint ¢er, const QMovie &img, const QBrush &bg, float opacity) { - p.setRenderHint(QPainter::Antialiasing); - p.setOpacity(1.0); // bg dictates opacity of ellipse - p.setPen(Qt::NoPen); - p.setBrush(bg); - p.drawEllipse(center.x() - btn_size / 2, center.y() - btn_size / 2, btn_size, btn_size); - p.setOpacity(opacity); - QPixmap currentFrame = img.currentPixmap(); - p.drawPixmap(center - QPoint(currentFrame.width() / 2, currentFrame.height() / 2), currentFrame); - p.setOpacity(1.0); -} +// static void drawIconGif(QPainter &p, const QPoint ¢er, const QMovie &img, const QBrush &bg, float opacity) { +// p.setRenderHint(QPainter::Antialiasing); +// p.setOpacity(1.0); // bg dictates opacity of ellipse +// p.setPen(Qt::NoPen); +// p.setBrush(bg); +// p.drawEllipse(center.x() - btn_size / 2, center.y() - btn_size / 2, btn_size, btn_size); +// p.setOpacity(opacity); +// QPixmap currentFrame = img.currentPixmap(); +// p.drawPixmap(center - QPoint(currentFrame.width() / 2, currentFrame.height() / 2), currentFrame); +// p.setOpacity(1.0); +// } OnroadWindow::OnroadWindow(QWidget *parent) : QWidget(parent), scene(uiState()->scene) { QVBoxLayout *main_layout = new QVBoxLayout(this);