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) const;
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 = default;
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 std::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) const;
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  std::vector<ProfileItem> m_items;
276  std::vector<ProfileItem> m_delItems;
277  QString m_profileName;
279 
282  std::vector<PlaybackProfileItemConfig*> m_profiles;
283  std::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) const;
312  void CreateNewGroup(const QString& name);
313 
314  private:
316 };
317 
318 #endif
PlaybackProfileConfig::InitUI
void InitUI(StandardSetting *parent)
Definition: globalsettings.cpp:1167
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:1420
doDelete
bool doDelete
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:638
PlaybackProfileConfig::DeleteProfileItem
void DeleteProfileItem(PlaybackProfileItemConfig *profile)
Definition: globalsettings.cpp:1226
PlaybackProfileItemConfig::Load
void Load(void) override
Definition: globalsettings.cpp:837
TransMythUICheckBoxSetting
Definition: standardsettings.h:412
PlaybackProfileItemConfig::GetIndex
uint GetIndex(void) const
Definition: globalsettings.cpp:832
AppearanceSettings::m_display
MythDisplay * m_display
Definition: globalsettings.h:150
PlaybackSettings::NewPlaybackProfileSlot
void NewPlaybackProfileSlot(void) const
Definition: globalsettings.cpp:1325
PlaybackSettings::m_playbackProfiles
MythUIComboBoxSetting * m_playbackProfiles
Definition: globalsettings.h:46
PlaybackProfileItemConfig::m_heightRange
TransTextEditSetting * m_heightRange
Definition: globalsettings.h:235
PlaybackSettingsDialog
Definition: globalsettings.h:18
PlaybackProfileConfig::m_addNewEntry
ButtonStandardSetting * m_addNewEntry
Definition: globalsettings.h:281
PlaybackProfileConfig::~PlaybackProfileConfig
~PlaybackProfileConfig() override=default
ChannelGroupSettings
Definition: globalsettings.h:70
TransMythUIComboBoxSetting
Definition: standardsettings.h:273
TransTextEditSetting
Definition: standardsettings.h:162
ButtonStandardSetting
Definition: standardsettings.h:451
PlaybackProfileItemConfig::vrenderChanged
void vrenderChanged(const QString &renderer)
Definition: globalsettings.cpp:1003
HostRefreshRateComboBoxSetting::~HostRefreshRateComboBoxSetting
~HostRefreshRateComboBoxSetting() override=default
ChannelGroupsSetting
Definition: globalsettings.h:303
PlaybackSettings
Definition: globalsettings.h:33
TransMythUISpinBoxSetting
Definition: standardsettings.h:354
ProfileItem
Definition: videodisplayprofile.h:37
PlaybackProfileItemConfig
Definition: globalsettings.h:198
MythScreenStack
Definition: mythscreenstack.h:16
MainGeneralSettings::applyChange
void applyChange() override
Definition: globalsettings.cpp:4156
AppearanceSettings::m_screenAspect
HostComboBoxSetting * m_screenAspect
Definition: globalsettings.h:149
AppearanceSettings::applyChange
void applyChange() override
Definition: globalsettings.cpp:4607
HostRefreshRateComboBoxSetting::HostRefreshRateComboBoxSetting
HostRefreshRateComboBoxSetting(const QString &name)
Definition: globalsettings.h:158
VideoModeSettings
Definition: globalsettings.h:50
PlaybackSettingsDialog::ShowPlaybackProfileMenu
void ShowPlaybackProfileMenu(MythUIButtonListItem *item)
Definition: globalsettings.cpp:4241
PlaybackProfileItemConfig::m_vidRend
TransMythUIComboBoxSetting * m_vidRend
Definition: globalsettings.h:241
PlaybackProfileConfig::AddNewEntry
void AddNewEntry(void)
Definition: globalsettings.cpp:1241
PlaybackProfileItemConfig::heightChanged
void heightChanged(const QString &val)
Definition: globalsettings.cpp:950
PlaybackProfileConfig::ReloadSettings
void ReloadSettings(void)
Definition: globalsettings.cpp:1255
PlaybackProfileConfig::InitProfileItem
StandardSetting * InitProfileItem(uint i, StandardSetting *parent)
Definition: globalsettings.cpp:1183
ChannelGroupSetting::m_groupName
TransTextEditSetting * m_groupName
Definition: globalsettings.h:299
PlaybackProfileConfig::m_items
std::vector< ProfileItem > m_items
Definition: globalsettings.h:275
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:1016
AppearanceSettings::~AppearanceSettings
~AppearanceSettings() override=default
MainGeneralSettings::MainGeneralSettings
MainGeneralSettings()
Definition: globalsettings.cpp:4063
HostCheckBoxSetting
Definition: standardsettings.h:418
WatchListSettings
Definition: globalsettings.h:65
PlaybackProfileItemConfig::m_skipLoop
TransMythUICheckBoxSetting * m_skipLoop
Definition: globalsettings.h:240
OSDSettings
Definition: globalsettings.h:111
PlaybackProfileItemConfig::m_parentConfig
PlaybackProfileConfig * m_parentConfig
Definition: globalsettings.h:248
ChannelGroupSetting::Save
void Save() override
Definition: globalsettings.cpp:4716
PlaybackSettingsDialog::ShowMenu
void ShowMenu(void) override
Definition: globalsettings.cpp:4229
PlaybackProfileConfig::m_profileName
QString m_profileName
Definition: globalsettings.h:277
MythUIButtonListItem
Definition: mythuibuttonlist.h:28
PlaybackSettingsDialog::DeleteProfileItem
void DeleteProfileItem(void)
Definition: globalsettings.cpp:4297
EPGSettings::EPGSettings
EPGSettings()
Definition: globalsettings.cpp:4515
ChannelGroupSetting
Definition: globalsettings.h:287
HostRefreshRateComboBoxSetting::GetRefreshRates
static std::vector< double > GetRefreshRates(const QString &resolution)
Definition: globalsettings.cpp:2414
videodisplayprofile.h
StandardSettingDialog
Definition: standardsettings.h:469
VideoModeSettings::VideoModeSettings
VideoModeSettings(const char *c)
Definition: globalsettings.cpp:2513
PlaybackProfileConfig::m_priority
std::vector< TransMythUISpinBoxSetting * > m_priority
Definition: globalsettings.h:283
ChannelGroupsSetting::Load
void Load() override
Definition: globalsettings.cpp:4870
hardwareprofile.scan.profile
profile
Definition: scan.py:99
MythUIComboBoxSetting
Definition: standardsettings.h:219
GeneralRecPrioritiesSettings::GeneralRecPrioritiesSettings
GeneralRecPrioritiesSettings()
Definition: globalsettings.cpp:4523
ChannelGroupsSetting::ChannelGroupsSetting
ChannelGroupsSetting()
Definition: globalsettings.cpp:4865
PlaybackSettingsDialog::MoveProfileItemUp
void MoveProfileItemUp(void)
Definition: globalsettings.cpp:4280
HostRefreshRateComboBoxSetting
Definition: globalsettings.h:154
PlaybackProfileItemConfig::DecreasePriority
void DecreasePriority(void)
Definition: globalsettings.cpp:1120
PlaybackSettings::PlaybackSettings
PlaybackSettings()
Definition: globalsettings.cpp:4304
PlaybackProfileItemConfig::decoderChanged
void decoderChanged(const QString &dec)
Definition: globalsettings.cpp:978
PlaybackProfileItemConfig::m_codecs
MythUIComboBoxSetting * m_codecs
Definition: globalsettings.h:236
PlaybackProfileItemConfig::m_singleShader
TransMythUICheckBoxSetting * m_singleShader
Definition: globalsettings.h:243
PlaybackSettingsDialog::MoveProfileItemDown
void MoveProfileItemDown(void)
Definition: globalsettings.cpp:4263
PlaybackProfileItemConfig::m_framerate
TransTextEditSetting * m_framerate
Definition: globalsettings.h:237
PlaybackSettings::Load
void Load(void) override
Definition: globalsettings.cpp:4309
PlaybackProfileItemConfig::SingleQualityChanged
void SingleQualityChanged(const QString &Quality)
Definition: globalsettings.cpp:1009
PlaybackProfileItemConfig::m_maxCpus
TransMythUISpinBoxSetting * m_maxCpus
Definition: globalsettings.h:239
GeneralRecPrioritiesSettings::Q_DECLARE_TR_FUNCTIONS
Q_DECLARE_TR_FUNCTIONS(GeneralRecPrioritiesSettings)
PlaybackProfileConfig::m_profiles
std::vector< PlaybackProfileItemConfig * > m_profiles
Definition: globalsettings.h:282
AppearanceSettings::PopulateScreens
void PopulateScreens(int Screens)
Definition: globalsettings.cpp:4613
GeneralRecPrioritiesSettings
Definition: globalsettings.h:189
PlaybackProfileConfig::swap
void swap(int indexA, int indexB)
Definition: globalsettings.cpp:1277
PlaybackProfileConfig::m_markForDeletion
TransMythUICheckBoxSetting * m_markForDeletion
Definition: globalsettings.h:280
GeneralSettings
Definition: globalsettings.h:119
PlaybackSettingsDialog::PlaybackSettingsDialog
PlaybackSettingsDialog(MythScreenStack *stack)
Definition: globalsettings.cpp:4224
uint
unsigned int uint
Definition: compat.h:141
ChannelGroupsSetting::ShowNewGroupDialog
void ShowNewGroupDialog(void) const
Definition: globalsettings.cpp:4906
PlaybackSettings::m_newPlaybackProfileButton
ButtonStandardSetting * m_newPlaybackProfileButton
Definition: globalsettings.h:45
MythDisplay
Definition: mythdisplay.h:19
AppearanceSettings::AppearanceSettings
AppearanceSettings()
Definition: globalsettings.cpp:4626
PlaybackProfileItemConfig::m_doubleDeint
TransMythUIComboBoxSetting * m_doubleDeint
Definition: globalsettings.h:245
GeneralSettings::GeneralSettings
GeneralSettings()
Definition: globalsettings.cpp:4455
PlaybackProfileItemConfig::framerateChanged
void framerateChanged(const QString &val)
Definition: globalsettings.cpp:964
ChannelGroupsSetting::m_addGroupButton
ButtonStandardSetting * m_addGroupButton
Definition: globalsettings.h:315
PlaybackProfileConfig
Definition: globalsettings.h:253
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:691
HostRefreshRateComboBoxSetting::ChangeResolution
virtual void ChangeResolution(StandardSetting *setting)
Definition: globalsettings.cpp:2379
standardsettings.h
PlaybackProfileItemConfig::m_item
ProfileItem & m_item
Definition: globalsettings.h:233
OSDSettings::OSDSettings
OSDSettings()
Definition: globalsettings.cpp:4433
PlaybackProfileItemConfig::m_singleDriver
TransMythUICheckBoxSetting * m_singleDriver
Definition: globalsettings.h:244
PlaybackProfileItemConfig::ShowDeleteDialog
void ShowDeleteDialog(void) const
Definition: globalsettings.cpp:1098
PlaybackProfileItemConfig::Save
void Save(void) override
Definition: globalsettings.cpp:920
ChannelGroupSetting::canDelete
bool canDelete(void) override
Definition: globalsettings.cpp:4842
PlaybackProfileItemConfig::DoDeleteSlot
void DoDeleteSlot(bool doDelete)
Definition: globalsettings.cpp:1114
EPGSettings
Definition: globalsettings.h:127
MainGeneralSettings
Definition: globalsettings.h:170
PlaybackProfileItemConfig::widthChanged
void widthChanged(const QString &val)
Definition: globalsettings.cpp:936
PlaybackProfileItemConfig::m_widthRange
TransTextEditSetting * m_widthRange
Definition: globalsettings.h:234
AppearanceSettings
Definition: globalsettings.h:136
PlaybackProfileConfig::m_delItems
std::vector< ProfileItem > m_delItems
Definition: globalsettings.h:276
HostComboBoxSetting
Definition: standardsettings.h:258
mythcontext.h
PlaybackProfileItemConfig::GetQuality
static QString GetQuality(TransMythUIComboBoxSetting *Deint, TransMythUICheckBoxSetting *Shader, TransMythUICheckBoxSetting *Driver)
Definition: globalsettings.cpp:1061
LcdSettings
Definition: globalsettings.h:59
ChannelGroupSetting::m_groupId
int m_groupId
Definition: globalsettings.h:298
PlaybackProfileConfig::Save
void Save(void) override
Definition: globalsettings.cpp:1195
PlaybackProfileConfig::PlaybackProfileConfig
PlaybackProfileConfig(QString profilename, StandardSetting *parent)
Definition: globalsettings.cpp:1130
PlaybackSettings::CreateNewPlaybackProfileSlot
void CreateNewPlaybackProfileSlot(const QString &name)
Definition: globalsettings.cpp:1344
PlaybackProfileItemConfig::LoadQuality
static void LoadQuality(TransMythUIComboBoxSetting *Deint, TransMythUICheckBoxSetting *Shader, TransMythUICheckBoxSetting *Driver, QString &Value)
Parse the required deinterlacing quality and preferences.
Definition: globalsettings.cpp:1030
StandardSetting
Definition: standardsettings.h:30
PlaybackProfileItemConfig::InitLabel
void InitLabel(void)
Definition: globalsettings.cpp:1141
PlaybackProfileItemConfig::IncreasePriority
void IncreasePriority(void)
Definition: globalsettings.cpp:1125
ChannelGroupSetting::Load
void Load() override
Definition: globalsettings.cpp:4797
ChannelGroupSetting::deleteEntry
void deleteEntry(void) override
Definition: globalsettings.cpp:4848
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:2495
PlaybackProfileItemConfig::keyPressEvent
bool keyPressEvent(QKeyEvent *e) override
Definition: globalsettings.cpp:1081
ChannelGroupSetting::ChannelGroupSetting
ChannelGroupSetting(const QString &groupName, int groupId)
Definition: globalsettings.cpp:4706
GroupSetting
Definition: standardsettings.h:436
AppearanceSettings::m_screen
HostComboBoxSetting * m_screen
Definition: globalsettings.h:148
ChannelGroupsSetting::CreateNewGroup
void CreateNewGroup(const QString &name)
Definition: globalsettings.cpp:4924
PlaybackProfileItemConfig::m_index
uint m_index
Definition: globalsettings.h:249