MythTV  master
globalsettings.cpp
Go to the documentation of this file.
1 
2 // -*- Mode: c++ -*-
3 
4 // Standard UNIX C headers
5 #include <unistd.h>
6 #include <fcntl.h>
7 #include <sys/types.h>
8 #include <sys/stat.h>
9 
10 // Qt headers
11 #include <QtGlobal>
12 #include <QApplication>
13 #include <QCursor>
14 #include <QDialog>
15 #include <QDir>
16 #include <QEvent>
17 #include <QFile>
18 #include <QFileInfo>
19 #include <QFontDatabase>
20 #include <QImage>
21 #include <QTextCodec>
22 
23 // MythTV headers
24 #include "mythconfig.h"
25 #include "mythcorecontext.h"
26 #include "mythdbcon.h"
27 #include "mythlogging.h"
28 #include "dbsettings.h"
29 #include "mythtranslation.h"
30 #include "iso639.h"
31 #include "playbackbox.h"
32 #include "globalsettings.h"
33 #include "recordingprofile.h"
34 #include "mythdisplay.h"
35 #include "cardutil.h"
36 #include "themeinfo.h"
37 #include "mythdirs.h"
38 #include "mythuihelper.h"
39 #include "langsettings.h"
41 #include "mythsorthelper.h"
43 #ifdef USING_OPENGL
45 #endif
46 #ifdef USING_AIRPLAY
48 #endif
49 #ifdef USING_VAAPI
51 #endif
52 #include "mythpower.h"
53 #include "mythpainterwindow.h"
54 
55 //Use for playBackGroup, to be remove at one point
56 #include "playgroup.h"
57 
59 // was previously *DecodeExtraAudio()
60 {
61  auto *gc = new HostSpinBoxSetting("AudioReadAhead",0,5000,10,10);
62 
63  gc->setLabel(PlaybackSettings::tr("Audio read ahead (ms)"));
64 
65  gc->setValue(100);
66 
67  gc->setHelpText(PlaybackSettings::tr(
68  "Increase this value if audio cuts out frequently. This is more "
69  "likely to occur when adjusting audio sync to a negative value. "
70  "If using high negative audio sync values you may need to set a large "
71  "value here. Default is 100."));
72  return gc;
73 }
74 
76 {
77  auto *gc = new HostComboBoxSetting("ColourPrimariesMode");
78  gc->setLabel(PlaybackSettings::tr("Primary colourspace conversion"));
82  gc->setHelpText(PlaybackSettings::tr(
83  "Converting between different primary colourspaces incurs a small "
84  "performance penalty but in some situations the difference in output is "
85  "negligible. The default ('Auto') behaviour is to only enforce "
86  "this conversion when there is a significant difference between source "
87  "colourspace primaries and the display."));
88  return gc;
89 }
90 
92 {
93  auto *gc = new HostCheckBoxSetting("ChromaUpsamplingFilter");
94  gc->setLabel(PlaybackSettings::tr("Enable Chroma Upsampling Filter when deinterlacing"));
95  gc->setHelpText(PlaybackSettings::tr(
96  "The 'Chroma upsampling error' affects the quality of interlaced material "
97  "for the most common, standard video formats and results in jagged/indistinct "
98  "edges to brightly coloured areas of video. This filter attempts to fix "
99  "the problem in the OpenGL shaders. It adds a small amount of overhead to "
100  "video rendering but may not be suitable in all cases. Enabled by default."));
101  gc->setValue(false);
102  return gc;
103 }
104 
105 #ifdef USING_VAAPI
107 {
108  auto *ge = new HostTextEditSetting("VAAPIDevice");
109 
110  ge->setLabel(MainGeneralSettings::tr("Decoder Device for VAAPI hardware decoding"));
111 
112  ge->setValue("");
113 
114  QString help = MainGeneralSettings::tr(
115  "Use this if your system does not detect the VAAPI device. "
116  "Example: '/dev/dri/renderD128'.");
117 
118  ge->setHelpText(help);
119 
120  // update VideoDisplayProfile statics if this changes
121  QObject::connect(ge, &HostTextEditSetting::ChangeSaved, ge,
122  []()
123  {
124  QString device = gCoreContext->GetSetting("VAAPIDevice");
125  LOG(VB_GENERAL, LOG_INFO, QString("New VAAPI device (%1) - resetting profiles").arg(device));
128  });
129  return ge;
130 }
131 #endif
132 
134 {
135  auto *gc = new HostCheckBoxSetting("FFMPEGTS");
136 
137  gc->setLabel(PlaybackSettings::tr("Use FFmpeg's original MPEG-TS demuxer"));
138 
139  gc->setValue(false);
140 
141  gc->setHelpText(PlaybackSettings::tr("Experimental: Enable this setting to "
142  "use FFmpeg's native demuxer. "
143  "Try this when encountering playback issues."));
144  return gc;
145 }
146 
148 {
149  auto *gc = new HostComboBoxSetting("DisplayRecGroup");
150 
151  gc->setLabel(PlaybackSettings::tr("Default group filter to apply"));
152 
153 
154  gc->addSelection(PlaybackSettings::tr("All Programs"), QString("All Programs"));
155  gc->addSelection(QCoreApplication::translate("(Common)", "Default"),
156  QString("Default"));
157 
158  MSqlQuery query(MSqlQuery::InitCon());
159  query.prepare("SELECT DISTINCT recgroup from recorded;");
160 
161  if (query.exec())
162  {
163  while (query.next())
164  {
165  if (query.value(0).toString() != "Default")
166  {
167  QString recgroup = query.value(0).toString();
168  gc->addSelection(recgroup, recgroup);
169  }
170  }
171  }
172 
173  query.prepare("SELECT DISTINCT category from recorded;");
174 
175  if (query.exec())
176  {
177  while (query.next())
178  {
179  QString key = query.value(0).toString();
180  gc->addSelection(key, key);
181  }
182  }
183 
184  gc->setHelpText(PlaybackSettings::tr("Default group filter to apply on the "
185  "View Recordings screen."));
186  return gc;
187 }
188 
190 {
191  auto *gc = new HostCheckBoxSetting("QueryInitialFilter");
192 
193  gc->setLabel(PlaybackSettings::tr("Always prompt for initial group "
194  "filter"));
195 
196  gc->setValue(false);
197 
198  gc->setHelpText(PlaybackSettings::tr("If enabled, always prompt the user "
199  "for the initial filter to apply "
200  "when entering the Watch Recordings "
201  "screen."));
202  return gc;
203 }
204 
206 {
207  auto *gc = new HostCheckBoxSetting("RememberRecGroup");
208 
209  gc->setLabel(PlaybackSettings::tr("Save current group filter when "
210  "changed"));
211 
212  gc->setValue(true);
213 
214  gc->setHelpText(PlaybackSettings::tr("If enabled, remember the last "
215  "selected filter instead of "
216  "displaying the default filter "
217  "whenever you enter the playback "
218  "screen."));
219  return gc;
220 }
221 
223 {
224  auto *gc = new HostCheckBoxSetting("RecGroupsFocusable");
225 
226  gc->setLabel(PlaybackSettings::tr("Change Recording Group using the arrow "
227  "keys"));
228 
229  gc->setValue(false);
230 
231  gc->setHelpText(PlaybackSettings::tr("If enabled, change recording group "
232  "directly using the arrow keys "
233  "instead of having to use < and >. "
234  "Requires theme support for this "
235  "feature."));
236  return gc;
237 }
238 
239 
241 {
242  auto *gc = new HostCheckBoxSetting("PlaybackBoxStartInTitle");
243 
244  gc->setLabel(PlaybackSettings::tr("Start in group list"));
245 
246  gc->setValue(true);
247 
248  gc->setHelpText(PlaybackSettings::tr("If enabled, the focus will start on "
249  "the group list, otherwise the focus "
250  "will default to the recordings."));
251  return gc;
252 }
253 
255 {
256  auto *gc = new HostCheckBoxSetting("SmartForward");
257 
258  gc->setLabel(PlaybackSettings::tr("Smart fast forwarding"));
259 
260  gc->setValue(false);
261 
262  gc->setHelpText(PlaybackSettings::tr("If enabled, then immediately after "
263  "rewinding, only skip forward the "
264  "same amount as skipping backwards."));
265  return gc;
266 }
267 
269 {
270  auto *bc = new GlobalComboBoxSetting("CommercialSkipMethod");
271 
272  bc->setLabel(GeneralSettings::tr("Commercial detection method"));
273 
274  bc->setHelpText(GeneralSettings::tr("This determines the method used by "
275  "MythTV to detect when commercials "
276  "start and end."));
277 
278  std::deque<int> tmp = GetPreferredSkipTypeCombinations();
279 
280  for (int pref : tmp)
281  bc->addSelection(SkipTypeToString(pref), QString::number(pref));
282 
283  return bc;
284 }
285 
287 {
288  auto *gc = new GlobalCheckBoxSetting("CommFlagFast");
289 
290  gc->setLabel(GeneralSettings::tr("Enable experimental speedup of "
291  "commercial detection"));
292 
293  gc->setValue(false);
294 
295  gc->setHelpText(GeneralSettings::tr("If enabled, experimental commercial "
296  "detection speedups will be enabled."));
297  return gc;
298 }
299 
301 {
302  auto *gc = new HostComboBoxSetting("AutoCommercialSkip");
303 
304  gc->setLabel(PlaybackSettings::tr("Automatically skip commercials"));
305 
306  gc->addSelection(QCoreApplication::translate("(Common)", "Off"), "0");
307  gc->addSelection(PlaybackSettings::tr("Notify, but do not skip",
308  "Skip commercials"), "2");
309  gc->addSelection(PlaybackSettings::tr("Automatically Skip",
310  "Skip commercials"), "1");
311 
312  gc->setHelpText(PlaybackSettings::tr("Automatically skip commercial breaks "
313  "that have been flagged during "
314  "automatic commercial detection "
315  "or by the mythcommflag program, or "
316  "just notify that a commercial has "
317  "been detected."));
318  return gc;
319 }
320 
322 {
323  auto *gs = new GlobalSpinBoxSetting("DeferAutoTranscodeDays", 0, 365, 1);
324 
325  gs->setLabel(GeneralSettings::tr("Deferral days for auto transcode jobs"));
326 
327  gs->setHelpText(GeneralSettings::tr("If non-zero, automatic transcode jobs "
328  "will be scheduled to run this many "
329  "days after a recording completes "
330  "instead of immediately afterwards."));
331 
332  gs->setValue(0);
333 
334  return gs;
335 }
336 
338 {
339  auto *bc = new GlobalCheckBoxSetting("AggressiveCommDetect");
340 
341  bc->setLabel(GeneralSettings::tr("Strict commercial detection"));
342 
343  bc->setValue(true);
344 
345  bc->setHelpText(GeneralSettings::tr("Enable stricter commercial detection "
346  "code. Disable if some commercials are "
347  "not being detected."));
348  return bc;
349 }
350 
352 {
353  auto *gs = new HostSpinBoxSetting("CommRewindAmount", 0, 10, 1);
354 
355  gs->setLabel(PlaybackSettings::tr("Commercial skip automatic rewind amount "
356  "(secs)"));
357 
358  gs->setHelpText(PlaybackSettings::tr("MythTV will automatically rewind "
359  "this many seconds after performing a "
360  "commercial skip."));
361 
362  gs->setValue(0);
363 
364  return gs;
365 }
366 
368 {
369  auto *gs = new HostSpinBoxSetting("CommNotifyAmount", 0, 10, 1);
370 
371  gs->setLabel(PlaybackSettings::tr("Commercial skip notify amount (secs)"));
372 
373  gs->setHelpText(PlaybackSettings::tr("MythTV will act like a commercial "
374  "begins this many seconds early. This "
375  "can be useful when commercial "
376  "notification is used in place of "
377  "automatic skipping."));
378 
379  gs->setValue(0);
380 
381  return gs;
382 }
383 
385 {
386  auto *bs = new GlobalSpinBoxSetting("MaximumCommercialSkip", 0, 3600, 10);
387 
388  bs->setLabel(PlaybackSettings::tr("Maximum commercial skip (secs)"));
389 
390  bs->setHelpText(PlaybackSettings::tr("MythTV will discourage long manual "
391  "commercial skips. Skips which are "
392  "longer than this will require the "
393  "user to hit the SKIP key twice. "
394  "Automatic commercial skipping is "
395  "not affected by this limit."));
396 
397  bs->setValue(3600);
398 
399  return bs;
400 }
401 
403 {
404  auto *bs = new GlobalSpinBoxSetting("MergeShortCommBreaks", 0, 3600, 5);
405 
406  bs->setLabel(PlaybackSettings::tr("Merge short commercial breaks (secs)"));
407 
408  bs->setHelpText(PlaybackSettings::tr("Treat consecutive commercial breaks "
409  "shorter than this as one break when "
410  "skipping forward. Useful if you have "
411  "to skip a few times during breaks. "
412  "Applies to automatic skipping as "
413  "well. Set to 0 to disable."));
414 
415  bs->setValue(0);
416 
417  return bs;
418 }
419 
421 {
422  auto *bs = new GlobalSpinBoxSetting("AutoExpireExtraSpace", 0, 200, 1);
423 
424  bs->setLabel(GeneralSettings::tr("Extra disk space (GB)"));
425 
426  bs->setHelpText(GeneralSettings::tr("Extra disk space (in gigabytes) "
427  "beyond what MythTV requires that "
428  "you want to keep free on the "
429  "recording file systems."));
430 
431  bs->setValue(1);
432 
433  return bs;
434 };
435 
436 #if 0
437 static GlobalCheckBoxSetting *AutoExpireInsteadOfDelete()
438 {
439  GlobalCheckBoxSetting *cb = new GlobalCheckBoxSetting("AutoExpireInsteadOfDelete");
440 
441  cb->setLabel(DeletedExpireOptions::tr("Auto-Expire instead of delete recording"));
442 
443  cb->setValue(false);
444 
445  cb->setHelpText(DeletedExpireOptions::tr("If enabled, move deleted recordings to the "
446  "'Deleted' recgroup and turn on autoexpire "
447  "instead of deleting immediately."));
448  return cb;
449 }
450 #endif
451 
453 {
454  auto *bs = new GlobalSpinBoxSetting("DeletedMaxAge", -1, 365, 1);
455 
456  bs->setLabel(GeneralSettings::tr("Time to retain deleted recordings "
457  "(days)"));
458 
459  bs->setHelpText(GeneralSettings::tr("Determines the maximum number of days "
460  "before undeleting a recording will "
461  "become impossible. A value of zero "
462  "means the recording will be "
463  "permanently deleted between 5 and 20 "
464  "minutes later. A value of minus one "
465  "means recordings will be retained "
466  "until space is required. A recording "
467  "will always be removed before this "
468  "time if the space is needed for a new "
469  "recording."));
470  bs->setValue(0);
471  return bs;
472 };
473 
474 #if 0
475 // If this is ever reactivated, re-add the translations...
476 class DeletedExpireOptions : public TriggeredConfigurationGroup
477 {
478  public:
479  DeletedExpireOptions() :
480  TriggeredConfigurationGroup(false, false, false, false)
481  {
482  setLabel("DeletedExpireOptions");
483  Setting* enabled = AutoExpireInsteadOfDelete();
484  addChild(enabled);
485  setTrigger(enabled);
486 
487  HorizontalConfigurationGroup* settings =
488  new HorizontalConfigurationGroup(false);
489  settings->addChild(DeletedMaxAge());
490  addTarget("1", settings);
491 
492  // show nothing if fillEnabled is off
493  addTarget("0", new HorizontalConfigurationGroup(true));
494  };
495 };
496 #endif
497 
499 {
500  auto *bc = new GlobalComboBoxSetting("AutoExpireMethod");
501 
502  bc->setLabel(GeneralSettings::tr("Auto-Expire method"));
503 
504  bc->addSelection(GeneralSettings::tr("Oldest show first"), "1");
505  bc->addSelection(GeneralSettings::tr("Lowest priority first"), "2");
506  bc->addSelection(GeneralSettings::tr("Weighted time/priority combination"),
507  "3");
508 
509  bc->setHelpText(GeneralSettings::tr("Method used to determine which "
510  "recorded shows to delete first. "
511  "Live TV recordings will always "
512  "expire before normal recordings."));
513  bc->setValue(1);
514 
515  return bc;
516 }
517 
519 {
520  auto *bc = new GlobalCheckBoxSetting("AutoExpireWatchedPriority");
521 
522  bc->setLabel(GeneralSettings::tr("Watched before unwatched"));
523 
524  bc->setValue(false);
525 
526  bc->setHelpText(GeneralSettings::tr("If enabled, programs that have been "
527  "marked as watched will be expired "
528  "before programs that have not "
529  "been watched."));
530  return bc;
531 }
532 
534 {
535  auto *bs = new GlobalSpinBoxSetting("AutoExpireDayPriority", 1, 400, 1);
536 
537  bs->setLabel(GeneralSettings::tr("Priority weight"));
538 
539  bs->setHelpText(GeneralSettings::tr("The number of days bonus a program "
540  "gets for each priority point. This "
541  "is only used when the Weighted "
542  "time/priority Auto-Expire method "
543  "is selected."));
544  bs->setValue(3);
545 
546  return bs;
547 };
548 
550 {
551  auto *bs = new GlobalSpinBoxSetting("AutoExpireLiveTVMaxAge", 1, 365, 1);
552 
553  bs->setLabel(GeneralSettings::tr("Live TV max age (days)"));
554 
555  bs->setHelpText(GeneralSettings::tr("Auto-Expire will force expiration of "
556  "Live TV recordings when they are this "
557  "many days old. Live TV recordings may "
558  "also be expired early if necessary to "
559  "free up disk space."));
560  bs->setValue(1);
561 
562  return bs;
563 };
564 
565 #if 0
566 // Translations have been removed, please put back if reactivated...
567 static GlobalSpinBoxSetting *MinRecordDiskThreshold()
568 {
569  GlobalSpinBoxSetting *bs = new GlobalSpinBoxSetting("MinRecordDiskThreshold",
570  0, 1000000, 100);
571  bs->setLabel("New recording free disk space threshold "
572  "(MB)");
573  bs->setHelpText("MythTV will stop scheduling new recordings on "
574  "a backend when its free disk space (in megabytes) falls "
575  "below this value.");
576  bs->setValue(300);
577  return bs;
578 }
579 #endif
580 
582 {
583  auto *bc = new GlobalCheckBoxSetting("RerecordWatched");
584 
585  bc->setLabel(GeneralSettings::tr("Re-record watched"));
586 
587  bc->setValue(false);
588 
589  bc->setHelpText(GeneralSettings::tr("If enabled, programs that have been "
590  "marked as watched and are "
591  "Auto-Expired will be re-recorded if "
592  "they are shown again."));
593  return bc;
594 }
595 
597 {
598  auto *bs = new GlobalSpinBoxSetting("RecordPreRoll", 0, 600, 60, 1);
599 
600  bs->setLabel(GeneralSettings::tr("Time to record before start of show "
601  "(secs)"));
602 
603  bs->setHelpText(GeneralSettings::tr("This global setting allows the "
604  "recorder to start before the "
605  "scheduled start time. It does not "
606  "affect the scheduler. It is ignored "
607  "when two shows have been scheduled "
608  "without enough time in between."));
609  bs->setValue(0);
610 
611  return bs;
612 }
613 
615 {
616  auto *bs = new GlobalSpinBoxSetting("RecordOverTime", 0, 1800, 60, 1);
617 
618  bs->setLabel(GeneralSettings::tr("Time to record past end of show (secs)"));
619 
620  bs->setValue(0);
621 
622  bs->setHelpText(GeneralSettings::tr("This global setting allows the "
623  "recorder to record beyond the "
624  "scheduled end time. It does not "
625  "affect the scheduler. It is ignored "
626  "when two shows have been scheduled "
627  "without enough time in between."));
628  return bs;
629 }
630 
632 {
633  auto *bs = new GlobalSpinBoxSetting("MaxStartGap", 0, 300, 1, 15);
634 
635  bs->setLabel(GeneralSettings::tr("Maximum Start Gap (secs)"));
636 
637  bs->setValue(15);
638 
639  bs->setHelpText(GeneralSettings::tr("If more than this number of seconds "
640  "is missing at the start of a recording "
641  "that will be regarded as a gap for "
642  "assessing recording quality. The recording "
643  "may be marked as damaged."));
644  return bs;
645 }
646 
648 {
649  auto *bs = new GlobalSpinBoxSetting("MaxEndGap", 0, 300, 1, 15);
650 
651  bs->setLabel(GeneralSettings::tr("Maximum End Gap (secs)"));
652 
653  bs->setValue(15);
654 
655  bs->setHelpText(GeneralSettings::tr("If more than this number of seconds "
656  "is missing at the end of a recording "
657  "that will be regarded as a gap for "
658  "assessing recording quality. The recording "
659  "may be marked as damaged."));
660  return bs;
661 }
662 
664 {
665  auto *bs = new GlobalSpinBoxSetting("MinimumRecordingQuality", 0, 100, 1, 10);
666 
667  bs->setLabel(GeneralSettings::tr("Minimum Recording Quality (percent)"));
668 
669  bs->setValue(95);
670 
671  bs->setHelpText(GeneralSettings::tr("If recording quality is below this value the "
672  "recording is marked as damaged."));
673  return bs;
674 }
675 
677 {
678  auto *gc = new GlobalComboBoxSetting("OverTimeCategory");
679 
680  gc->setLabel(GeneralSettings::tr("Category of shows to be extended"));
681 
682  gc->setHelpText(GeneralSettings::tr("For a special category (e.g. "
683  "\"Sports event\"), request that "
684  "shows be autoextended. Only works "
685  "if a show's category can be "
686  "determined."));
687 
688  MSqlQuery query(MSqlQuery::InitCon());
689 
690  query.prepare("SELECT DISTINCT category FROM program GROUP BY category;");
691 
692  gc->addSelection("", "");
693  if (query.exec())
694  {
695  while (query.next())
696  {
697  QString key = query.value(0).toString();
698  if (!key.trimmed().isEmpty())
699  gc->addSelection(key, key);
700  }
701  }
702 
703  return gc;
704 }
705 
707 {
708  auto *bs = new GlobalSpinBoxSetting("CategoryOverTime", 0, 180, 60, 1);
709 
710  bs->setLabel(GeneralSettings::tr("Record past end of show (mins)"));
711 
712  bs->setValue(30);
713 
714  bs->setHelpText(GeneralSettings::tr("For the specified category, an "
715  "attempt will be made to extend "
716  "the recording by the specified "
717  "number of minutes. It is ignored "
718  "when two shows have been scheduled "
719  "without enough time in-between."));
720  return bs;
721 }
722 
724 {
725  auto *vcg = new GroupSetting();
726 
727  vcg->setLabel(GeneralSettings::tr("Category record over-time"));
728 
729  vcg->addChild(OverTimeCategory());
730  vcg->addChild(CategoryOverTime());
731 
732  return vcg;
733 }
734 
736  PlaybackProfileConfig *parent, uint idx, MythVideoProfileItem &_item) :
737  m_item(_item), m_parentConfig(parent), m_index(idx)
738 {
744  m_maxCpus = new TransMythUISpinBoxSetting(1, HAVE_THREADS ? VIDEO_MAX_CPUS : 1, 1, 1);
754 
755  const QString rangeHelp(tr(" Valid formats for the setting are "
756  "[nnnn - nnnn], [> nnnn], [>= nnnn], [< nnnn], "
757  "[<= nnnn]. Also [nnnn] for an exact match. "
758  "You can also use more than 1 expression with & between."));
759  const QString rangeHelpDec(tr("Numbers can have up to 3 decimal places."));
760  m_widthRange->setLabel(tr("Width Range"));
761  m_widthRange->setHelpText(tr("Optional setting to restrict this profile "
762  "to videos with a selected width range. ") + rangeHelp);
763  m_heightRange->setLabel(tr("Height Range"));
764  m_heightRange->setHelpText(tr("Optional setting to restrict this profile "
765  "to videos with a selected height range. ") + rangeHelp);
766  m_codecs->setLabel(tr("Video Formats"));
767  m_codecs->addSelection(tr("All formats"), " ", true);
768  m_codecs->addSelection("MPEG2", "mpeg2video");
769  m_codecs->addSelection("MPEG4", "mpeg4");
770  m_codecs->addSelection("H264", "h264");
771  m_codecs->addSelection("HEVC", "hevc");
772  m_codecs->addSelection("VP8", "vp8");
773  m_codecs->addSelection("VP9", "vp9");
774  m_codecs->addSelection("AV1", "av1");
775  m_codecs->setHelpText(tr("Optional setting to restrict this profile "
776  "to a video format or formats. You can also type in a format "
777  "or several formats separated by space. "
778  "To find the format for a video use ffprobe and look at the "
779  "word after \"Video:\". Also you can get a complete list "
780  "of available formats with ffmpeg -codecs."));
781  m_framerate->setLabel(tr("Frame Rate Range"));
782  m_framerate->setHelpText(tr("Optional setting to restrict this profile "
783  "to a range of frame rates. ") + rangeHelp +" "+rangeHelpDec);
784  m_decoder->setLabel(tr("Decoder"));
785  m_maxCpus->setLabel(tr("Max CPUs"));
786  m_skipLoop->setLabel(tr("Deblocking filter"));
787  m_vidRend->setLabel(tr("Video renderer"));
788  m_upscaler->setLabel(tr("Video scaler"));
789  auto scalers = MythVideoProfile::GetUpscalers();
790  for (const auto & scaler : scalers)
791  m_upscaler->addSelection(scaler.first, scaler.second);
792 
793  QString shaderdesc = "\t" + tr("Prefer OpenGL deinterlacers");
794  QString driverdesc = "\t" + tr("Prefer driver deinterlacers");
795  QString shaderhelp = tr("If possible, use GLSL shaders for deinterlacing in "
796  "preference to software deinterlacers. Note: Even if "
797  "disabled, shaders may be used if deinterlacing is "
798  "enabled but software deinterlacers are unavailable.");
799  QString driverhelp = tr("If possible, use hardware drivers (e.g. VDPAU, VAAPI) "
800  "for deinterlacing in preference to software and OpenGL "
801  "deinterlacers. Note: Even if disabled, driver deinterlacers "
802  "may be used if deinterlacing is enabled but other "
803  "deinterlacers are unavailable.");
804 
805  m_singleDeint->setLabel(tr("Deinterlacer quality (single rate)"));
806  m_singleShader->setLabel(shaderdesc);
807  m_singleDriver->setLabel(driverdesc);
808  m_doubleDeint->setLabel(tr("Deinterlacer quality (double rate)"));
809  m_doubleShader->setLabel(shaderdesc);
810  m_doubleDriver->setLabel(driverdesc);
811 
812  m_singleShader->setHelpText(shaderhelp);
813  m_doubleShader->setHelpText(shaderhelp);
814  m_singleDriver->setHelpText(driverhelp);
815  m_doubleDriver->setHelpText(driverhelp);
817  tr("Set the quality for single rate deinterlacing. Use 'None' to disable. "
818  "Higher quality deinterlacers require more system processing and resources. "
819  "Software deinterlacers are used by default unless OpenGL or driver preferences "
820  "are enabled."));
822  tr("Set the quality for double rate deinterlacing - which is only used "
823  "if the display can support the required frame rate. Use 'None' to "
824  "disable double rate deinterlacing."));
825 
826  m_singleShader->setEnabled(false);
827  m_singleDriver->setEnabled(false);
828  m_doubleShader->setEnabled(false);
829  m_doubleDriver->setEnabled(false);
830 
831  const QList<QPair<QString,QString> >& options = MythVideoProfile::GetDeinterlacers();
832  for (const auto & option : qAsConst(options))
833  {
834  m_singleDeint->addSelection(option.second, option.first);
835  m_doubleDeint->addSelection(option.second, option.first);
836  }
837 
839  tr("Maximum number of CPU cores used for video decoding and filtering.") +
840  (HAVE_THREADS ? "" :
841  tr(" Multithreaded decoding disabled-only one CPU "
842  "will be used, please recompile with "
843  "--enable-ffmpeg-pthreads to enable.")));
844 
846  tr("When unchecked the deblocking loopfilter will be disabled. ") + "\n" +
847  tr("Disabling will significantly reduce the load on the CPU for software decoding of "
848  "H.264 and HEVC material but may significantly reduce video quality."));
849 
851  "The default scaler provides good quality in the majority of situations. "
852  "Higher quality scalers may offer some benefit when scaling very low "
853  "resolution material but may not be as fast."));
854 
864 
871 
872  connect(m_widthRange, qOverload<const QString&>(&StandardSetting::valueChanged),
874  connect(m_heightRange, qOverload<const QString&>(&StandardSetting::valueChanged),
876  connect(m_codecs, qOverload<const QString&>(&StandardSetting::valueChanged),
878  connect(m_framerate, qOverload<const QString&>(&StandardSetting::valueChanged),
880  connect(m_decoder, qOverload<const QString&>(&StandardSetting::valueChanged),
882  connect(m_vidRend, qOverload<const QString&>(&StandardSetting::valueChanged),
884  connect(m_singleDeint, qOverload<const QString&>(&StandardSetting::valueChanged),
886  connect(m_doubleDeint, qOverload<const QString&>(&StandardSetting::valueChanged),
888 }
889 
891 {
892  return m_index;
893 }
894 
896 {
897  QString width_value;
898  QString height_value;
899  // pref_cmp0 and pref_cmp1 are no longer used. This code
900  // is here to convery them to the new settings cond_width
901  // and cond_height
902  for (uint i = 0; i < 2; ++i)
903  {
904  QString pcmp = m_item.Get(QString("pref_cmp%1").arg(i));
905  if (pcmp == "> 0 0")
906  continue;
907  QStringList clist = pcmp.split(" ");
908 
909  if (clist.size() < 3)
910  continue;
911  if (!width_value.isEmpty())
912  {
913  width_value.append("&");
914  height_value.append("&");
915  }
916  width_value.append(clist[0]+clist[1]);
917  height_value.append(clist[0]+clist[2]);
918  }
919 
920  QString tmp = m_item.Get(COND_WIDTH).trimmed();
921  if (!tmp.isEmpty())
922  {
923  if (!width_value.isEmpty())
924  width_value.append("&");
925  width_value.append(tmp);
926  }
927  tmp = m_item.Get(COND_HEIGHT).trimmed();
928  if (!tmp.isEmpty())
929  {
930  if (!height_value.isEmpty())
931  height_value.append("&");
932  height_value.append(tmp);
933  }
934 
935  m_widthRange->setValue(width_value);
936  m_heightRange->setValue(height_value);
937  auto codecs = m_item.Get(COND_CODECS);
938  if (codecs.isEmpty())
939  codecs = " ";
940  m_codecs->setValue(codecs);
942 
943  QString pdecoder = m_item.Get(PREF_DEC);
944  QString pmax_cpus = m_item.Get(PREF_CPUS);
945  QString pskiploop = m_item.Get(PREF_LOOP);
946  QString prenderer = m_item.Get(PREF_RENDER);
947  QString psingledeint = m_item.Get(PREF_DEINT1X);
948  QString pdoubledeint = m_item.Get(PREF_DEINT2X);
949  auto upscale = m_item.Get(PREF_UPSCALE);
950  if (upscale.isEmpty())
951  upscale = UPSCALE_DEFAULT;
952  bool found = false;
953 
954  QString dech = MythVideoProfile::GetDecoderHelp();
955  QStringList decr = MythVideoProfile::GetDecoders();
956  QStringList decn = MythVideoProfile::GetDecoderNames();
957  QStringList::const_iterator itr = decr.cbegin();
958  QStringList::const_iterator itn = decn.cbegin();
960  m_decoder->setHelpText(dech);
961  for (; (itr != decr.cend()) && (itn != decn.cend()); ++itr, ++itn)
962  {
963  m_decoder->addSelection(*itn, *itr, (*itr == pdecoder));
964  found |= (*itr == pdecoder);
965  }
966  if (!found && !pdecoder.isEmpty())
967  m_decoder->addSelection(MythVideoProfile::GetDecoderName(pdecoder), pdecoder, true);
969 
970  if (!pmax_cpus.isEmpty())
971  m_maxCpus->setValue(pmax_cpus.toInt());
972 
973  m_skipLoop->setValue((!pskiploop.isEmpty()) ? (pskiploop.toInt() > 0) : true);
974  m_upscaler->setValue(upscale);
975 
976  if (!prenderer.isEmpty())
977  m_vidRend->setValue(prenderer);
978 
981 
983 }
984 
986 {
987  m_item.Set("pref_cmp0", QString());
988  m_item.Set("pref_cmp1", QString());
995  m_item.Set(PREF_LOOP, (m_skipLoop->boolValue()) ? "1" : "0");
1000 }
1001 
1003 {
1004  bool ok = true;
1005  QString oldvalue = m_item.Get(COND_WIDTH);
1006  m_item.Set(COND_WIDTH, val);
1007  m_item.CheckRange(COND_WIDTH, 640, &ok);
1008  if (!ok)
1009  {
1010  ShowOkPopup(tr("Invalid width specification(%1), discarded").arg(val));
1011  m_widthRange->setValue(oldvalue);
1012  }
1013  InitLabel();
1014 }
1015 
1017 {
1018  bool ok = true;
1019  QString oldvalue = m_item.Get(COND_HEIGHT);
1020  m_item.Set(COND_HEIGHT,val);
1021  m_item.CheckRange(COND_HEIGHT, 480, &ok);
1022  if (!ok)
1023  {
1024  ShowOkPopup(tr("Invalid height specification(%1), discarded").arg(val));
1025  m_heightRange->setValue(oldvalue);
1026  }
1027  InitLabel();
1028 }
1029 
1031 {
1032  bool ok = true;
1033  QString oldvalue = m_item.Get(COND_RATE);
1034  m_item.Set(COND_RATE,val);
1035  m_item.CheckRange(COND_RATE, 25.0F, &ok);
1036  if (!ok)
1037  {
1038  ShowOkPopup(tr("Invalid frame rate specification(%1), discarded").arg(val));
1039  m_framerate->setValue(oldvalue);
1040  }
1041  InitLabel();
1042 }
1043 
1045 {
1046  QString vrenderer = m_vidRend->getValue();
1047  QStringList renderers = MythVideoProfile::GetVideoRenderers(dec);
1048 
1049  QString prenderer;
1050  for (const auto & rend : qAsConst(renderers))
1051  prenderer = (rend == vrenderer) ? vrenderer : prenderer;
1052  if (prenderer.isEmpty())
1054 
1056  for (const auto & rend : qAsConst(renderers))
1057  {
1058  if ((!rend.contains("null")))
1060  rend, (rend == prenderer));
1061  }
1062  QString vrenderer2 = m_vidRend->getValue();
1063  vrenderChanged(vrenderer2);
1064 
1066  InitLabel();
1067 }
1068 
1069 void PlaybackProfileItemConfig::vrenderChanged(const QString &renderer)
1070 {
1072  InitLabel();
1073 }
1074 
1076 {
1077  bool enabled = Quality != DEINT_QUALITY_NONE;
1078  m_singleShader->setEnabled(enabled);
1079  m_singleDriver->setEnabled(enabled);
1080 }
1081 
1083 {
1084  bool enabled = Quality != DEINT_QUALITY_NONE;
1085  m_doubleShader->setEnabled(enabled);
1086  m_doubleDriver->setEnabled(enabled);
1087 }
1088 
1099  QString &Value)
1100 {
1101  bool enabled = true;
1102 
1103  if (Value.contains(DEINT_QUALITY_HIGH))
1104  {
1105  Deint->setValue(DEINT_QUALITY_HIGH);
1106  }
1107  else if (Value.contains(DEINT_QUALITY_MEDIUM))
1108  {
1110  }
1111  else if (Value.contains(DEINT_QUALITY_LOW))
1112  {
1113  Deint->setValue(DEINT_QUALITY_LOW);
1114  }
1115  else
1116  {
1117  enabled = false;
1118  Deint->setValue(DEINT_QUALITY_NONE);
1119  }
1120 
1121  Shader->setValue(Value.contains(DEINT_QUALITY_SHADER));
1122  Driver->setValue(Value.contains(DEINT_QUALITY_DRIVER));
1123  Shader->setEnabled(enabled);
1124  Driver->setEnabled(enabled);
1125 }
1126 
1130 {
1131  QStringList values;
1132  QString quality = Deint->getValue();
1133  if (quality == DEINT_QUALITY_LOW || quality == DEINT_QUALITY_MEDIUM || quality == DEINT_QUALITY_HIGH)
1134  values.append(quality);
1135  else
1136  values.append(DEINT_QUALITY_NONE);
1137 
1138  // N.B. save these regardless to preserve preferences
1139  if (Shader->boolValue())
1140  values.append(DEINT_QUALITY_SHADER);
1141  if (Driver->boolValue())
1142  values.append(DEINT_QUALITY_DRIVER);
1143 
1144  return values.join(":");
1145 }
1146 
1148 {
1149  QStringList actions;
1150 
1151  if (GetMythMainWindow()->TranslateKeyPress("Global", e, actions))
1152  return true;
1153 
1154  if (std::any_of(actions.cbegin(), actions.cend(),
1155  [](const QString & action) { return action == "DELETE"; } ))
1156  {
1157  ShowDeleteDialog();
1158  return true;
1159  }
1160 
1161  return false;
1162 }
1163 
1165 {
1166  QString message = tr("Remove this profile item?");
1167  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
1168  auto *confirmDelete = new MythConfirmationDialog(popupStack, message, true);
1169 
1170  if (confirmDelete->Create())
1171  {
1172  connect(confirmDelete, &MythConfirmationDialog::haveResult,
1174  popupStack->AddScreen(confirmDelete);
1175  }
1176  else
1177  delete confirmDelete;
1178 }
1179 
1181 {
1182  if (doDelete)
1184 }
1185 
1187 {
1189 }
1190 
1192 {
1194 }
1195 
1197  StandardSetting *parent) :
1198  m_profileName(std::move(profilename))
1199 {
1200  setVisible(false);
1204  InitUI(parent);
1205 }
1206 
1208 {
1209  QStringList restrict;
1210  QString width = m_widthRange->getValue();
1211  if (!width.isEmpty())
1212  restrict << tr("Width", "video formats") + " " + width;
1213  QString height = m_heightRange->getValue();
1214  if (!height.isEmpty())
1215  restrict << tr("Height", "video formats") + " " + height;
1216  QString codecsval = m_codecs->getValue().trimmed();
1217  if (!codecsval.isEmpty())
1218  restrict << tr("Formats", "video formats") + " " + codecsval.toUpper();
1219  QString framerateval = m_framerate->getValue();
1220  if (!framerateval.isEmpty())
1221  restrict << tr("framerate") + " " + framerateval;
1222 
1223  QString str;
1224  if (!restrict.isEmpty())
1225  str += restrict.join(" ") + " -> ";
1227  str += " " + tr("&", "and") + ' ';
1229  setLabel(str);
1230 }
1231 
1233 {
1235  m_markForDeletion->setLabel(tr("Mark for deletion"));
1236  m_addNewEntry = new ButtonStandardSetting(tr("Add New Entry"));
1237 
1240 
1243 
1244  for (size_t i = 0; i < m_items.size(); ++i)
1245  InitProfileItem(i, parent);
1246 }
1247 
1249  uint i, StandardSetting *parent)
1250 {
1251  auto *ppic = new PlaybackProfileItemConfig(this, i, m_items[i]);
1252 
1253  m_items[i].Set("pref_priority", QString::number(i + 1));
1254 
1255  parent->addTargetedChild(m_profileName, ppic);
1256  m_profiles.push_back(ppic);
1257  return ppic;
1258 }
1259 
1261 {
1263  {
1266  return;
1267  }
1268 
1269  for (PlaybackProfileItemConfig *profile : qAsConst(m_profiles))
1270  {
1271  profile->Save();
1272  }
1273 
1275  if (!ok)
1276  {
1277  LOG(VB_GENERAL, LOG_ERR,
1278  "PlaybackProfileConfig::Save() -- failed to delete items");
1279  return;
1280  }
1281 
1283  if (!ok)
1284  {
1285  LOG(VB_GENERAL, LOG_ERR,
1286  "PlaybackProfileConfig::Save() -- failed to save items");
1287  return;
1288  }
1289 }
1290 
1292  PlaybackProfileItemConfig *profileToDelete)
1293 {
1294  for (PlaybackProfileItemConfig *profile : qAsConst(m_profiles))
1295  profile->Save();
1296 
1297  uint i = profileToDelete->GetIndex();
1298  m_delItems.push_back(m_items[i]);
1299  m_items.erase(m_items.begin() + i);
1300 
1301  ReloadSettings();
1302 }
1303 
1305 {
1306  for (PlaybackProfileItemConfig *profile : qAsConst(m_profiles))
1307  profile->Save();
1308  m_items.emplace_back(MythVideoProfileItem {});
1309  ReloadSettings();
1310 }
1311 
1313 {
1316 
1317  for (StandardSetting *setting : qAsConst(m_profiles))
1319  m_profiles.clear();
1320 
1321  InitUI(getParent());
1322  for (StandardSetting *setting : qAsConst(m_profiles))
1323  setting->Load();
1324  emit getParent()->settingsChanged();
1325  setChanged(true);
1326 }
1327 
1328 void PlaybackProfileConfig::swap(int indexA, int indexB)
1329 {
1330  for (PlaybackProfileItemConfig *profile : qAsConst(m_profiles))
1331  profile->Save();
1332 
1333  QString pri_i = QString::number(m_items[indexA].GetPriority());
1334  QString pri_j = QString::number(m_items[indexB].GetPriority());
1335 
1336  MythVideoProfileItem item = m_items[indexB];
1337  m_items[indexB] = m_items[indexA];
1338  m_items[indexA] = item;
1339 
1340  m_items[indexA].Set("pref_priority", pri_i);
1341  m_items[indexB].Set("pref_priority", pri_j);
1342 
1343  ReloadSettings();
1344 }
1345 
1347 {
1348  auto *grouptrigger = new HostComboBoxSetting("DefaultVideoPlaybackProfile");
1349  grouptrigger->setLabel(
1350  QCoreApplication::translate("PlaybackProfileConfigs",
1351  "Current Video Playback Profile"));
1352 
1353  QString host = gCoreContext->GetHostName();
1355  QStringList profiles = MythVideoProfile::GetProfiles(host);
1356 
1358  if (!profiles.contains(profile))
1359  {
1360  profile = (profiles.contains("Normal")) ? "Normal" : profiles[0];
1362  }
1363 
1364  for (const auto & prof : qAsConst(profiles))
1365  {
1366  grouptrigger->addSelection(ProgramInfo::i18n(prof), prof);
1367  grouptrigger->addTargetedChild(prof,
1368  new PlaybackProfileConfig(prof, grouptrigger));
1369  }
1370 
1371  return grouptrigger;
1372 }
1373 
1375 {
1376  QString msg = tr("Enter Playback Profile Name");
1377 
1378  MythScreenStack *popupStack =
1379  GetMythMainWindow()->GetStack("popup stack");
1380 
1381  auto *settingdialog = new MythTextInputDialog(popupStack, msg);
1382 
1383  if (settingdialog->Create())
1384  {
1385  connect(settingdialog, &MythTextInputDialog::haveResult,
1387  popupStack->AddScreen(settingdialog);
1388  }
1389  else
1390  delete settingdialog;
1391 }
1392 
1394 {
1395  QString host = gCoreContext->GetHostName();
1396  QStringList not_ok_list = MythVideoProfile::GetProfiles(host);
1397 
1398  if (not_ok_list.contains(name) || name.isEmpty())
1399  {
1400  QString msg = (name.isEmpty()) ?
1401  tr("Sorry, playback group\nname cannot be blank.") :
1402  tr("Sorry, playback group name\n"
1403  "'%1' is already being used.").arg(name);
1404 
1405  ShowOkPopup(msg);
1406 
1407  return;
1408  }
1409 
1413 
1414  m_playbackProfiles->addSelection(name, name, true);
1415 }
1416 
1418 {
1419  std::array<QString,4> str
1420  {
1421  PlaybackSettings::tr("Sort all sub-titles/multi-titles Ascending"),
1422  PlaybackSettings::tr("Sort all sub-titles/multi-titles Descending"),
1423  PlaybackSettings::tr("Sort sub-titles Descending, multi-titles "
1424  "Ascending"),
1425  PlaybackSettings::tr("Sort sub-titles Ascending, multi-titles Descending"),
1426  };
1427 
1428  QString help = PlaybackSettings::tr("Selects how to sort show episodes. "
1429  "Sub-titles refers to the episodes "
1430  "listed under a specific show title. "
1431  "Multi-title refers to sections (e.g. "
1432  "\"All Programs\") which list multiple "
1433  "titles. Sections in parentheses are "
1434  "not affected.");
1435 
1436  auto *gc = new HostComboBoxSetting("PlayBoxOrdering");
1437 
1438  gc->setLabel(PlaybackSettings::tr("Episode sort orderings"));
1439 
1440  for (size_t i = 0; i < str.size(); ++i)
1441  gc->addSelection(str[i], QString::number(i));
1442 
1443  gc->setValue(3);
1444  gc->setHelpText(help);
1445 
1446  return gc;
1447 }
1448 
1450 {
1451  auto *gc = new HostComboBoxSetting("PlayBoxEpisodeSort");
1452 
1453  gc->setLabel(PlaybackSettings::tr("Sort episodes"));
1454 
1455  gc->addSelection(PlaybackSettings::tr("Record date"), "Date");
1456  gc->addSelection(PlaybackSettings::tr("Season/Episode"), "Season");
1457  gc->addSelection(PlaybackSettings::tr("Original air date"), "OrigAirDate");
1458  gc->addSelection(PlaybackSettings::tr("Program ID"), "Id");
1459 
1460  gc->setHelpText(PlaybackSettings::tr("Selects how to sort a show's "
1461  "episodes"));
1462 
1463  return gc;
1464 }
1465 
1467 {
1468  auto *gs = new HostSpinBoxSetting("FFRewReposTime", 0, 200, 5);
1469 
1470  gs->setLabel(PlaybackSettings::tr("Fast forward/rewind reposition amount"));
1471 
1472  gs->setValue(100);
1473 
1474  gs->setHelpText(PlaybackSettings::tr("When exiting sticky keys fast "
1475  "forward/rewind mode, reposition "
1476  "this many 1/100th seconds before "
1477  "resuming normal playback. This "
1478  "compensates for the reaction time "
1479  "between seeing where to resume "
1480  "playback and actually exiting "
1481  "seeking."));
1482  return gs;
1483 }
1484 
1486 {
1487  auto *gc = new HostCheckBoxSetting("FFRewReverse");
1488 
1489  gc->setLabel(PlaybackSettings::tr("Reverse direction in fast "
1490  "forward/rewind"));
1491 
1492  gc->setValue(true);
1493 
1494  gc->setHelpText(PlaybackSettings::tr("If enabled, pressing the sticky "
1495  "rewind key in fast forward mode "
1496  "switches to rewind mode, and "
1497  "vice versa. If disabled, it will "
1498  "decrease the current speed or "
1499  "switch to play mode if the speed "
1500  "can't be decreased further."));
1501  return gc;
1502 }
1503 
1504 static void AddPaintEngine(GroupSetting* Group)
1505 {
1506  if (!Group)
1507  return;
1508 
1509  const QStringList options = MythPainterWindow::GetPainters();
1510 
1511  // Don't show an option if there is no choice. Do not offer Qt painter (but
1512  // MythPainterWindow will accept 'Qt' if overriden from the command line)
1513  if (options.size() <= 1)
1514  return;
1515 
1516  QString pref = GetMythDB()->GetSetting("PaintEngine", MythPainterWindow::GetDefaultPainter());
1517  auto* paint = new HostComboBoxSetting("PaintEngine");
1518  paint->setLabel(AppearanceSettings::tr("Paint engine"));
1519  for (const auto & option : options)
1520  paint->addSelection(option, option, option == pref);
1521 
1522  paint->setHelpText(AppearanceSettings::tr("This selects what MythTV uses to draw. "));
1523  Group->addChild(paint);
1524 }
1525 
1527 {
1528  auto *gc = new HostComboBoxSetting("MenuTheme");
1529 
1530  gc->setLabel(AppearanceSettings::tr("Menu theme"));
1531 
1532  QList<ThemeInfo> themelist = GetMythUI()->GetThemes(THEME_MENU);
1533 
1534  QList<ThemeInfo>::iterator it;
1535  for( it = themelist.begin(); it != themelist.end(); ++it )
1536  {
1537  gc->addSelection((*it).GetName(), (*it).GetDirectoryName(),
1538  (*it).GetDirectoryName() == "defaultmenu");
1539  }
1540 
1541  return gc;
1542 }
1543 
1544 #if 0
1545 static HostComboBoxSetting *DecodeVBIFormat()
1546 {
1547  QString beVBI = gCoreContext->GetSetting("VbiFormat");
1548  QString fmt = beVBI.toLower().left(4);
1549  int sel = (fmt == "pal ") ? 1 : ((fmt == "ntsc") ? 2 : 0);
1550 
1551  HostComboBoxSetting *gc = new HostComboBoxSetting("DecodeVBIFormat");
1552 
1553  gc->setLabel(OSDSettings::tr("Decode VBI format"));
1554 
1555  gc->addSelection(OSDSettings::tr("None"), "none",
1556  0 == sel);
1557  gc->addSelection(OSDSettings::tr("PAL teletext"), "pal_txt",
1558  1 == sel);
1559  gc->addSelection(OSDSettings::tr("NTSC closed caption"), "ntsc_cc",
1560  2 == sel);
1561 
1562  gc->setHelpText(
1563  OSDSettings::tr("If enabled, this overrides the mythtv-setup setting "
1564  "used during recording when decoding captions."));
1565 
1566  return gc;
1567 }
1568 #endif
1569 
1571 {
1572  auto *gc = new HostComboBoxSetting("SubtitleCodec");
1573 
1574  gc->setLabel(OSDSettings::tr("Subtitle Codec"));
1575 
1576  QList<QByteArray> list = QTextCodec::availableCodecs();
1577 
1578  for (const auto & codec : qAsConst(list))
1579  {
1580  QString val = QString(codec);
1581  gc->addSelection(val, val, val.toLower() == "utf-8");
1582  }
1583 
1584  return gc;
1585 }
1586 
1588 {
1589  auto *gc = new HostComboBoxSetting("ChannelOrdering");
1590 
1591  gc->setLabel(GeneralSettings::tr("Channel ordering"));
1592 
1593  gc->addSelection(GeneralSettings::tr("channel number"), "channum");
1594  gc->addSelection(GeneralSettings::tr("callsign"), "callsign");
1595 
1596  return gc;
1597 }
1598 
1600 {
1601  auto *gs = new HostSpinBoxSetting("VertScanPercentage", -100, 100, 1);
1602 
1603  gs->setLabel(PlaybackSettings::tr("Vertical scaling"));
1604 
1605  gs->setValue(0);
1606 
1607  gs->setHelpText(PlaybackSettings::tr("Adjust this if the image does not "
1608  "fill your screen vertically. Range "
1609  "-100% to 100%"));
1610  return gs;
1611 }
1612 
1614 {
1615  auto *gs = new HostSpinBoxSetting("HorizScanPercentage", -100, 100, 1);
1616 
1617  gs->setLabel(PlaybackSettings::tr("Horizontal scaling"));
1618 
1619  gs->setValue(0);
1620 
1621  gs->setHelpText(PlaybackSettings::tr("Adjust this if the image does not "
1622  "fill your screen horizontally. Range "
1623  "-100% to 100%"));
1624  return gs;
1625 };
1626 
1628 {
1629  auto *gs = new HostSpinBoxSetting("XScanDisplacement", -50, 50, 1);
1630 
1631  gs->setLabel(PlaybackSettings::tr("Scan displacement (X)"));
1632 
1633  gs->setValue(0);
1634 
1635  gs->setHelpText(PlaybackSettings::tr("Adjust this to move the image "
1636  "horizontally."));
1637 
1638  return gs;
1639 }
1640 
1642 {
1643  auto *gs = new HostSpinBoxSetting("YScanDisplacement", -50, 50, 1);
1644 
1645  gs->setLabel(PlaybackSettings::tr("Scan displacement (Y)"));
1646 
1647  gs->setValue(0);
1648 
1649  gs->setHelpText(PlaybackSettings::tr("Adjust this to move the image "
1650  "vertically."));
1651 
1652  return gs;
1653 };
1654 
1656 {
1657  auto *gc = new HostCheckBoxSetting("DefaultCCMode");
1658 
1659  gc->setLabel(OSDSettings::tr("Always display closed captioning or "
1660  "subtitles"));
1661 
1662  gc->setValue(false);
1663 
1664  gc->setHelpText(OSDSettings::tr("If enabled, captions will be displayed "
1665  "when playing back recordings or watching "
1666  "Live TV. Closed Captioning can be turned "
1667  "on or off by pressing \"T\" during"
1668  "playback."));
1669  return gc;
1670 }
1671 
1673 {
1674  auto *gc = new HostCheckBoxSetting("EnableMHEG");
1675 
1676  gc->setLabel(OSDSettings::tr("Enable interactive TV"));
1677 
1678  gc->setValue(false);
1679 
1680  gc->setHelpText(OSDSettings::tr("If enabled, interactive TV applications "
1681  "(MHEG) will be activated. This is used "
1682  "for teletext and logos for radio and "
1683  "channels that are currently off-air."));
1684  return gc;
1685 }
1686 
1688 {
1689  auto *gc = new HostCheckBoxSetting("EnableMHEGic");
1690  gc->setLabel(OSDSettings::tr("Enable network access for interactive TV"));
1691  gc->setValue(true);
1692  gc->setHelpText(OSDSettings::tr("If enabled, interactive TV applications "
1693  "(MHEG) will be able to access interactive "
1694  "content over the Internet. This is used "
1695  "for BBC iPlayer."));
1696  return gc;
1697 }
1698 
1700 {
1701  auto *combo = new HostComboBoxSetting("AudioVisualiser");
1702  combo->setLabel(OSDSettings::tr("Visualiser for audio only playback"));
1703  combo->setHelpText(OSDSettings::tr("Select a visualisation to use when there "
1704  "is no video. Defaults to none."));
1705  combo->addSelection("None", "");
1707  for (const auto & visual : qAsConst(visuals))
1708  combo->addSelection(visual, visual);
1709  return combo;
1710 }
1711 
1713 {
1714  auto *gc = new HostCheckBoxSetting("PersistentBrowseMode");
1715 
1716  gc->setLabel(OSDSettings::tr("Always use browse mode in Live TV"));
1717 
1718  gc->setValue(true);
1719 
1720  gc->setHelpText(OSDSettings::tr("If enabled, browse mode will "
1721  "automatically be activated whenever "
1722  "you use channel up/down while watching "
1723  "Live TV."));
1724  return gc;
1725 }
1726 
1728 {
1729  auto *gc = new HostCheckBoxSetting("BrowseAllTuners");
1730 
1731  gc->setLabel(OSDSettings::tr("Browse all channels"));
1732 
1733  gc->setValue(false);
1734 
1735  gc->setHelpText(OSDSettings::tr("If enabled, browse mode will show "
1736  "channels on all available recording "
1737  "devices, instead of showing channels "
1738  "on just the current recorder."));
1739  return gc;
1740 }
1741 
1743 {
1744  auto *gc = new HostCheckBoxSetting("UseProgStartMark");
1745 
1746  gc->setLabel(PlaybackSettings::tr("Playback from start of program"));
1747 
1748  gc->setValue(false);
1749 
1750  gc->setHelpText(PlaybackSettings::tr("If enabled and no bookmark is set, "
1751  "playback starts at the program "
1752  "scheduled start time rather than "
1753  "the beginning of the recording. "
1754  "Useful for automatically skipping "
1755  "'start early' parts of a recording."));
1756  return gc;
1757 }
1758 
1760 {
1761  auto *gc = new HostComboBoxSetting("PlaybackExitPrompt");
1762 
1763  gc->setLabel(PlaybackSettings::tr("Action on playback exit"));
1764 
1765  gc->addSelection(PlaybackSettings::tr("Just exit"), "0");
1766  gc->addSelection(PlaybackSettings::tr("Always prompt (excluding Live TV)"),
1767  "1");
1768  gc->addSelection(PlaybackSettings::tr("Always prompt (including Live TV)"),
1769  "4");
1770  gc->addSelection(PlaybackSettings::tr("Prompt for Live TV only"), "8");
1771 
1772  gc->setHelpText(PlaybackSettings::tr("If set to prompt, a menu will be "
1773  "displayed when you exit playback "
1774  "mode. The options available will "
1775  "allow you delete the recording, "
1776  "continue watching, or exit."));
1777  return gc;
1778 }
1779 
1781 {
1782  auto *gc = new HostCheckBoxSetting("EndOfRecordingExitPrompt");
1783 
1784  gc->setLabel(PlaybackSettings::tr("Prompt at end of recording"));
1785 
1786  gc->setValue(false);
1787 
1788  gc->setHelpText(PlaybackSettings::tr("If enabled, a menu will be displayed "
1789  "allowing you to delete the recording "
1790  "when it has finished playing."));
1791  return gc;
1792 }
1793 
1795 {
1796  auto *gc = new HostCheckBoxSetting("MusicChoiceEnabled");
1797 
1798  gc->setLabel(PlaybackSettings::tr("Enable Music Choice"));
1799 
1800  gc->setValue(false);
1801 
1802  gc->setHelpText(PlaybackSettings::tr("Enable this to improve playing of Music Choice channels "
1803  "or recordings from those channels. "
1804  "These are audio channels with slide show "
1805  "from some cable providers. "
1806  "In unusual situations this could cause lip sync problems "
1807  "watching normal videos or TV shows."));
1808  return gc;
1809 }
1810 
1812 {
1813  auto *gc = new HostCheckBoxSetting("JumpToProgramOSD");
1814 
1815  gc->setLabel(PlaybackSettings::tr("Jump to program OSD"));
1816 
1817  gc->setValue(true);
1818 
1819  gc->setHelpText(PlaybackSettings::tr("Set the choice between viewing the "
1820  "current recording group in the OSD, "
1821  "or showing the 'Watch Recording' "
1822  "screen when 'Jump to Program' is "
1823  "activated. If enabled, the "
1824  "recordings are shown in the OSD"));
1825  return gc;
1826 }
1827 
1829 {
1830  auto *gc = new HostCheckBoxSetting("ContinueEmbeddedTVPlay");
1831 
1832  gc->setLabel(PlaybackSettings::tr("Continue playback when embedded"));
1833 
1834  gc->setValue(false);
1835 
1836  gc->setHelpText(PlaybackSettings::tr("If enabled, TV playback continues "
1837  "when the TV window is embedded in "
1838  "the upcoming program list or "
1839  "recorded list. The default is to "
1840  "pause the recorded show when "
1841  "embedded."));
1842  return gc;
1843 }
1844 
1846 {
1847  auto *gc = new HostCheckBoxSetting("AutomaticSetWatched");
1848 
1849  gc->setLabel(PlaybackSettings::tr("Automatically mark a recording as "
1850  "watched"));
1851 
1852  gc->setValue(false);
1853 
1854  gc->setHelpText(PlaybackSettings::tr("If enabled, when you exit near the "
1855  "end of a recording it will be marked "
1856  "as watched. The automatic detection "
1857  "is not foolproof, so do not enable "
1858  "this setting if you don't want an "
1859  "unwatched recording marked as "
1860  "watched."));
1861  return gc;
1862 }
1863 
1865 {
1866  auto *gs = new HostSpinBoxSetting("LiveTVIdleTimeout", 0, 3600, 1);
1867 
1868  gs->setLabel(PlaybackSettings::tr("Live TV idle timeout (mins)"));
1869 
1870  gs->setValue(0);
1871 
1872  gs->setHelpText(PlaybackSettings::tr("Exit Live TV automatically if left "
1873  "idle for the specified number of "
1874  "minutes. 0 disables the timeout."));
1875  return gs;
1876 }
1877 
1878 // static HostCheckBoxSetting *PlaybackPreview()
1879 // {
1880 // HostCheckBoxSetting *gc = new HostCheckBoxSetting("PlaybackPreview");
1881 //
1882 // gc->setLabel(PlaybackSettings::tr("Display live preview of recordings"));
1883 //
1884 // gc->setValue(true);
1885 //
1886 // gc->setHelpText(PlaybackSettings::tr("If enabled, a preview of the recording "
1887 // "will play in a small window on the \"Watch a "
1888 // "Recording\" menu."));
1889 //
1890 // return gc;
1891 // }
1892 //
1893 // static HostCheckBoxSetting *HWAccelPlaybackPreview()
1894 // {
1895 // HostCheckBoxSetting *gc = new HostCheckBoxSetting("HWAccelPlaybackPreview");
1896 //
1897 // gc->setLabel(PlaybackSettings::tr("Use HW Acceleration for live recording preview"));
1898 //
1899 // gc->setValue(false);
1900 //
1901 // gc->setHelpText(
1902 // PlaybackSettings::tr(
1903 // "If enabled, live recording preview will use hardware "
1904 // "acceleration. The video renderer used is determined by the "
1905 // "selected CPU profile. Disable if playback is sluggish or "
1906 // "causes high CPU load"));
1907 //
1908 // return gc;
1909 // }
1910 
1912 {
1913  auto *gc = new HostCheckBoxSetting("UseVirtualKeyboard");
1914 
1915  gc->setLabel(MainGeneralSettings::tr("Use line edit virtual keyboards"));
1916 
1917  gc->setValue(true);
1918 
1919  gc->setHelpText(MainGeneralSettings::tr("If enabled, you can use a virtual "
1920  "keyboard in MythTV's line edit "
1921  "boxes. To use, hit SELECT (Enter "
1922  "or Space) while a line edit is in "
1923  "focus."));
1924  return gc;
1925 }
1926 
1928 {
1929  auto *gs = new HostSpinBoxSetting("FrontendIdleTimeout", 0, 360, 5);
1930 
1931  gs->setLabel(MainGeneralSettings::tr("Idle time before entering standby "
1932  "mode (minutes)"));
1933 
1934  gs->setValue(90);
1935 
1936  gs->setHelpText(MainGeneralSettings::tr("Number of minutes to wait when "
1937  "the frontend is idle before "
1938  "entering standby mode. Standby "
1939  "mode allows the backend to power "
1940  "down if configured to do so. Any "
1941  "remote or mouse input will cause "
1942  "the countdown to start again "
1943  "and/or exit idle mode. Video "
1944  "playback suspends the countdown. "
1945  "A value of zero prevents the "
1946  "frontend automatically entering "
1947  "standby."));
1948  return gs;
1949 }
1950 
1952 {
1953  auto * checkbox = new HostCheckBoxSetting("ConfirmPowerEvent");
1954  checkbox->setValue(true);
1955  checkbox->setLabel(MainGeneralSettings::tr("Confirm before suspending/shutting down"));
1956  checkbox->setHelpText(MainGeneralSettings::tr(
1957  "If enabled (the default) then the user will always be asked to confirm before the system "
1958  "is shutdown, suspended or rebooted."));
1959  return checkbox;
1960 }
1961 
1963 {
1964  auto *gc = new HostComboBoxSetting("OverrideExitMenu");
1965 
1966  gc->setLabel(MainGeneralSettings::tr("Customize exit menu options"));
1967 
1968  gc->addSelection(MainGeneralSettings::tr("Default"), "0");
1969  gc->addSelection(MainGeneralSettings::tr("Show quit"), "1");
1970  gc->addSelection(MainGeneralSettings::tr("Show quit and suspend"), "9");
1971  gc->addSelection(MainGeneralSettings::tr("Show quit and shutdown"), "2");
1972  gc->addSelection(MainGeneralSettings::tr("Show quit, reboot and shutdown"), "3");
1973  gc->addSelection(MainGeneralSettings::tr("Show quit, reboot, shutdown and suspend"), "10");
1974  gc->addSelection(MainGeneralSettings::tr("Show shutdown"), "4");
1975  gc->addSelection(MainGeneralSettings::tr("Show reboot"), "5");
1976  gc->addSelection(MainGeneralSettings::tr("Show reboot and shutdown"), "6");
1977  gc->addSelection(MainGeneralSettings::tr("Show standby"), "7");
1978  gc->addSelection(MainGeneralSettings::tr("Show suspend"), "8");
1979 
1980  QString helptext = MainGeneralSettings::tr("By default, only remote frontends are shown "
1981  "the shutdown option on the exit menu. Here "
1982  "you can force specific shutdown, reboot and suspend "
1983  "options to be displayed.");
1984  if (Power)
1985  {
1986  QStringList supported = Power->GetFeatureList();
1987  if (!supported.isEmpty())
1988  {
1989  helptext.prepend(MainGeneralSettings::tr(
1990  "This system supports '%1' without additional setup. ")
1991  .arg(supported.join(", ")));
1992  }
1993  else
1994  {
1995  helptext.append(MainGeneralSettings::tr(
1996  " This system appears to have no power options available. Try "
1997  "setting the Halt/Reboot/Suspend commands below."));
1998  }
1999  }
2000  gc->setHelpText(helptext);
2001 
2002  return gc;
2003 }
2004 
2005 #ifndef Q_OS_ANDROID
2007 {
2008  auto *ge = new HostTextEditSetting("RebootCommand");
2009  ge->setLabel(MainGeneralSettings::tr("Reboot command"));
2010  ge->setValue("");
2011  QString help = MainGeneralSettings::tr(
2012  "Optional. Script to run if you select the reboot option from the "
2013  "exit menu, if the option is displayed. You must configure an "
2014  "exit key to display the exit menu.");
2015  if (Power && Power->IsFeatureSupported(MythPower::FeatureRestart))
2016  {
2017  help.append(MainGeneralSettings::tr(
2018  " Note: This system appears to support reboot without using this setting."));
2019  }
2020  ge->setHelpText(help);
2021  return ge;
2022 }
2023 
2025 {
2026  auto *suspend = new HostTextEditSetting("SuspendCommand");
2027  suspend->setLabel(MainGeneralSettings::tr("Suspend command"));
2028  suspend->setValue("");
2029  QString help = MainGeneralSettings::tr(
2030  "Optional: Script to run if you select the suspend option from the "
2031  "exit menu, if the option is displayed.");
2032 
2033  if (Power && Power->IsFeatureSupported(MythPower::FeatureSuspend))
2034  {
2035  help.append(MainGeneralSettings::tr(
2036  " Note: This system appears to support suspend without using this setting."));
2037  }
2038  suspend->setHelpText(help);
2039  return suspend;
2040 }
2041 
2043 {
2044  auto *ge = new HostTextEditSetting("HaltCommand");
2045  ge->setLabel(MainGeneralSettings::tr("Halt command"));
2046  ge->setValue("");
2047  QString help = MainGeneralSettings::tr("Optional. Script to run if you "
2048  "select the shutdown option from "
2049  "the exit menu, if the option is "
2050  "displayed. You must configure an "
2051  "exit key to display the exit "
2052  "menu.");
2053  if (Power && Power->IsFeatureSupported(MythPower::FeatureShutdown))
2054  {
2055  help.append(MainGeneralSettings::tr(
2056  " Note: This system appears to support shutdown without using this setting."));
2057  }
2058 
2059  ge->setHelpText(help);
2060  return ge;
2061 }
2062 #endif
2063 
2065 {
2066  auto *ge = new HostTextEditSetting("LircSocket");
2067 
2068  ge->setLabel(MainGeneralSettings::tr("LIRC daemon socket"));
2069 
2070  /* lircd socket moved from /dev/ to /var/run/lirc/ in lirc 0.8.6 */
2071  QString lirc_socket = "/dev/lircd";
2072 
2073  if (!QFile::exists(lirc_socket))
2074  lirc_socket = "/var/run/lirc/lircd";
2075 
2076  ge->setValue(lirc_socket);
2077 
2078  QString help = MainGeneralSettings::tr("UNIX socket or IP address[:port] "
2079  "to connect in order to communicate "
2080  "with the LIRC Daemon.");
2081  ge->setHelpText(help);
2082 
2083  return ge;
2084 }
2085 
2087 {
2088  auto *ge = new HostTextEditSetting("ScreenShotPath");
2089 
2090  ge->setLabel(MainGeneralSettings::tr("Screen shot path"));
2091 
2092  ge->setValue("/tmp/");
2093 
2094  ge->setHelpText(MainGeneralSettings::tr("Path to screenshot storage "
2095  "location. Should be writable "
2096  "by the frontend"));
2097 
2098  return ge;
2099 }
2100 
2102 {
2103  auto *ge = new HostTextEditSetting("SetupPinCode");
2104 
2105  ge->setLabel(MainGeneralSettings::tr("Setup PIN code"));
2106 
2107  ge->setHelpText(MainGeneralSettings::tr("This PIN is used to control "
2108  "access to the setup menus. "
2109  "If you want to use this feature, "
2110  "then setting the value to all "
2111  "numbers will make your life much "
2112  "easier. Set it to blank to "
2113  "disable. If enabled, you will not "
2114  "be able to return to this screen "
2115  "and reset the Setup PIN without "
2116  "first entering the current PIN."));
2117  return ge;
2118 }
2119 
2121 {
2122  auto *gc = new HostComboBoxSetting("XineramaScreen", false);
2123  gc->setLabel(AppearanceSettings::tr("Display on screen"));
2124  gc->setValue(0);
2125  gc->setHelpText(AppearanceSettings::tr("Run on the specified screen or "
2126  "spanning all screens."));
2127  return gc;
2128 }
2129 
2130 
2132 {
2133  auto *gc = new HostComboBoxSetting("XineramaMonitorAspectRatio");
2134 
2135  gc->setLabel(AppearanceSettings::tr("Screen aspect ratio"));
2136  gc->addSelection(AppearanceSettings::tr("Auto (Assume square pixels)"), "-1.0");
2137  gc->addSelection(AppearanceSettings::tr("Auto (Detect from display)"), "0.0");
2138  gc->addSelection("16:9", "1.7777");
2139  gc->addSelection("16:10", "1.6");
2140  gc->addSelection("21:9", "2.3704"); // N.B. Actually 64:27
2141  gc->addSelection("32:9", "3.5555");
2142  gc->addSelection("256:135", "1.8963"); // '4K HD'
2143  gc->addSelection("3:2", "1.5");
2144  gc->addSelection("5:4", "1.25");
2145  gc->addSelection("4:3", "1.3333");
2146  gc->addSelection(AppearanceSettings::tr("16:18 (16:9 Above and below)"), "0.8888");
2147  gc->addSelection(AppearanceSettings::tr("32:10 (16:10 Side by side)"), "3.2");
2148  gc->addSelection(AppearanceSettings::tr("16:20 (16:10 Above and below)"), "0.8");
2149  gc->setHelpText(AppearanceSettings::tr(
2150  "Most modern displays have square pixels and the aspect ratio of the screen can be "
2151  "computed from the resolution (default). "
2152  "The aspect ratio can also be automatically detected from the connected display "
2153  "- though this may be slightly less accurate. If automatic detection fails, the correct "
2154  "aspect ratio can be specified here. Note: Some values (e.g 32:10) are "
2155  "primarily intended for multiscreen setups."));
2156  return gc;
2157 }
2158 
2160 {
2161  auto *gc = new HostComboBoxSetting("LetterboxColour");
2162 
2163  gc->setLabel(PlaybackSettings::tr("Letterboxing color"));
2164 
2165  for (int m = kLetterBoxColour_Black; m < kLetterBoxColour_END; ++m)
2166  gc->addSelection(toString((LetterBoxColour)m), QString::number(m));
2167 
2168  gc->setHelpText(PlaybackSettings::tr("By default MythTV uses black "
2169  "letterboxing to match broadcaster "
2170  "letterboxing, but those with plasma "
2171  "screens may prefer gray to minimize "
2172  "burn-in."));
2173  return gc;
2174 }
2175 
2177 {
2178  auto * cb = new HostCheckBoxSetting("DiscardStereo3D");
2179  cb->setValue(true);
2180  cb->setLabel("Discard 3D stereoscopic fields");
2181  cb->setHelpText(PlaybackSettings::tr(
2182  "If 'Side by Side' or 'Top and Bottom' 3D material is detected, "
2183  "enabling this setting will discard one field (enabled by default)."));
2184  return cb;
2185 }
2186 
2188 {
2189  auto *gc = new HostComboBoxSetting("AspectOverride");
2190 
2191  gc->setLabel(PlaybackSettings::tr("Video aspect override"));
2192 
2193  for (int m = kAspect_Off; m < kAspect_END; ++m)
2194  gc->addSelection(toString((AspectOverrideMode)m), QString::number(m));
2195 
2196  gc->setHelpText(PlaybackSettings::tr("When enabled, these will override "
2197  "the aspect ratio specified by any "
2198  "broadcaster for all video streams."));
2199  return gc;
2200 }
2201 
2203 {
2204  auto *gc = new HostComboBoxSetting("AdjustFill");
2205 
2206  gc->setLabel(PlaybackSettings::tr("Zoom"));
2207 
2208  for (int m = kAdjustFill_Off; m < kAdjustFill_END; ++m)
2209  gc->addSelection(toString((AdjustFillMode)m), QString::number(m));
2211  QString::number(kAdjustFill_AutoDetect_DefaultOff));
2213  QString::number(kAdjustFill_AutoDetect_DefaultHalf));
2214 
2215  gc->setHelpText(PlaybackSettings::tr("When enabled, these will apply a "
2216  "predefined zoom to all video "
2217  "playback in MythTV."));
2218  return gc;
2219 }
2220 
2221 // Theme settings
2222 
2224 {
2225  auto *gs = new HostSpinBoxSetting("GuiWidth", 0, 3840, 8, 1);
2226 
2227  gs->setLabel(AppearanceSettings::tr("GUI width (pixels)"));
2228 
2229  gs->setValue(0);
2230 
2231  gs->setHelpText(AppearanceSettings::tr("The width of the GUI. Do not make "
2232  "the GUI wider than your actual "
2233  "screen resolution. Set to 0 to "
2234  "automatically scale to "
2235  "fullscreen."));
2236  return gs;
2237 }
2238 
2240 {
2241  auto *gs = new HostSpinBoxSetting("GuiHeight", 0, 2160, 8, 1);
2242 
2243  gs->setLabel(AppearanceSettings::tr("GUI height (pixels)"));
2244 
2245  gs->setValue(0);
2246 
2247  gs->setHelpText(AppearanceSettings::tr("The height of the GUI. Do not make "
2248  "the GUI taller than your actual "
2249  "screen resolution. Set to 0 to "
2250  "automatically scale to "
2251  "fullscreen."));
2252  return gs;
2253 }
2254 
2256 {
2257  auto *gs = new HostSpinBoxSetting("GuiOffsetX", -3840, 3840, 32, 1);
2258 
2259  gs->setLabel(AppearanceSettings::tr("GUI X offset"));
2260 
2261  gs->setValue(0);
2262 
2263  gs->setHelpText(AppearanceSettings::tr("The horizontal offset where the "
2264  "GUI will be displayed. May only "
2265  "work if run in a window."));
2266  return gs;
2267 }
2268 
2270 {
2271  auto *gs = new HostSpinBoxSetting("GuiOffsetY", -1600, 1600, 8, 1);
2272 
2273  gs->setLabel(AppearanceSettings::tr("GUI Y offset"));
2274 
2275  gs->setValue(0);
2276 
2277  gs->setHelpText(AppearanceSettings::tr("The vertical offset where the "
2278  "GUI will be displayed."));
2279  return gs;
2280 }
2281 
2283 {
2284  auto *gc = new HostCheckBoxSetting("GuiSizeForTV");
2285 
2286  gc->setLabel(AppearanceSettings::tr("Use GUI size for TV playback"));
2287 
2288  gc->setValue(true);
2289 
2290  gc->setHelpText(AppearanceSettings::tr("If enabled, use the above size for "
2291  "TV, otherwise use full screen."));
2292  return gc;
2293 }
2294 
2296 {
2297  HostCheckBoxSetting *gc = new VideoModeSettings("UseVideoModes");
2298 
2299  gc->setLabel(VideoModeSettings::tr("Separate video modes for GUI and "
2300  "TV playback"));
2301 
2302  gc->setValue(false);
2303 
2304  gc->setHelpText(VideoModeSettings::tr(
2305  "Switch video modes for playback depending on the source "
2306  "resolution and frame rate."));
2307  return gc;
2308 }
2309 
2311 {
2312  auto *gs = new HostSpinBoxSetting(QString("VidModeWidth%1").arg(idx),
2313  0, 3840, 16, 1);
2314 
2315  gs->setLabel(VideoModeSettings::tr("In X", "Video mode width"));
2316 
2317  gs->setValue(0);
2318 
2319  gs->setHelpText(VideoModeSettings::tr("Horizontal resolution of video "
2320  "which needs a special output "
2321  "resolution."));
2322  return gs;
2323 }
2324 
2326 {
2327  auto *gs = new HostSpinBoxSetting(QString("VidModeHeight%1").arg(idx),
2328  0, 2160, 16, 1);
2329 
2330  gs->setLabel(VideoModeSettings::tr("In Y", "Video mode height"));
2331 
2332  gs->setValue(0);
2333 
2334  gs->setHelpText(VideoModeSettings::tr("Vertical resolution of video "
2335  "which needs a special output "
2336  "resolution."));
2337  return gs;
2338 }
2339 
2341 {
2342  auto *gc = new HostComboBoxSetting("GuiVidModeResolution");
2343 
2344  gc->setLabel(VideoModeSettings::tr("GUI"));
2345 
2346  gc->setHelpText(VideoModeSettings::tr("Resolution of screen when not "
2347  "watching a video."));
2348 
2349  MythDisplay* display = GetMythMainWindow()->GetDisplay();
2350  std::vector<MythDisplayMode> scr = display->GetVideoModes();
2351  for (auto & vmode : scr)
2352  {
2353  int w = vmode.Width();
2354  int h = vmode.Height();
2355  QString sel = QString("%1x%2").arg(w).arg(h);
2356  gc->addSelection(sel, sel);
2357  }
2358 
2359  // if no resolution setting, set it with a reasonable initial value
2360  if (!scr.empty() && (gCoreContext->GetSetting("GuiVidModeResolution").isEmpty()))
2361  {
2362  int w = 0;
2363  int h = 0;
2364  gCoreContext->GetResolutionSetting("GuiVidMode", w, h);
2365  if ((w <= 0) || (h <= 0))
2366  {
2367  w = 640;
2368  h = 480;
2369  }
2370 
2371  MythDisplayMode dscr(w, h, -1, -1, -1.0, 0);
2372  double rate = -1.0;
2373  int i = MythDisplayMode::FindBestMatch(scr, dscr, rate);
2374  gc->setValue((i >= 0) ? i : scr.size() - 1);
2375  }
2376 
2377  return gc;
2378 }
2379 
2381 {
2382  QString dhelp = VideoModeSettings::tr("Default screen resolution "
2383  "when watching a video.");
2384  QString ohelp = VideoModeSettings::tr("Screen resolution when watching a "
2385  "video at a specific resolution.");
2386 
2387  QString qstr = (idx<0) ? "TVVidModeResolution" :
2388  QString("TVVidModeResolution%1").arg(idx);
2389  auto *gc = new HostComboBoxSetting(qstr);
2390  QString lstr = (idx<0) ? VideoModeSettings::tr("Video output") :
2391  VideoModeSettings::tr("Output");
2392  QString hstr = (idx<0) ? dhelp : ohelp;
2393 
2394  gc->setLabel(lstr);
2395 
2396  gc->setHelpText(hstr);
2397 
2398  MythDisplay* display = GetMythMainWindow()->GetDisplay();
2399  std::vector<MythDisplayMode> scr = display->GetVideoModes();
2400  for (auto & vmode : scr)
2401  {
2402  QString sel = QString("%1x%2").arg(vmode.Width()).arg(vmode.Height());
2403  gc->addSelection(sel, sel);
2404  }
2405 
2406  return gc;
2407 }
2408 
2410 {
2411  const QString previousValue = getValue();
2412  const bool wasUnchanged = !haveChanged();
2413 
2414  clearSelections();
2415  QString resolution = setting->getValue();
2416  int hz50 = -1;
2417  int hz60 = -1;
2418  const std::vector<double> list = GetRefreshRates(resolution);
2419  addSelection(QObject::tr("Auto"), "0");
2420  for (size_t i = 0; i < list.size(); ++i)
2421  {
2422  QString sel = QString::number((double) list[i], 'f', 3);
2423  addSelection(sel + " Hz", sel, sel == previousValue);
2424  hz50 = (fabs(50.0 - list[i]) < 0.01) ? i : hz50;
2425  hz60 = (fabs(60.0 - list[i]) < 0.01) ? i : hz60;
2426  }
2427 
2428  // addSelection() will cause setValue() to be called, marking the setting as
2429  // changed even though the previous value might still be available. Mark it
2430  // as unchanged in this case if it wasn't already changed.
2431  if (wasUnchanged && previousValue == getValue())
2432  setChanged(false);
2433  else
2434  {
2435  if ("640x480" == resolution || "720x480" == resolution)
2436  setValue(hz60+1);
2437  if ("640x576" == resolution || "720x576" == resolution)
2438  setValue(hz50+1);
2439  }
2440 
2441  setEnabled(!list.empty());
2442 }
2443 
2444 std::vector<double> HostRefreshRateComboBoxSetting::GetRefreshRates(const QString &res)
2445 {
2446  QStringList slist = res.split("x");
2447  int width = 0;
2448  int height = 0;
2449  bool ok0 = false;
2450  bool ok1 = false;
2451  if (2 == slist.size())
2452  {
2453  width = slist[0].toInt(&ok0);
2454  height = slist[1].toInt(&ok1);
2455  }
2456 
2457  std::vector<double> result;
2458  if (ok0 && ok1)
2459  {
2460  QSize size(width, height);
2461  MythDisplay* display = GetMythMainWindow()->GetDisplay();
2462  result = display->GetRefreshRates(size);
2463  }
2464  return result;
2465 }
2466 
2468 {
2469  QString dhelp = VideoModeSettings::tr("Default refresh rate when watching "
2470  "a video. Leave at \"Auto\" to "
2471  "automatically use the best "
2472  "available");
2473  QString ohelp = VideoModeSettings::tr("Refresh rate when watching a "
2474  "video at a specific resolution. "
2475  "Leave at \"Auto\" to automatically "
2476  "use the best available");
2477 
2478  QString qstr = (idx<0) ? "TVVidModeRefreshRate" :
2479  QString("TVVidModeRefreshRate%1").arg(idx);
2480  auto *gc = new HostRefreshRateComboBoxSetting(qstr);
2481  QString lstr = VideoModeSettings::tr("Rate");
2482  QString hstr = (idx<0) ? dhelp : ohelp;
2483 
2484  gc->setLabel(lstr);
2485  gc->setHelpText(hstr);
2486  gc->setEnabled(false);
2487  return gc;
2488 }
2489 
2491 {
2492  QString dhelp = VideoModeSettings::tr("Aspect ratio when watching a "
2493  "video. Leave at \"%1\" to "
2494  "use ratio reported by the monitor. "
2495  "Set to 16:9 or 4:3 to force a "
2496  "specific aspect ratio.");
2497 
2498 
2499 
2500  QString ohelp = VideoModeSettings::tr("Aspect ratio when watching a "
2501  "video at a specific resolution. "
2502  "Leave at \"%1\" to use ratio "
2503  "reported by the monitor. Set to "
2504  "16:9 or 4:3 to force a specific "
2505  "aspect ratio.");
2506 
2507  QString qstr = (idx<0) ? "TVVidModeForceAspect" :
2508  QString("TVVidModeForceAspect%1").arg(idx);
2509 
2510  auto *gc = new HostComboBoxSetting(qstr);
2511 
2512  gc->setLabel(VideoModeSettings::tr("Aspect"));
2513 
2514  QString hstr = (idx<0) ? dhelp : ohelp;
2515 
2516  gc->setHelpText(hstr.arg(VideoModeSettings::tr("Default")));
2517 
2518  gc->addSelection(VideoModeSettings::tr("Default"), "0.0");
2519  gc->addSelection("16:9", "1.77777777777");
2520  gc->addSelection("4:3", "1.33333333333");
2521 
2522  return gc;
2523 }
2524 
2526 {
2528  item->setDrawArrow(getValue() == "1");
2529 }
2530 
2532 {
2533  auto *pause = new HostSpinBoxSetting("VideoModeChangePauseMS", 0, 5000, 100);
2534  pause->setLabel(VideoModeSettings::tr("Pause while switching video modes (ms)"));
2535  pause->setHelpText(VideoModeSettings::tr(
2536  "For most displays, switching video modes takes time and content can be missed. "
2537  "If non-zero, this setting will pause playback while the video mode is changed. "
2538  "The required pause length (in ms) will be dependant on the display's characteristics."));
2539  pause->setValue(0);
2540  return pause;
2541 }
2542 
2544 {
2548 
2550  addChild(res);
2551  addChild(rate);
2553  addChild(pause);
2554  connect(res, qOverload<StandardSetting *>(&StandardSetting::valueChanged),
2556 
2557  auto *overrides = new GroupSetting();
2558 
2559  overrides->setLabel(tr("Overrides for specific video sizes"));
2560 
2561  for (int idx = 0; idx < 3; ++idx)
2562  {
2563  //input side
2564  overrides->addChild(VidModeWidth(idx));
2565  overrides->addChild(VidModeHeight(idx));
2566  // output side
2567  overrides->addChild(res = TVVidModeResolution(idx));
2568  overrides->addChild(rate = TVVidModeRefreshRate(idx));
2569  overrides->addChild(TVVidModeForceAspect(idx));
2570 
2571  connect(res, qOverload<StandardSetting *>(&StandardSetting::valueChanged),
2573  }
2574 
2575  addChild(overrides);
2576 };
2577 
2579 {
2580  auto *gc = new HostCheckBoxSetting("HideMouseCursor");
2581 
2582  gc->setLabel(AppearanceSettings::tr("Hide mouse cursor in MythTV"));
2583 
2584  gc->setValue(false);
2585 
2586  gc->setHelpText(AppearanceSettings::tr("Toggles mouse cursor visibility "
2587  "for touchscreens. By default "
2588  "MythTV will auto-hide the cursor "
2589  "if the mouse doesn't move for a "
2590  "period, this setting disables the "
2591  "cursor entirely."));
2592  return gc;
2593 };
2594 
2595 
2597 {
2598  auto *gc = new HostCheckBoxSetting("RunFrontendInWindow");
2599 
2600  gc->setLabel(AppearanceSettings::tr("Use window border"));
2601 
2602  gc->setValue(false);
2603 
2604  gc->setHelpText(AppearanceSettings::tr("Toggles between windowed and "
2605  "borderless operation."));
2606  return gc;
2607 }
2608 
2610 {
2611  auto *gc = new HostCheckBoxSetting("AlwaysOnTop");
2612 
2613  gc->setLabel(AppearanceSettings::tr("Always On Top"));
2614 
2615  gc->setValue(false);
2616 
2617  gc->setHelpText(AppearanceSettings::tr("If enabled, MythTV will always be "
2618  "on top"));
2619  return gc;
2620 }
2621 
2623 {
2624  auto *gs = new HostSpinBoxSetting("StartupScreenDelay", -1, 60, 1, 1,
2625  "Never show startup screen");
2626 
2627  gs->setLabel(AppearanceSettings::tr("Startup Screen Delay"));
2628 
2629  gs->setValue(2);
2630 
2631  gs->setHelpText(AppearanceSettings::tr(
2632  "The Startup Screen will show the progress of starting the frontend "
2633  "if frontend startup takes longer than this number of seconds."));
2634  return gs;
2635 }
2636 
2637 
2639 {
2640  auto *gs = new HostSpinBoxSetting("GUITEXTZOOM", 50, 150, 1, 1);
2641 
2642  gs->setLabel(AppearanceSettings::tr("GUI text zoom percentage"));
2643 
2644  gs->setValue(100);
2645 
2646  gs->setHelpText(AppearanceSettings::tr
2647  ("Adjust the themed defined font size by this percentage. "
2648  "mythfrontend needs restart for this to take effect."));
2649  return gs;
2650 }
2651 
2652 
2654 {
2655  auto *gc = new HostComboBoxSetting("DateFormat");
2656  gc->setLabel(AppearanceSettings::tr("Date format"));
2657 
2658  QDate sampdate = MythDate::current().toLocalTime().date();
2659  QString sampleStr = AppearanceSettings::tr("Samples are shown using "
2660  "today's date.");
2661 
2662  if (sampdate.month() == sampdate.day())
2663  {
2664  sampdate = sampdate.addDays(1);
2665  sampleStr = AppearanceSettings::tr("Samples are shown using "
2666  "tomorrow's date.");
2667  }
2668 
2669  QLocale locale = gCoreContext->GetQLocale();
2670 
2671  gc->addSelection(locale.toString(sampdate, "ddd MMM d"), "ddd MMM d");
2672  gc->addSelection(locale.toString(sampdate, "ddd d MMM"), "ddd d MMM");
2673  gc->addSelection(locale.toString(sampdate, "ddd MMMM d"), "ddd MMMM d");
2674  gc->addSelection(locale.toString(sampdate, "ddd d MMMM"), "ddd d MMMM");
2675  gc->addSelection(locale.toString(sampdate, "dddd MMM d"), "dddd MMM d");
2676  gc->addSelection(locale.toString(sampdate, "dddd d MMM"), "dddd d MMM");
2677  gc->addSelection(locale.toString(sampdate, "MMM d"), "MMM d");
2678  gc->addSelection(locale.toString(sampdate, "d MMM"), "d MMM");
2679  gc->addSelection(locale.toString(sampdate, "MM/dd"), "MM/dd");
2680  gc->addSelection(locale.toString(sampdate, "dd/MM"), "dd/MM");
2681  gc->addSelection(locale.toString(sampdate, "MM.dd"), "MM.dd");
2682  gc->addSelection(locale.toString(sampdate, "dd.MM"), "dd.MM");
2683  gc->addSelection(locale.toString(sampdate, "M/d/yyyy"), "M/d/yyyy");
2684  gc->addSelection(locale.toString(sampdate, "d/M/yyyy"), "d/M/yyyy");
2685  gc->addSelection(locale.toString(sampdate, "MM.dd.yyyy"), "MM.dd.yyyy");
2686  gc->addSelection(locale.toString(sampdate, "dd.MM.yyyy"), "dd.MM.yyyy");
2687  gc->addSelection(locale.toString(sampdate, "yyyy-MM-dd"), "yyyy-MM-dd");
2688  gc->addSelection(locale.toString(sampdate, "ddd MMM d yyyy"), "ddd MMM d yyyy");
2689  gc->addSelection(locale.toString(sampdate, "ddd d MMM yyyy"), "ddd d MMM yyyy");
2690  gc->addSelection(locale.toString(sampdate, "ddd yyyy-MM-dd"), "ddd yyyy-MM-dd");
2691 
2692  QString cn_long = QString("dddd yyyy") + QChar(0x5E74) +
2693  "M" + QChar(0x6708) + "d"+ QChar(0x65E5); // dddd yyyy年M月d日
2694  gc->addSelection(locale.toString(sampdate, cn_long), cn_long);
2695  QString cn_med = QString("dddd ") +
2696  "M" + QChar(0x6708) + "d"+ QChar(0x65E5); // dddd M月d日
2697 
2698  gc->addSelection(locale.toString(sampdate, cn_med), cn_med);
2699 
2700  //: %1 gives additional information regarding the date format
2701  gc->setHelpText(AppearanceSettings::tr("Your preferred date format. %1")
2702  .arg(sampleStr));
2703 
2704  return gc;
2705 }
2706 
2708 {
2709  auto *gc = new HostComboBoxSetting("ShortDateFormat");
2710  gc->setLabel(AppearanceSettings::tr("Short date format"));
2711 
2712  QDate sampdate = MythDate::current().toLocalTime().date();
2713 
2714  QString sampleStr = AppearanceSettings::tr("Samples are shown using "
2715  "today's date.");
2716 
2717  if (sampdate.month() == sampdate.day())
2718  {
2719  sampdate = sampdate.addDays(1);
2720  sampleStr = AppearanceSettings::tr("Samples are shown using "
2721  "tomorrow's date.");
2722  }
2723  QLocale locale = gCoreContext->GetQLocale();
2724 
2725  gc->addSelection(locale.toString(sampdate, "M/d"), "M/d");
2726  gc->addSelection(locale.toString(sampdate, "d/M"), "d/M");
2727  gc->addSelection(locale.toString(sampdate, "MM/dd"), "MM/dd");
2728  gc->addSelection(locale.toString(sampdate, "dd/MM"), "dd/MM");
2729  gc->addSelection(locale.toString(sampdate, "MM.dd"), "MM.dd");
2730  gc->addSelection(locale.toString(sampdate, "dd.MM."), "dd.MM.");
2731  gc->addSelection(locale.toString(sampdate, "M.d."), "M.d.");
2732  gc->addSelection(locale.toString(sampdate, "d.M."), "d.M.");
2733  gc->addSelection(locale.toString(sampdate, "MM-dd"), "MM-dd");
2734  gc->addSelection(locale.toString(sampdate, "dd-MM"), "dd-MM");
2735  gc->addSelection(locale.toString(sampdate, "MMM d"), "MMM d");
2736  gc->addSelection(locale.toString(sampdate, "d MMM"), "d MMM");
2737  gc->addSelection(locale.toString(sampdate, "ddd d"), "ddd d");
2738  gc->addSelection(locale.toString(sampdate, "d ddd"), "d ddd");
2739  gc->addSelection(locale.toString(sampdate, "ddd M/d"), "ddd M/d");
2740  gc->addSelection(locale.toString(sampdate, "ddd d/M"), "ddd d/M");
2741  gc->addSelection(locale.toString(sampdate, "ddd d.M"), "ddd d.M");
2742  gc->addSelection(locale.toString(sampdate, "ddd dd.MM"), "ddd dd.MM");
2743  gc->addSelection(locale.toString(sampdate, "M/d ddd"), "M/d ddd");
2744  gc->addSelection(locale.toString(sampdate, "d/M ddd"), "d/M ddd");
2745 
2746  QString cn_short1 = QString("M") + QChar(0x6708) + "d" + QChar(0x65E5); // M月d日
2747 
2748  gc->addSelection(locale.toString(sampdate, cn_short1), cn_short1);
2749 
2750  QString cn_short2 = QString("ddd M") + QChar(0x6708) + "d" + QChar(0x65E5); // ddd M月d日
2751 
2752  gc->addSelection(locale.toString(sampdate, cn_short2), cn_short2);
2753 
2754  //: %1 gives additional information regarding the date format
2755  gc->setHelpText(AppearanceSettings::tr("Your preferred short date format. %1")
2756  .arg(sampleStr));
2757  return gc;
2758 }
2759 
2761 {
2762  auto *gc = new HostComboBoxSetting("TimeFormat");
2763 
2764  gc->setLabel(AppearanceSettings::tr("Time format"));
2765 
2766  QTime samptime = QTime::currentTime();
2767 
2768  QLocale locale = gCoreContext->GetQLocale();
2769 
2770  gc->addSelection(locale.toString(samptime, "h:mm AP"), "h:mm AP");
2771  gc->addSelection(locale.toString(samptime, "h:mm ap"), "h:mm ap");
2772  gc->addSelection(locale.toString(samptime, "hh:mm AP"), "hh:mm AP");
2773  gc->addSelection(locale.toString(samptime, "hh:mm ap"), "hh:mm ap");
2774  gc->addSelection(locale.toString(samptime, "h:mm"), "h:mm");
2775  gc->addSelection(locale.toString(samptime, "hh:mm"), "hh:mm");
2776  gc->addSelection(locale.toString(samptime, "hh.mm"), "hh.mm");
2777  gc->addSelection(locale.toString(samptime, "AP h:mm"), "AP h:mm");
2778 
2779  gc->setHelpText(AppearanceSettings::tr("Your preferred time format. You "
2780  "must choose a format with \"AM\" "
2781  "or \"PM\" in it, otherwise your "
2782  "time display will be 24-hour or "
2783  "\"military\" time."));
2784  return gc;
2785 }
2786 
2788 {
2789  auto *rgb = new HostCheckBoxSetting("GUIRGBLevels");
2790  rgb->setLabel(AppearanceSettings::tr("Use full range RGB output"));
2791  rgb->setValue(true);
2792  rgb->setHelpText("Enable (recommended) to supply full range RGB output to your display device. "
2793  "Disable to supply limited range RGB output. This setting applies to both the "
2794  "GUI and media playback. Ideally the value of this setting should match a "
2795  "similar setting on your TV or monitor.");
2796  return rgb;
2797 }
2798 
2800 {
2801  auto *gc = new HostComboBoxSetting("ChannelFormat");
2802 
2803  gc->setLabel(GeneralSettings::tr("Channel format"));
2804 
2805  gc->addSelection(GeneralSettings::tr("number"), "<num>");
2806  gc->addSelection(GeneralSettings::tr("number callsign"), "<num> <sign>");
2807  gc->addSelection(GeneralSettings::tr("number name"), "<num> <name>");
2808  gc->addSelection(GeneralSettings::tr("callsign"), "<sign>");
2809  gc->addSelection(GeneralSettings::tr("name"), "<name>");
2810 
2811  gc->setHelpText(GeneralSettings::tr("Your preferred channel format."));
2812 
2813  gc->setValue(1);
2814 
2815  return gc;
2816 }
2817 
2819 {
2820  auto *gc = new HostComboBoxSetting("LongChannelFormat");
2821 
2822  gc->setLabel(GeneralSettings::tr("Long channel format"));
2823 
2824  gc->addSelection(GeneralSettings::tr("number"), "<num>");
2825  gc->addSelection(GeneralSettings::tr("number callsign"), "<num> <sign>");
2826  gc->addSelection(GeneralSettings::tr("number name"), "<num> <name>");
2827  gc->addSelection(GeneralSettings::tr("callsign"), "<sign>");
2828  gc->addSelection(GeneralSettings::tr("name"), "<name>");
2829 
2830  gc->setHelpText(GeneralSettings::tr("Your preferred long channel format."));
2831 
2832  gc->setValue(2);
2833 
2834  return gc;
2835 }
2836 
2838 {
2839  auto *gc = new HostCheckBoxSetting("ChannelGroupRememberLast");
2840 
2841  gc->setLabel(ChannelGroupSettings::tr("Remember last channel group"));
2842 
2843  gc->setHelpText(ChannelGroupSettings::tr("If enabled, the EPG will "
2844  "initially display only the "
2845  "channels from the last channel "
2846  "group selected. Pressing \"4\" "
2847  "will toggle channel group."));
2848 
2849  gc->setValue(false);
2850 
2851  return gc;
2852 }
2853 
2855 {
2856  auto *gc = new HostComboBoxSetting("ChannelGroupDefault");
2857 
2858  gc->setLabel(ChannelGroupSettings::tr("Default channel group"));
2859 
2860  ChannelGroupList changrplist;
2861 
2862  changrplist = ChannelGroup::GetChannelGroups();
2863 
2864  gc->addSelection(ChannelGroupSettings::tr("All Channels"), "-1");
2865 
2866  ChannelGroupList::iterator it;
2867 
2868  for (it = changrplist.begin(); it < changrplist.end(); ++it)
2869  gc->addSelection(it->m_name, QString("%1").arg(it->m_grpId));
2870 
2871  gc->setHelpText(ChannelGroupSettings::tr("Default channel group to be "
2872  "shown in the EPG. Pressing "
2873  "GUIDE key will toggle channel "
2874  "group."));
2875  gc->setValue(false);
2876 
2877  return gc;
2878 }
2879 
2881 {
2882  auto *gc = new HostCheckBoxSetting("BrowseChannelGroup");
2883 
2884  gc->setLabel(GeneralSettings::tr("Browse/change channels from Channel "
2885  "Group"));
2886 
2887  gc->setHelpText(GeneralSettings::tr("If enabled, Live TV will browse or "
2888  "change channels from the selected "
2889  "channel group. The \"All Channels\" "
2890  "channel group may be selected to "
2891  "browse all channels."));
2892  gc->setValue(false);
2893 
2894  return gc;
2895 }
2896 
2897 #if 0
2898 static GlobalCheckBoxSetting *SortCaseSensitive()
2899 {
2900  auto *gc = new GlobalCheckBoxSetting("SortCaseSensitive");
2901  gc->setLabel(GeneralSettings::tr("Case-sensitive sorting"));
2902  gc->setValue(false);
2903  gc->setHelpText(GeneralSettings::tr("If enabled, all sorting will be "
2904  "case-sensitive. This would mean "
2905  "that \"bee movie\" would sort after "
2906  "\"Sea World\" as lower case letters "
2907  "sort after uppercase letters."));
2908  return gc;
2909 }
2910 #endif
2911 
2913 {
2914  auto *gc = new GlobalCheckBoxSetting("SortStripPrefixes");
2915 
2916  gc->setLabel(GeneralSettings::tr("Remove prefixes when sorting"));
2917  gc->setValue(true);
2918  gc->setHelpText(GeneralSettings::tr(
2919  "If enabled, all sorting will remove the common "
2920  "prefixes (The, A, An) from a string prior to "
2921  "sorting. For example, this would sort the titles "
2922  "\"Earth 2\", \"The Flash\", and \"Kings\" in that "
2923  "order. If disabled, they would sort as \"Earth 2\", "
2924  "\"Kings\", \"The Flash\"."));
2925  return gc;
2926 }
2927 
2929 {
2930  auto *gc = new GlobalTextEditSetting("SortPrefixExceptions");
2931 
2932  gc->setLabel(MainGeneralSettings::tr("Names exempt from prefix removal"));
2933  gc->setValue("");
2934  gc->setHelpText(MainGeneralSettings::tr(
2935  "This list of names will be exempt from removing "
2936  "the common prefixes (The, A, An) from a title or "
2937  "filename. Enter multiple names separated by "
2938  "semicolons."));
2939  return gc;
2940 }
2941 
2942 // General RecPriorities settings
2943 
2945 {
2946  auto *bc = new GlobalComboBoxSetting("SchedOpenEnd");
2947 
2948  bc->setLabel(GeneralRecPrioritiesSettings::tr("Avoid back to back "
2949  "recordings"));
2950 
2951  bc->setHelpText(
2952  GeneralRecPrioritiesSettings::tr("Selects the situations where the "
2953  "scheduler will avoid assigning shows "
2954  "to the same card if their end time "
2955  "and start time match. This will be "
2956  "allowed when necessary in order to "
2957  "resolve conflicts."));
2958 
2959  bc->addSelection(GeneralRecPrioritiesSettings::tr("Never"), "0");
2960  bc->addSelection(GeneralRecPrioritiesSettings::tr("Different Channels"),
2961  "1");
2962  bc->addSelection(GeneralRecPrioritiesSettings::tr("Always"), "2");
2963 
2964  bc->setValue(0);
2965 
2966  return bc;
2967 }
2968 
2970 {
2971  auto *bs = new GlobalSpinBoxSetting("PrefInputPriority", 1, 99, 1);
2972 
2973  bs->setLabel(GeneralRecPrioritiesSettings::tr("Preferred input priority"));
2974 
2975  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority when "
2976  "a showing matches the "
2977  "preferred input selected "
2978  "in the 'Scheduling "
2979  "Options' section of the "
2980  "recording rule."));
2981 
2982  bs->setValue(2);
2983  return bs;
2984 }
2985 
2987 {
2988  auto *bs = new GlobalSpinBoxSetting("HDTVRecPriority", -99, 99, 1);
2989 
2990  bs->setLabel(GeneralRecPrioritiesSettings::tr("HDTV recording priority"));
2991 
2992  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority when "
2993  "a showing is marked as an "
2994  "HDTV broadcast in the TV "
2995  "listings."));
2996 
2997  bs->setValue(0);
2998 
2999  return bs;
3000 }
3001 
3003 {
3004  auto *bs = new GlobalSpinBoxSetting("WSRecPriority", -99, 99, 1);
3005 
3006  bs->setLabel(GeneralRecPrioritiesSettings::tr("Widescreen recording "
3007  "priority"));
3008 
3009  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority when "
3010  "a showing is marked as "
3011  "widescreen in the TV "
3012  "listings."));
3013 
3014  bs->setValue(0);
3015 
3016  return bs;
3017 }
3018 
3020 {
3021  auto *bs = new GlobalSpinBoxSetting("SignLangRecPriority", -99, 99, 1);
3022 
3023  bs->setLabel(GeneralRecPrioritiesSettings::tr("Sign language recording "
3024  "priority"));
3025 
3026  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority "
3027  "when a showing is "
3028  "marked as having "
3029  "in-vision sign "
3030  "language."));
3031 
3032  bs->setValue(0);
3033 
3034  return bs;
3035 }
3036 
3038 {
3039  auto *bs = new GlobalSpinBoxSetting("OnScrSubRecPriority", -99, 99, 1);
3040 
3041  bs->setLabel(GeneralRecPrioritiesSettings::tr("In-vision Subtitles "
3042  "Recording Priority"));
3043 
3044  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority "
3045  "when a showing is marked "
3046  "as having in-vision "
3047  "subtitles."));
3048 
3049  bs->setValue(0);
3050 
3051  return bs;
3052 }
3053 
3055 {
3056  auto *bs = new GlobalSpinBoxSetting("CCRecPriority", -99, 99, 1);
3057 
3058  bs->setLabel(GeneralRecPrioritiesSettings::tr("Subtitles/CC recording "
3059  "priority"));
3060 
3061  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority when "
3062  "a showing is marked as "
3063  "having subtitles or "
3064  "closed captioning (CC) "
3065  "available."));
3066 
3067  bs->setValue(0);
3068 
3069  return bs;
3070 }
3071 
3073 {
3074  auto *bs = new GlobalSpinBoxSetting("HardHearRecPriority", -99, 99, 1);
3075 
3076  bs->setLabel(GeneralRecPrioritiesSettings::tr("Hard of hearing priority"));
3077 
3078  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority when "
3079  "a showing is marked as "
3080  "having support for "
3081  "viewers with impaired "
3082  "hearing."));
3083 
3084  bs->setValue(0);
3085 
3086  return bs;
3087 }
3088 
3090 {
3091  auto *bs = new GlobalSpinBoxSetting("AudioDescRecPriority", -99, 99, 1);
3092 
3093  bs->setLabel(GeneralRecPrioritiesSettings::tr("Audio described priority"));
3094 
3095  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority when "
3096  "a showing is marked as "
3097  "being Audio Described."));
3098 
3099  bs->setValue(0);
3100 
3101  return bs;
3102 }
3103 
3105 {
3106  auto *ge = new HostTextEditSetting("DefaultTVChannel");
3107 
3108  ge->setLabel(EPGSettings::tr("Guide starts at channel"));
3109 
3110  ge->setValue("3");
3111 
3112  ge->setHelpText(EPGSettings::tr("The program guide starts on this channel "
3113  "if it is run from outside of Live TV "
3114  "mode. Leave blank to enable Live TV "
3115  "automatic start channel."));
3116 
3117  return ge;
3118 }
3119 
3121 {
3122  auto *gs = new HostSpinBoxSetting("SelChangeRecThreshold", 1, 600, 1);
3123 
3124  gs->setLabel(EPGSettings::tr("Record threshold"));
3125 
3126  gs->setValue(16);
3127 
3128  gs->setHelpText(EPGSettings::tr("Pressing SELECT on a show that is at "
3129  "least this many minutes into the future "
3130  "will schedule a recording."));
3131  return gs;
3132 }
3133 
3135 {
3136  auto *gc = new GlobalComboBoxSetting("Language");
3137 
3138  gc->setLabel(AppearanceSettings::tr("Language"));
3139 
3140  QMap<QString, QString> langMap = MythTranslation::getLanguages();
3141  QStringList langs = langMap.values();
3142  langs.sort();
3143  QString langCode = gCoreContext->GetSetting("Language").toLower();
3144 
3145  if (langCode.isEmpty())
3146  langCode = "en_US";
3147 
3148  gc->clearSelections();
3149 
3150  for (const auto & label : qAsConst(langs))
3151  {
3152  QString value = langMap.key(label);
3153  gc->addSelection(label, value, (value.toLower() == langCode));
3154  }
3155 
3156  gc->setHelpText(AppearanceSettings::tr("Your preferred language for the "
3157  "user interface."));
3158  return gc;
3159 }
3160 
3162 {
3163  widget->clearSelections();
3164  QString q = QString("ISO639Language%1").arg(i);
3165  QString lang = gCoreContext->GetSetting(q, "").toLower();
3166 
3167  if ((lang.isEmpty() || lang == "aar") &&
3168  !gCoreContext->GetSetting("Language", "").isEmpty())
3169  {
3170  lang = iso639_str2_to_str3(gCoreContext->GetLanguage().toLower());
3171  }
3172 
3173  QMap<int,QString>::iterator it = iso639_key_to_english_name.begin();
3174  QMap<int,QString>::iterator ite = iso639_key_to_english_name.end();
3175 
3176  for (; it != ite; ++it)
3177  {
3178  QString desc = (*it);
3179  int idx = desc.indexOf(";");
3180  if (idx > 0)
3181  desc = desc.left(idx);
3182 
3183  const QString il = iso639_key_to_str3(it.key());
3184  widget->addSelection(desc, il, il == lang);
3185  }
3186 }
3187 
3189 {
3190  auto *gc = new GlobalComboBoxSetting(QString("ISO639Language%1").arg(i));
3191 
3192  gc->setLabel(AppearanceSettings::tr("Guide language #%1").arg(i+1));
3193 
3194  // We should try to get language from "MythLanguage"
3195  // then use code 2 to code 3 map in iso639.h
3196  ISO639_fill_selections(gc, i);
3197 
3198  gc->setHelpText(AppearanceSettings::tr("Your #%1 preferred language for "
3199  "Program Guide data and captions.")
3200  .arg(i+1));
3201  return gc;
3202 }
3203 
3205 {
3206  auto *gc = new HostCheckBoxSetting("NetworkControlEnabled");
3207 
3208  gc->setLabel(MainGeneralSettings::tr("Enable Network Remote Control "
3209  "interface"));
3210 
3211  gc->setHelpText(MainGeneralSettings::tr("This enables support for "
3212  "controlling MythFrontend "
3213  "over the network."));
3214 
3215  gc->setValue(false);
3216 
3217  return gc;
3218 }
3219 
3221 {
3222  auto *gs = new HostSpinBoxSetting("NetworkControlPort", 1025, 65535, 1);
3223 
3224  gs->setLabel(MainGeneralSettings::tr("Network Remote Control port"));
3225 
3226  gs->setValue(6546);
3227 
3228  gs->setHelpText(MainGeneralSettings::tr("This specifies what port the "
3229  "Network Remote Control "
3230  "interface will listen on for "
3231  "new connections."));
3232  return gs;
3233 }
3234 
3236 {
3237  auto *ge = new HostTextEditSetting("UDPNotifyPort");
3238 
3239  ge->setLabel(MainGeneralSettings::tr("UDP notify port"));
3240 
3241  ge->setValue("6948");
3242 
3243  ge->setHelpText(MainGeneralSettings::tr("MythTV will listen for "
3244  "connections from the "
3245  "\"mythutil\" program on "
3246  "this port."));
3247  return ge;
3248 }
3249 
3250 #ifdef USING_LIBCEC
3251 static HostCheckBoxSetting *CECEnabled()
3252 {
3253  auto *gc = new HostCheckBoxSetting("libCECEnabled");
3254  gc->setLabel(MainGeneralSettings::tr("Enable CEC Control "
3255  "interface"));
3256  gc->setHelpText(MainGeneralSettings::tr("This enables "
3257  "controlling MythFrontend from a TV remote or powering the TV "
3258  "on and off from a MythTV remote "
3259  "if you have compatible hardware. "
3260  "These settings only take effect after a restart."));
3261  gc->setValue(true);
3262  return gc;
3263 }
3264 
3265 static HostCheckBoxSetting *CECPowerOnTVAllowed()
3266 {
3267  auto *gc = new HostCheckBoxSetting("PowerOnTVAllowed");
3268  gc->setLabel(MainGeneralSettings::tr("Allow Power On TV"));
3269  gc->setHelpText(MainGeneralSettings::tr("Enables your TV to be powered "
3270  "on from MythTV remote or when MythTV starts "
3271  "if you have compatible hardware."));
3272  gc->setValue(true);
3273  return gc;
3274 }
3275 
3276 static HostCheckBoxSetting *CECPowerOffTVAllowed()
3277 {
3278  auto *gc = new HostCheckBoxSetting("PowerOffTVAllowed");
3279  gc->setLabel(MainGeneralSettings::tr("Allow Power Off TV"));
3280  gc->setHelpText(MainGeneralSettings::tr("Enables your TV to be powered "
3281  "off from MythTV remote or when MythTV starts "
3282  "if you have compatible hardware."));
3283  gc->setValue(true);
3284  return gc;
3285 }
3286 
3287 static HostCheckBoxSetting *CECPowerOnTVOnStart()
3288 {
3289  auto *gc = new HostCheckBoxSetting("PowerOnTVOnStart");
3290  gc->setLabel(MainGeneralSettings::tr("Power on TV At Start"));
3291  gc->setHelpText(MainGeneralSettings::tr("Powers "
3292  "on your TV when you start MythTV "
3293  "if you have compatible hardware."));
3294  gc->setValue(true);
3295  return gc;
3296 }
3297 
3298 static HostCheckBoxSetting *CECPowerOffTVOnExit()
3299 {
3300  auto *gc = new HostCheckBoxSetting("PowerOffTVOnExit");
3301  gc->setLabel(MainGeneralSettings::tr("Power off TV At Exit"));
3302  gc->setHelpText(MainGeneralSettings::tr("Powers "
3303  "off your TV when you exit MythTV "
3304  "if you have compatible hardware."));
3305  gc->setValue(true);
3306  return gc;
3307 }
3308 
3309 #endif //USING_LIBCEC
3310 
3311 #ifdef USING_AIRPLAY
3312 // AirPlay Settings
3313 static HostCheckBoxSetting *AirPlayEnabled()
3314 {
3315  auto *gc = new HostCheckBoxSetting("AirPlayEnabled");
3316 
3317  gc->setLabel(MainGeneralSettings::tr("Enable AirPlay"));
3318 
3319  gc->setHelpText(MainGeneralSettings::tr("AirPlay lets you wirelessly view "
3320  "content on your TV from your "
3321  "iPhone, iPad, iPod Touch, or "
3322  "iTunes on your computer."));
3323 
3324  gc->setValue(true);
3325 
3326  return gc;
3327 }
3328 
3329 static HostCheckBoxSetting *AirPlayAudioOnly()
3330 {
3331  auto *gc = new HostCheckBoxSetting("AirPlayAudioOnly");
3332 
3333  gc->setLabel(MainGeneralSettings::tr("Only support AirTunes (no video)"));
3334 
3335  gc->setHelpText(MainGeneralSettings::tr("Only stream audio from your "
3336  "iPhone, iPad, iPod Touch, or "
3337  "iTunes on your computer"));
3338 
3339  gc->setValue(false);
3340 
3341  return gc;
3342 }
3343 
3344 static HostCheckBoxSetting *AirPlayPasswordEnabled()
3345 {
3346  auto *gc = new HostCheckBoxSetting("AirPlayPasswordEnabled");
3347 
3348  gc->setLabel(MainGeneralSettings::tr("Require password"));
3349 
3350  gc->setValue(false);
3351 
3352  gc->setHelpText(MainGeneralSettings::tr("Require a password to use "
3353  "AirPlay. Your iPhone, iPad, iPod "
3354  "Touch, or iTunes on your computer "
3355  "will prompt you when required"));
3356  return gc;
3357 }
3358 
3359 static HostTextEditSetting *AirPlayPassword()
3360 {
3361  auto *ge = new HostTextEditSetting("AirPlayPassword");
3362 
3363  ge->setLabel(MainGeneralSettings::tr("Password"));
3364 
3365  ge->setValue("0000");
3366 
3367  ge->setHelpText(MainGeneralSettings::tr("Your iPhone, iPad, iPod Touch, or "
3368  "iTunes on your computer will "
3369  "prompt you for this password "
3370  "when required"));
3371  return ge;
3372 }
3373 
3374 static GroupSetting *AirPlayPasswordSettings()
3375 {
3376  auto *hc = new GroupSetting();
3377 
3378  hc->setLabel(MainGeneralSettings::tr("AirPlay - Password"));
3379  hc->addChild(AirPlayPasswordEnabled());
3380  hc->addChild(AirPlayPassword());
3381 
3382  return hc;
3383 }
3384 
3385 static HostCheckBoxSetting *AirPlayFullScreen()
3386 {
3387  auto *gc = new HostCheckBoxSetting("AirPlayFullScreen");
3388 
3389  gc->setLabel(MainGeneralSettings::tr("AirPlay full screen playback"));
3390 
3391  gc->setValue(false);
3392 
3393  gc->setHelpText(MainGeneralSettings::tr("During music playback, displays "
3394  "album cover and various media "
3395  "information in full screen mode"));
3396  return gc;
3397 }
3398 
3399 //static TransLabelSetting *AirPlayInfo()
3400 //{
3401 // TransLabelSetting *ts = new TransLabelSetting();
3402 //
3403 // ts->setValue(MainGeneralSettings::tr("All AirPlay settings take effect "
3404 // "when you restart MythFrontend."));
3405 // return ts;
3406 //}
3407 
3408 //static TransLabelSetting *AirPlayRSAInfo()
3409 //{
3410 // TransLabelSetting *ts = new TransLabelSetting();
3411 //
3412 // if (MythRAOPConnection::LoadKey() == nullptr)
3413 // {
3414 // ts->setValue(MainGeneralSettings::tr("AirTunes RSA key couldn't be "
3415 // "loaded. Check http://www.mythtv.org/wiki/AirTunes/AirPlay. "
3416 // "Last Error: %1")
3417 // .arg(MythRAOPConnection::RSALastError()));
3418 // }
3419 // else
3420 // {
3421 // ts->setValue(MainGeneralSettings::tr("AirTunes RSA key successfully "
3422 // "loaded."));
3423 // }
3424 //
3425 // return ts;
3426 //}
3427 #endif
3428 
3430 {
3431  auto *gc = new HostCheckBoxSetting("RealtimePriority");
3432 
3433  gc->setLabel(PlaybackSettings::tr("Enable realtime priority threads"));
3434 
3435  gc->setHelpText(PlaybackSettings::tr("When running mythfrontend with root "
3436  "privileges, some threads can be "
3437  "given enhanced priority. Disable "
3438  "this if MythFrontend freezes during "
3439  "video playback."));
3440  gc->setValue(true);
3441 
3442  return gc;
3443 }
3444 
3446 {
3447  auto *ge = new HostTextEditSetting("IgnoreDevices");
3448 
3449  ge->setLabel(MainGeneralSettings::tr("Ignore devices"));
3450 
3451  ge->setValue("");
3452 
3453  ge->setHelpText(MainGeneralSettings::tr("If there are any devices that you "
3454  "do not want to be monitored, list "
3455  "them here with commas in-between. "
3456  "The plugins will ignore them. "
3457  "Requires restart."));
3458  return ge;
3459 }
3460 
3462 {
3463  auto *gc = new HostComboBoxSetting("DisplayGroupTitleSort");
3464 
3465  gc->setLabel(PlaybackSettings::tr("Sort titles"));
3466 
3467  gc->addSelection(PlaybackSettings::tr("Alphabetically"),
3468  QString::number(PlaybackBox::TitleSortAlphabetical));
3469  gc->addSelection(PlaybackSettings::tr("By recording priority"),
3470  QString::number(PlaybackBox::TitleSortRecPriority));
3471 
3472  gc->setHelpText(PlaybackSettings::tr("Sets the title sorting order when "
3473  "the view is set to Titles only."));
3474  return gc;
3475 }
3476 
3478 {
3479  auto *gc = new HostCheckBoxSetting("PlaybackWatchList");
3480 
3481  gc->setLabel(WatchListSettings::tr("Include the 'Watch List' group"));
3482 
3483  gc->setValue(true);
3484 
3485  gc->setHelpText(WatchListSettings::tr("The 'Watch List' is an abbreviated "
3486  "list of recordings sorted to "
3487  "highlight series and shows that "
3488  "need attention in order to keep up "
3489  "to date."));
3490  return gc;
3491 }
3492 
3494 {
3495  auto *gc = new HostCheckBoxSetting("PlaybackWLStart");
3496 
3497  gc->setLabel(WatchListSettings::tr("Start from the Watch List view"));
3498 
3499  gc->setValue(false);
3500 
3501  gc->setHelpText(WatchListSettings::tr("If enabled, the 'Watch List' will "
3502  "be the initial view each time you "
3503  "enter the Watch Recordings screen"));
3504  return gc;
3505 }
3506 
3508 {
3509  auto *gc = new HostCheckBoxSetting("PlaybackWLAutoExpire");
3510 
3511  gc->setLabel(WatchListSettings::tr("Exclude recordings not set for "
3512  "Auto-Expire"));
3513 
3514  gc->setValue(false);
3515 
3516  gc->setHelpText(WatchListSettings::tr("Set this if you turn off "
3517  "Auto-Expire only for recordings "
3518  "that you've seen and intend to "
3519  "keep. This option will exclude "
3520  "these recordings from the "
3521  "'Watch List'."));
3522  return gc;
3523 }
3524 
3526 {
3527  auto *gs = new HostSpinBoxSetting("PlaybackWLMaxAge", 30, 180, 10);
3528 
3529  gs->setLabel(WatchListSettings::tr("Maximum days counted in the score"));
3530 
3531  gs->setValue(60);
3532 
3533  gs->setHelpText(WatchListSettings::tr("The 'Watch List' scores are based "
3534  "on 1 point equals one day since "
3535  "recording. This option limits the "
3536  "maximum score due to age and "
3537  "affects other weighting factors."));
3538  return gs;
3539 }
3540 
3542 {
3543  auto *gs = new HostSpinBoxSetting("PlaybackWLBlackOut", 0, 5, 1);
3544 
3545  gs->setLabel(WatchListSettings::tr("Days to exclude weekly episodes after "
3546  "delete"));
3547 
3548  gs->setValue(2);
3549 
3550  gs->setHelpText(WatchListSettings::tr("When an episode is deleted or "
3551  "marked as watched, other episodes "
3552  "of the series are excluded from the "
3553  "'Watch List' for this interval of "
3554  "time. Daily shows also have a "
3555  "smaller interval based on this "
3556  "setting."));
3557  return gs;
3558 }
3559 
3561 {
3562  auto *gc = new HostCheckBoxSetting("MonitorDrives");
3563 
3564  gc->setLabel(MainGeneralSettings::tr("Media Monitor"));
3565 
3566  gc->setHelpText(MainGeneralSettings::tr("This enables support for "
3567  "monitoring your CD/DVD drives for "
3568  "new disks and launching the "
3569  "proper plugin to handle them. "
3570  "Requires restart."));
3571 
3572  gc->setValue(false);
3573 
3574  gc->addTargetedChild("1", IgnoreMedia());
3575 
3576  return gc;
3577 }
3578 
3580 {
3581  auto *gc = new HostCheckBoxSetting("LCDShowTime");
3582 
3583  gc->setLabel(LcdSettings::tr("Display time"));
3584 
3585  gc->setHelpText(LcdSettings::tr("Display current time on idle LCD "
3586  "display."));
3587 
3588  gc->setValue(true);
3589 
3590  return gc;
3591 }
3592 
3594 {
3595  auto *gc = new HostCheckBoxSetting("LCDShowRecStatus");
3596 
3597  gc->setLabel(LcdSettings::tr("Display recording status"));
3598 
3599  gc->setHelpText(LcdSettings::tr("Display current recordings information "
3600  "on LCD display."));
3601 
3602  gc->setValue(false);
3603 
3604  return gc;
3605 }
3606 
3608 {
3609  auto *gc = new HostCheckBoxSetting("LCDShowMenu");
3610 
3611  gc->setLabel(LcdSettings::tr("Display menus"));
3612 
3613  gc->setHelpText(LcdSettings::tr("Display selected menu on LCD display. "));
3614 
3615  gc->setValue(true);
3616 
3617  return gc;
3618 }
3619 
3621 {
3622  auto *gs = new HostSpinBoxSetting("LCDPopupTime", 1, 300, 1, 1);
3623 
3624  gs->setLabel(LcdSettings::tr("Menu pop-up time"));
3625 
3626  gs->setHelpText(LcdSettings::tr("How many seconds the menu will remain "
3627  "visible after navigation."));
3628 
3629  gs->setValue(5);
3630 
3631  return gs;
3632 }
3633 
3635 {
3636  auto *gc = new HostCheckBoxSetting("LCDShowMusic");
3637 
3638  gc->setLabel(LcdSettings::tr("Display music artist and title"));
3639 
3640  gc->setHelpText(LcdSettings::tr("Display playing artist and song title in "
3641  "MythMusic on LCD display."));
3642 
3643  gc->setValue(true);
3644 
3645  return gc;
3646 }
3647 
3649 {
3650  auto *gc = new HostComboBoxSetting("LCDShowMusicItems");
3651 
3652  gc->setLabel(LcdSettings::tr("Items"));
3653 
3654  gc->addSelection(LcdSettings::tr("Artist - Title"), "ArtistTitle");
3655  gc->addSelection(LcdSettings::tr("Artist [Album] Title"),
3656  "ArtistAlbumTitle");
3657 
3658  gc->setHelpText(LcdSettings::tr("Which items to show when playing music."));
3659 
3660  return gc;
3661 }
3662 
3664 {
3665  auto *gc = new HostCheckBoxSetting("LCDShowChannel");
3666 
3667  gc->setLabel(LcdSettings::tr("Display channel information"));
3668 
3669  gc->setHelpText(LcdSettings::tr("Display tuned channel information on LCD "
3670  "display."));
3671 
3672  gc->setValue(true);
3673 
3674  return gc;
3675 }
3676 
3678 {
3679  auto *gc = new HostCheckBoxSetting("LCDShowVolume");
3680 
3681  gc->setLabel(LcdSettings::tr("Display volume information"));
3682 
3683  gc->setHelpText(LcdSettings::tr("Display volume level information "
3684  "on LCD display."));
3685 
3686  gc->setValue(true);
3687 
3688  return gc;
3689 }
3690 
3692 {
3693  auto *gc = new HostCheckBoxSetting("LCDShowGeneric");
3694 
3695  gc->setLabel(LcdSettings::tr("Display generic information"));
3696 
3697  gc->setHelpText(LcdSettings::tr("Display generic information on LCD display."));
3698 
3699  gc->setValue(true);
3700 
3701  return gc;
3702 }
3703 
3705 {
3706  auto *gc = new HostCheckBoxSetting("LCDBacklightOn");
3707 
3708  gc->setLabel(LcdSettings::tr("Backlight always on"));
3709 
3710  gc->setHelpText(LcdSettings::tr("Turn on the backlight permanently on the "
3711  "LCD display."));
3712  gc->setValue(true);
3713 
3714  return gc;
3715 }
3716 
3718 {
3719  auto *gc = new HostCheckBoxSetting("LCDHeartBeatOn");
3720 
3721  gc->setLabel(LcdSettings::tr("Heartbeat always on"));
3722 
3723  gc->setHelpText(LcdSettings::tr("Turn on the LCD heartbeat."));
3724 
3725  gc->setValue(false);
3726 
3727  return gc;
3728 }
3729 
3731 {
3732  auto *gc = new HostCheckBoxSetting("LCDBigClock");
3733 
3734  gc->setLabel(LcdSettings::tr("Display large clock"));
3735 
3736  gc->setHelpText(LcdSettings::tr("On multiline displays try and display the "
3737  "time as large as possible."));
3738 
3739  gc->setValue(false);
3740 
3741  return gc;
3742 }
3743 
3745 {
3746  auto *ge = new HostTextEditSetting("LCDKeyString");
3747 
3748  ge->setLabel(LcdSettings::tr("LCD key order"));
3749 
3750  ge->setValue("ABCDEF");
3751 
3752  ge->setHelpText(
3753  LcdSettings::tr("Enter the 6 Keypad Return Codes for your LCD keypad "
3754  "in the order in which you want the functions "
3755  "up/down/left/right/yes/no to operate. (See "
3756  "lcdproc/server/drivers/hd44780.c/keyMapMatrix[] "
3757  "or the matrix for your display)"));
3758  return ge;
3759 }
3760 
3762 {
3763  auto *gc = new HostCheckBoxSetting("LCDEnable");
3764 
3765  gc->setLabel(LcdSettings::tr("Enable LCD device"));
3766 
3767  gc->setHelpText(LcdSettings::tr("Use an LCD display to view MythTV status "
3768  "information."));
3769 
3770  gc->setValue(false);
3771  gc->addTargetedChild("1", LCDShowTime());
3772  gc->addTargetedChild("1", LCDShowMenu());
3773  gc->addTargetedChild("1", LCDShowMusic());
3774  gc->addTargetedChild("1", LCDShowMusicItems());
3775  gc->addTargetedChild("1", LCDShowChannel());
3776  gc->addTargetedChild("1", LCDShowRecStatus());
3777  gc->addTargetedChild("1", LCDShowVolume());
3778  gc->addTargetedChild("1", LCDShowGeneric());
3779  gc->addTargetedChild("1", LCDBacklightOn());
3780  gc->addTargetedChild("1", LCDHeartBeatOn());
3781  gc->addTargetedChild("1", LCDBigClock());
3782  gc->addTargetedChild("1", LCDKeyString());
3783  gc->addTargetedChild("1", LCDPopupTime());
3784  return gc;
3785 }
3786 
3787 
3788 #ifdef Q_OS_DARWIN
3789 static HostCheckBoxSetting *MacGammaCorrect()
3790 {
3791  HostCheckBoxSetting *gc = new HostCheckBoxSetting("MacGammaCorrect");
3792 
3793  gc->setLabel(PlaybackSettings::tr("Enable gamma correction for video"));
3794 
3795  gc->setValue(false);
3796 
3797  gc->setHelpText(PlaybackSettings::tr("If enabled, QuickTime will correct "
3798  "the gamma of the video to match "
3799  "your monitor. Turning this off can "
3800  "save some CPU cycles."));
3801  return gc;
3802 }
3803 
3804 static HostCheckBoxSetting *MacScaleUp()
3805 {
3806  HostCheckBoxSetting *gc = new HostCheckBoxSetting("MacScaleUp");
3807 
3808  gc->setLabel(PlaybackSettings::tr("Scale video as necessary"));
3809 
3810  gc->setValue(true);
3811 
3812  gc->setHelpText(PlaybackSettings::tr("If enabled, video will be scaled to "
3813  "fit your window or screen. If "
3814  "unchecked, video will never be made "
3815  "larger than its actual pixel size."));
3816  return gc;
3817 }
3818 
3819 static HostSpinBoxSetting *MacFullSkip()
3820 {
3821  HostSpinBoxSetting *gs = new HostSpinBoxSetting("MacFullSkip", 0, 30, 1, true);
3822 
3823  gs->setLabel(PlaybackSettings::tr("Frames to skip in fullscreen mode"));
3824 
3825  gs->setValue(0);
3826 
3827  gs->setHelpText(PlaybackSettings::tr("Video displayed in fullscreen or "
3828  "non-windowed mode will skip this "
3829  "many frames for each frame drawn. "
3830  "Set to 0 to show every frame. Only "
3831  "valid when either \"Use GUI size for "
3832  "TV playback\" or \"Run the frontend "
3833  "in a window\" is not checked."));
3834  return gs;
3835 }
3836 
3837 static HostCheckBoxSetting *MacMainEnabled()
3838 {
3839  HostCheckBoxSetting *gc = new HostCheckBoxSetting("MacMainEnabled");
3840 
3841  gc->setLabel(MacMainSettings::tr("Video in main window"));
3842 
3843  gc->setValue(true);
3844 
3845  gc->setHelpText(MacMainSettings::tr("If enabled, video will be displayed "
3846  "in the main GUI window. Disable this "
3847  "when you only want video on the "
3848  "desktop or in a floating window. Only "
3849  "valid when \"Use GUI size for TV "
3850  "playback\" and \"Run the frontend in "
3851  "a window\" are checked."));
3852  return gc;
3853 }
3854 
3855 static HostSpinBoxSetting *MacMainSkip()
3856 {
3857  HostSpinBoxSetting *gs = new HostSpinBoxSetting("MacMainSkip", 0, 30, 1, true);
3858 
3859  gs->setLabel(MacMainSettings::tr("Frames to skip"));
3860 
3861  gs->setValue(0);
3862 
3863  gs->setHelpText(MacMainSettings::tr("Video in the main window will skip "
3864  "this many frames for each frame "
3865  "drawn. Set to 0 to show every "
3866  "frame."));
3867  return gs;
3868 }
3869 
3870 static HostSpinBoxSetting *MacMainOpacity()
3871 {
3872  HostSpinBoxSetting *gs = new HostSpinBoxSetting("MacMainOpacity", 0, 100, 5, false);
3873 
3874  gs->setLabel(MacMainSettings::tr("Opacity"));
3875 
3876  gs->setValue(100);
3877 
3878  gs->setHelpText(MacMainSettings::tr("The opacity of the main window. Set "
3879  "to 100 for completely opaque, set "
3880  "to 0 for completely transparent."));
3881  return gs;
3882 }
3883 
3884 static HostCheckBoxSetting *MacFloatEnabled()
3885 {
3886  HostCheckBoxSetting *gc = new HostCheckBoxSetting("MacFloatEnabled");
3887 
3888  gc->setLabel(MacFloatSettings::tr("Video in floating window"));
3889 
3890  gc->setValue(false);
3891 
3892  gc->setHelpText(MacFloatSettings::tr("If enabled, video will be displayed "
3893  "in a floating window. Only valid "
3894  "when \"Use GUI size for TV "
3895  "playback\" and \"Run the frontend "
3896  "in a window\" are checked."));
3897  return gc;
3898 }
3899 
3900 static HostSpinBoxSetting *MacFloatSkip()
3901 {
3902  HostSpinBoxSetting *gs = new HostSpinBoxSetting("MacFloatSkip", 0, 30, 1, true);
3903 
3904  gs->setLabel(MacFloatSettings::tr("Frames to skip"));
3905 
3906  gs->setValue(0);
3907 
3908  gs->setHelpText(MacFloatSettings::tr("Video in the floating window will "
3909  "skip this many frames for each "
3910  "frame drawn. Set to 0 to show "
3911  "every frame."));
3912  return gs;
3913 }
3914 
3915 static HostSpinBoxSetting *MacFloatOpacity()
3916 {
3917  HostSpinBoxSetting *gs = new HostSpinBoxSetting("MacFloatOpacity", 0, 100, 5, false);
3918 
3919  gs->setLabel(MacFloatSettings::tr("Opacity"));
3920 
3921  gs->setValue(100);
3922 
3923  gs->setHelpText(MacFloatSettings::tr("The opacity of the floating window. "
3924  "Set to 100 for completely opaque, "
3925  "set to 0 for completely "
3926  "transparent."));
3927  return gs;
3928 }
3929 
3930 static HostCheckBoxSetting *MacDockEnabled()
3931 {
3932  HostCheckBoxSetting *gc = new HostCheckBoxSetting("MacDockEnabled");
3933 
3934  gc->setLabel(MacDockSettings::tr("Video in the dock"));
3935 
3936  gc->setValue(true);
3937 
3938  gc->setHelpText(MacDockSettings::tr("If enabled, video will be displayed "
3939  "in the application's dock icon. Only "
3940  "valid when \"Use GUI size for TV "
3941  "playback\" and \"Run the frontend in "
3942  "a window\" are checked."));
3943  return gc;
3944 }
3945 
3946 static HostSpinBoxSetting *MacDockSkip()
3947 {
3948  HostSpinBoxSetting *gs = new HostSpinBoxSetting("MacDockSkip", 0, 30, 1, true);
3949 
3950  gs->setLabel(MacDockSettings::tr("Frames to skip"));
3951 
3952  gs->setValue(3);
3953 
3954  gs->setHelpText(MacDockSettings::tr("Video in the dock icon will skip this "
3955  "many frames for each frame drawn. Set "
3956  "to 0 to show every frame."));
3957  return gs;
3958 }
3959 
3960 static HostCheckBoxSetting *MacDesktopEnabled()
3961 {
3962  HostCheckBoxSetting *gc = new HostCheckBoxSetting("MacDesktopEnabled");
3963 
3964  gc->setLabel(MacDesktopSettings::tr("Video on the desktop"));
3965 
3966  gc->setValue(false);
3967 
3968  gc->setHelpText(MacDesktopSettings::tr("If enabled, video will be "
3969  "displayed on the desktop, "
3970  "behind the Finder icons. "
3971  "Only valid when \"Use GUI "
3972  "size for TV playback\" and "
3973  "\"Run the frontend in a "
3974  "window\" are checked."));
3975  return gc;
3976 }
3977 
3978 static HostSpinBoxSetting *MacDesktopSkip()
3979 {
3980  HostSpinBoxSetting *gs = new HostSpinBoxSetting("MacDesktopSkip", 0, 30, 1, true);
3981 
3982  gs->setLabel(MacDesktopSettings::tr("Frames to skip"));
3983 
3984  gs->setValue(0);
3985 
3986  gs->setHelpText(MacDesktopSettings::tr("Video on the desktop will skip "
3987  "this many frames for each frame "
3988  "drawn. Set to 0 to show every "
3989  "frame."));
3990  return gs;
3991 }
3992 #endif
3993 
3994 
3996 {
3997  public:
3999 
4000  private slots:
4001  void childChanged(StandardSetting* /*unused*/) override;
4002 
4003  private:
4009 };
4010 
4012 {
4013  setLabel(MainGeneralSettings::tr("Shutdown/Reboot Settings"));
4014  auto *power = MythPower::AcquireRelease(this, true);
4017 #ifndef Q_OS_ANDROID
4021 #endif
4023  if (power)
4024  MythPower::AcquireRelease(this, false);
4025  connect(m_overrideExitMenu, qOverload<StandardSetting *>(&StandardSetting::valueChanged),
4027 }
4028 
4030 {
4032  return;
4033 
4034  bool confirmold = m_confirmCommand->isVisible();
4035  bool haltold = m_haltCommand->isVisible();
4036  bool rebootold = m_rebootCommand->isVisible();
4037  bool suspendold = m_suspendCommand->isVisible();
4038 
4039  switch (m_overrideExitMenu->getValue().toInt())
4040  {
4041  case 2:
4042  case 4:
4043  m_haltCommand->setVisible(true);
4044  m_rebootCommand->setVisible(false);
4045  m_suspendCommand->setVisible(false);
4047  break;
4048  case 3:
4049  case 6:
4050  m_haltCommand->setVisible(true);
4051  m_rebootCommand->setVisible(true);
4052  m_suspendCommand->setVisible(false);
4054  break;
4055  case 5:
4056  m_haltCommand->setVisible(false);
4057  m_rebootCommand->setVisible(true);
4058  m_suspendCommand->setVisible(false);
4060  break;
4061  case 8:
4062  case 9:
4063  m_haltCommand->setVisible(false);
4064  m_rebootCommand->setVisible(false);
4067  break;
4068  case 10:
4069  m_haltCommand->setVisible(true);
4070  m_rebootCommand->setVisible(true);
4073  break;
4074  case 0:
4075  case 1:
4076  default:
4077  m_haltCommand->setVisible(false);
4078  m_rebootCommand->setVisible(false);
4079  m_suspendCommand->setVisible(false);
4080  m_confirmCommand->setVisible(false);
4081  break;
4082  }
4083 
4084  if (confirmold != m_confirmCommand->isVisible() ||
4085  haltold != m_haltCommand->isVisible() ||
4086  rebootold != m_rebootCommand->isVisible() ||
4087  suspendold != m_suspendCommand->isVisible())
4088  {
4089  emit settingsChanged();
4090  }
4091 }
4092 
4094 {
4095 // DatabaseSettings::addDatabaseSettings(this);
4096  setLabel(tr("Main Settings"));
4097 
4098  addChild(new DatabaseSettings());
4099 
4100  auto *pin = new GroupSetting();
4101  pin->setLabel(tr("Settings Access"));
4102  pin->addChild(SetupPinCode());
4103  addChild(pin);
4104 
4105  auto *general = new GroupSetting();
4106  general->setLabel(tr("General"));
4107  general->addChild(UseVirtualKeyboard());
4108  general->addChild(ScreenShotPath());
4109 
4110  auto sh = getMythSortHelper();
4111  if (sh->hasPrefixes()) {
4112 #if 0
4113  // Last minute change. QStringRef::localeAwareCompare appears to
4114  // always do case insensitive sorting, so there's no point in
4115  // presenting this option to a user.
4116  general->addChild(SortCaseSensitive());
4117 #endif
4118  auto *stripPrefixes = SortStripPrefixes();
4119  general->addChild(stripPrefixes);
4120  stripPrefixes->addTargetedChild("1", SortPrefixExceptions());
4121  }
4122  addChild(general);
4123 
4125 
4127 
4128  auto *remotecontrol = new GroupSetting();
4129  remotecontrol->setLabel(tr("Remote Control"));
4130  remotecontrol->addChild(LircDaemonDevice());
4131  remotecontrol->addChild(NetworkControlEnabled());
4132  remotecontrol->addChild(NetworkControlPort());
4133  remotecontrol->addChild(UDPNotifyPort());
4134 #ifdef USING_LIBCEC
4135  HostCheckBoxSetting *cec = CECEnabled();
4136  remotecontrol->addChild(cec);
4137  m_cecPowerOnTVAllowed = CECPowerOnTVAllowed();
4138  m_cecPowerOffTVAllowed = CECPowerOffTVAllowed();
4139  m_cecPowerOnTVOnStart = CECPowerOnTVOnStart();
4140  m_cecPowerOffTVOnExit = CECPowerOffTVOnExit();
4141  cec->addTargetedChild("1",m_cecPowerOnTVAllowed);
4142  cec->addTargetedChild("1",m_cecPowerOffTVAllowed);
4143  cec->addTargetedChild("1",m_cecPowerOnTVOnStart);
4144  cec->addTargetedChild("1",m_cecPowerOffTVOnExit);
4145  connect(m_cecPowerOnTVAllowed, &MythUICheckBoxSetting::valueChanged,
4146  this, &MainGeneralSettings::cecChanged);
4147  connect(m_cecPowerOffTVAllowed, &MythUICheckBoxSetting::valueChanged,
4148  this, &MainGeneralSettings::cecChanged);
4149 #endif // USING_LIBCEC
4150  addChild(remotecontrol);
4151 
4152 #ifdef USING_AIRPLAY
4153  auto *airplay = new GroupSetting();
4154  airplay->setLabel(tr("AirPlay Settings"));
4155  airplay->addChild(AirPlayEnabled());
4156  airplay->addChild(AirPlayFullScreen());
4157  airplay->addChild(AirPlayAudioOnly());
4158  airplay->addChild(AirPlayPasswordSettings());
4159 // airplay->addChild(AirPlayInfo());
4160 // airplay->addChild(AirPlayRSAInfo());
4161  addChild(airplay);
4162 #endif
4163 }
4164 
4165 #ifdef USING_LIBCEC
4166 void MainGeneralSettings::cecChanged(bool /*setting*/)
4167 {
4168  if (m_cecPowerOnTVAllowed->boolValue())
4169  m_cecPowerOnTVOnStart->setEnabled(true);
4170  else
4171  {
4172  m_cecPowerOnTVOnStart->setEnabled(false);
4173  m_cecPowerOnTVOnStart->setValue(false);
4174  }
4175 
4176  if (m_cecPowerOffTVAllowed->boolValue())
4177  m_cecPowerOffTVOnExit->setEnabled(true);
4178  else
4179  {
4180  m_cecPowerOffTVOnExit->setEnabled(false);
4181  m_cecPowerOffTVOnExit->setValue(false);
4182  }
4183 }
4184 #endif // USING_LIBCEC
4185 
4187 {
4188  QStringList strlist( QString("REFRESH_BACKEND") );
4190  LOG(VB_GENERAL, LOG_ERR, QString("%1 called").arg(__FUNCTION__));
4192 }
4193 
4194 
4196 {
4197  public:
4198  PlayBackScaling();
4199  void updateButton(MythUIButtonListItem *item) override; // GroupSetting
4200 
4201  private slots:
4202  void childChanged(StandardSetting * /*setting*/) override; // StandardSetting
4203 
4204  private:
4209 };
4210 
4212 {
4213  setLabel(PlaybackSettings::tr("Scaling"));
4218  connect(m_vertScan, qOverload<StandardSetting *>(&StandardSetting::valueChanged),
4220  connect(m_yScan, qOverload<StandardSetting *>(&StandardSetting::valueChanged),
4222  connect(m_horizScan, qOverload<StandardSetting *>(&StandardSetting::valueChanged),
4224  connect(m_xScan, qOverload<StandardSetting *>(&StandardSetting::valueChanged),
4226 }
4227 
4228 
4230 {
4232  if (m_vertScan->getValue() == "0" &&
4233  m_horizScan->getValue() == "0" &&
4234  m_yScan->getValue() == "0" &&
4235  m_xScan->getValue() == "0")
4236  {
4237  item->SetText(PlaybackSettings::tr("No scaling"), "value");
4238  }
4239  else
4240  {
4241  item->SetText(QString("%1%x%2%+%3%+%4%")
4242  .arg(m_horizScan->getValue(),
4243  m_vertScan->getValue(),
4244  m_xScan->getValue(),
4245  m_yScan->getValue()),
4246  "value");
4247  }
4248 }
4249 
4251 {
4252  emit ShouldRedraw(this);
4253 }
4254 
4256  : StandardSettingDialog(stack, "playbacksettings", new PlaybackSettings())
4257 {
4258 }
4259 
4261 {
4263  if (item)
4264  {
4265  auto *config = item->GetData().value<PlaybackProfileItemConfig*>();
4266  if (config)
4268  }
4269 }
4270 
4271 
4273 {
4274  auto *menu = new MythMenu(tr("Playback Profile Menu"), this, "mainmenu");
4275 
4276  if (m_buttonList->GetItemPos(item) > 2)
4277  menu->AddItem(tr("Move Up"), &PlaybackSettingsDialog::MoveProfileItemUp);
4278  if (m_buttonList->GetItemPos(item) + 1 < m_buttonList->GetCount())
4279  menu->AddItem(tr("Move Down"), &PlaybackSettingsDialog::MoveProfileItemDown);
4280 
4281  menu->AddItem(tr("Delete"), &PlaybackSettingsDialog::DeleteProfileItem);
4282 
4283  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
4284 
4285  auto *menuPopup = new MythDialogBox(menu, popupStack, "menudialog");
4286  menuPopup->SetReturnEvent(this, "mainmenu");
4287 
4288  if (menuPopup->Create())
4289  popupStack->AddScreen(menuPopup);
4290  else
4291  delete menuPopup;
4292 }
4293 
4295 {
4297  if (item)
4298  {
4299  auto *config = item->GetData().value<PlaybackProfileItemConfig*>();
4300  if (config)
4301  {
4302  const int currentPos = m_buttonList->GetCurrentPos();
4303 
4304  config->DecreasePriority();
4305 
4306  m_buttonList->SetItemCurrent(currentPos + 1);
4307  }
4308  }
4309 }
4310 
4312 {
4314  if (item)
4315  {
4316  auto *config = item->GetData().value<PlaybackProfileItemConfig*>();
4317  if (config)
4318  {
4319  const int currentPos = m_buttonList->GetCurrentPos();
4320 
4321  config->IncreasePriority();
4322 
4323  m_buttonList->SetItemCurrent(currentPos - 1);
4324  }
4325  }
4326 }
4327 
4329 {
4330  auto *config = m_buttonList->GetDataValue().value<PlaybackProfileItemConfig*>();
4331  if (config)
4332  config->ShowDeleteDialog();
4333 }
4334 
4336 {
4337  setLabel(tr("Playback settings"));
4338 }
4339 
4341 {
4342  auto *general = new GroupSetting();
4343  general->setLabel(tr("General Playback"));
4344  general->addChild(JumpToProgramOSD());
4345  general->addChild(UseProgStartMark());
4346  general->addChild(AutomaticSetWatched());
4347  general->addChild(ContinueEmbeddedTVPlay());
4348  general->addChild(LiveTVIdleTimeout());
4349 
4350  general->addChild(FFmpegDemuxer());
4351 
4352  general->addChild(new PlayBackScaling());
4353  general->addChild(StereoDiscard());
4354  general->addChild(AspectOverride());
4355  general->addChild(AdjustFill());
4356 
4357  general->addChild(LetterboxingColour());
4358  general->addChild(PlaybackExitPrompt());
4359  general->addChild(EndOfRecordingExitPrompt());
4360  general->addChild(MusicChoiceEnabled());
4361  addChild(general);
4362 
4363  auto *advanced = new GroupSetting();
4364  advanced->setLabel(tr("Advanced Playback Settings"));
4365  advanced->addChild(RealtimePriority());
4366  advanced->addChild(AudioReadAhead());
4367  advanced->addChild(ColourPrimaries());
4368  advanced->addChild(ChromaUpsampling());
4369 #ifdef USING_VAAPI
4370  advanced->addChild(VAAPIDevice());
4371 #endif
4372 
4373  addChild(advanced);
4374 
4377 
4379  new ButtonStandardSetting(tr("Add a new playback profile"));
4383 
4384  auto *pbox = new GroupSetting();
4385  pbox->setLabel(tr("View Recordings"));
4386  pbox->addChild(PlayBoxOrdering());
4387  pbox->addChild(PlayBoxEpisodeSort());
4388  // Disabled until we re-enable live previews
4389  // pbox->addChild(PlaybackPreview());
4390  // pbox->addChild(HWAccelPlaybackPreview());
4391  pbox->addChild(PBBStartInTitle());
4392 
4393  auto *pbox2 = new GroupSetting();
4394  pbox2->setLabel(tr("Recording Groups"));
4395  pbox2->addChild(DisplayRecGroup());
4396  pbox2->addChild(QueryInitialFilter());
4397  pbox2->addChild(RememberRecGroup());
4398  pbox2->addChild(RecGroupMod());
4399 
4400  pbox->addChild(pbox2);
4401 
4402  pbox->addChild(DisplayGroupTitleSort());
4403 
4404  StandardSetting *playbackWatchList = PlaybackWatchList();
4405  playbackWatchList->addTargetedChild("1", PlaybackWLStart());
4406  playbackWatchList->addTargetedChild("1", PlaybackWLAutoExpire());
4407  playbackWatchList->addTargetedChild("1", PlaybackWLMaxAge());
4408  playbackWatchList->addTargetedChild("1", PlaybackWLBlackOut());
4409  pbox->addChild(playbackWatchList);
4410  addChild(pbox);
4411 
4412  auto *seek = new GroupSetting();
4413  seek->setLabel(tr("Seeking"));
4414  seek->addChild(SmartForward());
4415  seek->addChild(FFRewReposTime());
4416  seek->addChild(FFRewReverse());
4417 
4418  addChild(seek);
4419 
4420  auto *comms = new GroupSetting();
4421  comms->setLabel(tr("Commercial Skip"));
4422  comms->addChild(AutoCommercialSkip());
4423  comms->addChild(CommRewindAmount());
4424  comms->addChild(CommNotifyAmount());
4425  comms->addChild(MaximumCommercialSkip());
4426  comms->addChild(MergeShortCommBreaks());
4427 
4428  addChild(comms);
4429 
4430 #ifdef Q_OS_DARWIN
4431  GroupSetting* mac = new GroupSetting();
4432  mac->setLabel(tr("Mac OS X Video Settings"));
4433  mac->addChild(MacGammaCorrect());
4434  mac->addChild(MacScaleUp());
4435  mac->addChild(MacFullSkip());
4436 
4437  StandardSetting *floatEnabled = MacFloatEnabled();
4438  floatEnabled->addTargetedChild("1", MacFloatSkip());
4439  floatEnabled->addTargetedChild("1", MacFloatOpacity());
4440  mac->addChild(floatEnabled);
4441 
4442  StandardSetting *macMainEnabled = MacMainEnabled();
4443  macMainEnabled->addTargetedChild("1", MacMainSkip());
4444  macMainEnabled->addTargetedChild("1", MacMainOpacity());
4445  mac->addChild(macMainEnabled);
4446 
4447  StandardSetting *dockEnabled = MacDockEnabled();
4448  dockEnabled->addTargetedChild("1", MacDockSkip());
4449  mac->addChild(dockEnabled);
4450 
4451  StandardSetting* desktopEnabled = MacDesktopEnabled();
4452  desktopEnabled->addTargetedChild("1", MacDesktopSkip());
4453  mac->addChild(desktopEnabled);
4454 
4455  addChild(mac);
4456 #endif
4457 
4459 }
4460 
4462 {
4463  setLabel(tr("On-screen Display"));
4464 
4465  addChild(EnableMHEG());
4467  addChild(Visualiser());
4472 
4473  //GroupSetting *cc = new GroupSetting();
4474  //cc->setLabel(tr("Closed Captions"));
4475  //cc->addChild(DecodeVBIFormat());
4476  //addChild(cc);
4477 
4478 #ifdef Q_OS_MACOS
4479  // Any Mac OS-specific OSD stuff would go here.
4480 #endif
4481 }
4482 
4484 {
4485  setLabel(tr("General (Basic)"));
4486  auto *general = new GroupSetting();
4487  general->setLabel(tr("General (Basic)"));
4488  general->addChild(ChannelOrdering());
4489  general->addChild(ChannelFormat());
4490  general->addChild(LongChannelFormat());
4491 
4492  addChild(general);
4493 
4494  auto *autoexp = new GroupSetting();
4495 
4496  autoexp->setLabel(tr("General (Auto-Expire)"));
4497 
4498  autoexp->addChild(AutoExpireMethod());
4499 
4500  autoexp->addChild(RerecordWatched());
4501  autoexp->addChild(AutoExpireWatchedPriority());
4502 
4503  autoexp->addChild(AutoExpireLiveTVMaxAge());
4504  autoexp->addChild(AutoExpireDayPriority());
4505  autoexp->addChild(AutoExpireExtraSpace());
4506 
4507 // autoexp->addChild(new DeletedExpireOptions());
4508  autoexp->addChild(DeletedMaxAge());
4509 
4510  addChild(autoexp);
4511 
4512  auto *jobs = new GroupSetting();
4513 
4514  jobs->setLabel(tr("General (Jobs)"));
4515 
4516  jobs->addChild(CommercialSkipMethod());
4517  jobs->addChild(CommFlagFast());
4518  jobs->addChild(AggressiveCommDetect());
4519  jobs->addChild(DeferAutoTranscodeDays());
4520 
4521  addChild(jobs);
4522 
4523  auto *general2 = new GroupSetting();
4524 
4525  general2->setLabel(tr("General (Advanced)"));
4526 
4527  general2->addChild(RecordPreRoll());
4528  general2->addChild(RecordOverTime());
4529  general2->addChild(MaxStartGap());
4530  general2->addChild(MaxEndGap());
4531  general2->addChild(MinimumRecordingQuality());
4532  general2->addChild(CategoryOverTimeSettings());
4533  addChild(general2);
4534 
4535  auto *changrp = new GroupSetting();
4536 
4537  changrp->setLabel(tr("General (Channel Groups)"));
4538 
4539  changrp->addChild(ChannelGroupRememberLast());
4540  changrp->addChild(ChannelGroupDefault());
4541  changrp->addChild(BrowseChannelGroup());
4542 
4543  addChild(changrp);
4544 }
4545 
4547 {
4548  setLabel(tr("Program Guide"));
4549 
4552 }
4553 
4555 {
4556  auto *sched = new GroupSetting();
4557 
4558  sched->setLabel(tr("Scheduler Options"));
4559 
4560  sched->addChild(GRSchedOpenEnd());
4561  sched->addChild(GRPrefInputRecPriority());
4562  sched->addChild(GRHDTVRecPriority());
4563  sched->addChild(GRWSRecPriority());
4564 
4565  addChild(sched);
4566 
4567  auto *access = new GroupSetting();
4568 
4569  access->setLabel(tr("Accessibility Options"));
4570 
4571  access->addChild(GRSignLangRecPriority());
4572  access->addChild(GROnScrSubRecPriority());
4573  access->addChild(GRCCRecPriority());
4574  access->addChild(GRHardHearRecPriority());
4575  access->addChild(GRAudioDescRecPriority());
4576 
4577  addChild(access);
4578 }
4579 
4581 {
4582  public:
4583  GuiDimension();
4584  //QString getValue() override; // StandardSetting
4585  void updateButton(MythUIButtonListItem *item) override; // GroupSetting
4586 
4587  private slots:
4588  void childChanged(StandardSetting * /*setting*/) override; // StandardSetting
4589  private:
4594 };
4595 
4597 {
4598  setLabel(AppearanceSettings::tr("GUI dimension"));
4599  addChild(m_width = GuiWidth());
4603  connect(m_width, qOverload<StandardSetting *>(&StandardSetting::valueChanged),
4605  connect(m_height, qOverload<StandardSetting *>(&StandardSetting::valueChanged),
4607  connect(m_offsetX, qOverload<StandardSetting *>(&StandardSetting::valueChanged),
4609  connect(m_offsetY, qOverload<StandardSetting *>(&StandardSetting::valueChanged),
4611 }
4612 
4614 {
4616  if ((m_width->getValue() == "0" ||
4617  m_height->getValue() == "0") &&
4618  m_offsetX->getValue() == "0" &&
4619  m_offsetY->getValue() == "0")
4620  {
4621  item->SetText(AppearanceSettings::tr("Fullscreen"), "value");
4622  }
4623  else
4624  {
4625  item->SetText(QString("%1x%2+%3+%4")
4626  .arg(m_width->getValue(),
4627  m_height->getValue(),
4628  m_offsetX->getValue(),
4629  m_offsetY->getValue()),
4630  "value");
4631  }
4632 }
4633 
4635 {
4636  emit ShouldRedraw(this);
4637 }
4638 
4640 {
4641  QCoreApplication::processEvents();
4642  GetMythMainWindow()->JumpTo("Reload Theme");
4643 }
4644 
4646 {
4648  QList screens = QGuiApplication::screens();
4649  for (QScreen *qscreen : qAsConst(screens))
4650  {
4651  QString extra = MythDisplay::GetExtraScreenInfo(qscreen);
4652  m_screen->addSelection(qscreen->name() + extra, qscreen->name());
4653  }
4654  if (Screens > 1)
4655  m_screen->addSelection(AppearanceSettings::tr("All"), QString::number(-1));
4656 }
4657 
4659 {
4660  auto *screen = new GroupSetting();
4661  screen->setLabel(tr("Theme / Screen Settings"));
4662  addChild(screen);
4663 
4664  AddPaintEngine(screen);
4665  screen->addChild(MenuTheme());
4666  screen->addChild(GUIRGBLevels());
4667 
4671  screen->addChild(m_screen);
4672  screen->addChild(m_screenAspect);
4675 
4676  screen->addChild(new GuiDimension());
4677 
4678  screen->addChild(GuiSizeForTV());
4679  screen->addChild(HideMouseCursor());
4681  {
4682  screen->addChild(RunInWindow());
4683  screen->addChild(AlwaysOnTop());
4684  }
4685  screen->addChild(StartupScreenDelay());
4686  screen->addChild(GUIFontZoom());
4687 #ifdef USING_AIRPLAY
4688  screen->addChild(AirPlayFullScreen());
4689 #endif
4690 
4691  MythDisplay* display = GetMythMainWindow()->GetDisplay();
4692  if (display->VideoModesAvailable())
4693  {
4694  std::vector<MythDisplayMode> scr = display->GetVideoModes();
4695  if (!scr.empty())
4697  }
4698 
4699  auto *dates = new GroupSetting();
4700 
4701  dates->setLabel(tr("Localization"));
4702 
4703  dates->addChild(MythLanguage());
4704  dates->addChild(ISO639PreferredLanguage(0));
4705  dates->addChild(ISO639PreferredLanguage(1));
4706  dates->addChild(MythDateFormatCB());
4707  dates->addChild(MythShortDateFormat());
4708  dates->addChild(MythTimeFormat());
4709 
4710  addChild(dates);
4711 
4712  addChild(LCDEnable());
4713 }
4714 
4715 /*******************************************************************************
4716 * Channel Groups *
4717 *******************************************************************************/
4718 
4720 {
4721  public:
4723  const QString &channum, const QString &name);
4724  uint getChannelId() const{return m_channelId;};
4725  private:
4727 
4728 };
4729 
4731  const QString &channum, const QString &channame)
4732  : m_channelId(chanid)
4733 {
4734  setLabel(QString("%1 %2").arg(channum, channame));
4735  setHelpText(ChannelGroupSettings::tr("Select/Unselect channels for this channel group"));
4736 }
4737 
4739  int groupId = -1)
4740  : m_groupId(groupId)
4741 {
4742  setLabel(groupName);//TODO this should be the translated name if Favorite
4743  setValue(groupName);
4745  m_groupName->setLabel(groupName);
4746 }
4747 
4749 {
4750  //Change the name
4751  if ((m_groupName && m_groupName->haveChanged())
4752  || m_groupId == -1)
4753  {
4754  if (m_groupId == -1)//create a new group
4755  {
4756  MSqlQuery query(MSqlQuery::InitCon());
4757  QString newname = m_groupName ? m_groupName->getValue() : "undefined";
4758  QString qstr =
4759  "INSERT INTO channelgroupnames (name) VALUE (:NEWNAME);";
4760  query.prepare(qstr);
4761  query.bindValue(":NEWNAME", newname);
4762 
4763  if (!query.exec())
4764  MythDB::DBError("ChannelGroupSetting::Close", query);
4765  else
4766  {
4767  //update m_groupId
4768  QString qstr2 = "SELECT grpid FROM channelgroupnames "
4769  "WHERE name = :NEWNAME;";
4770  query.prepare(qstr2);
4771  query.bindValue(":NEWNAME", newname);
4772  if (!query.exec())
4773  MythDB::DBError("ChannelGroupSetting::Close", query);
4774  else
4775  if (query.next())
4776  m_groupId = query.value(0).toUInt();
4777  }
4778  }
4779  else
4780  {
4781  MSqlQuery query(MSqlQuery::InitCon());
4782  QString qstr = "UPDATE channelgroupnames set name = :NEWNAME "
4783  " WHERE name = :OLDNAME ;";
4784  query.prepare(qstr);
4785  query.bindValue(":NEWNAME", m_groupName->getValue());
4786  query.bindValue(":OLDNAME", getValue());
4787 
4788  if (!query.exec())
4789  MythDB::DBError("ChannelGroupSetting::Close", query);
4790  else
4791  if (query.next())
4792  m_groupId = query.value(0).toUInt();
4793  }
4794  }
4795 
4796  if (m_groupId == -1)
4797  return;
4798 
4799  QList<StandardSetting *> *children = getSubSettings();
4800  if (!children)
4801  return;
4802 
4803  QList<StandardSetting *>::const_iterator i;
4804  for (i = children->constBegin(); i != children->constEnd(); ++i)
4805  {
4806  if ((*i)->haveChanged())
4807  {
4808  if ((*i) != m_groupName)
4809  {
4810  auto *channel = dynamic_cast<ChannelCheckBoxSetting *>(*i);
4811  if (channel)
4812  {
4813  if (channel->boolValue())
4814  {
4815  ChannelGroup::AddChannel(channel->getChannelId(),
4816  m_groupId);
4817  }
4818  else
4819  {
4820  ChannelGroup::DeleteChannel(channel->getChannelId(),
4821  m_groupId);
4822  }
4823  }
4824  }
4825  }
4826  }
4827 }
4828 
4830 {
4831  clearSettings();
4832  //We can not rename the Favorite group
4833  //if (m_groupId!=1)
4834  //{
4836  m_groupName->setLabel(tr("Group name"));
4837 // if (m_groupId > -1)
4841  //}
4842 
4843  MSqlQuery query(MSqlQuery::InitCon());
4844 
4845  QString qstr =
4846  "SELECT channel.chanid, channum, name, grpid FROM channel "
4847  "LEFT JOIN channelgroup "
4848  "ON (channel.chanid = channelgroup.chanid AND grpid = :GRPID) "
4849  "WHERE deleted IS NULL "
4850  "ORDER BY channum+0; "; //to order by numeric value of channel number
4851 
4852  query.prepare(qstr);
4853 
4854  query.bindValue(":GRPID", m_groupId);
4855 
4856  if (!query.exec() || !query.isActive())
4857  MythDB::DBError("ChannelGroupSetting::Load", query);
4858  else
4859  {
4860  while (query.next())
4861  {
4862  auto *channelCheckBox =
4863  new ChannelCheckBoxSetting(query.value(0).toUInt(),
4864  query.value(1).toString(),
4865  query.value(2).toString());
4866  channelCheckBox->setValue(!query.value(3).isNull());
4867  addChild(channelCheckBox);
4868  }
4869  }
4870 
4872 }
4873 
4875 {
4876  //can not delete new group or Favorite
4877  return (m_groupId > 1);
4878 }
4879 
4881 {
4882  MSqlQuery query(MSqlQuery::InitCon());
4883  // Delete channels from this group
4884  query.prepare("DELETE FROM channelgroup WHERE grpid = :GRPID;");
4885  query.bindValue(":GRPID", m_groupId);
4886  if (!query.exec())
4887  MythDB::DBError("ChannelGroupSetting::deleteEntry", query);
4888 
4889  // Now delete the group from channelgroupnames
4890  query.prepare("DELETE FROM channelgroupnames WHERE grpid = :GRPID;");
4891  query.bindValue(":GRPID", m_groupId);
4892  if (!query.exec())
4893  MythDB::DBError("ChannelGroupSetting::Close", query);
4894 }
4895 
4896 
4898 {
4899  setLabel(tr("Channel Groups"));
4900 }
4901 
4903 {
4904  clearSettings();
4905  auto *newGroup = new ButtonStandardSetting(tr("(Create New Channel Group)"));
4906  connect(newGroup, &ButtonStandardSetting::clicked,
4908  addChild(newGroup);
4909 
4910  addChild(new ChannelGroupSetting(tr("Favorites"), 1));
4911 
4912  MSqlQuery query(MSqlQuery::InitCon());
4913 
4914  QString qstr = "SELECT grpid, name FROM channelgroupnames "
4915  " WHERE grpid <> 1 "
4916  " ORDER BY name ; ";
4917 
4918  query.prepare(qstr);
4919 
4920  if (!query.exec() || !query.isActive())
4921  MythDB::DBError("ChannelGroupsSetting::Load", query);
4922  else
4923  {
4924  while(query.next())
4925  {
4926  addChild(new ChannelGroupSetting(query.value(1).toString(),
4927  query.value(0).toUInt()));
4928  }
4929  }
4930 
4931  //Load all the groups
4933  //TODO select the new one or the edited one
4934  emit settingsChanged(nullptr);
4935 }
4936 
4937 
4939 {
4940  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
4941  auto *settingdialog = new MythTextInputDialog(popupStack,
4942  tr("Enter the name of the new channel group"));
4943 
4944  if (settingdialog->Create())
4945  {
4946  connect(settingdialog, &MythTextInputDialog::haveResult,
4948  popupStack->AddScreen(settingdialog);
4949  }
4950  else
4951  {
4952  delete settingdialog;
4953  }
4954 }
4955 
4956 void ChannelGroupsSetting::CreateNewGroup(const QString& name)
4957 {
4958  auto *button = new ChannelGroupSetting(name,-1);
4959  button->setLabel(name);
4960  button->Load();
4961  addChild(button);
4962  emit settingsChanged(this);
4963 }
4964 
4965 
4966 // vim:set sw=4 ts=4 expandtab:
RunInWindow
static HostCheckBoxSetting * RunInWindow()
Definition: globalsettings.cpp:2596
PlaybackProfileConfig::InitUI
void InitUI(StandardSetting *parent)
Definition: globalsettings.cpp:1232
LCDPopupTime
static HostSpinBoxSetting * LCDPopupTime()
Definition: globalsettings.cpp:3620
MSqlQuery::isActive
bool isActive(void) const
Definition: mythdbcon.h:213
LCDBacklightOn
static HostCheckBoxSetting * LCDBacklightOn()
Definition: globalsettings.cpp:3704
globalsettings.h
MSqlQuery::next
bool next(void)
Wrap QSqlQuery::next() so we can display the query results.
Definition: mythdbcon.cpp:806
MSqlQuery
QSqlQuery wrapper that fetches a DB connection from the connection pool.
Definition: mythdbcon.h:125
PlaybackProfileConfig::m_groupId
uint m_groupId
Definition: globalsettings.h:294
MythUIComboBoxSetting::clearSelections
void clearSelections()
Definition: standardsettings.cpp:513
GuiDimension::m_offsetX
StandardSetting * m_offsetX
Definition: globalsettings.cpp:4592
PlaybackWLStart
static HostCheckBoxSetting * PlaybackWLStart()
Definition: globalsettings.cpp:3493
MythVideoProfile::InitStatics
static void InitStatics(bool Reinit=false)
Definition: mythvideoprofile.cpp:1311
PlayBackScaling::m_xScan
StandardSetting * m_xScan
Definition: globalsettings.cpp:4207
MythUIButtonList::GetItemCurrent
MythUIButtonListItem * GetItemCurrent() const
Definition: mythuibuttonlist.cpp:1591
PrimariesRelaxed
@ PrimariesRelaxed
Definition: videoouttypes.h:145
LCDShowMenu
static HostCheckBoxSetting * LCDShowMenu()
Definition: globalsettings.cpp:3607
PlaybackProfileConfig::DeleteProfileItem
void DeleteProfileItem(PlaybackProfileItemConfig *profile)
Definition: globalsettings.cpp:1291
PlayBoxOrdering
static HostComboBoxSetting * PlayBoxOrdering()
Definition: globalsettings.cpp:1417
PlaybackProfileItemConfig::Load
void Load(void) override
Definition: globalsettings.cpp:895
TransMythUICheckBoxSetting
Definition: standardsettings.h:411
SubtitleCodec
static HostComboBoxSetting * SubtitleCodec()
Definition: globalsettings.cpp:1570
MythPower
Definition: mythpower.h:23
MythUICheckBoxSetting::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:734
PlaybackProfileItemConfig::GetIndex
uint GetIndex(void) const
Definition: globalsettings.cpp:890
QueryInitialFilter
static HostCheckBoxSetting * QueryInitialFilter()
Definition: globalsettings.cpp:189
AppearanceSettings::m_display
MythDisplay * m_display
Definition: globalsettings.h:165
SortPrefixExceptions
static GlobalTextEditSetting * SortPrefixExceptions()
Definition: globalsettings.cpp:2928
StandardSetting::getLabel
QString getLabel(void) const
Definition: standardsettings.h:35
MythPower::FeatureSuspend
@ FeatureSuspend
Definition: mythpower.h:43
StandardSetting::setValue
virtual void setValue(const QString &newValue)
Definition: standardsettings.cpp:169
PlaybackSettings::NewPlaybackProfileSlot
void NewPlaybackProfileSlot(void) const
Definition: globalsettings.cpp:1374
LCDKeyString
static HostTextEditSetting * LCDKeyString()
Definition: globalsettings.cpp:3744
MythLanguage
static GlobalComboBoxSetting * MythLanguage()
Definition: globalsettings.cpp:3134
getMythSortHelper
std::shared_ptr< MythSortHelper > getMythSortHelper(void)
Get a pointer to the MythSortHelper singleton.
Definition: mythsorthelper.cpp:133
MythUIThemeHelper::GetThemes
QList< ThemeInfo > GetThemes(ThemeType Type)
Definition: mythuithemehelper.cpp:208
LCDShowGeneric
static HostCheckBoxSetting * LCDShowGeneric()
Definition: globalsettings.cpp:3691
GuiSizeForTV
static HostCheckBoxSetting * GuiSizeForTV()
Definition: globalsettings.cpp:2282
MythVideoProfile::GetProfileGroupID
static uint GetProfileGroupID(const QString &ProfileName, const QString &HostName)
Definition: mythvideoprofile.cpp:907
AggressiveCommDetect
static GlobalCheckBoxSetting * AggressiveCommDetect()
Definition: globalsettings.cpp:337
GRPrefInputRecPriority
static GlobalSpinBoxSetting * GRPrefInputRecPriority()
Definition: globalsettings.cpp:2969
PlaybackSettings::m_playbackProfiles
MythUIComboBoxSetting * m_playbackProfiles
Definition: globalsettings.h:46
PlaybackProfileItemConfig::m_heightRange
TransTextEditSetting * m_heightRange
Definition: globalsettings.h:250
PlaybackProfileItemConfig::m_upscaler
TransMythUIComboBoxSetting * m_upscaler
Definition: globalsettings.h:257
false
VERBOSE_PREAMBLE false
Definition: verbosedefs.h:85
MythVideoProfile::SaveDB
static bool SaveDB(uint GroupId, std::vector< MythVideoProfileItem > &Items)
Definition: mythvideoprofile.cpp:571
MythVideoProfileItem
Definition: mythvideoprofile.h:55
PlaybackProfileConfig::m_addNewEntry
ButtonStandardSetting * m_addNewEntry
Definition: globalsettings.h:297
MythCoreContext::SendReceiveStringList
bool SendReceiveStringList(QStringList &strlist, bool quickTimeout=false, bool block=true)
Send a message to the backend and wait for a response.
Definition: mythcorecontext.cpp:1397
MythVideoProfile::CreateProfiles
static void CreateProfiles(const QString &HostName)
Definition: mythvideoprofile.cpp:1072
MythVideoProfile::GetDeinterlacers
static const QList< QPair< QString, QString > > & GetDeinterlacers()
Definition: mythvideoprofile.cpp:1298
MythVideoProfile::CreateProfileGroup
static uint CreateProfileGroup(const QString &ProfileName, const QString &HostName)
Definition: mythvideoprofile.cpp:1001
MythVideoProfile::DeleteProfileGroup
static bool DeleteProfileGroup(const QString &GroupName, const QString &HostName)
Definition: mythvideoprofile.cpp:1020
TVVidModeForceAspect
static HostComboBoxSetting * TVVidModeForceAspect(int idx=-1)
Definition: globalsettings.cpp:2490
AlwaysOnTop
static HostCheckBoxSetting * AlwaysOnTop()
Definition: globalsettings.cpp:2609
TransMythUIComboBoxSetting
Definition: standardsettings.h:272
TransTextEditSetting
Definition: standardsettings.h:161
PersistentBrowseMode
static HostCheckBoxSetting * PersistentBrowseMode()
Definition: globalsettings.cpp:1712
PREF_LOOP
#define PREF_LOOP
Definition: mythvideoprofile.h:36
StandardSetting::removeTargetedChild
void removeTargetedChild(const QString &value, StandardSetting *child)
Definition: standardsettings.cpp:123
MythVideoProfile::LoadDB
static std::vector< MythVideoProfileItem > LoadDB(uint GroupId)
Definition: mythvideoprofile.cpp:490
StandardSettingDialog::m_buttonList
MythUIButtonList * m_buttonList
Definition: standardsettings.h:497
ShutDownRebootSetting::m_haltCommand
StandardSetting * m_haltCommand
Definition: globalsettings.cpp:4005
DEINT_QUALITY_LOW
#define DEINT_QUALITY_LOW
Definition: mythvideoprofile.h:22
MythVideoProfile::GetVideoRendererHelp
static QString GetVideoRendererHelp(const QString &Renderer)
Definition: mythvideoprofile.cpp:1217
ButtonStandardSetting
Definition: standardsettings.h:450
PlaybackProfileItemConfig::vrenderChanged
void vrenderChanged(const QString &renderer)
Definition: globalsettings.cpp:1069
GuiDimension::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:4613
ChannelOrdering
static HostComboBoxSetting * ChannelOrdering()
Definition: globalsettings.cpp:1587
GRHardHearRecPriority
static GlobalSpinBoxSetting * GRHardHearRecPriority()
Definition: globalsettings.cpp:3072
AutoExpireDayPriority
static GlobalSpinBoxSetting * AutoExpireDayPriority()
Definition: globalsettings.cpp:533
GRSignLangRecPriority
static GlobalSpinBoxSetting * GRSignLangRecPriority()
Definition: globalsettings.cpp:3019
AdjustFill
static HostComboBoxSetting * AdjustFill()
Definition: globalsettings.cpp:2202
HostTextEditSetting
Definition: standardsettings.h:168
dbsettings.h
MergeShortCommBreaks
static GlobalSpinBoxSetting * MergeShortCommBreaks()
Definition: globalsettings.cpp:402
CurrentPlaybackProfile
static HostComboBoxSetting * CurrentPlaybackProfile()
Definition: globalsettings.cpp:1346
PlaybackWLMaxAge
static HostSpinBoxSetting * PlaybackWLMaxAge()
Definition: globalsettings.cpp:3525
GuiVidModeResolution
static HostComboBoxSetting * GuiVidModeResolution()
Definition: globalsettings.cpp:2340
MythMainWindow::JumpTo
void JumpTo(const QString &Destination, bool Pop=true)
Definition: mythmainwindow.cpp:1448
kAdjustFill_Off
@ kAdjustFill_Off
Definition: videoouttypes.h:74
MythTimeFormat
static HostComboBoxSetting * MythTimeFormat()
Definition: globalsettings.cpp:2760
PlaybackSettings
Definition: globalsettings.h:32
kLetterBoxColour_END
@ kLetterBoxColour_END
Definition: videoouttypes.h:91
PlaybackBox::TitleSortAlphabetical
@ TitleSortAlphabetical
Definition: playbackbox.h:83
HideMouseCursor
static HostCheckBoxSetting * HideMouseCursor()
Definition: globalsettings.cpp:2578
TransMythUISpinBoxSetting
Definition: standardsettings.h:353
SetupPinCode
static HostTextEditSetting * SetupPinCode()
Definition: globalsettings.cpp:2101
DEINT_QUALITY_SHADER
#define DEINT_QUALITY_SHADER
Definition: mythvideoprofile.h:25
kLetterBoxColour_Black
@ kLetterBoxColour_Black
Definition: videoouttypes.h:89
LCDShowMusic
static HostCheckBoxSetting * LCDShowMusic()
Definition: globalsettings.cpp:3634
JumpToProgramOSD
static HostCheckBoxSetting * JumpToProgramOSD()
Definition: globalsettings.cpp:1811
RecordPreRoll
static GlobalSpinBoxSetting * RecordPreRoll()
Definition: globalsettings.cpp:596
sched
Scheduler * sched
ChannelGroup::AddChannel
static bool AddChannel(uint chanid, int changrpid)
Definition: channelgroup.cpp:62
PlaybackProfileItemConfig
Definition: globalsettings.h:212
PlaybackProfileConfig::m_items
std::vector< MythVideoProfileItem > m_items
Definition: globalsettings.h:291
MythConfirmationDialog::haveResult
void haveResult(bool)
MSqlQuery::value
QVariant value(int i) const
Definition: mythdbcon.h:202
MythScreenStack
Definition: mythscreenstack.h:16
MainGeneralSettings::applyChange
void applyChange() override
Definition: globalsettings.cpp:4186
mythdbcon.h
LongChannelFormat
static HostComboBoxSetting * LongChannelFormat()
Definition: globalsettings.cpp:2818
Visualiser
static HostComboBoxSetting * Visualiser()
Definition: globalsettings.cpp:1699
AppearanceSettings::m_screenAspect
HostComboBoxSetting * m_screenAspect
Definition: globalsettings.h:164
GRSchedOpenEnd
static GlobalComboBoxSetting * GRSchedOpenEnd()
Definition: globalsettings.cpp:2944
AppearanceSettings::applyChange
void applyChange() override
Definition: globalsettings.cpp:4639
MythVideoProfile::GetVideoRenderers
static QStringList GetVideoRenderers(const QString &Decoder)
Definition: mythvideoprofile.cpp:1206
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
toUserString
QString toUserString(PrimariesMode Mode)
Definition: videoouttypes.h:149
PREF_CPUS
#define PREF_CPUS
Definition: mythvideoprofile.h:35
MSqlQuery::exec
bool exec(void)
Wrap QSqlQuery::exec() so we can display SQL.
Definition: mythdbcon.cpp:607
kAspect_Off
@ kAspect_Off
Definition: videoouttypes.h:63
kRenderOpenGL
@ kRenderOpenGL
Definition: mythrender_base.h:19
VideoModeSettings
Definition: globalsettings.h:49
MythPower::FeatureShutdown
@ FeatureShutdown
Definition: mythpower.h:42
SkipTypeToString
QString SkipTypeToString(int flags)
Definition: programtypes.cpp:87
ISO639PreferredLanguage
static GlobalComboBoxSetting * ISO639PreferredLanguage(uint i)
Definition: globalsettings.cpp:3188
PlaybackSettingsDialog::ShowPlaybackProfileMenu
void ShowPlaybackProfileMenu(MythUIButtonListItem *item)
Definition: globalsettings.cpp:4272
StandardSetting::clearSettings
virtual void clearSettings()
Definition: standardsettings.cpp:159
GuiHeight
static HostSpinBoxSetting * GuiHeight()
Definition: globalsettings.cpp:2239
MythVideoProfile::GetUpscalers
static std::vector< std::pair< QString, QString > > GetUpscalers()
Definition: mythvideoprofile.cpp:719
ISO639_fill_selections
static void ISO639_fill_selections(MythUIComboBoxSetting *widget, uint i)
Definition: globalsettings.cpp:3161
PlaybackProfileItemConfig::m_vidRend
TransMythUIComboBoxSetting * m_vidRend
Definition: globalsettings.h:256
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:23
playgroup.h
PlaybackProfileConfig::AddNewEntry
void AddNewEntry(void)
Definition: globalsettings.cpp:1304
PlayBackScaling::m_horizScan
StandardSetting * m_horizScan
Definition: globalsettings.cpp:4206
StandardSetting::addTargetedChild
void addTargetedChild(const QString &value, StandardSetting *setting)
Definition: standardsettings.cpp:116
PlaybackProfileItemConfig::heightChanged
void heightChanged(const QString &val)
Definition: globalsettings.cpp:1016
PlaybackWatchList
static HostCheckBoxSetting * PlaybackWatchList()
Definition: globalsettings.cpp:3477
PlaybackProfileConfig::ReloadSettings
void ReloadSettings(void)
Definition: globalsettings.cpp:1312
MythPainterWindow::GetDefaultPainter
static MUI_PUBLIC QString GetDefaultPainter()
Definition: mythpainterwindow.cpp:30
RerecordWatched
static GlobalCheckBoxSetting * RerecordWatched()
Definition: globalsettings.cpp:581
GROnScrSubRecPriority
static GlobalSpinBoxSetting * GROnScrSubRecPriority()
Definition: globalsettings.cpp:3037
GetMythDB
MythDB * GetMythDB(void)
Definition: mythdb.cpp:50
PlaybackProfileConfig::InitProfileItem
StandardSetting * InitProfileItem(uint i, StandardSetting *parent)
Definition: globalsettings.cpp:1248
PlaybackWLAutoExpire
static HostCheckBoxSetting * PlaybackWLAutoExpire()
Definition: globalsettings.cpp:3507
ChannelGroup::GetChannelGroups
static ChannelGroupList GetChannelGroups(bool includeEmpty=true)
Definition: channelgroup.cpp:172
GroupSetting::GroupSetting
GroupSetting()=default
toDBString
QString toDBString(PrimariesMode Mode)
Definition: videoouttypes.h:156
ChannelGroupRememberLast
static HostCheckBoxSetting * ChannelGroupRememberLast()
Definition: globalsettings.cpp:2837
MythVideoProfile::GetVideoRendererName
static QString GetVideoRendererName(const QString &Renderer)
Definition: mythvideoprofile.cpp:846
PlaybackWLBlackOut
static HostSpinBoxSetting * PlaybackWLBlackOut()
Definition: globalsettings.cpp:3541
mythdirs.h
ChannelGroupSetting::m_groupName
TransTextEditSetting * m_groupName
Definition: globalsettings.h:315
mythsorthelper.h
PlayBoxEpisodeSort
static HostComboBoxSetting * PlayBoxEpisodeSort()
Definition: globalsettings.cpp:1449
UseVirtualKeyboard
static HostCheckBoxSetting * UseVirtualKeyboard()
Definition: globalsettings.cpp:1911
PlayBackScaling::m_vertScan
StandardSetting * m_vertScan
Definition: globalsettings.cpp:4205
AutoExpireWatchedPriority
static GlobalCheckBoxSetting * AutoExpireWatchedPriority()
Definition: globalsettings.cpp:518
LCDBigClock
static HostCheckBoxSetting * LCDBigClock()
Definition: globalsettings.cpp:3730
PlaybackProfileItemConfig::m_singleDeint
TransMythUIComboBoxSetting * m_singleDeint
Definition: globalsettings.h:258
PlaybackProfileItemConfig::m_doubleShader
TransMythUICheckBoxSetting * m_doubleShader
Definition: globalsettings.h:262
PlaybackProfileItemConfig::m_decoder
TransMythUIComboBoxSetting * m_decoder
Definition: globalsettings.h:253
PlaybackProfileItemConfig::DoubleQualityChanged
void DoubleQualityChanged(const QString &Quality)
Definition: globalsettings.cpp:1082
MythTextInputDialog::haveResult
void haveResult(QString)
MythPower::IsFeatureSupported
bool IsFeatureSupported(Feature Supported)
Definition: mythpower.cpp:165
MainGeneralSettings::MainGeneralSettings
MainGeneralSettings()
Definition: globalsettings.cpp:4093
HostCheckBoxSetting
Definition: standardsettings.h:417
menu
static MythThemedMenu * menu
Definition: mythtv/programs/mythtv-setup/main.cpp:54
PlaybackProfileItemConfig::m_skipLoop
TransMythUICheckBoxSetting * m_skipLoop
Definition: globalsettings.h:255
MythUIButtonList::GetCount
int GetCount() const
Definition: mythuibuttonlist.cpp:1656
MythDate::current
QDateTime current(bool stripped)
Returns current Date and Time in UTC.
Definition: mythdate.cpp:10
StandardSetting::haveChanged
bool haveChanged()
Return true if the setting have changed or any of its children.
Definition: standardsettings.cpp:185
PlaybackProfileItemConfig::m_parentConfig
PlaybackProfileConfig * m_parentConfig
Definition: globalsettings.h:264
ChannelGroupSetting::Save
void Save() override
Definition: globalsettings.cpp:4748
PlaybackSettingsDialog::ShowMenu
void ShowMenu(void) override
Definition: globalsettings.cpp:4260
langsettings.h
tmp
static guint32 * tmp
Definition: goom_core.cpp:31
mythvaapicontext.h
DatabaseSettings
Definition: dbsettings.h:10
MythTranslation::getLanguages
static QMap< QString, QString > getLanguages(void)
Definition: mythtranslation.cpp:118
ButtonStandardSetting::clicked
void clicked()
mythpainterwindow.h
PlaybackProfileConfig::m_profileName
QString m_profileName
Definition: globalsettings.h:293
MythUIButtonListItem::SetText
void SetText(const QString &text, const QString &name="", const QString &state="")
Definition: mythuibuttonlist.cpp:3272
FrontendIdleTimeout
static HostSpinBoxSetting * FrontendIdleTimeout()
Definition: globalsettings.cpp:1927
AutoCommercialSkip
static HostComboBoxSetting * AutoCommercialSkip()
Definition: globalsettings.cpp:300
MythMainWindow::GetDisplay
MythDisplay * GetDisplay()
Definition: mythmainwindow.cpp:250
RememberRecGroup
static HostCheckBoxSetting * RememberRecGroup()
Definition: globalsettings.cpp:205
MythUIButtonList::GetItemPos
int GetItemPos(MythUIButtonListItem *item) const
Definition: mythuibuttonlist.cpp:1699
PBBStartInTitle
static HostCheckBoxSetting * PBBStartInTitle()
Definition: globalsettings.cpp:240
PrimariesDisabled
@ PrimariesDisabled
Definition: videoouttypes.h:144
MythUIButtonListItem
Definition: mythuibuttonlist.h:41
VidModeHeight
static HostSpinBoxSetting * VidModeHeight(int idx)
Definition: globalsettings.cpp:2325
PlaybackSettingsDialog::DeleteProfileItem
void DeleteProfileItem(void)
Definition: globalsettings.cpp:4328
GRAudioDescRecPriority
static GlobalSpinBoxSetting * GRAudioDescRecPriority()
Definition: globalsettings.cpp:3089
MythVideoProfile::GetProfiles
static QStringList GetProfiles(const QString &HostName)
Definition: mythvideoprofile.cpp:864
EPGSettings::EPGSettings
EPGSettings()
Definition: globalsettings.cpp:4546
AutoExpireExtraSpace
static GlobalSpinBoxSetting * AutoExpireExtraSpace()
Definition: globalsettings.cpp:420
DeferAutoTranscodeDays
static GlobalSpinBoxSetting * DeferAutoTranscodeDays()
Definition: globalsettings.cpp:321
StandardSetting::setChanged
void setChanged(bool changed)
Definition: standardsettings.cpp:208
ChannelGroupSetting
Definition: globalsettings.h:302
HostRefreshRateComboBoxSetting::GetRefreshRates
static std::vector< double > GetRefreshRates(const QString &resolution)
Definition: globalsettings.cpp:2444
playbackbox.h
mythraopconnection.h
StandardSetting::settingsChanged
void settingsChanged(StandardSetting *selectedSetting=nullptr)
mythrenderopengl.h
toString
QString toString(MarkTypes type)
Definition: programtypes.cpp:25
StandardSettingDialog
Definition: standardsettings.h:468
StandardSetting::addChild
virtual void addChild(StandardSetting *child)
Definition: standardsettings.cpp:70
FFRewReposTime
static HostSpinBoxSetting * FFRewReposTime()
Definition: globalsettings.cpp:1466
ShutDownRebootSetting::childChanged
void childChanged(StandardSetting *) override
Definition: globalsettings.cpp:4029
ShutDownRebootSetting::ShutDownRebootSetting
ShutDownRebootSetting()
Definition: globalsettings.cpp:4011
VideoModeSettings::VideoModeSettings
VideoModeSettings(const char *c)
Definition: globalsettings.cpp:2543
ConfirmPowerEvent
static HostCheckBoxSetting * ConfirmPowerEvent()
Definition: globalsettings.cpp:1951
LircDaemonDevice
static HostTextEditSetting * LircDaemonDevice()
Definition: globalsettings.cpp:2064
ChannelGroupsSetting::Load
void Load() override
Definition: globalsettings.cpp:4902
mythdisplay.h
LCDEnable
static HostCheckBoxSetting * LCDEnable()
Definition: globalsettings.cpp:3761
ShutDownRebootSetting::m_overrideExitMenu
StandardSetting * m_overrideExitMenu
Definition: globalsettings.cpp:4004
FFRewReverse
static HostCheckBoxSetting * FFRewReverse()
Definition: globalsettings.cpp:1485
kAspect_END
@ kAspect_END
Definition: videoouttypes.h:68
ShutDownRebootSetting
Definition: globalsettings.cpp:3995
COND_WIDTH
#define COND_WIDTH
Definition: mythvideoprofile.h:30
mythlogging.h
LiveTVIdleTimeout
static HostSpinBoxSetting * LiveTVIdleTimeout()
Definition: globalsettings.cpp:1864
RecGroupMod
static HostCheckBoxSetting * RecGroupMod()
Definition: globalsettings.cpp:222
themeinfo.h
StandardSetting::getSubSettings
virtual QList< StandardSetting * > * getSubSettings()
Definition: standardsettings.cpp:145
DEINT_QUALITY_HIGH
#define DEINT_QUALITY_HIGH
Definition: mythvideoprofile.h:24
MythCoreContext::GetQLocale
QLocale GetQLocale(void)
Definition: mythcorecontext.cpp:1889
hardwareprofile.scan.profile
profile
Definition: scan.py:99
MythUIComboBoxSetting
Definition: standardsettings.h:218
GeneralRecPrioritiesSettings::GeneralRecPrioritiesSettings
GeneralRecPrioritiesSettings()
Definition: globalsettings.cpp:4554
DisplayGroupTitleSort
static HostComboBoxSetting * DisplayGroupTitleSort()
Definition: globalsettings.cpp:3461
MythShortDateFormat
static HostComboBoxSetting * MythShortDateFormat()
Definition: globalsettings.cpp:2707
kAdjustFill_END
@ kAdjustFill_END
Definition: videoouttypes.h:81
ScreenSelection
static HostComboBoxSetting * ScreenSelection()
Definition: globalsettings.cpp:2120
ChannelGroupsSetting::ChannelGroupsSetting
ChannelGroupsSetting()
Definition: globalsettings.cpp:4897
AutoExpireLiveTVMaxAge
static GlobalSpinBoxSetting * AutoExpireLiveTVMaxAge()
Definition: globalsettings.cpp:549
LCDShowMusicItems
static HostComboBoxSetting * LCDShowMusicItems()
Definition: globalsettings.cpp:3648
MythUIButtonList::GetCurrentPos
int GetCurrentPos() const
Definition: mythuibuttonlist.h:238
OverrideExitMenu
static HostComboBoxSetting * OverrideExitMenu(MythPower *Power)
Definition: globalsettings.cpp:1962
RebootCommand
static HostTextEditSetting * RebootCommand(MythPower *Power)
Definition: globalsettings.cpp:2006
StereoDiscard
static HostCheckBoxSetting * StereoDiscard()
Definition: globalsettings.cpp:2176
PlaybackSettingsDialog::MoveProfileItemUp
void MoveProfileItemUp(void)
Definition: globalsettings.cpp:4311
VideoModeChangePause
static HostSpinBoxSetting * VideoModeChangePause(void)
Definition: globalsettings.cpp:2531
GuiDimension::m_width
StandardSetting * m_width
Definition: globalsettings.cpp:4590
MythDisplay::GetScreenCount
static int GetScreenCount()
Definition: mythdisplay.cpp:287
MythDisplay::GetExtraScreenInfo
static QString GetExtraScreenInfo(QScreen *qScreen)
Definition: mythdisplay.cpp:495
AspectOverrideMode
AspectOverrideMode
Definition: videoouttypes.h:60
MythDialogBox
Basic menu dialog, message and a list of options.
Definition: mythdialogbox.h:166
VertScanPercentage
static HostSpinBoxSetting * VertScanPercentage()
Definition: globalsettings.cpp:1599
MSqlQuery::InitCon
static MSqlQueryInfo InitCon(ConnectionReuse _reuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
Definition: mythdbcon.cpp:539
HostRefreshRateComboBoxSetting
Definition: globalsettings.h:168
PlaybackProfileItemConfig::DecreasePriority
void DecreasePriority(void)
Definition: globalsettings.cpp:1186
MythPower::AcquireRelease
static MythPower * AcquireRelease(void *Reference, bool Acquire, std::chrono::seconds MinimumDelay=0s)
Definition: mythpower.cpp:75
PlaybackSettings::PlaybackSettings
PlaybackSettings()
Definition: globalsettings.cpp:4335
StandardSetting::getParent
StandardSetting * getParent() const
Definition: standardsettings.h:49
MythDB::DBError
static void DBError(const QString &where, const MSqlQuery &query)
Definition: mythdb.cpp:227
IgnoreMedia
static HostTextEditSetting * IgnoreMedia()
Definition: globalsettings.cpp:3445
PlaybackProfileItemConfig::decoderChanged
void decoderChanged(const QString &dec)
Definition: globalsettings.cpp:1044
CommercialSkipMethod
static GlobalComboBoxSetting * CommercialSkipMethod()
Definition: globalsettings.cpp:268
MaxEndGap
static GlobalSpinBoxSetting * MaxEndGap()
Definition: globalsettings.cpp:647
PlayBackScaling::m_yScan
StandardSetting * m_yScan
Definition: globalsettings.cpp:4208
HorizScanPercentage
static HostSpinBoxSetting * HorizScanPercentage()
Definition: globalsettings.cpp:1613
BrowseAllTuners
static HostCheckBoxSetting * BrowseAllTuners()
Definition: globalsettings.cpp:1727
PlaybackProfileItemConfig::m_codecs
MythUIComboBoxSetting * m_codecs
Definition: globalsettings.h:251
StandardSetting::Load
virtual void Load(void)
Definition: standardsettings.cpp:213
MythUICheckBoxSetting::valueChanged
void valueChanged(bool)
DEINT_QUALITY_MEDIUM
#define DEINT_QUALITY_MEDIUM
Definition: mythvideoprofile.h:23
PlaybackProfileItemConfig::m_singleShader
TransMythUICheckBoxSetting * m_singleShader
Definition: globalsettings.h:259
PREF_DEINT1X
#define PREF_DEINT1X
Definition: