MythTV  master
globalsettings.h
Go to the documentation of this file.
1 #ifndef MYTHSETTINGS_H
2 #define MYTHSETTINGS_H
3 
4 #include <QStringList>
5 #include <QObject>
6 #include <QCoreApplication>
7 
8 #include "mythconfig.h"
9 #include "standardsettings.h"
10 #include "mythcontext.h"
11 #include "videodisplayprofile.h"
12 
13 #include <QMutex>
14 
15 class QFileInfo;
16 
18 {
19  Q_OBJECT
20 
21  public:
22  explicit PlaybackSettingsDialog(MythScreenStack *stack);
23  void ShowMenu(void) override; // StandardSettingDialog
24 
25  protected slots:
27  void DeleteProfileItem(void);
28  void MoveProfileItemDown(void);
29  void MoveProfileItemUp(void);
30 };
31 
33 {
34  Q_OBJECT
35 
36  public:
38  void Load(void) override; // StandardSetting
39 
40  private slots:
41  void NewPlaybackProfileSlot(void);
42  void CreateNewPlaybackProfileSlot(const QString &name);
43 
44  private:
47 };
48 
50 {
51  Q_OBJECT
52 
53  public:
54  explicit VideoModeSettings(const char *c);
55 #if defined(USING_XRANDR) || CONFIG_DARWIN
56  void updateButton(MythUIButtonListItem *item) override; // MythUICheckBoxSetting
57 #endif
58 };
59 
61 {
62  Q_DECLARE_TR_FUNCTIONS(LcdSettings)
63 };
64 
65 
67 {
68  Q_DECLARE_TR_FUNCTIONS(WatchListSettings)
69 };
70 
72 {
73  Q_DECLARE_TR_FUNCTIONS(ChannelGroupSettings)
74 };
75 
76 #if CONFIG_DARWIN
77 class MacMainSettings : public GroupSetting
78 {
79  Q_OBJECT
80 
81  public:
82  MacMainSettings();
83 };
84 
85 class MacFloatSettings : public GroupSetting
86 {
87  Q_OBJECT
88 
89  public:
90  MacFloatSettings();
91 };
92 
93 
94 class MacDockSettings : public GroupSetting
95 {
96  Q_OBJECT
97 
98  public:
99  MacDockSettings();
100 };
101 
102 
103 class MacDesktopSettings : public GroupSetting
104 {
105  Q_OBJECT
106 
107  public:
108  MacDesktopSettings();
109 };
110 #endif
111 
113 {
115 
116  public:
117  OSDSettings();
118 };
119 
121 {
123 
124  public:
125  GeneralSettings();
126 };
127 
128 class EPGSettings : public GroupSetting
129 {
131 
132  public:
133  EPGSettings();
134 };
135 
137 {
139 
140  public:
142  void applyChange() override; // GroupSetting
143 };
144 
146 {
147  Q_OBJECT
148 
149  public:
150  explicit HostRefreshRateComboBoxSetting(const QString &name) :
152  virtual ~HostRefreshRateComboBoxSetting() = default;
153 
154  public slots:
155 #if defined(USING_XRANDR) || CONFIG_DARWIN
156  virtual void ChangeResolution(StandardSetting *);
157 #endif
158 
159  private:
160  static vector<double> GetRefreshRates(const QString &resolution);
161 };
162 
164 {
165  Q_OBJECT
166 
167  public:
169  void applyChange() override; // GroupSetting
170 
171 #ifdef USING_LIBCEC
172  public slots:
173  void cecChanged(bool);
174  protected:
175  HostCheckBoxSetting *m_CECPowerOnTVAllowed {nullptr};
176  HostCheckBoxSetting *m_CECPowerOffTVAllowed {nullptr};
177  HostCheckBoxSetting *m_CECPowerOnTVOnStart {nullptr};
178  HostCheckBoxSetting *m_CECPowerOffTVOnExit {nullptr};
179 #endif // USING_LIBCEC
180 };
181 
183 {
185 
186  public:
188 };
189 
192 {
193  Q_OBJECT
194 
195  public:
197  ProfileItem &_item);
198 
199  void Load(void) override; // StandardSetting
200  void Save(void) override; // StandardSetting
201 
202  bool keyPressEvent(QKeyEvent *) override; // StandardSetting
203  uint GetIndex(void) const;
204  void ShowDeleteDialog(void);
205  void DecreasePriority(void);
206  void IncreasePriority(void);
207 
208  private slots:
209  void widthChanged(const QString &val);
210  void heightChanged(const QString &val);
211  void framerateChanged(const QString &val);
212  void decoderChanged(const QString &dec);
213  void vrenderChanged(const QString &renderer);
214  void orenderChanged(const QString &renderer);
215  void deint0Changed(const QString &deint);
216  void deint1Changed(const QString &deint);
217  void InitLabel(void);
218  void DoDeleteSlot(bool);
219 
220  private:
237 };
238 
240 {
241  Q_OBJECT
242 
243  public:
244  PlaybackProfileConfig(const QString &profilename, StandardSetting *parent);
245  virtual ~PlaybackProfileConfig() = default;
246 
247  void Save(void) override; // StandardSetting
248 
250 
251  void swap(int indexA, int indexB);
252 
253  private slots:
254  void AddNewEntry(void);
255 
256  private:
257  void InitUI(StandardSetting *parent);
259 
260  private:
261  void ReloadSettings(void);
264  QString m_profile_name;
266 
269  vector<PlaybackProfileItemConfig*> m_profiles;
270  vector<TransMythUISpinBoxSetting*> priority;
271 };
272 
274 {
275  public:
276  ChannelGroupSetting(const QString &groupName, int groupId);
277  void Load() override; // StandardSetting
278  void Save() override; // StandardSetting
279  bool canDelete(void) override; // GroupSetting
280  void deleteEntry(void) override; // GroupSetting
281 
282  private:
283  int m_groupId {-1};
285 };
286 
288 {
289  Q_OBJECT
290 
291  public:
293  void Load() override; // StandardSetting
294 
295  public slots:
296  void ShowNewGroupDialog(void);
297  void CreateNewGroup(const QString& name);
298 
299  private:
301 };
302 
303 #endif
TransMythUICheckBoxSetting * m_osdfade
void vrenderChanged(const QString &renderer)
unsigned int slots[4]
Definition: element.c:38
void orenderChanged(const QString &renderer)
void DeleteProfileItem(PlaybackProfileItemConfig *profile)
StandardSetting * InitProfileItem(uint, StandardSetting *)
ChannelGroupSetting(const QString &groupName, int groupId)
void deint1Changed(const QString &deint)
void decoderChanged(const QString &dec)
Q_DECLARE_TR_FUNCTIONS(OSDSettings)
TransTextEditSetting * m_filters
virtual void ChangeResolution(StandardSetting *)
TransTextEditSetting * m_groupName
unsigned int uint
Definition: compat.h:140
TransTextEditSetting * m_height_range
void framerateChanged(const QString &val)
VideoModeSettings(const char *c)
MythUIComboBoxSetting * m_playbackProfiles
void heightChanged(const QString &val)
void Save(void) override
MythUIComboBoxSetting * m_codecs
TransMythUIComboBoxSetting * m_deint0
void Load() override
static vector< double > GetRefreshRates(const QString &resolution)
ButtonStandardSetting * m_addGroupButton
Q_DECLARE_TR_FUNCTIONS(AppearanceSettings)
TransTextEditSetting * m_width_range
void applyChange() override
PlaybackProfileConfig * m_parentConfig
void widthChanged(const QString &val)
vector< ProfileItem > item_list_t
Q_DECLARE_TR_FUNCTIONS(EPGSettings)
void applyChange() override
void Load(void) override
PlaybackProfileItemConfig(PlaybackProfileConfig *parent, uint idx, ProfileItem &_item)
TransMythUICheckBoxSetting * m_markForDeletion
TransMythUIComboBoxSetting * m_vidrend
TransMythUIComboBoxSetting * m_decoder
PlaybackProfileConfig(const QString &profilename, StandardSetting *parent)
TransMythUICheckBoxSetting * m_skiploop
const char * name
Definition: ParseText.cpp:328
void deint0Changed(const QString &deint)
HostRefreshRateComboBoxSetting(const QString &name)
virtual ~HostRefreshRateComboBoxSetting()=default
virtual ~PlaybackProfileConfig()=default
void swap(int indexA, int indexB)
void Load(void) override
TransMythUIComboBoxSetting * m_deint1
void ShowPlaybackProfileMenu(MythUIButtonListItem *item)
void Save() override
TransTextEditSetting * m_framerate
TransMythUIComboBoxSetting * m_osdrend
Q_DECLARE_TR_FUNCTIONS(GeneralSettings)
ButtonStandardSetting * m_addNewEntry
void deleteEntry(void) override
ButtonStandardSetting * m_newPlaybackProfileButton
bool keyPressEvent(QKeyEvent *) override
bool canDelete(void) override
void ShowMenu(void) override
void updateButton(MythUIButtonListItem *item) override
This method is called whenever the UI need to reflect a change Reimplement this If you widget need a ...
Q_DECLARE_TR_FUNCTIONS(GeneralRecPrioritiesSettings)
void NewPlaybackProfileSlot(void)
void CreateNewGroup(const QString &name)
PlaybackSettingsDialog(MythScreenStack *stack)
TransMythUISpinBoxSetting * m_max_cpus
void Save(void) override
vector< TransMythUISpinBoxSetting * > priority
void InitUI(StandardSetting *parent)
vector< PlaybackProfileItemConfig * > m_profiles
void CreateNewPlaybackProfileSlot(const QString &name)