MythTV  master
mythevent.cpp
Go to the documentation of this file.
1 #include "mythevent.h"
2 #include "mythlogging.h"
3 
4 const QEvent::Type MythEvent::kMythEventMessage =
5  (QEvent::Type) QEvent::registerEventType();
6 const QEvent::Type MythEvent::kMythUserMessage =
7  (QEvent::Type) QEvent::registerEventType();
8 const QEvent::Type MythEvent::kUpdateTvProgressEventType =
9  (QEvent::Type) QEvent::registerEventType();
10 const QEvent::Type MythEvent::kExitToMainMenuEventType =
11  (QEvent::Type) QEvent::registerEventType();
12 const QEvent::Type MythEvent::kMythPostShowEventType =
13  (QEvent::Type) QEvent::registerEventType();
14 const QEvent::Type MythEvent::kPushDisableDrawingEventType =
15  (QEvent::Type) QEvent::registerEventType();
16 const QEvent::Type MythEvent::kPopDisableDrawingEventType =
17  (QEvent::Type) QEvent::registerEventType();
18 const QEvent::Type MythEvent::kLockInputDevicesEventType =
19  (QEvent::Type) QEvent::registerEventType();
20 const QEvent::Type MythEvent::kUnlockInputDevicesEventType =
21  (QEvent::Type) QEvent::registerEventType();
22 const QEvent::Type MythEvent::kUpdateBrowseInfoEventType =
23  (QEvent::Type) QEvent::registerEventType();
24 const QEvent::Type MythEvent::kDisableUDPListenerEventType =
25  (QEvent::Type) QEvent::registerEventType();
26 const QEvent::Type MythEvent::kEnableUDPListenerEventType =
27  (QEvent::Type) QEvent::registerEventType();
28 const QEvent::Type ExternalKeycodeEvent::kEventType =
29  (QEvent::Type) QEvent::registerEventType();
30 
31 // Force this class to have a vtable so that dynamic_cast works.
32 // NOLINTNEXTLINE(modernize-use-equals-default)
34 {
35 }
36 
37 void MythEvent::log(const QString& prefix)
38 {
39  LOG(VB_GENERAL, LOG_INFO, QString("%1: %2").arg(prefix, m_message));
40  if (m_extradata.isEmpty())
41  return;
42  if ((m_extradata.count() == 1) && (m_extradata[0] == "empty"))
43  return;
44  QStringList tmp = m_extradata;
45  if ((m_message.startsWith("GENERATED_PIXMAP")) && (tmp[0] == "OK"))
46  tmp[6]="Encoded pixmap";
47  LOG(VB_GENERAL, LOG_INFO, QString("Extra data: %1").arg(tmp.join('|')));
48 }
mythevent.h
ExternalKeycodeEvent::kEventType
static const Type kEventType
Definition: mythevent.h:113
MythEvent::kMythUserMessage
static const Type kMythUserMessage
Definition: mythevent.h:80
MythEvent::kMythEventMessage
static const Type kMythEventMessage
Definition: mythevent.h:79
MythEvent::kUpdateBrowseInfoEventType
static const Type kUpdateBrowseInfoEventType
Definition: mythevent.h:88
MythEvent::kPushDisableDrawingEventType
static const Type kPushDisableDrawingEventType
Definition: mythevent.h:84
MythEvent::kEnableUDPListenerEventType
static const Type kEnableUDPListenerEventType
Definition: mythevent.h:90
MythEvent::kUnlockInputDevicesEventType
static const Type kUnlockInputDevicesEventType
Definition: mythevent.h:87
MythEvent::kDisableUDPListenerEventType
static const Type kDisableUDPListenerEventType
Definition: mythevent.h:89
MythEvent::m_extradata
QStringList m_extradata
Definition: mythevent.h:102
MythEvent::log
void log(const QString &prefix)
Definition: mythevent.cpp:37
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
hardwareprofile.distros.mythtv_data.data_mythtv.prefix
string prefix
Definition: data_mythtv.py:40
tmp
static guint32 * tmp
Definition: goom_core.cpp:26
mythlogging.h
MythEvent::kUpdateTvProgressEventType
static const Type kUpdateTvProgressEventType
Definition: mythevent.h:81
MythEvent::kMythPostShowEventType
static const Type kMythPostShowEventType
Definition: mythevent.h:83
MythEvent::kPopDisableDrawingEventType
static const Type kPopDisableDrawingEventType
Definition: mythevent.h:85
MythEvent::kExitToMainMenuEventType
static const Type kExitToMainMenuEventType
Definition: mythevent.h:82
MythEvent::m_message
QString m_message
Definition: mythevent.h:101
MythEvent::~MythEvent
~MythEvent() override
Definition: mythevent.cpp:33
MythEvent::kLockInputDevicesEventType
static const Type kLockInputDevicesEventType
Definition: mythevent.h:86