MythTV  0.28pre
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
MythNotification Class Reference

#include <mythnotification.h>

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

Public Types

enum  Priority {
  kDefault = 0, kLow, kMedium, kHigh,
  kHigher, kHighest
}
 Priority enum A notification can be given a priority. More...
 
enum  Visibility {
  kNone = 0, kAll = ~0, kPlayback = (1 << 0), kSettings = (1 << 1),
  kWizard = (1 << 2), kVideos = (1 << 3), kMusic = (1 << 4), kRecordings = (1 << 5)
}
 Visibility enum A notification can be given visibility mask allowing to not be visible under some circumstances, like the screen currently being displayed. More...
 

Public Member Functions

 MythNotification (Type t, void *parent=NULL)
 
 MythNotification (int id, void *parent)
 
 MythNotification (const QString &title, const QString &author, const QString &details=QString())
 
 MythNotification (Type t, const QString &title, const QString &author, const QString &details=QString())
 
 MythNotification (Type t, const DMAP &metadata)
 
virtual ~MythNotification ()
 
virtual MythEventclone (void) const
 
void SetId (int id)
 Optional MythNotification elements. More...
 
void SetParent (void *parent)
 contains the parent address. More...
 
void SetFullScreen (bool f)
 a notification may request to be displayed in full screen, this request may not be fullfilled should the theme not handle full screen notification More...
 
void SetDescription (const QString &desc)
 contains a short description of the notification More...
 
void SetMetaData (const DMAP &data)
 metadata of the notification. More...
 
void SetDuration (int duration)
 contains a duration during which the notification will be displayed for. More...
 
void SetStyle (const QString &style)
 contains an alternative notification style. More...
 
void SetVisibility (VNMask n)
 define a bitmask of Visibility More...
 
void SetPriority (Priority n)
 For future use, not implemented at this stage. More...
 
int GetId (void) const
 
voidGetParent (void) const
 
bool GetFullScreen (void) const
 
QString GetDescription (void) const
 
DMAP GetMetaData (void) const
 
int GetDuration (void) const
 
QString GetStyle (void) const
 
VNMask GetVisibility (void) const
 
Priority GetPriority (void) const
 
- Public Member Functions inherited from MythEvent
 MythEvent (int t)
 
 MythEvent (int t, const QString lmessage)
 
 MythEvent (int t, const QString lmessage, const QStringList &lextradata)
 
 MythEvent (const QString lmessage)
 
 MythEvent (const QString lmessage, const QStringList &lextradata)
 
 MythEvent (const QString lmessage, const QString lextradata)
 
virtual ~MythEvent ()
 
const QString & Message () const
 
const QString & ExtraData (int idx=0) const
 
const QStringList & ExtraDataList () const
 
int ExtraDataCount () const
 

Static Public Member Functions

static Type TypeFromString (const QString &type)
 return Type object from type name More...
 

Static Public Attributes

static Type New
 
static Type Update
 
static Type Info
 
static Type Error
 
static Type Warning
 
static Type Check
 
static Type Busy
 
- Static Public Attributes inherited from MythEvent
static Type MythEventMessage
 
static Type MythUserMessage
 
static Type kUpdateTvProgressEventType
 
static Type kExitToMainMenuEventType
 
static Type kMythPostShowEventType
 
static Type kEnableDrawingEventType
 
static Type kDisableDrawingEventType
 
static Type kPushDisableDrawingEventType
 
static Type kPopDisableDrawingEventType
 
static Type kLockInputDevicesEventType
 
static Type kUnlockInputDevicesEventType
 
static Type kUpdateBrowseInfoEventType
 
static Type kDisableUDPListenerEventType
 
static Type kEnableUDPListenerEventType
 

Protected Member Functions

 MythNotification (const MythNotification &o)
 
MythNotificationoperator= (const MythNotification &)
 

Protected Attributes

int m_id
 
voidm_parent
 
bool m_fullScreen
 
QString m_description
 
int m_duration
 
DMAP m_metadata
 
QString m_style
 
VNMask m_visibility
 
Priority m_priority
 

Detailed Description

Definition at line 22 of file mythnotification.h.

Member Enumeration Documentation

Priority enum A notification can be given a priority.

Display order of notification will be sorted according to the priority level

