Songbook-Client  0.7
This application is a manager of customguitar songbooks
 All Classes Files Functions Variables Enumerations Enumerator Pages
Public Types | Public Member Functions
CNotification Class Reference

CNotification is a widget to provide exceptionnal information. More...

#include <notification.hh>

List of all members.

Public Types

enum  Priority { LowPriority, MediumPriority, HighPriority }

Public Member Functions

 CNotification (QWidget *parent)
 Constructor.
QString message () const
void setMessage (const QString &message)
Priority priority () const
void setPriority (const Priority &level)
void addAction (QAction *action)
CMainWindowparent () const

Detailed Description

CNotification is a widget to provide exceptionnal information.

notification.png

A notification is supposed to appear as a ribbon at the top of the main window, giving the user a description of an unusal behavior with possible actions to choose from.


Member Function Documentation

void CNotification::addAction ( QAction *  action)

Add an action to the notification. Actions result in QPushButtons on the right side, organised in a vertical layout.

Parameters:
actionthe action
QString CNotification::message ( ) const

Getter on the notification message. The message is the main information provided by the widget. Based on this message, the user can select appropriate actions.

Returns:
the message
CMainWindow * CNotification::parent ( ) const

Getter on the parent widget.

Returns:
the parent widget
CNotification::Priority CNotification::priority ( ) const

Getter on the notification priority. The priority indicates the level of importance of the notification. As a result, the icon and color background of the notification area may change to highlight this level of priority.

Returns:
the priority
void CNotification::setMessage ( const QString &  message)

Setter on the notification message. The message is the main information provided by the widget. Based on this message, the user can select appropriate actions.

Parameters:
messagethe message
void CNotification::setPriority ( const Priority &  level)

Setter on the notification priority. The priority indicates the level of importance of the notification. As a result, the icon and color background of the notification area may change to highlight this level of priority.

Parameters:
levelthe priority level

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