MythTV  master
playlistview.cpp
Go to the documentation of this file.
1 #include <iostream>
2 
3 // qt
4 #include <QKeyEvent>
5 
6 // MythTV
9 
10 // mythmusic
11 #include "musiccommon.h"
12 #include "playlistview.h"
13 
15  :MusicCommon(parent, parentScreen, "playlistview")
16 {
18 }
19 
21 {
22  // Load the theme for this screen
23  bool err = LoadWindowFromXML("music-ui.xml", "playlistview", this);
24 
25  if (!err)
26  return false;
27 
28  // find common widgets available on any view
29  err = CreateCommon();
30 
31  if (err)
32  {
33  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'playlisteditorview'");
34  return false;
35  }
36 
38 
39  return true;
40 }
41 
42 void PlaylistView::customEvent(QEvent *event)
43 {
45 }
46 
47 bool PlaylistView::keyPressEvent(QKeyEvent *event)
48 {
50  return true;
51 
52  bool handled = false;
53 
54  if (MusicCommon::keyPressEvent(event))
55  handled = true;
56 
57  return handled;
58 }
MusicCommon::m_currentView
MusicView m_currentView
Definition: musiccommon.h:141
MV_PLAYLIST
@ MV_PLAYLIST
Definition: musiccommon.h:33
MusicCommon::CreateCommon
bool CreateCommon(void)
Definition: musiccommon.cpp:78
MusicCommon::keyPressEvent
bool keyPressEvent(QKeyEvent *e) override
Key event handler.
Definition: musiccommon.cpp:587
PlaylistView::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: playlistview.cpp:47
mythdialogbox.h
MythScreenStack
Definition: mythscreenstack.h:16
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition: mythscreentype.h:45
playlistview.h
MythScreenType::GetFocusWidget
MythUIType * GetFocusWidget(void) const
Definition: mythscreentype.cpp:111
MusicCommon::m_moveTrackMode
bool m_moveTrackMode
Definition: musiccommon.h:152
mythlogging.h
PlaylistView::PlaylistView
PlaylistView(MythScreenStack *parent, MythScreenType *parentScreen)
Definition: playlistview.cpp:14
MythScreenType::BuildFocusList
void BuildFocusList(void)
Definition: mythscreentype.cpp:204
PlaylistView::customEvent
void customEvent(QEvent *event) override
Definition: playlistview.cpp:42
musiccommon.h
XMLParseBase::LoadWindowFromXML
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
Definition: xmlparsebase.cpp:701
PlaylistView::Create
bool Create(void) override
Definition: playlistview.cpp:20
MusicCommon::customEvent
void customEvent(QEvent *event) override
Definition: musiccommon.cpp:1232
MusicCommon
Definition: musiccommon.h:49