2022-10-05 21:19:39 +02:00
|
|
|
#ifndef DIALOGMSG_H
|
|
|
|
#define DIALOGMSG_H
|
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
|
2022-10-23 16:41:36 +02:00
|
|
|
|
2022-10-05 21:19:39 +02:00
|
|
|
namespace Ui {
|
|
|
|
class DialogMsg;
|
|
|
|
}
|
|
|
|
|
2022-11-19 00:07:56 +01:00
|
|
|
//! DialogMsg
|
|
|
|
/*!
|
|
|
|
A dialog message to provide informations to the user
|
|
|
|
*/
|
2022-10-05 21:19:39 +02:00
|
|
|
class DialogMsg : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2022-11-19 00:07:56 +01:00
|
|
|
|
|
|
|
//! Dialog constructor
|
|
|
|
/*!
|
|
|
|
\param title The title
|
|
|
|
\param text The message
|
|
|
|
\param additional Additional informations, usually an error message
|
|
|
|
\param parent The parent Widget
|
|
|
|
*/
|
2023-01-23 19:07:24 +01:00
|
|
|
explicit DialogMsg( const QString& title, const QString& text, const QString& additional, const int& type, QWidget *parent=nullptr );
|
2022-10-05 21:19:39 +02:00
|
|
|
~DialogMsg();
|
|
|
|
|
|
|
|
private slots:
|
2022-11-19 00:07:56 +01:00
|
|
|
|
|
|
|
//! Shows the additional informations
|
2022-10-05 21:19:39 +02:00
|
|
|
void on_button_ShowAdditional_clicked();
|
|
|
|
|
2022-11-19 00:07:56 +01:00
|
|
|
//! Called when the OK button gets clicked
|
2022-10-05 21:19:39 +02:00
|
|
|
void on_button_Ok_clicked();
|
|
|
|
|
|
|
|
private:
|
|
|
|
Ui::DialogMsg *ui;
|
|
|
|
|
|
|
|
bool additional_shown = false;
|
|
|
|
|
|
|
|
int initial_height = 0;
|
|
|
|
int additional_height = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // DIALOGMSG_H
|