Go to the documentation of this file.
5 #include <QImageReader>
40 m_origMetadata(source_metadata),
79 LOG(VB_GENERAL, LOG_ERR,
"Cannot load screen 'edit_metadata'");
203 template <
typename T>
216 QList<QByteArray> exts = QImageReader::supportedImageFormats();
217 for (
const auto & ext : std::as_const(exts))
218 ret.append(QString(
"*.").append(ext));
223 QObject &inst,
const QString &returnEvent)
227 if (
prefix.startsWith(
"myth://"))
239 fb->SetReturnEvent(&inst, returnEvent);
249 QObject &inst,
const QString &returnEvent)
253 if (
prefix.startsWith(
"myth://"))
264 for (
const auto & fa : fa_list)
265 exts << QString(
"*.%1").arg(fa.extension.toUpper());
268 fb->SetNameFilter(exts);
271 fb->SetReturnEvent(&inst, returnEvent);
293 const QString& message = title;
296 "mythvideobusydialog");
332 for (
const auto & vc : vcl)
337 button->SetData(vc.first);
347 tr(
"Level %1").arg(i.GetLevel()));
348 button->SetData(i.GetLevel());
363 using title_list = std::vector<std::pair<unsigned int, QString> >;
366 tc.reserve(mdl.size());
367 for (
const auto & md : mdl)
370 if (md->GetSeason() > 0 || md->GetEpisode() > 0)
372 title = QString(
"%1 %2x%3").arg(md->GetTitle(),
373 QString::number(md->GetSeason()),
374 QString::number(md->GetEpisode()));
378 title = md->GetTitle();
380 tc.emplace_back(md->GetID(), title);
382 std::sort(tc.begin(), tc.end(), title_sort<title_list::value_type>());
384 for (
const auto &
t : tc)
389 button->SetData(
t.first);
504 QString message = tr(
"Enter new category");
510 if (categorydialog->Create())
675 if (resultsdialog->Create())
681 QString msg = tr(
"Downloading selected artwork...");
689 lookup->SetAutomatic(
true);
690 lookup->SetData(QVariant::fromValue<VideoArtworkType>(
type));
694 lookup->SetDownloads(downloads);
695 lookup->SetAllowOverwrites(
true);
719 if (map.count() >= 1)
737 QString msg = tr(
"Searching for available artwork...");
743 lookup->SetAutomatic(
true);
751 lookup->SetData(QVariant::fromValue<VideoArtworkType>(
type));
787 QString origfile =
file;
789 if (
file.startsWith(
"myth://"))
794 if (!
file.endsWith(
"/"))
834 QString origfile =
file;
836 if (
file.startsWith(
"myth://"))
841 if (!
file.endsWith(
"/"))
881 QString origfile =
file;
883 if (
file.startsWith(
"myth://"))
888 if (!
file.endsWith(
"/"))
929 QString origfile =
file;
931 if (
file.startsWith(
"myth://"))
936 if (!
file.endsWith(
"/"))
976 if (
file.startsWith(
"myth://"))
981 if (!
file.endsWith(
"/"))
999 const QString resultid = dce->GetId();
1025 if (lul.count() == 1)
1053 LOG(VB_GENERAL, LOG_INFO,
1054 QString(
"No results found for %1 %2 %3").arg(lookup->
GetTitle())
1072 tr(
"Metadata Editor"),
QString generate_file_url(const QString &storage_group, const QString &host, const QString &path)
void SetMaxLength(int length)
int add(const QString &name)
bool naturalSortCompare(const QString &a, const QString &b, Qt::CaseSensitivity caseSensitivity=Qt::CaseSensitive)
naturalCompare as a std::sort compatible function (ignoring the third parameter, which is never used)...
bool Load(bool allowLoadInBackground=true, bool forceStat=false)
Load the image(s), wraps ImageLoader::LoadImage()
bool Create(void) override
bool GetBooleanCheckState(void) const
void CheckedSet(MythUIStateType *uiItem, const QString &value)
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
const association_list & getList() const
Screen in which all other widgets are contained and rendered.
QString GetText(void) const
void SetRange(int low, int high, int step, uint pageMultiple=5)
Set the lower and upper bounds of the spinbox, the interval and page amount.
const QString VIDEO_CATEGORY_UNKNOWN
void SetValue(int val) override
void SetText(const QString &text, bool moveCursor=true)
static const Type kEventType
std::vector< file_association > association_list
int GetIntValue(void) const override
void BuildFocusList(void)
static const Type kEventType
static VideoCategory & GetCategory()
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
static bool Assign(ContainerType *container, UIType *&item, const QString &name, bool *err=nullptr)
static FileAssociations & getFileAssociation()
const entry_list & getList()
void SetCheckState(MythUIStateType::StateType state)
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
void haveResult(ArtworkInfo, VideoArtworkType)
std::enable_if_t< std::chrono::__is_duration< T >::value, T > GetDuration()
Event dispatched from MythUI modal dialogs to a listening class containing a result of some form.
virtual void SetText(const QString &text)
MythNotificationCenter * GetNotificationCenter(void)
static const Type kEventType
MythMainWindow * GetMythMainWindow(void)
MythScreenStack * GetStack(const QString &Stackname)
std::vector< entry > entry_list
Dialog prompting the user to enter a text string.
void SetFilename(const QString &filename)
Must be followed by a call to Load() to load the image.
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
QString GetSetting(const QString &key, const QString &defaultval="")
bool Queue(const MythNotification ¬ification)
Queue a notification Queue() is thread-safe and can be called from anywhere.