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