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  void updateButton(MythUIButtonListItem *item) override;
56 };
57 
59 {
60  Q_DECLARE_TR_FUNCTIONS(LcdSettings)
61 };
62 
63 
65 {
66  Q_DECLARE_TR_FUNCTIONS(WatchListSettings)
67 };
68 
70 {
71  Q_DECLARE_TR_FUNCTIONS(ChannelGroupSettings)
72 };
73 
74 #if CONFIG_DARWIN
75 class MacMainSettings : public GroupSetting
76 {
77  Q_OBJECT
78 
79  public:
80  MacMainSettings();
81 };
82 
83 class MacFloatSettings : public GroupSetting
84 {
85  Q_OBJECT
86 
87  public:
88  MacFloatSettings();
89 };
90 
91 
92 class MacDockSettings : public GroupSetting
93 {
94  Q_OBJECT
95 
96  public:
97  MacDockSettings();
98 };
99 
100 
101 class MacDesktopSettings : public GroupSetting
102 {
103  Q_OBJECT
104 
105  public:
106  MacDesktopSettings();
107 };
108 #endif
109 
111 {
113 
114  public:
115  OSDSettings();
116 };
117 
119 {
121 
122  public:
123  GeneralSettings();
124 };
125 
126 class EPGSettings : public GroupSetting
127 {
129 
130  public:
131  EPGSettings();
132 };
133 
134 class MythDisplay;
136 {
137  Q_OBJECT
138 
139  public:
141  ~AppearanceSettings() override;
142  void applyChange() override; // GroupSetting
143 
144  public slots:
145  void PopulateScreens(int Screens);
146 
147  private:
150  MythDisplay *m_display { nullptr };
151 };
152 
154 {
155  Q_OBJECT
156 
157  public:
158  explicit HostRefreshRateComboBoxSetting(const QString &name) :
159  HostComboBoxSetting(name) { }
160  ~HostRefreshRateComboBoxSetting() override = default;
161 
162  public slots:
163  virtual void ChangeResolution(StandardSetting *setting);
164 
165  private:
166  static vector<double> GetRefreshRates(const QString &resolution);
167 };
168 
170 {
171  Q_OBJECT
172 
173  public:
175  void applyChange() override; // GroupSetting
176 
177 #ifdef USING_LIBCEC
178  public slots:
179  void cecChanged(bool setting);
180  protected:
181  HostCheckBoxSetting *m_cecPowerOnTVAllowed {nullptr};
182  HostCheckBoxSetting *m_cecPowerOffTVAllowed {nullptr};
183  HostCheckBoxSetting *m_cecPowerOnTVOnStart {nullptr};
184  HostCheckBoxSetting *m_cecPowerOffTVOnExit {nullptr};
185 #endif // USING_LIBCEC
186 };
187 
189 {
191 
192  public:
194 };
195 
198 {
199  Q_OBJECT
200 
201  public:
203  ProfileItem &_item);
204 
205  void Load(void) override; // StandardSetting
206  void Save(void) override; // StandardSetting
207 
208  bool keyPressEvent(QKeyEvent *e) override; // StandardSetting
209  uint GetIndex(void) const;
210  void ShowDeleteDialog(void);
211  void DecreasePriority(void);
212  void IncreasePriority(void);
213 
214  private slots:
215  void widthChanged(const QString &val);
216  void heightChanged(const QString &val);
217  void framerateChanged(const QString &val);
218  void decoderChanged(const QString &dec);
219  void vrenderChanged(const QString &renderer);
220  void SingleQualityChanged(const QString &Quality);
221  void DoubleQualityChanged(const QString &Quality);
222  static void LoadQuality(TransMythUIComboBoxSetting *Deint,
225  QString &Value);
226  static QString GetQuality(TransMythUIComboBoxSetting *Deint,
229  void InitLabel(void);
230  void DoDeleteSlot(bool doDelete);
231 
232  private:
250 };
251 
253 {
254  Q_OBJECT
255 
256  public:
257  PlaybackProfileConfig(QString profilename, StandardSetting *parent);
258  ~PlaybackProfileConfig() override = default;
259 
260  void Save(void) override; // StandardSetting
261 
263 
264  void swap(int indexA, int indexB);
265 
266  private slots:
267  void AddNewEntry(void);
268 
269  private:
270  void InitUI(StandardSetting *parent);
272 
273  private:
274  void ReloadSettings(void);
275  vector<ProfileItem> m_items;
276  vector<ProfileItem> m_delItems;
277  QString m_profileName;
279 
282  vector<PlaybackProfileItemConfig*> m_profiles;
283  vector<TransMythUISpinBoxSetting*> m_priority;
284 };
285 
287 {
288  public:
289  ChannelGroupSetting(const QString &groupName, int groupId);
290  void Load() override; // StandardSetting
291  void Save() override; // StandardSetting
292  bool canDelete(void) override; // GroupSetting
293  void deleteEntry(void) override; // GroupSetting
294 
295  private:
296  int m_groupId {-1};
298 };
299 
301 {
302  Q_OBJECT
303 
304  public:
306  void Load() override; // StandardSetting
307 
308  public slots:
309  void ShowNewGroupDialog(void);
310  void CreateNewGroup(const QString& name);
311 
312  private:
314 };
315 
316 #endif
void vrenderChanged(const QString &renderer)
unsigned int slots[4]
Definition: element.c:38
void DeleteProfileItem(PlaybackProfileItemConfig *profile)
PlaybackProfileConfig(QString profilename, StandardSetting *parent)
ChannelGroupSetting(const QString &groupName, int groupId)
void decoderChanged(const QString &dec)
Q_DECLARE_TR_FUNCTIONS(OSDSettings)
TransTextEditSetting * m_heightRange
~HostRefreshRateComboBoxSetting() override=default
MythDisplay * m_display
TransTextEditSetting * m_groupName
vector< ProfileItem > m_delItems
bool keyPressEvent(QKeyEvent *e) override
void framerateChanged(const QString &val)
VideoModeSettings(const char *c)
MythUIComboBoxSetting * m_playbackProfiles
void heightChanged(const QString &val)
void Save(void) override
MythUIComboBoxSetting * m_codecs
HostComboBoxSetting * m_screenAspect
void Load() override
TransMythUICheckBoxSetting * m_doubleShader
static vector< double > GetRefreshRates(const QString &resolution)
ButtonStandardSetting * m_addGroupButton
TransMythUIComboBoxSetting * m_singleDeint
void DoubleQualityChanged(const QString &Quality)
void applyChange() override
PlaybackProfileConfig * m_parentConfig
void widthChanged(const QString &val)
Q_DECLARE_TR_FUNCTIONS(EPGSettings)
void applyChange() override
TransMythUIComboBoxSetting * m_doubleDeint
void Load(void) override
StandardSetting * InitProfileItem(uint i, StandardSetting *parent)
PlaybackProfileItemConfig(PlaybackProfileConfig *parent, uint idx, ProfileItem &_item)
TransMythUIComboBoxSetting * m_vidRend
TransMythUICheckBoxSetting * m_markForDeletion
~PlaybackProfileConfig() override=default
TransMythUICheckBoxSetting * m_singleShader
unsigned int uint
Definition: compat.h:140
TransMythUIComboBoxSetting * m_decoder
~AppearanceSettings() override
HostRefreshRateComboBoxSetting(const QString &name)
TransMythUICheckBoxSetting * m_skipLoop
TransMythUISpinBoxSetting * m_maxCpus
void SingleQualityChanged(const QString &Quality)
TransTextEditSetting * m_widthRange
vector< TransMythUISpinBoxSetting * > m_priority
void swap(int indexA, int indexB)
void Load(void) override
TransMythUICheckBoxSetting * m_singleDriver
void PopulateScreens(int Screens)
void ShowPlaybackProfileMenu(MythUIButtonListItem *item)
void Save() override
TransTextEditSetting * m_framerate
Q_DECLARE_TR_FUNCTIONS(GeneralSettings)
void DoDeleteSlot(bool doDelete)
ButtonStandardSetting * m_addNewEntry
void deleteEntry(void) override
ButtonStandardSetting * m_newPlaybackProfileButton
HostComboBoxSetting * m_screen
static QString GetQuality(TransMythUIComboBoxSetting *Deint, TransMythUICheckBoxSetting *Shader, TransMythUICheckBoxSetting *Driver)
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)
vector< ProfileItem > m_items
void CreateNewGroup(const QString &name)
TransMythUICheckBoxSetting * m_doubleDriver
PlaybackSettingsDialog(MythScreenStack *stack)
static void LoadQuality(TransMythUIComboBoxSetting *Deint, TransMythUICheckBoxSetting *Shader, TransMythUICheckBoxSetting *Driver, QString &Value)
Parse the required deinterlacing quality and preferences.
virtual void ChangeResolution(StandardSetting *setting)
void Save(void) override
void InitUI(StandardSetting *parent)
vector< PlaybackProfileItemConfig * > m_profiles
void CreateNewPlaybackProfileSlot(const QString &name)