From 6e64ab713485248e7d658390e0de8bcabc44da20 Mon Sep 17 00:00:00 2001 From: Collin Kidder Date: Thu, 25 Feb 2016 20:51:46 -0500 Subject: [PATCH] Changes to connection window to actually retrieve and show socketcan interfaces now. --- connectionwindow.cpp | 8 ++++++++ connectionwindow.h | 1 + 2 files changed, 9 insertions(+) diff --git a/connectionwindow.cpp b/connectionwindow.cpp index ad46e77..8a8ea45 100644 --- a/connectionwindow.cpp +++ b/connectionwindow.cpp @@ -48,6 +48,9 @@ ConnectionWindow::ConnectionWindow(QWidget *parent) : #endif connect(ui->btnOK, SIGNAL(clicked(bool)), this, SLOT(handleOKButton())); + connect(ui->rbGVRET, SIGNAL(toggled(bool)), this, SLOT(handleConnTypeChanged())); + connect(ui->rbKvaser, SIGNAL(toggled(bool)), this, SLOT(handleConnTypeChanged())); + connect(ui->rbSocketCAN, SIGNAL(toggled(bool)), this, SLOT(handleConnTypeChanged())); } ConnectionWindow::~ConnectionWindow() @@ -60,6 +63,11 @@ void ConnectionWindow::showEvent(QShowEvent* event) { QDialog::showEvent(event); qDebug() << "Show connectionwindow"; + handleConnTypeChanged(); +} + +void ConnectionWindow::handleConnTypeChanged() +{ if (ui->rbGVRET->isChecked()) getSerialPorts(); if (ui->rbKvaser->isChecked()) getKvaserPorts(); if (ui->rbSocketCAN->isChecked()) getSocketcanPorts(); diff --git a/connectionwindow.h b/connectionwindow.h index 3315006..e098f67 100644 --- a/connectionwindow.h +++ b/connectionwindow.h @@ -43,6 +43,7 @@ public slots: private slots: void handleOKButton(); + void handleConnTypeChanged(); private: Ui::ConnectionWindow *ui;