Skip to content

Commit

Permalink
Rename MythUINotificationCenter into MythNotificationCenter
Browse files Browse the repository at this point in the history
This is to make naming consisten with other myth libraries, and using MythUI prefix only for MythUI widgets.
Make distclean required
  • Loading branch information
jyavenard committed Jul 25, 2013
1 parent 22d6d98 commit 4a616c7
Show file tree
Hide file tree
Showing 20 changed files with 171 additions and 171 deletions.
2 changes: 1 addition & 1 deletion mythtv/libs/libmyth/mythcontext.cpp
Expand Up @@ -39,7 +39,7 @@ using namespace std;
#include "mythlogging.h"
#include "mythsystemlegacy.h"
#include "mythmiscutil.h"
#include "mythuinotificationcenter.h"
#include "mythnotificationcenter.h"

#include "mythplugin.h"

Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmyth/mythmediamonitor.cpp
Expand Up @@ -33,7 +33,7 @@ using namespace std;
#else
#include "mediamonitor-unix.h"
#endif
#include "mythuinotificationcenter.h"
#include "mythnotificationcenter.h"

static const QString _Location = QObject::tr("Media Monitor");

Expand Down
18 changes: 9 additions & 9 deletions mythtv/libs/libmythtv/AirPlay/mythairplayserver.cpp
Expand Up @@ -18,7 +18,7 @@
#include "mythuistatetracker.h"
#include "plist.h"
#include "tv_play.h"
#include "mythuinotificationcenter.h"
#include "mythnotificationcenter.h"

#include "bonjourregister.h"
#include "mythairplayserver.h"
Expand Down Expand Up @@ -401,7 +401,7 @@ MythAirplayServer::~MythAirplayServer()
m_lock = NULL;
if (m_id > 0)
{
MythUINotificationCenter::GetInstance()->UnRegister(this, m_id);
MythNotificationCenter::GetInstance()->UnRegister(this, m_id);
m_id = -1;
}
}
Expand Down Expand Up @@ -434,7 +434,7 @@ void MythAirplayServer::Teardown(void)

if (m_id > 0)
{
MythUINotificationCenter::GetInstance()->UnRegister(this, m_id);
MythNotificationCenter::GetInstance()->UnRegister(this, m_id);
m_id = -1;
}
}
Expand Down Expand Up @@ -561,14 +561,14 @@ void MythAirplayServer::deleteConnection(QTcpSocket *socket)
if (m_id > 0)
{
// close any photos that could be displayed
MythUINotificationCenter::GetInstance()->UnRegister(this, m_id);
MythNotificationCenter::GetInstance()->UnRegister(this, m_id);
m_id = -1;
}
MythNotification n(tr("Client disconnected"), tr("AirPlay"),
tr("from %1").arg(socket->peerAddress().toString()));
// Don't show it during playback
n.SetVisibility(n.GetVisibility() & ~MythNotification::kPlayback);
MythUINotificationCenter::GetInstance()->Queue(n);
MythNotificationCenter::GetInstance()->Queue(n);
}

socket->deleteLater();
Expand Down Expand Up @@ -710,7 +710,7 @@ void MythAirplayServer::HandleResponse(APHTTPRequest *req,
tr("from %1").arg(socket->peerAddress().toString()));
// Don't show it during playback
n.SetVisibility(n.GetVisibility() & ~MythNotification::kPlayback);
MythUINotificationCenter::GetInstance()->Queue(n);
MythNotificationCenter::GetInstance()->Queue(n);
}

double position = 0.0f;
Expand Down Expand Up @@ -834,14 +834,14 @@ void MythAirplayServer::HandleResponse(APHTTPRequest *req,

if (m_id < 0)
{
m_id = MythUINotificationCenter::GetInstance()->Register(this);
m_id = MythNotificationCenter::GetInstance()->Register(this);
}
// send full screen display notification
MythImageNotification n(MythNotification::New, image);
n.SetId(m_id);
n.SetParent(this);
n.SetFullScreen(true);
MythUINotificationCenter::GetInstance()->Queue(n);
MythNotificationCenter::GetInstance()->Queue(n);
}
}
else if (req->GetURI() == "/slideshow-features")
Expand Down Expand Up @@ -1157,7 +1157,7 @@ void MythAirplayServer::StartPlayback(const QString &pathname)
if (TV::IsTVRunning() && m_id > 0)
{
// playback has started, dismiss the photo is we were showing one
MythUINotificationCenter::GetInstance()->UnRegister(this, m_id);
MythNotificationCenter::GetInstance()->UnRegister(this, m_id);
m_id = -1;
}
LOG(VB_PLAYBACK, LOG_DEBUG, LOC +
Expand Down
8 changes: 4 additions & 4 deletions mythtv/libs/libmythtv/AirPlay/mythraopconnection.cpp
Expand Up @@ -15,7 +15,7 @@
#include "mythraopconnection.h"
#include "mythairplayserver.h"

#include "mythuinotificationcenter.h"
#include "mythnotificationcenter.h"

#define LOC QString("RAOP Conn: ")
#define MAX_PACKET_SIZE 2048
Expand Down Expand Up @@ -85,7 +85,7 @@ MythRAOPConnection::MythRAOPConnection(QObject *parent, QTcpSocket *socket,
m_progressStart(0), m_progressCurrent(0), m_progressEnd(0),
m_firstsend(false), m_playbackStarted(false)
{
m_id = MythUINotificationCenter::GetInstance()->Register(this);
m_id = MythNotificationCenter::GetInstance()->Register(this);
}

MythRAOPConnection::~MythRAOPConnection()
Expand Down Expand Up @@ -124,7 +124,7 @@ MythRAOPConnection::~MythRAOPConnection()

if (m_id > 0)
{
MythUINotificationCenter::GetInstance()->UnRegister(this, m_id);
MythNotificationCenter::GetInstance()->UnRegister(this, m_id);
}
}

Expand Down Expand Up @@ -1792,7 +1792,7 @@ void MythRAOPConnection::SendNotification(bool update)
n->SetParent(this);
n->SetDuration(5);
n->SetFullScreen(gCoreContext->GetNumSetting("AirPlayFullScreen"));
MythUINotificationCenter::GetInstance()->Queue(*n);
MythNotificationCenter::GetInstance()->Queue(*n);
m_firstsend = true;
delete n;
}
6 changes: 3 additions & 3 deletions mythtv/libs/libmythtv/AirPlay/mythraopdevice.cpp
Expand Up @@ -7,7 +7,7 @@
#include "mthread.h"
#include "mythlogging.h"
#include "mythcorecontext.h"
#include "mythuinotificationcenter.h"
#include "mythnotificationcenter.h"

#include "bonjourregister.h"
#include "mythraopconnection.h"
Expand Down Expand Up @@ -213,7 +213,7 @@ void MythRAOPDevice::newConnection(QTcpSocket *client)
tr("from %1:%2").arg(client->peerAddress().toString()).arg(client->peerPort()));
// Don't show it during playback
n.SetVisibility(n.GetVisibility() & ~MythNotification::kPlayback);
MythUINotificationCenter::GetInstance()->Queue(n);
MythNotificationCenter::GetInstance()->Queue(n);

MythRAOPConnection *obj =
new MythRAOPConnection(this, client, m_hardwareId, 6000);
Expand Down Expand Up @@ -242,7 +242,7 @@ void MythRAOPDevice::deleteClient(void)
MythNotification n(tr("Client disconnected"), tr("AirTunes"));
// Don't show it during playback
n.SetVisibility(n.GetVisibility() & ~MythNotification::kPlayback);
MythUINotificationCenter::GetInstance()->Queue(n);
MythNotificationCenter::GetInstance()->Queue(n);

while (it != m_clients.end())
{
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/audioplayer.cpp
@@ -1,7 +1,7 @@
#include "mythplayer.h"
#include "audiooutput.h"
#include "audioplayer.h"
#include "mythuinotificationcenter.h"
#include "mythnotificationcenter.h"

#define LOC QString("AudioPlayer: ")

Expand Down
14 changes: 7 additions & 7 deletions mythtv/libs/libmythtv/osd.cpp
Expand Up @@ -15,7 +15,7 @@
#include "mythuibutton.h"
#include "mythuieditbar.h"
#include "mythuistatetype.h"
#include "mythuinotificationcenter.h"
#include "mythnotificationcenter.h"

// libmythtv
#include "channelutil.h"
Expand Down Expand Up @@ -269,7 +269,7 @@ bool OSD::Reinit(const QRect &rect, float font_aspect)

bool OSD::IsVisible(void)
{
if (MythUINotificationCenter::GetInstance()->DisplayedNotifications() > 0)
if (MythNotificationCenter::GetInstance()->DisplayedNotifications() > 0)
return true;

foreach(MythScreenType* child, m_Children)
Expand All @@ -289,7 +289,7 @@ void OSD::HideAll(bool keepsubs, MythScreenType* except, bool dropnotification)
{
if (dropnotification)
{
if (MythUINotificationCenter::GetInstance()->RemoveFirst())
if (MythNotificationCenter::GetInstance()->RemoveFirst())
return; // we've removed the top window, don't process any further
}
QMutableMapIterator<QString, MythScreenType*> it(m_Children);
Expand Down Expand Up @@ -642,13 +642,13 @@ bool OSD::DrawDirect(MythPainter* painter, QSize size, bool repaint)
}
}

MythUINotificationCenter *nc = MythUINotificationCenter::GetInstance();
MythNotificationCenter *nc = MythNotificationCenter::GetInstance();
QList<MythScreenType*> notifications;
nc->GetNotificationScreens(notifications);
QList<MythScreenType*>::iterator it2 = notifications.begin();
while (it2 != notifications.end())
{
if (!MythUINotificationCenter::GetInstance()->ScreenCreated(*it2))
if (!MythNotificationCenter::GetInstance()->ScreenCreated(*it2))
{
if (!m_UIScaleOverride)
{
Expand Down Expand Up @@ -760,13 +760,13 @@ QRegion OSD::Draw(MythPainter* painter, QPaintDevice *device, QSize size,
}
}

MythUINotificationCenter *nc = MythUINotificationCenter::GetInstance();
MythNotificationCenter *nc = MythNotificationCenter::GetInstance();
QList<MythScreenType*> notifications;
nc->GetNotificationScreens(notifications);
QList<MythScreenType*>::iterator it2 = notifications.begin();
while (it2 != notifications.end())
{
if (!MythUINotificationCenter::GetInstance()->ScreenCreated(*it2))
if (!MythNotificationCenter::GetInstance()->ScreenCreated(*it2))
{
if (!m_UIScaleOverride)
{
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/tv_play.cpp
Expand Up @@ -51,7 +51,7 @@ using namespace std;
#include "channelutil.h"
#include "compat.h"
#include "mythuihelper.h"
#include "mythuinotificationcenter.h"
#include "mythnotificationcenter.h"
#include "mythdialogbox.h"
#include "mythmainwindow.h"
#include "mythscreenstack.h"
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythui/libmythui.pro
Expand Up @@ -41,7 +41,7 @@ HEADERS += mythrender_base.h mythfontmanager.h mythuieditbar.h
HEADERS += mythdisplay.h mythuivideo.h mythudplistener.h
HEADERS += mythuiexp.h mythuisimpletext.h mythuistatetracker.h
HEADERS += mythuianimation.h mythuiscrollbar.h
HEADERS += mythuinotificationcenter.h mythuinotificationcenter_private.h
HEADERS += mythnotificationcenter.h mythnotificationcenter_private.h
HEADERS += mythuicomposite.h mythnotification.h

SOURCES = mythmainwindow.cpp mythpainter.cpp mythimage.cpp mythrect.cpp
Expand All @@ -62,7 +62,7 @@ SOURCES += mythfontmanager.cpp mythuieditbar.cpp
SOURCES += mythdisplay.cpp mythuivideo.cpp mythudplistener.cpp
SOURCES += mythuisimpletext.cpp mythuistatetracker.cpp
SOURCES += mythuianimation.cpp mythuiscrollbar.cpp
SOURCES += mythuinotificationcenter.cpp mythnotification.cpp
SOURCES += mythnotificationcenter.cpp mythnotification.cpp
SOURCES += mythuicomposite.cpp

contains(QT_VERSION, ^4\\.[0-9]\\..*) {
Expand All @@ -85,7 +85,7 @@ inc.files += mythvirtualkeyboard.h mythuishape.h mythuiguidegrid.h
inc.files += mythuieditbar.h mythuifilebrowser.h mythuivideo.h
inc.files += mythuiexp.h mythuisimpletext.h mythuiactions.h
inc.files += mythuistatetracker.h mythuianimation.h mythuiscrollbar.h
inc.files += mythuinotificationcenter.h mythnotification.h mythuicomposite.h
inc.files += mythnotificationcenter.h mythnotification.h mythuicomposite.h

INSTALLS += inc

Expand Down
14 changes: 7 additions & 7 deletions mythtv/libs/libmythui/mythmainwindow.cpp
Expand Up @@ -83,7 +83,7 @@ using namespace std;
#include "mythpainter_d3d9.h"
#endif

#include "mythuinotificationcenter.h"
#include "mythnotificationcenter.h"

#define GESTURE_TIMEOUT 1000
#define STANDBY_TIMEOUT 90 // Minutes
Expand Down Expand Up @@ -287,7 +287,7 @@ class MythMainWindowPrivate
QTimer *idleTimer;
bool standby;
bool enteringStandby;
MythUINotificationCenter *NC;
MythNotificationCenter *NC;
};

// Make keynum in QKeyEvent be equivalent to what's in QKeySequence
Expand Down Expand Up @@ -375,7 +375,7 @@ MythPainter *GetMythPainter(void)
return MythMainWindow::getMainWindow()->GetCurrentPainter();
}

MythUINotificationCenter *GetNotificationCenter(void)
MythNotificationCenter *GetNotificationCenter(void)
{
if (!mainWin ||
!mainWin->GetCurrentNotificationCenter())
Expand Down Expand Up @@ -606,7 +606,7 @@ MythPainter *MythMainWindow::GetCurrentPainter(void)
return d->painter;
}

MythUINotificationCenter *MythMainWindow::GetCurrentNotificationCenter(void)
MythNotificationCenter *MythMainWindow::GetCurrentNotificationCenter(void)
{
return d->NC;
}
Expand Down Expand Up @@ -1109,7 +1109,7 @@ void MythMainWindow::Init(QString forcedpainter)

if (!d->NC)
{
d->NC = new MythUINotificationCenter();
d->NC = new MythNotificationCenter();
}
}

Expand Down Expand Up @@ -2427,9 +2427,9 @@ void MythMainWindow::customEvent(QEvent *ce)
if (!message.isEmpty())
ShowOkPopup(message);
}
else if ((MythEvent::Type)(ce->type()) == MythUINotificationCenterEvent::kEventType)
else if ((MythEvent::Type)(ce->type()) == MythNotificationCenterEvent::kEventType)
{
MythUINotificationCenter::GetInstance()->ProcessQueue();
MythNotificationCenter::GetInstance()->ProcessQueue();
}
}

Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythui/mythmainwindow.h
Expand Up @@ -27,7 +27,7 @@ class MythPainterWindowQt;
class MythPainterWindowVDPAU;
class MythPainterWindowD3D9;
class MythRender;
class MythUINotificationCenter;
class MythNotificationCenter;

class MUI_PUBLIC MythMainWindow : public QWidget
{
Expand Down Expand Up @@ -95,7 +95,7 @@ class MUI_PUBLIC MythMainWindow : public QWidget
MythPainter *GetCurrentPainter();
QWidget *GetPaintWindow();
MythRender *GetRenderDevice();
MythUINotificationCenter *GetCurrentNotificationCenter();
MythNotificationCenter *GetCurrentNotificationCenter();
void ShowPainterWindow();
void HidePainterWindow();
void ResizePainterWindow(const QSize &size);
Expand Down Expand Up @@ -182,6 +182,6 @@ MUI_PUBLIC void DestroyMythMainWindow();

MUI_PUBLIC MythPainter *GetMythPainter();

MUI_PUBLIC MythUINotificationCenter *GetNotificationCenter();
MUI_PUBLIC MythNotificationCenter *GetNotificationCenter();

#endif
4 changes: 2 additions & 2 deletions mythtv/libs/libmythui/mythnotification.h
Expand Up @@ -123,7 +123,7 @@ class MUI_PUBLIC MythNotification : public MythEvent
/**
* contains the parent address. Required if id is set
* Id provided must match the parent address as provided during the
* MythUINotificationCenter registration, otherwise the id value will be
* MythNotificationCenter registration, otherwise the id value will be
* ignored
*/
void SetParent(void *parent) { m_parent = parent; }
Expand All @@ -145,7 +145,7 @@ class MUI_PUBLIC MythNotification : public MythEvent
void SetMetaData(const DMAP &data) { m_metadata = data; }
/**
* contains a duration during which the notification will be displayed for.
* The duration is informative only as the MythUINotificationCenter will
* 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
*/
Expand Down

0 comments on commit 4a616c7

Please sign in to comment.