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