42 m_origMetadata(source_metadata),
81 LOG(VB_GENERAL, LOG_ERR,
"Cannot load screen 'edit_metadata'");
205 template <
typename T>
218 QList<QByteArray> exts = QImageReader::supportedImageFormats();
219 for (
const auto & ext : std::as_const(exts))
220 ret.append(QString(
"*.").append(ext));
225 QObject &inst,
const QString &returnEvent)
229 if (
prefix.startsWith(
"myth://"))
241 fb->SetReturnEvent(&inst, returnEvent);
251 QObject &inst,
const QString &returnEvent)
255 if (
prefix.startsWith(
"myth://"))
266 for (
const auto & fa : fa_list)
267 exts << QString(
"*.%1").arg(fa.extension.toUpper());
270 fb->SetNameFilter(exts);
273 fb->SetReturnEvent(&inst, returnEvent);
295 const QString& message = title;
298 "mythvideobusydialog");
334 for (
const auto & vc : vcl)
339 button->SetData(vc.first);
349 tr(
"Level %1").arg(i.GetLevel()));
350 button->SetData(i.GetLevel());
365 using title_list = std::vector<std::pair<unsigned int, QString> >;
368 tc.reserve(mdl.size());
369 for (
const auto & md : mdl)
372 if (md->GetSeason() > 0 || md->GetEpisode() > 0)
374 title = QString(
"%1 %2x%3").arg(md->GetTitle(),
375 QString::number(md->GetSeason()),
376 QString::number(md->GetEpisode()));
380 title = md->GetTitle();
382 tc.emplace_back(md->GetID(), title);
384 std::sort(tc.begin(), tc.end(), title_sort<title_list::value_type>());
386 for (
const auto &
t : tc)
391 button->SetData(
t.first);
506 QString message = tr(
"Enter new category");
512 if (categorydialog->Create())
677 if (resultsdialog->Create())
683 QString msg = tr(
"Downloading selected artwork...");
691 lookup->SetAutomatic(
true);
692 lookup->SetData(QVariant::fromValue<VideoArtworkType>(
type));
696 lookup->SetDownloads(downloads);
697 lookup->SetAllowOverwrites(
true);
721 if (map.count() >= 1)
739 QString msg = tr(
"Searching for available artwork...");
745 lookup->SetAutomatic(
true);
753 lookup->SetData(QVariant::fromValue<VideoArtworkType>(
type));
789 QString origfile =
file;
791 if (
file.startsWith(
"myth://"))
796 if (!
file.endsWith(
"/"))
836 QString origfile =
file;
838 if (
file.startsWith(
"myth://"))
843 if (!
file.endsWith(
"/"))
883 QString origfile =
file;
885 if (
file.startsWith(
"myth://"))
890 if (!
file.endsWith(
"/"))
931 QString origfile =
file;
933 if (
file.startsWith(
"myth://"))
938 if (!
file.endsWith(
"/"))
978 if (
file.startsWith(
"myth://"))
983 if (!
file.endsWith(
"/"))
1001 const QString resultid = dce->GetId();
1027 if (lul.count() == 1)
1055 LOG(VB_GENERAL, LOG_INFO,
1056 QString(
"No results found for %1 %2 %3").arg(lookup->
GetTitle())
1074 tr(
"Metadata Editor"),
Event dispatched from MythUI modal dialogs to a listening class containing a result of some form.
static const Type kEventType
static FileAssociations & getFileAssociation()
const association_list & getList() const
std::vector< file_association > association_list
static const Type kEventType
static const Type kEventType
void haveResult(ArtworkInfo, VideoArtworkType)
QString GetSetting(const QString &key, const QString &defaultval="")
MythScreenStack * GetStack(const QString &Stackname)
bool Queue(const MythNotification ¬ification)
Queue a notification Queue() is thread-safe and can be called from anywhere.
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
Screen in which all other widgets are contained and rendered.
void BuildFocusList(void)
Dialog prompting the user to enter a text string.
bool Create(void) override
void SetCheckState(MythUIStateType::StateType state)
bool GetBooleanCheckState(void) const
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.
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.
void SetValue(int val) override
std::enable_if_t< std::chrono::__is_duration< T >::value, T > GetDuration()
int GetIntValue(void) const override
QString GetText(void) const
void SetText(const QString &text, bool moveCursor=true)
void SetMaxLength(int length)
virtual void SetText(const QString &text)
const entry_list & getList()
int add(const QString &name)
std::vector< entry > entry_list
static QString generate_file_url(const QString &storage_group, const QString &host, const QString &path)
static VideoCategory & GetCategory()
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
const QString VIDEO_CATEGORY_UNKNOWN
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
MythNotificationCenter * GetNotificationCenter(void)
MythMainWindow * GetMythMainWindow(void)
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)...
static bool Assign(ContainerType *container, UIType *&item, const QString &name, bool *err=nullptr)
void CheckedSet(MythUIStateType *uiItem, const QString &value)