ViewSolutions 1.0.100.30ae2aa
View solutions of qml for quasarapp projects
Loading...
Searching...
No Matches
ViewSolutions::NotificationData Class Reference

The NotificationData class view data for NotificationServiceView. This class contains a structure with notification data. More...

#include <notificationdata.h>

Collaboration diagram for ViewSolutions::NotificationData:
Collaboration graph

Public Types

enum  Type { Normal , Warning = 1 , Error = 2 }
 The Type enum This enum contatins all available types of the notification messages. More...

Public Member Functions

 NotificationData (const QString &title="", const QString &text="", const QString &img="", int type=Type::Normal)
 NotificationData creates a new notification data object.
Q_INVOKABLE QString text () const
 text This method return main text message of a question/notification object.
Q_INVOKABLE QString img () const
 img This method return url to image of a question/notification object if url is empty then return default question/notification image.
QString imgSrc () const
 imgSrc This method return url to image of a question/notification object.
Q_INVOKABLE QString title () const
 title This method return title of a question/notification object.
Q_INVOKABLE int type () const
 type This method return type of the notification message or code of the question.
Q_INVOKABLE bool isValid () const
 isValid This method return true if this object is valid.
void setCode (int code)
 setCode This method sets new code of the question.
bool operator== (const NotificationData &righ)
bool operator!= (const NotificationData &righ)

Detailed Description

The NotificationData class view data for NotificationServiceView. This class contains a structure with notification data.

Example:

ViewSolutions::NotificationData data("Title", "Message", ":/res/icon.png",
const QString title = data.title();
const QString text = data.text();
The NotificationData class view data for NotificationServiceView. This class contains a structure wit...
Q_INVOKABLE QString title() const
title This method return title of a question/notification object.
@ Warning
This is warning notification.
Q_INVOKABLE QString text() const
text This method return main text message of a question/notification object.

Definition at line 27 of file notificationdata.h.

Member Enumeration Documentation

◆ Type

The Type enum This enum contatins all available types of the notification messages.

Enumerator
Normal 

This is message for general notification.

Warning 

This is warning notification.

Error 

This is critical error notifications.

Definition at line 36 of file notificationdata.h.

Constructor & Destructor Documentation

◆ NotificationData()

ViewSolutions::NotificationData::NotificationData ( const QString & title = "",
const QString & text = "",
const QString & img = "",
int type = Type::Normal )
explicit

NotificationData creates a new notification data object.

Parameters
titleis the title of the notification.
textis the message of the notification.
imgis the url of the notification image.
typeis the type code of the notification (see Type enum).

Definition at line 11 of file notificationdata.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ img()

QString ViewSolutions::NotificationData::img ( ) const

img This method return url to image of a question/notification object if url is empty then return default question/notification image.

Returns
url of image or url of default image.

Definition at line 25 of file notificationdata.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ imgSrc()

QString ViewSolutions::NotificationData::imgSrc ( ) const

imgSrc This method return url to image of a question/notification object.

Returns
url of image.

Definition at line 33 of file notificationdata.cpp.

Here is the caller graph for this function:

◆ isValid()

bool ViewSolutions::NotificationData::isValid ( ) const

isValid This method return true if this object is valid.

Returns
return true if this object is valid.

Definition at line 72 of file notificationdata.cpp.

◆ operator!=()

bool ViewSolutions::NotificationData::operator!= ( const NotificationData & righ)

Definition at line 48 of file notificationdata.cpp.

Here is the call graph for this function:

◆ operator==()

bool ViewSolutions::NotificationData::operator== ( const NotificationData & righ)

Definition at line 41 of file notificationdata.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setCode()

void ViewSolutions::NotificationData::setCode ( int code)

setCode This method sets new code of the question.

Parameters
codeare new value of the code.

Definition at line 76 of file notificationdata.cpp.

◆ text()

QString ViewSolutions::NotificationData::text ( ) const

text This method return main text message of a question/notification object.

Returns
plain text of message.

Definition at line 21 of file notificationdata.cpp.

Here is the caller graph for this function:

◆ title()

QString ViewSolutions::NotificationData::title ( ) const

title This method return title of a question/notification object.

Returns
title of a question/notification object.

Definition at line 37 of file notificationdata.cpp.

Here is the caller graph for this function:

◆ type()

int ViewSolutions::NotificationData::type ( ) const

type This method return type of the notification message or code of the question.

Returns
type of the notification message or code of the question.

Definition at line 68 of file notificationdata.cpp.

Here is the caller graph for this function:

The documentation for this class was generated from the following files: