Changes to connection window to actually retrieve and show socketcan

interfaces now.
This commit is contained in:
Collin Kidder
2016-02-25 20:51:46 -05:00
parent 03f9a30687
commit 6e64ab7134
2 changed files with 9 additions and 0 deletions
+8
View File
@@ -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();
+1
View File
@@ -43,6 +43,7 @@ public slots:
private slots:
void handleOKButton();
void handleConnTypeChanged();
private:
Ui::ConnectionWindow *ui;