CCIMXDesktop
 
Loading...
Searching...
No Matches
ToastMetaProtocol.h
Go to the documentation of this file.
1
6#ifndef TOASTMETAPROTOCOL_H
7#define TOASTMETAPROTOCOL_H
8
9#include <QDateTime> // For QDateTime to store announcement time
10#include <QString> // For QString to hold text data
11#include <optional> // For std::optional in from_json_string
12
27 QString meta_appName;
28
33 QDateTime announceTime;
34
40
45 ToastMetaProtocol() = default;
46
53 ToastMetaProtocol(const QString meta_app, const QString displayMessage, const QDateTime t = QDateTime::currentDateTime());
54
62 ToastMetaProtocol(const QString& json_string);
63
74 static std::optional<ToastMetaProtocol> from_json_string(const QString& json_string);
75
80 QString toString() const;
81};
82
83#endif // TOASTMETAPROTOCOL_H
Represents the metadata and content for a toast notification.
Definition ToastMetaProtocol.h:22
QDateTime announceTime
The exact date and time when the toast notification was announced. This helps in ordering or time-sta...
Definition ToastMetaProtocol.h:33
QString toString() const
Converts the ToastMetaProtocol object into its JSON string representation.
Definition ToastMetaProtocol.cpp:42
QString meta_displayMessage
The main message content to be displayed in the toast notification. This is the primary textual infor...
Definition ToastMetaProtocol.h:39
QString meta_appName
The name of the application that generated the toast notification. This can be used to identify the s...
Definition ToastMetaProtocol.h:27
ToastMetaProtocol()=default
Default constructor for ToastMetaProtocol. Initializes members to their default values (empty strings...
static std::optional< ToastMetaProtocol > from_json_string(const QString &json_string)
Creates an optional ToastMetaProtocol object from a JSON string.
Definition ToastMetaProtocol.cpp:27