diff --git a/DLTRelais.pro b/DLTRelais.pro index 33677d2..a636b0e 100644 --- a/DLTRelais.pro +++ b/DLTRelais.pro @@ -11,6 +11,7 @@ CONFIG += c++11 SOURCES += \ dltminiserver.cpp \ dltrelais.cpp \ + infodialog.cpp \ main.cpp \ dialog.cpp \ settingsdialog.cpp @@ -19,12 +20,13 @@ HEADERS += \ dialog.h \ dltminiserver.h \ dltrelais.h \ + infodialog.h \ settingsdialog.h \ version.h FORMS += \ dialog.ui \ - settingsdialog.ui + infodialog.ui TRANSLATIONS += \ DLTMultimeter_en_DE.ts @@ -38,4 +40,5 @@ DISTFILES += \ .gitignore \ DLTRelais_en_DE.ts \ LICENSE \ - README.md + README.md \ + settingsdialog.ui diff --git a/README.md b/README.md index cf338f7..014fce4 100644 --- a/README.md +++ b/README.md @@ -4,22 +4,12 @@ The SW DLTRelais is used to control Relais for Test Automation. It is based on a SW for the Arduino SW for the Wemos Mini D1 platform. It provides an interface to DLT for Logging and Test Automation. +![Image of DLTRelais](https://github.com/alexmucde/DLTRelais/blob/main/doc/images/DLTRelais.jpg) + For further information about DLT visit the DLT Viewer project: https://github.com/GENIVI/dlt-viewer -## Donation - -If you find my SW useful and you want to donate my work please select one of the following donations: - -Github Sponsors: - -https://github.com/sponsors/alexmucde - -Paypal Donation: - -https://www.paypal.com/donate?hosted_button_id=YBWSNXYWJJP2Q - ## Ardunio SW The currently sused Arduino SW can be found in the folder Arduino/DLTRelais/DLTRelais.ino @@ -38,13 +28,24 @@ To build this SW the Qt Toolchain must be used. DLTRelais.exe - ## Contributing Contibutions are always welcome! Please provide a Pull Request on Github. https://github.com/alexmucde/DLTRelais +## Donation + +If you find this SW useful and you want to donate my work please select one of the following donations: + +Github Sponsors: + +https://github.com/sponsors/alexmucde + +Paypal Donation: + +https://www.paypal.com/donate?hosted_button_id=YBWSNXYWJJP2Q + ## Copyright Alexander Wenzel diff --git a/dialog.cpp b/dialog.cpp index e6fc682..ddf29e3 100644 --- a/dialog.cpp +++ b/dialog.cpp @@ -21,6 +21,7 @@ #include #include +#include Dialog::Dialog(QWidget *parent) : QDialog(parent) @@ -246,4 +247,25 @@ void Dialog::on_pushButtonSettings_clicked() restoreSettings(); } +void Dialog::on_pushButtonInfo_clicked() +{ + QMessageBox msgBox(this); + + msgBox.setWindowTitle("Info DLTRelais"); + msgBox.setTextFormat(Qt::RichText); + + QString text; + text += "Information and Documentation can be found here:
"; + text += "
"; + text += "https://github.com/alexmucde/DLTRelais
"; + text += "
"; + text += "This SW is licensed under GPLv3.
"; + text += "
"; + text += "(C) 2021 Alexander Wenzel "; + msgBox.setText(text); + + msgBox.setStandardButtons(QMessageBox::Ok); + + msgBox.exec(); +} diff --git a/dialog.h b/dialog.h index c227896..72e2d1b 100644 --- a/dialog.h +++ b/dialog.h @@ -61,6 +61,8 @@ private slots: void on_pushButtonSettings_clicked(); + void on_pushButtonInfo_clicked(); + private: Ui::Dialog *ui; diff --git a/dialog.ui b/dialog.ui index d6cd3a0..c3af2d9 100644 --- a/dialog.ui +++ b/dialog.ui @@ -26,23 +26,30 @@ true - - - - true - - - - - + + - + 0 0 - Stop + Start + + + + + + + true + + + + + + + Status Relais: @@ -92,55 +99,46 @@ - - - - Status Relais: - - - - - + + - Relais 2 (D2): + Settings - + - + - 30B - - - true + Settings... - + - ON + Default - + - Trigger + Load... - - - Qt::Horizontal + + + Save... - - - 40 - 20 - + + + + + + Info... - + @@ -152,19 +150,6 @@ - - - - - 0 - 0 - - - - Start - - - @@ -211,45 +196,67 @@ - - + + - Settings + Relais 2 (D2): - + - + - Settings... + 30B + + + true - + - Default + ON - + - Load... + Trigger - - - Save... + + + Qt::Horizontal - + + + 40 + 20 + + + - - + + + + + 0 + 0 + + + + Stop + + + + + true diff --git a/doc/images/DLTRelais.jpg b/doc/images/DLTRelais.jpg new file mode 100644 index 0000000..35f755a Binary files /dev/null and b/doc/images/DLTRelais.jpg differ diff --git a/infodialog.cpp b/infodialog.cpp new file mode 100644 index 0000000..dc975f1 --- /dev/null +++ b/infodialog.cpp @@ -0,0 +1,14 @@ +#include "infodialog.h" +#include "ui_infodialog.h" + +InfoDialog::InfoDialog(QWidget *parent) : + QDialog(parent), + ui(new Ui::InfoDialog) +{ + ui->setupUi(this); +} + +InfoDialog::~InfoDialog() +{ + delete ui; +} diff --git a/infodialog.h b/infodialog.h new file mode 100644 index 0000000..0deba7a --- /dev/null +++ b/infodialog.h @@ -0,0 +1,22 @@ +#ifndef INFODIALOG_H +#define INFODIALOG_H + +#include + +namespace Ui { +class InfoDialog; +} + +class InfoDialog : public QDialog +{ + Q_OBJECT + +public: + explicit InfoDialog(QWidget *parent = nullptr); + ~InfoDialog(); + +private: + Ui::InfoDialog *ui; +}; + +#endif // INFODIALOG_H diff --git a/infodialog.ui b/infodialog.ui new file mode 100644 index 0000000..abf6058 --- /dev/null +++ b/infodialog.ui @@ -0,0 +1,78 @@ + + + InfoDialog + + + + 0 + 0 + 400 + 300 + + + + Dialog + + + + + + (C) 2021 Alexander Wenzel + + + + + + + This SW is licensed under GPLv3. + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + buttonBox + accepted() + InfoDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + InfoDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + +