MythTV
master
|
#include <libmythui/mythnotificationcenter_private.h>
Public Slots | |
void | ScreenDeleted (void) |
Remove screen from screens list. More... | |
Public Member Functions | |
NCPrivate (void) | |
~NCPrivate () override | |
bool | Queue (const MythNotification ¬ification) |
Queue a notification Queue() is thread-safe and can be called from anywhere. More... | |
int | Register (void *from) |
An application can register in which case it will be assigned a reusable screen, which can be modified or updated Register takes a pointer of the client registering. More... | |
void | UnRegister (void *from, int id, bool closeimemdiately=false) |
Unregister the client. More... | |
QDateTime | ScreenExpiryTime (const MythScreenType *screen) |
Return when the given screen is going to expire will return an invalid QDateTime if screen isn't a MythNotificationScreen. More... | |
bool | ScreenCreated (const MythScreenType *screen) |
Return true if ::Create() has been called on screen. More... | |
void | GetNotificationScreens (QList< MythScreenType * > &screens) |
Return the list of notification screens being currently displayed. More... | |
void | UpdateScreen (MythScreenType *screen) |
Will call ::doInit() if the screen is a MythNotificationScreen and ::Create() has been called for it already. More... | |
int | DisplayedNotifications (void) const |
Returns number of notifications currently displayed. More... | |
int | QueuedNotifications (void) const |
Returns number of notifications currently queued. More... | |
bool | RemoveFirst (void) |
Will remove the oldest notification from the stack return true if a screen was removed; or false if nothing was done. More... | |
void | ProcessQueue (void) |
ProcessQueue will be called by the GUI event handler and will process all queued MythNotifications and delete screens marked to be deleted ProcessQueue must be called from GUI thread. More... | |
void | ScreenStackDeleted (void) |
Static Public Member Functions | |
static MythNotificationCenter * | GetInstance (void) |
returns the MythNotificationCenter singleton More... | |
Private Member Functions | |
MythNotificationScreen * | CreateScreen (MythNotification *notification, int id=-1) |
CreateScreen will create a MythNotificationScreen instance. More... | |
void | DeleteAllRegistrations (void) |
void | DeleteAllScreens (void) |
void | DeleteUnregistered (void) |
int | InsertScreen (MythNotificationScreen *screen) |
Insert screen into list of screens. More... | |
int | RemoveScreen (MythNotificationScreen *screen) |
Remove screen from list of screens. More... | |
void | RefreshScreenPosition (int from=0) |
Re-position screens on display. More... | |
Private Attributes | |
MythNotificationScreenStack * | m_originalScreenStack {nullptr} |
MythNotificationScreenStack * | m_screenStack {nullptr} |
QList< MythNotification * > | m_notifications |
QList< MythNotificationScreen * > | m_screens |
QList< MythNotificationScreen * > | m_deletedScreens |
QMap< int, MythNotificationScreen * > | m_registrations |
QList< int > | m_suspended |
QMap< int, bool > | m_unregistered |
QMap< int, void * > | m_clients |
QMutex | m_lock |
int | m_currentId {0} |
QMap< MythNotificationScreen *, MythNotificationScreen * > | m_converted |
Definition at line 33 of file mythnotificationcenter_private.h.
NCPrivate::NCPrivate | ( | void | ) |
Definition at line 749 of file mythnotificationcenter.cpp.
|
override |
Definition at line 757 of file mythnotificationcenter.cpp.
|
slot |
Remove screen from screens list.
Qt slot called upon MythScreenType::Exiting().
Definition at line 788 of file mythnotificationcenter.cpp.
Referenced by CreateScreen().
bool NCPrivate::Queue | ( | const MythNotification & | notification | ) |
Queue a notification Queue() is thread-safe and can be called from anywhere.
Typical use would be GetNotificationCenter()->Queue(notification)
Definition at line 863 of file mythnotificationcenter.cpp.
Referenced by MythNotificationCenter::Queue().
|
static |
returns the MythNotificationCenter singleton
int NCPrivate::Register | ( | void * | from | ) |
An application can register in which case it will be assigned a reusable screen, which can be modified or updated Register takes a pointer of the client registering.
This is used to make sure a registered Id can only be used by the client who registered for it. Returns a unique Id that can be provided with a MythNotification Return -1 is case of error
Definition at line 1011 of file mythnotificationcenter.cpp.
Referenced by MythNotificationCenter::Register().
Unregister the client.
If the notification had set a duration, the screen will be left to laps, unless forcedisconnect is set; in which case the screen will be closed immediately.
Definition at line 1025 of file mythnotificationcenter.cpp.
Referenced by MythNotificationCenter::UnRegister().
QDateTime NCPrivate::ScreenExpiryTime | ( | const MythScreenType * | screen | ) |
Return when the given screen is going to expire will return an invalid QDateTime if screen isn't a MythNotificationScreen.
bool NCPrivate::ScreenCreated | ( | const MythScreenType * | screen | ) |
Return true if ::Create() has been called on screen.
will always return true should screen not be a MythNotificationScreen
void NCPrivate::GetNotificationScreens | ( | QList< MythScreenType * > & | screens | ) |
Return the list of notification screens being currently displayed.
The list contains pointer of existing screen's copies, with ::Create() not called yet.
Definition at line 1220 of file mythnotificationcenter.cpp.
Referenced by MythNotificationCenter::GetNotificationScreens().
void NCPrivate::UpdateScreen | ( | MythScreenType * | screen | ) |
Will call ::doInit() if the screen is a MythNotificationScreen and ::Create() has been called for it already.
int NCPrivate::DisplayedNotifications | ( | void | ) | const |
Returns number of notifications currently displayed.
Definition at line 1274 of file mythnotificationcenter.cpp.
Referenced by MythNotificationCenter::DisplayedNotifications().
int NCPrivate::QueuedNotifications | ( | void | ) | const |
Returns number of notifications currently queued.
Definition at line 1279 of file mythnotificationcenter.cpp.
Referenced by MythNotificationCenter::QueuedNotifications().
bool NCPrivate::RemoveFirst | ( | void | ) |
Will remove the oldest notification from the stack return true if a screen was removed; or false if nothing was done.
Definition at line 1284 of file mythnotificationcenter.cpp.
Referenced by MythNotificationCenter::RemoveFirst().
void NCPrivate::ProcessQueue | ( | void | ) |
ProcessQueue will be called by the GUI event handler and will process all queued MythNotifications and delete screens marked to be deleted ProcessQueue must be called from GUI thread.
Definition at line 907 of file mythnotificationcenter.cpp.
Referenced by MythNotificationCenter::ProcessQueue().
void NCPrivate::ScreenStackDeleted | ( | void | ) |
Definition at line 858 of file mythnotificationcenter.cpp.
Referenced by MythNotificationScreenStack::~MythNotificationScreenStack().
|
private |
CreateScreen will create a MythNotificationScreen instance.
This screen will not be displayed until it is used.
Definition at line 987 of file mythnotificationcenter.cpp.
Referenced by ProcessQueue().
|
private |
Definition at line 1056 of file mythnotificationcenter.cpp.
Referenced by ~NCPrivate().
|
private |
Definition at line 1068 of file mythnotificationcenter.cpp.
Referenced by DeleteUnregistered(), ProcessQueue(), and ~NCPrivate().
|
private |
Definition at line 1100 of file mythnotificationcenter.cpp.
Referenced by ProcessQueue(), and ~NCPrivate().
|
private |
Insert screen into list of screens.
Returns index in screens list.
Definition at line 1144 of file mythnotificationcenter.cpp.
Referenced by ProcessQueue().
|
private |
Remove screen from list of screens.
Returns index in screens list.
Definition at line 1173 of file mythnotificationcenter.cpp.
|
private |
Re-position screens on display.
Definition at line 1195 of file mythnotificationcenter.cpp.
Referenced by ProcessQueue(), and ScreenDeleted().
|
private |
Definition at line 132 of file mythnotificationcenter_private.h.
Referenced by DeleteAllScreens(), NCPrivate(), and ~NCPrivate().
|
private |
Definition at line 133 of file mythnotificationcenter_private.h.
Referenced by CreateScreen(), DeleteAllScreens(), GetNotificationScreens(), NCPrivate(), ScreenDeleted(), ScreenStackDeleted(), and ~NCPrivate().
|
private |
Definition at line 134 of file mythnotificationcenter_private.h.
Referenced by ProcessQueue(), Queue(), QueuedNotifications(), and ~NCPrivate().
|
private |
Definition at line 135 of file mythnotificationcenter_private.h.
Referenced by DisplayedNotifications(), InsertScreen(), ProcessQueue(), RefreshScreenPosition(), RemoveFirst(), RemoveScreen(), and ScreenDeleted().
|
private |
Definition at line 136 of file mythnotificationcenter_private.h.
Referenced by DeleteAllRegistrations(), DeleteAllScreens(), DeleteUnregistered(), and ScreenDeleted().
|
private |
Definition at line 137 of file mythnotificationcenter_private.h.
Referenced by DeleteAllRegistrations(), DeleteUnregistered(), ProcessQueue(), Queue(), Register(), ScreenDeleted(), and UnRegister().
|
private |
Definition at line 138 of file mythnotificationcenter_private.h.
Referenced by DeleteUnregistered(), Queue(), and ScreenDeleted().
|
private |
Definition at line 139 of file mythnotificationcenter_private.h.
Referenced by DeleteUnregistered(), ScreenDeleted(), and UnRegister().
|
private |
Definition at line 140 of file mythnotificationcenter_private.h.
Referenced by Queue(), Register(), and UnRegister().
|
private |
Definition at line 141 of file mythnotificationcenter_private.h.
Referenced by GetNotificationScreens(), ProcessQueue(), Queue(), Register(), RemoveFirst(), UnRegister(), and ~NCPrivate().
|
private |
Definition at line 142 of file mythnotificationcenter_private.h.
Referenced by Register().
|
private |
Definition at line 143 of file mythnotificationcenter_private.h.
Referenced by GetNotificationScreens(), and ScreenDeleted().