41 m_origMetadata(source_metadata),
80 LOG(VB_GENERAL, LOG_ERR,
"Cannot load screen 'edit_metadata'");
204 template <
typename T>
217 QList<QByteArray> exts = QImageReader::supportedImageFormats();
218 for (
const auto & ext : std::as_const(exts))
219 ret.append(QString(
"*.").append(ext));
224 QObject &inst,
const QString &returnEvent)
228 if (
prefix.startsWith(
"myth://"))
240 fb->SetReturnEvent(&inst, returnEvent);
250 QObject &inst,
const QString &returnEvent)
254 if (
prefix.startsWith(
"myth://"))
265 for (
const auto & fa : fa_list)
266 exts << QString(
"*.%1").arg(fa.extension.toUpper());
269 fb->SetNameFilter(exts);
272 fb->SetReturnEvent(&inst, returnEvent);
294 const QString& message = title;
297 "mythvideobusydialog");
333 for (
const auto & vc : vcl)
338 button->SetData(vc.first);
348 tr(
"Level %1").arg(i.GetLevel()));
349 button->SetData(i.GetLevel());
364 using title_list = std::vector<std::pair<unsigned int, QString> >;
367 tc.reserve(mdl.size());
368 for (
const auto & md : mdl)
371 if (md->GetSeason() > 0 || md->GetEpisode() > 0)
373 title = QString(
"%1 %2x%3").arg(md->GetTitle(),
374 QString::number(md->GetSeason()),
375 QString::number(md->GetEpisode()));
379 title = md->GetTitle();
381 tc.emplace_back(md->GetID(), title);
383 std::sort(tc.begin(), tc.end(), title_sort<title_list::value_type>());
385 for (
const auto &
t : tc)
390 button->SetData(
t.first);
505 QString message = tr(
"Enter new category");
511 if (categorydialog->Create())
676 if (resultsdialog->Create())
682 QString msg = tr(
"Downloading selected artwork...");
690 lookup->SetAutomatic(
true);
691 lookup->SetData(QVariant::fromValue<VideoArtworkType>(
type));
695 lookup->SetDownloads(downloads);
696 lookup->SetAllowOverwrites(
true);
720 if (map.count() >= 1)
738 QString msg = tr(
"Searching for available artwork...");
744 lookup->SetAutomatic(
true);
752 lookup->SetData(QVariant::fromValue<VideoArtworkType>(
type));
788 QString origfile =
file;
790 if (
file.startsWith(
"myth://"))
795 if (!
file.endsWith(
"/"))
835 QString origfile =
file;
837 if (
file.startsWith(
"myth://"))
842 if (!
file.endsWith(
"/"))
882 QString origfile =
file;
884 if (
file.startsWith(
"myth://"))
889 if (!
file.endsWith(
"/"))
930 QString origfile =
file;
932 if (
file.startsWith(
"myth://"))
937 if (!
file.endsWith(
"/"))
977 if (
file.startsWith(
"myth://"))
982 if (!
file.endsWith(
"/"))
1000 const QString resultid = dce->GetId();
1026 if (lul.count() == 1)
1054 LOG(VB_GENERAL, LOG_INFO,
1055 QString(
"No results found for %1 %2 %3").arg(lookup->
GetTitle())
1073 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)