MythTV
master
|
#include <libmythui/mythnotification.h>
Public Types | |
enum | Priority : std::uint8_t { kDefault = 0, kLow, kMedium, kHigh, kHigher, kHighest } |
enum | Visibility : std::uint8_t { kNone = 0, kAll = 0xFF, 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 | |
MythEvent * | clone () const override |
MythNotification (MythNotification &&)=delete | |
MythNotification & | operator= (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) |
MythEvent * | clone () const override |
MythEvent (MythEvent &&)=delete | |
MythEvent & | operator= (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) | |
MythNotification & | operator= (const MythNotification &) |
Protected Member Functions inherited from MythEvent | |
MythEvent (const MythEvent &other)=default | |
MythEvent & | operator= (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 |
Definition at line 29 of file mythnotification.h.
enum MythNotification::Priority : std::uint8_t |
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.
enum MythNotification::Visibility : std::uint8_t |
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.
MythNotification::MythNotification | ( | Type | nType, |
void * | Parent = nullptr |
||
) |
Definition at line 25 of file mythnotification.cpp.
Referenced by clone().
MythNotification::MythNotification | ( | int | Id, |
void * | Parent | ||
) |
Definition at line 31 of file mythnotification.cpp.
MythNotification::MythNotification | ( | const QString & | Title, |
const QString & | Author, | ||
const QString & | Details = QString() |
||
) |
Definition at line 38 of file mythnotification.cpp.
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::MythNotification | ( | Type | nType, |
DMAP | Metadata | ||
) |
Definition at line 56 of file mythnotification.cpp.
|
explicit |
Definition at line 63 of file mythnotification.cpp.
|
overridedefault |
|
delete |
|
protected |
Definition at line 69 of file mythnotification.cpp.
|
override |
Definition at line 84 of file mythnotification.cpp.
Referenced by NCPrivate::Queue().
|
delete |
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().
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().
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().
void MythNotification::SetDescription | ( | const QString & | Description | ) |
Contains a short description of the notification.
Definition at line 123 of file mythnotification.cpp.
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.
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().
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().
void MythNotification::SetVisibility | ( | VNMask | nVisibility | ) |
Define a bitmask of Visibility.
Definition at line 162 of file mythnotification.cpp.
Referenced by MythRAOPDevice::deleteClient(), MythAirplayServer::deleteConnection(), MythAirplayServer::HandleResponse(), MythRAOPDevice::newRaopConnection(), and ShowNotification().
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().
|
static |
Definition at line 236 of file mythnotification.cpp.
Referenced by MythUDPListener::Process(), Frontend::SendNotification(), and MythFrontendService::SendNotification().
void MythNotification::ToStringList | ( | ) |
Definition at line 176 of file mythnotification.cpp.
Referenced by MythNotification(), SetDescription(), SetDuration(), SetFullScreen(), SetMetaData(), SetPriority(), SetStyle(), and SetVisibility().
bool MythNotification::FromStringList | ( | ) |
Definition at line 192 of file mythnotification.cpp.
Referenced by MythNotification().
|
inline |
Definition at line 100 of file mythnotification.h.
Referenced by NCPrivate::Queue().
|
inline |
Definition at line 101 of file mythnotification.h.
Referenced by NCPrivate::Queue().
|
inline |
Definition at line 102 of file mythnotification.h.
Referenced by MythNotificationScreen::SetNotification().
|
inline |
Definition at line 103 of file mythnotification.h.
|
inline |
Definition at line 104 of file mythnotification.h.
Referenced by MythNotificationScreen::SetNotification().
|
inline |
Definition at line 105 of file mythnotification.h.
Referenced by MythNotificationScreen::SetNotification().
|
inline |
Definition at line 106 of file mythnotification.h.
Referenced by MythNotificationScreen::SetNotification().
|
inline |
Definition at line 107 of file mythnotification.h.
Referenced by MythRAOPDevice::deleteClient(), MythAirplayServer::deleteConnection(), MythAirplayServer::HandleResponse(), MythRAOPDevice::newRaopConnection(), and MythNotificationScreen::SetNotification().
|
inline |
Definition at line 108 of file mythnotification.h.
Referenced by MythNotificationScreen::SetNotification().
|
protected |
|
static |
Definition at line 32 of file mythnotification.h.
Referenced by MythAirplayServer::HandleResponse(), MythRAOPConnection::SendNotification(), ShowNotification(), and TypeFromString().
|
static |
Definition at line 33 of file mythnotification.h.
Referenced by NCPrivate::Queue(), MythRAOPConnection::SendNotification(), and MythNotificationScreen::SetNotification().
|
static |
Definition at line 34 of file mythnotification.h.
Referenced by MusicPlayer::sendNotification().
|
static |
Definition at line 35 of file mythnotification.h.
Referenced by MythUDPListener::Process(), Frontend::SendNotification(), MythFrontendService::SendNotification(), MythNotificationScreen::SetErrorState(), MythNotificationScreen::SetNotification(), ShowNotification(), TVRec::TuningSignalCheck(), and TypeFromString().
|
static |
Definition at line 36 of file mythnotification.h.
Referenced by MythNotificationScreen::SetErrorState(), MythNotificationScreen::SetNotification(), ShowNotification(), and TypeFromString().
|
static |
Definition at line 37 of file mythnotification.h.
Referenced by MythNotificationScreen::SetErrorState(), MythNotificationScreen::SetNotification(), ShowNotification(), TVRec::TuningSignalCheck(), and TypeFromString().
|
static |
Definition at line 38 of file mythnotification.h.
Referenced by MythNotificationScreen::SetErrorState(), MythNotificationScreen::SetNotification(), ShowNotification(), and TypeFromString().
|
protected |
Definition at line 120 of file mythnotification.h.
Referenced by SetId().
|
protected |
Definition at line 121 of file mythnotification.h.
Referenced by SetParent().
Definition at line 122 of file mythnotification.h.
Referenced by FromStringList(), SetFullScreen(), and ToStringList().
|
protected |
Definition at line 123 of file mythnotification.h.
Referenced by FromStringList(), SetDescription(), and ToStringList().
|
protected |
Definition at line 124 of file mythnotification.h.
Referenced by FromStringList(), SetDuration(), SetId(), and ToStringList().
|
protected |
Definition at line 125 of file mythnotification.h.
Referenced by FromStringList(), SetMetaData(), and ToStringList().
|
protected |
Definition at line 126 of file mythnotification.h.
Referenced by FromStringList(), SetStyle(), and ToStringList().
Definition at line 127 of file mythnotification.h.
Referenced by FromStringList(), SetVisibility(), and ToStringList().
Definition at line 128 of file mythnotification.h.
Referenced by FromStringList(), SetPriority(), and ToStringList().