MythTV  master
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
}
 
enum  Visibility {
  kNone = 0, kAll = ~0, kPlayback = (1 << 0), kSettings = (1 << 1),
  kWizard = (1 << 2), kVideos = (1 << 3), kMusic = (1 << 4), kRecordings = (1 << 5)
}
 

Public Member Functions

 MythNotification (Type nType, void *Parent=nullptr)
 
 MythNotification (int Id, void *Parent)
 
 MythNotification (const QString &Title, const QString &Author, const QString &Details=QString())
 
 MythNotification (Type nType, const QString &Title, const QString &Author, const QString &Details=QString(), const QString &Extra=QString())
 
 MythNotification (Type nType, DMAP Metadata)
 
 MythNotification (const MythEvent &Event)
 
 ~MythNotification () override=default
 
MythEventclone () const override
 
void SetId (int Id)
 Contains the application registration id. More...
 
void SetParent (void *Parent)
 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. More...
 
void SetFullScreen (bool FullScreen)
 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 &Description)
 Contains a short description of the notification. More...
 
void SetMetaData (const DMAP &MetaData)
 metadata of the notification. In DMAP format. DMAP can contains various information such as artist, album name, author name, genre etc.. More...
 
void SetDuration (std::chrono::seconds Duration)
 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. More...
 
void SetStyle (const QString &sStyle)
 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. More...
 
void SetVisibility (VNMask nVisibility)
 Define a bitmask of Visibility. More...
 
void SetPriority (Priority nPriority)
 Reserved for future use, not implemented at this stage. More...
 
void ToStringList ()
 
bool FromStringList ()
 
int GetId () const
 
void * GetParent () const
 
bool GetFullScreen () const
 
QString GetDescription () const
 
DMAP GetMetaData () const
 
std::chrono::seconds GetDuration () const
 
QString GetStyle () const
 
VNMask GetVisibility () const
 
Priority GetPriority () const
 
- Public Member Functions inherited from MythEvent
 MythEvent (int type)
 
 MythEvent (int type, QString lmessage)
 
 MythEvent (int type, QString lmessage, QStringList lextradata)
 
 MythEvent (QString lmessage)
 
 MythEvent (QString lmessage, QStringList lextradata)
 
 MythEvent (QString lmessage, const QString &lextradata)
 
 ~MythEvent () override
 
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)
 

Static Public Attributes

static Type New = static_cast<QEvent::Type>(QEvent::registerEventType())
 
static Type Update = static_cast<QEvent::Type>(QEvent::registerEventType())
 
static Type Info = static_cast<QEvent::Type>(QEvent::registerEventType())
 
static Type Error = static_cast<QEvent::Type>(QEvent::registerEventType())
 
static Type Warning = static_cast<QEvent::Type>(QEvent::registerEventType())
 
static Type Check = static_cast<QEvent::Type>(QEvent::registerEventType())
 
static Type Busy = static_cast<QEvent::Type>(QEvent::registerEventType())
 
- Static Public Attributes inherited from MythEvent
static Type MythEventMessage
 
static Type MythUserMessage
 
static Type kUpdateTvProgressEventType
 
static Type kExitToMainMenuEventType
 
static Type kMythPostShowEventType
 
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 &Notification)
 
MythNotificationoperator= (const MythNotification &)
 

Protected Attributes

int m_id { -1 }
 
void * m_parent { nullptr }
 
bool m_fullScreen { false }
 
QString m_description
 
std::chrono::seconds m_duration { 0s }
 
DMAP m_metadata
 
QString m_style
 
VNMask m_visibility { static_cast<VNMask>(kAll) }
 
Priority m_priority { kDefault }
 
- Protected Attributes inherited from MythEvent
QString m_message
 
QStringList m_extradata
 

Detailed Description

Definition at line 29 of file mythnotification.h.

Member Enumeration Documentation

◆ Priority

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 55 of file mythnotification.h.

