@@ -48,6 +48,8 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
4848 connect (ui->lineEdit_toSend , SIGNAL (returnPressed ()), this , SLOT (ButtonSendPressed ()));
4949 connect (ui->comboBox_bauds , SIGNAL (currentIndexChanged (const QString &)), this ,
5050 SLOT (CBoxBaudsChanged ()));
51+ connect (ui->comboBox_EOL , SIGNAL (currentIndexChanged (const QString &)), this ,
52+ SLOT (CBoxEOLChanged ()));
5153 connect (ui->actionExit , SIGNAL (triggered ()), this , SLOT (MenuBarExitClick ()));
5254 connect (ui->actionASCII_Terminal , SIGNAL (triggered ()), this , SLOT (MenuBarTermAsciiClick ()));
5355 connect (ui->actionHEX_Terminal , SIGNAL (triggered ()), this , SLOT (MenuBarTermHexClick ()));
@@ -274,7 +276,7 @@ void MainWindow::ClosePort(void)
274276
275277/* *************************************************************************************************/
276278
277- /* Bauds change */
279+ /* Bauds and Send EOL bytes change */
278280
279281// ComboBox Bauds change event handler
280282void MainWindow::CBoxBaudsChanged (void )
@@ -290,6 +292,14 @@ void MainWindow::CBoxBaudsChanged(void)
290292 }
291293}
292294
295+ // ComboBox EOL change event handler
296+ void MainWindow::CBoxEOLChanged (void )
297+ {
298+ qDebug (" Send EOL changed." );
299+
300+ ui->lineEdit_toSend ->setFocus ();
301+ }
302+
293303/* *************************************************************************************************/
294304
295305/* Serial Receive */
@@ -670,6 +680,7 @@ void MainWindow::ButtonSendPressed(void)
670680 qDebug (" Send Button pressed." );
671681 SerialSend ();
672682 ui->lineEdit_toSend ->clear ();
683+ ui->lineEdit_toSend ->setFocus ();
673684}
674685
675686// Serial send data from lineEdit box
0 commit comments