Skip to content

Commit 06442df

Browse files
author
Mich
committed
Added comboBoxLoggingMode to settings, minor fixes
1 parent 67ee853 commit 06442df

File tree

4 files changed

+52
-24
lines changed

4 files changed

+52
-24
lines changed

src/infodialog.ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</rect>
1212
</property>
1313
<property name="windowTitle">
14-
<string>About this application</string>
14+
<string>Application Info</string>
1515
</property>
1616
<layout class="QGridLayout" name="gridLayout">
1717
<item row="1" column="1">

src/logger.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,11 @@ bool Logger::beginLog(QString path, bool autoLogging, QString fileName)
3939

4040
return true;
4141
}
42-
qDebug() << "Invalid Dir";
43-
return false;
42+
else
43+
{
44+
qDebug() << "Invalid Dir";
45+
return false;
46+
}
4447
}
4548

4649
bool Logger::isOpen()

src/mainwindow.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,8 @@ void MainWindow::settingsLoadAll()
270270
ui->comboBoxExternalTimeFormat->setCurrentIndex(appSettings.value("GUI_Elements/comboBoxExternalTimeFormat.currentIndex").value<int>());
271271
ui->comboBoxRAMLoadMode->setCurrentIndex(appSettings.value("GUI_Elements/comboBoxRAMLoadMode.currentIndex").value<int>());
272272
ui->comboBoxRAMSaveMode->setCurrentIndex(appSettings.value("GUI_Elements/comboBoxRAMSaveMode.currentIndex").value<int>());
273+
ui->comboBoxLoggingMode->setCurrentIndex(appSettings.value("GUI_Elements/comboBoxLoggingMode.currentIndex").value<int>());
274+
273275

274276
ui->checkBoxDTR->setChecked(appSettings.value("GUI_Elements/checkBoxDTR.isChecked").value<bool>());
275277
ui->checkBoxSimplify->setChecked(appSettings.value("GUI_Elements/checkBoxSimplify.isChecked").value<bool>());
@@ -351,6 +353,7 @@ void MainWindow::settingsSaveAll()
351353
appSettings.setValue("GUI_Elements/comboBoxExternalTimeFormat.currentIndex", ui->comboBoxExternalTimeFormat->currentIndex());
352354
appSettings.setValue("GUI_Elements/comboBoxRAMLoadMode.currentIndex", ui->comboBoxRAMLoadMode->currentIndex());
353355
appSettings.setValue("GUI_Elements/comboBoxRAMSaveMode.currentIndex", ui->comboBoxRAMSaveMode->currentIndex());
356+
appSettings.setValue("GUI_Elements/comboBoxLoggingMode.currentIndex", ui->comboBoxLoggingMode->currentIndex());
354357

355358
appSettings.setValue("GUI_Elements/checkBoxDTR.isChecked", ui->checkBoxDTR->isChecked());
356359
appSettings.setValue("GUI_Elements/checkBoxSimplify.isChecked", ui->checkBoxSimplify->isChecked());
@@ -446,6 +449,7 @@ void MainWindow::processTable(QStringList labels, QList<double> values)
446449

447450
void MainWindow::on_printIntroChangelog() // TODO
448451
{
452+
ui->pushButtonTextLogToggle->setChecked(false);
449453
ui->textBrowserLogs->append(INTRO_TEXT);
450454
ui->textBrowserLogs->append("\n" CHANGELOG_TEXT);
451455

@@ -1745,9 +1749,9 @@ void MainWindow::on_checkBoxAutoLogging_toggled(bool checked)
17451749
ui->lineEditSaveFileName->setEnabled(false);
17461750
ui->pushButtonAddDateTime->setEnabled(false);
17471751

1748-
ui->pushButtonLogging->setText("Auto");
17491752
ui->lineEditSaveFileName->setText("%DateTime%_Log.txt");
17501753
ui->pushButtonLogging->setChecked(true); // Trigger begin log
1754+
ui->pushButtonLogging->setText("Auto");
17511755
}
17521756
else
17531757
{
@@ -1756,7 +1760,7 @@ void MainWindow::on_checkBoxAutoLogging_toggled(bool checked)
17561760
ui->pushButtonAddDateTime->setEnabled(true);
17571761

17581762
ui->pushButtonLogging->setChecked(false);
1759-
ui->pushButtonLogging->setText("Start Logging");
1763+
ui->pushButtonLogging->setText("Enable Logging");
17601764

17611765
ui->lineEditSaveFileName->clear();
17621766
}

