MythTV  0.27pre
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
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 "uitypes.h"
36 #include "cardutil.h"
37 #include "themeinfo.h"
38 #include "mythconfig.h"
39 #include "mythdirs.h"
40 #include "mythuihelper.h"
41 #ifdef USING_AIRPLAY
43 #endif
44 #if defined(Q_OS_MACX)
45 #include "privatedecoder_vda.h"
46 #endif
47 
49 {
50  HostCheckBox *gc = new HostCheckBox("DecodeExtraAudio");
51  gc->setLabel(QObject::tr("Extra audio buffering"));
52  gc->setValue(true);
53  gc->setHelpText(QObject::tr("Enable this setting if MythTV is playing "
54  "\"crackly\" audio. This setting affects digital tuners "
55  "(QAM/DVB/ATSC) and hardware encoders. It will have no "
56  "effect on framegrabbers (MPEG-4/RTJPEG). MythTV will "
57  "keep extra audio data in its internal buffers to "
58  "workaround this bug."));
59  return gc;
60 }
61 
63 {
64  HostComboBox *gc = new HostComboBox("PIPLocation");
65  gc->setLabel(QObject::tr("PIP video location"));
66  for (uint loc = 0; loc < kPIP_END; ++loc)
67  gc->addSelection(toString((PIPLocation) loc), QString::number(loc));
68  gc->setHelpText(QObject::tr("Location of PIP Video window."));
69  return gc;
70 }
71 
73 {
74  HostComboBox *gc = new HostComboBox("DisplayRecGroup");
75  gc->setLabel(QObject::tr("Default group filter to apply"));
76 
77  gc->addSelection(QObject::tr("All Programs"), QString("All Programs"));
78  gc->addSelection(QObject::tr("Default"), QString("Default"));
79 
81  query.prepare("SELECT DISTINCT recgroup from recorded;");
82 
83  if (query.exec())
84  {
85  while (query.next())
86  {
87  if (query.value(0).toString() != "Default")
88  {
89  QString recgroup = query.value(0).toString();
90  gc->addSelection(recgroup, recgroup);
91  }
92  }
93  }
94 
95  query.prepare("SELECT DISTINCT category from recorded;");
96 
97  if (query.exec())
98  {
99  while (query.next())
100  {
101  QString key = query.value(0).toString();
102  gc->addSelection(key, key);
103  }
104  }
105 
106  gc->setHelpText(QObject::tr("Default group filter to apply "
107  "on the View Recordings screen."));
108  return gc;
109 }
110 
112 {
113  HostCheckBox *gc = new HostCheckBox("QueryInitialFilter");
114  gc->setLabel(QObject::tr("Always prompt for initial group filter"));
115  gc->setValue(false);
116  gc->setHelpText(QObject::tr("If enabled, always prompt the user for the "
117  "initial filter to apply when entering the "
118  "Watch Recordings screen."));
119  return gc;
120 }
121 
123 {
124  HostCheckBox *gc = new HostCheckBox("RememberRecGroup");
125  gc->setLabel(QObject::tr("Save current group filter when changed"));
126  gc->setValue(true);
127  gc->setHelpText(QObject::tr("If enabled, remember the last selected filter "
128  "instead of displaying the default filter "
129  "whenever you enter the playback screen."));
130  return gc;
131 }
132 
134 {
135  HostCheckBox *gc = new HostCheckBox("PlaybackBoxStartInTitle");
136  gc->setLabel(QObject::tr("Start in group list"));
137  gc->setValue(true);
138  gc->setHelpText(QObject::tr("If enabled, the focus will "
139  "start on the group list, otherwise the "
140  "focus will default to the recordings."));
141  return gc;
142 }
143 
145 {
146  HostCheckBox *gc = new HostCheckBox("SmartForward");
147  gc->setLabel(QObject::tr("Smart fast forwarding"));
148  gc->setValue(false);
149  gc->setHelpText(QObject::tr("If enabled, then immediately after "
150  "rewinding, only skip forward the same amount as "
151  "skipping backwards."));
152  return gc;
153 }
154 
156 {
157  GlobalComboBox *bc = new GlobalComboBox("CommercialSkipMethod");
158  bc->setLabel(QObject::tr("Commercial detection method"));
159  bc->setHelpText(QObject::tr(
160  "This determines the method used by MythTV to "
161  "detect when commercials start and end."));
162 
164  for (uint i = 0; i < tmp.size(); ++i)
165  bc->addSelection(SkipTypeToString(tmp[i]), QString::number(tmp[i]));
166 
167  return bc;
168 }
169 
171 {
172  GlobalCheckBox *gc = new GlobalCheckBox("CommFlagFast");
173  gc->setLabel(QObject::tr("Enable experimental speedup of commercial detection"));
174  gc->setValue(false);
175  gc->setHelpText(QObject::tr("If enabled, experimental commercial detection "
176  "speedups will be enabled."));
177  return gc;
178 }
179 
181 {
182  HostComboBox *gc = new HostComboBox("AutoCommercialSkip");
183  gc->setLabel(QObject::tr("Automatically skip commercials"));
184  gc->addSelection(QObject::tr("Off"), "0");
185  gc->addSelection(QObject::tr("Notify, but do not skip"), "2");
186  gc->addSelection(QObject::tr("Automatically Skip"), "1");
187  gc->setHelpText(QObject::tr("Automatically skip commercial breaks that "
188  "have been flagged during automatic commercial detection "
189  "or by the mythcommflag program, or just notify that a "
190  "commercial has been detected."));
191  return gc;
192 }
193 
195 {
196  GlobalSpinBox *gs = new GlobalSpinBox("DeferAutoTranscodeDays", 0, 365, 1);
197  gs->setLabel(QObject::tr("Deferral days for auto transcode jobs"));
198  gs->setHelpText(QObject::tr("If non-zero, automatic transcode jobs will "
199  "be scheduled to run this many days after a recording "
200  "completes instead of immediately afterwards."));
201  gs->setValue(0);
202  return gs;
203 }
204 
206 {
207  GlobalCheckBox *bc = new GlobalCheckBox("AggressiveCommDetect");
208  bc->setLabel(QObject::tr("Strict commercial detection"));
209  bc->setValue(true);
210  bc->setHelpText(QObject::tr("Enable stricter commercial detection code. "
211  "Disable if some commercials are not being detected."));
212  return bc;
213 }
214 
216 {
217  HostSpinBox *gs = new HostSpinBox("CommRewindAmount", 0, 10, 1);
218  gs->setLabel(QObject::tr("Commercial skip automatic rewind amount (secs)"));
219  gs->setHelpText(QObject::tr("MythTV will automatically rewind "
220  "this many seconds after performing a commercial skip."));
221  gs->setValue(0);
222  return gs;
223 }
224 
226 {
227  HostSpinBox *gs = new HostSpinBox("CommNotifyAmount", 0, 10, 1);
228  gs->setLabel(QObject::tr("Commercial skip notify amount (secs)"));
229  gs->setHelpText(QObject::tr("MythTV will act like a commercial "
230  "begins this many seconds early. This can be useful "
231  "when commercial notification is used in place of "
232  "automatic skipping."));
233  gs->setValue(0);
234  return gs;
235 }
236 
238 {
239  GlobalSpinBox *bs = new GlobalSpinBox("MaximumCommercialSkip", 0, 3600, 10);
240  bs->setLabel(QObject::tr("Maximum commercial skip (secs)"));
241  bs->setHelpText(QObject::tr("MythTV will discourage long manual commercial "
242  "skips. Skips which are longer than this will require the "
243  "user to hit the SKIP key twice. Automatic commercial "
244  "skipping is not affected by this limit."));
245  bs->setValue(3600);
246  return bs;
247 }
248 
250 {
251  GlobalSpinBox *bs = new GlobalSpinBox("MergeShortCommBreaks", 0, 3600, 5);
252  bs->setLabel(QObject::tr("Merge short commercial breaks (secs)"));
253  bs->setHelpText(QObject::tr("Treat consecutive commercial breaks shorter "
254  "than this as one break when skipping forward. Useful if "
255  "you have to skip a few times during breaks. Applies to "
256  "automatic skipping as well. Set to 0 to disable."));
257  bs->setValue(0);
258  return bs;
259 }
260 
262 {
263  GlobalSpinBox *bs = new GlobalSpinBox("AutoExpireExtraSpace", 0, 200, 1);
264  bs->setLabel(QObject::tr("Extra disk space (GB)"));
265  bs->setHelpText(QObject::tr("Extra disk space (in gigabytes) beyond what "
266  "MythTV requires that you want to keep free on the "
267  "recording file systems."));
268  bs->setValue(1);
269  return bs;
270 };
271 
272 #if 0
274 {
275  GlobalCheckBox *cb = new GlobalCheckBox("AutoExpireInsteadOfDelete");
276  cb->setLabel(QObject::tr("Auto-Expire instead of delete recording"));
277  cb->setValue(false);
278  cb->setHelpText(QObject::tr("If enabled, move deleted recordings to the "
279  "'Deleted' recgroup and turn on autoexpire "
280  "instead of deleting immediately."));
281  return cb;
282 }
283 #endif
284 
286 {
287  GlobalSpinBox *bs = new GlobalSpinBox("DeletedMaxAge", -1, 365, 1);
288  bs->setLabel(QObject::tr("Time to retain deleted recordings (days)"));
289  bs->setHelpText(QObject::tr("Determines the maximum number of days before "
290  "undeleting a recording will become impossible. "
291  "A value of zero means the recording will be "
292  "permanently deleted between 5 and 20 minutes "
293  "later. A value of minus one means recordings "
294  "will be retained until space is required. "
295  "A recording will always be removed before this "
296  "time if the space is needed for a new recording."));
297  bs->setValue(0);
298  return bs;
299 };
300 
301 #if 0
303 {
304  public:
307  {
308  setLabel(QObject::tr("DeletedExpireOptions"));
310  addChild(enabled);
311  setTrigger(enabled);
312 
313  HorizontalConfigurationGroup* settings =
314  new HorizontalConfigurationGroup(false);
315  settings->addChild(DeletedMaxAge());
316  addTarget("1", settings);
317 
318  // show nothing if fillEnabled is off
319  addTarget("0", new HorizontalConfigurationGroup(true));
320  };
321 };
322 #endif
323 
325 {
326  GlobalComboBox *bc = new GlobalComboBox("AutoExpireMethod");
327  bc->setLabel(QObject::tr("Auto-Expire method"));
328  bc->addSelection(QObject::tr("Oldest show first"), "1");
329  bc->addSelection(QObject::tr("Lowest priority first"), "2");
330  bc->addSelection(QObject::tr("Weighted time/priority combination"), "3");
331  bc->setHelpText(QObject::tr("Method used to determine which recorded "
332  "shows to delete first. Live TV recordings will always "
333  "expire before normal recordings."));
334  bc->setValue(1);
335  return bc;
336 }
337 
339 {
340  GlobalCheckBox *bc = new GlobalCheckBox("AutoExpireWatchedPriority");
341  bc->setLabel(QObject::tr("Watched before unwatched"));
342  bc->setValue(false);
343  bc->setHelpText(QObject::tr("If enabled, programs that have been marked as "
344  "watched will be expired before programs that have not "
345  "been watched."));
346  return bc;
347 }
348 
350 {
351  GlobalSpinBox *bs = new GlobalSpinBox("AutoExpireDayPriority", 1, 400, 1);
352  bs->setLabel(QObject::tr("Priority weight"));
353  bs->setHelpText(QObject::tr("The number of days bonus a program gets for "
354  "each priority point. This is only used when the Weighted "
355  "time/priority Auto-Expire method is selected."));
356  bs->setValue(3);
357  return bs;
358 };
359 
361 {
362  GlobalSpinBox *bs = new GlobalSpinBox("AutoExpireLiveTVMaxAge", 1, 365, 1);
363  bs->setLabel(QObject::tr("Live TV max age (days)"));
364  bs->setHelpText(QObject::tr("Auto-Expire will force expiration of Live "
365  "TV recordings when they are this many days old. Live TV "
366  "recordings may also be expired early if necessary to "
367  "free up disk space."));
368  bs->setValue(1);
369  return bs;
370 };
371 
372 #if 0
374 {
375  GlobalSpinBox *bs = new GlobalSpinBox("MinRecordDiskThreshold",
376  0, 1000000, 100);
377  bs->setLabel(QObject::tr("New recording free disk space threshold "
378  "(MB)"));
379  bs->setHelpText(QObject::tr("MythTV will stop scheduling new recordings on "
380  "a backend when its free disk space (in megabytes) falls "
381  "below this value."));
382  bs->setValue(300);
383  return bs;
384 }
385 #endif
386 
388 {
389  GlobalCheckBox *bc = new GlobalCheckBox("RerecordWatched");
390  bc->setLabel(QObject::tr("Re-record watched"));
391  bc->setValue(false);
392  bc->setHelpText(QObject::tr("If enabled, programs that have been marked as "
393  "watched and are Auto-Expired will be re-recorded if "
394  "they are shown again."));
395  return bc;
396 }
397 
399 {
400  GlobalSpinBox *bs = new GlobalSpinBox("RecordPreRoll", 0, 600, 60, true);
401  bs->setLabel(QObject::tr("Time to record before start of show "
402  "(secs)"));
403  bs->setHelpText(QObject::tr("This global setting allows the recorder "
404  "to start before the scheduled start time. It does "
405  "not affect the scheduler. It is ignored when two shows "
406  "have been scheduled without enough time in between."));
407  bs->setValue(0);
408  return bs;
409 }
410 
412 {
413  GlobalSpinBox *bs = new GlobalSpinBox("RecordOverTime", 0, 1800, 60, true);
414  bs->setLabel(QObject::tr("Time to record past end of show (secs)"));
415  bs->setValue(0);
416  bs->setHelpText(QObject::tr("This global setting allows the recorder "
417  "to record beyond the scheduled end time. It does "
418  "not affect the scheduler. It is ignored when two shows "
419  "have been scheduled without enough time in between."));
420  return bs;
421 }
422 
424 {
425  GlobalComboBox *gc = new GlobalComboBox("OverTimeCategory");
426  gc->setLabel(QObject::tr("Category of shows to be extended"));
427  gc->setHelpText(QObject::tr("For a special category (e.g. "
428  "\"Sports event\"), request that shows be autoextended. "
429  "Only works if a show's category can be determined."));
430 
431  MSqlQuery query(MSqlQuery::InitCon());
432  query.prepare("SELECT DISTINCT category FROM program GROUP BY category;");
433 
434  gc->addSelection("", "");
435  if (query.exec())
436  {
437  while (query.next())
438  {
439  QString key = query.value(0).toString();
440  if (!key.trimmed().isEmpty())
441  gc->addSelection(key, key);
442  }
443  }
444 
445  return gc;
446 }
447 
449 {
450  GlobalSpinBox *bs = new GlobalSpinBox("CategoryOverTime",
451  0, 180, 60, true);
452  bs->setLabel(QObject::tr("Record past end of show (mins)"));
453  bs->setValue(30);
454  bs->setHelpText(QObject::tr("For the specified category, an attempt "
455  "will be made to extend the recording by the specified "
456  "number of minutes. It is ignored when two shows have "
457  "been scheduled without enough time in-between."));
458  return bs;
459 }
460 
462 {
464  new VerticalConfigurationGroup(false, false);
465 
466  vcg->setLabel(QObject::tr("Category record over-time"));
467  vcg->setUseLabel(true);
468  vcg->addChild(OverTimeCategory());
469  vcg->addChild(CategoryOverTime());
470  return vcg;
471 }
472 
473 static QString trunc(const QString &str, int len)
474 {
475  if (str.length() > len)
476  return str.mid(0, len - 5) + " . . . ";
477  return str;
478 }
479 
480 static QString pad(const QString &str, int len)
481 {
482  QString tmp = str;
483 
484  while (tmp.length() + 4 < len)
485  tmp += " ";
486 
487  while (tmp.length() < len)
488  tmp += " ";
489 
490  return tmp;
491 }
492 
494  item(_item)
495 {
496  setLabel(QObject::tr("Profile Item"));
497 
499 
500  row[0] = new HorizontalConfigurationGroup(false, false, true, true);
501  cmp[0] = new TransComboBoxSetting();
502  width[0] = new TransSpinBoxSetting(0, 1920, 64, true);
503  height[0] = new TransSpinBoxSetting(0, 1088, 64, true);
504  row[1] = new HorizontalConfigurationGroup(false, false, true, true);
505  cmp[1] = new TransComboBoxSetting();
506  width[1] = new TransSpinBoxSetting(0, 1920, 64, true);
507  height[1] = new TransSpinBoxSetting(0, 1088, 64, true);
509  max_cpus = new TransSpinBoxSetting(1, HAVE_THREADS ? 4 : 1, 1, true);
516  filters = new TransLineEditSetting(true);
517 
518  for (uint i = 0; i < 2; ++i)
519  {
520  const QString kCMP[6] = { "", "<", "<=", "==", ">=", ">" };
521  for (uint j = 0; j < 6; ++j)
522  cmp[i]->addSelection(kCMP[j]);
523 
524  cmp[i]->setLabel(tr("Match criteria"));
525  width[i]->setName(QString("w%1").arg(i));
526  width[i]->setLabel(tr("W", "Width"));
527  height[i]->setName(QString("h%1").arg(i));
528  height[i]->setLabel(tr("H", "Height"));
529 
530  row[i]->addChild(cmp[i]);
531  row[i]->addChild(width[i]);
532  row[i]->addChild(height[i]);
533  }
534 
536  new HorizontalConfigurationGroup(false, false, true, true);
538  new HorizontalConfigurationGroup(false, false, true, true);
539 
540  decoder->setLabel(tr("Decoder"));
541  max_cpus->setLabel(tr("Max CPUs"));
542  skiploop->setLabel(tr("Deblocking filter"));
543  vidrend->setLabel(tr("Video renderer"));
544  osdrend->setLabel(tr("OSD renderer"));
545  osdfade->setLabel(tr("OSD fade"));
546  deint0->setLabel(tr("Primary deinterlacer"));
547  deint1->setLabel(tr("Fallback deinterlacer"));
548  filters->setLabel(tr("Custom filters"));
549 
551  tr("Maximum number of CPU cores used for video decoding and filtering.") +
552  (HAVE_THREADS ? "" :
553  tr(" Multithreaded decoding disabled-only one CPU "
554  "will be used, please recompile with "
555  "--enable-ffmpeg-pthreads to enable.")));
556 
558  QObject::tr("Example custom filter list: 'ivtc,denoise3d'"));
559 
561  tr("When unchecked the deblocking loopfilter will be disabled ") + "\n" +
562  tr("Disabling will significantly reduce the load on the CPU "
563  "when watching HD H.264 but may significantly reduce video quality."));
564 
566  tr("When unchecked the OSD will not fade away but instead "
567  "will disappear abruptly.") + '\n' +
568  tr("Uncheck this if the video studders while the OSD is "
569  "fading away."));
570 
571  vid_row->addChild(decoder);
572  vid_row->addChild(max_cpus);
573  vid_row->addChild(skiploop);
574  osd_row->addChild(vidrend);
575  osd_row->addChild(osdrend);
576  osd_row->addChild(osdfade);
577 
579  new VerticalConfigurationGroup(false, false, true, true);
580  grp->addChild(row[0]);
581  grp->addChild(row[1]);
582  grp->addChild(vid_row);
583  grp->addChild(osd_row);
584  addChild(grp);
585 
587  new VerticalConfigurationGroup(false, false, true, true);
588  page2->addChild(deint0);
589  page2->addChild(deint1);
590  page2->addChild(filters);
591  addChild(page2);
592 
593  connect(decoder, SIGNAL(valueChanged(const QString&)),
594  this, SLOT(decoderChanged(const QString&)));\
595  connect(vidrend, SIGNAL(valueChanged(const QString&)),
596  this, SLOT(vrenderChanged(const QString&)));
597  connect(osdrend, SIGNAL(valueChanged(const QString&)),
598  this, SLOT(orenderChanged(const QString&)));
599  connect(deint0, SIGNAL(valueChanged(const QString&)),
600  this, SLOT(deint0Changed(const QString&)));
601  connect(deint1, SIGNAL(valueChanged(const QString&)),
602  this, SLOT(deint1Changed(const QString&)));
603 }
604 
606 {
607  for (uint i = 0; i < 2; ++i)
608  {
609  QString pcmp = item.Get(QString("pref_cmp%1").arg(i));
610  QStringList clist = pcmp.split(" ");
611 
612  if (clist.size() == 0)
613  clist<<((i) ? "" : ">");
614  if (clist.size() == 1)
615  clist<<"0";
616  if (clist.size() == 2)
617  clist<<"0";
618 
619  cmp[i]->setValue(clist[0]);
620  width[i]->setValue(clist[1].toInt());
621  height[i]->setValue(clist[2].toInt());
622  }
623 
624  QString pdecoder = item.Get("pref_decoder");
625  QString pmax_cpus = item.Get("pref_max_cpus");
626  QString pskiploop = item.Get("pref_skiploop");
627  QString prenderer = item.Get("pref_videorenderer");
628  QString posd = item.Get("pref_osdrenderer");
629  QString posdfade = item.Get("pref_osdfade");
630  QString pdeint0 = item.Get("pref_deint0");
631  QString pdeint1 = item.Get("pref_deint1");
632  QString pfilter = item.Get("pref_filters");
633  bool found = false;
634 
635  QString dech = VideoDisplayProfile::GetDecoderHelp();
636  QStringList decr = VideoDisplayProfile::GetDecoders();
637  QStringList decn = VideoDisplayProfile::GetDecoderNames();
638  QStringList::const_iterator itr = decr.begin();
639  QStringList::const_iterator itn = decn.begin();
640  for (; (itr != decr.end()) && (itn != decn.end()); ++itr, ++itn)
641  {
642  decoder->addSelection(*itn, *itr, (*itr == pdecoder));
643  found |= (*itr == pdecoder);
644  }
645  if (!found && !pdecoder.isEmpty())
646  {
647  decoder->SelectSetting::addSelection(
648  VideoDisplayProfile::GetDecoderName(pdecoder), pdecoder, true);
649  }
651 
652  if (!pmax_cpus.isEmpty())
653  max_cpus->setValue(pmax_cpus.toUInt());
654 
655  skiploop->setValue((!pskiploop.isEmpty()) ? (bool) pskiploop.toInt() : true);
656 
657  if (!prenderer.isEmpty())
658  vidrend->setValue(prenderer);
659  if (!posd.isEmpty())
660  osdrend->setValue(posd);
661 
662  osdfade->setValue((!posdfade.isEmpty()) ? (bool) posdfade.toInt() : true);
663 
664  if (!pdeint0.isEmpty())
665  deint0->setValue(pdeint0);
666  if (!pdeint1.isEmpty())
667  deint1->setValue(pdeint1);
668  if (!pfilter.isEmpty())
669  filters->setValue(pfilter);
670 }
671 
673 {
674  for (uint i = 0; i < 2; ++i)
675  {
676  QString val = QString("pref_cmp%1").arg(i);
677  QString data;
678  if (!cmp[i]->getValue().isEmpty())
679  {
680  data = QString("%1 %2 %3")
681  .arg(cmp[i]->getValue())
682  .arg(width[i]->intValue())
683  .arg(height[i]->intValue());
684  }
685  item.Set(val, data);
686  }
687 
688  item.Set("pref_decoder", decoder->getValue());
689  item.Set("pref_max_cpus", max_cpus->getValue());
690  item.Set("pref_skiploop", (skiploop->boolValue()) ? "1" : "0");
691  item.Set("pref_videorenderer", vidrend->getValue());
692  item.Set("pref_osdrenderer", osdrend->getValue());
693  item.Set("pref_osdfade", (osdfade->boolValue()) ? "1" : "0");
694  item.Set("pref_deint0", deint0->getValue());
695  item.Set("pref_deint1", deint1->getValue());
696 
697  QString tmp0 = filters->getValue();
698  QString tmp1 = vidrend->getValue();
699  QString tmp3 = VideoDisplayProfile::IsFilterAllowed(tmp1) ? tmp0 : "";
700  item.Set("pref_filters", tmp3);
701 }
702 
704 {
705  QString vrenderer = vidrend->getValue();
706  QStringList renderers = VideoDisplayProfile::GetVideoRenderers(dec);
707  QStringList::const_iterator it;
708 
709  QString prenderer;
710  for (it = renderers.begin(); it != renderers.end(); ++it)
711  prenderer = (*it == vrenderer) ? vrenderer : prenderer;
712  if (prenderer.isEmpty())
714 
716  for (it = renderers.begin(); it != renderers.end(); ++it)
717  {
718  if ((*it != "null") && (*it != "nullvaapi") && (*it != "nullvdpau"))
719  vidrend->addSelection(*it, *it, (*it == prenderer));
720  }
721 
723 }
724 
725 void PlaybackProfileItemConfig::vrenderChanged(const QString &renderer)
726 {
727  QStringList osds = VideoDisplayProfile::GetOSDs(renderer);
728  QStringList deints = VideoDisplayProfile::GetDeinterlacers(renderer);
729  QString losd = osdrend->getValue();
730  QString ldeint0 = deint0->getValue();
731  QString ldeint1 = deint1->getValue();
732  QStringList::const_iterator it;
733 
735  for (it = osds.begin(); it != osds.end(); ++it)
736  osdrend->addSelection(*it, *it, (*it == losd));
737 
739  for (it = deints.begin(); it != deints.end(); ++it)
740  {
742  *it, (*it == ldeint0));
743  }
744 
746  for (it = deints.begin(); it != deints.end(); ++it)
747  {
748  if (!(*it).contains("bobdeint") && !(*it).contains("doublerate") &&
749  !(*it).contains("doubleprocess"))
751  *it, (*it == ldeint1));
752  }
753 
756 }
757 
758 void PlaybackProfileItemConfig::orenderChanged(const QString &renderer)
759 {
761 }
762 
764 {
766  QObject::tr("Main deinterlacing method.") + ' ' +
768 }
769 
771 {
773  QObject::tr("Fallback deinterlacing method.") + ' ' +
775 }
776 
777 PlaybackProfileConfig::PlaybackProfileConfig(const QString &profilename) :
779  profile_name(profilename), needs_save(false),
780  groupid(0), last_main(NULL)
781 {
783  profilename, gCoreContext->GetHostName());
784 
786 
787  InitUI();
788 }
789 
791 {
792 }
793 
795 {
796  if (!labels[i])
797  return;
798 
799  QString andStr = QObject::tr("&", "and");
800  QString cmp0 = items[i].Get("pref_cmp0");
801  QString cmp1 = items[i].Get("pref_cmp1");
802  QString str = QObject::tr("if rez") + ' ' + cmp0;
803 
804  if (!cmp1.isEmpty())
805  str += " " + andStr + ' ' + cmp1;
806 
807  str += " -> ";
808  str += items[i].Get("pref_decoder");
809  str += " " + andStr + ' ';
810  str += items[i].Get("pref_videorenderer");
811  str.replace("-blit", "");
812  str.replace("ivtv " + andStr + " ivtv", "ivtv");
813  str.replace("xvmc " + andStr + " xvmc", "xvmc");
814  str.replace("xvmc", "XvMC");
815  str.replace("xv", "XVideo");
816 
817  labels[i]->setValue(pad(trunc(str, 48), 48));
818 }
819 
821 {
823  new VerticalConfigurationGroup(false, false, true, true);
824 
826  new HorizontalConfigurationGroup(false, false, true, true);
827  VerticalConfigurationGroup *column1 =
828  new VerticalConfigurationGroup(false, false, true, true);
829  VerticalConfigurationGroup *column2 =
830  new VerticalConfigurationGroup(false, false, true, true);
831 
832  labels.resize(items.size());
833 
834  for (uint i = 0; i < items.size(); ++i)
835  {
836  labels[i] = new TransLabelSetting();
837  InitLabel(i);
838  column1->addChild(labels[i]);
839  }
840 
841  editProf.resize(items.size());
842  delProf.resize(items.size());
843  priority.resize(items.size());
844 
845  for (uint i = 0; i < items.size(); ++i)
846  {
848  new HorizontalConfigurationGroup(false, false, true, true);
849 
850  editProf[i] = new TransButtonSetting(QString("edit%1").arg(i));
851  delProf[i] = new TransButtonSetting(QString("del%1").arg(i));
852  priority[i] = new TransSpinBoxSetting(1, items.size(), 1);
853  priority[i]->setName(QString("pri%1").arg(i));
854 
855  editProf[i]->setLabel(QObject::tr("Edit"));
856  delProf[i]->setLabel(QObject::tr("Delete"));
857  priority[i]->setValue(i + 1);
858  items[i].Set("pref_priority", QString::number(i + 1));
859 
860  grp->addChild(editProf[i]);
861  grp->addChild(delProf[i]);
862  grp->addChild(priority[i]);
863 
864  connect(editProf[i], SIGNAL(pressed(QString)),
865  this, SLOT (pressed(QString)));
866  connect(delProf[i], SIGNAL(pressed(QString)),
867  this, SLOT (pressed(QString)));
868  connect(priority[i], SIGNAL(valueChanged( const QString&, int)),
869  this, SLOT( priorityChanged(const QString&, int)));
870 
871  column2->addChild(grp);
872  }
873 
874  rows->addChild(column1);
875  rows->addChild(column2);
876 
877  TransButtonSetting *addEntry = new TransButtonSetting("addentry");
878  addEntry->setLabel(QObject::tr("Add New Entry"));
879 
880  main->addChild(rows);
881  main->addChild(addEntry);
882 
883  connect(addEntry, SIGNAL(pressed(QString)),
884  this, SLOT (pressed(QString)));
885 
886  if (last_main)
887  replaceChild(last_main, main);
888  else
889  addChild(main);
890 
891  last_main = main;
892 }
893 
895 {
896  // Already loaded data in constructor...
897 }
898 
900 {
901  if (!needs_save)
902  return; // nothing to do..
903 
905  if (!ok)
906  {
907  LOG(VB_GENERAL, LOG_ERR,
908  "PlaybackProfileConfig::Save() -- failed to delete items");
909  return;
910  }
911 
913  if (!ok)
914  {
915  LOG(VB_GENERAL, LOG_ERR,
916  "PlaybackProfileConfig::Save() -- failed to save items");
917  return;
918  }
919 }
920 
922 {
923  if (cmd.startsWith("edit"))
924  {
925  uint i = cmd.mid(4).toUInt();
926  PlaybackProfileItemConfig itemcfg(items[i]);
927 
928  if (itemcfg.exec() != kDialogCodeAccepted)
929  LOG(VB_GENERAL, LOG_ERR, QString("edit #%1").arg(i) + " rejected");
930 
931  InitLabel(i);
932  needs_save = true;
933  }
934  else if (cmd.startsWith("del"))
935  {
936  uint i = cmd.mid(3).toUInt();
937  del_items.push_back(items[i]);
938  items.erase(items.begin() + i);
939 
940  InitUI();
941  needs_save = true;
942  }
943  else if (cmd == "addentry")
944  {
945  ProfileItem item;
946  PlaybackProfileItemConfig itemcfg(item);
947 
948  if (itemcfg.exec() != kDialogCodeAccepted)
949  LOG(VB_GENERAL, LOG_ERR, "addentry rejected");
950 
951  items.push_back(item);
952  InitUI();
953  needs_save = true;
954  }
955 
956  repaint();
957 }
958 
959 void PlaybackProfileConfig::priorityChanged(const QString &name, int val)
960 {
961  uint i = name.mid(3).toInt();
962  uint j = i;
963 
964  priority[i]->SetRelayEnabled(false);
965 
966  if (((int)items[i].GetPriority() < val) &&
967  (i + 1 < priority.size()) &&
968  ((int)items[i+1].GetPriority() == val))
969  {
970  j++;
971  priority[j]->SetRelayEnabled(false);
972 
973  swap(i, j);
974  priority[j]->setFocus();
975  }
976  else if (((int)items[i].GetPriority() > val) &&
977  (i > 0) &&
978  ((int)items[i-1].GetPriority() == val))
979  {
980  j--;
981  priority[j]->SetRelayEnabled(false);
982 
983  swap(i, j);
984 
985  priority[j]->setFocus();
986  }
987  else
988  {
989  priority[i]->setValue((int) items[i].GetPriority());
990  }
991 
992  needs_save = true;
993 
994  repaint();
995 
996  priority[i]->SetRelayEnabled(true);
997  if (i != j)
998  priority[j]->SetRelayEnabled(true);
999 }
1000 
1002 {
1003  int pri_i = items[i].GetPriority();
1004  int pri_j = items[j].GetPriority();
1005 
1006  ProfileItem item = items[j];
1007  items[j] = items[i];
1008  items[i] = item;
1009 
1010  priority[i]->setValue(pri_i);
1011  priority[j]->setValue(pri_j);
1012 
1013  items[i].Set("pref_priority", QString::number(pri_i));
1014  items[j].Set("pref_priority", QString::number(pri_j));
1015 
1016  const QString label_i = labels[i]->getValue();
1017  const QString label_j = labels[j]->getValue();
1018  labels[i]->setValue(label_j);
1019  labels[j]->setValue(label_i);
1020 }
1021 
1024  false, false, true, true), grouptrigger(NULL)
1025 {
1026  setLabel(QObject::tr("Playback Profiles") + str);
1027 
1028  QString host = gCoreContext->GetHostName();
1029  QStringList profiles = VideoDisplayProfile::GetProfiles(host);
1030  if (profiles.empty())
1031  {
1033  profiles = VideoDisplayProfile::GetProfiles(host);
1034  }
1035  if (profiles.empty())
1036  return;
1037 
1038  if (!profiles.contains("Normal") &&
1039  !profiles.contains("High Quality") &&
1040  !profiles.contains("Slim"))
1041  {
1043  profiles = VideoDisplayProfile::GetProfiles(host);
1044  }
1045 
1046 #ifdef USING_VDPAU
1047  if (!profiles.contains("VDPAU Normal") &&
1048  !profiles.contains("VDPAU High Quality") &&
1049  !profiles.contains("VDPAU Slim"))
1050  {
1052  profiles = VideoDisplayProfile::GetProfiles(host);
1053  }
1054 #endif
1055 
1056 #if defined(Q_OS_MACX)
1057  if (VDALibrary::GetVDALibrary() != NULL)
1058  {
1059  if (!profiles.contains("VDA Normal") &&
1060  !profiles.contains("VDA High Quality") &&
1061  !profiles.contains("VDA Slim"))
1062  {
1064  profiles = VideoDisplayProfile::GetProfiles(host);
1065  }
1066  }
1067 #endif
1068 
1069 #ifdef USING_OPENGL_VIDEO
1070  if (!profiles.contains("OpenGL Normal") &&
1071  !profiles.contains("OpenGL High Quality") &&
1072  !profiles.contains("OpenGL Slim"))
1073  {
1075  profiles = VideoDisplayProfile::GetProfiles(host);
1076  }
1077 #endif
1078 
1079 #ifdef USING_GLVAAPI
1080  if (!profiles.contains("VAAPI Normal"))
1081  {
1083  profiles = VideoDisplayProfile::GetProfiles(host);
1084  }
1085 #endif
1086 
1088  if (!profiles.contains(profile))
1089  {
1090  profile = (profiles.contains("Normal")) ? "Normal" : profiles[0];
1092  }
1093 
1094  grouptrigger = new HostComboBox("DefaultVideoPlaybackProfile");
1095  grouptrigger->setLabel(QObject::tr("Current Video Playback Profile"));
1096  QStringList::const_iterator it;
1097  for (it = profiles.begin(); it != profiles.end(); ++it)
1099 
1101  new HorizontalConfigurationGroup(false, false, true, true);
1102  TransButtonSetting *addProf = new TransButtonSetting("add");
1103  TransButtonSetting *delProf = new TransButtonSetting("del");
1104 
1105  addProf->setLabel(QObject::tr("Add New"));
1106  delProf->setLabel(QObject::tr("Delete"));
1107 
1108  grp->addChild(grouptrigger);
1109  grp->addChild(addProf);
1110  grp->addChild(delProf);
1111 
1112  addChild(grp);
1113 
1115  for (it = profiles.begin(); it != profiles.end(); ++it)
1116  addTarget(*it, new PlaybackProfileConfig(*it));
1117  setSaveAll(true);
1118 
1119  connect(addProf, SIGNAL(pressed( QString)),
1120  this, SLOT (btnPress(QString)));
1121  connect(delProf, SIGNAL(pressed( QString)),
1122  this, SLOT (btnPress(QString)));
1123 }
1124 
1126 {
1127 #if 0
1128  LOG(VB_GENERAL, LOG_DEBUG, "~PlaybackProfileConfigs()");
1129 #endif
1130 }
1131 
1133 {
1134  if (cmd == "add")
1135  {
1136  QString name;
1137 
1138  QString host = gCoreContext->GetHostName();
1139  QStringList not_ok_list = VideoDisplayProfile::GetProfiles(host);
1140 
1141  bool ok = true;
1142  while (ok)
1143  {
1144  QString msg = QObject::tr("Enter Playback Group Name");
1145 
1147  GetMythMainWindow(), msg, msg, name);
1148 
1149  if (!ok)
1150  return;
1151 
1152  if (not_ok_list.contains(name) || name.isEmpty())
1153  {
1154  msg = (name.isEmpty()) ?
1155  QObject::tr(
1156  "Sorry, playback group\nname cannot be blank.") :
1157  QObject::tr(
1158  "Sorry, playback group name\n"
1159  "'%1' is already being used.").arg(name);
1160 
1162  GetMythMainWindow(), QObject::tr("Error"), msg);
1163 
1164  continue;
1165  }
1166 
1167  break;
1168  }
1169 
1171  addTarget(name, new PlaybackProfileConfig(name));
1172 
1173  if (grouptrigger)
1174  grouptrigger->addSelection(name, name, true);
1175  }
1176  else if ((cmd == "del") && grouptrigger)
1177  {
1178  const QString name = grouptrigger->getSelectionLabel();
1179  if (!name.isEmpty())
1180  {
1181  removeTarget(name);
1183  name, gCoreContext->GetHostName());
1184  }
1185  }
1186 
1187  repaint();
1188 }
1189 
1191 {
1193 }
1194 
1196 {
1197  QString str[4] =
1198  {
1199  QObject::tr("Sort all sub-titles/multi-titles Ascending"),
1200  QObject::tr("Sort all sub-titles/multi-titles Descending"),
1201  QObject::tr("Sort sub-titles Descending, multi-titles Ascending"),
1202  QObject::tr("Sort sub-titles Ascending, multi-titles Descending"),
1203  };
1204  QString help = QObject::tr(
1205  "Selects how to sort show episodes. Sub-titles refers to the "
1206  "episodes listed under a specific show title. Multi-title "
1207  "refers to sections (e.g. \"All Programs\") which list "
1208  "multiple titles. Sections in parentheses are not affected.");
1209 
1210  HostComboBox *gc = new HostComboBox("PlayBoxOrdering");
1211  gc->setLabel(QObject::tr("Episode sort orderings"));
1212 
1213  for (int i = 0; i < 4; ++i)
1214  gc->addSelection(str[i], QString::number(i));
1215 
1216  gc->setValue(1);
1217  gc->setHelpText(help);
1218 
1219  return gc;
1220 }
1221 
1223 {
1224  HostComboBox *gc = new HostComboBox("PlayBoxEpisodeSort");
1225  gc->setLabel(QObject::tr("Sort episodes"));
1226  gc->addSelection(QObject::tr("Record date"), "Date");
1227  gc->addSelection(QObject::tr("Season/Episode"), "Season");
1228  gc->addSelection(QObject::tr("Original air date"), "OrigAirDate");
1229  gc->addSelection(QObject::tr("Program ID"), "Id");
1230  gc->setHelpText(QObject::tr("Selects how to sort a show's episodes"));
1231  return gc;
1232 }
1233 
1235 {
1236  HostSpinBox *gs = new HostSpinBox("FFRewReposTime", 0, 200, 5);
1237  gs->setLabel(QObject::tr("Fast forward/rewind reposition amount"));
1238  gs->setValue(100);
1239  gs->setHelpText(QObject::tr("When exiting sticky keys fast forward/rewind "
1240  "mode, reposition this many 1/100th seconds before "
1241  "resuming normal playback. This "
1242  "compensates for the reaction time between seeing "
1243  "where to resume playback and actually exiting seeking."));
1244  return gs;
1245 }
1246 
1248 {
1249  HostCheckBox *gc = new HostCheckBox("FFRewReverse");
1250  gc->setLabel(QObject::tr("Reverse direction in fast forward/rewind"));
1251  gc->setValue(true);
1252  gc->setHelpText(QObject::tr("If enabled, pressing the sticky rewind key "
1253  "in fast forward mode switches to rewind mode, and "
1254  "vice versa. If disabled, it will decrease the "
1255  "current speed or switch to play mode if "
1256  "the speed can't be decreased further."));
1257  return gc;
1258 }
1259 
1261 {
1262  HostComboBox *gc = new HostComboBox("MenuTheme");
1263  gc->setLabel(QObject::tr("Menu theme"));
1264 
1265  QList<ThemeInfo> themelist = GetMythUI()->GetThemes(THEME_MENU);
1266 
1267  QList<ThemeInfo>::iterator it;
1268  for( it = themelist.begin(); it != themelist.end(); ++it )
1269  {
1270  gc->addSelection((*it).GetName(), (*it).GetDirectoryName(),
1271  (*it).GetDirectoryName() == "defaultmenu");
1272  }
1273 
1274  return gc;
1275 }
1276 
1278 {
1279  QString beVBI = gCoreContext->GetSetting("VbiFormat");
1280  QString fmt = beVBI.toLower().left(4);
1281  int sel = (fmt == "pal ") ? 1 : ((fmt == "ntsc") ? 2 : 0);
1282 
1283  HostComboBox *gc = new HostComboBox("DecodeVBIFormat");
1284  gc->setLabel(QObject::tr("Decode VBI format"));
1285  gc->addSelection(QObject::tr("None"), "none", 0 == sel);
1286  gc->addSelection(QObject::tr("PAL teletext"), "pal_txt", 1 == sel);
1287  gc->addSelection(QObject::tr("NTSC closed caption"), "ntsc_cc", 2 == sel);
1288  gc->setHelpText(
1289  QObject::tr("If enabled, this overrides the mythtv-setup setting "
1290  "used during recording when decoding captions."));
1291 
1292  return gc;
1293 }
1294 
1296 {
1297  HostComboBox *gc = new HostComboBox("SubtitleCodec");
1298 
1299  gc->setLabel(QObject::tr("Subtitle Codec"));
1300  QList<QByteArray> list = QTextCodec::availableCodecs();
1301  for (uint i = 0; i < (uint) list.size(); ++i)
1302  {
1303  QString val = QString(list[i]);
1304  gc->addSelection(val, val, val.toLower() == "utf-8");
1305  }
1306 
1307  return gc;
1308 }
1309 
1311 {
1312  HostComboBox *gc = new HostComboBox("ChannelOrdering");
1313  gc->setLabel(QObject::tr("Channel ordering"));
1314  gc->addSelection(QObject::tr("channel number"), "channum");
1315  gc->addSelection(QObject::tr("callsign"), "callsign");
1316  return gc;
1317 }
1318 
1320 {
1321  HostSpinBox *gs = new HostSpinBox("VertScanPercentage", -100, 100, 1);
1322  gs->setLabel(QObject::tr("Vertical scaling"));
1323  gs->setValue(0);
1324  gs->setHelpText(QObject::tr(
1325  "Adjust this if the image does not fill your "
1326  "screen vertically. Range -100% to 100%"));
1327  return gs;
1328 }
1329 
1331 {
1332  HostSpinBox *gs = new HostSpinBox("HorizScanPercentage", -100, 100, 1);
1333  gs->setLabel(QObject::tr("Horizontal scaling"));
1334  gs->setValue(0);
1335  gs->setHelpText(QObject::tr(
1336  "Adjust this if the image does not fill your "
1337  "screen horizontally. Range -100% to 100%"));
1338  return gs;
1339 };
1340 
1342 {
1343  HostSpinBox *gs = new HostSpinBox("XScanDisplacement", -50, 50, 1);
1344  gs->setLabel(QObject::tr("Scan displacement (X)"));
1345  gs->setValue(0);
1346  gs->setHelpText(QObject::tr("Adjust this to move the image horizontally."));
1347  return gs;
1348 }
1349 
1351 {
1352  HostSpinBox *gs = new HostSpinBox("YScanDisplacement", -50, 50, 1);
1353  gs->setLabel(QObject::tr("Scan displacement (Y)"));
1354  gs->setValue(0);
1355  gs->setHelpText(QObject::tr("Adjust this to move the image vertically."));
1356  return gs;
1357 };
1358 
1360 {
1361  HostCheckBox *gc = new HostCheckBox("DefaultCCMode");
1362  gc->setLabel(QObject::tr("Always display closed captioning or subtitles"));
1363  gc->setValue(false);
1364  gc->setHelpText(QObject::tr(
1365  "If enabled, captions will be displayed "
1366  "when playing back recordings or watching "
1367  "Live TV. Closed Captioning can be turned on or off "
1368  "by pressing \"T\" during playback."));
1369  return gc;
1370 }
1371 
1373 {
1374  HostCheckBox *gc = new HostCheckBox("EnableMHEG");
1375  gc->setLabel(QObject::tr("Enable interactive TV"));
1376  gc->setValue(false);
1377  gc->setHelpText(QObject::tr(
1378  "If enabled, interactive TV applications (MHEG) will "
1379  "be activated. This is used for teletext and logos for "
1380  "radio and channels that are currently off-air."));
1381  return gc;
1382 }
1383 
1385 {
1386  HostCheckBox *gc = new HostCheckBox("PersistentBrowseMode");
1387  gc->setLabel(QObject::tr("Always use browse mode in Live TV"));
1388  gc->setValue(true);
1389  gc->setHelpText(
1390  QObject::tr(
1391  "If enabled, browse mode will automatically be activated "
1392  "whenever you use channel up/down while watching Live TV."));
1393  return gc;
1394 }
1395 
1397 {
1398  HostCheckBox *gc = new HostCheckBox("BrowseAllTuners");
1399  gc->setLabel(QObject::tr("Browse all channels"));
1400  gc->setValue(false);
1401  gc->setHelpText(
1402  QObject::tr(
1403  "If enabled, browse mode will show channels on all "
1404  "available recording devices, instead of showing "
1405  "channels on just the current recorder."));
1406  return gc;
1407 }
1408 
1410 {
1411  HostCheckBox *gc = new HostCheckBox("ClearSavedPosition");
1412  gc->setLabel(QObject::tr("Clear bookmark on playback"));
1413  gc->setValue(true);
1414  gc->setHelpText(QObject::tr("If enabled, automatically clear the "
1415  "bookmark on a recording when the recording is played "
1416  "back. If disabled, you can mark the beginning with "
1417  "rewind then save position."));
1418  return gc;
1419 }
1420 
1422 {
1423  HostCheckBox *gc = new HostCheckBox("AltClearSavedPosition");
1424  gc->setLabel(QObject::tr("Alternate clear and save bookmark"));
1425  gc->setValue(true);
1426  gc->setHelpText(QObject::tr("During playback the SELECT key "
1427  "(Enter or Space) will alternate between \"Bookmark "
1428  "Saved\" and \"Bookmark Cleared\". If disabled, the "
1429  "SELECT key will save the current position for each "
1430  "keypress."));
1431  return gc;
1432 }
1433 
1435 {
1436  HostComboBox *gc = new HostComboBox("PlaybackExitPrompt");
1437  gc->setLabel(QObject::tr("Action on playback exit"));
1438  gc->addSelection(QObject::tr("Just exit"), "0");
1439  gc->addSelection(QObject::tr("Save position and exit"), "2");
1440  gc->addSelection(QObject::tr("Always prompt (excluding Live TV)"), "1");
1441  gc->addSelection(QObject::tr("Always prompt (including Live TV)"), "4");
1442  gc->addSelection(QObject::tr("Prompt for Live TV only"), "8");
1443  gc->setHelpText(QObject::tr("If set to prompt, a menu will be displayed "
1444  "when you exit playback mode. The options available will "
1445  "allow you to save your position, delete the "
1446  "recording, or continue watching."));
1447  return gc;
1448 }
1449 
1451 {
1452  HostCheckBox *gc = new HostCheckBox("EndOfRecordingExitPrompt");
1453  gc->setLabel(QObject::tr("Prompt at end of recording"));
1454  gc->setValue(false);
1455  gc->setHelpText(QObject::tr("If enabled, a menu will be displayed allowing "
1456  "you to delete the recording when it has finished "
1457  "playing."));
1458  return gc;
1459 }
1460 
1462 {
1463  HostCheckBox *gc = new HostCheckBox("JumpToProgramOSD");
1464  gc->setLabel(QObject::tr("Jump to program OSD"));
1465  gc->setValue(true);
1466  gc->setHelpText(QObject::tr(
1467  "Set the choice between viewing the current "
1468  "recording group in the OSD, or showing the "
1469  "'Watch Recording' screen when 'Jump to Program' "
1470  "is activated. If enabled, the recordings are shown "
1471  "in the OSD"));
1472  return gc;
1473 }
1474 
1476 {
1477  HostCheckBox *gc = new HostCheckBox("ContinueEmbeddedTVPlay");
1478  gc->setLabel(QObject::tr("Continue playback when embedded"));
1479  gc->setValue(false);
1480  gc->setHelpText(QObject::tr(
1481  "If enabled, TV playback continues when the TV window "
1482  "is embedded in the upcoming program list or recorded "
1483  "list. The default is to pause the recorded show when "
1484  "embedded."));
1485  return gc;
1486 }
1487 
1489 {
1490  HostCheckBox *gc = new HostCheckBox("AutomaticSetWatched");
1491  gc->setLabel(QObject::tr("Automatically mark a recording as watched"));
1492  gc->setValue(false);
1493  gc->setHelpText(QObject::tr("If enabled, when you exit near the end of a "
1494  "recording it will be marked as watched. The automatic "
1495  "detection is not foolproof, so do not enable this "
1496  "setting if you don't want an unwatched recording marked "
1497  "as watched."));
1498  return gc;
1499 }
1500 
1502 {
1503  HostSpinBox *gs = new HostSpinBox("LiveTVIdleTimeout", 0, 3600, 1);
1504  gs->setLabel(QObject::tr("Live TV idle timeout (mins)"));
1505  gs->setValue(0);
1506  gs->setHelpText(QObject::tr(
1507  "Exit Live TV automatically if left idle for the "
1508  "specified number of minutes. "
1509  "0 disables the timeout."));
1510  return gs;
1511 }
1512 
1513 // static HostCheckBox *PlaybackPreview()
1514 // {
1515 // HostCheckBox *gc = new HostCheckBox("PlaybackPreview");
1516 // gc->setLabel(QObject::tr("Display live preview of recordings"));
1517 // gc->setValue(true);
1518 // gc->setHelpText(QObject::tr("If enabled, a preview of the recording "
1519 // "will play in a small window on the \"Watch a "
1520 // "Recording\" menu."));
1521 // return gc;
1522 // }
1523 //
1524 // static HostCheckBox *HWAccelPlaybackPreview()
1525 // {
1526 // HostCheckBox *gc = new HostCheckBox("HWAccelPlaybackPreview");
1527 // gc->setLabel(QObject::tr("Use HW Acceleration for live recording preview"));
1528 // gc->setValue(false);
1529 // gc->setHelpText(
1530 // QObject::tr(
1531 // "If enabled, live recording preview will use hardware "
1532 // "acceleration. The video renderer used is determined by the "
1533 // "selected CPU profile. Disable if playback is sluggish or "
1534 // "causes high CPU load"));
1535 // return gc;
1536 // }
1537 
1539 {
1540  HostCheckBox *gc = new HostCheckBox("UseVirtualKeyboard");
1541  gc->setLabel(QObject::tr("Use line edit virtual keyboards"));
1542  gc->setValue(true);
1543  gc->setHelpText(QObject::tr("If enabled, you can use a virtual keyboard "
1544  "in MythTV's line edit boxes. To use, hit SELECT (Enter "
1545  "or Space) while a line edit is in focus."));
1546  return gc;
1547 }
1548 
1550 {
1551  HostSpinBox *gs = new HostSpinBox("FrontendIdleTimeout", 0, 360, 15);
1552  gs->setLabel(QObject::tr("Idle time before entering standby mode (minutes)"));
1553  gs->setValue(90);
1554  gs->setHelpText(QObject::tr("Number of minutes to wait when the frontend "
1555  "is idle before entering standby mode. Standby "
1556  "mode allows the backend to power down if "
1557  "configured to do so. Any remote or mouse input "
1558  "will cause the countdown to start again and/or "
1559  "exit idle mode. Video playback suspends the "
1560  "countdown. A value of zero prevents the "
1561  "frontend automatically entering standby."));
1562  return gs;
1563 }
1564 
1566 {
1567  HostComboBox *gc = new HostComboBox("OverrideExitMenu");
1568  gc->setLabel(QObject::tr("Customize exit menu options"));
1569  gc->addSelection(QObject::tr("Default"), "0");
1570  gc->addSelection(QObject::tr("Show quit"), "1");
1571  gc->addSelection(QObject::tr("Show quit and shutdown"), "2");
1572  gc->addSelection(QObject::tr("Show quit, reboot and shutdown"), "3");
1573  gc->addSelection(QObject::tr("Show shutdown"), "4");
1574  gc->addSelection(QObject::tr("Show reboot"), "5");
1575  gc->addSelection(QObject::tr("Show reboot and shutdown"), "6");
1576  gc->setHelpText(QObject::tr("By default, only remote frontends are shown "
1577  "the shutdown option on the exit menu. Here you can force "
1578  "specific shutdown and reboot options to be displayed."));
1579  return gc;
1580 }
1581 
1583 {
1584  HostLineEdit *ge = new HostLineEdit("RebootCommand");
1585  ge->setLabel(QObject::tr("Reboot command"));
1586  ge->setValue("");
1587  ge->setHelpText(QObject::tr("Optional. Script to run if you select "
1588  "the reboot option from the exit menu, if the option "
1589  "is displayed. You must configure an exit key to "
1590  "display the exit menu."));
1591  return ge;
1592 }
1593 
1595 {
1596  HostLineEdit *ge = new HostLineEdit("HaltCommand");
1597  ge->setLabel(QObject::tr("Halt command"));
1598  ge->setValue("");
1599  ge->setHelpText(QObject::tr("Optional. Script to run if you select "
1600  "the shutdown option from the exit menu, if the option "
1601  "is displayed. You must configure an exit key to "
1602  "display the exit menu."));
1603  return ge;
1604 }
1605 
1607 {
1608  HostLineEdit *ge = new HostLineEdit("LircSocket");
1609  ge->setLabel(QObject::tr("LIRC daemon socket"));
1610 
1611  /* lircd socket moved from /dev/ to /var/run/lirc/ in lirc 0.8.6 */
1612  QString lirc_socket = "/dev/lircd";
1613  if (!QFile::exists(lirc_socket))
1614  lirc_socket = "/var/run/lirc/lircd";
1615  ge->setValue(lirc_socket);
1616  QString help = QObject::tr(
1617  "UNIX socket or IP address[:port] to connect in "
1618  "order to communicate with the LIRC Daemon.");
1619  ge->setHelpText(help);
1620  return ge;
1621 }
1622 
1624 {
1625  HostLineEdit *ge = new HostLineEdit("ScreenShotPath");
1626  ge->setLabel(QObject::tr("Screen shot path"));
1627  ge->setValue("/tmp/");
1628  ge->setHelpText(QObject::tr("Path to screenshot storage location. Should be writable by the frontend"));
1629  return ge;
1630 }
1631 
1633 {
1634  HostLineEdit *ge = new HostLineEdit("SetupPinCode");
1635  ge->setLabel(QObject::tr("Setup PIN code"));
1636  ge->setHelpText(QObject::tr("This PIN is used to control access to the "
1637  "setup menus. If you want to use this feature, then "
1638  "setting the value to all numbers will make your life "
1639  "much easier. Set it to blank to disable."
1640  "If enabled, you will not be able to return "
1641  "to this screen and reset the Setup PIN without first "
1642  "entering the current PIN."));
1643  return ge;
1644 }
1645 
1647 {
1648  HostComboBox *gc = new HostComboBox("XineramaScreen", false);
1650  for (int i=0; i<num; ++i)
1651  gc->addSelection(QString::number(i), QString::number(i));
1652  gc->addSelection(QObject::tr("All"), QString::number(-1));
1653  gc->setLabel(QObject::tr("Display on screen"));
1654  gc->setValue(0);
1655  gc->setHelpText(QObject::tr("Run on the specified screen or "
1656  "spanning all screens."));
1657  return gc;
1658 }
1659 
1660 
1662 {
1663  HostComboBox *gc = new HostComboBox("XineramaMonitorAspectRatio");
1664  gc->setLabel(QObject::tr("Monitor aspect ratio"));
1665  gc->addSelection(QObject::tr("4:3"), "1.3333");
1666  gc->addSelection(QObject::tr("16:9"), "1.7777");
1667  gc->addSelection(QObject::tr("16:10"), "1.6");
1668  gc->setHelpText(QObject::tr(
1669  "The aspect ratio of a Xinerama display cannot be "
1670  "queried from the display, so it must be specified."));
1671  return gc;
1672 }
1673 
1675 {
1676  HostComboBox *gc = new HostComboBox("LetterboxColour");
1677  gc->setLabel(QObject::tr("Letterboxing color"));
1678  for (int m = kLetterBoxColour_Black; m < kLetterBoxColour_END; ++m)
1679  gc->addSelection(toString((LetterBoxColour)m), QString::number(m));
1680  gc->setHelpText(
1681  QObject::tr(
1682  "By default MythTV uses black letterboxing to match broadcaster "
1683  "letterboxing, but those with plasma screens may prefer gray "
1684  "to minimize burn-in.") + " " +
1685  QObject::tr("Currently only works with XVideo video renderer."));
1686  return gc;
1687 }
1688 
1690 {
1691  HostComboBox *gc = new HostComboBox("AspectOverride");
1692  gc->setLabel(QObject::tr("Video aspect override"));
1693  for (int m = kAspect_Off; m < kAspect_END; ++m)
1694  gc->addSelection(toString((AspectOverrideMode)m), QString::number(m));
1695  gc->setHelpText(QObject::tr(
1696  "When enabled, these will override the aspect "
1697  "ratio specified by any broadcaster for all "
1698  "video streams."));
1699  return gc;
1700 }
1701 
1703 {
1704  HostComboBox *gc = new HostComboBox("AdjustFill");
1705  gc->setLabel(QObject::tr("Zoom"));
1706  for (int m = kAdjustFill_Off; m < kAdjustFill_END; ++m)
1707  gc->addSelection(toString((AdjustFillMode)m), QString::number(m));
1709  QString::number(kAdjustFill_AutoDetect_DefaultOff));
1711  QString::number(kAdjustFill_AutoDetect_DefaultHalf));
1712  gc->setHelpText(QObject::tr(
1713  "When enabled, these will apply a predefined "
1714  "zoom to all video playback in MythTV."));
1715  return gc;
1716 }
1717 
1718 // Theme settings
1719 
1721 {
1722  HostSpinBox *gs = new HostSpinBox("GuiWidth", 0, 1920, 8, true);
1723  gs->setLabel(QObject::tr("GUI width (pixels)"));
1724  gs->setValue(0);
1725  gs->setHelpText(QObject::tr("The width of the GUI. Do not make the GUI "
1726  "wider than your actual screen resolution. Set to 0 to "
1727  "automatically scale to fullscreen."));
1728  return gs;
1729 }
1730 
1732 {
1733  HostSpinBox *gs = new HostSpinBox("GuiHeight", 0, 1600, 8, true);
1734  gs->setLabel(QObject::tr("GUI height (pixels)"));
1735  gs->setValue(0);
1736  gs->setHelpText(QObject::tr("The height of the GUI. Do not make the GUI "
1737  "taller than your actual screen resolution. Set to 0 to "
1738  "automatically scale to fullscreen."));
1739  return gs;
1740 }
1741 
1743 {
1744  HostSpinBox *gs = new HostSpinBox("GuiOffsetX", -3840, 3840, 32, true);
1745  gs->setLabel(QObject::tr("GUI X offset"));
1746  gs->setValue(0);
1747  gs->setHelpText(QObject::tr("The horizontal offset where the GUI will be "
1748  "displayed. May only work if run in a window."));
1749  return gs;
1750 }
1751 
1753 {
1754  HostSpinBox *gs = new HostSpinBox("GuiOffsetY", -1600, 1600, 8, true);
1755  gs->setLabel(QObject::tr("GUI Y offset"));
1756  gs->setValue(0);
1757  gs->setHelpText(QObject::tr("The vertical offset where the GUI will be "
1758  "displayed."));
1759  return gs;
1760 }
1761 
1762 #if 0
1764 {
1765  HostSpinBox *gs = new HostSpinBox("DisplaySizeWidth", 0, 10000, 1);
1766  gs->setLabel(QObject::tr("Display size - width"));
1767  gs->setValue(0);
1768  gs->setHelpText(QObject::tr("Horizontal size of the monitor or TV. Used "
1769  "to calculate the actual aspect ratio of the display. This "
1770  "will override the DisplaySize from the system."));
1771  return gs;
1772 }
1773 
1775 {
1776  HostSpinBox *gs = new HostSpinBox("DisplaySizeHeight", 0, 10000, 1);
1777  gs->setLabel(QObject::tr("Display size - height"));
1778  gs->setValue(0);
1779  gs->setHelpText(QObject::tr("Vertical size of the monitor or TV. Used "
1780  "to calculate the actual aspect ratio of the display. This "
1781  "will override the DisplaySize from the system."));
1782  return gs;
1783 }
1784 #endif
1785 
1787 {
1788  HostCheckBox *gc = new HostCheckBox("GuiSizeForTV");
1789  gc->setLabel(QObject::tr("Use GUI size for TV playback"));
1790  gc->setValue(true);
1791  gc->setHelpText(QObject::tr("If enabled, use the above size for TV, "
1792  "otherwise use full screen."));
1793  return gc;
1794 }
1795 
1796 #if defined(USING_XRANDR) || CONFIG_DARWIN
1798 {
1799  HostCheckBox *gc = new HostCheckBox("UseVideoModes");
1800  gc->setLabel(QObject::tr("Separate video modes for GUI and TV playback"));
1801  gc->setValue(false);
1802  gc->setHelpText(QObject::tr("Switch X Window video modes for TV. "
1803  "Requires \"xrandr\" support."));
1804  return gc;
1805 }
1806 
1807 static HostSpinBox *VidModeWidth(int idx)
1808 {
1809  HostSpinBox *gs = new HostSpinBox(QString("VidModeWidth%1").arg(idx),
1810  0, 1920, 16, true);
1811  gs->setLabel((idx<1) ? QObject::tr("In X"): "");
1812  gs->setLabelAboveWidget(idx<1);
1813  gs->setValue(0);
1814  gs->setHelpText(QObject::tr("Horizontal resolution of video "
1815  "which needs a special output resolution."));
1816  return gs;
1817 }
1818 
1819 static HostSpinBox *VidModeHeight(int idx)
1820 {
1821  HostSpinBox *gs = new HostSpinBox(QString("VidModeHeight%1").arg(idx),
1822  0, 1080, 16, true);
1823  gs->setLabel((idx<1) ? QObject::tr("In Y"): "");
1824  gs->setLabelAboveWidget(idx<1);
1825  gs->setValue(0);
1826  gs->setHelpText(QObject::tr("Vertical resolution of video "
1827  "which needs a special output resolution."));
1828  return gs;
1829 }
1830 
1832 {
1833  HostComboBox *gc = new HostComboBox("GuiVidModeResolution");
1834  gc->setLabel(QObject::tr("GUI"));
1835  gc->setLabelAboveWidget(true);
1836  gc->setHelpText(QObject::tr("Resolution of screen "
1837  "when not watching a video."));
1838 
1839  const vector<DisplayResScreen> scr = GetVideoModes();
1840  for (uint i=0; i<scr.size(); ++i)
1841  {
1842  int w = scr[i].Width(), h = scr[i].Height();
1843  QString sel = QString("%1x%2").arg(w).arg(h);
1844  gc->addSelection(sel, sel);
1845  }
1846 
1847  // if no resolution setting, set it with a reasonable initial value
1848  if (scr.size() && (gCoreContext->GetSetting("GuiVidModeResolution").isEmpty()))
1849  {
1850  int w = 0, h = 0;
1851  gCoreContext->GetResolutionSetting("GuiVidMode", w, h);
1852  if ((w <= 0) || (h <= 0))
1853  (w = 640), (h = 480);
1854 
1855  DisplayResScreen dscr(w, h, -1, -1, -1.0, 0);
1856  double rate = -1.0;
1857  int i = DisplayResScreen::FindBestMatch(scr, dscr, rate);
1858  gc->setValue((i >= 0) ? i : scr.size()-1);
1859  }
1860 
1861  return gc;
1862 }
1863 
1865 {
1866  QString dhelp = QObject::tr("Default screen resolution "
1867  "when watching a video.");
1868  QString ohelp = QObject::tr("Screen resolution when watching a "
1869  "video at a specific resolution.");
1870 
1871  QString qstr = (idx<0) ? "TVVidModeResolution" :
1872  QString("TVVidModeResolution%1").arg(idx);
1873  HostComboBox *gc = new HostComboBox(qstr);
1874  QString lstr = (idx<0) ? QObject::tr("Video output") :
1875  ((idx<1) ? QObject::tr("Output") : "");
1876  QString hstr = (idx<0) ? dhelp : ohelp;
1877 
1878  gc->setLabel(lstr);
1879  gc->setLabelAboveWidget(idx<1);
1880  gc->setHelpText(hstr);
1881 
1882  const vector<DisplayResScreen> scr = GetVideoModes();
1883  for (uint i=0; i<scr.size(); ++i)
1884  {
1885  QString sel = QString("%1x%2").arg(scr[i].Width()).arg(scr[i].Height());
1886  gc->addSelection(sel, sel);
1887  }
1888  return gc;
1889 }
1890 
1892 {
1893  QString dhelp = QObject::tr("Default refresh rate "
1894  "when watching a video. "
1895  "Leave at \"Auto\" to automatically use the best available");
1896  QString ohelp = QObject::tr("Refresh rate when watching a "
1897  "video at a specific resolution. "
1898  "Leave at \"Auto\" to automatically use the best available");
1899  QString qstr = (idx<0) ? "TVVidModeRefreshRate" :
1900  QString("TVVidModeRefreshRate%1").arg(idx);
1902  QString lstr = (idx<1) ? QObject::tr("Rate") : "";
1903  QString hstr = (idx<0) ? dhelp : ohelp;
1904 
1905  gc->setLabel(lstr);
1906  gc->setLabelAboveWidget(idx<1);
1907  gc->setHelpText(hstr);
1908  gc->setEnabled(false);
1909  return gc;
1910 }
1911 
1913 {
1914  QString dhelp = QObject::tr("Aspect ratio when watching a video.");
1915  QString ohelp = QObject::tr("Aspect ratio when watching a "
1916  "video at a specific resolution.");
1917 
1918  QString qstr = (idx<0) ? "TVVidModeForceAspect" :
1919  QString("TVVidModeForceAspect%1").arg(idx);
1920  HostComboBox *gc = new HostComboBox(qstr);
1921  gc->setLabel( (idx<1) ? QObject::tr("Aspect") : "" );
1922  gc->setLabelAboveWidget(idx<1);
1923 
1924  QString hstr = (idx<0) ? dhelp : ohelp;
1925  gc->setHelpText(hstr+" "+
1926  QObject::tr("Leave at \"Default\" to use ratio reported by "
1927  "the monitor. Set to 16:9 or 4:3 to "
1928  "force a specific aspect ratio."));
1929  gc->addSelection(QObject::tr("Default"), "0.0");
1930  gc->addSelection("16:9", "1.77777777777");
1931  gc->addSelection("4:3", "1.33333333333");
1932  return gc;
1933 }
1934 
1936 {
1937  public:
1940  {
1941  setLabel(QObject::tr("Video Mode Settings"));
1942  setUseLabel(false);
1943 
1945  addChild(videomode);
1946  setTrigger(videomode);
1947 
1949  new HorizontalConfigurationGroup(false, false);
1950 
1953  defaultsettings->addChild(GuiVidModeResolution());
1954  defaultsettings->addChild(res);
1955  defaultsettings->addChild(rate);
1956  defaultsettings->addChild(TVVidModeForceAspect());
1957  connect(res, SIGNAL(valueChanged(const QString&)),
1958  rate, SLOT(ChangeResolution(const QString&)));
1959 
1960  ConfigurationGroup* overrides =
1961  new GridConfigurationGroup(5, true, true, false, true);
1962  overrides->setLabel(QObject::tr("Overrides for specific video sizes"));
1963 
1964  for (int idx = 0; idx < 3; ++idx)
1965  {
1966  //input side
1967  overrides->addChild(VidModeWidth(idx));
1968  overrides->addChild(VidModeHeight(idx));
1969  // output side
1970  overrides->addChild(res = TVVidModeResolution(idx));
1971  overrides->addChild(rate = TVVidModeRefreshRate(idx));
1972  overrides->addChild(TVVidModeForceAspect(idx));
1973  connect(res, SIGNAL(valueChanged(const QString&)),
1974  rate, SLOT(ChangeResolution(const QString&)));
1975  }
1976 
1977  ConfigurationGroup* settings = new VerticalConfigurationGroup(false);
1978  settings->addChild(defaultsettings);
1979  settings->addChild(overrides);
1980 
1981  addTarget("1", settings);
1982  addTarget("0", new VerticalConfigurationGroup(true));
1983  }
1984 };
1985 #endif
1986 
1988 {
1989  HostCheckBox *gc = new HostCheckBox("HideMouseCursor");
1990  gc->setLabel(QObject::tr("Hide mouse cursor in MythTV"));
1991  gc->setValue(false);
1992  gc->setHelpText(QObject::tr("Toggles mouse cursor visibility for touchscreens. "
1993  "By default MythTV will auto-hide the cursor if the mouse doesn't "
1994  "move for a period, this setting disables the cursor entirely."));
1995  return gc;
1996 };
1997 
1998 
2000 {
2001  HostCheckBox *gc = new HostCheckBox("RunFrontendInWindow");
2002  gc->setLabel(QObject::tr("Use window border"));
2003  gc->setValue(false);
2004  gc->setHelpText(QObject::tr("Toggles between windowed and "
2005  "borderless operation."));
2006  return gc;
2007 }
2008 
2010 {
2011 {
2012  HostCheckBox *gc = new HostCheckBox("UseFixedWindowSize");
2013  gc->setLabel(QObject::tr("Use fixed window size"));
2014  gc->setValue(true);
2015  gc->setHelpText(QObject::tr(
2016  "If disabled, the video playback "
2017  "window can be resized"));
2018  return gc;
2019 }
2020 }
2021 
2023 {
2024  HostComboBox *gc = new HostComboBox("DateFormat");
2025  gc->setLabel(QObject::tr("Date format"));
2026 
2027  QDate sampdate = MythDate::current().toLocalTime().date();
2028  QString sampleStr =
2029  QObject::tr("Samples are shown using today's date.");
2030 
2031  if (sampdate.month() == sampdate.day())
2032  {
2033  sampdate = sampdate.addDays(1);
2034  sampleStr =
2035  QObject::tr("Samples are shown using tomorrow's date.");
2036  }
2037 
2038  QLocale locale = gCoreContext->GetQLocale();
2039 
2040  gc->addSelection(locale.toString(sampdate, "ddd MMM d"), "ddd MMM d");
2041  gc->addSelection(locale.toString(sampdate, "ddd d MMM"), "ddd d MMM");
2042  gc->addSelection(locale.toString(sampdate, "ddd MMMM d"), "ddd MMMM d");
2043  gc->addSelection(locale.toString(sampdate, "ddd d MMMM"), "ddd d MMMM");
2044  gc->addSelection(locale.toString(sampdate, "dddd MMM d"), "dddd MMM d");
2045  gc->addSelection(locale.toString(sampdate, "dddd d MMM"), "dddd d MMM");
2046  gc->addSelection(locale.toString(sampdate, "MMM d"), "MMM d");
2047  gc->addSelection(locale.toString(sampdate, "d MMM"), "d MMM");
2048  gc->addSelection(locale.toString(sampdate, "MM/dd"), "MM/dd");
2049  gc->addSelection(locale.toString(sampdate, "dd/MM"), "dd/MM");
2050  gc->addSelection(locale.toString(sampdate, "MM.dd"), "MM.dd");
2051  gc->addSelection(locale.toString(sampdate, "dd.MM"), "dd.MM");
2052  gc->addSelection(locale.toString(sampdate, "M/d/yyyy"), "M/d/yyyy");
2053  gc->addSelection(locale.toString(sampdate, "d/M/yyyy"), "d/M/yyyy");
2054  gc->addSelection(locale.toString(sampdate, "MM.dd.yyyy"), "MM.dd.yyyy");
2055  gc->addSelection(locale.toString(sampdate, "dd.MM.yyyy"), "dd.MM.yyyy");
2056  gc->addSelection(locale.toString(sampdate, "yyyy-MM-dd"), "yyyy-MM-dd");
2057  gc->addSelection(locale.toString(sampdate, "ddd MMM d yyyy"), "ddd MMM d yyyy");
2058  gc->addSelection(locale.toString(sampdate, "ddd d MMM yyyy"), "ddd d MMM yyyy");
2059  gc->addSelection(locale.toString(sampdate, "ddd yyyy-MM-dd"), "ddd yyyy-MM-dd");
2060  QString jp_long = QString("dddd yyyy") + QChar(0x5E74) +
2061  "M" + QChar(0x6708) + "d"+ QChar(0x65E5); // dddd yyyyå¹´M月dæ—¥
2062  gc->addSelection(locale.toString(sampdate, jp_long), jp_long);
2063  QString jp_med = QString("dddd ") +
2064  "M" + QChar(0x6708) + "d"+ QChar(0x65E5); // dddd M月dæ—¥
2065  gc->addSelection(locale.toString(sampdate, jp_med), jp_med);
2066  gc->setHelpText(QObject::tr("Your preferred date format.") + ' ' +
2067  sampleStr);
2068  return gc;
2069 }
2070 
2072 {
2073  HostComboBox *gc = new HostComboBox("ShortDateFormat");
2074  gc->setLabel(QObject::tr("Short date format"));
2075 
2076  QDate sampdate = MythDate::current().toLocalTime().date();
2077  QString sampleStr =
2078  QObject::tr("Samples are shown using today's date.");
2079 
2080  if (sampdate.month() == sampdate.day())
2081  {
2082  sampdate = sampdate.addDays(1);
2083  sampleStr =
2084  QObject::tr("Samples are shown using tomorrow's date.");
2085  }
2086  QLocale locale = gCoreContext->GetQLocale();
2087 
2088  gc->addSelection(locale.toString(sampdate, "M/d"), "M/d");
2089  gc->addSelection(locale.toString(sampdate, "d/M"), "d/M");
2090  gc->addSelection(locale.toString(sampdate, "MM/dd"), "MM/dd");
2091  gc->addSelection(locale.toString(sampdate, "dd/MM"), "dd/MM");
2092  gc->addSelection(locale.toString(sampdate, "MM.dd"), "MM.dd");
2093  gc->addSelection(locale.toString(sampdate, "dd.MM."), "dd.MM.");
2094  gc->addSelection(locale.toString(sampdate, "M.d."), "M.d.");
2095  gc->addSelection(locale.toString(sampdate, "d.M."), "d.M.");
2096  gc->addSelection(locale.toString(sampdate, "MM-dd"), "MM-dd");
2097  gc->addSelection(locale.toString(sampdate, "dd-MM"), "dd-MM");
2098  gc->addSelection(locale.toString(sampdate, "MMM d"), "MMM d");
2099  gc->addSelection(locale.toString(sampdate, "d MMM"), "d MMM");
2100  gc->addSelection(locale.toString(sampdate, "ddd d"), "ddd d");
2101  gc->addSelection(locale.toString(sampdate, "d ddd"), "d ddd");
2102  gc->addSelection(locale.toString(sampdate, "ddd M/d"), "ddd M/d");
2103  gc->addSelection(locale.toString(sampdate, "ddd d/M"), "ddd d/M");
2104  gc->addSelection(locale.toString(sampdate, "M/d ddd"), "M/d ddd");
2105  gc->addSelection(locale.toString(sampdate, "d/M ddd"), "d/M ddd");
2106  QString jp = QString("M") + QChar(0x6708) + "d" + QChar(0x65E5); // M月dæ—¥
2107  gc->addSelection(locale.toString(sampdate, jp), jp);
2108  gc->setHelpText(QObject::tr("Your preferred short date format.") + ' ' +
2109  sampleStr);
2110  return gc;
2111 }
2112 
2114 {
2115  HostComboBox *gc = new HostComboBox("TimeFormat");
2116  gc->setLabel(QObject::tr("Time format"));
2117 
2118  QTime samptime = QTime::currentTime();
2119 
2120  QLocale locale = gCoreContext->GetQLocale();
2121 
2122  gc->addSelection(locale.toString(samptime, "h:mm AP"), "h:mm AP");
2123  gc->addSelection(locale.toString(samptime, "h:mm ap"), "h:mm ap");
2124  gc->addSelection(locale.toString(samptime, "hh:mm AP"), "hh:mm AP");
2125  gc->addSelection(locale.toString(samptime, "hh:mm ap"), "hh:mm ap");
2126  gc->addSelection(locale.toString(samptime, "h:mm"), "h:mm");
2127  gc->addSelection(locale.toString(samptime, "hh:mm"), "hh:mm");
2128  gc->addSelection(locale.toString(samptime, "hh.mm"), "hh.mm");
2129  gc->addSelection(locale.toString(samptime, "AP h:mm"), "AP h:mm");
2130  gc->setHelpText(QObject::tr("Your preferred time format. You must choose "
2131  "a format with \"AM\" or \"PM\" in it, otherwise your "
2132  "time display will be 24-hour or \"military\" time."));
2133  return gc;
2134 }
2135 
2137 {
2138  HostComboBox *gc = new HostComboBox("ThemePainter");
2139  gc->setLabel(QObject::tr("Paint engine"));
2140  gc->addSelection(QObject::tr("Qt"), QT_PAINTER);
2141  gc->addSelection(QObject::tr("Auto"), AUTO_PAINTER);
2142 #ifdef USING_OPENGL
2143  gc->addSelection(QObject::tr("OpenGL"), OPENGL_PAINTER);
2144 #endif
2145 #ifdef USING_MINGW
2146  gc->addSelection(QObject::tr("Direct3D"), D3D9_PAINTER);
2147 #endif
2148  gc->setHelpText(QObject::tr("This selects what MythTV uses to draw. "
2149  "Choosing 'Auto' is recommended, unless running on systems "
2150  "with broken OpenGL implementations (broken hardware or "
2151  "drivers or windowing systems) where only Qt works."));
2152  return gc;
2153 }
2154 
2156 {
2157  HostComboBox *gc = new HostComboBox("ChannelFormat");
2158  gc->setLabel(QObject::tr("Channel format"));
2159  gc->addSelection(QObject::tr("number"), "<num>");
2160  gc->addSelection(QObject::tr("number callsign"), "<num> <sign>");
2161  gc->addSelection(QObject::tr("number name"), "<num> <name>");
2162  gc->addSelection(QObject::tr("callsign"), "<sign>");
2163  gc->addSelection(QObject::tr("name"), "<name>");
2164  gc->setHelpText(QObject::tr("Your preferred channel format."));
2165  gc->setValue(1);
2166  return gc;
2167 }
2168 
2170 {
2171  HostComboBox *gc = new HostComboBox("LongChannelFormat");
2172  gc->setLabel(QObject::tr("Long channel format"));
2173  gc->addSelection(QObject::tr("number"), "<num>");
2174  gc->addSelection(QObject::tr("number callsign"), "<num> <sign>");
2175  gc->addSelection(QObject::tr("number name"), "<num> <name>");
2176  gc->addSelection(QObject::tr("callsign"), "<sign>");
2177  gc->addSelection(QObject::tr("name"), "<name>");
2178  gc->setHelpText(QObject::tr("Your preferred long channel format."));
2179  gc->setValue(2);
2180  return gc;
2181 }
2182 
2184 {
2185  HostCheckBox *gc = new HostCheckBox("ChannelGroupRememberLast");
2186  gc->setLabel(QObject::tr("Remember last channel group"));
2187  gc->setHelpText(QObject::tr("If enabled, the EPG will initially display "
2188  "only the channels from the last channel group selected. Pressing "
2189  "\"4\" will toggle channel group."));
2190  gc->setValue(false);
2191  return gc;
2192 }
2193 
2195 {
2196  HostComboBox *gc = new HostComboBox("ChannelGroupDefault");
2197  gc->setLabel(QObject::tr("Default channel group"));
2198 
2199  ChannelGroupList changrplist;
2200 
2201  changrplist = ChannelGroup::GetChannelGroups();
2202 
2203  gc->addSelection(QObject::tr("All Channels"), "-1");
2204 
2205  ChannelGroupList::iterator it;
2206 
2207  for (it = changrplist.begin(); it < changrplist.end(); ++it)
2208  gc->addSelection(it->name, QString("%1").arg(it->grpid));
2209 
2210  gc->setHelpText(QObject::tr("Default channel group to be shown in the the EPG"
2211  "Pressing GUIDE key will toggle channel group."));
2212  gc->setValue(false);
2213  return gc;
2214 }
2215 
2217 {
2218  HostCheckBox *gc = new HostCheckBox("BrowseChannelGroup");
2219  gc->setLabel(QObject::tr("Browse/change channels from Channel Group"));
2220  gc->setHelpText(QObject::tr("If enabled, Live TV will browse or change "
2221  "channels from the selected channel group. The \"All "
2222  "Channels\" channel group may be selected to browse all "
2223  "channels."));
2224  gc->setValue(false);
2225  return gc;
2226 }
2227 
2228 // Channel Group Settings
2230 {
2231  public:
2233  {
2234  setLabel(QObject::tr("Remember last channel group"));
2235  setUseLabel(false);
2236 
2237  Setting* RememberChanGrpEnabled = ChannelGroupRememberLast();
2238  addChild(RememberChanGrpEnabled);
2239  setTrigger(RememberChanGrpEnabled);
2240 
2241  ConfigurationGroup* settings = new VerticalConfigurationGroup(false,false);
2242  settings->addChild(ChannelGroupDefault());
2243  addTarget("0", settings);
2244 
2245  // show nothing if RememberChanGrpEnabled is on
2246  addTarget("1", new VerticalConfigurationGroup(true,false));
2247  };
2248 };
2249 
2250 // General RecPriorities settings
2251 
2253 {
2254  GlobalComboBox *bc = new GlobalComboBox("SchedOpenEnd");
2255  bc->setLabel(QObject::tr("Avoid back to back recordings"));
2256  bc->setHelpText(QObject::tr("Selects the situations where the scheduler "
2257  "will avoid assigning shows to the same card if their "
2258  "end time and start time match. This will be allowed "
2259  "when necessary in order to resolve conflicts."));
2260  bc->addSelection(QObject::tr("Never"), "0");
2261  bc->addSelection(QObject::tr("Different Channels"), "1");
2262  bc->addSelection(QObject::tr("Always"), "2");
2263  bc->setValue(0);
2264  return bc;
2265 }
2266 
2268 {
2269  GlobalSpinBox *bs = new GlobalSpinBox("PrefInputPriority", 1, 99, 1);
2270  bs->setLabel(QObject::tr("Preferred input priority"));
2271  bs->setHelpText(QObject::tr("Additional priority when a showing "
2272  "matches the preferred input selected in the 'Scheduling "
2273  "Options' section of the recording rule."));
2274  bs->setValue(2);
2275  return bs;
2276 }
2277 
2279 {
2280  GlobalSpinBox *bs = new GlobalSpinBox("HDTVRecPriority", -99, 99, 1);
2281  bs->setLabel(QObject::tr("HDTV recording priority"));
2282  bs->setHelpText(QObject::tr("Additional priority when a showing "
2283  "is marked as an HDTV broadcast in the TV listings."));
2284  bs->setValue(0);
2285  return bs;
2286 }
2287 
2289 {
2290  GlobalSpinBox *bs = new GlobalSpinBox("WSRecPriority", -99, 99, 1);
2291  bs->setLabel(QObject::tr("Widescreen recording priority"));
2292  bs->setHelpText(QObject::tr("Additional priority when a showing "
2293  "is marked as widescreen in the TV listings."));
2294  bs->setValue(0);
2295  return bs;
2296 }
2297 
2299 {
2300  GlobalSpinBox *bs = new GlobalSpinBox("SignLangRecPriority",
2301  -99, 99, 1);
2302  bs->setLabel(QObject::tr("Sign language recording priority"));
2303  bs->setHelpText(QObject::tr("Additional priority when a showing "
2304  "is marked as having in-vision sign language."));
2305  bs->setValue(0);
2306  return bs;
2307 }
2308 
2310 {
2311  GlobalSpinBox *bs = new GlobalSpinBox("OnScrSubRecPriority",
2312  -99, 99, 1);
2313  bs->setLabel(QObject::tr("In-vision Subtitles Recording Priority"));
2314  bs->setHelpText(QObject::tr("Additional priority when a showing "
2315  "is marked as having in-vision subtitles."));
2316  bs->setValue(0);
2317  return bs;
2318 }
2319 
2321 {
2322  GlobalSpinBox *bs = new GlobalSpinBox("CCRecPriority",
2323  -99, 99, 1);
2324  bs->setLabel(QObject::tr("Subtitles/CC recording priority"));
2325  bs->setHelpText(QObject::tr("Additional priority when a showing "
2326  "is marked as having subtitles or closed captioning "
2327  "(CC) available."));
2328  bs->setValue(0);
2329  return bs;
2330 }
2331 
2333 {
2334  GlobalSpinBox *bs = new GlobalSpinBox("HardHearRecPriority",
2335  -99, 99, 1);
2336  bs->setLabel(QObject::tr("Hard of hearing priority"));
2337  bs->setHelpText(QObject::tr("Additional priority when a showing "
2338  "is marked as having support for viewers with impaired "
2339  "hearing."));
2340  bs->setValue(0);
2341  return bs;
2342 }
2343 
2345 {
2346  GlobalSpinBox *bs = new GlobalSpinBox("AudioDescRecPriority",
2347  -99, 99, 1);
2348  bs->setLabel(QObject::tr("Audio described priority"));
2349  bs->setHelpText(QObject::tr("Additional priority when a showing "
2350  "is marked as being Audio Described."));
2351  bs->setValue(0);
2352  return bs;
2353 }
2354 
2356 {
2357  HostLineEdit *ge = new HostLineEdit("DefaultTVChannel");
2358  ge->setLabel(QObject::tr("Guide starts at channel"));
2359  ge->setValue("3");
2360  ge->setHelpText(QObject::tr("The program guide starts on this channel if "
2361  "it is run from outside of Live TV mode."));
2362  return ge;
2363 }
2364 
2366 {
2367  HostSpinBox *gs = new HostSpinBox("SelChangeRecThreshold", 1, 600, 1);
2368  gs->setLabel(QObject::tr("Record threshold"));
2369  gs->setValue(16);
2370  gs->setHelpText(QObject::tr("Pressing SELECT on a show that is at least "
2371  "this many minutes into the future will schedule a "
2372  "recording."));
2373  return gs;
2374 }
2375 
2377 {
2378  HostComboBox *gc = new HostComboBox("Language");
2379  gc->setLabel(QObject::tr("Language"));
2380 
2381  QMap<QString, QString> langMap = MythTranslation::getLanguages();
2382  QStringList langs = langMap.values();
2383  langs.sort();
2384  QString langCode = gCoreContext->GetSetting("Language").toLower();
2385  if (langCode.isEmpty())
2386  langCode = "en_US";
2387  gc->clearSelections();
2388  for (QStringList::Iterator it = langs.begin(); it != langs.end(); ++it)
2389  {
2390  QString label = *it;
2391  QString value = langMap.key(label);
2392  gc->addSelection(label, value, (value.toLower() == langCode));
2393  }
2394 
2395  gc->setHelpText(
2396  QObject::tr("Your preferred language for the user interface."));
2397  return gc;
2398 }
2399 
2401 {
2402  widget->clearSelections();
2403  QString q = QString("ISO639Language%1").arg(i);
2404  QString lang = gCoreContext->GetSetting(q, "").toLower();
2405 
2406  if ((lang.isEmpty() || lang == "aar") &&
2407  !gCoreContext->GetSetting("Language", "").isEmpty())
2408  {
2409  lang = iso639_str2_to_str3(gCoreContext->GetLanguage().toLower());
2410  }
2411 
2412  QMap<int,QString>::iterator it = _iso639_key_to_english_name.begin();
2413  QMap<int,QString>::iterator ite = _iso639_key_to_english_name.end();
2414 
2415  for (; it != ite; ++it)
2416  {
2417  QString desc = (*it);
2418  int idx = desc.indexOf(";");
2419  if (idx > 0)
2420  desc = desc.left(idx);
2421 
2422  const QString il = iso639_key_to_str3(it.key());
2423  widget->addSelection(desc, il, il == lang);
2424  }
2425 }
2426 
2428 {
2429  GlobalComboBox *gc = new GlobalComboBox(QString("ISO639Language%1").arg(i));
2430  gc->setLabel(QObject::tr("Guide language #%1").arg(i+1));
2431  // We should try to get language from "MythLanguage"
2432  // then use code 2 to code 3 map in iso639.h
2433  ISO639_fill_selections(gc, i);
2434  gc->setHelpText(
2435  QObject::tr("Your #%1 preferred language for "
2436  "Program Guide data and captions.").arg(i+1));
2437  return gc;
2438 }
2439 
2441 {
2442  HostCheckBox *gc = new HostCheckBox("NetworkControlEnabled");
2443  gc->setLabel(QObject::tr("Enable Network Remote Control interface"));
2444  gc->setHelpText(QObject::tr("This enables support for controlling "
2445  "mythfrontend over the network."));
2446  gc->setValue(false);
2447  return gc;
2448 }
2449 
2451 {
2452  HostSpinBox *gs = new HostSpinBox("NetworkControlPort", 1025, 65535, 1);
2453  gs->setLabel(QObject::tr("Network Remote Control port"));
2454  gs->setValue(6546);
2455  gs->setHelpText(QObject::tr("This specifies what port the network remote "
2456  "Control interface will listen on for new connections."));
2457  return gs;
2458 }
2459 
2461 {
2462  HostLineEdit *ge = new HostLineEdit("UDPNotifyPort");
2463  ge->setLabel(QObject::tr("UDP notify port"));
2464  ge->setValue("6948");
2465  ge->setHelpText(QObject::tr("MythTV will listen for connections "
2466  "from the \"mythutil\" program on this port."));
2467  return ge;
2468 }
2469 
2470 #ifdef USING_AIRPLAY
2471 // AirPlay Settings
2473 {
2474  HostCheckBox *gc = new HostCheckBox("AirPlayEnabled");
2475  gc->setLabel(QObject::tr("Enable AirPlay"));
2476  gc->setHelpText(QObject::tr("AirPlay lets you wirelessly view content on "
2477  "your TV from your iPhone, iPad, iPod Touch, or "
2478  "iTunes on your computer."));
2479  gc->setValue(true);
2480  return gc;
2481 }
2482 
2484 {
2485  HostCheckBox *gc = new HostCheckBox("AirPlayAudioOnly");
2486  gc->setLabel(QObject::tr("Only support AirTunes (no video)"));
2487  gc->setHelpText(QObject::tr("Only stream audio from your iPhone, iPad, "
2488  "iPod Touch, or iTunes on your computer"));
2489  gc->setValue(false);
2490  return gc;
2491 }
2492 
2494 {
2495  HostCheckBox *gc = new HostCheckBox("AirPlayPasswordEnabled");
2496  gc->setLabel(QObject::tr("Require password"));
2497  gc->setValue(false);
2498  gc->setHelpText(QObject::tr("Require a password to use AirPlay. Your iPhone, "
2499  "iPad, iPod Touch, or iTunes on your computer "
2500  "will prompt you when required"));
2501  return gc;
2502 }
2503 
2505 {
2506  HostLineEdit *ge = new HostLineEdit("AirPlayPassword");
2507  ge->setValue("0000");
2508  ge->setHelpText(QObject::tr("Your iPhone, iPad, iPod Touch, or iTunes on "
2509  "your computer will prompt you for this password "
2510  "when required"));
2511  return ge;
2512 }
2513 
2515 {
2517  new HorizontalConfigurationGroup(false, false, false, false);
2519  hc->addChild(AirPlayPassword());
2520  return hc;
2521 }
2522 
2524 {
2526  ts->setValue(QObject::tr("All AirPlay settings take effect when "
2527  "you restart MythFrontend."));
2528  return ts;
2529 }
2530 
2532 {
2534  if (MythRAOPConnection::LoadKey() == NULL)
2535  {
2536  ts->setValue(QObject::tr("AirTunes RSA key couldn't be loaded. "
2537  "Check http://www.mythtv.org/wiki/AirTunes/AirPlay. "
2538  "Last Error: %1")
2540  }
2541  else
2542  {
2543  ts->setValue(QObject::tr("AirTunes RSA key successfully loaded."));
2544  }
2545  return ts;
2546 }
2547 #endif
2548 
2550 {
2551  HostCheckBox *gc = new HostCheckBox("RealtimePriority");
2552  gc->setLabel(QObject::tr("Enable realtime priority threads"));
2553  gc->setHelpText(QObject::tr("When running mythfrontend with root "
2554  "privileges, some threads can be given enhanced priority. "
2555  "Disable this if mythfrontend freezes during video "
2556  "playback."));
2557  gc->setValue(true);
2558  return gc;
2559 }
2560 
2562 {
2563  HostLineEdit *ge = new HostLineEdit("IgnoreDevices");
2564  ge->setLabel(QObject::tr("Ignore devices"));
2565  ge->setValue("");
2566  ge->setHelpText(QObject::tr("If there are any devices that you do not want "
2567  "to be monitored, list them here with commas "
2568  "in-between. The plugins will ignore them. "
2569  "Requires restart."));
2570  return ge;
2571 }
2572 
2574 {
2575  HostComboBox *gc = new HostComboBox("DisplayGroupTitleSort");
2576  gc->setLabel(QObject::tr("Sort titles"));
2577  gc->addSelection(QObject::tr("Alphabetically"),
2578  QString::number(PlaybackBox::TitleSortAlphabetical));
2579  gc->addSelection(QObject::tr("By recording priority"),
2580  QString::number(PlaybackBox::TitleSortRecPriority));
2581  gc->setHelpText(QObject::tr("Sets the title sorting order when the "
2582  "view is set to Titles only."));
2583  return gc;
2584 }
2585 
2587 {
2588  HostCheckBox *gc = new HostCheckBox("PlaybackWatchList");
2589  gc->setLabel(QObject::tr("Include the 'Watch List' group"));
2590  gc->setValue(true);
2591  gc->setHelpText(QObject::tr("The 'Watch List' is an abbreviated list of "
2592  "recordings sorted to highlight series and "
2593  "shows that need attention in order to "
2594  "keep up to date."));
2595  return gc;
2596 }
2597 
2599 {
2600  HostCheckBox *gc = new HostCheckBox("PlaybackWLStart");
2601  gc->setLabel(QObject::tr("Start from the Watch List view"));
2602  gc->setValue(false);
2603  gc->setHelpText(QObject::tr("If enabled, the 'Watch List' will be the "
2604  "initial view each time you enter the "
2605  "Watch Recordings screen"));
2606  return gc;
2607 }
2608 
2610 {
2611  HostCheckBox *gc = new HostCheckBox("PlaybackWLAutoExpire");
2612  gc->setLabel(QObject::tr("Exclude recordings not set for Auto-Expire"));
2613  gc->setValue(false);
2614  gc->setHelpText(QObject::tr("Set this if you turn off Auto-Expire only "
2615  "for recordings that you've seen and intend "
2616  "to keep. This option will exclude these "
2617  "recordings from the 'Watch List'."));
2618  return gc;
2619 }
2620 
2622 {
2623  HostSpinBox *gs = new HostSpinBox("PlaybackWLMaxAge", 30, 180, 10);
2624  gs->setLabel(QObject::tr("Maximum days counted in the score"));
2625  gs->setValue(60);
2626  gs->setHelpText(QObject::tr("The 'Watch List' scores are based on 1 point "
2627  "equals one day since recording. This option "
2628  "limits the maximum score due to age and "
2629  "affects other weighting factors."));
2630  return gs;
2631 }
2632 
2634 {
2635  HostSpinBox *gs = new HostSpinBox("PlaybackWLBlackOut", 0, 5, 1);
2636  gs->setLabel(QObject::tr("Days to exclude weekly episodes after delete"));
2637  gs->setValue(2);
2638  gs->setHelpText(QObject::tr("When an episode is deleted or marked as "
2639  "watched, other episodes of the series are "
2640  "excluded from the 'Watch List' for this "
2641  "interval of time. Daily shows also have a "
2642  "smaller interval based on this setting."));
2643  return gs;
2644 }
2645 
2647 {
2648  public:
2651  {
2652 
2653  Setting* watchList = PlaybackWatchList();
2654  addChild(watchList);
2655  setTrigger(watchList);
2656 
2657  ConfigurationGroup* settings = new VerticalConfigurationGroup(false);
2658  settings->addChild(PlaybackWLStart());
2659  settings->addChild(PlaybackWLAutoExpire());
2660  settings->addChild(PlaybackWLMaxAge());
2661  settings->addChild(PlaybackWLBlackOut());
2662  addTarget("1", settings);
2663 
2664  addTarget("0", new VerticalConfigurationGroup(true));
2665  };
2666 };
2667 
2669 {
2670  HostCheckBox *gc = new HostCheckBox("LCDShowTime");
2671  gc->setLabel(QObject::tr("Display time"));
2672  gc->setHelpText(QObject::tr("Display current time on idle LCD display. "));
2673  gc->setValue(true);
2674  return gc;
2675 }
2676 
2678 {
2679  HostCheckBox *gc = new HostCheckBox("LCDShowRecStatus");
2680  gc->setLabel(QObject::tr("Display recording status"));
2681  gc->setHelpText(QObject::tr("Display current recordings information on "
2682  "LCD display."));
2683  gc->setValue(false);
2684  return gc;
2685 }
2686 
2688 {
2689  HostCheckBox *gc = new HostCheckBox("LCDShowMenu");
2690  gc->setLabel(QObject::tr("Display menus"));
2691  gc->setHelpText(QObject::tr("Display selected menu on LCD display. "));
2692  gc->setValue(true);
2693  return gc;
2694 }
2695 
2697 {
2698  HostSpinBox *gs = new HostSpinBox("LCDPopupTime", 1, 300, 1, true);
2699  gs->setLabel(QObject::tr("Menu pop-up time"));
2700  gs->setHelpText(QObject::tr("How many seconds the menu will "
2701  "remain visible after navigation."));
2702  gs->setValue(5);
2703  return gs;
2704 }
2705 
2707 {
2708  HostCheckBox *gc = new HostCheckBox("LCDShowMusic");
2709  gc->setLabel(QObject::tr("Display music artist and title"));
2710  gc->setHelpText(QObject::tr("Display playing artist and song title in "
2711  "MythMusic on LCD display."));
2712  gc->setValue(true);
2713  return gc;
2714 }
2715 
2717 {
2718  HostComboBox *gc = new HostComboBox("LCDShowMusicItems");
2719  gc->setLabel(QObject::tr("Items"));
2720  gc->addSelection(QObject::tr("Artist - Title"), "ArtistTitle");
2721  gc->addSelection(QObject::tr("Artist [Album] Title"), "ArtistAlbumTitle");
2722  gc->setHelpText(QObject::tr("Which items to show when playing music."));
2723  return gc;
2724 }
2725 
2727 {
2728  HostCheckBox *gc = new HostCheckBox("LCDShowChannel");
2729  gc->setLabel(QObject::tr("Display channel information"));
2730  gc->setHelpText(QObject::tr("Display tuned channel information on LCD display."));
2731  gc->setValue(true);
2732  return gc;
2733 }
2734 
2736 {
2737  HostCheckBox *gc = new HostCheckBox("LCDShowVolume");
2738  gc->setLabel(QObject::tr("Display volume information"));
2739  gc->setHelpText(QObject::tr("Display volume level information "
2740  "on LCD display."));
2741  gc->setValue(true);
2742  return gc;
2743 }
2744 
2746 {
2747  HostCheckBox *gc = new HostCheckBox("LCDShowGeneric");
2748  gc->setLabel(QObject::tr("Display generic information"));
2749  gc->setHelpText(QObject::tr("Display generic information on LCD display."));
2750  gc->setValue(true);
2751  return gc;
2752 }
2753 
2755 {
2756  HostCheckBox *gc = new HostCheckBox("LCDBacklightOn");
2757  gc->setLabel(QObject::tr("Backlight always on"));
2758  gc->setHelpText(QObject::tr("Turn on the backlight permanently "
2759  "on the LCD display."));
2760  gc->setValue(true);
2761  return gc;
2762 }
2763 
2765 {
2766  HostCheckBox *gc = new HostCheckBox("LCDHeartBeatOn");
2767  gc->setLabel(QObject::tr("Heartbeat always on"));
2768  gc->setHelpText(QObject::tr("Turn on the LCD heartbeat."));
2769  gc->setValue(false);
2770  return gc;
2771 }
2772 
2774 {
2775  HostCheckBox *gc = new HostCheckBox("LCDBigClock");
2776  gc->setLabel(QObject::tr("Display large clock"));
2777  gc->setHelpText(QObject::tr("On multiline displays try and display the time as large as possible."));
2778  gc->setValue(false);
2779  return gc;
2780 }
2781 
2783 {
2784  HostLineEdit *ge = new HostLineEdit("LCDKeyString");
2785  ge->setLabel(QObject::tr("LCD key order"));
2786  ge->setValue("ABCDEF");
2787  ge->setHelpText(QObject::tr("Enter the 6 Keypad Return Codes for your "
2788  "LCD keypad in the order in which you want the functions "
2789  "up/down/left/right/yes/no to operate. "
2790  "(See lcdproc/server/drivers/hd44780.c/keyMapMatrix[] "
2791  "or the matrix for your display)"));
2792  return ge;
2793 }
2794 
2796 {
2797  HostCheckBox *gc = new HostCheckBox("LCDEnable");
2798  gc->setLabel(QObject::tr("Enable LCD device"));
2799  gc->setHelpText(QObject::tr("Use an LCD display to view MythTV status "
2800  "information."));
2801  gc->setValue(false);
2802  return gc;
2803 }
2804 
2806 {
2807  public:
2809  false, false, false, false)
2810  {
2811  setLabel(QObject::tr("LCD device display"));
2812  setUseLabel(false);
2813 
2814  Setting* lcd_enable = LCDEnable();
2815  addChild(lcd_enable);
2816  setTrigger(lcd_enable);
2817 
2818  ConfigurationGroup *settings =
2819  new VerticalConfigurationGroup(false, true, false, false);
2820  ConfigurationGroup *setHoriz =
2821  new HorizontalConfigurationGroup(false, false, false, false);
2822 
2823  ConfigurationGroup* setLeft =
2824  new VerticalConfigurationGroup(false, false, false, false);
2825  ConfigurationGroup* setRight =
2826  new VerticalConfigurationGroup(false, false, false, false);
2827 
2828  setLeft->addChild(LCDShowTime());
2829  setLeft->addChild(LCDShowMenu());
2830  setLeft->addChild(LCDShowMusic());
2831  setLeft->addChild(LCDShowMusicItems());
2832  setLeft->addChild(LCDShowChannel());
2833  setLeft->addChild(LCDShowRecStatus());
2834  setRight->addChild(LCDShowVolume());
2835  setRight->addChild(LCDShowGeneric());
2836  setRight->addChild(LCDBacklightOn());
2837  setRight->addChild(LCDHeartBeatOn());
2838  setRight->addChild(LCDBigClock());
2839  setRight->addChild(LCDKeyString());
2840  setHoriz->addChild(setLeft);
2841  setHoriz->addChild(setRight);
2842  settings->addChild(setHoriz);
2843  settings->addChild(LCDPopupTime());
2844 
2845  addTarget("1", settings);
2846 
2847  addTarget("0", new VerticalConfigurationGroup(true));
2848  };
2849 };
2850 
2851 
2852 #if CONFIG_DARWIN
2854 {
2855  HostCheckBox *gc = new HostCheckBox("MacGammaCorrect");
2856  gc->setLabel(QObject::tr("Enable gamma correction for video"));
2857  gc->setValue(false);
2858  gc->setHelpText(QObject::tr("If enabled, QuickTime will correct the gamma "
2859  "of the video to match your monitor. Turning this off can "
2860  "save some CPU cycles."));
2861  return gc;
2862 }
2863 
2865 {
2866  HostCheckBox *gc = new HostCheckBox("MacScaleUp");
2867  gc->setLabel(QObject::tr("Scale video as necessary"));
2868  gc->setValue(true);
2869  gc->setHelpText(QObject::tr("If enabled, video will be scaled to fit your "
2870  "window or screen. If unchecked, video will never be made "
2871  "larger than its actual pixel size."));
2872  return gc;
2873 }
2874 
2876 {
2877  HostSpinBox *gs = new HostSpinBox("MacFullSkip", 0, 30, 1, true);
2878  gs->setLabel(QObject::tr("Frames to skip in fullscreen mode"));
2879  gs->setValue(0);
2880  gs->setHelpText(QObject::tr("Video displayed in fullscreen or non-windowed "
2881  "mode will skip this many frames for each frame drawn. "
2882  "Set to 0 to show every frame. Only valid when either "
2883  "\"Use GUI size for TV playback\" or \"Run the frontend "
2884  "in a window\" is not checked."));
2885  return gs;
2886 }
2887 
2889 {
2890  HostCheckBox *gc = new HostCheckBox("MacMainEnabled");
2891  gc->setLabel(QObject::tr("Video in main window"));
2892  gc->setValue(true);
2893  gc->setHelpText(QObject::tr("If enabled, video will be displayed in the "
2894  "main GUI window. Disable this when you only want video "
2895  "on the desktop or in a floating window. Only valid when "
2896  "\"Use GUI size for TV playback\" and \"Run the "
2897  "frontend in a window\" are checked."));
2898  return gc;
2899 }
2900 
2902 {
2903  HostSpinBox *gs = new HostSpinBox("MacMainSkip", 0, 30, 1, true);
2904  gs->setLabel(QObject::tr("Frames to skip"));
2905  gs->setValue(0);
2906  gs->setHelpText(QObject::tr("Video in the main window will skip this many "
2907  "frames for each frame drawn. Set to 0 to show "
2908  "every frame."));
2909  return gs;
2910 }
2911 
2913 {
2914  HostSpinBox *gs = new HostSpinBox("MacMainOpacity", 0, 100, 5, false);
2915  gs->setLabel(QObject::tr("Opacity"));
2916  gs->setValue(100);
2917  gs->setHelpText(QObject::tr("The opacity of the main window. Set to "
2918  "100 for completely opaque, set to 0 for completely "
2919  "transparent."));
2920  return gs;
2921 }
2922 
2924 {
2925  public:
2927  {
2928  setLabel(QObject::tr("Video in main window"));
2929  setUseLabel(false);
2930  Setting *gc = MacMainEnabled();
2931  addChild(gc);
2932  setTrigger(gc);
2933 
2935  new VerticalConfigurationGroup(false, false);
2936  opts->addChild(MacMainSkip());
2937  opts->addChild(MacMainOpacity());
2938 
2939  addTarget("1", opts);
2940  addTarget("0", new VerticalConfigurationGroup(false, false));
2941  }
2942 };
2943 
2945 {
2946  HostCheckBox *gc = new HostCheckBox("MacFloatEnabled");
2947  gc->setLabel(QObject::tr("Video in floating window"));
2948  gc->setValue(false);
2949  gc->setHelpText(QObject::tr("If enabled, video will be displayed in a "
2950  "floating window. Only valid when \"Use GUI size for TV "
2951  "playback\" and \"Run the frontend in a window\" are "
2952  "checked."));
2953  return gc;
2954 }
2955 
2957 {
2958  HostSpinBox *gs = new HostSpinBox("MacFloatSkip", 0, 30, 1, true);
2959  gs->setLabel(QObject::tr("Frames to skip"));
2960  gs->setValue(0);
2961  gs->setHelpText(QObject::tr("Video in the floating window will skip "
2962  "this many frames for each frame drawn. Set to 0 to show "
2963  "every frame."));
2964  return gs;
2965 }
2966 
2968 {
2969  HostSpinBox *gs = new HostSpinBox("MacFloatOpacity", 0, 100, 5, false);
2970  gs->setLabel(QObject::tr("Opacity"));
2971  gs->setValue(100);
2972  gs->setHelpText(QObject::tr("The opacity of the floating window. Set to "
2973  "100 for completely opaque, set to 0 for completely "
2974  "transparent."));
2975  return gs;
2976 }
2977 
2979 {
2980  public:
2982  {
2983  setLabel(QObject::tr("Video in floating window"));
2984  setUseLabel(false);
2985  Setting *gc = MacFloatEnabled();
2986  addChild(gc);
2987  setTrigger(gc);
2988 
2990  new VerticalConfigurationGroup(false, false);
2991  opts->addChild(MacFloatSkip());
2992  opts->addChild(MacFloatOpacity());
2993 
2994  addTarget("1", opts);
2995  addTarget("0", new VerticalConfigurationGroup(false, false));
2996  }
2997 };
2998 
3000 {
3001  HostCheckBox *gc = new HostCheckBox("MacDockEnabled");
3002  gc->setLabel(QObject::tr("Video in the dock"));
3003  gc->setValue(true);
3004  gc->setHelpText(QObject::tr("If enabled, video will be displayed in the "
3005  "application's dock icon. Only valid when \"Use GUI size "
3006  "for TV playback\" and \"Run the frontend in a window\" "
3007  "are checked."));
3008  return gc;
3009 }
3010 
3012 {
3013  HostSpinBox *gs = new HostSpinBox("MacDockSkip", 0, 30, 1, true);
3014  gs->setLabel(QObject::tr("Frames to skip"));
3015  gs->setValue(3);
3016  gs->setHelpText(QObject::tr("Video in the dock icon will skip this many "
3017  "frames for each frame drawn. Set to 0 to show "
3018  "every frame."));
3019  return gs;
3020 }
3021 
3023 {
3024  public:
3026  {
3027  setLabel(QObject::tr("Video in the dock"));
3028  setUseLabel(false);
3029  Setting *gc = MacDockEnabled();
3030  addChild(gc);
3031  setTrigger(gc);
3032 
3033  Setting *skip = MacDockSkip();
3034  addTarget("1", skip);
3035  addTarget("0", new HorizontalConfigurationGroup(false, false));
3036  }
3037 };
3038 
3040 {
3041  HostCheckBox *gc = new HostCheckBox("MacDesktopEnabled");
3042  gc->setLabel(QObject::tr("Video on the desktop"));
3043  gc->setValue(false);
3044  gc->setHelpText(QObject::tr("If enabled, video will be displayed on the "
3045  "desktop, behind the Finder icons. Only valid when \"Use "
3046  "GUI size for TV playback\" and \"Run the frontend in a "
3047  "window\" are checked."));
3048  return gc;
3049 }
3050 
3052 {
3053  HostSpinBox *gs = new HostSpinBox("MacDesktopSkip", 0, 30, 1, true);
3054  gs->setLabel(QObject::tr("Frames to skip"));
3055  gs->setValue(0);
3056  gs->setHelpText(QObject::tr("Video on the desktop will skip this many "
3057  "frames for each frame drawn. Set to 0 to show "
3058  "every frame."));
3059  return gs;
3060 }
3061 
3063 {
3064  public:
3066  {
3067  setLabel(QObject::tr("Video on the desktop"));
3068  setUseLabel(false);
3069  Setting *gc = MacDesktopEnabled();
3070  addChild(gc);
3071  setTrigger(gc);
3072 
3073  Setting *skip = MacDesktopSkip();
3074  addTarget("1", skip);
3075  addTarget("0", new HorizontalConfigurationGroup(false, false));
3076  }
3077 };
3078 #endif
3079 
3081 {
3082  HostCheckBox *gc = new HostCheckBox("WatchTVGuide");
3083  gc->setLabel(QObject::tr("Show the program guide when starting Live TV"));
3084  gc->setHelpText(QObject::tr("This starts the program guide immediately "
3085  "upon starting to watch Live TV."));
3086  gc->setValue(false);
3087  return gc;
3088 }
3089 
3091 {
3093 
3095  new VerticalConfigurationGroup(false, true, false, false);
3096  pin->setLabel(QObject::tr("Settings Access"));
3097  pin->addChild(SetupPinCode());
3098  addChild(pin);
3099 
3100  VerticalConfigurationGroup *general =
3101  new VerticalConfigurationGroup(false, true, false, false);
3102  general->setLabel(QObject::tr("General"));
3103  general->addChild(UseVirtualKeyboard());
3104  general->addChild(ScreenShotPath());
3105  addChild(general);
3106 
3108  new VerticalConfigurationGroup(false, true, false, false);
3109  media->setLabel(QObject::tr("Media Monitor"));
3110  media->addChild(IgnoreMedia());
3111  addChild(media);
3112 
3113  VerticalConfigurationGroup *remotecontrol =
3114  new VerticalConfigurationGroup(false, true, false, false);
3115  remotecontrol->setLabel(QObject::tr("Remote Control"));
3116  remotecontrol->addChild(LircDaemonDevice());
3117  remotecontrol->addChild(NetworkControlEnabled());
3118  remotecontrol->addChild(NetworkControlPort());
3119  remotecontrol->addChild(UDPNotifyPort());
3120  addChild(remotecontrol);
3121 
3122 #ifdef USING_AIRPLAY
3123  VerticalConfigurationGroup *airplay =
3124  new VerticalConfigurationGroup(false, true, false, false);
3125  airplay->setLabel(QObject::tr("AirPlay Settings"));
3126  airplay->addChild(AirPlayEnabled());
3127  airplay->addChild(AirPlayAudioOnly());
3128  airplay->addChild(AirPlayPasswordSettings());
3129  airplay->addChild(AirPlayInfo());
3130  airplay->addChild(AirPlayRSAInfo());
3131  addChild(airplay);
3132 #endif
3133 
3134  VerticalConfigurationGroup *shutdownSettings =
3135  new VerticalConfigurationGroup(true, true, false, false);
3136  shutdownSettings->setLabel(QObject::tr("Shutdown/Reboot Settings"));
3137  shutdownSettings->addChild(FrontendIdleTimeout());
3138  shutdownSettings->addChild(OverrideExitMenu());
3139  shutdownSettings->addChild(HaltCommand());
3140  shutdownSettings->addChild(RebootCommand());
3141  addChild(shutdownSettings);
3142 }
3143 
3145 {
3146  uint i = 0, total = 8;
3147 #if CONFIG_DARWIN
3148  total += 2;
3149 #endif // USING_DARWIN
3150 
3151 
3152  VerticalConfigurationGroup* general1 =
3153  new VerticalConfigurationGroup(false);
3154  general1->setLabel(QObject::tr("General Playback") +
3155  QString(" (%1/%2)").arg(++i).arg(total));
3156 
3157  HorizontalConfigurationGroup *columns =
3158  new HorizontalConfigurationGroup(false, false, true, true);
3159 
3160  VerticalConfigurationGroup *column1 =
3161  new VerticalConfigurationGroup(false, false, true, true);
3162  column1->addChild(RealtimePriority());
3163  column1->addChild(DecodeExtraAudio());
3164  column1->addChild(JumpToProgramOSD());
3165  columns->addChild(column1);
3166 
3167  VerticalConfigurationGroup *column2 =
3168  new VerticalConfigurationGroup(false, false, true, true);
3169  column2->addChild(ClearSavedPosition());
3170  column2->addChild(AltClearSavedPosition());
3171  column2->addChild(AutomaticSetWatched());
3172  column2->addChild(ContinueEmbeddedTVPlay());
3173  columns->addChild(column2);
3174 
3175  general1->addChild(columns);
3176  general1->addChild(LiveTVIdleTimeout());
3177  addChild(general1);
3178 
3179  VerticalConfigurationGroup* general2 =
3180  new VerticalConfigurationGroup(false);
3181  general2->setLabel(QObject::tr("General Playback") +
3182  QString(" (%1/%2)").arg(++i).arg(total));
3183 
3185  new HorizontalConfigurationGroup(false, false, true, true);
3187  new VerticalConfigurationGroup(false, false, true, true);
3189  new VerticalConfigurationGroup(false, false, true, true);
3190  ocol1->addChild(VertScanPercentage());
3191  ocol1->addChild(YScanDisplacement());
3192  ocol2->addChild(HorizScanPercentage());
3193  ocol2->addChild(XScanDisplacement());
3194  oscan->addChild(ocol1);
3195  oscan->addChild(ocol2);
3196 
3197  HorizontalConfigurationGroup* aspect_fill =
3198  new HorizontalConfigurationGroup(false, false, true, true);
3199  aspect_fill->addChild(AspectOverride());
3200  aspect_fill->addChild(AdjustFill());
3201 
3202  general2->addChild(oscan);
3203  general2->addChild(aspect_fill);
3204  general2->addChild(LetterboxingColour());
3205  general2->addChild(PIPLocationComboBox());
3206  general2->addChild(PlaybackExitPrompt());
3207  general2->addChild(EndOfRecordingExitPrompt());
3208  addChild(general2);
3209 
3210  QString tmp = QString(" (%1/%2)").arg(++i).arg(total);
3211  addChild(new PlaybackProfileConfigs(tmp));
3212 
3214  pbox->setLabel(QObject::tr("View Recordings") +
3215  QString(" (%1/%2)").arg(++i).arg(total));
3216  pbox->addChild(PlayBoxOrdering());
3217  pbox->addChild(PlayBoxEpisodeSort());
3218  // Disabled until we re-enable live previews
3219  // pbox->addChild(PlaybackPreview());
3220  // pbox->addChild(HWAccelPlaybackPreview());
3221  pbox->addChild(PBBStartInTitle());
3222  addChild(pbox);
3223 
3225  pbox2->setLabel(QObject::tr("Recording Groups") +
3226  QString(" (%1/%2)").arg(++i).arg(total));
3227  pbox2->addChild(DisplayRecGroup());
3228  pbox2->addChild(QueryInitialFilter());
3229  pbox2->addChild(RememberRecGroup());
3230  addChild(pbox2);
3231 
3233  pbox3->setLabel(QObject::tr("View Recordings") +
3234  QString(" (%1/%2)").arg(++i).arg(total));
3235  pbox3->addChild(DisplayGroupTitleSort());
3236  pbox3->addChild(new WatchListSettings());
3237  addChild(pbox3);
3238 
3240  seek->setLabel(QObject::tr("Seeking") +
3241  QString(" (%1/%2)").arg(++i).arg(total));
3242  seek->addChild(SmartForward());
3243  seek->addChild(FFRewReposTime());
3244  seek->addChild(FFRewReverse());
3245  addChild(seek);
3246 
3248  comms->setLabel(QObject::tr("Commercial Skip") +
3249  QString(" (%1/%2)").arg(++i).arg(total));
3250  comms->addChild(AutoCommercialSkip());
3251  comms->addChild(CommRewindAmount());
3252  comms->addChild(CommNotifyAmount());
3253  comms->addChild(MaximumCommercialSkip());
3254  comms->addChild(MergeShortCommBreaks());
3255  addChild(comms);
3256 
3257 #if CONFIG_DARWIN
3259  mac1->setLabel(QObject::tr("Mac OS X Video Settings") +
3260  QString(" (%1/%2)").arg(++i).arg(total));
3261  mac1->addChild(MacGammaCorrect());
3262  mac1->addChild(MacScaleUp());
3263  mac1->addChild(MacFullSkip());
3264  addChild(mac1);
3265 
3267  mac2->setLabel(QObject::tr("Mac OS X Video Settings") +
3268  QString(" (%1/%2)").arg(++i).arg(total));
3269  mac2->addChild(new MacMainSettings());
3270  mac2->addChild(new MacFloatSettings());
3271 
3273  new HorizontalConfigurationGroup(false, false, true, true);
3274  row->addChild(new MacDockSettings());
3275  row->addChild(new MacDesktopSettings());
3276  mac2->addChild(row);
3277 
3278  addChild(mac2);
3279 #endif
3280 }
3281 
3283 {
3285  osd->setLabel(QObject::tr("On-screen Display"));
3286 
3287  osd->addChild(EnableMHEG());
3289  osd->addChild(BrowseAllTuners());
3290  osd->addChild(DefaultCCMode());
3291  osd->addChild(SubtitleCodec());
3292  addChild(osd);
3293 
3294  //VerticalConfigurationGroup *cc = new VerticalConfigurationGroup(false);
3295  //cc->setLabel(QObject::tr("Closed Captions"));
3296  //cc->addChild(DecodeVBIFormat());
3297  //addChild(cc);
3298 
3299 #if defined(Q_OS_MACX)
3300  // Any Mac OS-specific OSD stuff would go here.
3301 #endif
3302 }
3303 
3305 {
3307  general->setLabel(QObject::tr("General (Basic)"));
3308  general->addChild(ChannelOrdering());
3309  general->addChild(ChannelFormat());
3310  general->addChild(LongChannelFormat());
3311  addChild(general);
3312 
3314  autoexp->setLabel(QObject::tr("General (Auto-Expire)"));
3315  autoexp->addChild(AutoExpireMethod());
3316 
3317  VerticalConfigurationGroup *expgrp0 =
3318  new VerticalConfigurationGroup(false, false, true, true);
3319  expgrp0->addChild(RerecordWatched());
3320  expgrp0->addChild(AutoExpireWatchedPriority());
3321 
3322  VerticalConfigurationGroup *expgrp1 =
3323  new VerticalConfigurationGroup(false, false, true, true);
3324  expgrp1->addChild(AutoExpireLiveTVMaxAge());
3325  expgrp1->addChild(AutoExpireDayPriority());
3326  expgrp1->addChild(AutoExpireExtraSpace());
3327 
3329  new HorizontalConfigurationGroup(false, false, true, true);
3330  expgrp->addChild(expgrp0);
3331  expgrp->addChild(expgrp1);
3332 
3333  autoexp->addChild(expgrp);
3334 // autoexp->addChild(new DeletedExpireOptions());
3335  autoexp->addChild(DeletedMaxAge());
3336 
3337  addChild(autoexp);
3338 
3340  jobs->setLabel(QObject::tr("General (Jobs)"));
3341  jobs->addChild(CommercialSkipMethod());
3342  jobs->addChild(CommFlagFast());
3343  jobs->addChild(AggressiveCommDetect());
3345 
3346  addChild(jobs);
3347 
3349  general2->setLabel(QObject::tr("General (Advanced)"));
3350  general2->addChild(RecordPreRoll());
3351  general2->addChild(RecordOverTime());
3352  general2->addChild(CategoryOverTimeSettings());
3353  addChild(general2);
3354 
3356  changrp->setLabel(QObject::tr("General (Channel Groups)"));
3357  ChannelGroupSettings *changroupsettings = new ChannelGroupSettings();
3358  changrp->addChild(changroupsettings);
3359  changrp->addChild(BrowseChannelGroup());
3360  addChild(changrp);
3361 }
3362 
3364 {
3366  epg->setLabel(QObject::tr("Program Guide") + " 1/1");
3367  epg->addChild(WatchTVGuide());
3368  epg->addChild(DefaultTVChannel());
3369  epg->addChild(EPGRecThreshold());
3370  addChild(epg);
3371 }
3372 
3374 {
3376  sched->setLabel(QObject::tr("Scheduler Options"));
3377 
3378  sched->addChild(GRSchedOpenEnd());
3379  sched->addChild(GRPrefInputRecPriority());
3380  sched->addChild(GRHDTVRecPriority());
3381  sched->addChild(GRWSRecPriority());
3382  addChild(sched);
3383 
3385  access->setLabel(QObject::tr("Accessibility Options"));
3386 
3387  access->addChild(GRSignLangRecPriority());
3388  access->addChild(GROnScrSubRecPriority());
3389  access->addChild(GRCCRecPriority());
3390  access->addChild(GRHardHearRecPriority());
3391  access->addChild(GRAudioDescRecPriority());
3392  addChild(access);
3393 }
3394 
3396 {
3398  screen->setLabel(QObject::tr("Theme") + " / " + QObject::tr("Screen Settings"));
3399 
3400 #if ! CONFIG_DARWIN
3401  screen->addChild(ThemePainter());
3402 #endif
3403  screen->addChild(MenuTheme());
3404 
3406  {
3407  screen->addChild(XineramaScreen());
3409  }
3410 
3411 // screen->addChild(DisplaySizeHeight());
3412 // screen->addChild(DisplaySizeWidth());
3413 
3414  VerticalConfigurationGroup *column1 =
3415  new VerticalConfigurationGroup(false, false, false, false);
3416 
3417  column1->addChild(GuiWidth());
3418  column1->addChild(GuiHeight());
3419  column1->addChild(GuiOffsetX());
3420  column1->addChild(GuiOffsetY());
3421 
3422  VerticalConfigurationGroup *column2 =
3423  new VerticalConfigurationGroup(false, false, false, false);
3424 
3425  column2->addChild(GuiSizeForTV());
3426  column2->addChild(HideMouseCursor());
3427  column2->addChild(RunInWindow());
3428  column2->addChild(UseFixedWindowSize());
3429 
3430  HorizontalConfigurationGroup *columns =
3431  new HorizontalConfigurationGroup(false, false, false, false);
3432 
3433  columns->addChild(column1);
3434  columns->addChild(column2);
3435 
3436  screen->addChild(columns);
3437 
3438  addChild(screen);
3439 
3440 #if defined(USING_XRANDR) || CONFIG_DARWIN
3441  const vector<DisplayResScreen> scr = GetVideoModes();
3442  if (!scr.empty())
3443  addChild(new VideoModeSettings());
3444 #endif
3446  dates->setLabel(QObject::tr("Localization"));
3447  dates->addChild(MythLanguage());
3448  dates->addChild(ISO639PreferredLanguage(0));
3449  dates->addChild(ISO639PreferredLanguage(1));
3450  dates->addChild(MythDateFormatCB());
3451  dates->addChild(MythShortDateFormat());
3452  dates->addChild(MythTimeFormat());
3453  addChild(dates);
3454 
3455  addChild(new LcdSettings());
3456 }
3457 
3458 // vim:set sw=4 ts=4 expandtab: