MythTV  master
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
MythPlaybackNotification Class Reference

#include <mythnotification.h>

Inheritance diagram for MythPlaybackNotification:
Inheritance graph
Collaboration diagram for MythPlaybackNotification:
Collaboration graph

Public Member Functions

 MythPlaybackNotification (Type nType, float Progress, QString ProgressText)
 MythPlaybackNotification (Type nType, float Progress, QString ProgressText, const DMAP &Metadata)
 MythPlaybackNotification (Type nType, std::chrono::seconds Duration, int Position)
MythEventclone () const override
void SetProgress (float progress)
 Set the current playback position to be displayed with the notification. Value to be between 0 <= x <= 1. Note: x < 0 means no progress bar to be displayed. More...
void SetProgressText (const QString &text)
float GetProgress () const
QString GetProgressText () const
- Public Member Functions inherited from MythNotification
 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
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 QString StringFromSeconds (std::chrono::seconds Time)
 Create a string in the format HH:mm:ss from a duration in seconds. More...
- Static Public Member Functions inherited from MythNotification
static Type TypeFromString (const QString &Type)

Protected Member Functions

 MythPlaybackNotification (const MythPlaybackNotification &)=default
- Protected Member Functions inherited from MythNotification
 MythNotification (const MythNotification &Notification)
MythNotificationoperator= (const MythNotification &)

Protected Attributes

float m_progress { -1.0F }
QString m_progressText
- Protected Attributes inherited from MythNotification
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

Additional Inherited Members

- Public Types inherited from MythNotification
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)
- Static Public Attributes inherited from MythNotification
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

Detailed Description

Definition at line 148 of file mythnotification.h.

Constructor & Destructor Documentation

◆ MythPlaybackNotification() [1/4]

MythPlaybackNotification::MythPlaybackNotification ( Type  nType,
float  Progress,
QString  ProgressText 

Definition at line 266 of file mythnotification.cpp.

Referenced by clone().

◆ MythPlaybackNotification() [2/4]

MythPlaybackNotification::MythPlaybackNotification ( Type  nType,
float  Progress,
QString  ProgressText,
const DMAP Metadata 

Definition at line 274 of file mythnotification.cpp.

◆ MythPlaybackNotification() [3/4]

MythPlaybackNotification::MythPlaybackNotification ( Type  nType,
std::chrono::seconds  Duration,
int  Position 

Definition at line 283 of file mythnotification.cpp.

◆ MythPlaybackNotification() [4/4]

MythPlaybackNotification::MythPlaybackNotification ( const MythPlaybackNotification )

Member Function Documentation

◆ clone()

MythEvent * MythPlaybackNotification::clone ( ) const

Reimplemented from MythNotification.

Reimplemented in MythMediaNotification.

Definition at line 292 of file mythnotification.cpp.

◆ SetProgress()

void MythPlaybackNotification::SetProgress ( float  progress)

Set the current playback position to be displayed with the notification. Value to be between 0 <= x <= 1. Note: x < 0 means no progress bar to be displayed.

Definition at line 162 of file mythnotification.h.

◆ SetProgressText()

void MythPlaybackNotification::SetProgressText ( const QString &  text)

Definition at line 163 of file mythnotification.h.

◆ GetProgress()

float MythPlaybackNotification::GetProgress ( ) const

Definition at line 164 of file mythnotification.h.

◆ GetProgressText()

QString MythPlaybackNotification::GetProgressText ( ) const

Definition at line 165 of file mythnotification.h.

◆ StringFromSeconds()

QString MythPlaybackNotification::StringFromSeconds ( std::chrono::seconds  Time)

Create a string in the format HH:mm:ss from a duration in seconds.

HH: will not be displayed if there's less than one hour.

Definition at line 222 of file mythnotification.cpp.

Member Data Documentation

◆ m_progress

float MythPlaybackNotification::m_progress { -1.0F }

Definition at line 171 of file mythnotification.h.

◆ m_progressText

QString MythPlaybackNotification::m_progressText

Definition at line 172 of file mythnotification.h.

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