Skip to content

Commit

Permalink
Add ability to set a different "style" to a notification.
Browse files Browse the repository at this point in the history
This will make the notification center attempt to use a different theme if available.
  • Loading branch information
jyavenard committed Jul 6, 2013
1 parent ff45ed3 commit ede1fc4
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions mythtv/libs/libmythui/mythnotification.h
Expand Up @@ -121,20 +121,29 @@ class MUI_PUBLIC MythNotification : public MythEvent
/**
* contains a short description of the notification
*/
void SetDescription(const QString desc) { m_description = desc; }
void SetDescription(const QString &desc) { m_description = desc; }
/**
* metadata of the notification.
* In DMAP format. DMAP can contains various information such as artist,
* album name, author name, genre etc..
*/
void SetMetaData(const DMAP &data) { m_metadata = data; }
/**
* contains a duration during which the notification will be displayed.
* contains a duration during which the notification will be displayed for.
* The duration is informative only as the MythUINotificationCenter will
* determine automatically how long a notification can be displayed for
* and will depend on priority, visibility and other factors
*/
void SetDuration(int duration) { m_duration = duration; };
/**
* contains an alternative notification style.
* Should a style be defined, the Notification Center will attempt to load
* an alternative theme and fall back to the default one if unsuccessful
*/
void SetStyle(const QString &style) { m_style = style; }
/**
* For future use, not implemented at this stage
*/
void SetVisibility(Visibility n) { m_visibility = n; }
void SetPriority(Priority n) { m_priority = n; }

Expand All @@ -145,6 +154,7 @@ class MUI_PUBLIC MythNotification : public MythEvent
QString GetDescription(void) { return m_description; }
DMAP GetMetaData(void) { return m_metadata; }
int GetDuration(void) { return m_duration; };
QString GetStyle(void) { return m_style; }
Visibility GetVisibility(void) { return m_visibility; }
Priority GetPriority(void) { return m_priority; }

Expand All @@ -167,6 +177,7 @@ class MUI_PUBLIC MythNotification : public MythEvent
QString m_description;
int m_duration;
DMAP m_metadata;
QString m_style;
Visibility m_visibility;
Priority m_priority;
};
Expand Down

0 comments on commit ede1fc4

Please sign in to comment.