Vesna
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Public Slots | Public Member Functions | List of all members
ToastMessageFormLogic Class Reference

#include <ToastMessageFormLogic.h>

Inheritance diagram for ToastMessageFormLogic:
Inheritance graph
[legend]
Collaboration diagram for ToastMessageFormLogic:
Collaboration graph
[legend]

Classes

class  DataClass
 

Public Slots

void OnFinishedHidingMessage (ToastMessageWidget *message)
 OnFinishedHidingMessage - Removes ToastMessageWidget from layout and manager. This slot should be called by ToastMessageWidget when hiding animation finishes. More...
 

Public Member Functions

 ToastMessageFormLogic (QWidget *parentWidget)
 
virtual ~ToastMessageFormLogic ()
 
int32_t AddMessage (const QString &text, uint16_t timeDuration=DEFAULT_TOAST_TIME_DURATION)
 AddMessage - create and show new ToastMessageWidget with specified text. If max message count was reached, oldest message will be removed. More...
 
bool HideMessage (const int32_t messageId)
 HideMessage - hides toast message with specified ID. More...
 
void OnSecondTick ()
 OnSecondTick - checks time duration of all messages and compares it to current time. If time duration expired, hiding animation will be started. More...
 

Constructor & Destructor Documentation

ToastMessageFormLogic::ToastMessageFormLogic ( QWidget *  parentWidget)
explicit
ToastMessageFormLogic::~ToastMessageFormLogic ( )
virtual

Member Function Documentation

int32_t ToastMessageFormLogic::AddMessage ( const QString &  text,
uint16_t  timeDuration = DEFAULT_TOAST_TIME_DURATION 
)

AddMessage - create and show new ToastMessageWidget with specified text. If max message count was reached, oldest message will be removed.

Parameters
text- the content of a message (warning - text may be trimmed by ToastMessageWidget if it is too long)
timeDuration- time duration of the message, message will start hiding animation after this time
Returns
ID of created toast message

Here is the call graph for this function:

bool ToastMessageFormLogic::HideMessage ( const int32_t  messageId)

HideMessage - hides toast message with specified ID.

Parameters
messageId- ID of the message which is returned from AddMessage()
Returns
true if hiding was successful, false otherwise (wrong message ID?)

Here is the call graph for this function:

void ToastMessageFormLogic::OnFinishedHidingMessage ( ToastMessageWidget message)
slot

OnFinishedHidingMessage - Removes ToastMessageWidget from layout and manager. This slot should be called by ToastMessageWidget when hiding animation finishes.

Parameters
message- ToastMessageWidget to be removed
void ToastMessageFormLogic::OnSecondTick ( )

OnSecondTick - checks time duration of all messages and compares it to current time. If time duration expired, hiding animation will be started.

Here is the call graph for this function:


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