Vesna
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
PopUpMessageCreator Class Reference

#include <PopUpMessageCreator.h>

Public Types

enum  MessageFlag { NoFlags = 0x0000, MessageFlagTitleHidden = 0x0001 }
 

Public Member Functions

 PopUpMessageCreator ()
 

Static Public Member Functions

static PopUpMessageIDType ShowHideableInfoOnTouch (const QString &title, const QString &message, const PopUpMessageWidget::MessageType messageType, const QString &messageLabel)
 
static PopUpMessageIDType ShowError (const QString &title, const QString &message, PopUpMessageWidget::Buttons buttons=PopUpMessageWidget::Ok, PopUpMessageButtonHandler *handler=nullptr)
 ShowError - static function that creates and shows a pop-up window of type 'Error'. It is possible to set a button handler if necessary. More...
 
static PopUpMessageIDType ShowWarning (const QString &title, const QString &message, PopUpMessageWidget::Buttons buttons=PopUpMessageWidget::Ok, PopUpMessageButtonHandler *handler=nullptr)
 ShowWarning - static function that creates and shows a pop-up window of type 'Warning'. It is possible to set a button handler if necessary. More...
 
static PopUpMessageIDType ShowInfo (const QString &title, const QString &message, PopUpMessageWidget::Buttons buttons=PopUpMessageWidget::Ok, PopUpMessageButtonHandler *handler=nullptr)
 ShowInfo - static function that creates and shows a pop-up window of type 'Information'. It is possible to set a button handler if necessary. More...
 
static PopUpMessageIDType ShowNotice (const QString &title, const QString &message, PopUpMessageWidget::Buttons buttons, PopUpMessageButtonHandler *handler=nullptr)
 ShowNotice - static function that creates and shows a pop-up window of type 'Notice'. It is possible to set a button handler if necessary. More...
 
static PopUpMessageIDType ShowMessage (const QString &title, const QString &message, PopUpMessageWidget::MessageType messageType=PopUpMessageWidget::Information, MessageFlags messageFlags=NoFlags, PopUpMessageWidget::Buttons buttons=PopUpMessageWidget::Ok, const std::initializer_list< std::pair< PopUpMessageWidget::Button, ApplicationDefines::ButtonAction > > &buttonActions={})
 ShowMessage - static function that creates and shows a pop-up window of given type. It automatically creates a new PopUpMessageButtonHandler and registers button actions given in the buttonActions parameter. The parameter's type is std::initializer_list of pairs of type std::pair<Button, ButtonAction>. Example usage: More...
 
static PopUpMessageIDType ShowMessage (const QString &title, const QStringPairList &stringPairs, PopUpMessageWidget::MessageType messageType=PopUpMessageWidget::Information, MessageFlags messageFlags=NoFlags, PopUpMessageWidget::Buttons buttons=PopUpMessageWidget::Ok, const std::initializer_list< std::pair< PopUpMessageWidget::Button, ApplicationDefines::ButtonAction > > &buttonActions={})
 ShowMessage - static function that creates and shows a pop-up window of given type where text is shown in two columns. More...
 
static PopUpMessageIDType ShowMessage (const QString &title, const QString &message, PopUpMessageWidget::MessageType messageType, PopUpMessageWidget::Buttons buttons, PopUpMessageButtonHandler *handler, const std::initializer_list< std::pair< PopUpMessageWidget::Button, QString > > &buttonTexts={}, unsigned short timeout=0, const QString &messageLabel="")
 ShowMessage - static function that creates and shows a pop-up window of given type and handler and allows to set special button texts Example usage: More...
 
static PopUpMessageIDType ShowModalMessage (const QString &title, const QString &message, PopUpMessageWidget::Button &userResponseClickedButton, PopUpMessageWidget::MessageType messageType=PopUpMessageWidget::Question, PopUpMessageWidget::Buttons buttons=PopUpMessageWidget::Yes|PopUpMessageWidget::No)
 ShowModalMessage - static method provided for convenience. Works similarly to other methods here except the message is modal. So application stops and waits for user response. Suitable for Yes/No questions for example. More...
 