◆ Visibility

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 71 of file mythnotification.h.

Constructor & Destructor Documentation

◆ MythNotification() [1/7]

MythNotification::MythNotification ( Type  nType,
void *  Parent = nullptr 
)

Definition at line 17 of file mythnotification.cpp.

Referenced by clone().

◆ MythNotification() [2/7]

MythNotification::MythNotification ( int  Id,
void *  Parent 
)

Definition at line 23 of file mythnotification.cpp.

◆ MythNotification() [3/7]

MythNotification::MythNotification ( const QString &  Title,
const QString &  Author,
const QString &  Details = QString() 
)

Definition at line 30 of file mythnotification.cpp.

◆ MythNotification() [4/7]

MythNotification::MythNotification ( Type  nType,
const QString &  Title,
const QString &  Author,
const QString &  Details = QString(),
const QString &  Extra = QString() 
)

Definition at line 39 of file mythnotification.cpp.

◆ MythNotification() [5/7]

MythNotification::MythNotification ( Type  nType,
DMAP  Metadata 
)

Definition at line 48 of file mythnotification.cpp.

◆ MythNotification() [6/7]

MythNotification::MythNotification ( const MythEvent Event)
explicit

Definition at line 55 of file mythnotification.cpp.

◆ ~MythNotification()

MythNotification::~MythNotification ( )
overridedefault

◆ MythNotification() [7/7]

MythNotification::MythNotification ( const MythNotification Notification)
protected

Definition at line 61 of file mythnotification.cpp.

Member Function Documentation

◆ clone()

MythEvent * MythNotification::clone ( ) const
overridevirtual

Reimplemented from MythEvent.

Reimplemented in MythMediaNotification, MythPlaybackNotification, and MythImageNotification.

Definition at line 76 of file mythnotification.cpp.

Referenced by NCPrivate::Queue().

◆ SetId()

void MythNotification::SetId ( int  Id)

Contains the application registration id.

Required to update an existing notification screen owned by an application

Definition at line 85 of file mythnotification.cpp.

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

◆ SetParent()

void MythNotification::SetParent ( void *  Parent)

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 98 of file mythnotification.cpp.

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

◆ SetFullScreen()

void MythNotification::SetFullScreen ( bool  FullScreen)

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 107 of file mythnotification.cpp.

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

◆ SetDescription()

void MythNotification::SetDescription ( const QString &  Description)

Contains a short description of the notification.

Definition at line 115 of file mythnotification.cpp.

◆ SetMetaData()

void MythNotification::SetMetaData ( const DMAP MetaData)

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

Definition at line 125 of file mythnotification.cpp.

◆ SetDuration()

void MythNotification::SetDuration ( std::chrono::seconds  Duration)

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 136 of file mythnotification.cpp.

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

◆ SetStyle()

void MythNotification::SetStyle ( const QString &  sStyle)

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 146 of file mythnotification.cpp.

Referenced by ShowNotification().

◆ SetVisibility()

void MythNotification::SetVisibility ( VNMask  nVisibility)

◆ SetPriority()

void MythNotification::SetPriority ( Priority  nPriority)

Reserved for future use, not implemented at this stage.

Definition at line 162 of file mythnotification.cpp.

Referenced by ShowNotification().

◆ TypeFromString()

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

Definition at line 228 of file mythnotification.cpp.

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

◆ ToStringList()

void MythNotification::ToStringList ( )

◆ FromStringList()

bool MythNotification::FromStringList ( )

Definition at line 184 of file mythnotification.cpp.

Referenced by MythNotification().

◆ GetId()

int MythNotification::GetId ( ) const
inline

Definition at line 97 of file mythnotification.h.

Referenced by NCPrivate::Queue().

◆ GetParent()

void* MythNotification::GetParent ( ) const
inline

Definition at line 98 of file mythnotification.h.

Referenced by NCPrivate::Queue().

