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
568 B
28 lines
568 B
2 years ago
|
#pragma once
|
||
|
|
||
|
#include <QHash>
|
||
|
#include <QHBoxLayout>
|
||
|
#include <QLabel>
|
||
|
|
||
|
#include "cereal/gen/cpp/log.capnp.h"
|
||
|
|
||
|
class MapInstructions : public QWidget {
|
||
|
Q_OBJECT
|
||
|
|
||
|
private:
|
||
|
QLabel *distance;
|
||
|
QLabel *primary;
|
||
|
QLabel *secondary;
|
||
|
QLabel *icon_01;
|
||
|
QHBoxLayout *lane_layout;
|
||
|
bool is_rhd = false;
|
||
|
std::vector<QLabel *> lane_labels;
|
||
|
QHash<QString, QPixmap> pixmap_cache;
|
||
|
|
||
|
public:
|
||
|
MapInstructions(QWidget * parent=nullptr);
|
||
|
void buildPixmapCache();
|
||
|
QString getDistance(float d);
|
||
|
void updateInstructions(cereal::NavInstruction::Reader instruction);
|
||
|
};
|