MythTV master
recordingtypes.h
Go to the documentation of this file.
1#ifndef RECORDINGTYPES_H_
2#define RECORDINGTYPES_H_
3
5//
6// WARNING
7//
8// The enums in this header are used for database values:
9// hence when removing something from these enums leave a gap,
10// and when adding a new value give it an explicit integer value.
11//
13
14#include <QString>
15#include <QVariant>
16
17#include "mythbaseexp.h"
18
19enum RecordingType : std::uint8_t
20{
24 //kChannelRecord = 3, (Obsolete)
30 //kFindDailyRecord = 9, (Obsolete)
31 //kFindWeeklyRecord = 10, (Obsolete)
33}; // note stored in uint8_t in ProgramInfo
34MBASE_PUBLIC QString toString(RecordingType rectype);
37MBASE_PUBLIC QChar toQChar( RecordingType rectype);
39static inline QVariant toVariant(RecordingType rectype)
40 {return QVariant::fromValue(static_cast<int>(rectype)); }
41
43
44enum RecordingDupInType : std::uint8_t
45{
46 kDupsUnset = 0x00,
49 kDupsInAll = 0x0F,
50 kDupsNewEpi = 0x10
51}; // note stored in uint8_t in ProgramInfo
57MBASE_PUBLIC RecordingDupInType dupInFromStringAndBool(const QString& type, bool newEpisodesOnly);
58static inline QVariant toVariant(RecordingDupInType recdupin)
59 {return QVariant::fromValue(static_cast<int>(recdupin)); }
60
61enum RecordingDupMethodType : std::uint8_t
62{
69}; // note stored in uint8_t in ProgramInfo
74static inline QVariant toVariant(RecordingDupMethodType recdupmeth)
75 {return QVariant::fromValue(static_cast<int>(recdupmeth)); }
76
77enum RecSearchType : std::uint8_t
78{
85};
89static inline QVariant toVariant(RecSearchType recsearch)
90 {return QVariant::fromValue(static_cast<int>(recsearch)); }
91
92enum class AutoExtendType : uint8_t
93{
94 None = 0,
95 ESPN,
96 MLB,
97 Last
98};
99MBASE_PUBLIC QString toString(AutoExtendType extType);
103static inline QVariant toVariant(AutoExtendType extType)
104 {return QVariant::fromValue(static_cast<int>(extType)); }
105
106#endif
107
#define MBASE_PUBLIC
Definition: mythbaseexp.h:15
MBASE_PUBLIC QChar toQChar(RecordingType rectype)
Converts "rectype" into a human readable character.
MBASE_PUBLIC bool newEpifromDupIn(RecordingDupInType recdupin)
MBASE_PUBLIC RecordingDupInType dupInFromString(const QString &type)
static QVariant toVariant(RecordingType rectype)
MBASE_PUBLIC RecSearchType searchTypeFromString(const QString &type)
MBASE_PUBLIC int RecTypePrecedence(RecordingType rectype)
Converts a RecordingType to a simple integer so it's specificity can be compared to another.
RecSearchType
@ kTitleSearch
@ kPowerSearch
@ kKeywordSearch
@ kManualSearch
@ kNoSearch
@ kPeopleSearch
AutoExtendType
RecordingDupInType
@ kDupsInAll
@ kDupsUnset
@ kDupsNewEpi
@ kDupsInRecorded
@ kDupsInOldRecorded
MBASE_PUBLIC QString toRawString(RecordingType rectype)
Converts "rectype" into an untranslated string.
MBASE_PUBLIC RecordingType recTypeFromString(const QString &type)
MBASE_PUBLIC QString toDescription(RecordingType rectype)
Converts "rectype" into a human readable description.
MBASE_PUBLIC RecordingDupMethodType dupMethodFromString(const QString &type)
RecordingType
@ kOneRecord
@ kWeeklyRecord
@ kNotRecording
@ kAllRecord
@ kOverrideRecord
@ kSingleRecord
@ kDailyRecord
@ kTemplateRecord
@ kDontRecord
RecordingDupMethodType
@ kDupCheckUnset
@ kDupCheckSubDesc
@ kDupCheckSub
@ kDupCheckSubThenDesc
@ kDupCheckDesc
@ kDupCheckNone
MBASE_PUBLIC AutoExtendType autoExtendTypeFromInt(uint8_t type)
MBASE_PUBLIC QString toString(RecordingType rectype)
Converts "rectype" into a human readable string.
MBASE_PUBLIC RecordingDupInType dupInFromStringAndBool(const QString &type, bool newEpisodesOnly)
MBASE_PUBLIC AutoExtendType autoExtendTypeFromString(const QString &type)