MythTV  master
globalsettings.cpp
Go to the documentation of this file.
1 
2 // -*- Mode: c++ -*-
3 
4 // Standard UNIX C headers
5 #include <unistd.h>
6 #include <fcntl.h>
7 #include <sys/types.h>
8 #include <sys/stat.h>
9 
10 // Qt headers
11 #include <QCoreApplication>
12 #include <QEvent>
13 #include <QFileInfo>
14 #include <QFile>
15 #include <QDialog>
16 #include <QCursor>
17 #include <QDir>
18 #include <QImage>
19 #include <QTextCodec>
20 #include <QFontDatabase>
21 
22 // MythTV headers
23 #include "mythconfig.h"
24 #include "mythcorecontext.h"
25 #include "mythdbcon.h"
26 #include "mythlogging.h"
27 #include "dbsettings.h"
28 #include "mythtranslation.h"
29 #include "iso639.h"
30 #include "playbackbox.h"
31 #include "globalsettings.h"
32 #include "recordingprofile.h"
33 #include "mythdisplay.h"
34 #include "DisplayRes.h"
35 #include "cardutil.h"
36 #include "themeinfo.h"
37 #include "mythdirs.h"
38 #include "mythuihelper.h"
39 #include "mythuidefines.h"
40 #include "langsettings.h"
41 
42 #ifdef USING_AIRPLAY
44 #endif
45 #if defined(Q_OS_MACX)
46 #include "privatedecoder_vda.h"
47 #endif
48 
50 {
51  HostCheckBox *gc = new HostCheckBox("DecodeExtraAudio");
52 
53  gc->setLabel(PlaybackSettings::tr("Extra audio buffering"));
54 
55  gc->setValue(true);
56 
57  gc->setHelpText(PlaybackSettings::tr("Enable this setting if MythTV is "
58  "playing \"crackly\" audio. This "
59  "setting affects digital tuners "
60  "(QAM/DVB/ATSC) and hardware "
61  "encoders. It will have no effect on "
62  "framegrabbers (MPEG-4/RTJPEG). "
63  "MythTV will keep extra audio data in "
64  "its internal buffers to workaround "
65  "this bug."));
66  return gc;
67 }
68 
69 #if CONFIG_DEBUGTYPE
71 {
72  HostCheckBox *gc = new HostCheckBox("FFMPEGTS");
73 
74  gc->setLabel(PlaybackSettings::tr("Use FFmpeg's original MPEG-TS demuxer"));
75 
76  gc->setValue(false);
77 
78  gc->setHelpText(PlaybackSettings::tr("Experimental: Enable this setting to "
79  "use FFmpeg's native demuxer. Things "
80  "will be broken."));
81  return gc;
82 }
83 #endif
84 
86 {
87  HostComboBox *gc = new HostComboBox("PIPLocation");
88 
89  gc->setLabel(PlaybackSettings::tr("PIP video location"));
90 
91  for (uint loc = 0; loc < kPIP_END; ++loc)
92  gc->addSelection(toString((PIPLocation) loc), QString::number(loc));
93 
94  gc->setHelpText(PlaybackSettings::tr("Location of PIP Video window."));
95 
96  return gc;
97 }
98 
100 {
101  HostComboBox *gc = new HostComboBox("DisplayRecGroup");
102 
103  gc->setLabel(PlaybackSettings::tr("Default group filter to apply"));
104 
105 
106  gc->addSelection(PlaybackSettings::tr("All Programs"), QString("All Programs"));
107  gc->addSelection(QCoreApplication::translate("(Common)", "Default"),
108  QString("Default"));
109 
110  MSqlQuery query(MSqlQuery::InitCon());
111  query.prepare("SELECT DISTINCT recgroup from recorded;");
112 
113  if (query.exec())
114  {
115  while (query.next())
116  {
117  if (query.value(0).toString() != "Default")
118  {
119  QString recgroup = query.value(0).toString();
120  gc->addSelection(recgroup, recgroup);
121  }
122  }
123  }
124 
125  query.prepare("SELECT DISTINCT category from recorded;");
126 
127  if (query.exec())
128  {
129  while (query.next())
130  {
131  QString key = query.value(0).toString();
132  gc->addSelection(key, key);
133  }
134  }
135 
136  gc->setHelpText(PlaybackSettings::tr("Default group filter to apply on the "
137  "View Recordings screen."));
138  return gc;
139 }
140 
142 {
143  HostCheckBox *gc = new HostCheckBox("QueryInitialFilter");
144 
145  gc->setLabel(PlaybackSettings::tr("Always prompt for initial group "
146  "filter"));
147 
148  gc->setValue(false);
149 
150  gc->setHelpText(PlaybackSettings::tr("If enabled, always prompt the user "
151  "for the initial filter to apply "
152  "when entering the Watch Recordings "
153  "screen."));
154  return gc;
155 }
156 
158 {
159  HostCheckBox *gc = new HostCheckBox("RememberRecGroup");
160 
161  gc->setLabel(PlaybackSettings::tr("Save current group filter when "
162  "changed"));
163 
164  gc->setValue(true);
165 
166  gc->setHelpText(PlaybackSettings::tr("If enabled, remember the last "
167  "selected filter instead of "
168  "displaying the default filter "
169  "whenever you enter the playback "
170  "screen."));
171  return gc;
172 }
173 
175 {
176  HostCheckBox *gc = new HostCheckBox("PlaybackBoxStartInTitle");
177 
178  gc->setLabel(PlaybackSettings::tr("Start in group list"));
179 
180  gc->setValue(true);
181 
182  gc->setHelpText(PlaybackSettings::tr("If enabled, the focus will start on "
183  "the group list, otherwise the focus "
184  "will default to the recordings."));
185  return gc;
186 }
187 
189 {
190  HostCheckBox *gc = new HostCheckBox("SmartForward");
191 
192  gc->setLabel(PlaybackSettings::tr("Smart fast forwarding"));
193 
194  gc->setValue(false);
195 
196  gc->setHelpText(PlaybackSettings::tr("If enabled, then immediately after "
197  "rewinding, only skip forward the "
198  "same amount as skipping backwards."));
199  return gc;
200 }
201 
203 {
204  GlobalComboBox *bc = new GlobalComboBox("CommercialSkipMethod");
205 
206  bc->setLabel(GeneralSettings::tr("Commercial detection method"));
207 
208  bc->setHelpText(GeneralSettings::tr("This determines the method used by "
209  "MythTV to detect when commercials "
210  "start and end."));
211 
212  deque<int> tmp = GetPreferredSkipTypeCombinations();
213 
214  for (uint i = 0; i < tmp.size(); ++i)
215  bc->addSelection(SkipTypeToString(tmp[i]), QString::number(tmp[i]));
216 
217  return bc;
218 }
219 
221 {
222  GlobalCheckBox *gc = new GlobalCheckBox("CommFlagFast");
223 
224  gc->setLabel(GeneralSettings::tr("Enable experimental speedup of "
225  "commercial detection"));
226 
227  gc->setValue(false);
228 
229  gc->setHelpText(GeneralSettings::tr("If enabled, experimental commercial "
230  "detection speedups will be enabled."));
231  return gc;
232 }
233 
235 {
236  HostComboBox *gc = new HostComboBox("AutoCommercialSkip");
237 
238  gc->setLabel(PlaybackSettings::tr("Automatically skip commercials"));
239 
240  gc->addSelection(QCoreApplication::translate("(Common)", "Off"), "0");
241  gc->addSelection(PlaybackSettings::tr("Notify, but do not skip",
242  "Skip commercials"), "2");
243  gc->addSelection(PlaybackSettings::tr("Automatically Skip",
244  "Skip commercials"), "1");
245 
246  gc->setHelpText(PlaybackSettings::tr("Automatically skip commercial breaks "
247  "that have been flagged during "
248  "automatic commercial detection "
249  "or by the mythcommflag program, or "
250  "just notify that a commercial has "
251  "been detected."));
252  return gc;
253 }
254 
256 {
257  GlobalSpinBox *gs = new GlobalSpinBox("DeferAutoTranscodeDays", 0, 365, 1);
258 
259  gs->setLabel(GeneralSettings::tr("Deferral days for auto transcode jobs"));
260 
261  gs->setHelpText(GeneralSettings::tr("If non-zero, automatic transcode jobs "
262  "will be scheduled to run this many "
263  "days after a recording completes "
264  "instead of immediately afterwards."));
265 
266  gs->setValue(0);
267 
268  return gs;
269 }
270 
272 {
273  GlobalCheckBox *bc = new GlobalCheckBox("AggressiveCommDetect");
274 
275  bc->setLabel(GeneralSettings::tr("Strict commercial detection"));
276 
277  bc->setValue(true);
278 
279  bc->setHelpText(GeneralSettings::tr("Enable stricter commercial detection "
280  "code. Disable if some commercials are "
281  "not being detected."));
282  return bc;
283 }
284 
286 {
287  HostSpinBox *gs = new HostSpinBox("CommRewindAmount", 0, 10, 1);
288 
289  gs->setLabel(PlaybackSettings::tr("Commercial skip automatic rewind amount "
290  "(secs)"));
291 
292  gs->setHelpText(PlaybackSettings::tr("MythTV will automatically rewind "
293  "this many seconds after performing a "
294  "commercial skip."));
295 
296  gs->setValue(0);
297 
298  return gs;
299 }
300 
302 {
303  HostSpinBox *gs = new HostSpinBox("CommNotifyAmount", 0, 10, 1);
304 
305  gs->setLabel(PlaybackSettings::tr("Commercial skip notify amount (secs)"));
306 
307  gs->setHelpText(PlaybackSettings::tr("MythTV will act like a commercial "
308  "begins this many seconds early. This "
309  "can be useful when commercial "
310  "notification is used in place of "
311  "automatic skipping."));
312 
313  gs->setValue(0);
314 
315  return gs;
316 }
317 
319 {
320  GlobalSpinBox *bs = new GlobalSpinBox("MaximumCommercialSkip", 0, 3600, 10);
321 
322  bs->setLabel(PlaybackSettings::tr("Maximum commercial skip (secs)"));
323 
324  bs->setHelpText(PlaybackSettings::tr("MythTV will discourage long manual "
325  "commercial skips. Skips which are "
326  "longer than this will require the "
327  "user to hit the SKIP key twice. "
328  "Automatic commercial skipping is "
329  "not affected by this limit."));
330 
331  bs->setValue(3600);
332 
333  return bs;
334 }
335 
337 {
338  GlobalSpinBox *bs = new GlobalSpinBox("MergeShortCommBreaks", 0, 3600, 5);
339 
340  bs->setLabel(PlaybackSettings::tr("Merge short commercial breaks (secs)"));
341 
342  bs->setHelpText(PlaybackSettings::tr("Treat consecutive commercial breaks "
343  "shorter than this as one break when "
344  "skipping forward. Useful if you have "
345  "to skip a few times during breaks. "
346  "Applies to automatic skipping as "
347  "well. Set to 0 to disable."));
348 
349  bs->setValue(0);
350 
351  return bs;
352 }
353 
355 {
356  GlobalSpinBox *bs = new GlobalSpinBox("AutoExpireExtraSpace", 0, 200, 1);
357 
358  bs->setLabel(GeneralSettings::tr("Extra disk space (GB)"));
359 
360  bs->setHelpText(GeneralSettings::tr("Extra disk space (in gigabytes) "
361  "beyond what MythTV requires that "
362  "you want to keep free on the "
363  "recording file systems."));
364 
365  bs->setValue(1);
366 
367  return bs;
368 };
369 
370 #if 0
372 {
373  GlobalCheckBox *cb = new GlobalCheckBox("AutoExpireInsteadOfDelete");
374 
375  cb->setLabel(DeletedExpireOptions::tr("Auto-Expire instead of delete recording"));
376 
377  cb->setValue(false);
378 
379  cb->setHelpText(DeletedExpireOptions::tr("If enabled, move deleted recordings to the "
380  "'Deleted' recgroup and turn on autoexpire "
381  "instead of deleting immediately."));
382  return cb;
383 }
384 #endif
385 
387 {
388  GlobalSpinBox *bs = new GlobalSpinBox("DeletedMaxAge", -1, 365, 1);
389 
390  bs->setLabel(GeneralSettings::tr("Time to retain deleted recordings "
391  "(days)"));
392 
393  bs->setHelpText(GeneralSettings::tr("Determines the maximum number of days "
394  "before undeleting a recording will "
395  "become impossible. A value of zero "
396  "means the recording will be "
397  "permanently deleted between 5 and 20 "
398  "minutes later. A value of minus one "
399  "means recordings will be retained "
400  "until space is required. A recording "
401  "will always be removed before this "
402  "time if the space is needed for a new "
403  "recording."));
404  bs->setValue(0);
405  return bs;
406 };
407 
408 #if 0
409 // If this is ever reactivated, re-add the translations...
411 {
412  public:
415  {
416  setLabel("DeletedExpireOptions");
418  addChild(enabled);
419  setTrigger(enabled);
420 
421  HorizontalConfigurationGroup* settings =
422  new HorizontalConfigurationGroup(false);
423  settings->addChild(DeletedMaxAge());
424  addTarget("1", settings);
425 
426  // show nothing if fillEnabled is off
427  addTarget("0", new HorizontalConfigurationGroup(true));
428  };
429 };
430 #endif
431 
433 {
434  GlobalComboBox *bc = new GlobalComboBox("AutoExpireMethod");
435 
436  bc->setLabel(GeneralSettings::tr("Auto-Expire method"));
437 
438  bc->addSelection(GeneralSettings::tr("Oldest show first"), "1");
439  bc->addSelection(GeneralSettings::tr("Lowest priority first"), "2");
440  bc->addSelection(GeneralSettings::tr("Weighted time/priority combination"),
441  "3");
442 
443  bc->setHelpText(GeneralSettings::tr("Method used to determine which "
444  "recorded shows to delete first. "
445  "Live TV recordings will always "
446  "expire before normal recordings."));
447  bc->setValue(1);
448 
449  return bc;
450 }
451 
453 {
454  GlobalCheckBox *bc = new GlobalCheckBox("AutoExpireWatchedPriority");
455 
456  bc->setLabel(GeneralSettings::tr("Watched before unwatched"));
457 
458  bc->setValue(false);
459 
460  bc->setHelpText(GeneralSettings::tr("If enabled, programs that have been "
461  "marked as watched will be expired "
462  "before programs that have not "
463  "been watched."));
464  return bc;
465 }
466 
468 {
469  GlobalSpinBox *bs = new GlobalSpinBox("AutoExpireDayPriority", 1, 400, 1);
470 
471  bs->setLabel(GeneralSettings::tr("Priority weight"));
472 
473  bs->setHelpText(GeneralSettings::tr("The number of days bonus a program "
474  "gets for each priority point. This "
475  "is only used when the Weighted "
476  "time/priority Auto-Expire method "
477  "is selected."));
478  bs->setValue(3);
479 
480  return bs;
481 };
482 
484 {
485  GlobalSpinBox *bs = new GlobalSpinBox("AutoExpireLiveTVMaxAge", 1, 365, 1);
486 
487  bs->setLabel(GeneralSettings::tr("Live TV max age (days)"));
488 
489  bs->setHelpText(GeneralSettings::tr("Auto-Expire will force expiration of "
490  "Live TV recordings when they are this "
491  "many days old. Live TV recordings may "
492  "also be expired early if necessary to "
493  "free up disk space."));
494  bs->setValue(1);
495 
496  return bs;
497 };
498 
499 #if 0
500 // Translations have been removed, please put back if reactivated...
502 {
503  GlobalSpinBox *bs = new GlobalSpinBox("MinRecordDiskThreshold",
504  0, 1000000, 100);
505  bs->setLabel("New recording free disk space threshold "
506  "(MB)");
507  bs->setHelpText("MythTV will stop scheduling new recordings on "
508  "a backend when its free disk space (in megabytes) falls "
509  "below this value.");
510  bs->setValue(300);
511  return bs;
512 }
513 #endif
514 
516 {
517  GlobalCheckBox *bc = new GlobalCheckBox("RerecordWatched");
518 
519  bc->setLabel(GeneralSettings::tr("Re-record watched"));
520 
521  bc->setValue(false);
522 
523  bc->setHelpText(GeneralSettings::tr("If enabled, programs that have been "
524  "marked as watched and are "
525  "Auto-Expired will be re-recorded if "
526  "they are shown again."));
527  return bc;
528 }
529 
531 {
532  GlobalSpinBox *bs = new GlobalSpinBox("RecordPreRoll", 0, 600, 60, true);
533 
534  bs->setLabel(GeneralSettings::tr("Time to record before start of show "
535  "(secs)"));
536 
537  bs->setHelpText(GeneralSettings::tr("This global setting allows the "
538  "recorder to start before the "
539  "scheduled start time. It does not "
540  "affect the scheduler. It is ignored "
541  "when two shows have been scheduled "
542  "without enough time in between."));
543  bs->setValue(0);
544 
545  return bs;
546 }
547 
549 {
550  GlobalSpinBox *bs = new GlobalSpinBox("RecordOverTime", 0, 1800, 60, true);
551 
552  bs->setLabel(GeneralSettings::tr("Time to record past end of show (secs)"));
553 
554  bs->setValue(0);
555 
556  bs->setHelpText(GeneralSettings::tr("This global setting allows the "
557  "recorder to record beyond the "
558  "scheduled end time. It does not "
559  "affect the scheduler. It is ignored "
560  "when two shows have been scheduled "
561  "without enough time in between."));
562  return bs;
563 }
564 
566 {
567  GlobalComboBox *gc = new GlobalComboBox("OverTimeCategory");
568 
569  gc->setLabel(GeneralSettings::tr("Category of shows to be extended"));
570 
571  gc->setHelpText(GeneralSettings::tr("For a special category (e.g. "
572  "\"Sports event\"), request that "
573  "shows be autoextended. Only works "
574  "if a show's category can be "
575  "determined."));
576 
577  MSqlQuery query(MSqlQuery::InitCon());
578 
579  query.prepare("SELECT DISTINCT category FROM program GROUP BY category;");
580 
581  gc->addSelection("", "");
582  if (query.exec())
583  {
584  while (query.next())
585  {
586  QString key = query.value(0).toString();
587  if (!key.trimmed().isEmpty())
588  gc->addSelection(key, key);
589  }
590  }
591 
592  return gc;
593 }
594 
596 {
597  GlobalSpinBox *bs = new GlobalSpinBox("CategoryOverTime",
598  0, 180, 60, true);
599 
600  bs->setLabel(GeneralSettings::tr("Record past end of show (mins)"));
601 
602  bs->setValue(30);
603 
604  bs->setHelpText(GeneralSettings::tr("For the specified category, an "
605  "attempt will be made to extend "
606  "the recording by the specified "
607  "number of minutes. It is ignored "
608  "when two shows have been scheduled "
609  "without enough time in-between."));
610  return bs;
611 }
612 
614 {
616  new VerticalConfigurationGroup(false, false);
617 
618  vcg->setLabel(GeneralSettings::tr("Category record over-time"));
619 
620  vcg->setUseLabel(true);
621 
622  vcg->addChild(OverTimeCategory());
623  vcg->addChild(CategoryOverTime());
624 
625  return vcg;
626 }
627 
628 static QString trunc(const QString &str, int len)
629 {
630  if (str.length() > len)
631  return str.mid(0, len - 5) + " . . . ";
632  return str;
633 }
634 
635 static QString pad(const QString &str, int len)
636 {
637  QString tmp = str;
638 
639  while (tmp.length() + 4 < len)
640  tmp += " ";
641 
642  while (tmp.length() < len)
643  tmp += " ";
644 
645  return tmp;
646 }
647 
649  item(_item)
650 {
651  setLabel(tr("Profile Item"));
652 
654 
655  row[0] = new HorizontalConfigurationGroup(false, false, true, true);
656  cmp[0] = new TransComboBoxSetting();
657  width[0] = new TransSpinBoxSetting(0, 1920, 64, true);
658  height[0] = new TransSpinBoxSetting(0, 1088, 64, true);
659  row[1] = new HorizontalConfigurationGroup(false, false, true, true);
660  cmp[1] = new TransComboBoxSetting();
661  width[1] = new TransSpinBoxSetting(0, 1920, 64, true);
662  height[1] = new TransSpinBoxSetting(0, 1088, 64, true);
664  max_cpus = new TransSpinBoxSetting(1, HAVE_THREADS ? 4 : 1, 1, true);
671  filters = new TransLineEditSetting(true);
672 
673  for (uint i = 0; i < 2; ++i)
674  {
675  const QString kCMP[6] = { "", "<", "<=", "==", ">=", ">" };
676  for (uint j = 0; j < 6; ++j)
677  cmp[i]->addSelection(kCMP[j]);
678 
679  cmp[i]->setLabel(tr("Match criteria"));
680  width[i]->setName(QString("w%1").arg(i));
681  width[i]->setLabel(tr("W", "Width"));
682  height[i]->setName(QString("h%1").arg(i));
683  height[i]->setLabel(tr("H", "Height"));
684 
685  row[i]->addChild(cmp[i]);
686  row[i]->addChild(width[i]);
687  row[i]->addChild(height[i]);
688  }
689 
691  new HorizontalConfigurationGroup(false, false, true, true);
693  new HorizontalConfigurationGroup(false, false, true, true);
694 
695  decoder->setLabel(tr("Decoder"));
696  max_cpus->setLabel(tr("Max CPUs"));
697  skiploop->setLabel(tr("Deblocking filter"));
698  vidrend->setLabel(tr("Video renderer"));
699  osdrend->setLabel(tr("OSD renderer"));
700  osdfade->setLabel(tr("OSD fade"));
701  deint0->setLabel(tr("Primary deinterlacer"));
702  deint1->setLabel(tr("Fallback deinterlacer"));
703  filters->setLabel(tr("Custom filters"));
704 
706  tr("Maximum number of CPU cores used for video decoding and filtering.") +
707  (HAVE_THREADS ? "" :
708  tr(" Multithreaded decoding disabled-only one CPU "
709  "will be used, please recompile with "
710  "--enable-ffmpeg-pthreads to enable.")));
711 
713  tr("Example custom filter list: 'ivtc,denoise3d'"));
714 
716  tr("When unchecked the deblocking loopfilter will be disabled ") + "\n" +
717  tr("Disabling will significantly reduce the load on the CPU "
718  "when watching HD H.264 but may significantly reduce video quality."));
719 
721  tr("When unchecked the OSD will not fade away but instead "
722  "will disappear abruptly.") + '\n' +
723  tr("Uncheck this if the video studders while the OSD is "
724  "fading away."));
725 
726  vid_row->addChild(decoder);
727  vid_row->addChild(max_cpus);
728  vid_row->addChild(skiploop);
729  osd_row->addChild(vidrend);
730  osd_row->addChild(osdrend);
731  osd_row->addChild(osdfade);
732 
734  new VerticalConfigurationGroup(false, false, true, true);
735  grp->addChild(row[0]);
736  grp->addChild(row[1]);
737  grp->addChild(vid_row);
738  grp->addChild(osd_row);
739  addChild(grp);
740 
742  new VerticalConfigurationGroup(false, false, true, true);
743  page2->addChild(deint0);
744  page2->addChild(deint1);
745  page2->addChild(filters);
746  addChild(page2);
747 
748  connect(decoder, SIGNAL(valueChanged(const QString&)),
749  this, SLOT(decoderChanged(const QString&)));\
750  connect(vidrend, SIGNAL(valueChanged(const QString&)),
751  this, SLOT(vrenderChanged(const QString&)));
752  connect(osdrend, SIGNAL(valueChanged(const QString&)),
753  this, SLOT(orenderChanged(const QString&)));
754  connect(deint0, SIGNAL(valueChanged(const QString&)),
755  this, SLOT(deint0Changed(const QString&)));
756  connect(deint1, SIGNAL(valueChanged(const QString&)),
757  this, SLOT(deint1Changed(const QString&)));
758 }
759 
761 {
762  for (uint i = 0; i < 2; ++i)
763  {
764  QString pcmp = item.Get(QString("pref_cmp%1").arg(i));
765  QStringList clist = pcmp.split(" ");
766 
767  if (clist.size() == 0)
768  clist<<((i) ? "" : ">");
769  if (clist.size() == 1)
770  clist<<"0";
771  if (clist.size() == 2)
772  clist<<"0";
773 
774  cmp[i]->setValue(clist[0]);
775  width[i]->setValue(clist[1].toInt());
776  height[i]->setValue(clist[2].toInt());
777  }
778 
779  QString pdecoder = item.Get("pref_decoder");
780  QString pmax_cpus = item.Get("pref_max_cpus");
781  QString pskiploop = item.Get("pref_skiploop");
782  QString prenderer = item.Get("pref_videorenderer");
783  QString posd = item.Get("pref_osdrenderer");
784  QString posdfade = item.Get("pref_osdfade");
785  QString pdeint0 = item.Get("pref_deint0");
786  QString pdeint1 = item.Get("pref_deint1");
787  QString pfilter = item.Get("pref_filters");
788  bool found = false;
789 
790  QString dech = VideoDisplayProfile::GetDecoderHelp();
791  QStringList decr = VideoDisplayProfile::GetDecoders();
792  QStringList decn = VideoDisplayProfile::GetDecoderNames();
793  QStringList::const_iterator itr = decr.begin();
794  QStringList::const_iterator itn = decn.begin();
795  for (; (itr != decr.end()) && (itn != decn.end()); ++itr, ++itn)
796  {
797  decoder->addSelection(*itn, *itr, (*itr == pdecoder));
798  found |= (*itr == pdecoder);
799  }
800  if (!found && !pdecoder.isEmpty())
801  {
802  decoder->SelectSetting::addSelection(
803  VideoDisplayProfile::GetDecoderName(pdecoder), pdecoder, true);
804  }
806 
807  if (!pmax_cpus.isEmpty())
808  max_cpus->setValue(pmax_cpus.toUInt());
809 
810  skiploop->setValue((!pskiploop.isEmpty()) ? (bool) pskiploop.toInt() : true);
811 
812  if (!prenderer.isEmpty())
813  vidrend->setValue(prenderer);
814  if (!posd.isEmpty())
815  osdrend->setValue(posd);
816 
817  osdfade->setValue((!posdfade.isEmpty()) ? (bool) posdfade.toInt() : true);
818 
819  if (!pdeint0.isEmpty())
820  deint0->setValue(pdeint0);
821  if (!pdeint1.isEmpty())
822  deint1->setValue(pdeint1);
823  if (!pfilter.isEmpty())
824  filters->setValue(pfilter);
825 }
826 
828 {
829  for (uint i = 0; i < 2; ++i)
830  {
831  QString val = QString("pref_cmp%1").arg(i);
832  QString data;
833  if (!cmp[i]->getValue().isEmpty())
834  {
835  data = QString("%1 %2 %3")
836  .arg(cmp[i]->getValue())
837  .arg(width[i]->intValue())
838  .arg(height[i]->intValue());
839  }
840  item.Set(val, data);
841  }
842 
843  item.Set("pref_decoder", decoder->getValue());
844  item.Set("pref_max_cpus", max_cpus->getValue());
845  item.Set("pref_skiploop", (skiploop->boolValue()) ? "1" : "0");
846  item.Set("pref_videorenderer", vidrend->getValue());
847  item.Set("pref_osdrenderer", osdrend->getValue());
848  item.Set("pref_osdfade", (osdfade->boolValue()) ? "1" : "0");
849  item.Set("pref_deint0", deint0->getValue());
850  item.Set("pref_deint1", deint1->getValue());
851 
852  QString tmp0 = filters->getValue();
853  QString tmp1 = vidrend->getValue();
854  QString tmp3 = VideoDisplayProfile::IsFilterAllowed(tmp1) ? tmp0 : "";
855  item.Set("pref_filters", tmp3);
856 }
857 
859 {
860  QString vrenderer = vidrend->getValue();
861  QStringList renderers = VideoDisplayProfile::GetVideoRenderers(dec);
862  QStringList::const_iterator it;
863 
864  QString prenderer;
865  for (it = renderers.begin(); it != renderers.end(); ++it)
866  prenderer = (*it == vrenderer) ? vrenderer : prenderer;
867  if (prenderer.isEmpty())
869 
871  for (it = renderers.begin(); it != renderers.end(); ++it)
872  {
873  if ((*it != "null") && (*it != "nullvaapi") && (*it != "nullvdpau"))
874  vidrend->addSelection(*it, *it, (*it == prenderer));
875  }
876 
878 }
879 
880 void PlaybackProfileItemConfig::vrenderChanged(const QString &renderer)
881 {
882  QStringList osds = VideoDisplayProfile::GetOSDs(renderer);
883  QStringList deints = VideoDisplayProfile::GetDeinterlacers(renderer);
884  QString losd = osdrend->getValue();
885  QString ldeint0 = deint0->getValue();
886  QString ldeint1 = deint1->getValue();
887  QStringList::const_iterator it;
888 
890  for (it = osds.begin(); it != osds.end(); ++it)
891  osdrend->addSelection(*it, *it, (*it == losd));
892 
894  for (it = deints.begin(); it != deints.end(); ++it)
895  {
897  *it, (*it == ldeint0));
898  }
899 
901  for (it = deints.begin(); it != deints.end(); ++it)
902  {
903  if (!(*it).contains("bobdeint") && !(*it).contains("doublerate") &&
904  !(*it).contains("doubleprocess"))
906  *it, (*it == ldeint1));
907  }
908 
911 }
912 
913 void PlaybackProfileItemConfig::orenderChanged(const QString &renderer)
914 {
916 }
917 
919 {
921  tr("Main deinterlacing method. %1")
923 }
924 
926 {
928  tr("Fallback deinterlacing method. %1")
930 }
931 
932 PlaybackProfileConfig::PlaybackProfileConfig(const QString &profilename) :
934  profile_name(profilename), needs_save(false),
935  groupid(0), last_main(NULL)
936 {
938  profilename, gCoreContext->GetHostName());
939 
941 
942  InitUI();
943 }
944 
946 {
947 }
948 
950 {
951  if (!labels[i])
952  return;
953 
954  QString andStr = tr("&", "and");
955  QString cmp0 = items[i].Get("pref_cmp0");
956  QString cmp1 = items[i].Get("pref_cmp1");
957  QString str = tr("if rez") + ' ' + cmp0;
958 
959  if (!cmp1.isEmpty())
960  str += " " + andStr + ' ' + cmp1;
961 
962  str += " -> ";
963  str += items[i].Get("pref_decoder");
964  str += " " + andStr + ' ';
965  str += items[i].Get("pref_videorenderer");
966  str.replace("-blit", "");
967  str.replace("ivtv " + andStr + " ivtv", "ivtv");
968  str.replace("xvmc " + andStr + " xvmc", "xvmc");
969  str.replace("xvmc", "XvMC");
970  str.replace("xv", "XVideo");
971 
972  labels[i]->setValue(pad(trunc(str, 48), 48));
973 }
974 
976 {
978  new VerticalConfigurationGroup(false, false, true, true);
979 
981  new HorizontalConfigurationGroup(false, false, true, true);
982  VerticalConfigurationGroup *column1 =
983  new VerticalConfigurationGroup(false, false, true, true);
984  VerticalConfigurationGroup *column2 =
985  new VerticalConfigurationGroup(false, false, true, true);
986 
987  labels.resize(items.size());
988 
989  for (uint i = 0; i < items.size(); ++i)
990  {
991  labels[i] = new TransLabelSetting();
992  InitLabel(i);
993  column1->addChild(labels[i]);
994  }
995 
996  editProf.resize(items.size());
997  delProf.resize(items.size());
998  priority.resize(items.size());
999 
1000  for (uint i = 0; i < items.size(); ++i)
1001  {
1003  new HorizontalConfigurationGroup(false, false, true, true);
1004 
1005  editProf[i] = new TransButtonSetting(QString("edit%1").arg(i));
1006  delProf[i] = new TransButtonSetting(QString("del%1").arg(i));
1007  priority[i] = new TransSpinBoxSetting(1, items.size(), 1);
1008  priority[i]->setName(QString("pri%1").arg(i));
1009 
1010  editProf[i]->setLabel(QCoreApplication::translate("(Common)", "Edit"));
1011  delProf[i]->setLabel(QCoreApplication::translate("(Common)", "Delete"));
1012  priority[i]->setValue(i + 1);
1013  items[i].Set("pref_priority", QString::number(i + 1));
1014 
1015  grp->addChild(editProf[i]);
1016  grp->addChild(delProf[i]);
1017  grp->addChild(priority[i]);
1018 
1019  connect(editProf[i], SIGNAL(pressed(QString)),
1020  this, SLOT (pressed(QString)));
1021  connect(delProf[i], SIGNAL(pressed(QString)),
1022  this, SLOT (pressed(QString)));
1023  connect(priority[i], SIGNAL(valueChanged( const QString&, int)),
1024  this, SLOT( priorityChanged(const QString&, int)));
1025 
1026  column2->addChild(grp);
1027  }
1028 
1029  rows->addChild(column1);
1030  rows->addChild(column2);
1031 
1032  TransButtonSetting *addEntry = new TransButtonSetting("addentry");
1033  addEntry->setLabel(tr("Add New Entry"));
1034 
1035  main->addChild(rows);
1036  main->addChild(addEntry);
1037 
1038  connect(addEntry, SIGNAL(pressed(QString)),
1039  this, SLOT (pressed(QString)));
1040 
1041  if (last_main)
1042  replaceChild(last_main, main);
1043  else
1044  addChild(main);
1045 
1046  last_main = main;
1047 }
1048 
1050 {
1051  // Already loaded data in constructor...
1052 }
1053 
1055 {
1056  if (!needs_save)
1057  return; // nothing to do..
1058 
1060  if (!ok)
1061  {
1062  LOG(VB_GENERAL, LOG_ERR,
1063  "PlaybackProfileConfig::Save() -- failed to delete items");
1064  return;
1065  }
1066 
1068  if (!ok)
1069  {
1070  LOG(VB_GENERAL, LOG_ERR,
1071  "PlaybackProfileConfig::Save() -- failed to save items");
1072  return;
1073  }
1074 }
1075 
1077 {
1078  if (cmd.startsWith("edit"))
1079  {
1080  uint i = cmd.mid(4).toUInt();
1081  PlaybackProfileItemConfig itemcfg(items[i]);
1082 
1083  if (itemcfg.exec() != kDialogCodeAccepted)
1084  {
1085  LOG(VB_GENERAL, LOG_ERR, QString("edit #%1").arg(i) + " rejected");
1086  }
1087  else
1088  {
1089  InitLabel(i);
1090  needs_save = true;
1091  }
1092  }
1093  else if (cmd.startsWith("del"))
1094  {
1095  uint i = cmd.mid(3).toUInt();
1096  del_items.push_back(items[i]);
1097  items.erase(items.begin() + i);
1098 
1099  InitUI();
1100  needs_save = true;
1101  }
1102  else if (cmd == "addentry")
1103  {
1104  ProfileItem item;
1105  PlaybackProfileItemConfig itemcfg(item);
1106 
1107  if (itemcfg.exec() != kDialogCodeAccepted)
1108  {
1109  LOG(VB_GENERAL, LOG_ERR, "addentry rejected");
1110  }
1111  else
1112  {
1113  items.push_back(item);
1114  InitUI();
1115  needs_save = true;
1116  }
1117  }
1118 
1119  repaint();
1120 }
1121 
1123 {
1124  uint i = name.mid(3).toInt();
1125  uint j = i;
1126 
1127  priority[i]->SetRelayEnabled(false);
1128 
1129  if (((int)items[i].GetPriority() < val) &&
1130  (i + 1 < priority.size()) &&
1131  ((int)items[i+1].GetPriority() == val))
1132  {
1133  j++;
1134  priority[j]->SetRelayEnabled(false);
1135 
1136  swap(i, j);
1137  priority[j]->setFocus();
1138  }
1139  else if (((int)items[i].GetPriority() > val) &&
1140  (i > 0) &&
1141  ((int)items[i-1].GetPriority() == val))
1142  {
1143  j--;
1144  priority[j]->SetRelayEnabled(false);
1145 
1146  swap(i, j);
1147 
1148  priority[j]->setFocus();
1149  }
1150  else
1151  {
1152  priority[i]->setValue((int) items[i].GetPriority());
1153  }
1154 
1155  needs_save = true;
1156 
1157  repaint();
1158 
1159  priority[i]->SetRelayEnabled(true);
1160  if (i != j)
1161  priority[j]->SetRelayEnabled(true);
1162 }
1163 
1165 {
1166  int pri_i = items[i].GetPriority();
1167  int pri_j = items[j].GetPriority();
1168 
1169  ProfileItem item = items[j];
1170  items[j] = items[i];
1171  items[i] = item;
1172 
1173  priority[i]->setValue(pri_i);
1174  priority[j]->setValue(pri_j);
1175 
1176  items[i].Set("pref_priority", QString::number(pri_i));
1177  items[j].Set("pref_priority", QString::number(pri_j));
1178 
1179  const QString label_i = labels[i]->getValue();
1180  const QString label_j = labels[j]->getValue();
1181  labels[i]->setValue(label_j);
1182  labels[j]->setValue(label_i);
1183 }
1184 
1187  false, false, true, true), grouptrigger(NULL)
1188 {
1189  setLabel(tr("Playback Profiles %1").arg(str));
1190 
1191  QString host = gCoreContext->GetHostName();
1192  QStringList profiles = VideoDisplayProfile::GetProfiles(host);
1193  if (profiles.empty())
1194  {
1196  profiles = VideoDisplayProfile::GetProfiles(host);
1197  }
1198  if (profiles.empty())
1199  return;
1200 
1201  if (!profiles.contains("Normal") &&
1202  !profiles.contains("High Quality") &&
1203  !profiles.contains("Slim"))
1204  {
1206  profiles = VideoDisplayProfile::GetProfiles(host);
1207  }
1208 
1209 #ifdef USING_VDPAU
1210  if (!profiles.contains("VDPAU Normal") &&
1211  !profiles.contains("VDPAU High Quality") &&
1212  !profiles.contains("VDPAU Slim"))
1213  {
1215  profiles = VideoDisplayProfile::GetProfiles(host);
1216  }
1217 #endif
1218 
1219 #if defined(Q_OS_MACX)
1220  if (VDALibrary::GetVDALibrary() != NULL)
1221  {
1222  if (!profiles.contains("VDA Normal") &&
1223  !profiles.contains("VDA High Quality") &&
1224  !profiles.contains("VDA Slim"))
1225  {
1227  profiles = VideoDisplayProfile::GetProfiles(host);
1228  }
1229  }
1230 #endif
1231 
1232 #ifdef USING_OPENGL_VIDEO
1233  if (!profiles.contains("OpenGL Normal") &&
1234  !profiles.contains("OpenGL High Quality") &&
1235  !profiles.contains("OpenGL Slim"))
1236  {
1238  profiles = VideoDisplayProfile::GetProfiles(host);
1239  }
1240 #endif
1241 
1242 #ifdef USING_GLVAAPI
1243  if (!profiles.contains("VAAPI Normal"))
1244  {
1246  profiles = VideoDisplayProfile::GetProfiles(host);
1247  }
1248 #endif
1249 
1250 #ifdef USING_OPENMAX
1251  if (!profiles.contains("OpenMAX Normal") &&
1252  !profiles.contains("OpenMAX High Quality"))
1253  {
1255  profiles = VideoDisplayProfile::GetProfiles(host);
1256  }
1257  // Special case for user upgrading from version that only
1258  // has OpenMAX Normal
1259  else if (!profiles.contains("OpenMAX High Quality"))
1260  {
1262  profiles = VideoDisplayProfile::GetProfiles(host);
1263  }
1264 #endif
1265 
1266 
1268  if (!profiles.contains(profile))
1269  {
1270  profile = (profiles.contains("Normal")) ? "Normal" : profiles[0];
1272  }
1273 
1274  grouptrigger = new HostComboBox("DefaultVideoPlaybackProfile");
1275 
1276  grouptrigger->setLabel(tr("Current Video Playback Profile"));
1277 
1278  QStringList::const_iterator it;
1279  for (it = profiles.begin(); it != profiles.end(); ++it)
1281 
1283  new HorizontalConfigurationGroup(false, false, true, true);
1284  TransButtonSetting *addProf = new TransButtonSetting("add");
1285  TransButtonSetting *delProf = new TransButtonSetting("del");
1286 
1287  addProf->setLabel(tr("Add New"));
1288  delProf->setLabel(QCoreApplication::translate("(Common)", "Delete"));
1289 
1290  grp->addChild(grouptrigger);
1291  grp->addChild(addProf);
1292  grp->addChild(delProf);
1293 
1294  addChild(grp);
1295 
1297  for (it = profiles.begin(); it != profiles.end(); ++it)
1298  addTarget(*it, new PlaybackProfileConfig(*it));
1299  setSaveAll(true);
1300 
1301  connect(addProf, SIGNAL(pressed( QString)),
1302  this, SLOT (btnPress(QString)));
1303  connect(delProf, SIGNAL(pressed( QString)),
1304  this, SLOT (btnPress(QString)));
1305 }
1306 
1308 {
1309 #if 0
1310  LOG(VB_GENERAL, LOG_DEBUG, "~PlaybackProfileConfigs()");
1311 #endif
1312 }
1313 
1315 {
1316  if (cmd == "add")
1317  {
1318  QString name;
1319 
1320  QString host = gCoreContext->GetHostName();
1321  QStringList not_ok_list = VideoDisplayProfile::GetProfiles(host);
1322 
1323  bool ok = true;
1324  while (ok)
1325  {
1326  QString msg = tr("Enter Playback Group Name");
1327 
1329  GetMythMainWindow(), msg, msg, name);
1330 
1331  if (!ok)
1332  return;
1333 
1334  if (not_ok_list.contains(name) || name.isEmpty())
1335  {
1336  msg = (name.isEmpty()) ?
1337  tr("Sorry, playback group\nname cannot be blank.") :
1338  tr("Sorry, playback group name\n"
1339  "'%1' is already being used.").arg(name);
1340 
1342  GetMythMainWindow(), QCoreApplication::translate("(Common)",
1343  "Error"), msg);
1344 
1345  continue;
1346  }
1347 
1348  break;
1349  }
1350 
1352  addTarget(name, new PlaybackProfileConfig(name));
1353 
1354  if (grouptrigger)
1355  grouptrigger->addSelection(name, name, true);
1356  }
1357  else if ((cmd == "del") && grouptrigger)
1358  {
1359  const QString name = grouptrigger->getSelectionLabel();
1360  if (!name.isEmpty())
1361  {
1362  removeTarget(name);
1364  name, gCoreContext->GetHostName());
1365  // This would be better done in TriggeredConfigurationGroup::removeTarget
1366  // however, as removeTarget is used elsewhere, limit the changes to this
1367  // case only
1369  }
1370  }
1371 
1372  repaint();
1373 }
1374 
1376 {
1378 }
1379 
1381 {
1382  QString str[4] =
1383  {
1384  PlaybackSettings::tr("Sort all sub-titles/multi-titles Ascending"),
1385  PlaybackSettings::tr("Sort all sub-titles/multi-titles Descending"),
1386  PlaybackSettings::tr("Sort sub-titles Descending, multi-titles "
1387  "Ascending"),
1388  PlaybackSettings::tr("Sort sub-titles Ascending, multi-titles Descending"),
1389  };
1390 
1391  QString help = PlaybackSettings::tr("Selects how to sort show episodes. "
1392  "Sub-titles refers to the episodes "
1393  "listed under a specific show title. "
1394  "Multi-title refers to sections (e.g. "
1395  "\"All Programs\") which list multiple "
1396  "titles. Sections in parentheses are "
1397  "not affected.");
1398 
1399  HostComboBox *gc = new HostComboBox("PlayBoxOrdering");
1400 
1401  gc->setLabel(PlaybackSettings::tr("Episode sort orderings"));
1402 
1403  for (int i = 0; i < 4; ++i)
1404  gc->addSelection(str[i], QString::number(i));
1405 
1406  gc->setValue(1);
1407  gc->setHelpText(help);
1408 
1409  return gc;
1410 }
1411 
1413 {
1414  HostComboBox *gc = new HostComboBox("PlayBoxEpisodeSort");
1415 
1416  gc->setLabel(PlaybackSettings::tr("Sort episodes"));
1417 
1418  gc->addSelection(PlaybackSettings::tr("Record date"), "Date");
1419  gc->addSelection(PlaybackSettings::tr("Season/Episode"), "Season");
1420  gc->addSelection(PlaybackSettings::tr("Original air date"), "OrigAirDate");
1421  gc->addSelection(PlaybackSettings::tr("Program ID"), "Id");
1422 
1423  gc->setHelpText(PlaybackSettings::tr("Selects how to sort a show's "
1424  "episodes"));
1425 
1426  return gc;
1427 }
1428 
1430 {
1431  HostSpinBox *gs = new HostSpinBox("FFRewReposTime", 0, 200, 5);
1432 
1433  gs->setLabel(PlaybackSettings::tr("Fast forward/rewind reposition amount"));
1434 
1435  gs->setValue(100);
1436 
1437  gs->setHelpText(PlaybackSettings::tr("When exiting sticky keys fast "
1438  "forward/rewind mode, reposition "
1439  "this many 1/100th seconds before "
1440  "resuming normal playback. This "
1441  "compensates for the reaction time "
1442  "between seeing where to resume "
1443  "playback and actually exiting "
1444  "seeking."));
1445  return gs;
1446 }
1447 
1449 {
1450  HostCheckBox *gc = new HostCheckBox("FFRewReverse");
1451 
1452  gc->setLabel(PlaybackSettings::tr("Reverse direction in fast "
1453  "forward/rewind"));
1454 
1455  gc->setValue(true);
1456 
1457  gc->setHelpText(PlaybackSettings::tr("If enabled, pressing the sticky "
1458  "rewind key in fast forward mode "
1459  "switches to rewind mode, and "
1460  "vice versa. If disabled, it will "
1461  "decrease the current speed or "
1462  "switch to play mode if the speed "
1463  "can't be decreased further."));
1464  return gc;
1465 }
1466 
1468 {
1469  HostComboBox *gc = new HostComboBox("MenuTheme");
1470 
1471  gc->setLabel(AppearanceSettings::tr("Menu theme"));
1472 
1473  QList<ThemeInfo> themelist = GetMythUI()->GetThemes(THEME_MENU);
1474 
1475  QList<ThemeInfo>::iterator it;
1476  for( it = themelist.begin(); it != themelist.end(); ++it )
1477  {
1478  gc->addSelection((*it).GetName(), (*it).GetDirectoryName(),
1479  (*it).GetDirectoryName() == "defaultmenu");
1480  }
1481 
1482  return gc;
1483 }
1484 
1486 {
1487  QString beVBI = gCoreContext->GetSetting("VbiFormat");
1488  QString fmt = beVBI.toLower().left(4);
1489  int sel = (fmt == "pal ") ? 1 : ((fmt == "ntsc") ? 2 : 0);
1490 
1491  HostComboBox *gc = new HostComboBox("DecodeVBIFormat");
1492 
1493  gc->setLabel(OSDSettings::tr("Decode VBI format"));
1494 
1495  gc->addSelection(OSDSettings::tr("None"), "none",
1496  0 == sel);
1497  gc->addSelection(OSDSettings::tr("PAL teletext"), "pal_txt",
1498  1 == sel);
1499  gc->addSelection(OSDSettings::tr("NTSC closed caption"), "ntsc_cc",
1500  2 == sel);
1501 
1502  gc->setHelpText(
1503  OSDSettings::tr("If enabled, this overrides the mythtv-setup setting "
1504  "used during recording when decoding captions."));
1505 
1506  return gc;
1507 }
1508 
1510 {
1511  HostComboBox *gc = new HostComboBox("SubtitleCodec");
1512 
1513  gc->setLabel(OSDSettings::tr("Subtitle Codec"));
1514 
1515  QList<QByteArray> list = QTextCodec::availableCodecs();
1516 
1517  for (uint i = 0; i < (uint) list.size(); ++i)
1518  {
1519  QString val = QString(list[i]);
1520  gc->addSelection(val, val, val.toLower() == "utf-8");
1521  }
1522 
1523  return gc;
1524 }
1525 
1527 {
1528  HostComboBox *gc = new HostComboBox("ChannelOrdering");
1529 
1530  gc->setLabel(GeneralSettings::tr("Channel ordering"));
1531 
1532  gc->addSelection(GeneralSettings::tr("channel number"), "channum");
1533  gc->addSelection(GeneralSettings::tr("callsign"), "callsign");
1534 
1535  return gc;
1536 }
1537 
1539 {
1540  HostSpinBox *gs = new HostSpinBox("VertScanPercentage", -100, 100, 1);
1541 
1542  gs->setLabel(PlaybackSettings::tr("Vertical scaling"));
1543 
1544  gs->setValue(0);
1545 
1546  gs->setHelpText(PlaybackSettings::tr("Adjust this if the image does not "
1547  "fill your screen vertically. Range "
1548  "-100% to 100%"));
1549  return gs;
1550 }
1551 
1553 {
1554  HostSpinBox *gs = new HostSpinBox("HorizScanPercentage", -100, 100, 1);
1555 
1556  gs->setLabel(PlaybackSettings::tr("Horizontal scaling"));
1557 
1558  gs->setValue(0);
1559 
1560  gs->setHelpText(PlaybackSettings::tr("Adjust this if the image does not "
1561  "fill your screen horizontally. Range "
1562  "-100% to 100%"));
1563  return gs;
1564 };
1565 
1567 {
1568  HostSpinBox *gs = new HostSpinBox("XScanDisplacement", -50, 50, 1);
1569 
1570  gs->setLabel(PlaybackSettings::tr("Scan displacement (X)"));
1571 
1572  gs->setValue(0);
1573 
1574  gs->setHelpText(PlaybackSettings::tr("Adjust this to move the image "
1575  "horizontally."));
1576 
1577  return gs;
1578 }
1579 
1581 {
1582  HostSpinBox *gs = new HostSpinBox("YScanDisplacement", -50, 50, 1);
1583 
1584  gs->setLabel(PlaybackSettings::tr("Scan displacement (Y)"));
1585 
1586  gs->setValue(0);
1587 
1588  gs->setHelpText(PlaybackSettings::tr("Adjust this to move the image "
1589  "vertically."));
1590 
1591  return gs;
1592 };
1593 
1595 {
1596  HostCheckBox *gc = new HostCheckBox("DefaultCCMode");
1597 
1598  gc->setLabel(OSDSettings::tr("Always display closed captioning or "
1599  "subtitles"));
1600 
1601  gc->setValue(false);
1602 
1603  gc->setHelpText(OSDSettings::tr("If enabled, captions will be displayed "
1604  "when playing back recordings or watching "
1605  "Live TV. Closed Captioning can be turned "
1606  "on or off by pressing \"T\" during"
1607  "playback."));
1608  return gc;
1609 }
1610 
1612 {
1613  HostCheckBox *gc = new HostCheckBox("EnableMHEG");
1614 
1615  gc->setLabel(OSDSettings::tr("Enable interactive TV"));
1616 
1617  gc->setValue(false);
1618 
1619  gc->setHelpText(OSDSettings::tr("If enabled, interactive TV applications "
1620  "(MHEG) will be activated. This is used "
1621  "for teletext and logos for radio and "
1622  "channels that are currently off-air."));
1623  return gc;
1624 }
1625 
1627 {
1628  HostCheckBox *gc = new HostCheckBox("EnableMHEGic");
1629  gc->setLabel(OSDSettings::tr("Enable network access for interactive TV"));
1630  gc->setValue(true);
1631  gc->setHelpText(OSDSettings::tr("If enabled, interactive TV applications "
1632  "(MHEG) will be able to access interactive "
1633  "content over the Internet. This is used "
1634  "for BBC iPlayer."));
1635  return gc;
1636 }
1637 
1639 {
1640  HostCheckBox *gc = new HostCheckBox("PersistentBrowseMode");
1641 
1642  gc->setLabel(OSDSettings::tr("Always use browse mode in Live TV"));
1643 
1644  gc->setValue(true);
1645 
1646  gc->setHelpText(OSDSettings::tr("If enabled, browse mode will "
1647  "automatically be activated whenever "
1648  "you use channel up/down while watching "
1649  "Live TV."));
1650  return gc;
1651 }
1652 
1654 {
1655  HostCheckBox *gc = new HostCheckBox("BrowseAllTuners");
1656 
1657  gc->setLabel(OSDSettings::tr("Browse all channels"));
1658 
1659  gc->setValue(false);
1660 
1661  gc->setHelpText(OSDSettings::tr("If enabled, browse mode will show "
1662  "channels on all available recording "
1663  "devices, instead of showing channels "
1664  "on just the current recorder."));
1665  return gc;
1666 }
1667 
1669 {
1670  HostCheckBox *gc = new HostCheckBox("ClearSavedPosition");
1671 
1672  gc->setLabel(PlaybackSettings::tr("Clear bookmark on playback"));
1673 
1674  gc->setValue(true);
1675 
1676  gc->setHelpText(PlaybackSettings::tr("If enabled, automatically clear the "
1677  "bookmark on a recording when the "
1678  "recording is played back. If "
1679  "disabled, you can mark the "
1680  "beginning with rewind then save "
1681  "position."));
1682  return gc;
1683 }
1684 
1686 {
1687  HostCheckBox *gc = new HostCheckBox("AltClearSavedPosition");
1688 
1689  gc->setLabel(PlaybackSettings::tr("Alternate clear and save bookmark"));
1690 
1691  gc->setValue(true);
1692 
1693  gc->setHelpText(PlaybackSettings::tr("During playback the SELECT key "
1694  "(Enter or Space) will alternate "
1695  "between \"Bookmark Saved\" and "
1696  "\"Bookmark Cleared\". If disabled, "
1697  "the SELECT key will save the current "
1698  "position for each keypress."));
1699  return gc;
1700 }
1701 
1703 {
1704  HostComboBox *gc = new HostComboBox("PlaybackExitPrompt");
1705 
1706  gc->setLabel(PlaybackSettings::tr("Action on playback exit"));
1707 
1708  gc->addSelection(PlaybackSettings::tr("Just exit"), "0");
1709  gc->addSelection(PlaybackSettings::tr("Save position and exit"), "2");
1710  gc->addSelection(PlaybackSettings::tr("Always prompt (excluding Live TV)"),
1711  "1");
1712  gc->addSelection(PlaybackSettings::tr("Always prompt (including Live TV)"),
1713  "4");
1714  gc->addSelection(PlaybackSettings::tr("Prompt for Live TV only"), "8");
1715 
1716  gc->setHelpText(PlaybackSettings::tr("If set to prompt, a menu will be "
1717  "displayed when you exit playback "
1718  "mode. The options available will "
1719  "allow you to save your position, "
1720  "delete the recording, or continue "
1721  "watching."));
1722  return gc;
1723 }
1724 
1726 {
1727  HostCheckBox *gc = new HostCheckBox("EndOfRecordingExitPrompt");
1728 
1729  gc->setLabel(PlaybackSettings::tr("Prompt at end of recording"));
1730 
1731  gc->setValue(false);
1732 
1733  gc->setHelpText(PlaybackSettings::tr("If enabled, a menu will be displayed "
1734  "allowing you to delete the recording "
1735  "when it has finished playing."));
1736  return gc;
1737 }
1738 
1740 {
1741  HostCheckBox *gc = new HostCheckBox("JumpToProgramOSD");
1742 
1743  gc->setLabel(PlaybackSettings::tr("Jump to program OSD"));
1744 
1745  gc->setValue(true);
1746 
1747  gc->setHelpText(PlaybackSettings::tr("Set the choice between viewing the "
1748  "current recording group in the OSD, "
1749  "or showing the 'Watch Recording' "
1750  "screen when 'Jump to Program' is "
1751  "activated. If enabled, the "
1752  "recordings are shown in the OSD"));
1753  return gc;
1754 }
1755 
1757 {
1758  HostCheckBox *gc = new HostCheckBox("ContinueEmbeddedTVPlay");
1759 
1760  gc->setLabel(PlaybackSettings::tr("Continue playback when embedded"));
1761 
1762  gc->setValue(false);
1763 
1764  gc->setHelpText(PlaybackSettings::tr("If enabled, TV playback continues "
1765  "when the TV window is embedded in "
1766  "the upcoming program list or "
1767  "recorded list. The default is to "
1768  "pause the recorded show when "
1769  "embedded."));
1770  return gc;
1771 }
1772 
1774 {
1775  HostCheckBox *gc = new HostCheckBox("AutomaticSetWatched");
1776 
1777  gc->setLabel(PlaybackSettings::tr("Automatically mark a recording as "
1778  "watched"));
1779 
1780  gc->setValue(false);
1781 
1782  gc->setHelpText(PlaybackSettings::tr("If enabled, when you exit near the "
1783  "end of a recording it will be marked "
1784  "as watched. The automatic detection "
1785  "is not foolproof, so do not enable "
1786  "this setting if you don't want an "
1787  "unwatched recording marked as "
1788  "watched."));
1789  return gc;
1790 }
1791 
1793 {
1794  HostSpinBox *gs = new HostSpinBox("LiveTVIdleTimeout", 0, 3600, 1);
1795 
1796  gs->setLabel(PlaybackSettings::tr("Live TV idle timeout (mins)"));
1797 
1798  gs->setValue(0);
1799 
1800  gs->setHelpText(PlaybackSettings::tr("Exit Live TV automatically if left "
1801  "idle for the specified number of "
1802  "minutes. 0 disables the timeout."));
1803  return gs;
1804 }
1805 
1806 // static HostCheckBox *PlaybackPreview()
1807 // {
1808 // HostCheckBox *gc = new HostCheckBox("PlaybackPreview");
1809 //
1810 // gc->setLabel(PlaybackSettings::tr("Display live preview of recordings"));
1811 //
1812 // gc->setValue(true);
1813 //
1814 // gc->setHelpText(PlaybackSettings::tr("If enabled, a preview of the recording "
1815 // "will play in a small window on the \"Watch a "
1816 // "Recording\" menu."));
1817 //
1818 // return gc;
1819 // }
1820 //
1821 // static HostCheckBox *HWAccelPlaybackPreview()
1822 // {
1823 // HostCheckBox *gc = new HostCheckBox("HWAccelPlaybackPreview");
1824 //
1825 // gc->setLabel(PlaybackSettings::tr("Use HW Acceleration for live recording preview"));
1826 //
1827 // gc->setValue(false);
1828 //
1829 // gc->setHelpText(
1830 // PlaybackSettings::tr(
1831 // "If enabled, live recording preview will use hardware "
1832 // "acceleration. The video renderer used is determined by the "
1833 // "selected CPU profile. Disable if playback is sluggish or "
1834 // "causes high CPU load"));
1835 //
1836 // return gc;
1837 // }
1838 
1840 {
1841  HostCheckBox *gc = new HostCheckBox("UseVirtualKeyboard");
1842 
1843  gc->setLabel(MainGeneralSettings::tr("Use line edit virtual keyboards"));
1844 
1845  gc->setValue(true);
1846 
1847  gc->setHelpText(MainGeneralSettings::tr("If enabled, you can use a virtual "
1848  "keyboard in MythTV's line edit "
1849  "boxes. To use, hit SELECT (Enter "
1850  "or Space) while a line edit is in "
1851  "focus."));
1852  return gc;
1853 }
1854 
1856 {
1857  HostSpinBox *gs = new HostSpinBox("FrontendIdleTimeout", 0, 360, 15);
1858 
1859  gs->setLabel(MainGeneralSettings::tr("Idle time before entering standby "
1860  "mode (minutes)"));
1861 
1862  gs->setValue(90);
1863 
1864  gs->setHelpText(MainGeneralSettings::tr("Number of minutes to wait when "
1865  "the frontend is idle before "
1866  "entering standby mode. Standby "
1867  "mode allows the backend to power "
1868  "down if configured to do so. Any "
1869  "remote or mouse input will cause "
1870  "the countdown to start again "
1871  "and/or exit idle mode. Video "
1872  "playback suspends the countdown. "
1873  "A value of zero prevents the "
1874  "frontend automatically entering "
1875  "standby."));
1876  return gs;
1877 }
1878 
1880 {
1881  HostComboBox *gc = new HostComboBox("OverrideExitMenu");
1882 
1883  gc->setLabel(MainGeneralSettings::tr("Customize exit menu options"));
1884 
1885  gc->addSelection(MainGeneralSettings::tr("Default"), "0");
1886  gc->addSelection(MainGeneralSettings::tr("Show quit"), "1");
1887  gc->addSelection(MainGeneralSettings::tr("Show quit and shutdown"), "2");
1888  gc->addSelection(MainGeneralSettings::tr("Show quit, reboot and shutdown"),
1889  "3");
1890  gc->addSelection(MainGeneralSettings::tr("Show shutdown"), "4");
1891  gc->addSelection(MainGeneralSettings::tr("Show reboot"), "5");
1892  gc->addSelection(MainGeneralSettings::tr("Show reboot and shutdown"), "6");
1893  gc->addSelection(MainGeneralSettings::tr("Show standby"), "7");
1894 
1895  gc->setHelpText(
1896  MainGeneralSettings::tr("By default, only remote frontends are shown "
1897  "the shutdown option on the exit menu. Here "
1898  "you can force specific shutdown and reboot "
1899  "options to be displayed."));
1900  return gc;
1901 }
1902 
1904 {
1905  HostLineEdit *ge = new HostLineEdit("RebootCommand");
1906 
1907  ge->setLabel(MainGeneralSettings::tr("Reboot command"));
1908 
1909  ge->setValue("");
1910 
1911  ge->setHelpText(MainGeneralSettings::tr("Optional. Script to run if you "
1912  "select the reboot option from the "
1913  "exit menu, if the option is "
1914  "displayed. You must configure an "
1915  "exit key to display the exit "
1916  "menu."));
1917  return ge;
1918 }
1919 
1921 {
1922  HostLineEdit *ge = new HostLineEdit("HaltCommand");
1923 
1924  ge->setLabel(MainGeneralSettings::tr("Halt command"));
1925 
1926  ge->setValue("");
1927 
1928  ge->setHelpText(MainGeneralSettings::tr("Optional. Script to run if you "
1929  "select the shutdown option from "
1930  "the exit menu, if the option is "
1931  "displayed. You must configure an "
1932  "exit key to display the exit "
1933  "menu."));
1934  return ge;
1935 }
1936 
1938 {
1939  HostLineEdit *ge = new HostLineEdit("LircSocket");
1940 
1941  ge->setLabel(MainGeneralSettings::tr("LIRC daemon socket"));
1942 
1943  /* lircd socket moved from /dev/ to /var/run/lirc/ in lirc 0.8.6 */
1944  QString lirc_socket = "/dev/lircd";
1945 
1946  if (!QFile::exists(lirc_socket))
1947  lirc_socket = "/var/run/lirc/lircd";
1948 
1949  ge->setValue(lirc_socket);
1950 
1951  QString help = MainGeneralSettings::tr("UNIX socket or IP address[:port] "
1952  "to connect in order to communicate "
1953  "with the LIRC Daemon.");
1954  ge->setHelpText(help);
1955 
1956  return ge;
1957 }
1958 
1960 {
1961  HostLineEdit *ge = new HostLineEdit("ScreenShotPath");
1962 
1963  ge->setLabel(MainGeneralSettings::tr("Screen shot path"));
1964 
1965  ge->setValue("/tmp/");
1966 
1967  ge->setHelpText(MainGeneralSettings::tr("Path to screenshot storage "
1968  "location. Should be writable "
1969  "by the frontend"));
1970 
1971  return ge;
1972 }
1973 
1975 {
1976  HostLineEdit *ge = new HostLineEdit("SetupPinCode");
1977 
1978  ge->setLabel(MainGeneralSettings::tr("Setup PIN code"));
1979 
1980  ge->setHelpText(MainGeneralSettings::tr("This PIN is used to control "
1981  "access to the setup menus. "
1982  "If you want to use this feature, "
1983  "then setting the value to all "
1984  "numbers will make your life much "
1985  "easier. Set it to blank to "
1986  "disable. If enabled, you will not "
1987  "be able to return to this screen "
1988  "and reset the Setup PIN without "
1989  "first entering the current PIN."));
1990  return ge;
1991 }
1992 
1994 {
1995  HostComboBox *gc = new HostComboBox("XineramaScreen", false);
1997 
1998  for (int i=0; i<num; ++i)
1999  gc->addSelection(QString::number(i), QString::number(i));
2000 
2001  gc->addSelection(AppearanceSettings::tr("All"), QString::number(-1));
2002 
2003  gc->setLabel(AppearanceSettings::tr("Display on screen"));
2004 
2005  gc->setValue(0);
2006 
2007  gc->setHelpText(AppearanceSettings::tr("Run on the specified screen or "
2008  "spanning all screens."));
2009  return gc;
2010 }
2011 
2012 
2014 {
2015  HostComboBox *gc = new HostComboBox("XineramaMonitorAspectRatio");
2016 
2017  gc->setLabel(AppearanceSettings::tr("Monitor aspect ratio"));
2018 
2019  gc->addSelection(AppearanceSettings::tr("16:9"), "1.7777");
2020  gc->addSelection(AppearanceSettings::tr("16:10"), "1.6");
2021  gc->addSelection(AppearanceSettings::tr("4:3"), "1.3333");
2022 
2023  gc->setHelpText(AppearanceSettings::tr("The aspect ratio of a Xinerama "
2024  "display cannot be queried from "
2025  "the display, so it must be "
2026  "specified."));
2027  return gc;
2028 }
2029 
2031 {
2032  HostComboBox *gc = new HostComboBox("LetterboxColour");
2033 
2034  gc->setLabel(PlaybackSettings::tr("Letterboxing color"));
2035 
2036  for (int m = kLetterBoxColour_Black; m < kLetterBoxColour_END; ++m)
2037  gc->addSelection(toString((LetterBoxColour)m), QString::number(m));
2038 
2039  gc->setHelpText(PlaybackSettings::tr("By default MythTV uses black "
2040  "letterboxing to match broadcaster "
2041  "letterboxing, but those with plasma "
2042  "screens may prefer gray to minimize "
2043  "burn-in. Currently only works with "
2044  "XVideo video renderer."));
2045  return gc;
2046 }
2047 
2049 {
2050  HostComboBox *gc = new HostComboBox("AspectOverride");
2051 
2052  gc->setLabel(PlaybackSettings::tr("Video aspect override"));
2053 
2054  for (int m = kAspect_Off; m < kAspect_END; ++m)
2055  gc->addSelection(toString((AspectOverrideMode)m), QString::number(m));
2056 
2057  gc->setHelpText(PlaybackSettings::tr("When enabled, these will override "
2058  "the aspect ratio specified by any "
2059  "broadcaster for all video streams."));
2060  return gc;
2061 }
2062 
2064 {
2065  HostComboBox *gc = new HostComboBox("AdjustFill");
2066 
2067  gc->setLabel(PlaybackSettings::tr("Zoom"));
2068 
2069  for (int m = kAdjustFill_Off; m < kAdjustFill_END; ++m)
2070  gc->addSelection(toString((AdjustFillMode)m), QString::number(m));
2072  QString::number(kAdjustFill_AutoDetect_DefaultOff));
2074  QString::number(kAdjustFill_AutoDetect_DefaultHalf));
2075 
2076  gc->setHelpText(PlaybackSettings::tr("When enabled, these will apply a "
2077  "predefined zoom to all video "
2078  "playback in MythTV."));
2079  return gc;
2080 }
2081 
2082 // Theme settings
2083 
2085 {
2086  HostSpinBox *gs = new HostSpinBox("GuiWidth", 0, 1920, 8, true);
2087 
2088  gs->setLabel(AppearanceSettings::tr("GUI width (pixels)"));
2089 
2090  gs->setValue(0);
2091 
2092  gs->setHelpText(AppearanceSettings::tr("The width of the GUI. Do not make "
2093  "the GUI wider than your actual "
2094  "screen resolution. Set to 0 to "
2095  "automatically scale to "
2096  "fullscreen."));
2097  return gs;
2098 }
2099 
2101 {
2102  HostSpinBox *gs = new HostSpinBox("GuiHeight", 0, 1600, 8, true);
2103 
2104  gs->setLabel(AppearanceSettings::tr("GUI height (pixels)"));
2105 
2106  gs->setValue(0);
2107 
2108  gs->setHelpText(AppearanceSettings::tr("The height of the GUI. Do not make "
2109  "the GUI taller than your actual "
2110  "screen resolution. Set to 0 to "
2111  "automatically scale to "
2112  "fullscreen."));
2113  return gs;
2114 }
2115 
2117 {
2118  HostSpinBox *gs = new HostSpinBox("GuiOffsetX", -3840, 3840, 32, true);
2119 
2120  gs->setLabel(AppearanceSettings::tr("GUI X offset"));
2121 
2122  gs->setValue(0);
2123 
2124  gs->setHelpText(AppearanceSettings::tr("The horizontal offset where the "
2125  "GUI will be displayed. May only "
2126  "work if run in a window."));
2127  return gs;
2128 }
2129 
2131 {
2132  HostSpinBox *gs = new HostSpinBox("GuiOffsetY", -1600, 1600, 8, true);
2133 
2134  gs->setLabel(AppearanceSettings::tr("GUI Y offset"));
2135 
2136  gs->setValue(0);
2137 
2138  gs->setHelpText(AppearanceSettings::tr("The vertical offset where the "
2139  "GUI will be displayed."));
2140  return gs;
2141 }
2142 
2143 #if 0
2145 {
2146  HostSpinBox *gs = new HostSpinBox("DisplaySizeWidth", 0, 10000, 1);
2147 
2148  gs->setLabel(AppearanceSettings::tr("Display size - width"));
2149 
2150  gs->setValue(0);
2151 
2152  gs->setHelpText(AppearanceSettings::tr("Horizontal size of the monitor or TV. Used "
2153  "to calculate the actual aspect ratio of the display. This "
2154  "will override the DisplaySize from the system."));
2155 
2156  return gs;
2157 }
2158 
2160 {
2161  HostSpinBox *gs = new HostSpinBox("DisplaySizeHeight", 0, 10000, 1);
2162 
2163  gs->setLabel(AppearanceSettings::tr("Display size - height"));
2164 
2165  gs->setValue(0);
2166 
2167  gs->setHelpText(AppearanceSettings::tr("Vertical size of the monitor or TV. Used "
2168  "to calculate the actual aspect ratio of the display. This "
2169  "will override the DisplaySize from the system."));
2170 
2171  return gs;
2172 }
2173 #endif
2174 
2176 {
2177  HostCheckBox *gc = new HostCheckBox("GuiSizeForTV");
2178 
2179  gc->setLabel(AppearanceSettings::tr("Use GUI size for TV playback"));
2180 
2181  gc->setValue(true);
2182 
2183  gc->setHelpText(AppearanceSettings::tr("If enabled, use the above size for "
2184  "TV, otherwise use full screen."));
2185  return gc;
2186 }
2187 
2188 #if defined(USING_XRANDR) || CONFIG_DARWIN
2190 {
2191  HostCheckBox *gc = new HostCheckBox("UseVideoModes");
2192 
2193  gc->setLabel(VideoModeSettings::tr("Separate video modes for GUI and "
2194  "TV playback"));
2195 
2196  gc->setValue(false);
2197 
2198  gc->setHelpText(VideoModeSettings::tr("Switch X Window video modes for TV. "
2199  "Requires \"xrandr\" support."));
2200  return gc;
2201 }
2202 
2203 static HostSpinBox *VidModeWidth(int idx)
2204 {
2205  HostSpinBox *gs = new HostSpinBox(QString("VidModeWidth%1").arg(idx),
2206  0, 1920, 16, true);
2207 
2208  gs->setLabel((idx<1) ? VideoModeSettings::tr("In X", "Video mode width")
2209  : "");
2210 
2211  gs->setLabelAboveWidget(idx<1);
2212 
2213  gs->setValue(0);
2214 
2215  gs->setHelpText(VideoModeSettings::tr("Horizontal resolution of video "
2216  "which needs a special output "
2217  "resolution."));
2218  return gs;
2219 }
2220 
2221 static HostSpinBox *VidModeHeight(int idx)
2222 {
2223  HostSpinBox *gs = new HostSpinBox(QString("VidModeHeight%1").arg(idx),
2224  0, 1080, 16, true);
2225 
2226  gs->setLabel((idx<1) ? VideoModeSettings::tr("In Y", "Video mode height")
2227  : "");
2228 
2229  gs->setLabelAboveWidget(idx<1);
2230 
2231  gs->setValue(0);
2232 
2233  gs->setHelpText(VideoModeSettings::tr("Vertical resolution of video "
2234  "which needs a special output "
2235  "resolution."));
2236  return gs;
2237 }
2238 
2240 {
2241  HostComboBox *gc = new HostComboBox("GuiVidModeResolution");
2242 
2243  gc->setLabel(VideoModeSettings::tr("GUI"));
2244 
2245  gc->setLabelAboveWidget(true);
2246 
2247  gc->setHelpText(VideoModeSettings::tr("Resolution of screen when not "
2248  "watching a video."));
2249 
2250  const vector<DisplayResScreen> scr = GetVideoModes();
2251  for (uint i=0; i<scr.size(); ++i)
2252  {
2253  int w = scr[i].Width(), h = scr[i].Height();
2254  QString sel = QString("%1x%2").arg(w).arg(h);
2255  gc->addSelection(sel, sel);
2256  }
2257 
2258  // if no resolution setting, set it with a reasonable initial value
2259  if (scr.size() && (gCoreContext->GetSetting("GuiVidModeResolution").isEmpty()))
2260  {
2261  int w = 0, h = 0;
2262  gCoreContext->GetResolutionSetting("GuiVidMode", w, h);
2263  if ((w <= 0) || (h <= 0))
2264  (w = 640), (h = 480);
2265 
2266  DisplayResScreen dscr(w, h, -1, -1, -1.0, 0);
2267  double rate = -1.0;
2268  int i = DisplayResScreen::FindBestMatch(scr, dscr, rate);
2269  gc->setValue((i >= 0) ? i : scr.size()-1);
2270  }
2271 
2272  return gc;
2273 }
2274 
2276 {
2277  QString dhelp = VideoModeSettings::tr("Default screen resolution "
2278  "when watching a video.");
2279  QString ohelp = VideoModeSettings::tr("Screen resolution when watching a "
2280  "video at a specific resolution.");
2281 
2282  QString qstr = (idx<0) ? "TVVidModeResolution" :
2283  QString("TVVidModeResolution%1").arg(idx);
2284  HostComboBox *gc = new HostComboBox(qstr);
2285  QString lstr = (idx<0) ? VideoModeSettings::tr("Video output") :
2286  ((idx<1) ? VideoModeSettings::tr("Output") : "");
2287  QString hstr = (idx<0) ? dhelp : ohelp;
2288 
2289  gc->setLabel(lstr);
2290 
2291  gc->setLabelAboveWidget(idx<1);
2292  gc->setHelpText(hstr);
2293 
2294  const vector<DisplayResScreen> scr = GetVideoModes();
2295 
2296  for (uint i=0; i<scr.size(); ++i)
2297  {
2298  QString sel = QString("%1x%2").arg(scr[i].Width()).arg(scr[i].Height());
2299  gc->addSelection(sel, sel);
2300  }
2301 
2302  return gc;
2303 }
2304 
2306 {
2307  QString dhelp = VideoModeSettings::tr("Default refresh rate when watching "
2308  "a video. Leave at \"Auto\" to "
2309  "automatically use the best "
2310  "available");
2311  QString ohelp = VideoModeSettings::tr("Refresh rate when watching a "
2312  "video at a specific resolution. "
2313  "Leave at \"Auto\" to automatically "
2314  "use the best available");
2315 
2316  QString qstr = (idx<0) ? "TVVidModeRefreshRate" :
2317  QString("TVVidModeRefreshRate%1").arg(idx);
2319  QString lstr = (idx<1) ? VideoModeSettings::tr("Rate") : "";
2320  QString hstr = (idx<0) ? dhelp : ohelp;
2321 
2322  gc->setLabel(lstr);
2323  gc->setLabelAboveWidget(idx<1);
2324  gc->setHelpText(hstr);
2325  gc->setEnabled(false);
2326  return gc;
2327 }
2328 
2330 {
2331  QString dhelp = VideoModeSettings::tr("Aspect ratio when watching a "
2332  "video. Leave at \"%1\" to "
2333  "use ratio reported by the monitor. "
2334  "Set to 16:9 or 4:3 to force a "
2335  "specific aspect ratio.");
2336 
2337 
2338 
2339  QString ohelp = VideoModeSettings::tr("Aspect ratio when watching a "
2340  "video at a specific resolution. "
2341  "Leave at \"%1\" to use ratio "
2342  "reported by the monitor. Set to "
2343  "16:9 or 4:3 to force a specific "
2344  "aspect ratio.");
2345 
2346  QString qstr = (idx<0) ? "TVVidModeForceAspect" :
2347  QString("TVVidModeForceAspect%1").arg(idx);
2348 
2349  HostComboBox *gc = new HostComboBox(qstr);
2350 
2351  gc->setLabel( (idx<1) ? VideoModeSettings::tr("Aspect") : "" );
2352 
2353  gc->setLabelAboveWidget(idx<1);
2354 
2355  QString hstr = (idx<0) ? dhelp : ohelp;
2356 
2357  gc->setHelpText(hstr.arg(VideoModeSettings::tr("Default")));
2358 
2359  gc->addSelection(VideoModeSettings::tr("Default"), "0.0");
2360  gc->addSelection("16:9", "1.77777777777");
2361  gc->addSelection("4:3", "1.33333333333");
2362 
2363  return gc;
2364 }
2365 
2368 {
2369  setLabel(tr("Video Mode Settings"));
2370  setUseLabel(false);
2371 
2373  addChild(videomode);
2374  setTrigger(videomode);
2375 
2377  new HorizontalConfigurationGroup(false, false);
2378 
2381 
2382  defaultsettings->addChild(GuiVidModeResolution());
2383  defaultsettings->addChild(res);
2384  defaultsettings->addChild(rate);
2385  defaultsettings->addChild(TVVidModeForceAspect());
2386  connect(res, SIGNAL(valueChanged(const QString&)),
2387  rate, SLOT(ChangeResolution(const QString&)));
2388 
2389  ConfigurationGroup* overrides =
2390  new GridConfigurationGroup(5, true, true, false, true);
2391 
2392  overrides->setLabel(tr("Overrides for specific video sizes"));
2393 
2394  for (int idx = 0; idx < 3; ++idx)
2395  {
2396  //input side
2397  overrides->addChild(VidModeWidth(idx));
2398  overrides->addChild(VidModeHeight(idx));
2399  // output side
2400  overrides->addChild(res = TVVidModeResolution(idx));
2401  overrides->addChild(rate = TVVidModeRefreshRate(idx));
2402  overrides->addChild(TVVidModeForceAspect(idx));
2403 
2404  connect(res, SIGNAL(valueChanged(const QString&)),
2405  rate, SLOT(ChangeResolution(const QString&)));
2406  }
2407 
2408  ConfigurationGroup* settings = new VerticalConfigurationGroup(false);
2409 
2410  settings->addChild(defaultsettings);
2411  settings->addChild(overrides);
2412 
2413  addTarget("1", settings);
2414  addTarget("0", new VerticalConfigurationGroup(true));
2415 
2416 };
2417 #endif
2418 
2420 {
2421  HostCheckBox *gc = new HostCheckBox("HideMouseCursor");
2422 
2423  gc->setLabel(AppearanceSettings::tr("Hide mouse cursor in MythTV"));
2424 
2425  gc->setValue(false);
2426 
2427  gc->setHelpText(AppearanceSettings::tr("Toggles mouse cursor visibility "
2428  "for touchscreens. By default "
2429  "MythTV will auto-hide the cursor "
2430  "if the mouse doesn't move for a "
2431  "period, this setting disables the "
2432  "cursor entirely."));
2433  return gc;
2434 };
2435 
2436 
2438 {
2439  HostCheckBox *gc = new HostCheckBox("RunFrontendInWindow");
2440 
2441  gc->setLabel(AppearanceSettings::tr("Use window border"));
2442 
2443  gc->setValue(false);
2444 
2445  gc->setHelpText(AppearanceSettings::tr("Toggles between windowed and "
2446  "borderless operation."));
2447  return gc;
2448 }
2449 
2451 {
2452  HostCheckBox *gc = new HostCheckBox("UseFixedWindowSize");
2453 
2454  gc->setLabel(AppearanceSettings::tr("Use fixed window size"));
2455 
2456  gc->setValue(true);
2457 
2458  gc->setHelpText(AppearanceSettings::tr("If disabled, the video playback "
2459  "window can be resized"));
2460  return gc;
2461 }
2462 
2464 {
2465  HostCheckBox *gc = new HostCheckBox("AlwaysOnTop");
2466 
2467  gc->setLabel(AppearanceSettings::tr("Always On Top"));
2468 
2469  gc->setValue(false);
2470 
2471  gc->setHelpText(AppearanceSettings::tr("If enabled, MythTV will always be "
2472  "on top"));
2473  return gc;
2474 }
2475 
2477 {
2478  HostComboBox *gc = new HostComboBox("DateFormat");
2479  gc->setLabel(AppearanceSettings::tr("Date format"));
2480 
2481  QDate sampdate = MythDate::current().toLocalTime().date();
2482  QString sampleStr = AppearanceSettings::tr("Samples are shown using "
2483  "today's date.");
2484 
2485  if (sampdate.month() == sampdate.day())
2486  {
2487  sampdate = sampdate.addDays(1);
2488  sampleStr = AppearanceSettings::tr("Samples are shown using "
2489  "tomorrow's date.");
2490  }
2491 
2492  QLocale locale = gCoreContext->GetQLocale();
2493 
2494  gc->addSelection(locale.toString(sampdate, "ddd MMM d"), "ddd MMM d");
2495  gc->addSelection(locale.toString(sampdate, "ddd d MMM"), "ddd d MMM");
2496  gc->addSelection(locale.toString(sampdate, "ddd MMMM d"), "ddd MMMM d");
2497  gc->addSelection(locale.toString(sampdate, "ddd d MMMM"), "ddd d MMMM");
2498  gc->addSelection(locale.toString(sampdate, "dddd MMM d"), "dddd MMM d");
2499  gc->addSelection(locale.toString(sampdate, "dddd d MMM"), "dddd d MMM");
2500  gc->addSelection(locale.toString(sampdate, "MMM d"), "MMM d");
2501  gc->addSelection(locale.toString(sampdate, "d MMM"), "d MMM");
2502  gc->addSelection(locale.toString(sampdate, "MM/dd"), "MM/dd");
2503  gc->addSelection(locale.toString(sampdate, "dd/MM"), "dd/MM");
2504  gc->addSelection(locale.toString(sampdate, "MM.dd"), "MM.dd");
2505  gc->addSelection(locale.toString(sampdate, "dd.MM"), "dd.MM");
2506  gc->addSelection(locale.toString(sampdate, "M/d/yyyy"), "M/d/yyyy");
2507  gc->addSelection(locale.toString(sampdate, "d/M/yyyy"), "d/M/yyyy");
2508  gc->addSelection(locale.toString(sampdate, "MM.dd.yyyy"), "MM.dd.yyyy");
2509  gc->addSelection(locale.toString(sampdate, "dd.MM.yyyy"), "dd.MM.yyyy");
2510  gc->addSelection(locale.toString(sampdate, "yyyy-MM-dd"), "yyyy-MM-dd");
2511  gc->addSelection(locale.toString(sampdate, "ddd MMM d yyyy"), "ddd MMM d yyyy");
2512  gc->addSelection(locale.toString(sampdate, "ddd d MMM yyyy"), "ddd d MMM yyyy");
2513  gc->addSelection(locale.toString(sampdate, "ddd yyyy-MM-dd"), "ddd yyyy-MM-dd");
2514 
2515  QString cn_long = QString("dddd yyyy") + QChar(0x5E74) +
2516  "M" + QChar(0x6708) + "d"+ QChar(0x65E5); // dddd yyyy年M月d日
2517  gc->addSelection(locale.toString(sampdate, cn_long), cn_long);
2518  QString cn_med = QString("dddd ") +
2519  "M" + QChar(0x6708) + "d"+ QChar(0x65E5); // dddd M月d日
2520 
2521  gc->addSelection(locale.toString(sampdate, cn_med), cn_med);
2522 
2523  //: %1 gives additional information regarding the date format
2524  gc->setHelpText(AppearanceSettings::tr("Your preferred date format. %1")
2525  .arg(sampleStr));
2526 
2527  return gc;
2528 }
2529 
2531 {
2532  HostComboBox *gc = new HostComboBox("ShortDateFormat");
2533  gc->setLabel(AppearanceSettings::tr("Short date format"));
2534 
2535  QDate sampdate = MythDate::current().toLocalTime().date();
2536 
2537  QString sampleStr = AppearanceSettings::tr("Samples are shown using "
2538  "today's date.");
2539 
2540  if (sampdate.month() == sampdate.day())
2541  {
2542  sampdate = sampdate.addDays(1);
2543  sampleStr = AppearanceSettings::tr("Samples are shown using "
2544  "tomorrow's date.");
2545  }
2546  QLocale locale = gCoreContext->GetQLocale();
2547 
2548  gc->addSelection(locale.toString(sampdate, "M/d"), "M/d");
2549  gc->addSelection(locale.toString(sampdate, "d/M"), "d/M");
2550  gc->addSelection(locale.toString(sampdate, "MM/dd"), "MM/dd");
2551  gc->addSelection(locale.toString(sampdate, "dd/MM"), "dd/MM");
2552  gc->addSelection(locale.toString(sampdate, "MM.dd"), "MM.dd");
2553  gc->addSelection(locale.toString(sampdate, "dd.MM."), "dd.MM.");
2554  gc->addSelection(locale.toString(sampdate, "M.d."), "M.d.");
2555  gc->addSelection(locale.toString(sampdate, "d.M."), "d.M.");
2556  gc->addSelection(locale.toString(sampdate, "MM-dd"), "MM-dd");
2557  gc->addSelection(locale.toString(sampdate, "dd-MM"), "dd-MM");
2558  gc->addSelection(locale.toString(sampdate, "MMM d"), "MMM d");
2559  gc->addSelection(locale.toString(sampdate, "d MMM"), "d MMM");
2560  gc->addSelection(locale.toString(sampdate, "ddd d"), "ddd d");
2561  gc->addSelection(locale.toString(sampdate, "d ddd"), "d ddd");
2562  gc->addSelection(locale.toString(sampdate, "ddd M/d"), "ddd M/d");
2563  gc->addSelection(locale.toString(sampdate, "ddd d/M"), "ddd d/M");
2564  gc->addSelection(locale.toString(sampdate, "ddd d.M"), "ddd d.M");
2565  gc->addSelection(locale.toString(sampdate, "ddd dd.MM"), "ddd dd.MM");
2566  gc->addSelection(locale.toString(sampdate, "M/d ddd"), "M/d ddd");
2567  gc->addSelection(locale.toString(sampdate, "d/M ddd"), "d/M ddd");
2568 
2569  QString cn_short1 = QString("M") + QChar(0x6708) + "d" + QChar(0x65E5); // M月d日
2570 
2571  gc->addSelection(locale.toString(sampdate, cn_short1), cn_short1);
2572 
2573  QString cn_short2 = QString("ddd M") + QChar(0x6708) + "d" + QChar(0x65E5); // ddd M月d日
2574 
2575  gc->addSelection(locale.toString(sampdate, cn_short2), cn_short2);
2576 
2577  //: %1 gives additional information regarding the date format
2578  gc->setHelpText(AppearanceSettings::tr("Your preferred short date format. %1")
2579  .arg(sampleStr));
2580  return gc;
2581 }
2582 
2584 {
2585  HostComboBox *gc = new HostComboBox("TimeFormat");
2586 
2587  gc->setLabel(AppearanceSettings::tr("Time format"));
2588 
2589  QTime samptime = QTime::currentTime();
2590 
2591  QLocale locale = gCoreContext->GetQLocale();
2592 
2593  gc->addSelection(locale.toString(samptime, "h:mm AP"), "h:mm AP");
2594  gc->addSelection(locale.toString(samptime, "h:mm ap"), "h:mm ap");
2595  gc->addSelection(locale.toString(samptime, "hh:mm AP"), "hh:mm AP");
2596  gc->addSelection(locale.toString(samptime, "hh:mm ap"), "hh:mm ap");
2597  gc->addSelection(locale.toString(samptime, "h:mm"), "h:mm");
2598  gc->addSelection(locale.toString(samptime, "hh:mm"), "hh:mm");
2599  gc->addSelection(locale.toString(samptime, "hh.mm"), "hh.mm");
2600  gc->addSelection(locale.toString(samptime, "AP h:mm"), "AP h:mm");
2601 
2602  gc->setHelpText(AppearanceSettings::tr("Your preferred time format. You "
2603  "must choose a format with \"AM\" "
2604  "or \"PM\" in it, otherwise your "
2605  "time display will be 24-hour or "
2606  "\"military\" time."));
2607  return gc;
2608 }
2609 
2610 #if ! CONFIG_DARWIN
2612 {
2613  HostComboBox *gc = new HostComboBox("ThemePainter");
2614 
2615  gc->setLabel(AppearanceSettings::tr("Paint engine"));
2616 
2617  gc->addSelection(QCoreApplication::translate("(Common)", "Qt"), QT_PAINTER);
2618  gc->addSelection(QCoreApplication::translate("(Common)", "Auto", "Automatic"),
2619  AUTO_PAINTER);
2620 #if defined USING_OPENGL && ! defined USING_OPENGLES
2621  gc->addSelection(QCoreApplication::translate("(Common)", "OpenGL 2"),
2622  OPENGL2_PAINTER);
2623  gc->addSelection(QCoreApplication::translate("(Common)", "OpenGL 1"),
2624  OPENGL_PAINTER);
2625 #endif
2626 #ifdef _WIN32
2627  gc->addSelection(QCoreApplication::translate("(Common)", "Direct3D"),
2628  D3D9_PAINTER);
2629 #endif
2630  gc->setHelpText(
2631  AppearanceSettings::tr("This selects what MythTV uses to draw. "
2632  "Choosing '%1' is recommended, unless running "
2633  "on systems with broken OpenGL implementations "
2634  "(broken hardware or drivers or windowing "
2635  "systems) where only Qt works.")
2636  .arg(QCoreApplication::translate("(Common)", "Auto", "Automatic")));
2637 
2638  return gc;
2639 }
2640 #endif
2641 
2643 {
2644  HostComboBox *gc = new HostComboBox("ChannelFormat");
2645 
2646  gc->setLabel(GeneralSettings::tr("Channel format"));
2647 
2648  gc->addSelection(GeneralSettings::tr("number"), "<num>");
2649  gc->addSelection(GeneralSettings::tr("number callsign"), "<num> <sign>");
2650  gc->addSelection(GeneralSettings::tr("number name"), "<num> <name>");
2651  gc->addSelection(GeneralSettings::tr("callsign"), "<sign>");
2652  gc->addSelection(GeneralSettings::tr("name"), "<name>");
2653 
2654  gc->setHelpText(GeneralSettings::tr("Your preferred channel format."));
2655 
2656  gc->setValue(1);
2657 
2658  return gc;
2659 }
2660 
2662 {
2663  HostComboBox *gc = new HostComboBox("LongChannelFormat");
2664 
2665  gc->setLabel(GeneralSettings::tr("Long channel format"));
2666 
2667  gc->addSelection(GeneralSettings::tr("number"), "<num>");
2668  gc->addSelection(GeneralSettings::tr("number callsign"), "<num> <sign>");
2669  gc->addSelection(GeneralSettings::tr("number name"), "<num> <name>");
2670  gc->addSelection(GeneralSettings::tr("callsign"), "<sign>");
2671  gc->addSelection(GeneralSettings::tr("name"), "<name>");
2672 
2673  gc->setHelpText(GeneralSettings::tr("Your preferred long channel format."));
2674 
2675  gc->setValue(2);
2676 
2677  return gc;
2678 }
2679 
2681 {
2682  HostCheckBox *gc = new HostCheckBox("ChannelGroupRememberLast");
2683 
2684  gc->setLabel(ChannelGroupSettings::tr("Remember last channel group"));
2685 
2686  gc->setHelpText(ChannelGroupSettings::tr("If enabled, the EPG will "
2687  "initially display only the "
2688  "channels from the last channel "
2689  "group selected. Pressing \"4\" "
2690  "will toggle channel group."));
2691 
2692  gc->setValue(false);
2693 
2694  return gc;
2695 }
2696 
2698 {
2699  HostComboBox *gc = new HostComboBox("ChannelGroupDefault");
2700 
2701  gc->setLabel(ChannelGroupSettings::tr("Default channel group"));
2702 
2703  ChannelGroupList changrplist;
2704 
2705  changrplist = ChannelGroup::GetChannelGroups();
2706 
2707  gc->addSelection(ChannelGroupSettings::tr("All Channels"), "-1");
2708 
2709  ChannelGroupList::iterator it;
2710 
2711  for (it = changrplist.begin(); it < changrplist.end(); ++it)
2712  gc->addSelection(it->name, QString("%1").arg(it->grpid));
2713 
2714  gc->setHelpText(ChannelGroupSettings::tr("Default channel group to be "
2715  "shown in the EPG. Pressing "
2716  "GUIDE key will toggle channel "
2717  "group."));
2718  gc->setValue(false);
2719 
2720  return gc;
2721 }
2722 
2724 {
2725  HostCheckBox *gc = new HostCheckBox("BrowseChannelGroup");
2726 
2727  gc->setLabel(GeneralSettings::tr("Browse/change channels from Channel "
2728  "Group"));
2729 
2730  gc->setHelpText(GeneralSettings::tr("If enabled, Live TV will browse or "
2731  "change channels from the selected "
2732  "channel group. The \"All Channels\" "
2733  "channel group may be selected to "
2734  "browse all channels."));
2735  gc->setValue(false);
2736 
2737  return gc;
2738 }
2739 
2740 // Channel Group Settings
2743 {
2744  setLabel(tr("Remember last channel group"));
2745  setUseLabel(false);
2746 
2747  Setting* RememberChanGrpEnabled = ChannelGroupRememberLast();
2748  addChild(RememberChanGrpEnabled);
2749  setTrigger(RememberChanGrpEnabled);
2750 
2751  ConfigurationGroup* settings = new VerticalConfigurationGroup(false,false);
2752  settings->addChild(ChannelGroupDefault());
2753  addTarget("0", settings);
2754 
2755  // show nothing if RememberChanGrpEnabled is on
2756  addTarget("1", new VerticalConfigurationGroup(true,false));
2757 };
2758 
2759 // General RecPriorities settings
2760 
2762 {
2763  GlobalComboBox *bc = new GlobalComboBox("SchedOpenEnd");
2764 
2765  bc->setLabel(GeneralRecPrioritiesSettings::tr("Avoid back to back "
2766  "recordings"));
2767 
2768  bc->setHelpText(
2769  GeneralRecPrioritiesSettings::tr("Selects the situations where the "
2770  "scheduler will avoid assigning shows "
2771  "to the same card if their end time "
2772  "and start time match. This will be "
2773  "allowed when necessary in order to "
2774  "resolve conflicts."));
2775 
2776  bc->addSelection(GeneralRecPrioritiesSettings::tr("Never"), "0");
2777  bc->addSelection(GeneralRecPrioritiesSettings::tr("Different Channels"),
2778  "1");
2779  bc->addSelection(GeneralRecPrioritiesSettings::tr("Always"), "2");
2780 
2781  bc->setValue(0);
2782 
2783  return bc;
2784 }
2785 
2787 {
2788  GlobalSpinBox *bs = new GlobalSpinBox("PrefInputPriority", 1, 99, 1);
2789 
2790  bs->setLabel(GeneralRecPrioritiesSettings::tr("Preferred input priority"));
2791 
2792  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority when "
2793  "a showing matches the "
2794  "preferred input selected "
2795  "in the 'Scheduling "
2796  "Options' section of the "
2797  "recording rule."));
2798 
2799  bs->setValue(2);
2800  return bs;
2801 }
2802 
2804 {
2805  GlobalSpinBox *bs = new GlobalSpinBox("HDTVRecPriority", -99, 99, 1);
2806 
2807  bs->setLabel(GeneralRecPrioritiesSettings::tr("HDTV recording priority"));
2808 
2809  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority when "
2810  "a showing is marked as an "
2811  "HDTV broadcast in the TV "
2812  "listings."));
2813 
2814  bs->setValue(0);
2815 
2816  return bs;
2817 }
2818 
2820 {
2821  GlobalSpinBox *bs = new GlobalSpinBox("WSRecPriority", -99, 99, 1);
2822 
2823  bs->setLabel(GeneralRecPrioritiesSettings::tr("Widescreen recording "
2824  "priority"));
2825 
2826  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority when "
2827  "a showing is marked as "
2828  "widescreen in the TV "
2829  "listings."));
2830 
2831  bs->setValue(0);
2832 
2833  return bs;
2834 }
2835 
2837 {
2838  GlobalSpinBox *bs = new GlobalSpinBox("SignLangRecPriority",
2839  -99, 99, 1);
2840 
2841  bs->setLabel(GeneralRecPrioritiesSettings::tr("Sign language recording "
2842  "priority"));
2843 
2844  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority "
2845  "when a showing is "
2846  "marked as having "
2847  "in-vision sign "
2848  "language."));
2849 
2850  bs->setValue(0);
2851 
2852  return bs;
2853 }
2854 
2856 {
2857  GlobalSpinBox *bs = new GlobalSpinBox("OnScrSubRecPriority",
2858  -99, 99, 1);
2859 
2860  bs->setLabel(GeneralRecPrioritiesSettings::tr("In-vision Subtitles "
2861  "Recording Priority"));
2862 
2863  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority "
2864  "when a showing is marked "
2865  "as having in-vision "
2866  "subtitles."));
2867 
2868  bs->setValue(0);
2869 
2870  return bs;
2871 }
2872 
2874 {
2875  GlobalSpinBox *bs = new GlobalSpinBox("CCRecPriority",
2876  -99, 99, 1);
2877 
2878  bs->setLabel(GeneralRecPrioritiesSettings::tr("Subtitles/CC recording "
2879  "priority"));
2880 
2881  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority when "
2882  "a showing is marked as "
2883  "having subtitles or "
2884  "closed captioning (CC) "
2885  "available."));
2886 
2887  bs->setValue(0);
2888 
2889  return bs;
2890 }
2891 
2893 {
2894  GlobalSpinBox *bs = new GlobalSpinBox("HardHearRecPriority",
2895  -99, 99, 1);
2896 
2897  bs->setLabel(GeneralRecPrioritiesSettings::tr("Hard of hearing priority"));
2898 
2899  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority when "
2900  "a showing is marked as "
2901  "having support for "
2902  "viewers with impaired "
2903  "hearing."));
2904 
2905  bs->setValue(0);
2906 
2907  return bs;
2908 }
2909 
2911 {
2912  GlobalSpinBox *bs = new GlobalSpinBox("AudioDescRecPriority",
2913  -99, 99, 1);
2914 
2915  bs->setLabel(GeneralRecPrioritiesSettings::tr("Audio described priority"));
2916 
2917  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority when "
2918  "a showing is marked as "
2919  "being Audio Described."));
2920 
2921  bs->setValue(0);
2922 
2923  return bs;
2924 }
2925 
2927 {
2928  HostLineEdit *ge = new HostLineEdit("DefaultTVChannel");
2929 
2930  ge->setLabel(EPGSettings::tr("Guide starts at channel"));
2931 
2932  ge->setValue("3");
2933 
2934  ge->setHelpText(EPGSettings::tr("The program guide starts on this channel "
2935  "if it is run from outside of Live TV "
2936  "mode. Leave blank to enable Live TV "
2937  "automatic start channel."));
2938 
2939  return ge;
2940 }
2941 
2943 {
2944  HostSpinBox *gs = new HostSpinBox("SelChangeRecThreshold", 1, 600, 1);
2945 
2946  gs->setLabel(EPGSettings::tr("Record threshold"));
2947 
2948  gs->setValue(16);
2949 
2950  gs->setHelpText(EPGSettings::tr("Pressing SELECT on a show that is at "
2951  "least this many minutes into the future "
2952  "will schedule a recording."));
2953  return gs;
2954 }
2955 
2957 {
2958  GlobalComboBox *gc = new GlobalComboBox("Language");
2959 
2960  gc->setLabel(AppearanceSettings::tr("Language"));
2961 
2962  QMap<QString, QString> langMap = MythTranslation::getLanguages();
2963  QStringList langs = langMap.values();
2964  langs.sort();
2965  QString langCode = gCoreContext->GetSetting("Language").toLower();
2966 
2967  if (langCode.isEmpty())
2968  langCode = "en_US";
2969 
2970  gc->clearSelections();
2971 
2972  for (QStringList::Iterator it = langs.begin(); it != langs.end(); ++it)
2973  {
2974  QString label = *it;
2975  QString value = langMap.key(label);
2976  gc->addSelection(label, value, (value.toLower() == langCode));
2977  }
2978 
2979  gc->setHelpText(AppearanceSettings::tr("Your preferred language for the "
2980  "user interface."));
2981  return gc;
2982 }
2983 
2985 {
2986  widget->clearSelections();
2987  QString q = QString("ISO639Language%1").arg(i);
2988  QString lang = gCoreContext->GetSetting(q, "").toLower();
2989 
2990  if ((lang.isEmpty() || lang == "aar") &&
2991  !gCoreContext->GetSetting("Language", "").isEmpty())
2992  {
2993  lang = iso639_str2_to_str3(gCoreContext->GetLanguage().toLower());
2994  }
2995 
2996  QMap<int,QString>::iterator it = _iso639_key_to_english_name.begin();
2997  QMap<int,QString>::iterator ite = _iso639_key_to_english_name.end();
2998 
2999  for (; it != ite; ++it)
3000  {
3001  QString desc = (*it);
3002  int idx = desc.indexOf(";");
3003  if (idx > 0)
3004  desc = desc.left(idx);
3005 
3006  const QString il = iso639_key_to_str3(it.key());
3007  widget->addSelection(desc, il, il == lang);
3008  }
3009 }
3010 
3012 {
3013  GlobalComboBox *gc = new GlobalComboBox(QString("ISO639Language%1").arg(i));
3014 
3015  gc->setLabel(AppearanceSettings::tr("Guide language #%1").arg(i+1));
3016 
3017  // We should try to get language from "MythLanguage"
3018  // then use code 2 to code 3 map in iso639.h
3019  ISO639_fill_selections(gc, i);
3020 
3021  gc->setHelpText(AppearanceSettings::tr("Your #%1 preferred language for "
3022  "Program Guide data and captions.")
3023  .arg(i+1));
3024  return gc;
3025 }
3026 
3028 {
3029  HostCheckBox *gc = new HostCheckBox("NetworkControlEnabled");
3030 
3031  gc->setLabel(MainGeneralSettings::tr("Enable Network Remote Control "
3032  "interface"));
3033 
3034  gc->setHelpText(MainGeneralSettings::tr("This enables support for "
3035  "controlling MythFrontend "
3036  "over the network."));
3037 
3038  gc->setValue(false);
3039 
3040  return gc;
3041 }
3042 
3044 {
3045  HostSpinBox *gs = new HostSpinBox("NetworkControlPort", 1025, 65535, 1);
3046 
3047  gs->setLabel(MainGeneralSettings::tr("Network Remote Control port"));
3048 
3049  gs->setValue(6546);
3050 
3051  gs->setHelpText(MainGeneralSettings::tr("This specifies what port the "
3052  "Network Remote Control "
3053  "interface will listen on for "
3054  "new connections."));
3055  return gs;
3056 }
3057 
3059 {
3060  HostLineEdit *ge = new HostLineEdit("UDPNotifyPort");
3061 
3062  ge->setLabel(MainGeneralSettings::tr("UDP notify port"));
3063 
3064  ge->setValue("6948");
3065 
3066  ge->setHelpText(MainGeneralSettings::tr("MythTV will listen for "
3067  "connections from the "
3068  "\"mythutil\" program on "
3069  "this port."));
3070  return ge;
3071 }
3072 
3073 #ifdef USING_AIRPLAY
3074 // AirPlay Settings
3076 {
3077  HostCheckBox *gc = new HostCheckBox("AirPlayEnabled");
3078 
3079  gc->setLabel(MainGeneralSettings::tr("Enable AirPlay"));
3080 
3081  gc->setHelpText(MainGeneralSettings::tr("AirPlay lets you wirelessly view "
3082  "content on your TV from your "
3083  "iPhone, iPad, iPod Touch, or "
3084  "iTunes on your computer."));
3085 
3086  gc->setValue(true);
3087 
3088  return gc;
3089 }
3090 
3092 {
3093  HostCheckBox *gc = new HostCheckBox("AirPlayAudioOnly");
3094 
3095  gc->setLabel(MainGeneralSettings::tr("Only support AirTunes (no video)"));
3096 
3097  gc->setHelpText(MainGeneralSettings::tr("Only stream audio from your "
3098  "iPhone, iPad, iPod Touch, or "
3099  "iTunes on your computer"));
3100 
3101  gc->setValue(false);
3102 
3103  return gc;
3104 }
3105 
3107 {
3108  HostCheckBox *gc = new HostCheckBox("AirPlayPasswordEnabled");
3109 
3110  gc->setLabel(MainGeneralSettings::tr("Require password"));
3111 
3112  gc->setValue(false);
3113 
3114  gc->setHelpText(MainGeneralSettings::tr("Require a password to use "
3115  "AirPlay. Your iPhone, iPad, iPod "
3116  "Touch, or iTunes on your computer "
3117  "will prompt you when required"));
3118  return gc;
3119 }
3120 
3122 {
3123  HostLineEdit *ge = new HostLineEdit("AirPlayPassword");
3124 
3125  ge->setValue("0000");
3126 
3127  ge->setHelpText(MainGeneralSettings::tr("Your iPhone, iPad, iPod Touch, or "
3128  "iTunes on your computer will "
3129  "prompt you for this password "
3130  "when required"));
3131  return ge;
3132 }
3133 
3135 {
3137  new HorizontalConfigurationGroup(false, false, false, false);
3138 
3140  hc->addChild(AirPlayPassword());
3141 
3142  return hc;
3143 }
3144 
3146 {
3147  HostCheckBox *gc = new HostCheckBox("AirPlayFullScreen");
3148 
3149  gc->setLabel(MainGeneralSettings::tr("AirPlay full screen playback"));
3150 
3151  gc->setValue(false);
3152 
3153  gc->setHelpText(MainGeneralSettings::tr("During music playback, displays "
3154  "album cover and various media "
3155  "information in full screen mode"));
3156  return gc;
3157 }
3158 
3160 {
3162 
3163  ts->setValue(MainGeneralSettings::tr("All AirPlay settings take effect "
3164  "when you restart MythFrontend."));
3165  return ts;
3166 }
3167 
3169 {
3171 
3172  if (MythRAOPConnection::LoadKey() == NULL)
3173  {
3174  ts->setValue(MainGeneralSettings::tr("AirTunes RSA key couldn't be "
3175  "loaded. Check http://www.mythtv.org/wiki/AirTunes/AirPlay. "
3176  "Last Error: %1")
3178  }
3179  else
3180  {
3181  ts->setValue(MainGeneralSettings::tr("AirTunes RSA key successfully "
3182  "loaded."));
3183  }
3184 
3185  return ts;
3186 }
3187 #endif
3188 
3190 {
3191  HostCheckBox *gc = new HostCheckBox("RealtimePriority");
3192 
3193  gc->setLabel(PlaybackSettings::tr("Enable realtime priority threads"));
3194 
3195  gc->setHelpText(PlaybackSettings::tr("When running mythfrontend with root "
3196  "privileges, some threads can be "
3197  "given enhanced priority. Disable "
3198  "this if MythFrontend freezes during "
3199  "video playback."));
3200  gc->setValue(true);
3201 
3202  return gc;
3203 }
3204 
3206 {
3207  HostLineEdit *ge = new HostLineEdit("IgnoreDevices");
3208 
3209  ge->setLabel(MainGeneralSettings::tr("Ignore devices"));
3210 
3211  ge->setValue("");
3212 
3213  ge->setHelpText(MainGeneralSettings::tr("If there are any devices that you "
3214  "do not want to be monitored, list "
3215  "them here with commas in-between. "
3216  "The plugins will ignore them. "
3217  "Requires restart."));
3218  return ge;
3219 }
3220 
3222 {
3223  HostComboBox *gc = new HostComboBox("DisplayGroupTitleSort");
3224 
3225  gc->setLabel(PlaybackSettings::tr("Sort titles"));
3226 
3227  gc->addSelection(PlaybackSettings::tr("Alphabetically"),
3228  QString::number(PlaybackBox::TitleSortAlphabetical));
3229  gc->addSelection(PlaybackSettings::tr("By recording priority"),
3230  QString::number(PlaybackBox::TitleSortRecPriority));
3231 
3232  gc->setHelpText(PlaybackSettings::tr("Sets the title sorting order when "
3233  "the view is set to Titles only."));
3234  return gc;
3235 }
3236 
3238 {
3239  HostCheckBox *gc = new HostCheckBox("PlaybackWatchList");
3240 
3241  gc->setLabel(WatchListSettings::tr("Include the 'Watch List' group"));
3242 
3243  gc->setValue(true);
3244 
3245  gc->setHelpText(WatchListSettings::tr("The 'Watch List' is an abbreviated "
3246  "list of recordings sorted to "
3247  "highlight series and shows that "
3248  "need attention in order to keep up "
3249  "to date."));
3250  return gc;
3251 }
3252 
3254 {
3255  HostCheckBox *gc = new HostCheckBox("PlaybackWLStart");
3256 
3257  gc->setLabel(WatchListSettings::tr("Start from the Watch List view"));
3258 
3259  gc->setValue(false);
3260 
3261  gc->setHelpText(WatchListSettings::tr("If enabled, the 'Watch List' will "
3262  "be the initial view each time you "
3263  "enter the Watch Recordings screen"));
3264  return gc;
3265 }
3266 
3268 {
3269  HostCheckBox *gc = new HostCheckBox("PlaybackWLAutoExpire");
3270 
3271  gc->setLabel(WatchListSettings::tr("Exclude recordings not set for "
3272  "Auto-Expire"));
3273 
3274  gc->setValue(false);
3275 
3276  gc->setHelpText(WatchListSettings::tr("Set this if you turn off "
3277  "Auto-Expire only for recordings "
3278  "that you've seen and intend to "
3279  "keep. This option will exclude "
3280  "these recordings from the "
3281  "'Watch List'."));
3282  return gc;
3283 }
3284 
3286 {
3287  HostSpinBox *gs = new HostSpinBox("PlaybackWLMaxAge", 30, 180, 10);
3288 
3289  gs->setLabel(WatchListSettings::tr("Maximum days counted in the score"));
3290 
3291  gs->setValue(60);
3292 
3293  gs->setHelpText(WatchListSettings::tr("The 'Watch List' scores are based "
3294  "on 1 point equals one day since "
3295  "recording. This option limits the "
3296  "maximum score due to age and "
3297  "affects other weighting factors."));
3298  return gs;
3299 }
3300 
3302 {
3303  HostSpinBox *gs = new HostSpinBox("PlaybackWLBlackOut", 0, 5, 1);
3304 
3305  gs->setLabel(WatchListSettings::tr("Days to exclude weekly episodes after "
3306  "delete"));
3307 
3308  gs->setValue(2);
3309 
3310  gs->setHelpText(WatchListSettings::tr("When an episode is deleted or "
3311  "marked as watched, other episodes "
3312  "of the series are excluded from the "
3313  "'Watch List' for this interval of "
3314  "time. Daily shows also have a "
3315  "smaller interval based on this "
3316  "setting."));
3317  return gs;
3318 }
3319 
3322 {
3323 
3324  Setting* watchList = PlaybackWatchList();
3325  addChild(watchList);
3326  setTrigger(watchList);
3327 
3328  ConfigurationGroup* settings = new VerticalConfigurationGroup(false);
3329 
3330  settings->addChild(PlaybackWLStart());
3331  settings->addChild(PlaybackWLAutoExpire());
3332  settings->addChild(PlaybackWLMaxAge());
3333  settings->addChild(PlaybackWLBlackOut());
3334 
3335  addTarget("1", settings);
3336 
3337  addTarget("0", new VerticalConfigurationGroup(true));
3338 };
3339 
3341 {
3342  HostCheckBox *gc = new HostCheckBox("LCDShowTime");
3343 
3344  gc->setLabel(LcdSettings::tr("Display time"));
3345 
3346  gc->setHelpText(LcdSettings::tr("Display current time on idle LCD "
3347  "display."));
3348 
3349  gc->setValue(true);
3350 
3351  return gc;
3352 }
3353 
3355 {
3356  HostCheckBox *gc = new HostCheckBox("LCDShowRecStatus");
3357 
3358  gc->setLabel(LcdSettings::tr("Display recording status"));
3359 
3360  gc->setHelpText(LcdSettings::tr("Display current recordings information "
3361  "on LCD display."));
3362 
3363  gc->setValue(false);
3364 
3365  return gc;
3366 }
3367 
3369 {
3370  HostCheckBox *gc = new HostCheckBox("LCDShowMenu");
3371 
3372  gc->setLabel(LcdSettings::tr("Display menus"));
3373 
3374  gc->setHelpText(LcdSettings::tr("Display selected menu on LCD display. "));
3375 
3376  gc->setValue(true);
3377 
3378  return gc;
3379 }
3380 
3382 {
3383  HostSpinBox *gs = new HostSpinBox("LCDPopupTime", 1, 300, 1, true);
3384 
3385  gs->setLabel(LcdSettings::tr("Menu pop-up time"));
3386 
3387  gs->setHelpText(LcdSettings::tr("How many seconds the menu will remain "
3388  "visible after navigation."));
3389 
3390  gs->setValue(5);
3391 
3392  return gs;
3393 }
3394 
3396 {
3397  HostCheckBox *gc = new HostCheckBox("LCDShowMusic");
3398 
3399  gc->setLabel(LcdSettings::tr("Display music artist and title"));
3400 
3401  gc->setHelpText(LcdSettings::tr("Display playing artist and song title in "
3402  "MythMusic on LCD display."));
3403 
3404  gc->setValue(true);
3405 
3406  return gc;
3407 }
3408 
3410 {
3411  HostComboBox *gc = new HostComboBox("LCDShowMusicItems");
3412 
3413  gc->setLabel(LcdSettings::tr("Items"));
3414 
3415  gc->addSelection(LcdSettings::tr("Artist - Title"), "ArtistTitle");
3416  gc->addSelection(LcdSettings::tr("Artist [Album] Title"),
3417  "ArtistAlbumTitle");
3418 
3419  gc->setHelpText(LcdSettings::tr("Which items to show when playing music."));
3420 
3421  return gc;
3422 }
3423 
3425 {
3426  HostCheckBox *gc = new HostCheckBox("LCDShowChannel");
3427 
3428  gc->setLabel(LcdSettings::tr("Display channel information"));
3429 
3430  gc->setHelpText(LcdSettings::tr("Display tuned channel information on LCD "
3431  "display."));
3432 
3433  gc->setValue(true);
3434 
3435  return gc;
3436 }
3437 
3439 {
3440  HostCheckBox *gc = new HostCheckBox("LCDShowVolume");
3441 
3442  gc->setLabel(LcdSettings::tr("Display volume information"));
3443 
3444  gc->setHelpText(LcdSettings::tr("Display volume level information "
3445  "on LCD display."));
3446 
3447  gc->setValue(true);
3448 
3449  return gc;
3450 }
3451 
3453 {
3454  HostCheckBox *gc = new HostCheckBox("LCDShowGeneric");
3455 
3456  gc->setLabel(LcdSettings::tr("Display generic information"));
3457 
3458  gc->setHelpText(LcdSettings::tr("Display generic information on LCD display."));
3459 
3460  gc->setValue(true);
3461 
3462  return gc;
3463 }
3464 
3466 {
3467  HostCheckBox *gc = new HostCheckBox("LCDBacklightOn");
3468 
3469  gc->setLabel(LcdSettings::tr("Backlight always on"));
3470 
3471  gc->setHelpText(LcdSettings::tr("Turn on the backlight permanently on the "
3472  "LCD display."));
3473  gc->setValue(true);
3474 
3475  return gc;
3476 }
3477 
3479 {
3480  HostCheckBox *gc = new HostCheckBox("LCDHeartBeatOn");
3481 
3482  gc->setLabel(LcdSettings::tr("Heartbeat always on"));
3483 
3484  gc->setHelpText(LcdSettings::tr("Turn on the LCD heartbeat."));
3485 
3486  gc->setValue(false);
3487 
3488  return gc;
3489 }
3490 
3492 {
3493  HostCheckBox *gc = new HostCheckBox("LCDBigClock");
3494 
3495  gc->setLabel(LcdSettings::tr("Display large clock"));
3496 
3497  gc->setHelpText(LcdSettings::tr("On multiline displays try and display the "
3498  "time as large as possible."));
3499 
3500  gc->setValue(false);
3501 
3502  return gc;
3503 }
3504 
3506 {
3507  HostLineEdit *ge = new HostLineEdit("LCDKeyString");
3508 
3509  ge->setLabel(LcdSettings::tr("LCD key order"));
3510 
3511  ge->setValue("ABCDEF");
3512 
3513  ge->setHelpText(
3514  LcdSettings::tr("Enter the 6 Keypad Return Codes for your LCD keypad "
3515  "in the order in which you want the functions "
3516  "up/down/left/right/yes/no to operate. (See "
3517  "lcdproc/server/drivers/hd44780.c/keyMapMatrix[] "
3518  "or the matrix for your display)"));
3519  return ge;
3520 }
3521 
3523 {
3524  HostCheckBox *gc = new HostCheckBox("LCDEnable");
3525 
3526  gc->setLabel(LcdSettings::tr("Enable LCD device"));
3527 
3528  gc->setHelpText(LcdSettings::tr("Use an LCD display to view MythTV status "
3529  "information."));
3530 
3531  gc->setValue(false);
3532 
3533  return gc;
3534 }
3535 
3537  false, false,
3538  false, false,
3539  false, false)
3540 {
3541  setLabel(tr("LCD device display"));
3542  setUseLabel(false);
3543 
3544  Setting* lcd_enable = LCDEnable();
3545  addChild(lcd_enable);
3546  setTrigger(lcd_enable);
3547 
3548  ConfigurationGroup *settings =
3549  new VerticalConfigurationGroup(false, true, false, false);
3550  ConfigurationGroup *setHoriz =
3551  new HorizontalConfigurationGroup(false, false, false, false);
3552 
3553  ConfigurationGroup* setLeft =
3554  new VerticalConfigurationGroup(false, false, false, false);
3555  ConfigurationGroup* setRight =
3556  new VerticalConfigurationGroup(false, false, false, false);
3557 
3558  setLeft->addChild(LCDShowTime());
3559  setLeft->addChild(LCDShowMenu());
3560  setLeft->addChild(LCDShowMusic());
3561  setLeft->addChild(LCDShowMusicItems());
3562  setLeft->addChild(LCDShowChannel());
3563  setLeft->addChild(LCDShowRecStatus());
3564  setRight->addChild(LCDShowVolume());
3565  setRight->addChild(LCDShowGeneric());
3566  setRight->addChild(LCDBacklightOn());
3567  setRight->addChild(LCDHeartBeatOn());
3568  setRight->addChild(LCDBigClock());
3569  setRight->addChild(LCDKeyString());
3570  setHoriz->addChild(setLeft);
3571  setHoriz->addChild(setRight);
3572  settings->addChild(setHoriz);
3573  settings->addChild(LCDPopupTime());
3574 
3575  addTarget("1", settings);
3576 
3577  addTarget("0", new VerticalConfigurationGroup(true));
3578 };
3579 
3580 
3581 #if CONFIG_DARWIN
3583 {
3584  HostCheckBox *gc = new HostCheckBox("MacGammaCorrect");
3585 
3586  gc->setLabel(PlaybackSettings::tr("Enable gamma correction for video"));
3587 
3588  gc->setValue(false);
3589 
3590  gc->setHelpText(PlaybackSettings::tr("If enabled, QuickTime will correct "
3591  "the gamma of the video to match "
3592  "your monitor. Turning this off can "
3593  "save some CPU cycles."));
3594  return gc;
3595 }
3596 
3598 {
3599  HostCheckBox *gc = new HostCheckBox("MacScaleUp");
3600 
3601  gc->setLabel(PlaybackSettings::tr("Scale video as necessary"));
3602 
3603  gc->setValue(true);
3604 
3605  gc->setHelpText(PlaybackSettings::tr("If enabled, video will be scaled to "
3606  "fit your window or screen. If "
3607  "unchecked, video will never be made "
3608  "larger than its actual pixel size."));
3609  return gc;
3610 }
3611 
3613 {
3614  HostSpinBox *gs = new HostSpinBox("MacFullSkip", 0, 30, 1, true);
3615 
3616  gs->setLabel(PlaybackSettings::tr("Frames to skip in fullscreen mode"));
3617 
3618  gs->setValue(0);
3619 
3620  gs->setHelpText(PlaybackSettings::tr("Video displayed in fullscreen or "
3621  "non-windowed mode will skip this "
3622  "many frames for each frame drawn. "
3623  "Set to 0 to show every frame. Only "
3624  "valid when either \"Use GUI size for "
3625  "TV playback\" or \"Run the frontend "
3626  "in a window\" is not checked."));
3627  return gs;
3628 }
3629 
3631 {
3632  HostCheckBox *gc = new HostCheckBox("MacMainEnabled");
3633 
3634  gc->setLabel(MacMainSettings::tr("Video in main window"));
3635 
3636  gc->setValue(true);
3637 
3638  gc->setHelpText(MacMainSettings::tr("If enabled, video will be displayed "
3639  "in the main GUI window. Disable this "
3640  "when you only want video on the "
3641  "desktop or in a floating window. Only "
3642  "valid when \"Use GUI size for TV "
3643  "playback\" and \"Run the frontend in "
3644  "a window\" are checked."));
3645  return gc;
3646 }
3647 
3649 {
3650  HostSpinBox *gs = new HostSpinBox("MacMainSkip", 0, 30, 1, true);
3651 
3652  gs->setLabel(MacMainSettings::tr("Frames to skip"));
3653 
3654  gs->setValue(0);
3655 
3656  gs->setHelpText(MacMainSettings::tr("Video in the main window will skip "
3657  "this many frames for each frame "
3658  "drawn. Set to 0 to show every "
3659  "frame."));
3660  return gs;
3661 }
3662 
3664 {
3665  HostSpinBox *gs = new HostSpinBox("MacMainOpacity", 0, 100, 5, false);
3666 
3667  gs->setLabel(MacMainSettings::tr("Opacity"));
3668 
3669  gs->setValue(100);
3670 
3671  gs->setHelpText(MacMainSettings::tr("The opacity of the main window. Set "
3672  "to 100 for completely opaque, set "
3673  "to 0 for completely transparent."));
3674  return gs;
3675 }
3676 
3678 {
3679  setLabel(tr("Video in main window"));
3680  setUseLabel(false);
3681  Setting *gc = MacMainEnabled();
3682  addChild(gc);
3683  setTrigger(gc);
3684 
3686  new VerticalConfigurationGroup(false, false);
3687  opts->addChild(MacMainSkip());
3688  opts->addChild(MacMainOpacity());
3689 
3690  addTarget("1", opts);
3691  addTarget("0", new VerticalConfigurationGroup(false, false));
3692 
3693 };
3694 
3696 {
3697  HostCheckBox *gc = new HostCheckBox("MacFloatEnabled");
3698 
3699  gc->setLabel(MacFloatSettings::tr("Video in floating window"));
3700 
3701  gc->setValue(false);
3702 
3703  gc->setHelpText(MacFloatSettings::tr("If enabled, video will be displayed "
3704  "in a floating window. Only valid "
3705  "when \"Use GUI size for TV "
3706  "playback\" and \"Run the frontend "
3707  "in a window\" are checked."));
3708  return gc;
3709 }
3710 
3712 {
3713  HostSpinBox *gs = new HostSpinBox("MacFloatSkip", 0, 30, 1, true);
3714 
3715  gs->setLabel(MacFloatSettings::tr("Frames to skip"));
3716 
3717  gs->setValue(0);
3718 
3719  gs->setHelpText(MacFloatSettings::tr("Video in the floating window will "
3720  "skip this many frames for each "
3721  "frame drawn. Set to 0 to show "
3722  "every frame."));
3723  return gs;
3724 }
3725 
3727 {
3728  HostSpinBox *gs = new HostSpinBox("MacFloatOpacity", 0, 100, 5, false);
3729 
3730  gs->setLabel(MacFloatSettings::tr("Opacity"));
3731 
3732  gs->setValue(100);
3733 
3734  gs->setHelpText(MacFloatSettings::tr("The opacity of the floating window. "
3735  "Set to 100 for completely opaque, "
3736  "set to 0 for completely "
3737  "transparent."));
3738  return gs;
3739 }
3740 
3742 {
3743  setLabel(tr("Video in floating window"));
3744 
3745  setUseLabel(false);
3746  Setting *gc = MacFloatEnabled();
3747  addChild(gc);
3748  setTrigger(gc);
3749 
3751  new VerticalConfigurationGroup(false, false);
3752  opts->addChild(MacFloatSkip());
3753  opts->addChild(MacFloatOpacity());
3754 
3755  addTarget("1", opts);
3756  addTarget("0", new VerticalConfigurationGroup(false, false));
3757 
3758 };
3759 
3761 {
3762  HostCheckBox *gc = new HostCheckBox("MacDockEnabled");
3763 
3764  gc->setLabel(MacDockSettings::tr("Video in the dock"));
3765 
3766  gc->setValue(true);
3767 
3768  gc->setHelpText(MacDockSettings::tr("If enabled, video will be displayed "
3769  "in the application's dock icon. Only "
3770  "valid when \"Use GUI size for TV "
3771  "playback\" and \"Run the frontend in "
3772  "a window\" are checked."));
3773  return gc;
3774 }
3775 
3777 {
3778  HostSpinBox *gs = new HostSpinBox("MacDockSkip", 0, 30, 1, true);
3779 
3780  gs->setLabel(MacDockSettings::tr("Frames to skip"));
3781 
3782  gs->setValue(3);
3783 
3784  gs->setHelpText(MacDockSettings::tr("Video in the dock icon will skip this "
3785  "many frames for each frame drawn. Set "
3786  "to 0 to show every frame."));
3787  return gs;
3788 }
3789 
3791 {
3792  setLabel(tr("Video in the dock"));
3793  setUseLabel(false);
3794  Setting *gc = MacDockEnabled();
3795  addChild(gc);
3796  setTrigger(gc);
3797 
3798  Setting *skip = MacDockSkip();
3799  addTarget("1", skip);
3800  addTarget("0", new HorizontalConfigurationGroup(false, false));
3801 
3802 };
3803 
3805 {
3806  HostCheckBox *gc = new HostCheckBox("MacDesktopEnabled");
3807 
3808  gc->setLabel(MacDesktopSettings::tr("Video on the desktop"));
3809 
3810  gc->setValue(false);
3811 
3812  gc->setHelpText(MacDesktopSettings::tr("If enabled, video will be "
3813  "displayed on the desktop, "
3814  "behind the Finder icons. "
3815  "Only valid when \"Use GUI "
3816  "size for TV playback\" and "
3817  "\"Run the frontend in a "
3818  "window\" are checked."));
3819  return gc;
3820 }
3821 
3823 {
3824  HostSpinBox *gs = new HostSpinBox("MacDesktopSkip", 0, 30, 1, true);
3825 
3826  gs->setLabel(MacDesktopSettings::tr("Frames to skip"));
3827 
3828  gs->setValue(0);
3829 
3830  gs->setHelpText(MacDesktopSettings::tr("Video on the desktop will skip "
3831  "this many frames for each frame "
3832  "drawn. Set to 0 to show every "
3833  "frame."));
3834  return gs;
3835 }
3836 
3838 {
3839  setLabel(tr("Video on the desktop"));
3840  setUseLabel(false);
3841  Setting *gc = MacDesktopEnabled();
3842  addChild(gc);
3843  setTrigger(gc);
3844  Setting *skip = MacDesktopSkip();
3845  addTarget("1", skip);
3846  addTarget("0", new HorizontalConfigurationGroup(false, false));
3847 
3848 };
3849 #endif
3850 
3851 MainGeneralSettings::MainGeneralSettings()
3852 {
3854 
3856  new VerticalConfigurationGroup(false, true, false, false);
3857  pin->setLabel(tr("Settings Access"));
3858  pin->addChild(SetupPinCode());
3859  addChild(pin);
3860 
3861  VerticalConfigurationGroup *general =
3862  new VerticalConfigurationGroup(false, true, false, false);
3863  general->setLabel(tr("General"));
3864  general->addChild(UseVirtualKeyboard());
3865  general->addChild(ScreenShotPath());
3866  addChild(general);
3867 
3869  new VerticalConfigurationGroup(false, true, false, false);
3870  media->setLabel(tr("Media Monitor"));
3871  media->addChild(IgnoreMedia());
3872  addChild(media);
3873 
3874  VerticalConfigurationGroup *remotecontrol =
3875  new VerticalConfigurationGroup(false, true, false, false);
3876  remotecontrol->setLabel(tr("Remote Control"));
3877  remotecontrol->addChild(LircDaemonDevice());
3878  remotecontrol->addChild(NetworkControlEnabled());
3879  remotecontrol->addChild(NetworkControlPort());
3880  remotecontrol->addChild(UDPNotifyPort());
3881  addChild(remotecontrol);
3882 
3883 #ifdef USING_AIRPLAY
3884  VerticalConfigurationGroup *airplay =
3885  new VerticalConfigurationGroup(false, true, false, false);
3886  airplay->setLabel(tr("AirPlay Settings"));
3887  airplay->addChild(AirPlayEnabled());
3888  airplay->addChild(AirPlayFullScreen());
3889  airplay->addChild(AirPlayAudioOnly());
3890  airplay->addChild(AirPlayPasswordSettings());
3891  airplay->addChild(AirPlayInfo());
3892  airplay->addChild(AirPlayRSAInfo());
3893  addChild(airplay);
3894 #endif
3895 
3896  VerticalConfigurationGroup *shutdownSettings =
3897  new VerticalConfigurationGroup(true, true, false, false);
3898  shutdownSettings->setLabel(tr("Shutdown/Reboot Settings"));
3899  shutdownSettings->addChild(FrontendIdleTimeout());
3900  shutdownSettings->addChild(OverrideExitMenu());
3901  shutdownSettings->addChild(HaltCommand());
3902  shutdownSettings->addChild(RebootCommand());
3903  addChild(shutdownSettings);
3904 }
3905 
3906 PlaybackSettings::PlaybackSettings()
3907 {
3908  uint i = 0, total = 8;
3909 #if CONFIG_DARWIN
3910  total += 2;
3911 #endif // USING_DARWIN
3912 
3913 
3914  VerticalConfigurationGroup* general1 =
3915  new VerticalConfigurationGroup(false);
3916 
3917  //: %2 is the position, %2 is the total
3918  general1->setLabel(tr("General Playback (%1/%2)")
3919  .arg(++i).arg(total));
3920 
3921  HorizontalConfigurationGroup *columns =
3922  new HorizontalConfigurationGroup(false, false, true, true);
3923 
3924  VerticalConfigurationGroup *column1 =
3925  new VerticalConfigurationGroup(false, false, true, true);
3926  column1->addChild(RealtimePriority());
3927  column1->addChild(DecodeExtraAudio());
3928  column1->addChild(JumpToProgramOSD());
3929 #if CONFIG_DEBUGTYPE
3930  column1->addChild(FFmpegDemuxer());
3931 #endif
3932  columns->addChild(column1);
3933 
3934  VerticalConfigurationGroup *column2 =
3935  new VerticalConfigurationGroup(false, false, true, true);
3936  column2->addChild(ClearSavedPosition());
3937  column2->addChild(AltClearSavedPosition());
3938  column2->addChild(AutomaticSetWatched());
3939  column2->addChild(ContinueEmbeddedTVPlay());
3940  columns->addChild(column2);
3941 
3942  general1->addChild(columns);
3943  general1->addChild(LiveTVIdleTimeout());
3944  addChild(general1);
3945 
3946  VerticalConfigurationGroup* general2 =
3947  new VerticalConfigurationGroup(false);
3948 
3949  //" %1 is the position, %2 is the total
3950  general2->setLabel(tr("General Playback (%1/%2)")
3951  .arg(++i).arg(total));
3952 
3954  new HorizontalConfigurationGroup(false, false, true, true);
3956  new VerticalConfigurationGroup(false, false, true, true);
3958  new VerticalConfigurationGroup(false, false, true, true);
3959  ocol1->addChild(VertScanPercentage());
3960  ocol1->addChild(YScanDisplacement());
3961  ocol2->addChild(HorizScanPercentage());
3962  ocol2->addChild(XScanDisplacement());
3963  oscan->addChild(ocol1);
3964  oscan->addChild(ocol2);
3965 
3966  HorizontalConfigurationGroup* aspect_fill =
3967  new HorizontalConfigurationGroup(false, false, true, true);
3968  aspect_fill->addChild(AspectOverride());
3969  aspect_fill->addChild(AdjustFill());
3970 
3971  general2->addChild(oscan);
3972  general2->addChild(aspect_fill);
3973  general2->addChild(LetterboxingColour());
3974  general2->addChild(PIPLocationComboBox());
3975  general2->addChild(PlaybackExitPrompt());
3976  general2->addChild(EndOfRecordingExitPrompt());
3977  addChild(general2);
3978 
3979  QString tmp = QString(" (%1/%2)").arg(++i).arg(total);
3980  addChild(new PlaybackProfileConfigs(tmp));
3981 
3983 
3984  //: %1 is the position, %2 is the total
3985  pbox->setLabel(tr("View Recordings (%1/%2)").arg(++i).arg(total));
3986 
3987  pbox->addChild(PlayBoxOrdering());
3988  pbox->addChild(PlayBoxEpisodeSort());
3989  // Disabled until we re-enable live previews
3990  // pbox->addChild(PlaybackPreview());
3991  // pbox->addChild(HWAccelPlaybackPreview());
3992  pbox->addChild(PBBStartInTitle());
3993  addChild(pbox);
3994 
3996 
3997  //: %1 is the position, %2 is the total
3998  pbox2->setLabel(tr("Recording Groups (%1/%2)").arg(++i).arg(total));
3999 
4000  pbox2->addChild(DisplayRecGroup());
4001  pbox2->addChild(QueryInitialFilter());
4002  pbox2->addChild(RememberRecGroup());
4003 
4004  addChild(pbox2);
4005 
4007 
4008  //: %1 is the position, %2 is the total
4009  pbox3->setLabel(tr("View Recordings (%1/%2)").arg(++i).arg(total));
4010 
4011  pbox3->addChild(DisplayGroupTitleSort());
4012  pbox3->addChild(new WatchListSettings());
4013 
4014  addChild(pbox3);
4015 
4017 
4018  //: %1 is the position, %2 is the total
4019  seek->setLabel(tr("Seeking (%1/%2)").arg(++i).arg(total));
4020 
4021  seek->addChild(SmartForward());
4022  seek->addChild(FFRewReposTime());
4023  seek->addChild(FFRewReverse());
4024 
4025  addChild(seek);
4026 
4028 
4029  //: %1 is the position, %2 is the total
4030  comms->setLabel(tr("Commercial Skip (%1/%2)").arg(++i).arg(total));
4031 
4032  comms->addChild(AutoCommercialSkip());
4033  comms->addChild(CommRewindAmount());
4034  comms->addChild(CommNotifyAmount());
4035  comms->addChild(MaximumCommercialSkip());
4036  comms->addChild(MergeShortCommBreaks());
4037 
4038  addChild(comms);
4039 
4040 #if CONFIG_DARWIN
4042 
4043  //: %1 is the position, %2 is the total
4044  mac1->setLabel(tr("Mac OS X Video Setting (%1/%2)").arg(++i).arg(total));
4045 
4046  mac1->addChild(MacGammaCorrect());
4047  mac1->addChild(MacScaleUp());
4048  mac1->addChild(MacFullSkip());
4049 
4050  addChild(mac1);
4051 
4053 
4054  //: %1 is the position, %2 is the total
4055  mac2->setLabel(tr("Mac OS X Video Settings (%1/%2)").arg(++i).arg(total));
4056 
4057  mac2->addChild(new MacMainSettings());
4058  mac2->addChild(new MacFloatSettings());
4059 
4061  new HorizontalConfigurationGroup(false, false, true, true);
4062  row->addChild(new MacDockSettings());
4063  row->addChild(new MacDesktopSettings());
4064  mac2->addChild(row);
4065 
4066  addChild(mac2);
4067 #endif
4068 }
4069 
4070 OSDSettings::OSDSettings()
4071 {
4073 
4074  osd->setLabel(tr("On-screen Display"));
4075 
4076  osd->addChild(EnableMHEG());
4077  osd->addChild(EnableMHEGic());
4079  osd->addChild(BrowseAllTuners());
4080  osd->addChild(DefaultCCMode());
4081  osd->addChild(SubtitleCodec());
4082 
4083  addChild(osd);
4084 
4085  //VerticalConfigurationGroup *cc = new VerticalConfigurationGroup(false);
4086  //cc->setLabel(tr("Closed Captions"));
4087  //cc->addChild(DecodeVBIFormat());
4088  //addChild(cc);
4089 
4090 #if defined(Q_OS_MACX)
4091  // Any Mac OS-specific OSD stuff would go here.
4092 #endif
4093 }
4094 
4096 {
4098 
4099  general->setLabel(tr("General (Basic)"));
4100  general->addChild(ChannelOrdering());
4101  general->addChild(ChannelFormat());
4102  general->addChild(LongChannelFormat());
4103 
4104  addChild(general);
4105 
4107 
4108  autoexp->setLabel(tr("General (Auto-Expire)"));
4109 
4110  autoexp->addChild(AutoExpireMethod());
4111 
4112  VerticalConfigurationGroup *expgrp0 =
4113  new VerticalConfigurationGroup(false, false, true, true);
4114 
4115  expgrp0->addChild(RerecordWatched());
4116  expgrp0->addChild(AutoExpireWatchedPriority());
4117 
4118  VerticalConfigurationGroup *expgrp1 =
4119  new VerticalConfigurationGroup(false, false, true, true);
4120 
4121  expgrp1->addChild(AutoExpireLiveTVMaxAge());
4122  expgrp1->addChild(AutoExpireDayPriority());
4123  expgrp1->addChild(AutoExpireExtraSpace());
4124 
4126  new HorizontalConfigurationGroup(false, false, true, true);
4127 
4128  expgrp->addChild(expgrp0);
4129  expgrp->addChild(expgrp1);
4130 
4131  autoexp->addChild(expgrp);
4132 // autoexp->addChild(new DeletedExpireOptions());
4133  autoexp->addChild(DeletedMaxAge());
4134 
4135  addChild(autoexp);
4136 
4138 
4139  jobs->setLabel(tr("General (Jobs)"));
4140 
4141  jobs->addChild(CommercialSkipMethod());
4142  jobs->addChild(CommFlagFast());
4143  jobs->addChild(AggressiveCommDetect());
4145 
4146  addChild(jobs);
4147 
4149 
4150  general2->setLabel(tr("General (Advanced)"));
4151 
4152  general2->addChild(RecordPreRoll());
4153  general2->addChild(RecordOverTime());
4154  general2->addChild(CategoryOverTimeSettings());
4155  addChild(general2);
4156 
4158 
4159  changrp->setLabel(tr("General (Channel Groups)"));
4160 
4161  ChannelGroupSettings *changroupsettings = new ChannelGroupSettings();
4162  changrp->addChild(changroupsettings);
4163  changrp->addChild(BrowseChannelGroup());
4164 
4165  addChild(changrp);
4166 }
4167 
4168 EPGSettings::EPGSettings()
4169 {
4171 
4172  epg->setLabel(tr("Program Guide %1/%2").arg("1").arg("1"));
4173 
4174  epg->addChild(DefaultTVChannel());
4175  epg->addChild(EPGRecThreshold());
4176 
4177  addChild(epg);
4178 }
4179 
4180 GeneralRecPrioritiesSettings::GeneralRecPrioritiesSettings()
4181 {
4183 
4184  sched->setLabel(tr("Scheduler Options"));
4185 
4186  sched->addChild(GRSchedOpenEnd());
4187  sched->addChild(GRPrefInputRecPriority());
4188  sched->addChild(GRHDTVRecPriority());
4189  sched->addChild(GRWSRecPriority());
4190 
4191  addChild(sched);
4192 
4194 
4195  access->setLabel(tr("Accessibility Options"));
4196 
4197  access->addChild(GRSignLangRecPriority());
4198  access->addChild(GROnScrSubRecPriority());
4199  access->addChild(GRCCRecPriority());
4200  access->addChild(GRHardHearRecPriority());
4201  access->addChild(GRAudioDescRecPriority());
4202 
4203  addChild(access);
4204 }
4205 
4206 AppearanceSettings::AppearanceSettings()
4207 {
4209  screen->setLabel(tr("Theme / Screen Settings"));
4210 
4211 #if ! CONFIG_DARWIN
4212  screen->addChild(ThemePainter());
4213 #endif
4214  screen->addChild(MenuTheme());
4215 
4217  {
4218  screen->addChild(XineramaScreen());
4220  }
4221 
4222 // screen->addChild(DisplaySizeHeight());
4223 // screen->addChild(DisplaySizeWidth());
4224 
4225  VerticalConfigurationGroup *column1 =
4226  new VerticalConfigurationGroup(false, false, false, false);
4227 
4228  column1->addChild(GuiWidth());
4229  column1->addChild(GuiHeight());
4230  column1->addChild(GuiOffsetX());
4231  column1->addChild(GuiOffsetY());
4232 
4233  VerticalConfigurationGroup *column2 =
4234  new VerticalConfigurationGroup(false, false, false, false);
4235 
4236  column2->addChild(GuiSizeForTV());
4237  column2->addChild(HideMouseCursor());
4238  column2->addChild(RunInWindow());
4239  column2->addChild(UseFixedWindowSize());
4240  column2->addChild(AlwaysOnTop());
4241 #ifdef USING_AIRPLAY
4242  column2->addChild(AirPlayFullScreen());
4243 #endif
4244 
4245  HorizontalConfigurationGroup *columns =
4246  new HorizontalConfigurationGroup(false, false, false, false);
4247 
4248  columns->addChild(column1);
4249  columns->addChild(column2);
4250 
4251  screen->addChild(columns);
4252 
4253  addChild(screen);
4254 
4255 #if defined(USING_XRANDR) || CONFIG_DARWIN
4256  const vector<DisplayResScreen> scr = GetVideoModes();
4257  if (!scr.empty())
4258  addChild(new VideoModeSettings());
4259 #endif
4261 
4262  dates->setLabel(tr("Localization"));
4263 
4264  dates->addChild(MythLanguage());
4265  dates->addChild(ISO639PreferredLanguage(0));
4266  dates->addChild(ISO639PreferredLanguage(1));
4267  dates->addChild(MythDateFormatCB());
4268  dates->addChild(MythShortDateFormat());
4269  dates->addChild(MythTimeFormat());
4270 
4271  addChild(dates);
4272 
4273  addChild(new LcdSettings());
4274 }
4275 
4276 // vim:set sw=4 ts=4 expandtab:
static HostSpinBox * VidModeWidth(int idx)
virtual void setValue(const QString &newValue)
Definition: settings.cpp:96
bool next(void)
Wrap QSqlQuery::next() so we can display the query results.
Definition: mythdbcon.cpp:794
static QStringList GetDecoders(void)
static GlobalSpinBox * GRSignLangRecPriority()
static VerticalConfigurationGroup * CategoryOverTimeSettings()
virtual void clearSelections(void)
Definition: settings.cpp:175
static HostCheckBox * LCDHeartBeatOn()
virtual void setHelpText(const QString &str)
Definition: settings.cpp:561
ISO 639-1 and ISO 639-2 support functions.
void vrenderChanged(const QString &renderer)
virtual void setValue(bool check)
Definition: settings.h:434
static HostRefreshRateComboBox * TVVidModeRefreshRate(int idx=-1)
static QString GetDeinterlacerName(const QString &short_name)
static HostComboBox * OverrideExitMenu()
virtual void Load(void)
void orenderChanged(const QString &renderer)
static QStringList GetOSDs(const QString &video_renderer)
void valueChanged(const QString &)
static HostComboBox * TVVidModeForceAspect(int idx=-1)
VERBOSE_PREAMBLE false
Definition: verbosedefs.h:83
static uint GetProfileGroupID(const QString &profilename, const QString &hostname)
static HostCheckBox * ChannelGroupRememberLast()
virtual void setLabel(QString str)
Definition: settings.cpp:930
static GlobalSpinBox * DeletedMaxAge()
static HostSpinBox * GuiWidth()
static HostCheckBox * LCDShowGeneric()
static HostComboBox * XineramaMonitorAspectRatio()
static void CreateProfiles(const QString &hostname)
bool replaceChild(Configurable *old_child, Configurable *new_child)
static HostCheckBox * PlaybackWLStart()
void priorityChanged(const QString &name, int)
static QString RSALastError(void)
static HostSpinBox * MacMainSkip()
virtual void setEnabled(bool b)
Definition: settings.cpp:688
TransComboBoxSetting * osdrend
void deint1Changed(const QString &deint)
static QStringList GetDecoderNames(void)
virtual QString getSelectionLabel(void) const
Definition: settings.cpp:213
static HostCheckBox * ContinueEmbeddedTVPlay()
static HostCheckBox * LCDShowVolume()
static HostComboBox * LCDShowMusicItems()
static HostSpinBox * CommNotifyAmount()
static HostCheckBox * LCDBigClock()
static void SetDefaultProfileName(const QString &profilename, const QString &hostname)
static GlobalSpinBox * GRPrefInputRecPriority()
static HostSpinBox * VertScanPercentage()
virtual void setHelpText(const QString &str)
Definition: settings.cpp:369
static HostSpinBox * NetworkControlPort()
void decoderChanged(const QString &dec)
static HostComboBox * TVVidModeResolution(int idx=-1)
QSqlQuery wrapper that fetches a DB connection from the connection pool.
Definition: mythdbcon.h:125
static HostCheckBox * JumpToProgramOSD()
static GlobalSpinBox * AutoExpireLiveTVMaxAge()
static HostComboBox * ChannelFormat()
void setName(const QString &str)
Definition: settings.h:47
static HostComboBox * GuiVidModeResolution()
static QString GetDecoderName(const QString &decoder)
static HostCheckBox * MacMainEnabled()
static TransLabelSetting * AirPlayInfo()
QString label
Definition: settings.h:89
static item_list_t LoadDB(uint groupid)
const QLocale GetQLocale(void)
static GlobalSpinBox * RecordPreRoll()
virtual void addChild(Configurable *child)
static bool IsFilterAllowed(const QString &video_renderer)
static HostComboBox * PlayBoxOrdering()
static HostComboBox * SubtitleCodec()
static HostCheckBox * FFRewReverse()
static HostLineEdit * LCDKeyString()
vector< ChannelGroupItem > ChannelGroupList
Definition: channelgroup.h:32
static HostCheckBox * QueryInitialFilter()
static HostComboBox * AdjustFill()
static HostCheckBox * AirPlayFullScreen()
static HostLineEdit * DefaultTVChannel()
static HostCheckBox * PersistentBrowseMode()
static HostComboBox * PlaybackExitPrompt()
QString SkipTypeToString(int flags)
virtual void setValue(const QString &newValue)
Definition: settings.cpp:707
unsigned int uint
Definition: compat.h:136
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
static HostComboBox * MenuTheme()
static HostCheckBox * MacDockEnabled()
static HostLineEdit * ScreenShotPath()
static bool DeleteDB(uint groupid, const item_list_t &)
static HostCheckBox * PlaybackWatchList()
static QString GetOSDHelp(const QString &osd)
PlaybackProfileConfig(const QString &profilename)
static GlobalSpinBox * MaximumCommercialSkip()
static HostSpinBox * FrontendIdleTimeout()
static HostCheckBox * RememberRecGroup()
static void CreateVAAPIProfiles(const QString &hostname)
static GlobalCheckBox * AggressiveCommDetect()
static HostSpinBox * CommRewindAmount()
TransSpinBoxSetting * max_cpus
static HostCheckBox * MacFloatEnabled()
static HostComboBox * PlayBoxEpisodeSort()
static GlobalSpinBox * GRHardHearRecPriority()
bool boolValue(void) const
Definition: settings.h:431
static HostCheckBox * MacGammaCorrect()
static HostComboBox * DisplayRecGroup()
TransCheckBoxSetting * osdfade
static HostCheckBox * LCDShowTime()
static HostCheckBox * BrowseChannelGroup()
static HostSpinBox * MacMainOpacity()
static HostComboBox * ThemePainter()
const DisplayResVector GetVideoModes(void)
Definition: DisplayRes.cpp:262
static GlobalSpinBox * GRWSRecPriority()
static RSA * LoadKey(void)
LoadKey.
static HostSpinBox * MacDesktopSkip()
__u8 data[42]
Definition: videodev2.h:1039
virtual void addChild(Configurable *child)
static QStringList GetDeinterlacers(const QString &video_renderer)
virtual void setLabel(QString)
Definition: settings.cpp:1194
static HostCheckBox * AirPlayEnabled()
vector< TransLabelSetting * > labels
static HostCheckBox * LCDShowMusic()
QVariant value(int i) const
Definition: mythdbcon.h:182
void removeTarget(QString triggerValue)
static HostSpinBox * PlaybackWLMaxAge()
static GlobalSpinBox * AutoExpireDayPriority()
static HostCheckBox * LCDShowMenu()
static bool showGetTextPopup(MythMainWindow *parent, QString title, QString message, QString &text)
static HostCheckBox * AutomaticSetWatched()
AspectOverrideMode
Definition: videoouttypes.h:46
static HostSpinBox * LiveTVIdleTimeout()
static HostSpinBox * GuiOffsetX()
TransComboBoxSetting * decoder
static HorizontalConfigurationGroup * AirPlayPasswordSettings()
static HostLineEdit * UDPNotifyPort()
void setLabel(const QString &label)
TransComboBoxSetting * deint0
void GetResolutionSetting(const QString &type, int &width, int &height, double &forced_aspect, double &refreshrate, int index=-1)
static HostComboBox * MythTimeFormat()
const char * name
Definition: ParseText.cpp:338
GeneralSettings(MythScreenStack *parent, const char *name=0)
static HostCheckBox * LCDEnable()
static HostLineEdit * AirPlayPassword()
virtual void addSelection(const QString &label, QString value=QString::null, bool select=false)
Definition: settings.cpp:115
static GlobalSpinBox * MinRecordDiskThreshold()
static HostCheckBox * BrowseAllTuners()
static HostCheckBox * DecodeExtraAudio()
static HostComboBox * DisplayGroupTitleSort()
static GlobalSpinBox * GROnScrSubRecPriority()
QDateTime current(bool stripped)
Returns current Date and Time in UTC.
Definition: mythdate.cpp:10
static HostComboBox * PIPLocationComboBox()
QString GetSetting(const QString &key, const QString &defaultval="")
static HostSpinBox * MacFullSkip()
static HostCheckBox * NetworkControlEnabled()
QList< ThemeInfo > GetThemes(ThemeType type)
static HostCheckBox * UseFixedWindowSize()
static int GetNumberXineramaScreens(void)
static GlobalComboBox * GRSchedOpenEnd()
static HostCheckBox * GuiSizeForTV()
__u64 val
Definition: videodev2.h:1041
static HostCheckBox * HideMouseCursor()
static HostSpinBox * HorizScanPercentage()
static TransLabelSetting * AirPlayRSAInfo()
static HostComboBox * LetterboxingColour()
static HostLineEdit * IgnoreMedia()
PlaybackProfileConfigs(const QString &str)
static QString trunc(const QString &str, int len)
static QString pad(const QString &str, int len)
static GlobalCheckBox * AutoExpireInsteadOfDelete()
static HostComboBox * MythShortDateFormat()
static HostCheckBox * DefaultCCMode()
static void CreateVDPAUProfiles(const QString &hostname)
static QMap< QString, QString > getLanguages(void)
static QString GetDefaultProfileName(const QString &hostname)
static QString GetPreferredVideoRenderer(const QString &decoder)
static void CreateNewProfiles(const QString &hostname)
TransSpinBoxSetting * height[2]
static GlobalSpinBox * CategoryOverTime()
static MSqlQueryInfo InitCon(ConnectionReuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
Definition: mythdbcon.cpp:551
static GlobalComboBox * CommercialSkipMethod()
static uint CreateProfileGroup(const QString &groupname, const QString &hostname)
static HostCheckBox * UseVirtualKeyboard()
static GlobalComboBox * MythLanguage()
static HostCheckBox * RealtimePriority()
static QString i18n(const QString &)
Translations for play,recording, & storage groups +.
static void CreateOpenMAXProfiles(const QString &hostname, int upgrade=0)
void deint0Changed(const QString &deint)
static void ISO639_fill_selections(SelectSetting *widget, uint i)
virtual void setHelpText(const QString &str)
Definition: settings.cpp:947
static void CreateOpenGLProfiles(const QString &hostname)
MythUIHelper * GetMythUI()
void addSelection(const QString &label, QString value=QString::null, bool select=false)
Definition: settings.cpp:733
static HostCheckBox * AlwaysOnTop()
static GlobalSpinBox * AutoExpireExtraSpace()
static GlobalSpinBox * GRCCRecPriority()
static GlobalSpinBox * GRAudioDescRecPriority()
static HostSpinBox * DisplaySizeHeight()
static HostSpinBox * XScanDisplacement()
MythMainWindow * GetMythMainWindow(void)
static HostComboBox * AutoCommercialSkip()
virtual void setEnabled(bool b)
Definition: settings.cpp:342
static bool showOkPopup(MythMainWindow *parent, const QString &title, const QString &message, QString button_msg=QString())
deque< int > GetPreferredSkipTypeCombinations(void)
static HostComboBox * XineramaScreen()
PIPLocation
Definition: videoouttypes.h:19
static HostSpinBox * PlaybackWLBlackOut()
static HostCheckBox * ClearSavedPosition()
AdjustFillMode
Definition: videoouttypes.h:57
VERBOSE_PREAMBLE Most Errors or other very important messages true
Definition: verbosedefs.h:91
string defaultsettings
Definition: mythburn.py:137
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.
Definition: mythdbcon.cpp:819
static GlobalSpinBox * DeferAutoTranscodeDays()
PlaybackProfileItemConfig(ProfileItem &_item)
static HostCheckBox * LCDBacklightOn()
virtual void triggerChanged(const QString &value)
VerticalConfigurationGroup(bool luselabel=true, bool luseframe=true, bool lzeroMargin=false, bool lzeroSpace=false)
static HostSpinBox * EPGRecThreshold()
static HostCheckBox * SmartForward()
QString iso639_str2_to_str3(const QString &str2)
Definition: iso639.cpp:70
static HostCheckBox * LCDShowChannel()
static MTV_PUBLIC VDALibrary * GetVDALibrary(void)
static HostComboBox * AspectOverride()
static HostLineEdit * HaltCommand()
TransLineEditSetting * filters
static HostSpinBox * VidModeHeight(int idx)
static const char * toString(OMX_AUDIO_DDPBITSTREAMID id)
static int FindBestMatch(const DisplayResVector &dsr, const DisplayResScreen &d, double &target_rate)
static QString GetDeinterlacerHelp(const QString &deint)
static GlobalCheckBox * RerecordWatched()
TransComboBoxSetting * vidrend
vector< TransButtonSetting * > delProf
static HostCheckBox * EnableMHEGic()
static QString GetVideoRendererHelp(const QString &renderer)
static HostSpinBox * GuiOffsetY()
static HostCheckBox * MacScaleUp()
static HostLineEdit * SetupPinCode()
static HostLineEdit * LircDaemonDevice()
virtual void setHelpText(const QString &str)
Definition: settings.cpp:793
static HostComboBox MUNUSED * DecodeVBIFormat()
vector< TransButtonSetting * > editProf
QString Get(const QString &value) const
static HostSpinBox * MacFloatSkip()
bool enabled
Definition: settings.h:86
virtual void setLabel(QString str)
Definition: settings.h:57
virtual DialogCode exec(bool saveOnExec=true, bool doLoad=true)
static HostSpinBox * DisplaySizeWidth()
static HostSpinBox * YScanDisplacement()
void swap(int indexA, int intexB)
static GlobalSpinBox * RecordOverTime()
void Set(const QString &value, const QString &data)
static HostComboBox * LongChannelFormat()
static HostComboBox * MythDateFormatCB()
LetterBoxColour
Definition: videoouttypes.h:72
static HostCheckBox * EnableMHEG()
static bool DeleteProfileGroup(const QString &groupname, const QString &hostname)
virtual QString getValue(void) const
Definition: settings.cpp:91
VerticalConfigurationGroup * last_main
static HostSpinBox * MacDockSkip()
static HostCheckBox * AirPlayAudioOnly()
void setUseLabel(bool useit)
void setLabelAboveWidget(bool l=true)
Definition: settings.h:59
static HostComboBox * ChannelOrdering()
static HostLineEdit * RebootCommand()
Scheduler * sched
static QString GetDecoderHelp(QString decoder=QString::null)
static GlobalComboBox * AutoExpireMethod()
static bool SaveDB(uint groupid, item_list_t &)
static QString iso639_key_to_str3(int code)
Definition: iso639.h:46
TransComboBoxSetting * deint1
TransSpinBoxSetting * width[2]
static HostSpinBox * LCDPopupTime()
void setTrigger(Configurable *_trigger)
static HostCheckBox * FFmpegDemuxer()
static QStringList GetProfiles(const QString &hostname)
static HostCheckBox * RunInWindow()
bool exec(void)
Wrap QSqlQuery::exec() so we can display SQL.
Definition: mythdbcon.cpp:619
string videomode
Definition: mythburn.py:138
virtual void setSaveAll(bool b)
static GlobalSpinBox * GRHDTVRecPriority()
static HostCheckBox * AirPlayPasswordEnabled()
static void CreateVDAProfiles(const QString &hostname)
static GlobalCheckBox * CommFlagFast()
static QStringList GetVideoRenderers(const QString &decoder)
static HostCheckBox * PlaybackWLAutoExpire()
static GlobalSpinBox * MergeShortCommBreaks()
static GlobalComboBox * OverTimeCategory()
TransComboBoxSetting * cmp[2]
QString GetLanguage(void)
Returns two character ISO-639 language descriptor for UI language.
HostComboBox * grouptrigger
static HostCheckBox * LCDShowRecStatus()
QString GetHostName(void)
__s32 value
Definition: videodev2.h:1042
TransCheckBoxSetting * skiploop
static HostSpinBox * MacFloatOpacity()
static GlobalComboBox * ISO639PreferredLanguage(uint i)
static Q_DECLARE_TR_FUNCTIONS(DatabaseSettings) public void addDatabaseSettings(ConfigurationWizard *wizard)
Definition: dbsettings.cpp:325
static HostCheckBox * MacDesktopEnabled()
static HostComboBox * ChannelGroupDefault()
static HostCheckBox * EndOfRecordingExitPrompt()
static HostCheckBox * PBBStartInTitle()
vector< TransSpinBoxSetting * > priority
void triggerChanged(const QString &)
static HostSpinBox * GuiHeight()
static GlobalCheckBox * AutoExpireWatchedPriority()
static HostCheckBox * UseVideoModes()
virtual void setValue(int newValue)
Definition: settings.cpp:521
QMap< int, QString > _iso639_key_to_english_name
Definition: iso639.cpp:12
virtual void Save(void)
void addChild(Configurable *child)
static HostCheckBox * AltClearSavedPosition()
void addTarget(QString triggerValue, Configurable *target)
static HostSpinBox * FFRewReposTime()