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