MythTV  master
playgroup.h
Go to the documentation of this file.
1 #ifndef PLAYGROUP_H
2 #define PLAYGROUP_H
3 
4 #include <QStringList>
5 
6 #include "mythtvexp.h"
7 #include "standardsettings.h"
8 
9 class ProgramInfo;
10 
12 {
13  public:
14  static QStringList GetNames(void);
15  static int GetCount(void);
16  static QString GetInitialName(const ProgramInfo *pi);
17  static int GetSetting(const QString &name, const QString &field,
18  int defval);
19  template <typename T>
20  static typename std::enable_if<std::chrono::__is_duration<T>::value, T>::type
21  GetDurSetting(const QString &name, const QString &field, T defval)
22  { return T(GetSetting(name, field, static_cast<int>(defval.count()))); }
23 };
24 
26 {
27  Q_OBJECT
28 
29  public:
30  PlayGroupEditor(void);
31  void Load(void) override; // StandardSetting
32 
33  public slots:
34  void CreateNewPlayBackGroup() const;
35  void CreateNewPlayBackGroupSlot(const QString &name);
36 
37  private:
38  ButtonStandardSetting *m_addGroupButton {nullptr};
39 };
40 
42 {
43  Q_OBJECT
44 
45  public:
46  PlayGroupConfig(const QString &label, const QString &name, bool isNew=false);
47  void updateButton(MythUIButtonListItem *item) override; // GroupSetting
48  void Save() override; // StandardSetting
49  bool canDelete(void) override; // GroupSetting
50  void deleteEntry(void) override; // GroupSetting
51 
52  private:
53  StandardSetting *m_titleMatch {nullptr};
54  MythUISpinBoxSetting *m_skipAhead {nullptr};
55  MythUISpinBoxSetting *m_skipBack {nullptr};
56  MythUISpinBoxSetting *m_jumpMinutes {nullptr};
57  MythUISpinBoxSetting *m_timeStrech {nullptr};
58  bool m_isNew {false};
59 };
60 
61 #endif
PlayGroup::GetDurSetting
static std::enable_if< std::chrono::__is_duration< T >::value, T >::type GetDurSetting(const QString &name, const QString &field, T defval)
Definition: playgroup.h:21
ButtonStandardSetting
Definition: standardsettings.h:450
mythtvexp.h
GroupSetting::updateButton
void updateButton(MythUIButtonListItem *item) override
This method is called whenever the UI need to reflect a change Reimplement this If you widget need a ...
Definition: standardsettings.cpp:304
PlayGroupEditor
Definition: playgroup.h:25
MythUIButtonListItem
Definition: mythuibuttonlist.h:27
PlayGroupConfig
Definition: playgroup.h:41
GroupSetting::deleteEntry
virtual void deleteEntry(void)
Definition: standardsettings.h:449
StandardSetting::Load
virtual void Load(void)
Definition: standardsettings.cpp:213
StandardSetting::Save
virtual void Save(void)
Definition: standardsettings.cpp:232
PlayGroup
Definition: playgroup.h:11
GroupSetting::canDelete
virtual bool canDelete(void)
Definition: standardsettings.h:448
standardsettings.h
MTV_PUBLIC
#define MTV_PUBLIC
Definition: mythtvexp.h:15
ProgramInfo
Holds information on recordings and videos.
Definition: programinfo.h:67
MythUISpinBoxSetting
Definition: standardsettings.h:328
StandardSetting
Definition: standardsettings.h:29
GroupSetting
Definition: standardsettings.h:435