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