Skip to content

Commit

Permalink
Changes documentation files directory
Browse files Browse the repository at this point in the history
  • Loading branch information
jirimaier committed Mar 19, 2024
1 parent 41edc4c commit 3a3af22
Show file tree
Hide file tree
Showing 14 changed files with 63 additions and 90 deletions.
2 changes: 1 addition & 1 deletion DataPlotter.pro
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = 3.2.1.0
VERSION = 3.2.2.0

QT += core gui serialport widgets printsupport opengl qml quickwidgets \
quick quickcontrols2 network
Expand Down
2 changes: 1 addition & 1 deletion developeroptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -384,4 +384,4 @@ void DeveloperOptions::on_pushButtonScrollDown_2_clicked() {
scroll->setValue(scroll->minimum());
}

void DeveloperOptions::on_pushButtonOpenConfig_clicked() { QDesktopServices::openUrl(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)); }
void DeveloperOptions::on_pushButtonOpenConfig_clicked() { emit requestConfigFolderOpen(); }
1 change: 1 addition & 0 deletions developeroptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ private slots:
void requestManualBufferClear();
void requestManualBufferShow();
void sendManualInput(QByteArray bytes);
void requestConfigFolderOpen();

private:
Ui::DeveloperOptions *ui;
Expand Down
4 changes: 2 additions & 2 deletions developeroptions.ui
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>1</number>
<number>3</number>
</property>
<widget class="QWidget" name="tab_3">
<attribute name="title">
Expand Down Expand Up @@ -918,7 +918,7 @@
<item>
<widget class="QPushButton" name="pushButtonOpenConfig">
<property name="text">
<string>Open Config Folder</string>
<string>Open Config Folder (not possible on some platforms)</string>
</property>
</widget>
</item>
Expand Down
2 changes: 1 addition & 1 deletion mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -7261,7 +7261,7 @@
</size>
</property>
<property name="currentIndex">
<number>3</number>
<number>2</number>
</property>
<property name="iconSize">
<size>
Expand Down
17 changes: 0 additions & 17 deletions mainwindow/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -505,23 +505,6 @@ void MainWindow::on_lineEditHUnit_textChanged(const QString &arg1) {
updateDivs(); // Aby se aktualizovala jednotka u kroku mřížky
}

void MainWindow::on_pushButtonProtocolGuideCZ_clicked() { openResourceFileCopiedToLocal(":/docs/documentation/Data protocol guide cz.pdf"); }

void MainWindow::openResourceFileCopiedToLocal(QString file) {
QFile resource(file);
QString local = configFilePath.left(configFilePath.lastIndexOf('/') + 1) + file.mid(file.lastIndexOf('/'));
resource.open(QIODevice::ReadOnly);
QFile::remove(local);
resource.copy(local);
if (!QDesktopServices::openUrl(QUrl::fromLocalFile(local))) {
QMessageBox msgBox(this);
msgBox.setText(tr("Cant open file."));
msgBox.setInformativeText(local);
msgBox.setIcon(QMessageBox::Critical);
msgBox.exec();
}
}

void MainWindow::checkBoxEchoReply_toggled(bool checked) { emit replyEcho(checked); }