Enumerator
kDefault 
kLow 
kMedium 
kHigh 
kHigher 
kHighest 

Definition at line 89 of file mythnotification.h.

Visibility enum A notification can be given visibility mask allowing to not be visible under some circumstances, like the screen currently being displayed.

This is used to prevent redundant information appearing more than once: like in MythMusic, there's no need to show music notifications

Enumerator
kNone 
kAll 
kPlayback 
kSettings 
kWizard 
kVideos 
kMusic 
kRecordings 

Definition at line 104 of file mythnotification.h.

Constructor & Destructor Documentation

MythNotification::MythNotification ( Type  t,
void parent = NULL 
)
inline

Definition at line 34 of file mythnotification.h.

MythNotification::MythNotification ( int  id,
void parent 
)
inline

Definition at line 40 of file mythnotification.h.

MythNotification::MythNotification ( const QString &  title,
const QString &  author,
const QString &  details = QString() 
)
inline

Definition at line 46 of file mythnotification.h.

MythNotification::MythNotification ( Type  t,
const QString &  title,
const QString &  author,
const QString &  details = QString() 
)
inline

Definition at line 59 of file mythnotification.h.

MythNotification::MythNotification ( Type  t,
const DMAP metadata 
)
inline

Definition at line 72 of file mythnotification.h.

virtual MythNotification::~MythNotification ( )
inlinevirtual

Definition at line 79 of file mythnotification.h.

MythNotification::MythNotification ( const MythNotification o)
inlineprotected

Definition at line 186 of file mythnotification.h.

Member Function Documentation

virtual MythEvent* MythNotification::clone ( void  ) const
inlinevirtual

Reimplemented from MythEvent.

Reimplemented in MythMediaNotification, MythPlaybackNotification, and MythImageNotification.

Definition at line 83 of file mythnotification.h.

Referenced by NCPrivate::Queue().

void MythNotification::SetId ( int  id)
void MythNotification::SetParent ( void parent)
inline

contains the parent address.

Required if id is set Id provided must match the parent address as provided during the MythNotificationCenter registration, otherwise the id value will be ignored

Definition at line 130 of file mythnotification.h.

Referenced by VideoDialog::createFetchDialog(), VideoDialog::dismissFetchDialog(), MythAirplayServer::HandleResponse(), MythContextPrivate::HideConnectionFailurePopup(), MythRAOPConnection::SendNotification(), MusicPlayer::sendNotification(), and MythContextPrivate::ShowConnectionFailurePopup().

void MythNotification::SetFullScreen ( bool  f)
inline

a notification may request to be displayed in full screen, this request may not be fullfilled should the theme not handle full screen notification

Definition at line 136 of file mythnotification.h.

Referenced by MythAirplayServer::HandleResponse(), MythRAOPConnection::SendNotification(), MusicPlayer::sendNotification(), and ShowNotification().

void MythNotification::SetDescription ( const QString &  desc)
inline

contains a short description of the notification

Definition at line 140 of file mythnotification.h.

void MythNotification::SetMetaData ( const DMAP data)
inline

metadata of the notification.

In DMAP format. DMAP can contains various information such as artist, album name, author name, genre etc..

Definition at line 146 of file mythnotification.h.

void MythNotification::SetDuration ( int  duration)
inline

contains a duration during which the notification will be displayed for.

The duration is informative only as the MythNotificationCenter will determine automatically how long a notification can be displayed for and will depend on priority, visibility and other factors

Definition at line 153 of file mythnotification.h.

Referenced by MythContextPrivate::HideConnectionFailurePopup(), MythCheckNotification::MythCheckNotification(), MythErrorNotification::MythErrorNotification(), MythWarningNotification::MythWarningNotification(), MythRAOPConnection::SendNotification(), MusicPlayer::sendNotification(), and ShowNotification().

void MythNotification::SetStyle ( const QString &  style)
inline

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

Definition at line 159 of file mythnotification.h.

void MythNotification::SetVisibility ( VNMask  n)
inline
void MythNotification::SetPriority ( Priority  n)
inline

For future use, not implemented at this stage.

Definition at line 167 of file mythnotification.h.

Referenced by ShowNotification().

MythNotification::Type MythNotification::TypeFromString ( const QString &  type)
static