src/mainwindow.ui

Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
<enum>QTabWidget::Rounded</enum>
6161
</property>
6262
<property name="currentIndex">
63-
<number>1</number>
63+
<number>0</number>
6464
</property>
6565
<property name="elideMode">
6666
<enum>Qt::ElideMiddle</enum>
@@ -94,6 +94,9 @@
9494
<height>30</height>
9595
</size>
9696
</property>
97+
<property name="whatsThis">
98+
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Refresh availible COM ports list&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
99+
</property>
97100
<property name="text">
98101
<string>Refresh</string>
99102
</property>
@@ -141,6 +144,9 @@
141144
<height>30</height>
142145
</size>
143146
</property>
147+
<property name="whatsThis">
148+
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Enable/disable serial communication&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
149+
</property>
144150
<property name="text">
145151
<string>Connect</string>
146152
</property>
@@ -250,6 +256,9 @@
250256
<property name="toolTip">
251257
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&amp;quot;Data Terminal Ready&amp;quot; - required by some devices such as Arduino Due for proper UART initialisation.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
252258
</property>
259+
<property name="whatsThis">
260+
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&amp;quot;Data Terminal Ready&amp;quot; - required by some devices such as Arduino Due for proper UART initialisation.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
261+
</property>
253262
<property name="text">
254263
<string>DTR</string>
255264
</property>
@@ -334,6 +343,9 @@
334343
<height>16777215</height>
335344
</size>
336345
</property>
346+
<property name="whatsThis">
347+
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Automatically refresh the availible COM ports list every 500 ms.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
348+
</property>
337349
<property name="text">
338350
<string>Auto update</string>
339351
</property>
@@ -1651,6 +1663,9 @@
16511663
<height>25</height>
16521664
</size>
16531665
</property>
1666+
<property name="whatsThis">
1667+
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Clear text window&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
1668+
</property>
16541669
<property name="text">
16551670
<string>Clear</string>
16561671
</property>
@@ -1671,6 +1686,9 @@
16711686
<height>0</height>
16721687
</size>
16731688
</property>
1689+
<property name="whatsThis">
1690+
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Set the interval of reading Serial/UDP. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
1691+
</property>
16741692
<property name="alignment">
16751693
<set>Qt::AlignCenter</set>
16761694
</property>
@@ -1715,6 +1733,9 @@
17151733
<verstretch>0</verstretch>
17161734
</sizepolicy>
17171735
</property>
1736+
<property name="whatsThis">
1737+
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Highlights the words in the main text window that matches the contents of this textbox&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
1738+
</property>
17181739
<property name="placeholderText">
17191740
<string>Text to highlight...</string>
17201741
</property>
@@ -1861,6 +1882,22 @@
18611882
</property>
18621883
</widget>
18631884
</item>
1885+
<item>
1886+
<spacer name="horizontalSpacer_3">
1887+
<property name="orientation">
1888+
<enum>Qt::Horizontal</enum>
1889+
</property>
1890+
<property name="sizeType">
1891+
<enum>QSizePolicy::MinimumExpanding</enum>
1892+
</property>
1893+
<property name="sizeHint" stdset="0">
1894+
<size>
1895+
<width>13</width>
1896+
<height>20</height>
1897+
</size>
1898+
</property>
1899+
</spacer>
1900+
</item>
18641901
<item>
18651902
<widget class="QCheckBox" name="checkBoxAutoTrack">
18661903
<property name="text">
@@ -1918,22 +1955,6 @@
19181955
</property>
19191956
</widget>
19201957
</item>
1921-
<item>
1922-
<spacer name="horizontalSpacer_3">
1923-
<property name="orientation">
1924-
<enum>Qt::Horizontal</enum>
1925-
</property>
1926-
<property name="sizeType">
1927-
<enum>QSizePolicy::MinimumExpanding</enum>
1928-
</property>
1929-
<property name="sizeHint" stdset="0">
1930-
<size>
1931-
<width>13</width>
1932-
<height>20</height>
1933-
</size>
1934-
</property>
1935-
</spacer>
1936-
</item>
19371958
<item>
19381959
<widget class="QPushButton" name="pushButtonFitToContents">
19391960
<property name="text">
@@ -1953,7 +1974,7 @@
19531974
</size>
19541975
</property>
19551976
<property name="text">
1956-
<string>Clear data</string>
1977+
<string>Clear plot</string>
19571978
</property>
19581979
</widget>
19591980
</item>
@@ -2517,7 +2538,7 @@
25172538
</action>
25182539
<action name="actionInfo">
25192540
<property name="text">
2520-
<string>Author info</string>
2541+
<string>Application Info</string>
25212542
</property>
25222543
</action>
25232544
</widget>

0 commit comments

Comments
 (0)