wip
This commit is contained in:
@@ -504,7 +504,7 @@ void AnnotatedCameraWidget::drawHud(QPainter &p) {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
void AnnotatedCameraWidget::drawSpeedWidget(QPainter &p, int x, int y, QString title, QString text, QColor colorSpeed) {
|
void AnnotatedCameraWidget::drawSpeedWidget(QPainter &p, int &x, int &y, QString &title, QString &speedLimitStr, QColor &colorSpeed) {
|
||||||
// Draw outer box + border to contain set speed and speed limit
|
// Draw outer box + border to contain set speed and speed limit
|
||||||
const int sign_margin = 12;
|
const int sign_margin = 12;
|
||||||
const int us_sign_height = 186;
|
const int us_sign_height = 186;
|
||||||
@@ -533,7 +533,7 @@ void AnnotatedCameraWidget::drawSpeedWidget(QPainter &p, int x, int y, QString t
|
|||||||
p.drawText(set_speed_rect.adjusted(0, 27, 0, 0), Qt::AlignTop | Qt::AlignHCenter, title);
|
p.drawText(set_speed_rect.adjusted(0, 27, 0, 0), Qt::AlignTop | Qt::AlignHCenter, title);
|
||||||
p.setFont(InterFont(90, QFont::Bold));
|
p.setFont(InterFont(90, QFont::Bold));
|
||||||
p.setPen(color);
|
p.setPen(color);
|
||||||
p.drawText(set_speed_rect.adjusted(0, 77, 0, 0), Qt::AlignTop | Qt::AlignHCenter, setSpeedStr);
|
p.drawText(set_speed_rect.adjusted(0, 77, 0, 0), Qt::AlignTop | Qt::AlignHCenter, speedLimitStr);
|
||||||
|
|
||||||
// // current speed
|
// // current speed
|
||||||
// if (!(scene.hide_speed)) {
|
// if (!(scene.hide_speed)) {
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
void drawText(QPainter &p, int x, int y, const QString &text, int alpha = 255);
|
void drawText(QPainter &p, int x, int y, const QString &text, int alpha = 255);
|
||||||
void drawSpeedWidget(QPainter &p, int x, int y, QString title, QString text, QColor colorSpeed);
|
void drawSpeedWidget(QPainter &p, int x, int y, QString &title, QString &speedLimitStr, QColor &colorSpeed);
|
||||||
|
|
||||||
QVBoxLayout *main_layout;
|
QVBoxLayout *main_layout;
|
||||||
QPixmap dm_img;
|
QPixmap dm_img;
|
||||||
|
|||||||
Reference in New Issue
Block a user