ViewSolutions 1.0.100.30ae2aa
View solutions of qml for quasarapp projects
Loading...
Searching...
No Matches
notificationdata.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2018-2024 QuasarApp.
3 * Distributed under the GPLv3 software license, see the accompanying
4 * Everyone is permitted to copy and distribute verbatim copies
5 * of this license document, but changing it is not allowed.
6*/
7
8#ifndef NOTIFICATIONDATA_H
9#define NOTIFICATIONDATA_H
10#include <QObject>
12namespace ViewSolutions {
13
28{
29 Q_GADGET
30
31public:
32
36 enum Type {
42 Error = 2,
43 };
44
52 explicit NotificationData(const QString& title = "",
53 const QString& text = "",
54 const QString& img = "",
55 int type = Type::Normal);
56
61 Q_INVOKABLE QString text() const;
62
67 Q_INVOKABLE QString img() const;
68
69
74 QString imgSrc() const;
75
80 Q_INVOKABLE QString title() const;
81
86 Q_INVOKABLE int type() const;
87
92 Q_INVOKABLE bool isValid() const;
93
98 void setCode(int code);
99
100 bool operator ==(const NotificationData &righ);
101 bool operator !=(const NotificationData &righ);
102
103private:
104 QString getDefaultImage(const int code) const;
105
106 QString _text;
107 QString _img;
108 QString _title;
109 int _type;
110
111};
112}
113#endif // NOTIFICATIONDATA_H
The NotificationData class view data for NotificationServiceView. This class contains a structure wit...
NotificationData(const QString &title="", const QString &text="", const QString &img="", int type=Type::Normal)
NotificationData creates a new notification data object.
Type
The Type enum This enum contatins all available types of the notification messages.
@ Error
This is critical error notifications.
@ Warning
This is warning notification.
@ Normal
This is message for general notification.
The ViewSolutions namespace.
#define VIEWSOLUTION_EXPORT
VIEWSOLUTION_EXPORT marks a symbol as part of the public ViewSolutions API.