1#ifndef FRONTENDSTATUS_H
2#define FRONTENDSTATUS_H
18 Q_PROPERTY(QString
Name READ
Name WRITE setName)
36 Q_INVOKABLE
explicit FrontendStatus(QObject *parent =
nullptr) : QObject(parent)
43 m_Version = src->m_Version;
44 m_State = src->m_State;
45 m_ChapterTimes = src->m_ChapterTimes;
46 m_SubtitleTracks = src->m_SubtitleTracks;
47 m_AudioTracks = src->m_AudioTracks;
52 if (m_State.contains(
"chaptertimes"))
54#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
55 auto type =
static_cast<QMetaType::Type
>(m_State[
"chaptertimes"].type());
57 auto type = m_State[
"chaptertimes"].typeId();
59 if (
type == QMetaType::QVariantList)
60 m_ChapterTimes = m_State[
"chaptertimes"].toList();
61 m_State.remove(
"chaptertimes");
64 if (m_State.contains(
"subtitletracks"))
66#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
67 auto type =
static_cast<QMetaType::Type
>(m_State[
"subtitletracks"].type());
69 auto type = m_State[
"subtitletracks"].typeId();
71 if (
type == QMetaType::QVariantMap)
72 m_SubtitleTracks = m_State[
"subtitletracks"].toMap();
73 m_State.remove(
"subtitletracks");
76 if (m_State.contains(
"audiotracks"))
78#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
79 auto type =
static_cast<QMetaType::Type
>(m_State[
"audiotracks"].type());
81 auto type = m_State[
"audiotracks"].typeId();
83 if (
type == QMetaType::QVariantMap)
84 m_AudioTracks = m_State[
"audiotracks"].toMap();
85 m_State.remove(
"audiotracks");
94 qRegisterMetaType<FrontendStatus*>();
Q_CLASSINFO("version", "1.1")
QVariantList ChapterTimes
void Copy(const FrontendStatus *src)
Q_CLASSINFO("ChapterTimes", "type=QString;name=Chapter")
static void InitializeCustomTypes()
Q_CLASSINFO("SubtitleTracks", "type=QString;name=Track")
Q_INVOKABLE FrontendStatus(QObject *parent=nullptr)
Q_CLASSINFO("State", "type=QString")
QVariantMap SubtitleTracks
Q_DISABLE_COPY(FrontendStatus)
#define PROPERTYIMP_REF(type, name)
#define PROPERTYIMP_RO_REF(type, name)