Initial commit where connection window is active and it is possible to

connect to GVRET but this time through the connection window and the
menu option "Connect".
This commit is contained in:
Collin Kidder
2015-10-18 15:34:40 -04:00
parent 49f2525320
commit 4dc8c5b434
8 changed files with 129 additions and 154 deletions
+15
View File
@@ -24,6 +24,8 @@ ConnectionWindow::ConnectionWindow(QWidget *parent) :
ui->cbSpeed1->addItem(tr("500000"));
ui->cbSpeed1->addItem(tr("1000000"));
ui->cbSpeed1->addItem(tr("33333"));
connect(ui->btnOK, SIGNAL(clicked(bool)), this, SLOT(handleOKButton()));
}
ConnectionWindow::~ConnectionWindow()
@@ -40,6 +42,19 @@ void ConnectionWindow::showEvent(QShowEvent* event)
if (ui->rbSocketCAN->isChecked()) getSocketcanPorts();
}
void ConnectionWindow::handleOKButton()
{
QString conn;
if (ui->rbGVRET->isChecked()) conn = "GVRET";
if (ui->rbKvaser->isChecked()) conn = "KVASER";
if (ui->rbSocketCAN->isChecked()) conn = "SOCKETCAN";
emit updateConnectionSettings(conn, getPortName(), getSpeed0(), getSpeed1());
this->close();
}
void ConnectionWindow::getSerialPorts()
{
ui->cbPort->clear();