MythTV  master
globalsettings.cpp
Go to the documentation of this file.
1 
2 // -*- Mode: c++ -*-
3 
4 // Standard UNIX C headers
5 #include <fcntl.h>
6 #include <sys/stat.h>
7 #include <sys/types.h>
8 #include <unistd.h>
9 
10 // Qt headers
11 #include <QApplication>
12 #include <QCursor>
13 #include <QDialog>
14 #include <QDir>
15 #include <QEvent>
16 #include <QFile>
17 #include <QFileInfo>
18 #include <QFontDatabase>
19 #include <QImage>
20 #include <QTextCodec>
21 #include <QtGlobal>
22 
23 // MythTV headers
24 #include "libmyth/dbsettings.h"
25 #include "libmyth/langsettings.h"
26 #include "libmythbase/iso639.h"
27 #include "libmythbase/mythconfig.h"
29 #include "libmythbase/mythdbcon.h"
30 #include "libmythbase/mythdirs.h"
32 #include "libmythbase/mythpower.h"
35 #include "libmythtv/cardutil.h"
37 #include "libmythtv/playgroup.h" //Used for playBackGroup, to be remove at one point
40 #include "libmythui/mythdisplay.h"
42 #include "libmythui/mythuihelper.h"
43 #include "libmythui/themeinfo.h"
44 #ifdef USING_OPENGL
46 #endif
47 #ifdef USING_AIRPLAY
49 #endif
50 #ifdef USING_VAAPI
52 #endif
53 
54 // MythFrontend
55 #include "globalsettings.h"
56 #include "playbackbox.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("Clear last played position and exit"), "16");
1767  gc->addSelection(PlaybackSettings::tr("Always prompt (excluding Live TV)"),
1768  "1");
1769  gc->addSelection(PlaybackSettings::tr("Always prompt (including Live TV)"),
1770  "4");
1771  gc->addSelection(PlaybackSettings::tr("Prompt for Live TV only"), "8");
1772 
1773  gc->setHelpText(PlaybackSettings::tr("If set to prompt, a menu will be "
1774  "displayed when you exit playback "
1775  "mode. The options available will "
1776  "allow you delete the recording, "
1777  "continue watching, or exit."));
1778  return gc;
1779 }
1780 
1782 {
1783  auto *gc = new HostCheckBoxSetting("EndOfRecordingExitPrompt");
1784 
1785  gc->setLabel(PlaybackSettings::tr("Prompt at end of recording"));
1786 
1787  gc->setValue(false);
1788 
1789  gc->setHelpText(PlaybackSettings::tr("If enabled, a menu will be displayed "
1790  "allowing you to delete the recording "
1791  "when it has finished playing."));
1792  return gc;
1793 }
1794 
1796 {
1797  auto *gc = new HostCheckBoxSetting("MusicChoiceEnabled");
1798 
1799  gc->setLabel(PlaybackSettings::tr("Enable Music Choice"));
1800 
1801  gc->setValue(false);
1802 
1803  gc->setHelpText(PlaybackSettings::tr("Enable this to improve playing of Music Choice channels "
1804  "or recordings from those channels. "
1805  "These are audio channels with slide show "
1806  "from some cable providers. "
1807  "In unusual situations this could cause lip sync problems "
1808  "watching normal videos or TV shows."));
1809  return gc;
1810 }
1811 
1813 {
1814  auto *gc = new HostCheckBoxSetting("JumpToProgramOSD");
1815 
1816  gc->setLabel(PlaybackSettings::tr("Jump to program OSD"));
1817 
1818  gc->setValue(true);
1819 
1820  gc->setHelpText(PlaybackSettings::tr("Set the choice between viewing the "
1821  "current recording group in the OSD, "
1822  "or showing the 'Watch Recording' "
1823  "screen when 'Jump to Program' is "
1824  "activated. If enabled, the "
1825  "recordings are shown in the OSD"));
1826  return gc;
1827 }
1828 
1830 {
1831  auto *gc = new HostCheckBoxSetting("ContinueEmbeddedTVPlay");
1832 
1833  gc->setLabel(PlaybackSettings::tr("Continue playback when embedded"));
1834 
1835  gc->setValue(false);
1836 
1837  gc->setHelpText(PlaybackSettings::tr("If enabled, TV playback continues "
1838  "when the TV window is embedded in "
1839  "the upcoming program list or "
1840  "recorded list. The default is to "
1841  "pause the recorded show when "
1842  "embedded."));
1843  return gc;
1844 }
1845 
1847 {
1848  auto *gc = new HostCheckBoxSetting("AutomaticSetWatched");
1849 
1850  gc->setLabel(PlaybackSettings::tr("Automatically mark a recording as "
1851  "watched"));
1852 
1853  gc->setValue(false);
1854 
1855  gc->setHelpText(PlaybackSettings::tr("If enabled, when you exit near the "
1856  "end of a recording it will be marked "
1857  "as watched. The automatic detection "
1858  "is not foolproof, so do not enable "
1859  "this setting if you don't want an "
1860  "unwatched recording marked as "
1861  "watched."));
1862  return gc;
1863 }
1864 
1866 {
1867  auto *gs = new HostSpinBoxSetting("LiveTVIdleTimeout", 0, 3600, 1);
1868 
1869  gs->setLabel(PlaybackSettings::tr("Live TV idle timeout (mins)"));
1870 
1871  gs->setValue(0);
1872 
1873  gs->setHelpText(PlaybackSettings::tr("Exit Live TV automatically if left "
1874  "idle for the specified number of "
1875  "minutes. 0 disables the timeout."));
1876  return gs;
1877 }
1878 
1879 // static HostCheckBoxSetting *PlaybackPreview()
1880 // {
1881 // HostCheckBoxSetting *gc = new HostCheckBoxSetting("PlaybackPreview");
1882 //
1883 // gc->setLabel(PlaybackSettings::tr("Display live preview of recordings"));
1884 //
1885 // gc->setValue(true);
1886 //
1887 // gc->setHelpText(PlaybackSettings::tr("If enabled, a preview of the recording "
1888 // "will play in a small window on the \"Watch a "
1889 // "Recording\" menu."));
1890 //
1891 // return gc;
1892 // }
1893 //
1894 // static HostCheckBoxSetting *HWAccelPlaybackPreview()
1895 // {
1896 // HostCheckBoxSetting *gc = new HostCheckBoxSetting("HWAccelPlaybackPreview");
1897 //
1898 // gc->setLabel(PlaybackSettings::tr("Use HW Acceleration for live recording preview"));
1899 //
1900 // gc->setValue(false);
1901 //
1902 // gc->setHelpText(
1903 // PlaybackSettings::tr(
1904 // "If enabled, live recording preview will use hardware "
1905 // "acceleration. The video renderer used is determined by the "
1906 // "selected CPU profile. Disable if playback is sluggish or "
1907 // "causes high CPU load"));
1908 //
1909 // return gc;
1910 // }
1911 
1913 {
1914  auto *gc = new HostCheckBoxSetting("UseVirtualKeyboard");
1915 
1916  gc->setLabel(MainGeneralSettings::tr("Use line edit virtual keyboards"));
1917 
1918  gc->setValue(true);
1919 
1920  gc->setHelpText(MainGeneralSettings::tr("If enabled, you can use a virtual "
1921  "keyboard in MythTV's line edit "
1922  "boxes. To use, hit SELECT (Enter "
1923  "or Space) while a line edit is in "
1924  "focus."));
1925  return gc;
1926 }
1927 
1929 {
1930  auto *gs = new HostSpinBoxSetting("FrontendIdleTimeout", 0, 360, 5);
1931 
1932  gs->setLabel(MainGeneralSettings::tr("Idle time before entering standby "
1933  "mode (minutes)"));
1934 
1935  gs->setValue(90);
1936 
1937  gs->setHelpText(MainGeneralSettings::tr("Number of minutes to wait when "
1938  "the frontend is idle before "
1939  "entering standby mode. Standby "
1940  "mode allows the backend to power "
1941  "down if configured to do so. Any "
1942  "remote or mouse input will cause "
1943  "the countdown to start again "
1944  "and/or exit idle mode. Video "
1945  "playback suspends the countdown. "
1946  "A value of zero prevents the "
1947  "frontend automatically entering "
1948  "standby."));
1949  return gs;
1950 }
1951 
1953 {
1954  auto * checkbox = new HostCheckBoxSetting("ConfirmPowerEvent");
1955  checkbox->setValue(true);
1956  checkbox->setLabel(MainGeneralSettings::tr("Confirm before suspending/shutting down"));
1957  checkbox->setHelpText(MainGeneralSettings::tr(
1958  "If enabled (the default) then the user will always be asked to confirm before the system "
1959  "is shutdown, suspended or rebooted."));
1960  return checkbox;
1961 }
1962 
1964 {
1965  auto *gc = new HostComboBoxSetting("OverrideExitMenu");
1966 
1967  gc->setLabel(MainGeneralSettings::tr("Customize exit menu options"));
1968 
1969  gc->addSelection(MainGeneralSettings::tr("Default"), "0");
1970  gc->addSelection(MainGeneralSettings::tr("Show quit"), "1");
1971  gc->addSelection(MainGeneralSettings::tr("Show quit and suspend"), "9");
1972  gc->addSelection(MainGeneralSettings::tr("Show quit and shutdown"), "2");
1973  gc->addSelection(MainGeneralSettings::tr("Show quit, reboot and shutdown"), "3");
1974  gc->addSelection(MainGeneralSettings::tr("Show quit, reboot, shutdown and suspend"), "10");
1975  gc->addSelection(MainGeneralSettings::tr("Show shutdown"), "4");
1976  gc->addSelection(MainGeneralSettings::tr("Show reboot"), "5");
1977  gc->addSelection(MainGeneralSettings::tr("Show reboot and shutdown"), "6");
1978  gc->addSelection(MainGeneralSettings::tr("Show standby"), "7");
1979  gc->addSelection(MainGeneralSettings::tr("Show suspend"), "8");
1980 
1981  QString helptext = MainGeneralSettings::tr("By default, only remote frontends are shown "
1982  "the shutdown option on the exit menu. Here "
1983  "you can force specific shutdown, reboot and suspend "
1984  "options to be displayed.");
1985  if (Power)
1986  {
1987  QStringList supported = Power->GetFeatureList();
1988  if (!supported.isEmpty())
1989  {
1990  helptext.prepend(MainGeneralSettings::tr(
1991  "This system supports '%1' without additional setup. ")
1992  .arg(supported.join(", ")));
1993  }
1994  else
1995  {
1996  helptext.append(MainGeneralSettings::tr(
1997  " This system appears to have no power options available. Try "
1998  "setting the Halt/Reboot/Suspend commands below."));
1999  }
2000  }
2001  gc->setHelpText(helptext);
2002 
2003  return gc;
2004 }
2005 
2006 #ifndef Q_OS_ANDROID
2008 {
2009  auto *ge = new HostTextEditSetting("RebootCommand");
2010  ge->setLabel(MainGeneralSettings::tr("Reboot command"));
2011  ge->setValue("");
2012  QString help = MainGeneralSettings::tr(
2013  "Optional. Script to run if you select the reboot option from the "
2014  "exit menu, if the option is displayed. You must configure an "
2015  "exit key to display the exit menu.");
2016  if (Power && Power->IsFeatureSupported(MythPower::FeatureRestart))
2017  {
2018  help.append(MainGeneralSettings::tr(
2019  " Note: This system appears to support reboot without using this setting."));
2020  }
2021  ge->setHelpText(help);
2022  return ge;
2023 }
2024 
2026 {
2027  auto *suspend = new HostTextEditSetting("SuspendCommand");
2028  suspend->setLabel(MainGeneralSettings::tr("Suspend command"));
2029  suspend->setValue("");
2030  QString help = MainGeneralSettings::tr(
2031  "Optional: Script to run if you select the suspend option from the "
2032  "exit menu, if the option is displayed.");
2033 
2034  if (Power && Power->IsFeatureSupported(MythPower::FeatureSuspend))
2035  {
2036  help.append(MainGeneralSettings::tr(
2037  " Note: This system appears to support suspend without using this setting."));
2038  }
2039  suspend->setHelpText(help);
2040  return suspend;
2041 }
2042 
2044 {
2045  auto *ge = new HostTextEditSetting("HaltCommand");
2046  ge->setLabel(MainGeneralSettings::tr("Halt command"));
2047  ge->setValue("");
2048  QString help = MainGeneralSettings::tr("Optional. Script to run if you "
2049  "select the shutdown option from "
2050  "the exit menu, if the option is "
2051  "displayed. You must configure an "
2052  "exit key to display the exit "
2053  "menu.");
2054  if (Power && Power->IsFeatureSupported(MythPower::FeatureShutdown))
2055  {
2056  help.append(MainGeneralSettings::tr(
2057  " Note: This system appears to support shutdown without using this setting."));
2058  }
2059 
2060  ge->setHelpText(help);
2061  return ge;
2062 }
2063 #endif
2064 
2066 {
2067  auto *ge = new HostTextEditSetting("LircSocket");
2068 
2069  ge->setLabel(MainGeneralSettings::tr("LIRC daemon socket"));
2070 
2071  /* lircd socket moved from /dev/ to /var/run/lirc/ in lirc 0.8.6 */
2072  QString lirc_socket = "/dev/lircd";
2073 
2074  if (!QFile::exists(lirc_socket))
2075  lirc_socket = "/var/run/lirc/lircd";
2076 
2077  ge->setValue(lirc_socket);
2078 
2079  QString help = MainGeneralSettings::tr("UNIX socket or IP address[:port] "
2080  "to connect in order to communicate "
2081  "with the LIRC Daemon.");
2082  ge->setHelpText(help);
2083 
2084  return ge;
2085 }
2086 
2088 {
2089  auto *ge = new HostTextEditSetting("ScreenShotPath");
2090 
2091  ge->setLabel(MainGeneralSettings::tr("Screen shot path"));
2092 
2093  ge->setValue("/tmp/");
2094 
2095  ge->setHelpText(MainGeneralSettings::tr("Path to screenshot storage "
2096  "location. Should be writable "
2097  "by the frontend"));
2098 
2099  return ge;
2100 }
2101 
2103 {
2104  auto *ge = new HostTextEditSetting("SetupPinCode");
2105 
2106  ge->setLabel(MainGeneralSettings::tr("Setup PIN code"));
2107 
2108  ge->setHelpText(MainGeneralSettings::tr("This PIN is used to control "
2109  "access to the setup menus. "
2110  "If you want to use this feature, "
2111  "then setting the value to all "
2112  "numbers will make your life much "
2113  "easier. Set it to blank to "
2114  "disable. If enabled, you will not "
2115  "be able to return to this screen "
2116  "and reset the Setup PIN without "
2117  "first entering the current PIN."));
2118  return ge;
2119 }
2120 
2122 {
2123  auto *gc = new HostComboBoxSetting("XineramaScreen", false);
2124  gc->setLabel(AppearanceSettings::tr("Display on screen"));
2125  gc->setValue(0);
2126  gc->setHelpText(AppearanceSettings::tr("Run on the specified screen or "
2127  "spanning all screens."));
2128  return gc;
2129 }
2130 
2131 
2133 {
2134  auto *gc = new HostComboBoxSetting("XineramaMonitorAspectRatio");
2135 
2136  gc->setLabel(AppearanceSettings::tr("Screen aspect ratio"));
2137  gc->addSelection(AppearanceSettings::tr("Auto (Assume square pixels)"), "-1.0");
2138  gc->addSelection(AppearanceSettings::tr("Auto (Detect from display)"), "0.0");
2139  gc->addSelection("16:9", "1.7777");
2140  gc->addSelection("16:10", "1.6");
2141  gc->addSelection("21:9", "2.3704"); // N.B. Actually 64:27
2142  gc->addSelection("32:9", "3.5555");
2143  gc->addSelection("256:135", "1.8963"); // '4K HD'
2144  gc->addSelection("3:2", "1.5");
2145  gc->addSelection("5:4", "1.25");
2146  gc->addSelection("4:3", "1.3333");
2147  gc->addSelection(AppearanceSettings::tr("16:18 (16:9 Above and below)"), "0.8888");
2148  gc->addSelection(AppearanceSettings::tr("32:10 (16:10 Side by side)"), "3.2");
2149  gc->addSelection(AppearanceSettings::tr("16:20 (16:10 Above and below)"), "0.8");
2150  gc->setHelpText(AppearanceSettings::tr(
2151  "Most modern displays have square pixels and the aspect ratio of the screen can be "
2152  "computed from the resolution (default). "
2153  "The aspect ratio can also be automatically detected from the connected display "
2154  "- though this may be slightly less accurate. If automatic detection fails, the correct "
2155  "aspect ratio can be specified here. Note: Some values (e.g 32:10) are "
2156  "primarily intended for multiscreen setups."));
2157  return gc;
2158 }
2159 
2161 {
2162  auto *gc = new HostComboBoxSetting("LetterboxColour");
2163 
2164  gc->setLabel(PlaybackSettings::tr("Letterboxing color"));
2165 
2166  for (int m = kLetterBoxColour_Black; m < kLetterBoxColour_END; ++m)
2167  gc->addSelection(toString((LetterBoxColour)m), QString::number(m));
2168 
2169  gc->setHelpText(PlaybackSettings::tr("By default MythTV uses black "
2170  "letterboxing to match broadcaster "
2171  "letterboxing, but those with plasma "
2172  "screens may prefer gray to minimize "
2173  "burn-in."));
2174  return gc;
2175 }
2176 
2178 {
2179  auto * cb = new HostCheckBoxSetting("DiscardStereo3D");
2180  cb->setValue(true);
2181  cb->setLabel("Discard 3D stereoscopic fields");
2182  cb->setHelpText(PlaybackSettings::tr(
2183  "If 'Side by Side' or 'Top and Bottom' 3D material is detected, "
2184  "enabling this setting will discard one field (enabled by default)."));
2185  return cb;
2186 }
2187 
2189 {
2190  auto *gc = new HostComboBoxSetting("AspectOverride");
2191 
2192  gc->setLabel(PlaybackSettings::tr("Video aspect override"));
2193 
2194  for (int m = kAspect_Off; m < kAspect_END; ++m)
2195  gc->addSelection(toString((AspectOverrideMode)m), QString::number(m));
2196 
2197  gc->setHelpText(PlaybackSettings::tr("When enabled, these will override "
2198  "the aspect ratio specified by any "
2199  "broadcaster for all video streams."));
2200  return gc;
2201 }
2202 
2204 {
2205  auto *gc = new HostComboBoxSetting("AdjustFill");
2206 
2207  gc->setLabel(PlaybackSettings::tr("Zoom"));
2208 
2209  for (int m = kAdjustFill_Off; m < kAdjustFill_END; ++m)
2210  gc->addSelection(toString((AdjustFillMode)m), QString::number(m));
2212  QString::number(kAdjustFill_AutoDetect_DefaultOff));
2214  QString::number(kAdjustFill_AutoDetect_DefaultHalf));
2215 
2216  gc->setHelpText(PlaybackSettings::tr("When enabled, these will apply a "
2217  "predefined zoom to all video "
2218  "playback in MythTV."));
2219  return gc;
2220 }
2221 
2222 // Theme settings
2223 
2225 {
2226  auto *gs = new HostSpinBoxSetting("GuiWidth", 0, 3840, 8, 1);
2227 
2228  gs->setLabel(AppearanceSettings::tr("GUI width (pixels)"));
2229 
2230  gs->setValue(0);
2231 
2232  gs->setHelpText(AppearanceSettings::tr("The width of the GUI. Do not make "
2233  "the GUI wider than your actual "
2234  "screen resolution. Set to 0 to "
2235  "automatically scale to "
2236  "fullscreen."));
2237  return gs;
2238 }
2239 
2241 {
2242  auto *gs = new HostSpinBoxSetting("GuiHeight", 0, 2160, 8, 1);
2243 
2244  gs->setLabel(AppearanceSettings::tr("GUI height (pixels)"));
2245 
2246  gs->setValue(0);
2247 
2248  gs->setHelpText(AppearanceSettings::tr("The height of the GUI. Do not make "
2249  "the GUI taller than your actual "
2250  "screen resolution. Set to 0 to "
2251  "automatically scale to "
2252  "fullscreen."));
2253  return gs;
2254 }
2255 
2257 {
2258  auto *gs = new HostSpinBoxSetting("GuiOffsetX", -3840, 3840, 32, 1);
2259 
2260  gs->setLabel(AppearanceSettings::tr("GUI X offset"));
2261 
2262  gs->setValue(0);
2263 
2264  gs->setHelpText(AppearanceSettings::tr("The horizontal offset where the "
2265  "GUI will be displayed. May only "
2266  "work if run in a window."));
2267  return gs;
2268 }
2269 
2271 {
2272  auto *gs = new HostSpinBoxSetting("GuiOffsetY", -1600, 1600, 8, 1);
2273 
2274  gs->setLabel(AppearanceSettings::tr("GUI Y offset"));
2275 
2276  gs->setValue(0);
2277 
2278  gs->setHelpText(AppearanceSettings::tr("The vertical offset where the "
2279  "GUI will be displayed."));
2280  return gs;
2281 }
2282 
2284 {
2285  auto *gc = new HostCheckBoxSetting("GuiSizeForTV");
2286 
2287  gc->setLabel(AppearanceSettings::tr("Use GUI size for TV playback"));
2288 
2289  gc->setValue(true);
2290 
2291  gc->setHelpText(AppearanceSettings::tr("If enabled, use the above size for "
2292  "TV, otherwise use full screen."));
2293  return gc;
2294 }
2295 
2297 {
2298  HostCheckBoxSetting *gc = new VideoModeSettings("UseVideoModes");
2299 
2300  gc->setLabel(VideoModeSettings::tr("Separate video modes for GUI and "
2301  "TV playback"));
2302 
2303  gc->setValue(false);
2304 
2305  gc->setHelpText(VideoModeSettings::tr(
2306  "Switch video modes for playback depending on the source "
2307  "resolution and frame rate."));
2308  return gc;
2309 }
2310 
2312 {
2313  auto *gs = new HostSpinBoxSetting(QString("VidModeWidth%1").arg(idx),
2314  0, 3840, 16, 1);
2315 
2316  gs->setLabel(VideoModeSettings::tr("In X", "Video mode width"));
2317 
2318  gs->setValue(0);
2319 
2320  gs->setHelpText(VideoModeSettings::tr("Horizontal resolution of video "
2321  "which needs a special output "
2322  "resolution."));
2323  return gs;
2324 }
2325 
2327 {
2328  auto *gs = new HostSpinBoxSetting(QString("VidModeHeight%1").arg(idx),
2329  0, 2160, 16, 1);
2330 
2331  gs->setLabel(VideoModeSettings::tr("In Y", "Video mode height"));
2332 
2333  gs->setValue(0);
2334 
2335  gs->setHelpText(VideoModeSettings::tr("Vertical resolution of video "
2336  "which needs a special output "
2337  "resolution."));
2338  return gs;
2339 }
2340 
2342 {
2343  auto *gc = new HostComboBoxSetting("GuiVidModeResolution");
2344 
2345  gc->setLabel(VideoModeSettings::tr("GUI"));
2346 
2347  gc->setHelpText(VideoModeSettings::tr("Resolution of screen when not "
2348  "watching a video."));
2349 
2350  MythDisplay* display = GetMythMainWindow()->GetDisplay();
2351  std::vector<MythDisplayMode> scr = display->GetVideoModes();
2352  for (auto & vmode : scr)
2353  {
2354  int w = vmode.Width();
2355  int h = vmode.Height();
2356  QString sel = QString("%1x%2").arg(w).arg(h);
2357  gc->addSelection(sel, sel);
2358  }
2359 
2360  // if no resolution setting, set it with a reasonable initial value
2361  if (!scr.empty() && (gCoreContext->GetSetting("GuiVidModeResolution").isEmpty()))
2362  {
2363  int w = 0;
2364  int h = 0;
2365  gCoreContext->GetResolutionSetting("GuiVidMode", w, h);
2366  if ((w <= 0) || (h <= 0))
2367  {
2368  w = 640;
2369  h = 480;
2370  }
2371 
2372  MythDisplayMode dscr(w, h, -1, -1, -1.0, 0);
2373  double rate = -1.0;
2374  int i = MythDisplayMode::FindBestMatch(scr, dscr, rate);
2375  gc->setValue((i >= 0) ? i : scr.size() - 1);
2376  }
2377 
2378  return gc;
2379 }
2380 
2382 {
2383  QString dhelp = VideoModeSettings::tr("Default screen resolution "
2384  "when watching a video.");
2385  QString ohelp = VideoModeSettings::tr("Screen resolution when watching a "
2386  "video at a specific resolution.");
2387 
2388  QString qstr = (idx<0) ? "TVVidModeResolution" :
2389  QString("TVVidModeResolution%1").arg(idx);
2390  auto *gc = new HostComboBoxSetting(qstr);
2391  QString lstr = (idx<0) ? VideoModeSettings::tr("Video output") :
2392  VideoModeSettings::tr("Output");
2393  QString hstr = (idx<0) ? dhelp : ohelp;
2394 
2395  gc->setLabel(lstr);
2396 
2397  gc->setHelpText(hstr);
2398 
2399  MythDisplay* display = GetMythMainWindow()->GetDisplay();
2400  std::vector<MythDisplayMode> scr = display->GetVideoModes();
2401  for (auto & vmode : scr)
2402  {
2403  QString sel = QString("%1x%2").arg(vmode.Width()).arg(vmode.Height());
2404  gc->addSelection(sel, sel);
2405  }
2406 
2407  return gc;
2408 }
2409 
2411 {
2412  const QString previousValue = getValue();
2413  const bool wasUnchanged = !haveChanged();
2414 
2415  clearSelections();
2416  QString resolution = setting->getValue();
2417  int hz50 = -1;
2418  int hz60 = -1;
2419  const std::vector<double> list = GetRefreshRates(resolution);
2420  addSelection(QObject::tr("Auto"), "0");
2421  for (size_t i = 0; i < list.size(); ++i)
2422  {
2423  QString sel = QString::number((double) list[i], 'f', 3);
2424  addSelection(sel + " Hz", sel, sel == previousValue);
2425  hz50 = (fabs(50.0 - list[i]) < 0.01) ? i : hz50;
2426  hz60 = (fabs(60.0 - list[i]) < 0.01) ? i : hz60;
2427  }
2428 
2429  // addSelection() will cause setValue() to be called, marking the setting as
2430  // changed even though the previous value might still be available. Mark it
2431  // as unchanged in this case if it wasn't already changed.
2432  if (wasUnchanged && previousValue == getValue())
2433  setChanged(false);
2434  else
2435  {
2436  if ("640x480" == resolution || "720x480" == resolution)
2437  setValue(hz60+1);
2438  if ("640x576" == resolution || "720x576" == resolution)
2439  setValue(hz50+1);
2440  }
2441 
2442  setEnabled(!list.empty());
2443 }
2444 
2445 std::vector<double> HostRefreshRateComboBoxSetting::GetRefreshRates(const QString &res)
2446 {
2447  QStringList slist = res.split("x");
2448  int width = 0;
2449  int height = 0;
2450  bool ok0 = false;
2451  bool ok1 = false;
2452  if (2 == slist.size())
2453  {
2454  width = slist[0].toInt(&ok0);
2455  height = slist[1].toInt(&ok1);
2456  }
2457 
2458  std::vector<double> result;
2459  if (ok0 && ok1)
2460  {
2461  QSize size(width, height);
2462  MythDisplay* display = GetMythMainWindow()->GetDisplay();
2463  result = display->GetRefreshRates(size);
2464  }
2465  return result;
2466 }
2467 
2469 {
2470  QString dhelp = VideoModeSettings::tr("Default refresh rate when watching "
2471  "a video. Leave at \"Auto\" to "
2472  "automatically use the best "
2473  "available");
2474  QString ohelp = VideoModeSettings::tr("Refresh rate when watching a "
2475  "video at a specific resolution. "
2476  "Leave at \"Auto\" to automatically "
2477  "use the best available");
2478 
2479  QString qstr = (idx<0) ? "TVVidModeRefreshRate" :
2480  QString("TVVidModeRefreshRate%1").arg(idx);
2481  auto *gc = new HostRefreshRateComboBoxSetting(qstr);
2482  QString lstr = VideoModeSettings::tr("Rate");
2483  QString hstr = (idx<0) ? dhelp : ohelp;
2484 
2485  gc->setLabel(lstr);
2486  gc->setHelpText(hstr);
2487  gc->setEnabled(false);
2488  return gc;
2489 }
2490 
2492 {
2493  QString dhelp = VideoModeSettings::tr("Aspect ratio when watching a "
2494  "video. Leave at \"%1\" to "
2495  "use ratio reported by the monitor. "
2496  "Set to 16:9 or 4:3 to force a "
2497  "specific aspect ratio.");
2498 
2499 
2500 
2501  QString ohelp = VideoModeSettings::tr("Aspect ratio when watching a "
2502  "video at a specific resolution. "
2503  "Leave at \"%1\" to use ratio "
2504  "reported by the monitor. Set to "
2505  "16:9 or 4:3 to force a specific "
2506  "aspect ratio.");
2507 
2508  QString qstr = (idx<0) ? "TVVidModeForceAspect" :
2509  QString("TVVidModeForceAspect%1").arg(idx);
2510 
2511  auto *gc = new HostComboBoxSetting(qstr);
2512 
2513  gc->setLabel(VideoModeSettings::tr("Aspect"));
2514 
2515  QString hstr = (idx<0) ? dhelp : ohelp;
2516 
2517  gc->setHelpText(hstr.arg(VideoModeSettings::tr("Default")));
2518 
2519  gc->addSelection(VideoModeSettings::tr("Default"), "0.0");
2520  gc->addSelection("16:9", "1.77777777777");
2521  gc->addSelection("4:3", "1.33333333333");
2522 
2523  return gc;
2524 }
2525 
2527 {
2529  item->setDrawArrow(getValue() == "1");
2530 }
2531 
2533 {
2534  auto *pause = new HostSpinBoxSetting("VideoModeChangePauseMS", 0, 5000, 100);
2535  pause->setLabel(VideoModeSettings::tr("Pause while switching video modes (ms)"));
2536  pause->setHelpText(VideoModeSettings::tr(
2537  "For most displays, switching video modes takes time and content can be missed. "
2538  "If non-zero, this setting will pause playback while the video mode is changed. "
2539  "The required pause length (in ms) will be dependant on the display's characteristics."));
2540  pause->setValue(0);
2541  return pause;
2542 }
2543 
2545 {
2549 
2551  addChild(res);
2552  addChild(rate);
2554  addChild(pause);
2555  connect(res, qOverload<StandardSetting *>(&StandardSetting::valueChanged),
2557 
2558  auto *overrides = new GroupSetting();
2559 
2560  overrides->setLabel(tr("Overrides for specific video sizes"));
2561 
2562  for (int idx = 0; idx < 3; ++idx)
2563  {
2564  //input side
2565  overrides->addChild(VidModeWidth(idx));
2566  overrides->addChild(VidModeHeight(idx));
2567  // output side
2568  overrides->addChild(res = TVVidModeResolution(idx));
2569  overrides->addChild(rate = TVVidModeRefreshRate(idx));
2570  overrides->addChild(TVVidModeForceAspect(idx));
2571 
2572  connect(res, qOverload<StandardSetting *>(&StandardSetting::valueChanged),
2574  }
2575 
2576  addChild(overrides);
2577 };
2578 
2580 {
2581  auto *gc = new HostCheckBoxSetting("HideMouseCursor");
2582 
2583  gc->setLabel(AppearanceSettings::tr("Hide mouse cursor in MythTV"));
2584 
2585  gc->setValue(false);
2586 
2587  gc->setHelpText(AppearanceSettings::tr("Toggles mouse cursor visibility "
2588  "for touchscreens. By default "
2589  "MythTV will auto-hide the cursor "
2590  "if the mouse doesn't move for a "
2591  "period, this setting disables the "
2592  "cursor entirely."));
2593  return gc;
2594 };
2595 
2596 
2598 {
2599  auto *gc = new HostCheckBoxSetting("RunFrontendInWindow");
2600 
2601  gc->setLabel(AppearanceSettings::tr("Use window border"));
2602 
2603  gc->setValue(false);
2604 
2605  gc->setHelpText(AppearanceSettings::tr("Toggles between windowed and "
2606  "borderless operation."));
2607  return gc;
2608 }
2609 
2611 {
2612  auto *gc = new HostCheckBoxSetting("AlwaysOnTop");
2613 
2614  gc->setLabel(AppearanceSettings::tr("Always On Top"));
2615 
2616  gc->setValue(false);
2617 
2618  gc->setHelpText(AppearanceSettings::tr("If enabled, MythTV will always be "
2619  "on top"));
2620  return gc;
2621 }
2622 
2624 {
2625  auto *gs = new HostSpinBoxSetting("StartupScreenDelay", -1, 60, 1, 1,
2626  "Never show startup screen");
2627 
2628  gs->setLabel(AppearanceSettings::tr("Startup Screen Delay"));
2629 
2630  gs->setValue(2);
2631 
2632  gs->setHelpText(AppearanceSettings::tr(
2633  "The Startup Screen will show the progress of starting the frontend "
2634  "if frontend startup takes longer than this number of seconds."));
2635  return gs;
2636 }
2637 
2638 
2640 {
2641  auto *gs = new HostSpinBoxSetting("GUITEXTZOOM", 50, 150, 1, 1);
2642 
2643  gs->setLabel(AppearanceSettings::tr("GUI text zoom percentage"));
2644 
2645  gs->setValue(100);
2646 
2647  gs->setHelpText(AppearanceSettings::tr
2648  ("Adjust the themed defined font size by this percentage. "
2649  "mythfrontend needs restart for this to take effect."));
2650  return gs;
2651 }
2652 
2653 
2655 {
2656  auto *gc = new HostComboBoxSetting("DateFormat");
2657  gc->setLabel(AppearanceSettings::tr("Date format"));
2658 
2659  QDate sampdate = MythDate::current().toLocalTime().date();
2660  QString sampleStr = AppearanceSettings::tr("Samples are shown using "
2661  "today's date.");
2662 
2663  if (sampdate.month() == sampdate.day())
2664  {
2665  sampdate = sampdate.addDays(1);
2666  sampleStr = AppearanceSettings::tr("Samples are shown using "
2667  "tomorrow's date.");
2668  }
2669 
2670  QLocale locale = gCoreContext->GetQLocale();
2671 
2672  gc->addSelection(locale.toString(sampdate, "ddd MMM d"), "ddd MMM d");
2673  gc->addSelection(locale.toString(sampdate, "ddd d MMM"), "ddd d MMM");
2674  gc->addSelection(locale.toString(sampdate, "ddd MMMM d"), "ddd MMMM d");
2675  gc->addSelection(locale.toString(sampdate, "ddd d MMMM"), "ddd d MMMM");
2676  gc->addSelection(locale.toString(sampdate, "dddd MMM d"), "dddd MMM d");
2677  gc->addSelection(locale.toString(sampdate, "dddd d MMM"), "dddd d MMM");
2678  gc->addSelection(locale.toString(sampdate, "MMM d"), "MMM d");
2679  gc->addSelection(locale.toString(sampdate, "d MMM"), "d MMM");
2680  gc->addSelection(locale.toString(sampdate, "MM/dd"), "MM/dd");
2681  gc->addSelection(locale.toString(sampdate, "dd/MM"), "dd/MM");
2682  gc->addSelection(locale.toString(sampdate, "MM.dd"), "MM.dd");
2683  gc->addSelection(locale.toString(sampdate, "dd.MM"), "dd.MM");
2684  gc->addSelection(locale.toString(sampdate, "M/d/yyyy"), "M/d/yyyy");
2685  gc->addSelection(locale.toString(sampdate, "d/M/yyyy"), "d/M/yyyy");
2686  gc->addSelection(locale.toString(sampdate, "MM.dd.yyyy"), "MM.dd.yyyy");
2687  gc->addSelection(locale.toString(sampdate, "dd.MM.yyyy"), "dd.MM.yyyy");
2688  gc->addSelection(locale.toString(sampdate, "yyyy-MM-dd"), "yyyy-MM-dd");
2689  gc->addSelection(locale.toString(sampdate, "ddd MMM d yyyy"), "ddd MMM d yyyy");
2690  gc->addSelection(locale.toString(sampdate, "ddd d MMM yyyy"), "ddd d MMM yyyy");
2691  gc->addSelection(locale.toString(sampdate, "ddd yyyy-MM-dd"), "ddd yyyy-MM-dd");
2692 
2693  QString cn_long = QString("dddd yyyy") + QChar(0x5E74) +
2694  "M" + QChar(0x6708) + "d"+ QChar(0x65E5); // dddd yyyy年M月d日
2695  gc->addSelection(locale.toString(sampdate, cn_long), cn_long);
2696  QString cn_med = QString("dddd ") +
2697  "M" + QChar(0x6708) + "d"+ QChar(0x65E5); // dddd M月d日
2698 
2699  gc->addSelection(locale.toString(sampdate, cn_med), cn_med);
2700 
2701  //: %1 gives additional information regarding the date format
2702  gc->setHelpText(AppearanceSettings::tr("Your preferred date format. %1")
2703  .arg(sampleStr));
2704 
2705  return gc;
2706 }
2707 
2709 {
2710  auto *gc = new HostComboBoxSetting("ShortDateFormat");
2711  gc->setLabel(AppearanceSettings::tr("Short date format"));
2712 
2713  QDate sampdate = MythDate::current().toLocalTime().date();
2714 
2715  QString sampleStr = AppearanceSettings::tr("Samples are shown using "
2716  "today's date.");
2717 
2718  if (sampdate.month() == sampdate.day())
2719  {
2720  sampdate = sampdate.addDays(1);
2721  sampleStr = AppearanceSettings::tr("Samples are shown using "
2722  "tomorrow's date.");
2723  }
2724  QLocale locale = gCoreContext->GetQLocale();
2725 
2726  gc->addSelection(locale.toString(sampdate, "M/d"), "M/d");
2727  gc->addSelection(locale.toString(sampdate, "d/M"), "d/M");
2728  gc->addSelection(locale.toString(sampdate, "MM/dd"), "MM/dd");
2729  gc->addSelection(locale.toString(sampdate, "dd/MM"), "dd/MM");
2730  gc->addSelection(locale.toString(sampdate, "MM.dd"), "MM.dd");
2731  gc->addSelection(locale.toString(sampdate, "dd.MM."), "dd.MM.");
2732  gc->addSelection(locale.toString(sampdate, "M.d."), "M.d.");
2733  gc->addSelection(locale.toString(sampdate, "d.M."), "d.M.");
2734  gc->addSelection(locale.toString(sampdate, "MM-dd"), "MM-dd");
2735  gc->addSelection(locale.toString(sampdate, "dd-MM"), "dd-MM");
2736  gc->addSelection(locale.toString(sampdate, "MMM d"), "MMM d");
2737  gc->addSelection(locale.toString(sampdate, "d MMM"), "d MMM");
2738  gc->addSelection(locale.toString(sampdate, "ddd d"), "ddd d");
2739  gc->addSelection(locale.toString(sampdate, "d ddd"), "d ddd");
2740  gc->addSelection(locale.toString(sampdate, "ddd M/d"), "ddd M/d");
2741  gc->addSelection(locale.toString(sampdate, "ddd d/M"), "ddd d/M");
2742  gc->addSelection(locale.toString(sampdate, "ddd d.M"), "ddd d.M");
2743  gc->addSelection(locale.toString(sampdate, "ddd dd.MM"), "ddd dd.MM");
2744  gc->addSelection(locale.toString(sampdate, "M/d ddd"), "M/d ddd");
2745  gc->addSelection(locale.toString(sampdate, "d/M ddd"), "d/M ddd");
2746 
2747  QString cn_short1 = QString("M") + QChar(0x6708) + "d" + QChar(0x65E5); // M月d日
2748 
2749  gc->addSelection(locale.toString(sampdate, cn_short1), cn_short1);
2750 
2751  QString cn_short2 = QString("ddd M") + QChar(0x6708) + "d" + QChar(0x65E5); // ddd M月d日
2752 
2753  gc->addSelection(locale.toString(sampdate, cn_short2), cn_short2);
2754 
2755  //: %1 gives additional information regarding the date format
2756  gc->setHelpText(AppearanceSettings::tr("Your preferred short date format. %1")
2757  .arg(sampleStr));
2758  return gc;
2759 }
2760 
2762 {
2763  auto *gc = new HostComboBoxSetting("TimeFormat");
2764 
2765  gc->setLabel(AppearanceSettings::tr("Time format"));
2766 
2767  QTime samptime = QTime::currentTime();
2768 
2769  QLocale locale = gCoreContext->GetQLocale();
2770 
2771  gc->addSelection(locale.toString(samptime, "h:mm AP"), "h:mm AP");
2772  gc->addSelection(locale.toString(samptime, "h:mm ap"), "h:mm ap");
2773  gc->addSelection(locale.toString(samptime, "hh:mm AP"), "hh:mm AP");
2774  gc->addSelection(locale.toString(samptime, "hh:mm ap"), "hh:mm ap");
2775  gc->addSelection(locale.toString(samptime, "h:mm"), "h:mm");
2776  gc->addSelection(locale.toString(samptime, "hh:mm"), "hh:mm");
2777  gc->addSelection(locale.toString(samptime, "hh.mm"), "hh.mm");
2778  gc->addSelection(locale.toString(samptime, "AP h:mm"), "AP h:mm");
2779 
2780  gc->setHelpText(AppearanceSettings::tr("Your preferred time format. You "
2781  "must choose a format with \"AM\" "
2782  "or \"PM\" in it, otherwise your "
2783  "time display will be 24-hour or "
2784  "\"military\" time."));
2785  return gc;
2786 }
2787 
2789 {
2790  auto *rgb = new HostCheckBoxSetting("GUIRGBLevels");
2791  rgb->setLabel(AppearanceSettings::tr("Use full range RGB output"));
2792  rgb->setValue(true);
2793  rgb->setHelpText("Enable (recommended) to supply full range RGB output to your display device. "
2794  "Disable to supply limited range RGB output. This setting applies to both the "
2795  "GUI and media playback. Ideally the value of this setting should match a "
2796  "similar setting on your TV or monitor.");
2797  return rgb;
2798 }
2799 
2801 {
2802  auto *gc = new HostComboBoxSetting("ChannelFormat");
2803 
2804  gc->setLabel(GeneralSettings::tr("Channel format"));
2805 
2806  gc->addSelection(GeneralSettings::tr("number"), "<num>");
2807  gc->addSelection(GeneralSettings::tr("number callsign"), "<num> <sign>");
2808  gc->addSelection(GeneralSettings::tr("number name"), "<num> <name>");
2809  gc->addSelection(GeneralSettings::tr("callsign"), "<sign>");
2810  gc->addSelection(GeneralSettings::tr("name"), "<name>");
2811 
2812  gc->setHelpText(GeneralSettings::tr("Your preferred channel format."));
2813 
2814  gc->setValue(1);
2815 
2816  return gc;
2817 }
2818 
2820 {
2821  auto *gc = new HostComboBoxSetting("LongChannelFormat");
2822 
2823  gc->setLabel(GeneralSettings::tr("Long channel format"));
2824 
2825  gc->addSelection(GeneralSettings::tr("number"), "<num>");
2826  gc->addSelection(GeneralSettings::tr("number callsign"), "<num> <sign>");
2827  gc->addSelection(GeneralSettings::tr("number name"), "<num> <name>");
2828  gc->addSelection(GeneralSettings::tr("callsign"), "<sign>");
2829  gc->addSelection(GeneralSettings::tr("name"), "<name>");
2830 
2831  gc->setHelpText(GeneralSettings::tr("Your preferred long channel format."));
2832 
2833  gc->setValue(2);
2834 
2835  return gc;
2836 }
2837 
2839 {
2840  auto *gc = new HostCheckBoxSetting("ChannelGroupRememberLast");
2841 
2842  gc->setLabel(ChannelGroupSettings::tr("Remember last channel group"));
2843 
2844  gc->setHelpText(ChannelGroupSettings::tr("If enabled, the EPG will "
2845  "initially display only the "
2846  "channels from the last channel "
2847  "group selected. Pressing \"4\" "
2848  "will toggle channel group."));
2849 
2850  gc->setValue(false);
2851 
2852  return gc;
2853 }
2854 
2856 {
2857  auto *gc = new HostComboBoxSetting("ChannelGroupDefault");
2858 
2859  gc->setLabel(ChannelGroupSettings::tr("Default channel group"));
2860 
2861  ChannelGroupList changrplist;
2862 
2863  changrplist = ChannelGroup::GetChannelGroups();
2864 
2865  gc->addSelection(ChannelGroupSettings::tr("All Channels"), "-1");
2866 
2867  ChannelGroupList::iterator it;
2868 
2869  for (it = changrplist.begin(); it < changrplist.end(); ++it)
2870  gc->addSelection(it->m_name, QString("%1").arg(it->m_grpId));
2871 
2872  gc->setHelpText(ChannelGroupSettings::tr("Default channel group to be "
2873  "shown in the EPG. Pressing "
2874  "GUIDE key will toggle channel "
2875  "group."));
2876  gc->setValue(false);
2877 
2878  return gc;
2879 }
2880 
2882 {
2883  auto *gc = new HostCheckBoxSetting("BrowseChannelGroup");
2884 
2885  gc->setLabel(GeneralSettings::tr("Browse/change channels from Channel "
2886  "Group"));
2887 
2888  gc->setHelpText(GeneralSettings::tr("If enabled, Live TV will browse or "
2889  "change channels from the selected "
2890  "channel group. The \"All Channels\" "
2891  "channel group may be selected to "
2892  "browse all channels."));
2893  gc->setValue(false);
2894 
2895  return gc;
2896 }
2897 
2898 #if 0
2899 static GlobalCheckBoxSetting *SortCaseSensitive()
2900 {
2901  auto *gc = new GlobalCheckBoxSetting("SortCaseSensitive");
2902  gc->setLabel(GeneralSettings::tr("Case-sensitive sorting"));
2903  gc->setValue(false);
2904  gc->setHelpText(GeneralSettings::tr("If enabled, all sorting will be "
2905  "case-sensitive. This would mean "
2906  "that \"bee movie\" would sort after "
2907  "\"Sea World\" as lower case letters "
2908  "sort after uppercase letters."));
2909  return gc;
2910 }
2911 #endif
2912 
2914 {
2915  auto *gc = new GlobalCheckBoxSetting("SortStripPrefixes");
2916 
2917  gc->setLabel(GeneralSettings::tr("Remove prefixes when sorting"));
2918  gc->setValue(true);
2919  gc->setHelpText(GeneralSettings::tr(
2920  "If enabled, all sorting will remove the common "
2921  "prefixes (The, A, An) from a string prior to "
2922  "sorting. For example, this would sort the titles "
2923  "\"Earth 2\", \"The Flash\", and \"Kings\" in that "
2924  "order. If disabled, they would sort as \"Earth 2\", "
2925  "\"Kings\", \"The Flash\"."));
2926  return gc;
2927 }
2928 
2930 {
2931  auto *gc = new GlobalTextEditSetting("SortPrefixExceptions");
2932 
2933  gc->setLabel(MainGeneralSettings::tr("Names exempt from prefix removal"));
2934  gc->setValue("");
2935  gc->setHelpText(MainGeneralSettings::tr(
2936  "This list of names will be exempt from removing "
2937  "the common prefixes (The, A, An) from a title or "
2938  "filename. Enter multiple names separated by "
2939  "semicolons."));
2940  return gc;
2941 }
2942 
2943 // General RecPriorities settings
2944 
2946 {
2947  auto *bc = new GlobalComboBoxSetting("SchedOpenEnd");
2948 
2949  bc->setLabel(GeneralRecPrioritiesSettings::tr("Avoid back to back "
2950  "recordings"));
2951 
2952  bc->setHelpText(
2953  GeneralRecPrioritiesSettings::tr("Selects the situations where the "
2954  "scheduler will avoid assigning shows "
2955  "to the same card if their end time "
2956  "and start time match. This will be "
2957  "allowed when necessary in order to "
2958  "resolve conflicts."));
2959 
2960  bc->addSelection(GeneralRecPrioritiesSettings::tr("Never"), "0");
2961  bc->addSelection(GeneralRecPrioritiesSettings::tr("Different Channels"),
2962  "1");
2963  bc->addSelection(GeneralRecPrioritiesSettings::tr("Always"), "2");
2964 
2965  bc->setValue(0);
2966 
2967  return bc;
2968 }
2969 
2971 {
2972  auto *bs = new GlobalSpinBoxSetting("PrefInputPriority", 1, 99, 1);
2973 
2974  bs->setLabel(GeneralRecPrioritiesSettings::tr("Preferred input priority"));
2975 
2976  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority when "
2977  "a showing matches the "
2978  "preferred input selected "
2979  "in the 'Scheduling "
2980  "Options' section of the "
2981  "recording rule."));
2982 
2983  bs->setValue(2);
2984  return bs;
2985 }
2986 
2988 {
2989  auto *bs = new GlobalSpinBoxSetting("HDTVRecPriority", -99, 99, 1);
2990 
2991  bs->setLabel(GeneralRecPrioritiesSettings::tr("HDTV recording priority"));
2992 
2993  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority when "
2994  "a showing is marked as an "
2995  "HDTV broadcast in the TV "
2996  "listings."));
2997 
2998  bs->setValue(0);
2999 
3000  return bs;
3001 }
3002 
3004 {
3005  auto *bs = new GlobalSpinBoxSetting("WSRecPriority", -99, 99, 1);
3006 
3007  bs->setLabel(GeneralRecPrioritiesSettings::tr("Widescreen recording "
3008  "priority"));
3009 
3010  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority when "
3011  "a showing is marked as "
3012  "widescreen in the TV "
3013  "listings."));
3014 
3015  bs->setValue(0);
3016 
3017  return bs;
3018 }
3019 
3021 {
3022  auto *bs = new GlobalSpinBoxSetting("SignLangRecPriority", -99, 99, 1);
3023 
3024  bs->setLabel(GeneralRecPrioritiesSettings::tr("Sign language recording "
3025  "priority"));
3026 
3027  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority "
3028  "when a showing is "
3029  "marked as having "
3030  "in-vision sign "
3031  "language."));
3032 
3033  bs->setValue(0);
3034 
3035  return bs;
3036 }
3037 
3039 {
3040  auto *bs = new GlobalSpinBoxSetting("OnScrSubRecPriority", -99, 99, 1);
3041 
3042  bs->setLabel(GeneralRecPrioritiesSettings::tr("In-vision Subtitles "
3043  "Recording Priority"));
3044 
3045  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority "
3046  "when a showing is marked "
3047  "as having in-vision "
3048  "subtitles."));
3049 
3050  bs->setValue(0);
3051 
3052  return bs;
3053 }
3054 
3056 {
3057  auto *bs = new GlobalSpinBoxSetting("CCRecPriority", -99, 99, 1);
3058 
3059  bs->setLabel(GeneralRecPrioritiesSettings::tr("Subtitles/CC recording "
3060  "priority"));
3061 
3062  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority when "
3063  "a showing is marked as "
3064  "having subtitles or "
3065  "closed captioning (CC) "
3066  "available."));
3067 
3068  bs->setValue(0);
3069 
3070  return bs;
3071 }
3072 
3074 {
3075  auto *bs = new GlobalSpinBoxSetting("HardHearRecPriority", -99, 99, 1);
3076 
3077  bs->setLabel(GeneralRecPrioritiesSettings::tr("Hard of hearing priority"));
3078 
3079  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority when "
3080  "a showing is marked as "
3081  "having support for "
3082  "viewers with impaired "
3083  "hearing."));
3084 
3085  bs->setValue(0);
3086 
3087  return bs;
3088 }
3089 
3091 {
3092  auto *bs = new GlobalSpinBoxSetting("AudioDescRecPriority", -99, 99, 1);
3093 
3094  bs->setLabel(GeneralRecPrioritiesSettings::tr("Audio described priority"));
3095 
3096  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority when "
3097  "a showing is marked as "
3098  "being Audio Described."));
3099 
3100  bs->setValue(0);
3101 
3102  return bs;
3103 }
3104 
3106 {
3107  auto *ge = new HostTextEditSetting("DefaultTVChannel");
3108 
3109  ge->setLabel(EPGSettings::tr("Guide starts at channel"));
3110 
3111  ge->setValue("3");
3112 
3113  ge->setHelpText(EPGSettings::tr("The program guide starts on this channel "
3114  "if it is run from outside of Live TV "
3115  "mode. Leave blank to enable Live TV "
3116  "automatic start channel."));
3117 
3118  return ge;
3119 }
3120 
3122 {
3123  auto *gs = new HostSpinBoxSetting("SelChangeRecThreshold", 1, 600, 1);
3124 
3125  gs->setLabel(EPGSettings::tr("Record threshold"));
3126 
3127  gs->setValue(16);
3128 
3129  gs->setHelpText(EPGSettings::tr("Pressing SELECT on a show that is at "
3130  "least this many minutes into the future "
3131  "will schedule a recording."));
3132  return gs;
3133 }
3134 
3136 {
3137  auto *gc = new GlobalComboBoxSetting("Language");
3138 
3139  gc->setLabel(AppearanceSettings::tr("Language"));
3140 
3141  QMap<QString, QString> langMap = MythTranslation::getLanguages();
3142  QStringList langs = langMap.values();
3143  langs.sort();
3144  QString langCode = gCoreContext->GetSetting("Language").toLower();
3145 
3146  if (langCode.isEmpty())
3147  langCode = "en_US";
3148 
3149  gc->clearSelections();
3150 
3151  for (const auto & label : qAsConst(langs))
3152  {
3153  QString value = langMap.key(label);
3154  gc->addSelection(label, value, (value.toLower() == langCode));
3155  }
3156 
3157  gc->setHelpText(AppearanceSettings::tr("Your preferred language for the "
3158  "user interface."));
3159  return gc;
3160 }
3161 
3163 {
3164  widget->clearSelections();
3165  QString q = QString("ISO639Language%1").arg(i);
3166  QString lang = gCoreContext->GetSetting(q, "").toLower();
3167 
3168  if ((lang.isEmpty() || lang == "aar") &&
3169  !gCoreContext->GetSetting("Language", "").isEmpty())
3170  {
3171  lang = iso639_str2_to_str3(gCoreContext->GetLanguage().toLower());
3172  }
3173 
3174  QMap<int,QString>::iterator it = iso639_key_to_english_name.begin();
3175  QMap<int,QString>::iterator ite = iso639_key_to_english_name.end();
3176 
3177  for (; it != ite; ++it)
3178  {
3179  QString desc = (*it);
3180  int idx = desc.indexOf(";");
3181  if (idx > 0)
3182  desc = desc.left(idx);
3183 
3184  const QString il = iso639_key_to_str3(it.key());
3185  widget->addSelection(desc, il, il == lang);
3186  }
3187 }
3188 
3190 {
3191  auto *gc = new GlobalComboBoxSetting(QString("ISO639Language%1").arg(i));
3192 
3193  gc->setLabel(AppearanceSettings::tr("Guide language #%1").arg(i+1));
3194 
3195  // We should try to get language from "MythLanguage"
3196  // then use code 2 to code 3 map in iso639.h
3197  ISO639_fill_selections(gc, i);
3198 
3199  gc->setHelpText(AppearanceSettings::tr("Your #%1 preferred language for "
3200  "Program Guide data and captions.")
3201  .arg(i+1));
3202  return gc;
3203 }
3204 
3206 {
3207  auto *gc = new HostCheckBoxSetting("NetworkControlEnabled");
3208 
3209  gc->setLabel(MainGeneralSettings::tr("Enable Network Remote Control "
3210  "interface"));
3211 
3212  gc->setHelpText(MainGeneralSettings::tr("This enables support for "
3213  "controlling MythFrontend "
3214  "over the network."));
3215 
3216  gc->setValue(false);
3217 
3218  return gc;
3219 }
3220 
3222 {
3223  auto *gs = new HostSpinBoxSetting("NetworkControlPort", 1025, 65535, 1);
3224 
3225  gs->setLabel(MainGeneralSettings::tr("Network Remote Control port"));
3226 
3227  gs->setValue(6546);
3228 
3229  gs->setHelpText(MainGeneralSettings::tr("This specifies what port the "
3230  "Network Remote Control "
3231  "interface will listen on for "
3232  "new connections."));
3233  return gs;
3234 }
3235 
3237 {
3238  auto *ge = new HostTextEditSetting("UDPNotifyPort");
3239 
3240  ge->setLabel(MainGeneralSettings::tr("UDP notify port"));
3241 
3242  ge->setValue("6948");
3243 
3244  ge->setHelpText(MainGeneralSettings::tr("MythTV will listen for "
3245  "connections from the "
3246  "\"mythutil\" program on "
3247  "this port."));
3248  return ge;
3249 }
3250 
3251 #ifdef USING_LIBCEC
3252 static HostCheckBoxSetting *CECEnabled()
3253 {
3254  auto *gc = new HostCheckBoxSetting("libCECEnabled");
3255  gc->setLabel(MainGeneralSettings::tr("Enable CEC Control "
3256  "interface"));
3257  gc->setHelpText(MainGeneralSettings::tr("This enables "
3258  "controlling MythFrontend from a TV remote or powering the TV "
3259  "on and off from a MythTV remote "
3260  "if you have compatible hardware. "
3261  "These settings only take effect after a restart."));
3262  gc->setValue(true);
3263  return gc;
3264 }
3265 
3266 static HostCheckBoxSetting *CECPowerOnTVAllowed()
3267 {
3268  auto *gc = new HostCheckBoxSetting("PowerOnTVAllowed");
3269  gc->setLabel(MainGeneralSettings::tr("Allow Power On TV"));
3270  gc->setHelpText(MainGeneralSettings::tr("Enables your TV to be powered "
3271  "on from MythTV remote or when MythTV starts "
3272  "if you have compatible hardware."));
3273  gc->setValue(true);
3274  return gc;
3275 }
3276 
3277 static HostCheckBoxSetting *CECPowerOffTVAllowed()
3278 {
3279  auto *gc = new HostCheckBoxSetting("PowerOffTVAllowed");
3280  gc->setLabel(MainGeneralSettings::tr("Allow Power Off TV"));
3281  gc->setHelpText(MainGeneralSettings::tr("Enables your TV to be powered "
3282  "off from MythTV remote or when MythTV starts "
3283  "if you have compatible hardware."));
3284  gc->setValue(true);
3285  return gc;
3286 }
3287 
3288 static HostCheckBoxSetting *CECPowerOnTVOnStart()
3289 {
3290  auto *gc = new HostCheckBoxSetting("PowerOnTVOnStart");
3291  gc->setLabel(MainGeneralSettings::tr("Power on TV At Start"));
3292  gc->setHelpText(MainGeneralSettings::tr("Powers "
3293  "on your TV when you start MythTV "
3294  "if you have compatible hardware."));
3295  gc->setValue(true);
3296  return gc;
3297 }
3298 
3299 static HostCheckBoxSetting *CECPowerOffTVOnExit()
3300 {
3301  auto *gc = new HostCheckBoxSetting("PowerOffTVOnExit");
3302  gc->setLabel(MainGeneralSettings::tr("Power off TV At Exit"));
3303  gc->setHelpText(MainGeneralSettings::tr("Powers "
3304  "off your TV when you exit MythTV "
3305  "if you have compatible hardware."));
3306  gc->setValue(true);
3307  return gc;
3308 }
3309 
3310 #endif //USING_LIBCEC
3311 
3312 #ifdef USING_AIRPLAY
3313 // AirPlay Settings
3314 static HostCheckBoxSetting *AirPlayEnabled()
3315 {
3316  auto *gc = new HostCheckBoxSetting("AirPlayEnabled");
3317 
3318  gc->setLabel(MainGeneralSettings::tr("Enable AirPlay"));
3319 
3320  gc->setHelpText(MainGeneralSettings::tr("AirPlay lets you wirelessly view "
3321  "content on your TV from your "
3322  "iPhone, iPad, iPod Touch, or "
3323  "iTunes on your computer."));
3324 
3325  gc->setValue(true);
3326 
3327  return gc;
3328 }
3329 
3330 static HostCheckBoxSetting *AirPlayAudioOnly()
3331 {
3332  auto *gc = new HostCheckBoxSetting("AirPlayAudioOnly");
3333 
3334  gc->setLabel(MainGeneralSettings::tr("Only support AirTunes (no video)"));
3335 
3336  gc->setHelpText(MainGeneralSettings::tr("Only stream audio from your "
3337  "iPhone, iPad, iPod Touch, or "
3338  "iTunes on your computer"));
3339 
3340  gc->setValue(false);
3341 
3342  return gc;
3343 }
3344 
3345 static HostCheckBoxSetting *AirPlayPasswordEnabled()
3346 {
3347  auto *gc = new HostCheckBoxSetting("AirPlayPasswordEnabled");
3348 
3349  gc->setLabel(MainGeneralSettings::tr("Require password"));
3350 
3351  gc->setValue(false);
3352 
3353  gc->setHelpText(MainGeneralSettings::tr("Require a password to use "
3354  "AirPlay. Your iPhone, iPad, iPod "
3355  "Touch, or iTunes on your computer "
3356  "will prompt you when required"));
3357  return gc;
3358 }
3359 
3360 static HostTextEditSetting *AirPlayPassword()
3361 {
3362  auto *ge = new HostTextEditSetting("AirPlayPassword");
3363 
3364  ge->setLabel(MainGeneralSettings::tr("Password"));
3365 
3366  ge->setValue("0000");
3367 
3368  ge->setHelpText(MainGeneralSettings::tr("Your iPhone, iPad, iPod Touch, or "
3369  "iTunes on your computer will "
3370  "prompt you for this password "
3371  "when required"));
3372  return ge;
3373 }
3374 
3375 static GroupSetting *AirPlayPasswordSettings()
3376 {
3377  auto *hc = new GroupSetting();
3378 
3379  hc->setLabel(MainGeneralSettings::tr("AirPlay - Password"));
3380  hc->addChild(AirPlayPasswordEnabled());
3381  hc->addChild(AirPlayPassword());
3382 
3383  return hc;
3384 }
3385 
3386 static HostCheckBoxSetting *AirPlayFullScreen()
3387 {
3388  auto *gc = new HostCheckBoxSetting("AirPlayFullScreen");
3389 
3390  gc->setLabel(MainGeneralSettings::tr("AirPlay full screen playback"));
3391 
3392  gc->setValue(false);
3393 
3394  gc->setHelpText(MainGeneralSettings::tr("During music playback, displays "
3395  "album cover and various media "
3396  "information in full screen mode"));
3397  return gc;
3398 }
3399 
3400 //static TransLabelSetting *AirPlayInfo()
3401 //{
3402 // TransLabelSetting *ts = new TransLabelSetting();
3403 //
3404 // ts->setValue(MainGeneralSettings::tr("All AirPlay settings take effect "
3405 // "when you restart MythFrontend."));
3406 // return ts;
3407 //}
3408 
3409 //static TransLabelSetting *AirPlayRSAInfo()
3410 //{
3411 // TransLabelSetting *ts = new TransLabelSetting();
3412 //
3413 // if (MythRAOPConnection::LoadKey() == nullptr)
3414 // {
3415 // ts->setValue(MainGeneralSettings::tr("AirTunes RSA key couldn't be "
3416 // "loaded. Check http://www.mythtv.org/wiki/AirTunes/AirPlay. "
3417 // "Last Error: %1")
3418 // .arg(MythRAOPConnection::RSALastError()));
3419 // }
3420 // else
3421 // {
3422 // ts->setValue(MainGeneralSettings::tr("AirTunes RSA key successfully "
3423 // "loaded."));
3424 // }
3425 //
3426 // return ts;
3427 //}
3428 #endif
3429 
3431 {
3432  auto *gc = new HostCheckBoxSetting("RealtimePriority");
3433 
3434  gc->setLabel(PlaybackSettings::tr("Enable realtime priority threads"));
3435 
3436  gc->setHelpText(PlaybackSettings::tr("When running mythfrontend with root "
3437  "privileges, some threads can be "
3438  "given enhanced priority. Disable "
3439  "this if MythFrontend freezes during "
3440  "video playback."));
3441  gc->setValue(true);
3442 
3443  return gc;
3444 }
3445 
3447 {
3448  auto *ge = new HostTextEditSetting("IgnoreDevices");
3449 
3450  ge->setLabel(MainGeneralSettings::tr("Ignore devices"));
3451 
3452  ge->setValue("");
3453 
3454  ge->setHelpText(MainGeneralSettings::tr("If there are any devices that you "
3455  "do not want to be monitored, list "
3456  "them here with commas in-between. "
3457  "The plugins will ignore them. "
3458  "Requires restart."));
3459  return ge;
3460 }
3461 
3463 {
3464  auto *gc = new HostComboBoxSetting("DisplayGroupTitleSort");
3465 
3466  gc->setLabel(PlaybackSettings::tr("Sort titles"));
3467 
3468  gc->addSelection(PlaybackSettings::tr("Alphabetically"),
3469  QString::number(PlaybackBox::TitleSortAlphabetical));
3470  gc->addSelection(PlaybackSettings::tr("By recording priority"),
3471  QString::number(PlaybackBox::TitleSortRecPriority));
3472 
3473  gc->setHelpText(PlaybackSettings::tr("Sets the title sorting order when "
3474  "the view is set to Titles only."));
3475  return gc;
3476 }
3477 
3479 {
3480  auto *gc = new HostCheckBoxSetting("PlaybackWatchList");
3481 
3482  gc->setLabel(WatchListSettings::tr("Include the 'Watch List' group"));
3483 
3484  gc->setValue(true);
3485 
3486  gc->setHelpText(WatchListSettings::tr("The 'Watch List' is an abbreviated "
3487  "list of recordings sorted to "
3488  "highlight series and shows that "
3489  "need attention in order to keep up "
3490  "to date."));
3491  return gc;
3492 }
3493 
3495 {
3496  auto *gc = new HostCheckBoxSetting("PlaybackWLStart");
3497 
3498  gc->setLabel(WatchListSettings::tr("Start from the Watch List view"));
3499 
3500  gc->setValue(false);
3501 
3502  gc->setHelpText(WatchListSettings::tr("If enabled, the 'Watch List' will "
3503  "be the initial view each time you "
3504  "enter the Watch Recordings screen"));
3505  return gc;
3506 }
3507 
3509 {
3510  auto *gc = new HostCheckBoxSetting("PlaybackWLAutoExpire");
3511 
3512  gc->setLabel(WatchListSettings::tr("Exclude recordings not set for "
3513  "Auto-Expire"));
3514 
3515  gc->setValue(false);
3516 
3517  gc->setHelpText(WatchListSettings::tr("Set this if you turn off "
3518  "Auto-Expire only for recordings "
3519  "that you've seen and intend to "
3520  "keep. This option will exclude "
3521  "these recordings from the "
3522  "'Watch List'."));
3523  return gc;
3524 }
3525 
3527 {
3528  auto *gs = new HostSpinBoxSetting("PlaybackWLMaxAge", 30, 180, 10);
3529 
3530  gs->setLabel(WatchListSettings::tr("Maximum days counted in the score"));
3531 
3532  gs->setValue(60);
3533 
3534  gs->setHelpText(WatchListSettings::tr("The 'Watch List' scores are based "
3535  "on 1 point equals one day since "
3536  "recording. This option limits the "
3537  "maximum score due to age and "
3538  "affects other weighting factors."));
3539  return gs;
3540 }
3541 
3543 {
3544  auto *gs = new HostSpinBoxSetting("PlaybackWLBlackOut", 0, 5, 1);
3545 
3546  gs->setLabel(WatchListSettings::tr("Days to exclude weekly episodes after "
3547  "delete"));
3548 
3549  gs->setValue(2);
3550 
3551  gs->setHelpText(WatchListSettings::tr("When an episode is deleted or "
3552  "marked as watched, other episodes "
3553  "of the series are excluded from the "
3554  "'Watch List' for this interval of "
3555  "time. Daily shows also have a "
3556  "smaller interval based on this "
3557  "setting."));
3558  return gs;
3559 }
3560 
3562 {
3563  auto *gc = new HostCheckBoxSetting("MonitorDrives");
3564 
3565  gc->setLabel(MainGeneralSettings::tr("Media Monitor"));
3566 
3567  gc->setHelpText(MainGeneralSettings::tr("This enables support for "
3568  "monitoring your CD/DVD drives for "
3569  "new disks and launching the "
3570  "proper plugin to handle them. "
3571  "Requires restart."));
3572 
3573  gc->setValue(false);
3574 
3575  gc->addTargetedChild("1", IgnoreMedia());
3576 
3577  return gc;
3578 }
3579 
3581 {
3582  auto *gc = new HostCheckBoxSetting("LCDShowTime");
3583 
3584  gc->setLabel(LcdSettings::tr("Display time"));
3585 
3586  gc->setHelpText(LcdSettings::tr("Display current time on idle LCD "
3587  "display."));
3588 
3589  gc->setValue(true);
3590 
3591  return gc;
3592 }
3593 
3595 {
3596  auto *gc = new HostCheckBoxSetting("LCDShowRecStatus");
3597 
3598  gc->setLabel(LcdSettings::tr("Display recording status"));
3599 
3600  gc->setHelpText(LcdSettings::tr("Display current recordings information "
3601  "on LCD display."));
3602 
3603  gc->setValue(false);
3604 
3605  return gc;
3606 }
3607 
3609 {
3610  auto *gc = new HostCheckBoxSetting("LCDShowMenu");
3611 
3612  gc->setLabel(LcdSettings::tr("Display menus"));
3613 
3614  gc->setHelpText(LcdSettings::tr("Display selected menu on LCD display. "));
3615 
3616  gc->setValue(true);
3617 
3618  return gc;
3619 }
3620 
3622 {
3623  auto *gs = new HostSpinBoxSetting("LCDPopupTime", 1, 300, 1, 1);
3624 
3625  gs->setLabel(LcdSettings::tr("Menu pop-up time"));
3626 
3627  gs->setHelpText(LcdSettings::tr("How many seconds the menu will remain "
3628  "visible after navigation."));
3629 
3630  gs->setValue(5);
3631 
3632  return gs;
3633 }
3634 
3636 {
3637  auto *gc = new HostCheckBoxSetting("LCDShowMusic");
3638 
3639  gc->setLabel(LcdSettings::tr("Display music artist and title"));
3640 
3641  gc->setHelpText(LcdSettings::tr("Display playing artist and song title in "
3642  "MythMusic on LCD display."));
3643 
3644  gc->setValue(true);
3645 
3646  return gc;
3647 }
3648 
3650 {
3651  auto *gc = new HostComboBoxSetting("LCDShowMusicItems");
3652 
3653  gc->setLabel(LcdSettings::tr("Items"));
3654 
3655  gc->addSelection(LcdSettings::tr("Artist - Title"), "ArtistTitle");
3656  gc->addSelection(LcdSettings::tr("Artist [Album] Title"),
3657  "ArtistAlbumTitle");
3658 
3659  gc->setHelpText(LcdSettings::tr("Which items to show when playing music."));
3660 
3661  return gc;
3662 }
3663 
3665 {
3666  auto *gc = new HostCheckBoxSetting("LCDShowChannel");
3667 
3668  gc->setLabel(LcdSettings::tr("Display channel information"));
3669 
3670  gc->setHelpText(LcdSettings::tr("Display tuned channel information on LCD "
3671  "display."));
3672 
3673  gc->setValue(true);
3674 
3675  return gc;
3676 }
3677 
3679 {
3680  auto *gc = new HostCheckBoxSetting("LCDShowVolume");
3681 
3682  gc->setLabel(LcdSettings::tr("Display volume information"));
3683 
3684  gc->setHelpText(LcdSettings::tr("Display volume level information "
3685  "on LCD display."));
3686 
3687  gc->setValue(true);
3688 
3689  return gc;
3690 }
3691 
3693 {
3694  auto *gc = new HostCheckBoxSetting("LCDShowGeneric");
3695 
3696  gc->setLabel(LcdSettings::tr("Display generic information"));
3697 
3698  gc->setHelpText(LcdSettings::tr("Display generic information on LCD display."));
3699 
3700  gc->setValue(true);
3701 
3702  return gc;
3703 }
3704 
3706 {
3707  auto *gc = new HostCheckBoxSetting("LCDBacklightOn");
3708 
3709  gc->setLabel(LcdSettings::tr("Backlight always on"));
3710 
3711  gc->setHelpText(LcdSettings::tr("Turn on the backlight permanently on the "
3712  "LCD display."));
3713  gc->setValue(true);
3714 
3715  return gc;
3716 }
3717 
3719 {
3720  auto *gc = new HostCheckBoxSetting("LCDHeartBeatOn");
3721 
3722  gc->setLabel(LcdSettings::tr("Heartbeat always on"));
3723 
3724  gc->setHelpText(LcdSettings::tr("Turn on the LCD heartbeat."));
3725 
3726  gc->setValue(false);
3727 
3728  return gc;
3729 }
3730 
3732 {
3733  auto *gc = new HostCheckBoxSetting("LCDBigClock");
3734 
3735  gc->setLabel(LcdSettings::tr("Display large clock"));
3736 
3737  gc->setHelpText(LcdSettings::tr("On multiline displays try and display the "
3738  "time as large as possible."));
3739 
3740  gc->setValue(false);
3741 
3742  return gc;
3743 }
3744 
3746 {
3747  auto *ge = new HostTextEditSetting("LCDKeyString");
3748 
3749  ge->setLabel(LcdSettings::tr("LCD key order"));
3750 
3751  ge->setValue("ABCDEF");
3752 
3753  ge->setHelpText(
3754  LcdSettings::tr("Enter the 6 Keypad Return Codes for your LCD keypad "
3755  "in the order in which you want the functions "
3756  "up/down/left/right/yes/no to operate. (See "
3757  "lcdproc/server/drivers/hd44780.c/keyMapMatrix[] "
3758  "or the matrix for your display)"));
3759  return ge;
3760 }
3761 
3763 {
3764  auto *gc = new HostCheckBoxSetting("LCDEnable");
3765 
3766  gc->setLabel(LcdSettings::tr("Enable LCD device"));
3767 
3768  gc->setHelpText(LcdSettings::tr("Use an LCD display to view MythTV status "
3769  "information."));
3770 
3771  gc->setValue(false);
3772  gc->addTargetedChild("1", LCDShowTime());
3773  gc->addTargetedChild("1", LCDShowMenu());
3774  gc->addTargetedChild("1", LCDShowMusic());
3775  gc->addTargetedChild("1", LCDShowMusicItems());
3776  gc->addTargetedChild("1", LCDShowChannel());
3777  gc->addTargetedChild("1", LCDShowRecStatus());
3778  gc->addTargetedChild("1", LCDShowVolume());
3779  gc->addTargetedChild("1", LCDShowGeneric());
3780  gc->addTargetedChild("1", LCDBacklightOn());
3781  gc->addTargetedChild("1", LCDHeartBeatOn());
3782  gc->addTargetedChild("1", LCDBigClock());
3783  gc->addTargetedChild("1", LCDKeyString());
3784  gc->addTargetedChild("1", LCDPopupTime());
3785  return gc;
3786 }
3787 
3788 
3789 #ifdef Q_OS_DARWIN
3790 static HostCheckBoxSetting *MacGammaCorrect()
3791 {
3792  HostCheckBoxSetting *gc = new HostCheckBoxSetting("MacGammaCorrect");
3793 
3794  gc->setLabel(PlaybackSettings::tr("Enable gamma correction for video"));
3795 
3796  gc->setValue(false);
3797 
3798  gc->setHelpText(PlaybackSettings::tr("If enabled, QuickTime will correct "
3799  "the gamma of the video to match "
3800  "your monitor. Turning this off can "
3801  "save some CPU cycles."));
3802  return gc;
3803 }
3804 
3805 static HostCheckBoxSetting *MacScaleUp()
3806 {
3807  HostCheckBoxSetting *gc = new HostCheckBoxSetting("MacScaleUp");
3808 
3809  gc->setLabel(PlaybackSettings::tr("Scale video as necessary"));
3810 
3811  gc->setValue(true);
3812 
3813  gc->setHelpText(PlaybackSettings::tr("If enabled, video will be scaled to "
3814  "fit your window or screen. If "
3815  "unchecked, video will never be made "
3816  "larger than its actual pixel size."));
3817  return gc;
3818 }
3819 
3820 static HostSpinBoxSetting *MacFullSkip()
3821 {
3822  HostSpinBoxSetting *gs = new HostSpinBoxSetting("MacFullSkip", 0, 30, 1, true);
3823 
3824  gs->setLabel(PlaybackSettings::tr("Frames to skip in fullscreen mode"));
3825 
3826  gs->setValue(0);
3827 
3828  gs->setHelpText(PlaybackSettings::tr("Video displayed in fullscreen or "
3829  "non-windowed mode will skip this "
3830  "many frames for each frame drawn. "
3831  "Set to 0 to show every frame. Only "
3832  "valid when either \"Use GUI size for "
3833  "TV playback\" or \"Run the frontend "
3834  "in a window\" is not checked."));
3835  return gs;
3836 }
3837 
3838 static HostCheckBoxSetting *MacMainEnabled()
3839 {
3840  HostCheckBoxSetting *gc = new HostCheckBoxSetting("MacMainEnabled");
3841 
3842  gc->setLabel(MacMainSettings::tr("Video in main window"));
3843 
3844  gc->setValue(true);
3845 
3846  gc->setHelpText(MacMainSettings::tr("If enabled, video will be displayed "
3847  "in the main GUI window. Disable this "
3848  "when you only want video on the "
3849  "desktop or in a floating window. Only "
3850  "valid when \"Use GUI size for TV "
3851  "playback\" and \"Run the frontend in "
3852  "a window\" are checked."));
3853  return gc;
3854 }
3855 
3856 static HostSpinBoxSetting *MacMainSkip()
3857 {
3858  HostSpinBoxSetting *gs = new HostSpinBoxSetting("MacMainSkip", 0, 30, 1, true);
3859 
3860  gs->setLabel(MacMainSettings::tr("Frames to skip"));
3861 
3862  gs->setValue(0);
3863 
3864  gs->setHelpText(MacMainSettings::tr("Video in the main window will skip "
3865  "this many frames for each frame "
3866  "drawn. Set to 0 to show every "
3867  "frame."));
3868  return gs;
3869 }
3870 
3871 static HostSpinBoxSetting *MacMainOpacity()
3872 {
3873  HostSpinBoxSetting *gs = new HostSpinBoxSetting("MacMainOpacity", 0, 100, 5, false);
3874 
3875  gs->setLabel(MacMainSettings::tr("Opacity"));
3876 
3877  gs->setValue(100);
3878 
3879  gs->setHelpText(MacMainSettings::tr("The opacity of the main window. Set "
3880  "to 100 for completely opaque, set "
3881  "to 0 for completely transparent."));
3882  return gs;
3883 }
3884 
3885 static HostCheckBoxSetting *MacFloatEnabled()
3886 {
3887  HostCheckBoxSetting *gc = new HostCheckBoxSetting("MacFloatEnabled");
3888 
3889  gc->setLabel(MacFloatSettings::tr("Video in floating window"));
3890 
3891  gc->setValue(false);
3892 
3893  gc->setHelpText(MacFloatSettings::tr("If enabled, video will be displayed "
3894  "in a floating window. Only valid "
3895  "when \"Use GUI size for TV "
3896  "playback\" and \"Run the frontend "
3897  "in a window\" are checked."));
3898  return gc;
3899 }
3900 
3901 static HostSpinBoxSetting *MacFloatSkip()
3902 {
3903  HostSpinBoxSetting *gs = new HostSpinBoxSetting("MacFloatSkip", 0, 30, 1, true);
3904 
3905  gs->setLabel(MacFloatSettings::tr("Frames to skip"));
3906 
3907  gs->setValue(0);
3908 
3909  gs->setHelpText(MacFloatSettings::tr("Video in the floating window will "
3910  "skip this many frames for each "
3911  "frame drawn. Set to 0 to show "
3912  "every frame."));
3913  return gs;
3914 }
3915 
3916 static HostSpinBoxSetting *MacFloatOpacity()
3917 {
3918  HostSpinBoxSetting *gs = new HostSpinBoxSetting("MacFloatOpacity", 0, 100, 5, false);
3919 
3920  gs->setLabel(MacFloatSettings::tr("Opacity"));
3921 
3922  gs->setValue(100);
3923 
3924  gs->setHelpText(MacFloatSettings::tr("The opacity of the floating window. "
3925  "Set to 100 for completely opaque, "
3926  "set to 0 for completely "
3927  "transparent."));
3928  return gs;
3929 }
3930 
3931 static HostCheckBoxSetting *MacDockEnabled()
3932 {
3933  HostCheckBoxSetting *gc = new HostCheckBoxSetting("MacDockEnabled");
3934 
3935  gc->setLabel(MacDockSettings::tr("Video in the dock"));
3936 
3937  gc->setValue(true);
3938 
3939  gc->setHelpText(MacDockSettings::tr("If enabled, video will be displayed "
3940  "in the application's dock icon. Only "
3941  "valid when \"Use GUI size for TV "
3942  "playback\" and \"Run the frontend in "
3943  "a window\" are checked."));
3944  return gc;
3945 }
3946 
3947 static HostSpinBoxSetting *MacDockSkip()
3948 {
3949  HostSpinBoxSetting *gs = new HostSpinBoxSetting("MacDockSkip", 0, 30, 1, true);
3950 
3951  gs->setLabel(MacDockSettings::tr("Frames to skip"));
3952 
3953  gs->setValue(3);
3954 
3955  gs->setHelpText(MacDockSettings::tr("Video in the dock icon will skip this "
3956  "many frames for each frame drawn. Set "
3957  "to 0 to show every frame."));
3958  return gs;
3959 }
3960 
3961 static HostCheckBoxSetting *MacDesktopEnabled()
3962 {
3963  HostCheckBoxSetting *gc = new HostCheckBoxSetting("MacDesktopEnabled");
3964 
3965  gc->setLabel(MacDesktopSettings::tr("Video on the desktop"));
3966 
3967  gc->setValue(false);
3968 
3969  gc->setHelpText(MacDesktopSettings::tr("If enabled, video will be "
3970  "displayed on the desktop, "
3971  "behind the Finder icons. "
3972  "Only valid when \"Use GUI "
3973  "size for TV playback\" and "
3974  "\"Run the frontend in a "
3975  "window\" are checked."));
3976  return gc;
3977 }
3978 
3979 static HostSpinBoxSetting *MacDesktopSkip()
3980 {
3981  HostSpinBoxSetting *gs = new HostSpinBoxSetting("MacDesktopSkip", 0, 30, 1, true);
3982 
3983  gs->setLabel(MacDesktopSettings::tr("Frames to skip"));
3984 
3985  gs->setValue(0);
3986 
3987  gs->setHelpText(MacDesktopSettings::tr("Video on the desktop will skip "
3988  "this many frames for each frame "
3989  "drawn. Set to 0 to show every "
3990  "frame."));
3991  return gs;
3992 }
3993 #endif
3994 
3995 
3997 {
3998  public:
4000 
4001  private slots:
4002  void childChanged(StandardSetting* /*unused*/) override;
4003 
4004  private:
4010 };
4011 
4013 {
4014  setLabel(MainGeneralSettings::tr("Shutdown/Reboot Settings"));
4015  auto *power = MythPower::AcquireRelease(this, true);
4018 #ifndef Q_OS_ANDROID
4022 #endif
4024  if (power)
4025  MythPower::AcquireRelease(this, false);
4026  connect(m_overrideExitMenu, qOverload<StandardSetting *>(&StandardSetting::valueChanged),
4028 }
4029 
4031 {
4033  return;
4034 
4035  bool confirmold = m_confirmCommand->isVisible();
4036  bool haltold = m_haltCommand->isVisible();
4037  bool rebootold = m_rebootCommand->isVisible();
4038  bool suspendold = m_suspendCommand->isVisible();
4039 
4040  switch (m_overrideExitMenu->getValue().toInt())
4041  {
4042  case 2:
4043  case 4:
4044  m_haltCommand->setVisible(true);
4045  m_rebootCommand->setVisible(false);
4046  m_suspendCommand->setVisible(false);
4048  break;
4049  case 3:
4050  case 6:
4051  m_haltCommand->setVisible(true);
4052  m_rebootCommand->setVisible(true);
4053  m_suspendCommand->setVisible(false);
4055  break;
4056  case 5:
4057  m_haltCommand->setVisible(false);
4058  m_rebootCommand->setVisible(true);
4059  m_suspendCommand->setVisible(false);
4061  break;
4062  case 8:
4063  case 9:
4064  m_haltCommand->setVisible(false);
4065  m_rebootCommand->setVisible(false);
4068  break;
4069  case 10:
4070  m_haltCommand->setVisible(true);
4071  m_rebootCommand->setVisible(true);
4074  break;
4075  case 0:
4076  case 1:
4077  default:
4078  m_haltCommand->setVisible(false);
4079  m_rebootCommand->setVisible(false);
4080  m_suspendCommand->setVisible(false);
4081  m_confirmCommand->setVisible(false);
4082  break;
4083  }
4084 
4085  if (confirmold != m_confirmCommand->isVisible() ||
4086  haltold != m_haltCommand->isVisible() ||
4087  rebootold != m_rebootCommand->isVisible() ||
4088  suspendold != m_suspendCommand->isVisible())
4089  {
4090  emit settingsChanged();
4091  }
4092 }
4093 
4095 {
4096 // DatabaseSettings::addDatabaseSettings(this);
4097  setLabel(tr("Main Settings"));
4098 
4099  addChild(new DatabaseSettings());
4100 
4101  auto *pin = new GroupSetting();
4102  pin->setLabel(tr("Settings Access"));
4103  pin->addChild(SetupPinCode());
4104  addChild(pin);
4105 
4106  auto *general = new GroupSetting();
4107  general->setLabel(tr("General"));
4108  general->addChild(UseVirtualKeyboard());
4109  general->addChild(ScreenShotPath());
4110 
4111  auto sh = getMythSortHelper();
4112  if (sh->hasPrefixes()) {
4113 #if 0
4114  // Last minute change. QStringRef::localeAwareCompare appears to
4115  // always do case insensitive sorting, so there's no point in
4116  // presenting this option to a user.
4117  general->addChild(SortCaseSensitive());
4118 #endif
4119  auto *stripPrefixes = SortStripPrefixes();
4120  general->addChild(stripPrefixes);
4121  stripPrefixes->addTargetedChild("1", SortPrefixExceptions());
4122  }
4123  addChild(general);
4124 
4126 
4128 
4129  auto *remotecontrol = new GroupSetting();
4130  remotecontrol->setLabel(tr("Remote Control"));
4131  remotecontrol->addChild(LircDaemonDevice());
4132  remotecontrol->addChild(NetworkControlEnabled());
4133  remotecontrol->addChild(NetworkControlPort());
4134  remotecontrol->addChild(UDPNotifyPort());
4135 #ifdef USING_LIBCEC
4136  HostCheckBoxSetting *cec = CECEnabled();
4137  remotecontrol->addChild(cec);
4138  m_cecPowerOnTVAllowed = CECPowerOnTVAllowed();
4139  m_cecPowerOffTVAllowed = CECPowerOffTVAllowed();
4140  m_cecPowerOnTVOnStart = CECPowerOnTVOnStart();
4141  m_cecPowerOffTVOnExit = CECPowerOffTVOnExit();
4142  cec->addTargetedChild("1",m_cecPowerOnTVAllowed);
4143  cec->addTargetedChild("1",m_cecPowerOffTVAllowed);
4144  cec->addTargetedChild("1",m_cecPowerOnTVOnStart);
4145  cec->addTargetedChild("1",m_cecPowerOffTVOnExit);
4146  connect(m_cecPowerOnTVAllowed, &MythUICheckBoxSetting::valueChanged,
4147  this, &MainGeneralSettings::cecChanged);
4148  connect(m_cecPowerOffTVAllowed, &MythUICheckBoxSetting::valueChanged,
4149  this, &MainGeneralSettings::cecChanged);
4150 #endif // USING_LIBCEC
4151  addChild(remotecontrol);
4152 
4153 #ifdef USING_AIRPLAY
4154  auto *airplay = new GroupSetting();
4155  airplay->setLabel(tr("AirPlay Settings"));
4156  airplay->addChild(AirPlayEnabled());
4157  airplay->addChild(AirPlayFullScreen());
4158  airplay->addChild(AirPlayAudioOnly());
4159  airplay->addChild(AirPlayPasswordSettings());
4160 // airplay->addChild(AirPlayInfo());
4161 // airplay->addChild(AirPlayRSAInfo());
4162  addChild(airplay);
4163 #endif
4164 }
4165 
4166 #ifdef USING_LIBCEC
4167 void MainGeneralSettings::cecChanged(bool /*setting*/)
4168 {
4169  if (m_cecPowerOnTVAllowed->boolValue())
4170  m_cecPowerOnTVOnStart->setEnabled(true);
4171  else
4172  {
4173  m_cecPowerOnTVOnStart->setEnabled(false);
4174  m_cecPowerOnTVOnStart->setValue(false);
4175  }
4176 
4177  if (m_cecPowerOffTVAllowed->boolValue())
4178  m_cecPowerOffTVOnExit->setEnabled(true);
4179  else
4180  {
4181  m_cecPowerOffTVOnExit->setEnabled(false);
4182  m_cecPowerOffTVOnExit->setValue(false);
4183  }
4184 }
4185 #endif // USING_LIBCEC
4186 
4188 {
4189  QStringList strlist( QString("REFRESH_BACKEND") );
4191  LOG(VB_GENERAL, LOG_ERR, QString("%1 called").arg(__FUNCTION__));
4193 }
4194 
4195 
4197 {
4198  public:
4199  PlayBackScaling();
4200  void updateButton(MythUIButtonListItem *item) override; // GroupSetting
4201 
4202  private slots:
4203  void childChanged(StandardSetting * /*setting*/) override; // StandardSetting
4204 
4205  private:
4210 };
4211 
4213 {
4214  setLabel(PlaybackSettings::tr("Scaling"));
4219  connect(m_vertScan, qOverload<StandardSetting *>(&StandardSetting::valueChanged),
4221  connect(m_yScan, qOverload<StandardSetting *>(&StandardSetting::valueChanged),
4223  connect(m_horizScan, qOverload<StandardSetting *>(&StandardSetting::valueChanged),
4225  connect(m_xScan, qOverload<StandardSetting *>(&StandardSetting::valueChanged),
4227 }
4228 
4229 
4231 {
4233  if (m_vertScan->getValue() == "0" &&
4234  m_horizScan->getValue() == "0" &&
4235  m_yScan->getValue() == "0" &&
4236  m_xScan->getValue() == "0")
4237  {
4238  item->SetText(PlaybackSettings::tr("No scaling"), "value");
4239  }
4240  else
4241  {
4242  item->SetText(QString("%1%x%2%+%3%+%4%")
4243  .arg(m_horizScan->getValue(),
4244  m_vertScan->getValue(),
4245  m_xScan->getValue(),
4246  m_yScan->getValue()),
4247  "value");
4248  }
4249 }
4250 
4252 {
4253  emit ShouldRedraw(this);
4254 }
4255 
4257  : StandardSettingDialog(stack, "playbacksettings", new PlaybackSettings())
4258 {
4259 }
4260 
4262 {
4264  if (item)
4265  {
4266  auto *config = item->GetData().value<PlaybackProfileItemConfig*>();
4267  if (config)
4269  }
4270 }
4271 
4272 
4274 {
4275  auto *menu = new MythMenu(tr("Playback Profile Menu"), this, "mainmenu");
4276 
4277  if (m_buttonList->GetItemPos(item) > 2)
4278  menu->AddItem(tr("Move Up"), &PlaybackSettingsDialog::MoveProfileItemUp);
4279  if (m_buttonList->GetItemPos(item) + 1 < m_buttonList->GetCount())
4280  menu->AddItem(tr("Move Down"), &PlaybackSettingsDialog::MoveProfileItemDown);
4281 
4282  menu->AddItem(tr("Delete"), &PlaybackSettingsDialog::DeleteProfileItem);
4283 
4284  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
4285 
4286  auto *menuPopup = new MythDialogBox(menu, popupStack, "menudialog");
4287  menuPopup->SetReturnEvent(this, "mainmenu");
4288 
4289  if (menuPopup->Create())
4290  popupStack->AddScreen(menuPopup);
4291  else
4292  delete menuPopup;
4293 }
4294 
4296 {
4298  if (item)
4299  {
4300  auto *config = item->GetData().value<PlaybackProfileItemConfig*>();
4301  if (config)
4302  {
4303  const int currentPos = m_buttonList->GetCurrentPos();
4304 
4305  config->DecreasePriority();
4306 
4307  m_buttonList->SetItemCurrent(currentPos + 1);
4308  }
4309  }
4310 }
4311 
4313 {
4315  if (item)
4316  {
4317  auto *config = item->GetData().value<PlaybackProfileItemConfig*>();
4318  if (config)
4319  {
4320  const int currentPos = m_buttonList->GetCurrentPos();
4321 
4322  config->IncreasePriority();
4323 
4324  m_buttonList->SetItemCurrent(currentPos - 1);
4325  }
4326  }
4327 }
4328 
4330 {
4331  auto *config = m_buttonList->GetDataValue().value<PlaybackProfileItemConfig*>();
4332  if (config)
4333  config->ShowDeleteDialog();
4334 }
4335 
4337 {
4338  setLabel(tr("Playback settings"));
4339 }
4340 
4342 {
4343  auto *general = new GroupSetting();
4344  general->setLabel(tr("General Playback"));
4345  general->addChild(JumpToProgramOSD());
4346  general->addChild(UseProgStartMark());
4347  general->addChild(AutomaticSetWatched());
4348  general->addChild(ContinueEmbeddedTVPlay());
4349  general->addChild(LiveTVIdleTimeout());
4350 
4351  general->addChild(FFmpegDemuxer());
4352 
4353  general->addChild(new PlayBackScaling());
4354  general->addChild(StereoDiscard());
4355  general->addChild(AspectOverride());
4356  general->addChild(AdjustFill());
4357 
4358  general->addChild(LetterboxingColour());
4359  general->addChild(PlaybackExitPrompt());
4360  general->addChild(EndOfRecordingExitPrompt());
4361  general->addChild(MusicChoiceEnabled());
4362  addChild(general);
4363 
4364  auto *advanced = new GroupSetting();
4365  advanced->setLabel(tr("Advanced Playback Settings"));
4366  advanced->addChild(RealtimePriority());
4367  advanced->addChild(AudioReadAhead());
4368  advanced->addChild(ColourPrimaries());
4369  advanced->addChild(ChromaUpsampling());
4370 #ifdef USING_VAAPI
4371  advanced->addChild(VAAPIDevice());
4372 #endif
4373 
4374  addChild(advanced);
4375 
4378 
4380  new ButtonStandardSetting(tr("Add a new playback profile"));
4384 
4385  auto *pbox = new GroupSetting();
4386  pbox->setLabel(tr("View Recordings"));
4387  pbox->addChild(PlayBoxOrdering());
4388  pbox->addChild(PlayBoxEpisodeSort());
4389  // Disabled until we re-enable live previews
4390  // pbox->addChild(PlaybackPreview());
4391  // pbox->addChild(HWAccelPlaybackPreview());
4392  pbox->addChild(PBBStartInTitle());
4393 
4394  auto *pbox2 = new GroupSetting();
4395  pbox2->setLabel(tr("Recording Groups"));
4396  pbox2->addChild(DisplayRecGroup());
4397  pbox2->addChild(QueryInitialFilter());
4398  pbox2->addChild(RememberRecGroup());
4399  pbox2->addChild(RecGroupMod());
4400 
4401  pbox->addChild(pbox2);
4402 
4403  pbox->addChild(DisplayGroupTitleSort());
4404 
4405  StandardSetting *playbackWatchList = PlaybackWatchList();
4406  playbackWatchList->addTargetedChild("1", PlaybackWLStart());
4407  playbackWatchList->addTargetedChild("1", PlaybackWLAutoExpire());
4408  playbackWatchList->addTargetedChild("1", PlaybackWLMaxAge());
4409  playbackWatchList->addTargetedChild("1", PlaybackWLBlackOut());
4410  pbox->addChild(playbackWatchList);
4411  addChild(pbox);
4412 
4413  auto *seek = new GroupSetting();
4414  seek->setLabel(tr("Seeking"));
4415  seek->addChild(SmartForward());
4416  seek->addChild(FFRewReposTime());
4417  seek->addChild(FFRewReverse());
4418 
4419  addChild(seek);
4420 
4421  auto *comms = new GroupSetting();
4422  comms->setLabel(tr("Commercial Skip"));
4423  comms->addChild(AutoCommercialSkip());
4424  comms->addChild(CommRewindAmount());
4425  comms->addChild(CommNotifyAmount());
4426  comms->addChild(MaximumCommercialSkip());
4427  comms->addChild(MergeShortCommBreaks());
4428 
4429  addChild(comms);
4430 
4431 #ifdef Q_OS_DARWIN
4432  GroupSetting* mac = new GroupSetting();
4433  mac->setLabel(tr("Mac OS X Video Settings"));
4434  mac->addChild(MacGammaCorrect());
4435  mac->addChild(MacScaleUp());
4436  mac->addChild(MacFullSkip());
4437 
4438  StandardSetting *floatEnabled = MacFloatEnabled();
4439  floatEnabled->addTargetedChild("1", MacFloatSkip());
4440  floatEnabled->addTargetedChild("1", MacFloatOpacity());
4441  mac->addChild(floatEnabled);
4442 
4443  StandardSetting *macMainEnabled = MacMainEnabled();
4444  macMainEnabled->addTargetedChild("1", MacMainSkip());
4445  macMainEnabled->addTargetedChild("1", MacMainOpacity());
4446  mac->addChild(macMainEnabled);
4447 
4448  StandardSetting *dockEnabled = MacDockEnabled();
4449  dockEnabled->addTargetedChild("1", MacDockSkip());
4450  mac->addChild(dockEnabled);
4451 
4452  StandardSetting* desktopEnabled = MacDesktopEnabled();
4453  desktopEnabled->addTargetedChild("1", MacDesktopSkip());
4454  mac->addChild(desktopEnabled);
4455 
4456  addChild(mac);
4457 #endif
4458 
4460 }
4461 
4463 {
4464  setLabel(tr("On-screen Display"));
4465 
4466  addChild(EnableMHEG());
4468  addChild(Visualiser());
4473 
4474  //GroupSetting *cc = new GroupSetting();
4475  //cc->setLabel(tr("Closed Captions"));
4476  //cc->addChild(DecodeVBIFormat());
4477  //addChild(cc);
4478 
4479 #ifdef Q_OS_MACOS
4480  // Any Mac OS-specific OSD stuff would go here.
4481 #endif
4482 }
4483 
4485 {
4486  setLabel(tr("General (Basic)"));
4487  auto *general = new GroupSetting();
4488  general->setLabel(tr("General (Basic)"));
4489  general->addChild(ChannelOrdering());
4490  general->addChild(ChannelFormat());
4491  general->addChild(LongChannelFormat());
4492 
4493  addChild(general);
4494 
4495  auto *autoexp = new GroupSetting();
4496 
4497  autoexp->setLabel(tr("General (Auto-Expire)"));
4498 
4499  autoexp->addChild(AutoExpireMethod());
4500 
4501  autoexp->addChild(RerecordWatched());
4502  autoexp->addChild(AutoExpireWatchedPriority());
4503 
4504  autoexp->addChild(AutoExpireLiveTVMaxAge());
4505  autoexp->addChild(AutoExpireDayPriority());
4506  autoexp->addChild(AutoExpireExtraSpace());
4507 
4508 // autoexp->addChild(new DeletedExpireOptions());
4509  autoexp->addChild(DeletedMaxAge());
4510 
4511  addChild(autoexp);
4512 
4513  auto *jobs = new GroupSetting();
4514 
4515  jobs->setLabel(tr("General (Jobs)"));
4516 
4517  jobs->addChild(CommercialSkipMethod());
4518  jobs->addChild(CommFlagFast());
4519  jobs->addChild(AggressiveCommDetect());
4520  jobs->addChild(DeferAutoTranscodeDays());
4521 
4522  addChild(jobs);
4523 
4524  auto *general2 = new GroupSetting();
4525 
4526  general2->setLabel(tr("General (Advanced)"));
4527 
4528  general2->addChild(RecordPreRoll());
4529  general2->addChild(RecordOverTime());
4530  general2->addChild(MaxStartGap());
4531  general2->addChild(MaxEndGap());
4532  general2->addChild(MinimumRecordingQuality());
4533  general2->addChild(CategoryOverTimeSettings());
4534  addChild(general2);
4535 
4536  auto *changrp = new GroupSetting();
4537 
4538  changrp->setLabel(tr("General (Channel Groups)"));
4539 
4540  changrp->addChild(ChannelGroupRememberLast());
4541  changrp->addChild(ChannelGroupDefault());
4542  changrp->addChild(BrowseChannelGroup());
4543 
4544  addChild(changrp);
4545 }
4546 
4548 {
4549  setLabel(tr("Program Guide"));
4550 
4553 }
4554 
4556 {
4557  auto *sched = new GroupSetting();
4558 
4559  sched->setLabel(tr("Scheduler Options"));
4560 
4561  sched->addChild(GRSchedOpenEnd());
4562  sched->addChild(GRPrefInputRecPriority());
4563  sched->addChild(GRHDTVRecPriority());
4564  sched->addChild(GRWSRecPriority());
4565 
4566  addChild(sched);
4567 
4568  auto *access = new GroupSetting();
4569 
4570  access->setLabel(tr("Accessibility Options"));
4571 
4572  access->addChild(GRSignLangRecPriority());
4573  access->addChild(GROnScrSubRecPriority());
4574  access->addChild(GRCCRecPriority());
4575  access->addChild(GRHardHearRecPriority());
4576  access->addChild(GRAudioDescRecPriority());
4577 
4578  addChild(access);
4579 }
4580 
4582 {
4583  public:
4584  GuiDimension();
4585  //QString getValue() override; // StandardSetting
4586  void updateButton(MythUIButtonListItem *item) override; // GroupSetting
4587 
4588  private slots:
4589  void childChanged(StandardSetting * /*setting*/) override; // StandardSetting
4590  private:
4595 };
4596 
4598 {
4599  setLabel(AppearanceSettings::tr("GUI dimension"));
4600  addChild(m_width = GuiWidth());
4604  connect(m_width, qOverload<StandardSetting *>(&StandardSetting::valueChanged),
4606  connect(m_height, qOverload<StandardSetting *>(&StandardSetting::valueChanged),
4608  connect(m_offsetX, qOverload<StandardSetting *>(&StandardSetting::valueChanged),
4610  connect(m_offsetY, qOverload<StandardSetting *>(&StandardSetting::valueChanged),
4612 }
4613 
4615 {
4617  if ((m_width->getValue() == "0" ||
4618  m_height->getValue() == "0") &&
4619  m_offsetX->getValue() == "0" &&
4620  m_offsetY->getValue() == "0")
4621  {
4622  item->SetText(AppearanceSettings::tr("Fullscreen"), "value");
4623  }
4624  else
4625  {
4626  item->SetText(QString("%1x%2+%3+%4")
4627  .arg(m_width->getValue(),
4628  m_height->getValue(),
4629  m_offsetX->getValue(),
4630  m_offsetY->getValue()),
4631  "value");
4632  }
4633 }
4634 
4636 {
4637  emit ShouldRedraw(this);
4638 }
4639 
4641 {
4642  QCoreApplication::processEvents();
4643  GetMythMainWindow()->JumpTo("Reload Theme");
4644 }
4645 
4647 {
4649  QList screens = QGuiApplication::screens();
4650  for (QScreen *qscreen : qAsConst(screens))
4651  {
4652  QString extra = MythDisplay::GetExtraScreenInfo(qscreen);
4653  m_screen->addSelection(qscreen->name() + extra, qscreen->name());
4654  }
4655  if (Screens > 1)
4656  m_screen->addSelection(AppearanceSettings::tr("All"), QString::number(-1));
4657 }
4658 
4660 {
4661  auto *screen = new GroupSetting();
4662  screen->setLabel(tr("Theme / Screen Settings"));
4663  addChild(screen);
4664 
4665  AddPaintEngine(screen);
4666  screen->addChild(MenuTheme());
4667  screen->addChild(GUIRGBLevels());
4668 
4672  screen->addChild(m_screen);
4673  screen->addChild(m_screenAspect);
4676 
4677  screen->addChild(new GuiDimension());
4678 
4679  screen->addChild(GuiSizeForTV());
4680  screen->addChild(HideMouseCursor());
4682  {
4683  screen->addChild(RunInWindow());
4684  screen->addChild(AlwaysOnTop());
4685  }
4686  screen->addChild(StartupScreenDelay());
4687  screen->addChild(GUIFontZoom());
4688 #ifdef USING_AIRPLAY
4689  screen->addChild(AirPlayFullScreen());
4690 #endif
4691 
4692  MythDisplay* display = GetMythMainWindow()->GetDisplay();
4693  if (display->VideoModesAvailable())
4694  {
4695  std::vector<MythDisplayMode> scr = display->GetVideoModes();
4696  if (!scr.empty())
4698  }
4699 
4700  auto *dates = new GroupSetting();
4701 
4702  dates->setLabel(tr("Localization"));
4703 
4704  dates->addChild(MythLanguage());
4705  dates->addChild(ISO639PreferredLanguage(0));
4706  dates->addChild(ISO639PreferredLanguage(1));
4707  dates->addChild(MythDateFormatCB());
4708  dates->addChild(MythShortDateFormat());
4709  dates->addChild(MythTimeFormat());
4710 
4711  addChild(dates);
4712 
4713  addChild(LCDEnable());
4714 }
4715 
4716 /*******************************************************************************
4717 * Channel Groups *
4718 *******************************************************************************/
4719 
4721 {
4722  public:
4724  const QString &channum, const QString &name);
4725  uint getChannelId() const{return m_channelId;};
4726  private:
4728 
4729 };
4730 
4732  const QString &channum, const QString &channame)
4733  : m_channelId(chanid)
4734 {
4735  setLabel(QString("%1 %2").arg(channum, channame));
4736  setHelpText(ChannelGroupSettings::tr("Select/Unselect channels for this channel group"));
4737 }
4738 
4740  int groupId = -1)
4741  : m_groupId(groupId)
4742 {
4743  setLabel(groupName);//TODO this should be the translated name if Favorite
4744  setValue(groupName);
4746  m_groupName->setLabel(groupName);
4747 }
4748 
4750 {
4751  //Change the name
4752  if ((m_groupName && m_groupName->haveChanged())
4753  || m_groupId == -1)
4754  {
4755  if (m_groupId == -1)//create a new group
4756  {
4757  MSqlQuery query(MSqlQuery::InitCon());
4758  QString newname = m_groupName ? m_groupName->getValue() : "undefined";
4759  QString qstr =
4760  "INSERT INTO channelgroupnames (name) VALUE (:NEWNAME);";
4761  query.prepare(qstr);
4762  query.bindValue(":NEWNAME", newname);
4763 
4764  if (!query.exec())
4765  MythDB::DBError("ChannelGroupSetting::Close", query);
4766  else
4767  {
4768  //update m_groupId
4769  QString qstr2 = "SELECT grpid FROM channelgroupnames "
4770  "WHERE name = :NEWNAME;";
4771  query.prepare(qstr2);
4772  query.bindValue(":NEWNAME", newname);
4773  if (!query.exec())
4774  MythDB::DBError("ChannelGroupSetting::Close", query);
4775  else
4776  if (query.next())
4777  m_groupId = query.value(0).toUInt();
4778  }
4779  }
4780  else
4781  {
4782  MSqlQuery query(MSqlQuery::InitCon());
4783  QString qstr = "UPDATE channelgroupnames set name = :NEWNAME "
4784  " WHERE name = :OLDNAME ;";
4785  query.prepare(qstr);
4786  query.bindValue(":NEWNAME", m_groupName->getValue());
4787  query.bindValue(":OLDNAME", getValue());
4788 
4789  if (!query.exec())
4790  MythDB::DBError("ChannelGroupSetting::Close", query);
4791  else
4792  if (query.next())
4793  m_groupId = query.value(0).toUInt();
4794  }
4795  }
4796 
4797  if (m_groupId == -1)
4798  return;
4799 
4800  QList<StandardSetting *> *children = getSubSettings();
4801  if (!children)
4802  return;
4803 
4804  QList<StandardSetting *>::const_iterator i;
4805  for (i = children->constBegin(); i != children->constEnd(); ++i)
4806  {
4807  if ((*i)->haveChanged())
4808  {
4809  if ((*i) != m_groupName)
4810  {
4811  auto *channel = dynamic_cast<ChannelCheckBoxSetting *>(*i);
4812  if (channel)
4813  {
4814  if (channel->boolValue())
4815  {
4816  ChannelGroup::AddChannel(channel->getChannelId(),
4817  m_groupId);
4818  }
4819  else
4820  {
4821  ChannelGroup::DeleteChannel(channel->getChannelId(),
4822  m_groupId);
4823  }
4824  }
4825  }
4826  }
4827  }
4828 }
4829 
4831 {
4832  clearSettings();
4833 
4834  // We cannot rename the Favorite group, make it readonly
4836  m_groupName->setLabel(tr("Group name"));
4840 
4841  MSqlQuery query(MSqlQuery::InitCon());
4842 
4843  QString qstr =
4844  "SELECT channel.chanid, channum, name, grpid FROM channel "
4845  "LEFT JOIN channelgroup "
4846  "ON (channel.chanid = channelgroup.chanid AND grpid = :GRPID) "
4847  "WHERE deleted IS NULL "
4848  "ORDER BY channum+0; "; //to order by numeric value of channel number
4849 
4850  query.prepare(qstr);
4851 
4852  query.bindValue(":GRPID", m_groupId);
4853 
4854  if (!query.exec() || !query.isActive())
4855  MythDB::DBError("ChannelGroupSetting::Load", query);
4856  else
4857  {
4858  while (query.next())
4859  {
4860  auto *channelCheckBox =
4861  new ChannelCheckBoxSetting(query.value(0).toUInt(),
4862  query.value(1).toString(),
4863  query.value(2).toString());
4864  channelCheckBox->setValue(!query.value(3).isNull());
4865  addChild(channelCheckBox);
4866  }
4867  }
4868 
4870 }
4871 
4873 {
4874  //can not delete new group or Favorite
4875  return (m_groupId > 1);
4876 }
4877 
4879 {
4880  MSqlQuery query(MSqlQuery::InitCon());
4881  // Delete channels from this group
4882  query.prepare("DELETE FROM channelgroup WHERE grpid = :GRPID;");
4883  query.bindValue(":GRPID", m_groupId);
4884  if (!query.exec())
4885  MythDB::DBError("ChannelGroupSetting::deleteEntry", query);
4886 
4887  // Now delete the group from channelgroupnames
4888  query.prepare("DELETE FROM channelgroupnames WHERE grpid = :GRPID;");
4889  query.bindValue(":GRPID", m_groupId);
4890  if (!query.exec())
4891  MythDB::DBError("ChannelGroupSetting::Close", query);
4892 }
4893 
4895 {
4896  setLabel(tr("Channel Groups"));
4897 }
4898 
4900 {
4901  clearSettings();
4902  auto *newGroup = new ButtonStandardSetting(tr("(Create New Channel Group)"));
4903  connect(newGroup, &ButtonStandardSetting::clicked,
4905  addChild(newGroup);
4906 
4908  for (auto it = list.begin(); it < list.end(); ++it)
4909  {
4910  QString name =
4911  (it->m_name == "Favorites") ? tr("Favorites") :
4912  (it->m_name == "Priority" ) ? tr("Priority" ) : it->m_name;
4913  addChild(new ChannelGroupSetting(name, it->m_grpId));
4914  }
4915 
4916  // Load all the groups
4918 
4919  // TODO select the new one or the edited one
4920  emit settingsChanged(nullptr);
4921 }
4922 
4924 {
4925  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
4926  auto *settingdialog = new MythTextInputDialog(popupStack,
4927  tr("Enter the name of the new channel group"));
4928 
4929  if (settingdialog->Create())
4930  {
4931  connect(settingdialog, &MythTextInputDialog::haveResult,
4933  popupStack->AddScreen(settingdialog);
4934  }
4935  else
4936  {
4937  delete settingdialog;
4938  }
4939 }
4940 
4941 void ChannelGroupsSetting::CreateNewGroup(const QString& name)
4942 {
4943  auto *button = new ChannelGroupSetting(name,-1);
4944  button->setLabel(name);
4945  button->Load();
4946  addChild(button);
4947  emit settingsChanged(this);
4948 }
4949 
4950 
4951 // vim:set sw=4 ts=4 expandtab:
RunInWindow
static HostCheckBoxSetting * RunInWindow()
Definition: globalsettings.cpp:2597
PlaybackProfileConfig::InitUI
void InitUI(StandardSetting *parent)
Definition: globalsettings.cpp:1232
LCDPopupTime
static HostSpinBoxSetting * LCDPopupTime()
Definition: globalsettings.cpp:3621
MSqlQuery::isActive
bool isActive(void) const
Definition: mythdbcon.h:216
LCDBacklightOn
static HostCheckBoxSetting * LCDBacklightOn()
Definition: globalsettings.cpp:3705
globalsettings.h
MSqlQuery::next
bool next(void)
Wrap QSqlQuery::next() so we can display the query results.
Definition: mythdbcon.cpp:807
MSqlQuery
QSqlQuery wrapper that fetches a DB connection from the connection pool.
Definition: mythdbcon.h:128
PlaybackProfileConfig::m_groupId
uint m_groupId
Definition: globalsettings.h:295
MythUIComboBoxSetting::clearSelections
void clearSelections()
Definition: standardsettings.cpp:514
GuiDimension::m_offsetX
StandardSetting * m_offsetX
Definition: globalsettings.cpp:4593
PlaybackWLStart
static HostCheckBoxSetting * PlaybackWLStart()
Definition: globalsettings.cpp:3494
MythVideoProfile::InitStatics
static void InitStatics(bool Reinit=false)
Definition: mythvideoprofile.cpp:1312
MythDate::toString
QString toString(const QDateTime &raw_dt, uint format)
Returns formatted string representing the time.
Definition: mythdate.cpp:84
PlayBackScaling::m_xScan
StandardSetting * m_xScan
Definition: globalsettings.cpp:4208
MythUIButtonList::GetItemCurrent
MythUIButtonListItem * GetItemCurrent() const
Definition: mythuibuttonlist.cpp:1587
PrimariesRelaxed
@ PrimariesRelaxed
Definition: videoouttypes.h:145
LCDShowMenu
static HostCheckBoxSetting * LCDShowMenu()
Definition: globalsettings.cpp:3608
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:735
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:166
SortPrefixExceptions
static GlobalTextEditSetting * SortPrefixExceptions()
Definition: globalsettings.cpp:2929
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:170
PlaybackSettings::NewPlaybackProfileSlot
void NewPlaybackProfileSlot(void) const
Definition: globalsettings.cpp:1374
LCDKeyString
static HostTextEditSetting * LCDKeyString()
Definition: globalsettings.cpp:3745
MythLanguage
static GlobalComboBoxSetting * MythLanguage()
Definition: globalsettings.cpp:3135
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:209
LCDShowGeneric
static HostCheckBoxSetting * LCDShowGeneric()
Definition: globalsettings.cpp:3692
GuiSizeForTV
static HostCheckBoxSetting * GuiSizeForTV()
Definition: globalsettings.cpp:2283
MythVideoProfile::GetProfileGroupID
static uint GetProfileGroupID(const QString &ProfileName, const QString &HostName)
Definition: mythvideoprofile.cpp:908
AggressiveCommDetect
static GlobalCheckBoxSetting * AggressiveCommDetect()
Definition: globalsettings.cpp:337
GRPrefInputRecPriority
static GlobalSpinBoxSetting * GRPrefInputRecPriority()
Definition: globalsettings.cpp:2970
PlaybackSettings::m_playbackProfiles
MythUIComboBoxSetting * m_playbackProfiles
Definition: globalsettings.h:47
PlaybackProfileItemConfig::m_heightRange
TransTextEditSetting * m_heightRange
Definition: globalsettings.h:251
PlaybackProfileItemConfig::m_upscaler
TransMythUIComboBoxSetting * m_upscaler
Definition: globalsettings.h:258
false
VERBOSE_PREAMBLE false
Definition: verbosedefs.h:89
MythVideoProfile::SaveDB
static bool SaveDB(uint GroupId, std::vector< MythVideoProfileItem > &Items)
Definition: mythvideoprofile.cpp:572
MythVideoProfileItem
Definition: mythvideoprofile.h:55
PlaybackProfileConfig::m_addNewEntry
ButtonStandardSetting * m_addNewEntry
Definition: globalsettings.h:298
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:1371
MythVideoProfile::CreateProfiles
static void CreateProfiles(const QString &HostName)
Definition: mythvideoprofile.cpp:1073
MythVideoProfile::GetDeinterlacers
static const QList< QPair< QString, QString > > & GetDeinterlacers()
Definition: mythvideoprofile.cpp:1299
MythVideoProfile::CreateProfileGroup
static uint CreateProfileGroup(const QString &ProfileName, const QString &HostName)
Definition: mythvideoprofile.cpp:1002
PREF_LOOP
static constexpr const char * PREF_LOOP
Definition: mythvideoprofile.h:36
MythVideoProfile::DeleteProfileGroup
static bool DeleteProfileGroup(const QString &GroupName, const QString &HostName)
Definition: mythvideoprofile.cpp:1021
TVVidModeForceAspect
static HostComboBoxSetting * TVVidModeForceAspect(int idx=-1)
Definition: globalsettings.cpp:2491
AlwaysOnTop
static HostCheckBoxSetting * AlwaysOnTop()
Definition: globalsettings.cpp:2610
TransMythUIComboBoxSetting
Definition: standardsettings.h:272
DEINT_QUALITY_MEDIUM
static constexpr const char * DEINT_QUALITY_MEDIUM
Definition: mythvideoprofile.h:23
TransTextEditSetting
Definition: standardsettings.h:161
PersistentBrowseMode
static HostCheckBoxSetting * PersistentBrowseMode()
Definition: globalsettings.cpp:1712
StandardSetting::removeTargetedChild
void removeTargetedChild(const QString &value, StandardSetting *child)
Definition: standardsettings.cpp:124
MythVideoProfile::LoadDB
static std::vector< MythVideoProfileItem > LoadDB(uint GroupId)
Definition: mythvideoprofile.cpp:491
StandardSettingDialog::m_buttonList
MythUIButtonList * m_buttonList
Definition: standardsettings.h:497
ShutDownRebootSetting::m_haltCommand
StandardSetting * m_haltCommand
Definition: globalsettings.cpp:4006
MythVideoProfile::GetVideoRendererHelp
static QString GetVideoRendererHelp(const QString &Renderer)
Definition: mythvideoprofile.cpp:1218
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:4614
ChannelOrdering
static HostComboBoxSetting * ChannelOrdering()
Definition: globalsettings.cpp:1587
GRHardHearRecPriority
static GlobalSpinBoxSetting * GRHardHearRecPriority()
Definition: globalsettings.cpp:3073
AutoExpireDayPriority
static GlobalSpinBoxSetting * AutoExpireDayPriority()
Definition: globalsettings.cpp:533
GRSignLangRecPriority
static GlobalSpinBoxSetting * GRSignLangRecPriority()
Definition: globalsettings.cpp:3020
AdjustFill
static HostComboBoxSetting * AdjustFill()
Definition: globalsettings.cpp:2203
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:3526
GuiVidModeResolution
static HostComboBoxSetting * GuiVidModeResolution()
Definition: globalsettings.cpp:2341
MythMainWindow::JumpTo
void JumpTo(const QString &Destination, bool Pop=true)
Definition: mythmainwindow.cpp:1450
kAdjustFill_Off
@ kAdjustFill_Off
Definition: videoouttypes.h:74
MythTimeFormat
static HostComboBoxSetting * MythTimeFormat()
Definition: globalsettings.cpp:2761
PlaybackSettings
Definition: globalsettings.h:33
kLetterBoxColour_END
@ kLetterBoxColour_END
Definition: videoouttypes.h:91
PlaybackBox::TitleSortAlphabetical
@ TitleSortAlphabetical
Definition: playbackbox.h:84
HideMouseCursor
static HostCheckBoxSetting * HideMouseCursor()
Definition: globalsettings.cpp:2579
TransMythUISpinBoxSetting
Definition: standardsettings.h:353
SetupPinCode
static HostTextEditSetting * SetupPinCode()
Definition: globalsettings.cpp:2102
kLetterBoxColour_Black
@ kLetterBoxColour_Black
Definition: videoouttypes.h:89
LCDShowMusic
static HostCheckBoxSetting * LCDShowMusic()
Definition: globalsettings.cpp:3635
JumpToProgramOSD
static HostCheckBoxSetting * JumpToProgramOSD()
Definition: globalsettings.cpp:1812
DEINT_QUALITY_HIGH
static constexpr const char * DEINT_QUALITY_HIGH
Definition: mythvideoprofile.h:24
RecordPreRoll
static GlobalSpinBoxSetting * RecordPreRoll()
Definition: globalsettings.cpp:596
sched
Scheduler * sched
ChannelGroup::AddChannel
static bool AddChannel(uint chanid, int changrpid)
Definition: channelgroup.cpp:71
PlaybackProfileItemConfig
Definition: globalsettings.h:213
PlaybackProfileConfig::m_items
std::vector< MythVideoProfileItem > m_items
Definition: globalsettings.h:292
MythConfirmationDialog::haveResult
void haveResult(bool)
MSqlQuery::value
QVariant value(int i) const
Definition: mythdbcon.h:205
MythScreenStack
Definition: mythscreenstack.h:16
MainGeneralSettings::applyChange
void applyChange() override
Definition: globalsettings.cpp:4187
mythdbcon.h
LongChannelFormat
static HostComboBoxSetting * LongChannelFormat()
Definition: globalsettings.cpp:2819
Visualiser
static HostComboBoxSetting * Visualiser()
Definition: globalsettings.cpp:1699
AppearanceSettings::m_screenAspect
HostComboBoxSetting * m_screenAspect
Definition: globalsettings.h:165
GRSchedOpenEnd
static GlobalComboBoxSetting * GRSchedOpenEnd()
Definition: globalsettings.cpp:2945
AppearanceSettings::applyChange
void applyChange() override
Definition: globalsettings.cpp:4640
MythVideoProfile::GetVideoRenderers
static QStringList GetVideoRenderers(const QString &Decoder)
Definition: mythvideoprofile.cpp:1207
ChannelGroup::GetManualChannelGroups
static ChannelGroupList GetManualChannelGroups(bool includeEmpty=true)
Definition: channelgroup.cpp:189
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:305
toUserString
QString toUserString(PrimariesMode Mode)
Definition: videoouttypes.h:149
MSqlQuery::exec
bool exec(void)
Wrap QSqlQuery::exec() so we can display SQL.
Definition: mythdbcon.cpp:608
kAspect_Off
@ kAspect_Off
Definition: videoouttypes.h:63
kRenderOpenGL
@ kRenderOpenGL
Definition: mythrender_base.h:19
VideoModeSettings
Definition: globalsettings.h:50
MythPower::FeatureShutdown
@ FeatureShutdown
Definition: mythpower.h:42
SkipTypeToString
QString SkipTypeToString(int flags)
Definition: programtypes.cpp:91
ISO639PreferredLanguage
static GlobalComboBoxSetting * ISO639PreferredLanguage(uint i)
Definition: globalsettings.cpp:3189
PlaybackSettingsDialog::ShowPlaybackProfileMenu
void ShowPlaybackProfileMenu(MythUIButtonListItem *item)
Definition: globalsettings.cpp:4273
StandardSetting::clearSettings
virtual void clearSettings()
Definition: standardsettings.cpp:160
GuiHeight
static HostSpinBoxSetting * GuiHeight()
Definition: globalsettings.cpp:2240
MythVideoProfile::GetUpscalers
static std::vector< std::pair< QString, QString > > GetUpscalers()
Definition: mythvideoprofile.cpp:720
COND_RATE
static constexpr const char * COND_RATE
Definition: mythvideoprofile.h:32
ISO639_fill_selections
static void ISO639_fill_selections(MythUIComboBoxSetting *widget, uint i)
Definition: globalsettings.cpp:3162
PlaybackProfileItemConfig::m_vidRend
TransMythUIComboBoxSetting * m_vidRend
Definition: globalsettings.h:257
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
playgroup.h
PlaybackProfileConfig::AddNewEntry
void AddNewEntry(void)
Definition: globalsettings.cpp:1304
PlayBackScaling::m_horizScan
StandardSetting * m_horizScan
Definition: globalsettings.cpp:4207
StandardSetting::addTargetedChild
void addTargetedChild(const QString &value, StandardSetting *setting)
Definition: standardsettings.cpp:117
PlaybackProfileItemConfig::heightChanged
void heightChanged(const QString &val)
Definition: globalsettings.cpp:1016
PlaybackWatchList
static HostCheckBoxSetting * PlaybackWatchList()
Definition: globalsettings.cpp:3478
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:3038
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:3508
ChannelGroup::GetChannelGroups
static ChannelGroupList GetChannelGroups(bool includeEmpty=true)
Definition: channelgroup.cpp:328
GroupSetting::GroupSetting
GroupSetting()=default
toDBString
QString toDBString(PrimariesMode Mode)
Definition: videoouttypes.h:156
ChannelGroupRememberLast
static HostCheckBoxSetting * ChannelGroupRememberLast()
Definition: globalsettings.cpp:2838
MythVideoProfile::GetVideoRendererName
static QString GetVideoRendererName(const QString &Renderer)
Definition: mythvideoprofile.cpp:847
PlaybackWLBlackOut
static HostSpinBoxSetting * PlaybackWLBlackOut()
Definition: globalsettings.cpp:3542
mythdirs.h
ChannelGroupSetting::m_groupName
TransTextEditSetting * m_groupName
Definition: globalsettings.h:316
mythsorthelper.h
PlayBoxEpisodeSort
static HostComboBoxSetting * PlayBoxEpisodeSort()
Definition: globalsettings.cpp:1449
UseVirtualKeyboard
static HostCheckBoxSetting * UseVirtualKeyboard()
Definition: globalsettings.cpp:1912
PlayBackScaling::m_vertScan
StandardSetting * m_vertScan
Definition: globalsettings.cpp:4206
AutoExpireWatchedPriority
static GlobalCheckBoxSetting * AutoExpireWatchedPriority()
Definition: globalsettings.cpp:518
LCDBigClock
static HostCheckBoxSetting * LCDBigClock()
Definition: globalsettings.cpp:3731
PlaybackProfileItemConfig::m_singleDeint
TransMythUIComboBoxSetting * m_singleDeint
Definition: globalsettings.h:259
PlaybackProfileItemConfig::m_doubleShader
TransMythUICheckBoxSetting * m_doubleShader
Definition: globalsettings.h:263
PlaybackProfileItemConfig::m_decoder
TransMythUIComboBoxSetting * m_decoder
Definition: globalsettings.h:254
PlaybackProfileItemConfig::DoubleQualityChanged
void DoubleQualityChanged(const QString &Quality)
Definition: globalsettings.cpp:1082
PREF_DEINT2X
static constexpr const char * PREF_DEINT2X
Definition: mythvideoprofile.h:39
MythTextInputDialog::haveResult
void haveResult(QString)
MythPower::IsFeatureSupported
bool IsFeatureSupported(Feature Supported)
Definition: mythpower.cpp:165
MainGeneralSettings::MainGeneralSettings
MainGeneralSettings()
Definition: globalsettings.cpp:4094
HostCheckBoxSetting
Definition: standardsettings.h:417
COND_WIDTH
static constexpr const char * COND_WIDTH
Definition: mythvideoprofile.h:30
PlaybackProfileItemConfig::m_skipLoop
TransMythUICheckBoxSetting * m_skipLoop
Definition: globalsettings.h:256
MythUIButtonList::GetCount
int GetCount() const
Definition: mythuibuttonlist.cpp:1652
MythDate::current
QDateTime current(bool stripped)
Returns current Date and Time in UTC.
Definition: mythdate.cpp:14
StandardSetting::haveChanged
bool haveChanged()
Return true if the setting have changed or any of its children.
Definition: standardsettings.cpp:186
PlaybackProfileItemConfig::m_parentConfig
PlaybackProfileConfig * m_parentConfig
Definition: globalsettings.h:265
ChannelGroupSetting::Save
void Save() override
Definition: globalsettings.cpp:4749
PlaybackSettingsDialog::ShowMenu
void ShowMenu(void) override
Definition: globalsettings.cpp:4261
langsettings.h
tmp
static guint32 * tmp
Definition: goom_core.cpp:26
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:294
MythUIButtonListItem::SetText
void SetText(const QString &text, const QString &name="", const QString &state="")
Definition: mythuibuttonlist.cpp:3268
FrontendIdleTimeout
static HostSpinBoxSetting * FrontendIdleTimeout()
Definition: globalsettings.cpp:1928
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:1695
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:2326
PlaybackSettingsDialog::DeleteProfileItem
void DeleteProfileItem(void)
Definition: globalsettings.cpp:4329
GRAudioDescRecPriority
static GlobalSpinBoxSetting * GRAudioDescRecPriority()
Definition: globalsettings.cpp:3090
MythVideoProfile::GetProfiles
static QStringList GetProfiles(const QString &HostName)
Definition: mythvideoprofile.cpp:865
EPGSettings::EPGSettings
EPGSettings()
Definition: globalsettings.cpp:4547
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:209
ChannelGroupSetting
Definition: globalsettings.h:303
HostRefreshRateComboBoxSetting::GetRefreshRates
static std::vector< double > GetRefreshRates(const QString &resolution)
Definition: globalsettings.cpp:2445
playbackbox.h
mythraopconnection.h
StandardSetting::settingsChanged
void settingsChanged(StandardSetting *selectedSetting=nullptr)
mythrenderopengl.h
StandardSettingDialog
Definition: standardsettings.h:468
StandardSetting::addChild
virtual void addChild(StandardSetting *child)
Definition: standardsettings.cpp:71
FFRewReposTime
static HostSpinBoxSetting * FFRewReposTime()
Definition: globalsettings.cpp:1466
ShutDownRebootSetting::childChanged
void childChanged(StandardSetting *) override
Definition: globalsettings.cpp:4030
ShutDownRebootSetting::ShutDownRebootSetting
ShutDownRebootSetting()
Definition: globalsettings.cpp:4012
VideoModeSettings::VideoModeSettings
VideoModeSettings(const char *c)
Definition: globalsettings.cpp:2544
ConfirmPowerEvent
static HostCheckBoxSetting * ConfirmPowerEvent()
Definition: globalsettings.cpp:1952
LircDaemonDevice
static HostTextEditSetting * LircDaemonDevice()
Definition: globalsettings.cpp:2065
ChannelGroupsSetting::Load
void Load() override
Definition: globalsettings.cpp:4899
mythdisplay.h
LCDEnable
static HostCheckBoxSetting * LCDEnable()
Definition: globalsettings.cpp:3762
ShutDownRebootSetting::m_overrideExitMenu
StandardSetting * m_overrideExitMenu
Definition: globalsettings.cpp:4005
FFRewReverse
static HostCheckBoxSetting * FFRewReverse()
Definition: globalsettings.cpp:1485
kAspect_END
@ kAspect_END
Definition: videoouttypes.h:68
ShutDownRebootSetting
Definition: globalsettings.cpp:3996
mythlogging.h
LiveTVIdleTimeout
static HostSpinBoxSetting * LiveTVIdleTimeout()
Definition: globalsettings.cpp:1865
RecGroupMod
static HostCheckBoxSetting * RecGroupMod()
Definition: globalsettings.cpp:222
themeinfo.h
StandardSetting::getSubSettings
virtual QList< StandardSetting * > * getSubSettings()
Definition: standardsettings.cpp:146
MythCoreContext::GetQLocale
QLocale GetQLocale(void)
Definition: mythcorecontext.cpp:1863
hardwareprofile.scan.profile
profile
Definition: scan.py:99
MythUIComboBoxSetting
Definition: standardsettings.h:218
GeneralRecPrioritiesSettings::GeneralRecPrioritiesSettings
GeneralRecPrioritiesSettings()
Definition: globalsettings.cpp:4555
DisplayGroupTitleSort
static HostComboBoxSetting * DisplayGroupTitleSort()
Definition: globalsettings.cpp:3462
MythShortDateFormat
static HostComboBoxSetting * MythShortDateFormat()
Definition: globalsettings.cpp:2708
kAdjustFill_END
@ kAdjustFill_END
Definition: videoouttypes.h:81
ScreenSelection
static HostComboBoxSetting * ScreenSelection()
Definition: globalsettings.cpp:2121
ChannelGroupsSetting::ChannelGroupsSetting
ChannelGroupsSetting()
Definition: globalsettings.cpp:4894
AutoExpireLiveTVMaxAge
static GlobalSpinBoxSetting * AutoExpireLiveTVMaxAge()
Definition: globalsettings.cpp:549
LCDShowMusicItems
static HostComboBoxSetting * LCDShowMusicItems()
Definition: globalsettings.cpp:3649
MythUIButtonList::GetCurrentPos
int GetCurrentPos() const
Definition: mythuibuttonlist.h:238
OverrideExitMenu
static HostComboBoxSetting * OverrideExitMenu(MythPower *Power)
Definition: globalsettings.cpp:1963
RebootCommand
static HostTextEditSetting * RebootCommand(MythPower *Power)
Definition: globalsettings.cpp:2007
StereoDiscard
static HostCheckBoxSetting * StereoDiscard()
Definition: globalsettings.cpp:2177
PlaybackSettingsDialog::MoveProfileItemUp
void MoveProfileItemUp(void)
Definition: globalsettings.cpp:4312
VideoModeChangePause
static HostSpinBoxSetting * VideoModeChangePause(void)
Definition: globalsettings.cpp:2532
GuiDimension::m_width
StandardSetting * m_width
Definition: globalsettings.cpp:4591
MythDisplay::GetScreenCount
static int GetScreenCount()
Definition: mythdisplay.cpp:290
MythDisplay::GetExtraScreenInfo
static QString GetExtraScreenInfo(QScreen *qScreen)
Definition: mythdisplay.cpp:498
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
menu
static MythThemedMenu * menu
Definition: mythtv-setup.cpp:58
MSqlQuery::InitCon
static MSqlQueryInfo InitCon(ConnectionReuse _reuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
Definition: mythdbcon.cpp:540
HostRefreshRateComboBoxSetting
Definition: globalsettings.h:169
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:4336
PREF_RENDER
static constexpr const char * PREF_RENDER
Definition: mythvideoprofile.h:37
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:3446
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
COND_HEIGHT
static constexpr const char * COND_HEIGHT
Definition: mythvideoprofile.h:31
PlayBackScaling::m_yScan
StandardSetting * m_yScan
Definition: globalsettings.cpp:4209
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:252
StandardSetting::Load
virtual void Load(void)
Definition: standardsettings.cpp:214
MythUICheckBoxSetting::valueChanged
void valueChanged(bool)
PlaybackProfileItemConfig::m_singleShader
TransMythUICheckBoxSetting * m_singleShader
Definition: globalsettings.h:260
NetworkControlEnabled
static HostCheckBoxSetting * NetworkControlEnabled()
Definition: globalsettings.cpp:3205
PlaybackSettingsDialog::MoveProfileItemDown
void MoveProfileItemDown(void)
Definition: globalsettings.cpp:4295
DEINT_QUALITY_DRIVER
static constexpr const char * DEINT_QUALITY_DRIVER
Definition: mythvideoprofile.h:26