11#include <QCoreApplication>
32 m_destinationScreen(destinationScreen),
33 m_archiveDestination(archiveDestination),
68 LOG(VB_GENERAL, LOG_ERR,
"Cannot load screen 'themeselector'");
136 QFileInfoList list =
d.entryInfoList(filters, QDir::Dirs, QDir::Name);
138 for (
const auto & fi : std::as_const(list))
143 QString
filename = fi.fileName().replace(QString(
"_"), QString(
" "));
150 LOG(VB_GENERAL, LOG_ERR,
151 "MythArchive: Theme directory does not exist!");
201 desc.toUtf8().constData()));
217 res = tr(
"No theme description file found!");
220 if (
file.open(QIODevice::ReadOnly))
222 QTextStream stream(&
file);
226 res = stream.readAll();
227 res = res.replace(
"\n",
" ").trimmed();
230 res = tr(
"Empty theme description!");
235 res = tr(
"Unable to open theme description file!");
245 theme = theme.replace(QString(
"_"), QString(
" "));
252 theme = theme.replace(QString(
" "), QString(
"_"));
MythUIImage * m_detailsImage
void handlePrevPage(void)
MythUIButton * m_prevButton
MythUIText * m_themedescText
void handleNextPage(void)
MythUIButtonList * m_themeSelector
MythUIImage * m_chapterImage
MythUIButton * m_cancelButton
DVDThemeSelector(MythScreenStack *parent, MythScreenType *destinationScreen, const ArchiveDestination &archiveDestination, const QString &name)
MythScreenType * m_destinationScreen
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
bool Create(void) override
static QString loadFile(const QString &filename)
void themeChanged(MythUIButtonListItem *item)
ArchiveDestination m_archiveDestination
MythUIImage * m_mainmenuImage
MythUIButton * m_nextButton
void loadConfiguration(void)
MythUIImage * m_themeImage
~DVDThemeSelector(void) override
MythUIImage * m_introImage
void saveConfiguration(void)
void SaveSetting(const QString &key, int newValue)
QString GetSetting(const QString &key, const QString &defaultval="")
MythScreenStack * GetMainStack()
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
Screen in which all other widgets are contained and rendered.
void BuildFocusList(void)
MythUIType * GetFocusWidget(void) const
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
bool SetFocusWidget(MythUIType *widget=nullptr)
bool Load(bool allowLoadInBackground=true, bool forceStat=false)
Load the image(s), wraps ImageLoader::LoadImage()
void SetFilename(const QString &filename)
Must be followed by a call to Load() to load the image.
virtual void SetText(const QString &text)
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
static const iso6937table * d
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
QString GetShareDir(void)
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
MythMainWindow * GetMythMainWindow(void)
static bool Assign(ContainerType *container, UIType *&item, const QString &name, bool *err=nullptr)
VERBOSE_PREAMBLE Most true