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
 
 MythNotification (MythNotification &&)=delete
 
MythNotificationoperator= (MythNotification &&)=delete
 
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
 
void log (const QString &prefix)
 
MythEventclone () const override
 
 MythEvent (MythEvent &&)=delete
 
MythEventoperator= (MythEvent &&)=delete
 

Static Public Member Functions

static Type TypeFromString (const QString &Type)
 

Static Public Attributes

static const Type kNew = static_cast<QEvent::Type>(QEvent::registerEventType())
 
static const Type kUpdate = static_cast<QEvent::Type>(QEvent::registerEventType())
 
static const Type kInfo = static_cast<QEvent::Type>(QEvent::registerEventType())
 
static const Type kError = static_cast<QEvent::Type>(QEvent::registerEventType())
 
static const Type kWarning = static_cast<QEvent::Type>(QEvent::registerEventType())
 
static const Type kCheck = static_cast<QEvent::Type>(QEvent::registerEventType())
 
static const Type kBusy = static_cast<QEvent::Type>(QEvent::registerEventType())
 
- Static Public Attributes inherited from MythEvent
static const Type kMythEventMessage
 
static const Type kMythUserMessage
 
static const Type kUpdateTvProgressEventType
 
static const Type kExitToMainMenuEventType
 
static const Type kMythPostShowEventType
 
static const Type kPushDisableDrawingEventType
 
static const Type kPopDisableDrawingEventType
 
static const Type kLockInputDevicesEventType
 
static const Type kUnlockInputDevicesEventType
 
static const Type kUpdateBrowseInfoEventType
 
static const Type kDisableUDPListenerEventType
 
static const Type kEnableUDPListenerEventType
 

Protected Member Functions

 MythNotification (const MythNotification &Notification)
 
MythNotificationoperator= (const MythNotification &)
 
- Protected Member Functions inherited from MythEvent
 MythEvent (const MythEvent &other)=default
 
MythEventoperator= (const MythEvent &other)=default
 

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

Constructor & Destructor Documentation

◆ MythNotification() [1/8]

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

Definition at line 25 of file mythnotification.cpp.

Referenced by clone().

◆ MythNotification() [2/8]

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

Definition at line 31 of file mythnotification.cpp.

◆ MythNotification() [3/8]

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

Definition at line 38 of file mythnotification.cpp.

◆ MythNotification() [4/8]

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

Definition at line 47 of file mythnotification.cpp.

◆ MythNotification() [5/8]

MythNotification::MythNotification ( Type  nType,
DMAP  Metadata 
)

Definition at line 56 of file mythnotification.cpp.

◆ MythNotification() [6/8]

MythNotification::MythNotification ( const MythEvent Event)
explicit

Definition at line 63 of file mythnotification.cpp.

◆ ~MythNotification()

MythNotification::~MythNotification ( )
overridedefault

◆ MythNotification() [7/8]

MythNotification::MythNotification ( MythNotification &&  )
delete

◆ MythNotification() [8/8]

MythNotification::MythNotification ( const MythNotification Notification)
protected

Definition at line 69 of file mythnotification.cpp.

Member Function Documentation

◆ clone()

MythEvent * MythNotification::clone ( ) const
override

Definition at line 84 of file mythnotification.cpp.

Referenced by NCPrivate::Queue().

◆ operator=() [1/2]

MythNotification& MythNotification::operator= ( MythNotification &&  )
delete

◆ 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 93 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 106 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 115 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 123 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 133 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 144 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 154 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 170 of file mythnotification.cpp.

Referenced by ShowNotification().

◆ TypeFromString()

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

◆ ToStringList()

void MythNotification::ToStringList ( )

◆ FromStringList()

bool MythNotification::FromStringList ( )

Definition at line 192 of file mythnotification.cpp.

Referenced by MythNotification().

◆ GetId()

int MythNotification::GetId ( ) const
inline

Definition at line 100 of file mythnotification.h.

Referenced by NCPrivate::Queue().

◆ GetParent()

void* MythNotification::GetParent ( ) const
inline

Definition at line 101 of file mythnotification.h.

Referenced by NCPrivate::Queue().

◆ GetFullScreen()

bool MythNotification::GetFullScreen ( ) const
inline

Definition at line 102 of file mythnotification.h.

Referenced by MythNotificationScreen::SetNotification().

◆ GetDescription()

QString MythNotification::GetDescription ( ) const
inline

Definition at line 103 of file mythnotification.h.

◆ GetMetaData()

DMAP MythNotification::GetMetaData ( ) const
inline

Definition at line 104 of file mythnotification.h.

Referenced by MythNotificationScreen::SetNotification().

◆ GetDuration()

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

Definition at line 105 of file mythnotification.h.

Referenced by MythNotificationScreen::SetNotification().

◆ GetStyle()

QString MythNotification::GetStyle ( ) const
inline

Definition at line 106 of file mythnotification.h.

Referenced by MythNotificationScreen::SetNotification().

◆ GetVisibility()

VNMask MythNotification::GetVisibility ( ) const
inline

◆ GetPriority()

Priority MythNotification::GetPriority ( ) const
inline

Definition at line 108 of file mythnotification.h.

Referenced by MythNotificationScreen::SetNotification().

◆ operator=() [2/2]

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

Member Data Documentation

◆ kNew

const QEvent::Type MythNotification::kNew = static_cast<QEvent::Type>(QEvent::registerEventType())
static

◆ kUpdate

const QEvent::Type MythNotification::kUpdate = static_cast<QEvent::Type>(QEvent::registerEventType())
static

◆ kInfo

const QEvent::Type MythNotification::kInfo = static_cast<QEvent::Type>(QEvent::registerEventType())
static

Definition at line 34 of file mythnotification.h.

Referenced by MusicPlayer::sendNotification().

◆ kError

const QEvent::Type MythNotification::kError = static_cast<QEvent::Type>(QEvent::registerEventType())
static

◆ kWarning

const QEvent::Type MythNotification::kWarning = static_cast<QEvent::Type>(QEvent::registerEventType())
static

◆ kCheck

const QEvent::Type MythNotification::kCheck = static_cast<QEvent::Type>(QEvent::registerEventType())
static

◆ kBusy

const QEvent::Type MythNotification::kBusy = static_cast<QEvent::Type>(QEvent::registerEventType())
static

◆ m_id

int MythNotification::m_id { -1 }
protected

Definition at line 120 of file mythnotification.h.

Referenced by SetId().

◆ m_parent

void* MythNotification::m_parent { nullptr }
protected

Definition at line 121 of file mythnotification.h.

Referenced by SetParent().

◆ m_fullScreen

bool MythNotification::m_fullScreen { false }
protected

Definition at line 122 of file mythnotification.h.

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

◆ m_description

QString MythNotification::m_description
protected

Definition at line 123 of file mythnotification.h.

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

◆ m_duration

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

Definition at line 124 of file mythnotification.h.

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

◆ m_metadata

DMAP MythNotification::m_metadata
protected

Definition at line 125 of file mythnotification.h.

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

◆ m_style

QString MythNotification::m_style
protected

Definition at line 126 of file mythnotification.h.

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

◆ m_visibility

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

Definition at line 127 of file mythnotification.h.

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

◆ m_priority

Priority MythNotification::m_priority { kDefault }
protected

Definition at line 128 of file mythnotification.h.

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


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