can just use clicked

pull/29068/head
Shane Smiskol 2 years ago
parent 89e405e063
commit 1f6d6b0a8f
  1. 1
      selfdrive/ui/qt/maps/map.cc
  2. 18
      selfdrive/ui/qt/onroad.cc
  3. 1
      selfdrive/ui/qt/onroad.h

@ -24,7 +24,6 @@ const QString ICON_SUFFIX = ".png";
MapWindow::MapWindow(const QMapboxGLSettings &settings) : m_settings(settings), velocity_filter(0, 10, 0.05) {
QObject::connect(uiState(), &UIState::uiUpdate, this, &MapWindow::updateState);
QObject::connect(uiState(), &UIState::uiUpdate, this, &MapWindow::updateState);
map_overlay = new QWidget (this);
map_overlay->setAttribute(Qt::WA_TranslucentBackground, true);

@ -20,12 +20,6 @@ OnroadWindow::OnroadWindow(QWidget *parent) : QWidget(parent) {
main_layout->addLayout(stacked_layout);
nvg = new AnnotatedCameraWidget(VISION_STREAM_ROAD, this);
QObject::connect(nvg, &AnnotatedCameraWidget::mapSettingsRequested, [=]() {
qDebug() << "double clicked!";
// if (map) {
// map->mapSettingsRequested();
// }
});
QWidget * split_wrapper = new QWidget;
split = new QHBoxLayout(split_wrapper);
@ -233,16 +227,6 @@ MapSettingsButton::MapSettingsButton(QWidget *parent) : QPushButton(parent) {
setFixedSize(btn_size, btn_size);
settings_img = loadPixmap("../assets/navigation/nav-settings.png", {img_size, img_size});
QObject::connect(this, &QPushButton::clicked, this, &MapSettingsButton::changeMode);
}
void MapSettingsButton::changeMode() {
emit mapSettingsRequested();
// const auto cp = (*uiState()->sm)["carParams"].getCarParams();
// bool can_change = hasLongitudinalControl(cp) && params.getBool("ExperimentalModeConfirmed");
// if (can_change) {
// params.putBool("ExperimentalMode", !experimental_mode);
// }
}
void MapSettingsButton::paintEvent(QPaintEvent *event) {
@ -273,7 +257,7 @@ AnnotatedCameraWidget::AnnotatedCameraWidget(VisionStreamType type, QWidget* par
map_settings_btn = new MapSettingsButton(this);
// TODO: connect to clicked!
QObject::connect(map_settings_btn, &MapSettingsButton::mapSettingsRequested, this, &AnnotatedCameraWidget::mapSettingsRequested);
QObject::connect(map_settings_btn, &MapSettingsButton::clicked, this, &AnnotatedCameraWidget::mapSettingsRequested);
// QObject::connect(map_settings_btn, &MapSettingsButton::mapSettingsRequested, [=]() {
// qDebug() << "clicked!";
// if (map) {

@ -59,7 +59,6 @@ signals:
private:
void paintEvent(QPaintEvent *event) override;
void changeMode();
QPixmap settings_img;
};

Loading…
Cancel
Save