◆ GetFullScreen()

bool MythNotification::GetFullScreen ( ) const
inline

Definition at line 99 of file mythnotification.h.

Referenced by MythNotificationScreen::SetNotification().

◆ GetDescription()

QString MythNotification::GetDescription ( ) const
inline

Definition at line 100 of file mythnotification.h.

◆ GetMetaData()

DMAP MythNotification::GetMetaData ( ) const
inline

Definition at line 101 of file mythnotification.h.

Referenced by MythNotificationScreen::SetNotification().

◆ GetDuration()

std::chrono::seconds MythNotification::GetDuration ( ) const
inline

Definition at line 102 of file mythnotification.h.

Referenced by MythNotificationScreen::SetNotification().

◆ GetStyle()

QString MythNotification::GetStyle ( ) const
inline

Definition at line 103 of file mythnotification.h.

Referenced by MythNotificationScreen::SetNotification().

◆ GetVisibility()

VNMask MythNotification::GetVisibility ( ) const
inline

◆ GetPriority()

Priority MythNotification::GetPriority ( ) const
inline

Definition at line 105 of file mythnotification.h.

Referenced by MythNotificationScreen::SetNotification().

◆ operator=()

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

Member Data Documentation

◆ New

Type MythNotification::New = static_cast<QEvent::Type>(QEvent::registerEventType())
inlinestatic

◆ Update

Type MythNotification::Update = static_cast<QEvent::Type>(QEvent::registerEventType())
inlinestatic

◆ Info

Type MythNotification::Info = static_cast<QEvent::Type>(QEvent::registerEventType())
inlinestatic

Definition at line 34 of file mythnotification.h.

Referenced by MusicPlayer::sendNotification().

◆ Error

Type MythNotification::Error = static_cast<QEvent::Type>(QEvent::registerEventType())
inlinestatic

◆ Warning

Type MythNotification::Warning = static_cast<QEvent::Type>(QEvent::registerEventType())
inlinestatic

◆ Check

Type MythNotification::Check = static_cast<QEvent::Type>(QEvent::registerEventType())
inlinestatic

◆ Busy

Type MythNotification::Busy = static_cast<QEvent::Type>(QEvent::registerEventType())
inlinestatic

◆ m_id

int MythNotification::m_id { -1 }
protected

Definition at line 115 of file mythnotification.h.

Referenced by SetId().

◆ m_parent

void* MythNotification::m_parent { nullptr }
protected

Definition at line 116 of file mythnotification.h.

Referenced by SetParent().

◆ m_fullScreen

bool MythNotification::m_fullScreen { false }
protected

Definition at line 117 of file mythnotification.h.

Referenced by FromStringList(), SetFullScreen(), and ToStringList().

◆ m_description

QString MythNotification::m_description
protected

Definition at line 118 of file mythnotification.h.

Referenced by FromStringList(), SetDescription(), and ToStringList().

◆ m_duration

std::chrono::seconds MythNotification::m_duration { 0s }
protected

Definition at line 119 of file mythnotification.h.

Referenced by FromStringList(), SetDuration(), SetId(), and ToStringList().

◆ m_metadata

DMAP MythNotification::m_metadata
protected

Definition at line 120 of file mythnotification.h.

Referenced by FromStringList(), SetMetaData(), and ToStringList().

◆ m_style

QString MythNotification::m_style
protected

Definition at line 121 of file mythnotification.h.

Referenced by FromStringList(), SetStyle(), and ToStringList().

◆ m_visibility

VNMask MythNotification::m_visibility { static_cast<VNMask>(kAll) }
protected

Definition at line 122 of file mythnotification.h.

Referenced by FromStringList(), SetVisibility(), and ToStringList().

◆ m_priority

Priority MythNotification::m_priority { kDefault }
protected

Definition at line 123 of file mythnotification.h.

Referenced by FromStringList(), SetPriority(), and ToStringList().


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