Skip to content

Commit ffd63d8

Browse files
author
Mich
committed
Added new elements to save/load settings procedures
1 parent 959af95 commit ffd63d8

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

src/mainwindow.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,7 @@ void MainWindow::settingsLoadAll()
326326
ui->comboBoxLoggingMode->setCurrentIndex(appSettings.value("GUI_Elements/comboBoxLoggingMode.currentIndex").value<int>());
327327
ui->comboBoxTextProcessing->setCurrentIndex(appSettings.value("GUI_Elements/comboBoxTextProcessing.currentIndex").value<int>());
328328
ui->comboBoxClockSource->setCurrentIndex(appSettings.value("GUI_Elements/comboBoxClockSource.currentIndex").value<int>());
329+
ui->comboBoxAddTextMode->setCurrentIndex(appSettings.value("GUI_Elements/comboBoxAddTextMode.currentIndex").value<int>());
329330

330331
ui->checkBoxDTR->setChecked(appSettings.value("GUI_Elements/checkBoxDTR.isChecked").value<bool>());
331332
ui->checkBoxSendKey->setChecked(appSettings.value("GUI_Elements/checkBoxSendKey.isChecked").value<bool>());
@@ -345,6 +346,8 @@ void MainWindow::settingsLoadAll()
345346

346347
ui->tabWidgetControlSection->setCurrentIndex(appSettings.value("GUI_Elements/tabWidgetControlSection.currentIndex").value<int>());
347348

349+
ui->radioButtonScrollToButtom->setChecked(appSettings.value("GUI_Elements/radioButtonScrollToButtom.isChecked").value<bool>());
350+
348351
ui->lineEditCustomParsingRules->setText(appSettings.value("data/lineEditCustomParsingRules.text").value<QString>());
349352
ui->lineEditUDPTargetIP->setText(appSettings.value("data/lineEditUDPTargetIP.text").value<QString>());
350353
ui->lineEditSaveLogPath->setText(appSettings.value("data/lineEditSaveLogPath.text").value<QString>());
@@ -423,6 +426,7 @@ void MainWindow::settingsSaveAll()
423426
appSettings.setValue("GUI_Elements/comboBoxLoggingMode.currentIndex", ui->comboBoxLoggingMode->currentIndex());
424427
appSettings.setValue("GUI_Elements/comboBoxTextProcessing.currentIndex", ui->comboBoxTextProcessing->currentIndex());
425428
appSettings.setValue("GUI_Elements/comboBoxClockSource.currentIndex", ui->comboBoxClockSource->currentIndex());
429+
appSettings.setValue("GUI_Elements/comboBoxAddTextMode.currentIndex", ui->comboBoxAddTextMode->currentIndex());
426430

427431
appSettings.setValue("GUI_Elements/checkBoxDTR.isChecked", ui->checkBoxDTR->isChecked());
428432
appSettings.setValue("GUI_Elements/checkBoxSendKey.isChecked", ui->checkBoxSendKey->isChecked());
@@ -442,6 +446,9 @@ void MainWindow::settingsSaveAll()
442446

443447
appSettings.setValue("GUI_Elements/tabWidgetControlSection.currentIndex", ui->tabWidgetControlSection->currentIndex());
444448

449+
appSettings.setValue("GUI_Elements/radioButtonScrollToButtom.isChecked", ui->radioButtonScrollToButtom->isChecked());
450+
451+
445452
appSettings.setValue("data/lineEditCustomParsingRules.text", ui->lineEditCustomParsingRules->text());
446453
appSettings.setValue("data/lineEditUDPTargetIP.text", ui->lineEditUDPTargetIP->text());
447454
appSettings.setValue("data/lineEditSaveLogPath.text", ui->lineEditSaveLogPath->text());
@@ -2221,7 +2228,7 @@ void MainWindow::on_comboBoxAddTextMode_currentIndexChanged(int index)
22212228
if (index == 1)
22222229
{
22232230
ui->radioButtonScrollToButtom->setCheckable(false);
2224-
ui->radioButtonScrollToButtom->setChecked(false);
2231+
// ui->radioButtonScrollToButtom->setChecked(false);
22252232
}
22262233
else
22272234
{

src/mainwindow.ui

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<rect>
77
<x>0</x>
88
<y>0</y>
9-
<width>1782</width>
9+
<width>1801</width>
1010
<height>722</height>
1111
</rect>
1212
</property>
@@ -1859,7 +1859,7 @@
18591859
<bool>true</bool>
18601860
</property>
18611861
<property name="checked">
1862-
<bool>false</bool>
1862+
<bool>true</bool>
18631863
</property>
18641864
</widget>
18651865
</item>
@@ -2525,7 +2525,7 @@ p, li { white-space: pre-wrap; }
25252525
<rect>
25262526
<x>0</x>
25272527
<y>0</y>
2528-
<width>1782</width>
2528+
<width>1801</width>
25292529
<height>27</height>
25302530
</rect>
25312531
</property>

0 commit comments

Comments
 (0)