void MainWindow::on_comboBoxBaud_currentTextChanged(const QString &arg1) {
Expand Down
4 changes: 3 additions & 1 deletion mainwindow/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ class MainWindow : public QMainWindow {
void closeEvent(QCloseEvent *event);
void autosetHrange();
QIcon invertIconLightness(const QIcon &icon, QSize size);
void openResourceFileCopiedToLocal(QString file);

void on_pushButtonRecordMeasurementsXXX_clicked(int n);
void on_checkBoxCurXXXVisible_stateChanged(int n, int arg1);
Expand All @@ -147,6 +146,8 @@ class MainWindow : public QMainWindow {
void on_doubleSpinBoxYCurXXX_valueChanged(int n, double arg1);

void horizontalSliderTimeCurXXX_realValueChanged(int n, int arg1);
void openDocs(QString filename);

private slots:
void updateCursors();
void setAdaptiveSpinBoxes();
Expand All @@ -173,6 +174,7 @@ private slots:
void pushButtonClearGraph_clicked();
void checkBoxEchoReply_toggled(bool checked);
void checkBoxMouseControls_toggled_new(bool checked);
void requestConfigFolderOpen();

private slots: // Autoconnect slots
void on_dialRollingRange_realValueChanged(double value) { ui->doubleSpinBoxRangeHorizontal->setValue(value); }
Expand Down
1 change: 1 addition & 0 deletions mainwindow/mainwindow_gui_preset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ void MainWindow::connectSignals() {
connect(developerOptions, &DeveloperOptions::requestManualBufferShow, this, &MainWindow::requestManualBufferShow);
connect(developerOptions, &DeveloperOptions::requestSerialBufferClear, this, &MainWindow::requestSerialBufferClear);
connect(developerOptions, &DeveloperOptions::requestSerialBufferShow, this, &MainWindow::requestSerialBufferShow);
connect(developerOptions, &DeveloperOptions::requestConfigFolderOpen, this, &MainWindow::requestConfigFolderOpen);
connect(&ansiTerminalModel, &AnsiTerminalModel::gridClickedSignal, developerOptions, &DeveloperOptions::addTerminalCursorPosCommand);

connect(ui->plot, &MyMainPlot::vRangeChanged, this, &MainWindow::mainPlotVRangeChanged);
Expand Down
19 changes: 11 additions & 8 deletions mainwindow/mainwindow_gui_slots.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,19 +181,20 @@ void MainWindow::on_pushButtonInvert_toggled(bool checked) {
ui->plot->setChInvert(ui->comboBoxSelectedChannel->currentIndex(), checked);
}

void MainWindow::on_pushButtonOpenHelpCZ_clicked() { openResourceFileCopiedToLocal(":/docs/documentation/Manual cz.pdf"); }
void MainWindow::on_pushButtonOpenHelpEN_clicked() { openResourceFileCopiedToLocal(":/docs/documentation/Manual en.pdf"); }

void MainWindow::on_pushButtonProtocolGuideEN_clicked() { openResourceFileCopiedToLocal(":/docs/documentation/Data protocol guide en.pdf"); }

void MainWindow::on_pushButtonOpenHelpCZ_clicked() { openDocs("Manual cz.pdf"); }
void MainWindow::on_pushButtonOpenHelpEN_clicked() { openDocs("Manual en.pdf"); }
void MainWindow::on_pushButtonProtocolGuideCZ_clicked() { openDocs("Data protocol guide cz.pdf"); }
void MainWindow::on_pushButtonProtocolGuideEN_clicked() { openDocs("Data protocol guide en.pdf"); }
void MainWindow::on_pushButtonIntroVideoCZ_clicked() { QDesktopServices::openUrl(QUrl("https://www.youtube.com/watch?v=TpJgz6kfPvA")); }

void MainWindow::on_pushButtonGitHub_clicked() { QDesktopServices::openUrl(QUrl("https://github.com/jirimaier/DataPlotter")); }

void MainWindow::on_pushButtonHomePage_clicked() { QDesktopServices::openUrl(QUrl("https://jirimaier.github.io/DataPlotter")); }

void MainWindow::on_labelLogo_clicked() { QDesktopServices::openUrl(QUrl("https://embedded.fel.cvut.cz/platformy")); }

void MainWindow::openDocs(QString filename) {
if (!QDesktopServices::openUrl(QUrl::fromLocalFile(QApplication::applicationDirPath() + "/documentation/" + filename)))
QDesktopServices::openUrl(QUrl("https://jirimaier.github.io/DataPlotter/documentation/" + filename.replace(".pdf", ".html")));
}

void MainWindow::on_comboBoxFIR_currentIndexChanged(int index) {
switch (index) {
case 0:
Expand Down Expand Up @@ -490,6 +491,8 @@ void MainWindow::checkBoxMouseControls_toggled_new(bool checked) {
freqTimePlotDialog->getUi()->plotPeak->enableMouseCursorControll(checked);
}

void MainWindow::requestConfigFolderOpen() { QDesktopServices::openUrl(QUrl::fromLocalFile(configFilePath.left(configFilePath.lastIndexOf("/")))); }

void MainWindow::on_checkBoxFFTCh1_toggled(bool checked) {
setComboboxItemVisible(*ui->comboBoxCursor1Channel, FFT_INDEX(0), checked && ui->pushButtonFFT->isChecked());
setComboboxItemVisible(*ui->comboBoxCursor2Channel, FFT_INDEX(0), checked && ui->pushButtonFFT->isChecked());
Expand Down
7 changes: 0 additions & 7 deletions resources.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,4 @@
<file>qml/ExampleQmlTerminal.qml</file>
<file>qml/DefaultQmlTerminalWindowsXPCompatible.qml</file>
</qresource>
<qresource prefix="/docs">
<file>documentation/Data protocol guide cz.pdf</file>
<file>documentation/Data protocol guide en.pdf</file>
<file>documentation/license.txt</file>
<file>documentation/Manual cz.pdf</file>
<file>documentation/Manual en.pdf</file>
</qresource>
</RCC>
Binary file modified translations/translation_cz.qm
Binary file not shown.
47 changes: 21 additions & 26 deletions translations/translation_cz.ts
Original file line number Diff line number Diff line change
Expand Up @@ -502,8 +502,8 @@
</message>
<message>
<location filename="../developeroptions.ui" line="921"/>
<source>Open Config Folder</source>
<translation>Otevřít soubor s konfigurací</translation>
<source>Open Config Folder (not possible on some platforms)</source>
<translation>Otevřít složku s konfigurací (na některých platformách není možné)</translation>
</message>
<message>
<location filename="../developeroptions.ui" line="942"/>
Expand Down Expand Up @@ -722,10 +722,10 @@
<translation>Zvětšení:</translation>
</message>
<message>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="182"/>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="183"/>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="184"/>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="185"/>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="186"/>
<source>Free</source>
<translation>Volný</translation>
</message>
Expand Down Expand Up @@ -776,8 +776,8 @@
<message>
<location filename="../mainwindow.ui" line="2333"/>
<location filename="../mainwindow.ui" line="3097"/>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="182"/>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="183"/>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="184"/>
<source>Sample</source>
<translation>Vzorek</translation>
</message>
Expand Down Expand Up @@ -1309,7 +1309,7 @@
<message>
<location filename="../mainwindow.ui" line="3510"/>
<location filename="../mainwindow.ui" line="4282"/>
<location filename="../mainwindow/mainwindow.cpp" line="566"/>
<location filename="../mainwindow/mainwindow.cpp" line="549"/>
<source>Record</source>
<translation>Záznam</translation>
</message>
Expand Down Expand Up @@ -1710,27 +1710,27 @@
<translation>Označení produktu: %1</translation>
</message>
<message>
<location filename="../mainwindow/mainwindow.cpp" line="554"/>
<location filename="../mainwindow/mainwindow.cpp" line="537"/>
<source>Record measurements</source>
<translation>Záznam změřených hodnot</translation>
</message>
<message>
<location filename="../mainwindow/mainwindow.cpp" line="566"/>
<location filename="../mainwindow/mainwindow.cpp" line="549"/>
<source>Stop</source>
<translation>Stop</translation>
</message>
<message>
<location filename="../mainwindow/mainwindow.cpp" line="812"/>
<location filename="../mainwindow/mainwindow.cpp" line="795"/>
<source>Download</source>
<translation>Stáhnout</translation>
</message>
<message>
<location filename="../mainwindow/mainwindow.cpp" line="813"/>
<location filename="../mainwindow/mainwindow.cpp" line="796"/>
<source>Close</source>
<translation>Zavřít</translation>
</message>
<message>
<location filename="../mainwindow/mainwindow.cpp" line="815"/>
<location filename="../mainwindow/mainwindow.cpp" line="798"/>
<source>Check for updates at startup</source>
<translation>Kontrolovat aktualizace při spuštění</translation>
</message>
Expand All @@ -1740,53 +1740,53 @@
<translation>všechno</translation>
</message>
<message>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="120"/>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="121"/>
<source>Version: </source>
<translation>Verze: </translation>
</message>
<message>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="182"/>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="183"/>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="184"/>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="185"/>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="186"/>
<source>OFF</source>
<translation>OFF</translation>
</message>
<message>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="184"/>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="185"/>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="186"/>
<source>Track</source>
<translation>Sledovat</translation>
</message>
<message>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="260"/>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="261"/>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="262"/>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="263"/>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="264"/>
<source>Logic %1</source>
<translation>Logika %1</translation>
</message>
<message>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="267"/>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="268"/>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="269"/>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="270"/>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="271"/>
<source>Logic</source>
<translation>Logika</translation>
</message>
<message>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="282"/>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="283"/>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="284"/>
<source>Absolute</source>
<translation>Absolutní</translation>
</message>
<message>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="293"/>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="294"/>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="295"/>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="296"/>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="297"/>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="298"/>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="299"/>
<source>Constant</source>
<translation>Konstantní</translation>
</message>
Expand Down Expand Up @@ -1829,7 +1829,7 @@
<translation>Exportovat %1</translation>
</message>
<message>
<location filename="../mainwindow/mainwindow.cpp" line="554"/>
<location filename="../mainwindow/mainwindow.cpp" line="537"/>
<location filename="../mainwindow/mainwindow_export.cpp" line="84"/>
<source>Comma separated values (*.csv)</source>
<translation>Hodnoty oddělené čárkou (*.csv)</translation>
Expand Down Expand Up @@ -1875,7 +1875,7 @@
<translation>Exportovat graf FFT jako obrázek</translation>
</message>
<message>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="119"/>
<location filename="../mainwindow/mainwindow_gui_preset.cpp" line="120"/>
<source>Build: </source>
<translation>Sestaveno: </translation>
</message>
Expand Down Expand Up @@ -1905,17 +1905,12 @@
<translation>Příště nezobrazovat</translation>
</message>
<message>
<location filename="../mainwindow/mainwindow.cpp" line="518"/>
<source>Cant open file.</source>
<translation>Nelze otevřít soubor.</translation>
</message>
<message>
<location filename="../mainwindow/mainwindow.cpp" line="833"/>
<location filename="../mainwindow/mainwindow.cpp" line="816"/>
<source>Save file</source>
<translation>Uložit soubor</translation>
</message>
<message>
<location filename="../mainwindow/mainwindow.cpp" line="833"/>
<location filename="../mainwindow/mainwindow.cpp" line="816"/>
<source>Text file (*.txt);;Any file (*.*)</source>
<translation>Textový soubor (*.txt);;Všechny soubory (*.*)</translation>
</message>
Expand Down
Binary file modified translations/translation_en.qm
Binary file not shown.
Loading

0 comments on commit 3a3af22

Please sign in to comment.