return Type object from type name

Definition at line 69 of file mythnotification.cpp.

Referenced by MythUDPListener::Process(), and Frontend::SendNotification().

int MythNotification::GetId ( void  ) const
inline

Definition at line 175 of file mythnotification.h.

Referenced by NCPrivate::ProcessQueue(), and NCPrivate::Queue().

void* MythNotification::GetParent ( void  ) const
inline

Definition at line 176 of file mythnotification.h.

Referenced by NCPrivate::Queue().

bool MythNotification::GetFullScreen ( void  ) const
inline

Definition at line 177 of file mythnotification.h.

Referenced by MythNotificationScreen::SetNotification().

QString MythNotification::GetDescription ( void  ) const
inline

Definition at line 178 of file mythnotification.h.

DMAP MythNotification::GetMetaData ( void  ) const
inline

Definition at line 179 of file mythnotification.h.

Referenced by MythNotificationScreen::SetNotification().

int MythNotification::GetDuration ( void  ) const
inline

Definition at line 180 of file mythnotification.h.

Referenced by MythNotificationScreen::SetNotification().

QString MythNotification::GetStyle ( void  ) const
inline

Definition at line 181 of file mythnotification.h.

Referenced by MythNotificationScreen::SetNotification().

VNMask MythNotification::GetVisibility ( void  ) const
inline
Priority MythNotification::GetPriority ( void  ) const
inline

Definition at line 183 of file mythnotification.h.

Referenced by MythNotificationScreen::SetNotification().

MythNotification& MythNotification::operator= ( const MythNotification )
protected

Member Data Documentation

QEvent::Type MythNotification::New
static
Initial value:
=
(QEvent::Type) QEvent::registerEventType()

Definition at line 26 of file mythnotification.h.

Referenced by MythAirplayServer::HandleResponse(), MythRAOPConnection::SendNotification(), ShowNotification(), and TypeFromString().

QEvent::Type MythNotification::Update
static
Initial value:
=
(QEvent::Type) QEvent::registerEventType()

Definition at line 27 of file mythnotification.h.

Referenced by NCPrivate::Queue(), MythRAOPConnection::SendNotification(), and MythNotificationScreen::SetNotification().

QEvent::Type MythNotification::Info
static
Initial value:
=
(QEvent::Type) QEvent::registerEventType()

Definition at line 28 of file mythnotification.h.

Referenced by MusicPlayer::sendNotification().

QEvent::Type MythNotification::Error
static
QEvent::Type MythNotification::Warning
static
Initial value:
=
(QEvent::Type) QEvent::registerEventType()

Definition at line 30 of file mythnotification.h.

Referenced by MythNotificationScreen::SetErrorState(), MythNotificationScreen::SetNotification(), ShowNotification(), and TypeFromString().

QEvent::Type MythNotification::Check
static
Initial value:
=
(QEvent::Type) QEvent::registerEventType()

Definition at line 31 of file mythnotification.h.

Referenced by MythNotificationScreen::SetErrorState(), MythNotificationScreen::SetNotification(), ShowNotification(), and TypeFromString().

QEvent::Type MythNotification::Busy
static
Initial value:
=
(QEvent::Type) QEvent::registerEventType()

Definition at line 32 of file mythnotification.h.

Referenced by MythNotificationScreen::SetErrorState(), MythNotificationScreen::SetNotification(), ShowNotification(), and TypeFromString().

int MythNotification::m_id
protected

Definition at line 201 of file mythnotification.h.

Referenced by SetId().

void* MythNotification::m_parent
protected

Definition at line 202 of file mythnotification.h.

bool MythNotification::m_fullScreen
protected

Definition at line 203 of file mythnotification.h.

QString MythNotification::m_description
protected

Definition at line 204 of file mythnotification.h.

int MythNotification::m_duration
protected

Definition at line 205 of file mythnotification.h.

Referenced by SetId().

DMAP MythNotification::m_metadata
protected

Definition at line 206 of file mythnotification.h.

QString MythNotification::m_style
protected

Definition at line 207 of file mythnotification.h.

VNMask MythNotification::m_visibility
protected

Definition at line 208 of file mythnotification.h.

Priority MythNotification::m_priority
protected

Definition at line 209 of file mythnotification.h.


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