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  Q_OBJECT
289 
290  public:
291  ChannelGroupSetting(const QString &groupName, int groupId);
292  void Load() override; // StandardSetting
293  void Save() override; // StandardSetting
294  bool canDelete(void) override; // GroupSetting
295  void deleteEntry(void) override; // GroupSetting
296 
297  private:
298  int m_groupId {-1};
300 };
301 
303 {
304  Q_OBJECT
305 
306  public:
308  void Load() override; // StandardSetting
309 
310  public slots:
311  void ShowNewGroupDialog(void);
312  void CreateNewGroup(const QString& name);
313 
314  private:
316 };
317 
318 #endif
PlaybackProfileConfig::InitUI
void InitUI(StandardSetting *parent)
Definition: globalsettings.cpp:1183
OSDSettings::Q_DECLARE_TR_FUNCTIONS
Q_DECLARE_TR_FUNCTIONS(OSDSettings)
PlaybackProfileConfig::m_groupId
uint m_groupId
Definition: globalsettings.h:278
e
QDomElement e
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:1417
doDelete
bool doDelete
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:635
PlaybackProfileConfig::DeleteProfileItem
void DeleteProfileItem(PlaybackProfileItemConfig *profile)
Definition: globalsettings.cpp:1241
PlaybackProfileItemConfig::Load
void Load(void) override
Definition: globalsettings.cpp:850
TransMythUICheckBoxSetting
Definition: standardsettings.h:408
PlaybackProfileItemConfig::GetIndex
uint GetIndex(void) const
Definition: globalsettings.cpp:845
AppearanceSettings::m_display
MythDisplay * m_display
Definition: globalsettings.h:150
PlaybackSettings::m_playbackProfiles
MythUIComboBoxSetting * m_playbackProfiles
Definition: globalsettings.h:46
PlaybackProfileItemConfig::m_heightRange
TransTextEditSetting * m_heightRange
Definition: globalsettings.h:235
PlaybackSettingsDialog
Definition: globalsettings.h:17
PlaybackProfileConfig::m_addNewEntry
ButtonStandardSetting * m_addNewEntry
Definition: globalsettings.h:281
PlaybackProfileConfig::~PlaybackProfileConfig
~PlaybackProfileConfig() override=default
ChannelGroupSettings
Definition: globalsettings.h:69
TransMythUIComboBoxSetting
Definition: standardsettings.h:269
TransTextEditSetting
Definition: standardsettings.h:158
ButtonStandardSetting
Definition: standardsettings.h:447
PlaybackProfileItemConfig::vrenderChanged
void vrenderChanged(const QString &renderer)
Definition: globalsettings.cpp:1017
HostRefreshRateComboBoxSetting::~HostRefreshRateComboBoxSetting
~HostRefreshRateComboBoxSetting() override=default
PlaybackProfileConfig::m_priority
vector< TransMythUISpinBoxSetting * > m_priority
Definition: globalsettings.h:283
PlaybackProfileConfig::m_items
vector< ProfileItem > m_items
Definition: globalsettings.h:275
ChannelGroupsSetting
Definition: globalsettings.h:302
PlaybackSettings
Definition: globalsettings.h:32
TransMythUISpinBoxSetting
Definition: standardsettings.h:350
ProfileItem
Definition: videodisplayprofile.h:37
PlaybackProfileItemConfig
Definition: globalsettings.h:197
MythScreenStack
Definition: mythscreenstack.h:15
MainGeneralSettings::applyChange
void applyChange() override
Definition: globalsettings.cpp:4105
AppearanceSettings::m_screenAspect
HostComboBoxSetting * m_screenAspect
Definition: globalsettings.h:149
HostRefreshRateComboBoxSetting::GetRefreshRates
static vector< double > GetRefreshRates(const QString &resolution)
Definition: globalsettings.cpp:2388
AppearanceSettings::applyChange
void applyChange() override
Definition: globalsettings.cpp:4557
HostRefreshRateComboBoxSetting::HostRefreshRateComboBoxSetting
HostRefreshRateComboBoxSetting(const QString &name)
Definition: globalsettings.h:158
slots
unsigned int slots[4]
Definition: element.cpp:38
VideoModeSettings
Definition: globalsettings.h:49
PlaybackSettingsDialog::ShowPlaybackProfileMenu
void ShowPlaybackProfileMenu(MythUIButtonListItem *item)
Definition: globalsettings.cpp:4190
PlaybackProfileItemConfig::m_vidRend
TransMythUIComboBoxSetting * m_vidRend
Definition: globalsettings.h:241
PlaybackProfileConfig::AddNewEntry
void AddNewEntry(void)
Definition: globalsettings.cpp:1256
PlaybackProfileItemConfig::heightChanged
void heightChanged(const QString &val)
Definition: globalsettings.cpp:963
PlaybackProfileConfig::m_profiles
vector< PlaybackProfileItemConfig * > m_profiles
Definition: globalsettings.h:282
PlaybackProfileConfig::ReloadSettings
void ReloadSettings(void)
Definition: globalsettings.cpp:1270
PlaybackProfileConfig::InitProfileItem
StandardSetting * InitProfileItem(uint i, StandardSetting *parent)
Definition: globalsettings.cpp:1198
ChannelGroupSetting::m_groupName
TransTextEditSetting * m_groupName
Definition: globalsettings.h:299
PlaybackProfileItemConfig::m_singleDeint
TransMythUIComboBoxSetting * m_singleDeint
Definition: globalsettings.h:242
GeneralSettings::Q_DECLARE_TR_FUNCTIONS
Q_DECLARE_TR_FUNCTIONS(GeneralSettings)
PlaybackProfileItemConfig::m_doubleShader
TransMythUICheckBoxSetting * m_doubleShader
Definition: globalsettings.h:246
PlaybackProfileItemConfig::m_decoder
TransMythUIComboBoxSetting * m_decoder
Definition: globalsettings.h:238
PlaybackProfileItemConfig::DoubleQualityChanged
void DoubleQualityChanged(const QString &Quality)
Definition: globalsettings.cpp:1030
MainGeneralSettings::MainGeneralSettings
MainGeneralSettings()
Definition: globalsettings.cpp:4012
HostCheckBoxSetting
Definition: standardsettings.h:414
WatchListSettings
Definition: globalsettings.h:64
PlaybackProfileItemConfig::m_skipLoop
TransMythUICheckBoxSetting * m_skipLoop
Definition: globalsettings.h:240
OSDSettings
Definition: globalsettings.h:110
PlaybackProfileItemConfig::m_parentConfig
PlaybackProfileConfig * m_parentConfig
Definition: globalsettings.h:248
ChannelGroupSetting::Save
void Save() override
Definition: globalsettings.cpp:4670
PlaybackSettingsDialog::ShowMenu
void ShowMenu(void) override
Definition: globalsettings.cpp:4178
PlaybackProfileConfig::m_profileName
QString m_profileName
Definition: globalsettings.h:277
MythUIButtonListItem
Definition: mythuibuttonlist.h:27
PlaybackSettingsDialog::DeleteProfileItem
void DeleteProfileItem(void)
Definition: globalsettings.cpp:4246
EPGSettings::EPGSettings
EPGSettings()
Definition: globalsettings.cpp:4465
ChannelGroupSetting
Definition: globalsettings.h:286
videodisplayprofile.h
StandardSettingDialog
Definition: standardsettings.h:465
VideoModeSettings::VideoModeSettings
VideoModeSettings(const char *c)
Definition: globalsettings.cpp:2488
ChannelGroupsSetting::Load
void Load() override
Definition: globalsettings.cpp:4824
hardwareprofile.scan.profile
profile
Definition: scan.py:99
MythUIComboBoxSetting
Definition: standardsettings.h:215
GeneralRecPrioritiesSettings::GeneralRecPrioritiesSettings
GeneralRecPrioritiesSettings()
Definition: globalsettings.cpp:4473
ChannelGroupsSetting::ChannelGroupsSetting
ChannelGroupsSetting()
Definition: globalsettings.cpp:4819
PlaybackSettingsDialog::MoveProfileItemUp
void MoveProfileItemUp(void)
Definition: globalsettings.cpp:4229
HostRefreshRateComboBoxSetting
Definition: globalsettings.h:153
PlaybackProfileItemConfig::DecreasePriority
void DecreasePriority(void)
Definition: globalsettings.cpp:1136
PlaybackSettings::PlaybackSettings
PlaybackSettings()
Definition: globalsettings.cpp:4253
PlaybackProfileItemConfig::decoderChanged
void decoderChanged(const QString &dec)
Definition: globalsettings.cpp:991
PlaybackProfileItemConfig::m_codecs
MythUIComboBoxSetting * m_codecs
Definition: globalsettings.h:236
ChannelGroupsSetting::ShowNewGroupDialog
void ShowNewGroupDialog(void)
Definition: globalsettings.cpp:4859
PlaybackProfileItemConfig::m_singleShader
TransMythUICheckBoxSetting * m_singleShader
Definition: globalsettings.h:243
PlaybackSettingsDialog::MoveProfileItemDown
void MoveProfileItemDown(void)
Definition: globalsettings.cpp:4212
PlaybackProfileConfig::m_delItems
vector< ProfileItem > m_delItems
Definition: globalsettings.h:276
PlaybackProfileItemConfig::m_framerate
TransTextEditSetting * m_framerate
Definition: globalsettings.h:237
PlaybackSettings::Load
void Load(void) override
Definition: globalsettings.cpp:4258
PlaybackProfileItemConfig::SingleQualityChanged
void SingleQualityChanged(const QString &Quality)
Definition: globalsettings.cpp:1023
PlaybackProfileItemConfig::m_maxCpus
TransMythUISpinBoxSetting * m_maxCpus
Definition: globalsettings.h:239
GeneralRecPrioritiesSettings::Q_DECLARE_TR_FUNCTIONS
Q_DECLARE_TR_FUNCTIONS(GeneralRecPrioritiesSettings)
AppearanceSettings::PopulateScreens
void PopulateScreens(int Screens)
Definition: globalsettings.cpp:4563
GeneralRecPrioritiesSettings
Definition: globalsettings.h:188
PlaybackProfileConfig::swap
void swap(int indexA, int indexB)
Definition: globalsettings.cpp:1292
PlaybackProfileConfig::m_markForDeletion
TransMythUICheckBoxSetting * m_markForDeletion
Definition: globalsettings.h:280
GeneralSettings
Definition: globalsettings.h:118
PlaybackSettingsDialog::PlaybackSettingsDialog
PlaybackSettingsDialog(MythScreenStack *stack)
Definition: globalsettings.cpp:4173
uint
unsigned int uint
Definition: compat.h:140
PlaybackSettings::m_newPlaybackProfileButton
ButtonStandardSetting * m_newPlaybackProfileButton
Definition: globalsettings.h:45
MythDisplay
Definition: mythdisplay.h:18
AppearanceSettings::AppearanceSettings
AppearanceSettings()
Definition: globalsettings.cpp:4575
PlaybackProfileItemConfig::m_doubleDeint
TransMythUIComboBoxSetting * m_doubleDeint
Definition: globalsettings.h:245
GeneralSettings::GeneralSettings
GeneralSettings()
Definition: globalsettings.cpp:4405
PlaybackProfileItemConfig::framerateChanged
void framerateChanged(const QString &val)
Definition: globalsettings.cpp:977
ChannelGroupsSetting::m_addGroupButton
ButtonStandardSetting * m_addGroupButton
Definition: globalsettings.h:315
PlaybackProfileConfig
Definition: globalsettings.h:252
EPGSettings::Q_DECLARE_TR_FUNCTIONS
Q_DECLARE_TR_FUNCTIONS(EPGSettings)
PlaybackProfileItemConfig::m_doubleDriver
TransMythUICheckBoxSetting * m_doubleDriver
Definition: globalsettings.h:247
PlaybackProfileItemConfig::PlaybackProfileItemConfig
PlaybackProfileItemConfig(PlaybackProfileConfig *parent, uint idx, ProfileItem &_item)
Definition: globalsettings.cpp:704
HostRefreshRateComboBoxSetting::ChangeResolution
virtual void ChangeResolution(StandardSetting *setting)
Definition: globalsettings.cpp:2353
standardsettings.h
PlaybackProfileItemConfig::m_item
ProfileItem & m_item
Definition: globalsettings.h:233
OSDSettings::OSDSettings
OSDSettings()
Definition: globalsettings.cpp:4383
PlaybackProfileItemConfig::m_singleDriver
TransMythUICheckBoxSetting * m_singleDriver
Definition: globalsettings.h:244
PlaybackProfileItemConfig::Save
void Save(void) override
Definition: globalsettings.cpp:933
ChannelGroupSetting::canDelete
bool canDelete(void) override
Definition: globalsettings.cpp:4796
PlaybackProfileItemConfig::DoDeleteSlot
void DoDeleteSlot(bool doDelete)
Definition: globalsettings.cpp:1130
EPGSettings
Definition: globalsettings.h:126
MainGeneralSettings
Definition: globalsettings.h:169
PlaybackProfileItemConfig::widthChanged
void widthChanged(const QString &val)
Definition: globalsettings.cpp:949
AppearanceSettings::~AppearanceSettings
~AppearanceSettings() override
Definition: globalsettings.cpp:4632
PlaybackProfileItemConfig::m_widthRange
TransTextEditSetting * m_widthRange
Definition: globalsettings.h:234
AppearanceSettings
Definition: globalsettings.h:135
HostComboBoxSetting
Definition: standardsettings.h:254
mythcontext.h
PlaybackProfileItemConfig::GetQuality
static QString GetQuality(TransMythUIComboBoxSetting *Deint, TransMythUICheckBoxSetting *Shader, TransMythUICheckBoxSetting *Driver)
Definition: globalsettings.cpp:1075
LcdSettings
Definition: globalsettings.h:58
ChannelGroupSetting::m_groupId
int m_groupId
Definition: globalsettings.h:298
PlaybackProfileConfig::Save
void Save(void) override
Definition: globalsettings.cpp:1210
PlaybackProfileConfig::PlaybackProfileConfig
PlaybackProfileConfig(QString profilename, StandardSetting *parent)
Definition: globalsettings.cpp:1146
PlaybackSettings::CreateNewPlaybackProfileSlot
void CreateNewPlaybackProfileSlot(const QString &name)
Definition: globalsettings.cpp:1360
PlaybackProfileItemConfig::LoadQuality
static void LoadQuality(TransMythUIComboBoxSetting *Deint, TransMythUICheckBoxSetting *Shader, TransMythUICheckBoxSetting *Driver, QString &Value)
Parse the required deinterlacing quality and preferences.
Definition: globalsettings.cpp:1044
PlaybackSettings::NewPlaybackProfileSlot
void NewPlaybackProfileSlot(void)
Definition: globalsettings.cpp:1341
StandardSetting
Definition: standardsettings.h:29
PlaybackProfileItemConfig::InitLabel
void InitLabel(void)
Definition: globalsettings.cpp:1157
PlaybackProfileItemConfig::IncreasePriority
void IncreasePriority(void)
Definition: globalsettings.cpp:1141
ChannelGroupSetting::Load
void Load() override
Definition: globalsettings.cpp:4751
ChannelGroupSetting::deleteEntry
void deleteEntry(void) override
Definition: globalsettings.cpp:4802
PlaybackProfileItemConfig::ShowDeleteDialog
void ShowDeleteDialog(void)
Definition: globalsettings.cpp:1114
VideoModeSettings::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: globalsettings.cpp:2470
PlaybackProfileItemConfig::keyPressEvent
bool keyPressEvent(QKeyEvent *e) override
Definition: globalsettings.cpp:1095
ChannelGroupSetting::ChannelGroupSetting
ChannelGroupSetting(const QString &groupName, int groupId)
Definition: globalsettings.cpp:4660
GroupSetting
Definition: standardsettings.h:432
AppearanceSettings::m_screen
HostComboBoxSetting * m_screen
Definition: globalsettings.h:148
ChannelGroupsSetting::CreateNewGroup
void CreateNewGroup(const QString &name)
Definition: globalsettings.cpp:4877
PlaybackProfileItemConfig::m_index
uint m_index
Definition: globalsettings.h:249