Skip to content

Commit

Permalink
Added information Dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmucde committed Mar 13, 2021
1 parent 919fcdf commit b91fac8
Show file tree
Hide file tree
Showing 9 changed files with 233 additions and 84 deletions.
7 changes: 5 additions & 2 deletions DLTRelais.pro
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ CONFIG += c++11
SOURCES += \
dltminiserver.cpp \
dltrelais.cpp \
infodialog.cpp \
main.cpp \
dialog.cpp \
settingsdialog.cpp
Expand All @@ -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
Expand All @@ -38,4 +40,5 @@ DISTFILES += \
.gitignore \
DLTRelais_en_DE.ts \
LICENSE \
README.md
README.md \
settingsdialog.ui
27 changes: 14 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 <[email protected]>
Expand Down
22 changes: 22 additions & 0 deletions dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include <QFileDialog>
#include <QFile>
#include <QMessageBox>

Dialog::Dialog(QWidget *parent)
: QDialog(parent)
Expand Down Expand Up @@ -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:<br>";
text += "<br>";
text += "<a href='https://github.com/alexmucde/DLTRelais'>https://github.com/alexmucde/DLTRelais</a><br>";
text += "<br>";
text += "This SW is licensed under GPLv3.<br>";
text += "<br>";
text += "(C) 2021 Alexander Wenzel <[email protected]>";

msgBox.setText(text);

msgBox.setStandardButtons(QMessageBox::Ok);

msgBox.exec();
}
2 changes: 2 additions & 0 deletions dialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ private slots:

void on_pushButtonSettings_clicked();

void on_pushButtonInfo_clicked();

private:
Ui::Dialog *ui;

Expand Down
145 changes: 76 additions & 69 deletions dialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,30 @@
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="7" column="0">
<widget class="QLineEdit" name="lineEditStatusDLT">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QPushButton" name="pushButtonStop">
<item row="1" column="0">
<widget class="QPushButton" name="pushButtonStart">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Stop</string>
<string>Start</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLineEdit" name="lineEditStatus">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Status Relais:</string>
</property>
</widget>
</item>
Expand Down Expand Up @@ -92,55 +99,46 @@
</layout>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Status Relais:</string>
</property>
</widget>
</item>
<item row="12" column="0">
<widget class="QGroupBox" name="groupBox_4">
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox_6">
<property name="title">
<string>Relais 2 (D2):</string>
<string>Settings</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QLineEdit" name="lineEditRelaisName2">
<widget class="QPushButton" name="pushButtonSettings">
<property name="text">
<string>30B</string>
</property>
<property name="readOnly">
<bool>true</bool>
<string>Settings...</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBoxRelais2">
<widget class="QPushButton" name="pushButtonDefaultSettings">
<property name="text">
<string>ON</string>
<string>Default</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonRelais2Trigger">
<widget class="QPushButton" name="pushButtonLoadSettings">
<property name="text">
<string>Trigger</string>
<string>Load...</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<widget class="QPushButton" name="pushButtonSaveSettings">
<property name="text">
<string>Save...</string>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonInfo">
<property name="text">
<string>Info...</string>
</property>
</spacer>
</widget>
</item>
</layout>
</widget>
Expand All @@ -152,19 +150,6 @@
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="pushButtonStart">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Start</string>
</property>
</widget>
</item>
<item row="13" column="0">
<widget class="QGroupBox" name="groupBox_5">
<property name="title">
Expand Down Expand Up @@ -211,45 +196,67 @@
</layout>
</widget>
</item>
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox_6">
<item row="12" column="0">
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
<string>Settings</string>
<string>Relais 2 (D2):</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QPushButton" name="pushButtonSettings">
<widget class="QLineEdit" name="lineEditRelaisName2">
<property name="text">
<string>Settings...</string>
<string>30B</string>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonDefaultSettings">
<widget class="QCheckBox" name="checkBoxRelais2">
<property name="text">
<string>Default</string>
<string>ON</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonLoadSettings">
<widget class="QPushButton" name="pushButtonRelais2Trigger">
<property name="text">
<string>Load...</string>
<string>Trigger</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonSaveSettings">
<property name="text">
<string>Save...</string>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="4" column="0">
<widget class="QLineEdit" name="lineEditStatus">
<item row="2" column="0">
<widget class="QPushButton" name="pushButtonStop">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Stop</string>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLineEdit" name="lineEditStatusDLT">
<property name="readOnly">
<bool>true</bool>
</property>
Expand Down
Binary file added doc/images/DLTRelais.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions infodialog.cpp
Original file line number Diff line number Diff line change
@@ -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;
}
22 changes: 22 additions & 0 deletions infodialog.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#ifndef INFODIALOG_H
#define INFODIALOG_H

#include <QDialog>

namespace Ui {
class InfoDialog;
}

class InfoDialog : public QDialog
{
Q_OBJECT

public:
explicit InfoDialog(QWidget *parent = nullptr);
~InfoDialog();

private:
Ui::InfoDialog *ui;
};

#endif // INFODIALOG_H
Loading

0 comments on commit b91fac8

Please sign in to comment.