static void ClosePopUp (const PopUpMessageIDType popUpID)
 
static bool IsPopUpDisplayed (const PopUpMessageIDType popUpID=POP_UP_ID_UNDEFINED)
 

Static Public Attributes

static const PopUpMessageIDType POP_UP_ID_UNDEFINED = 0
 

Member Enumeration Documentation

Enumerator
NoFlags 
MessageFlagTitleHidden 

Constructor & Destructor Documentation

PopUpMessageCreator::PopUpMessageCreator ( )

Member Function Documentation

void PopUpMessageCreator::ClosePopUp ( const PopUpMessageIDType  popUpID)
static

Here is the call graph for this function:

Here is the caller graph for this function:

bool PopUpMessageCreator::IsPopUpDisplayed ( const PopUpMessageIDType  popUpID = POP_UP_ID_UNDEFINED)
static

Here is the caller graph for this function:

PopUpMessageIDType PopUpMessageCreator::ShowError ( const QString &  title,
const QString &  message,
PopUpMessageWidget::Buttons  buttons = PopUpMessageWidget::Ok,
PopUpMessageButtonHandler handler = nullptr 
)
static

ShowError - static function that creates and shows a pop-up window of type 'Error'. It is possible to set a button handler if necessary.

Parameters
title- title of the error message
message- text of the error message
buttons- buttons (from the Button enum) that will be shown in the pop-up window. Default is 'Ok'.
handler- button handler to be used to handle button clicks
Returns
pop up message ID
PopUpMessageIDType PopUpMessageCreator::ShowHideableInfoOnTouch ( const QString &  title,
const QString &  message,
const PopUpMessageWidget::MessageType  messageType,
const QString &  messageLabel 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

PopUpMessageIDType PopUpMessageCreator::ShowInfo ( const QString &  title,
const QString &  message,
PopUpMessageWidget::Buttons  buttons = PopUpMessageWidget::Ok,
PopUpMessageButtonHandler handler = nullptr 
)
static

ShowInfo - static function that creates and shows a pop-up window of type 'Information'. It is possible to set a button handler if necessary.

Parameters
title- title of the information message
message- text of the information message
buttons- buttons (from the Button enum) that will be shown in the pop-up window. Default is 'Ok'.
handler- button handler to be used to handle button clicks
Returns
pop up message ID

Here is the caller graph for this function:

PopUpMessageIDType PopUpMessageCreator::ShowMessage ( const QString &  title,
const QString &  message,
PopUpMessageWidget::MessageType  messageType = PopUpMessageWidget::Information,
MessageFlags  messageFlags = NoFlags,
PopUpMessageWidget::Buttons  buttons = PopUpMessageWidget::Ok,
const std::initializer_list< std::pair< PopUpMessageWidget::Button, ApplicationDefines::ButtonAction > > &  buttonActions = {} 
)
static

ShowMessage - static function that creates and shows a pop-up window of given type. It automatically creates a new PopUpMessageButtonHandler and registers button actions given in the buttonActions parameter. The parameter's type is std::initializer_list of pairs of type std::pair<Button, ButtonAction>. Example usage:

ButtonAction someAction = / * some action here * /;
ButtonAction someOtherAction = / * some other action here * /;
PopUpMessageWidget::ShowMessage( / * previous parameters * /, { { Button::Ok, someAction }, { Button::Cancel, someOtherAction } } );
Parameters
title- title of the message
message- text of the message
messageFlags- flags that alter the default behaviour and looks of the message,
See also
enum MessageFlags
Parameters
messageType- type of the message. Default is 'Information'.
buttons- buttons (from the Button enum) that will be shown in the pop-up window. Default is 'Ok'.
buttonActions- initializer list of Button-Action pairs.
Returns
pop up message ID

Here is the call graph for this function:

Here is the caller graph for this function:

PopUpMessageIDType PopUpMessageCreator::ShowMessage ( const QString &  title,
const QStringPairList stringPairs,
PopUpMessageWidget::MessageType  messageType = PopUpMessageWidget::Information,
MessageFlags  messageFlags = NoFlags,
PopUpMessageWidget::Buttons  buttons = PopUpMessageWidget::Ok,
const std::initializer_list< std::pair< PopUpMessageWidget::Button, ApplicationDefines::ButtonAction > > &  buttonActions = {} 
)
static

ShowMessage - static function that creates and shows a pop-up window of given type where text is shown in two columns.

Parameters
title- title of the message
stringPairs- text of the message in form of string pairs. One pair is shown as one row, where first string is in first column and second string in second column.
messageFlags- flags that alter the default behaviour and looks of the message,
See also
enum MessageFlags
Parameters
messageType- type of the message. Default is 'Information'.
buttons- buttons (from the Button enum) that will be shown in the pop-up window. Default is 'Ok'.
buttonActions- initializer list of Button-Action pairs.
Returns
pop up message ID

Here is the call graph for this function:

PopUpMessageIDType PopUpMessageCreator::ShowMessage ( const QString &  title,
const QString &  message,
PopUpMessageWidget::MessageType  messageType,
PopUpMessageWidget::Buttons  buttons,
PopUpMessageButtonHandler handler,
const std::initializer_list< std::pair< PopUpMessageWidget::Button, QString > > &  buttonTexts = {},
unsigned short  timeout = 0,
const QString &  messageLabel = "" 
)
static

ShowMessage - static function that creates and shows a pop-up window of given type and handler and allows to set special button texts Example usage:

PopUpMessageWidget::ShowMessage( / * previous parameters * /, { { Button::Ok, QString("Sure") }, { Button::Cancel, QString("Nope") } } );
Parameters
title- title of the message
message- text of the message
messageType- type of the message.
buttons- buttons (from the Button enum) that will be shown in the pop-up window.
handler- button handler to be used to handle button clicks
buttonTexts- initializer list of Button-QString pairs.
timeout- message timeout in seconds (0 = no timeout)
Returns
pop up message ID

Here is the call graph for this function:

PopUpMessageIDType PopUpMessageCreator::ShowModalMessage ( const QString &  title,
const QString &  message,
PopUpMessageWidget::Button userResponseClickedButton,
PopUpMessageWidget::MessageType  messageType = PopUpMessageWidget::Question,
PopUpMessageWidget::Buttons  buttons = PopUpMessageWidget::Yes | PopUpMessageWidget::No 
)
static

ShowModalMessage - static method provided for convenience. Works similarly to other methods here except the message is modal. So application stops and waits for user response. Suitable for Yes/No questions for example.

Returns
pop up message ID

Here is the call graph for this function:

Here is the caller graph for this function:

PopUpMessageIDType PopUpMessageCreator::ShowNotice ( const QString &  title,
const QString &  message,
PopUpMessageWidget::Buttons  buttons,
PopUpMessageButtonHandler handler = nullptr 
)
static

ShowNotice - static function that creates and shows a pop-up window of type 'Notice'. It is possible to set a button handler if necessary.

Parameters
title- title of the message
message- text of the message
buttons- buttons (from the Button enum) that will be shown in the pop-up window.
handler- button handler to be used to handle button clicks
Returns
pop up message ID

Here is the caller graph for this function:

PopUpMessageIDType PopUpMessageCreator::ShowWarning ( const QString &  title,
const QString &  message,
PopUpMessageWidget::Buttons  buttons = PopUpMessageWidget::Ok,
PopUpMessageButtonHandler handler = nullptr 
)
static

ShowWarning - static function that creates and shows a pop-up window of type 'Warning'. It is possible to set a button handler if necessary.

Parameters
title- title of the warning message
message- text of the warning message
buttons- buttons (from the Button enum) that will be shown in the pop-up window. Default is 'Ok'.
handler- button handler to be used to handle button clicks
Returns
pop up message ID

Here is the caller graph for this function:

Member Data Documentation

const PopUpMessageIDType PopUpMessageCreator::POP_UP_ID_UNDEFINED = 0
static

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