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  gc->addSelection(MainGeneralSettings::tr("Show standby"), "7");
1874 
1875  gc->setHelpText(
1876  MainGeneralSettings::tr("By default, only remote frontends are shown "
1877  "the shutdown option on the exit menu. Here "
1878  "you can force specific shutdown and reboot "
1879  "options to be displayed."));
1880  return gc;
1881 }
1882 
1884 {
1885  HostLineEdit *ge = new HostLineEdit("RebootCommand");
1886 
1887  ge->setLabel(MainGeneralSettings::tr("Reboot command"));
1888 
1889  ge->setValue("");
1890 
1891  ge->setHelpText(MainGeneralSettings::tr("Optional. Script to run if you "
1892  "select the reboot option from the "
1893  "exit menu, if the option is "
1894  "displayed. You must configure an "
1895  "exit key to display the exit "
1896  "menu."));
1897  return ge;
1898 }
1899 
1901 {
1902  HostLineEdit *ge = new HostLineEdit("HaltCommand");
1903 
1904  ge->setLabel(MainGeneralSettings::tr("Halt command"));
1905 
1906  ge->setValue("");
1907 
1908  ge->setHelpText(MainGeneralSettings::tr("Optional. Script to run if you "
1909  "select the shutdown option from "
1910  "the exit menu, if the option is "
1911  "displayed. You must configure an "
1912  "exit key to display the exit "
1913  "menu."));
1914  return ge;
1915 }
1916 
1918 {
1919  HostLineEdit *ge = new HostLineEdit("LircSocket");
1920 
1921  ge->setLabel(MainGeneralSettings::tr("LIRC daemon socket"));
1922 
1923  /* lircd socket moved from /dev/ to /var/run/lirc/ in lirc 0.8.6 */
1924  QString lirc_socket = "/dev/lircd";
1925 
1926  if (!QFile::exists(lirc_socket))
1927  lirc_socket = "/var/run/lirc/lircd";
1928 
1929  ge->setValue(lirc_socket);
1930 
1931  QString help = MainGeneralSettings::tr("UNIX socket or IP address[:port] "
1932  "to connect in order to communicate "
1933  "with the LIRC Daemon.");
1934  ge->setHelpText(help);
1935 
1936  return ge;
1937 }
1938 
1940 {
1941  HostLineEdit *ge = new HostLineEdit("ScreenShotPath");
1942 
1943  ge->setLabel(MainGeneralSettings::tr("Screen shot path"));
1944 
1945  ge->setValue("/tmp/");
1946 
1947  ge->setHelpText(MainGeneralSettings::tr("Path to screenshot storage "
1948  "location. Should be writable "
1949  "by the frontend"));
1950 
1951  return ge;
1952 }
1953 
1955 {
1956  HostLineEdit *ge = new HostLineEdit("SetupPinCode");
1957 
1958  ge->setLabel(MainGeneralSettings::tr("Setup PIN code"));
1959 
1960  ge->setHelpText(MainGeneralSettings::tr("This PIN is used to control "
1961  "access to the setup menus. "
1962  "If you want to use this feature, "
1963  "then setting the value to all "
1964  "numbers will make your life much "
1965  "easier. Set it to blank to "
1966  "disable. If enabled, you will not "
1967  "be able to return to this screen "
1968  "and reset the Setup PIN without "
1969  "first entering the current PIN."));
1970  return ge;
1971 }
1972 
1974 {
1975  HostComboBox *gc = new HostComboBox("XineramaScreen", false);
1977 
1978  for (int i=0; i<num; ++i)
1979  gc->addSelection(QString::number(i), QString::number(i));
1980 
1981  gc->addSelection(AppearanceSettings::tr("All"), QString::number(-1));
1982 
1983  gc->setLabel(AppearanceSettings::tr("Display on screen"));
1984 
1985  gc->setValue(0);
1986 
1987  gc->setHelpText(AppearanceSettings::tr("Run on the specified screen or "
1988  "spanning all screens."));
1989  return gc;
1990 }
1991 
1992 
1994 {
1995  HostComboBox *gc = new HostComboBox("XineramaMonitorAspectRatio");
1996 
1997  gc->setLabel(AppearanceSettings::tr("Monitor aspect ratio"));
1998 
1999  gc->addSelection(AppearanceSettings::tr("16:9"), "1.7777");
2000  gc->addSelection(AppearanceSettings::tr("16:10"), "1.6");
2001  gc->addSelection(AppearanceSettings::tr("4:3"), "1.3333");
2002 
2003  gc->setHelpText(AppearanceSettings::tr("The aspect ratio of a Xinerama "
2004  "display cannot be queried from "
2005  "the display, so it must be "
2006  "specified."));
2007  return gc;
2008 }
2009 
2011 {
2012  HostComboBox *gc = new HostComboBox("LetterboxColour");
2013 
2014  gc->setLabel(PlaybackSettings::tr("Letterboxing color"));
2015 
2016  for (int m = kLetterBoxColour_Black; m < kLetterBoxColour_END; ++m)
2017  gc->addSelection(toString((LetterBoxColour)m), QString::number(m));
2018 
2019  gc->setHelpText(PlaybackSettings::tr("By default MythTV uses black "
2020  "letterboxing to match broadcaster "
2021  "letterboxing, but those with plasma "
2022  "screens may prefer gray to minimize "
2023  "burn-in. Currently only works with "
2024  "XVideo video renderer."));
2025  return gc;
2026 }
2027 
2029 {
2030  HostComboBox *gc = new HostComboBox("AspectOverride");
2031 
2032  gc->setLabel(PlaybackSettings::tr("Video aspect override"));
2033 
2034  for (int m = kAspect_Off; m < kAspect_END; ++m)
2035  gc->addSelection(toString((AspectOverrideMode)m), QString::number(m));
2036 
2037  gc->setHelpText(PlaybackSettings::tr("When enabled, these will override "
2038  "the aspect ratio specified by any "
2039  "broadcaster for all video streams."));
2040  return gc;
2041 }
2042 
2044 {
2045  HostComboBox *gc = new HostComboBox("AdjustFill");
2046 
2047  gc->setLabel(PlaybackSettings::tr("Zoom"));
2048 
2049  for (int m = kAdjustFill_Off; m < kAdjustFill_END; ++m)
2050  gc->addSelection(toString((AdjustFillMode)m), QString::number(m));
2052  QString::number(kAdjustFill_AutoDetect_DefaultOff));
2054  QString::number(kAdjustFill_AutoDetect_DefaultHalf));
2055 
2056  gc->setHelpText(PlaybackSettings::tr("When enabled, these will apply a "
2057  "predefined zoom to all video "
2058  "playback in MythTV."));
2059  return gc;
2060 }
2061 
2062 // Theme settings
2063 
2065 {
2066  HostSpinBox *gs = new HostSpinBox("GuiWidth", 0, 1920, 8, true);
2067 
2068  gs->setLabel(AppearanceSettings::tr("GUI width (pixels)"));
2069 
2070  gs->setValue(0);
2071 
2072  gs->setHelpText(AppearanceSettings::tr("The width of the GUI. Do not make "
2073  "the GUI wider than your actual "
2074  "screen resolution. Set to 0 to "
2075  "automatically scale to "
2076  "fullscreen."));
2077  return gs;
2078 }
2079 
2081 {
2082  HostSpinBox *gs = new HostSpinBox("GuiHeight", 0, 1600, 8, true);
2083 
2084  gs->setLabel(AppearanceSettings::tr("GUI height (pixels)"));
2085 
2086  gs->setValue(0);
2087 
2088  gs->setHelpText(AppearanceSettings::tr("The height of the GUI. Do not make "
2089  "the GUI taller than your actual "
2090  "screen resolution. Set to 0 to "
2091  "automatically scale to "
2092  "fullscreen."));
2093  return gs;
2094 }
2095 
2097 {
2098  HostSpinBox *gs = new HostSpinBox("GuiOffsetX", -3840, 3840, 32, true);
2099 
2100  gs->setLabel(AppearanceSettings::tr("GUI X offset"));
2101 
2102  gs->setValue(0);
2103 
2104  gs->setHelpText(AppearanceSettings::tr("The horizontal offset where the "
2105  "GUI will be displayed. May only "
2106  "work if run in a window."));
2107  return gs;
2108 }
2109 
2111 {
2112  HostSpinBox *gs = new HostSpinBox("GuiOffsetY", -1600, 1600, 8, true);
2113 
2114  gs->setLabel(AppearanceSettings::tr("GUI Y offset"));
2115 
2116  gs->setValue(0);
2117 
2118  gs->setHelpText(AppearanceSettings::tr("The vertical offset where the "
2119  "GUI will be displayed."));
2120  return gs;
2121 }
2122 
2123 #if 0
2125 {
2126  HostSpinBox *gs = new HostSpinBox("DisplaySizeWidth", 0, 10000, 1);
2127 
2128  gs->setLabel(AppearanceSettings::tr("Display size - width"));
2129 
2130  gs->setValue(0);
2131 
2132  gs->setHelpText(AppearanceSettings::tr("Horizontal size of the monitor or TV. Used "
2133  "to calculate the actual aspect ratio of the display. This "
2134  "will override the DisplaySize from the system."));
2135 
2136  return gs;
2137 }
2138 
2140 {
2141  HostSpinBox *gs = new HostSpinBox("DisplaySizeHeight", 0, 10000, 1);
2142 
2143  gs->setLabel(AppearanceSettings::tr("Display size - height"));
2144 
2145  gs->setValue(0);
2146 
2147  gs->setHelpText(AppearanceSettings::tr("Vertical size of the monitor or TV. Used "
2148  "to calculate the actual aspect ratio of the display. This "
2149  "will override the DisplaySize from the system."));
2150 
2151  return gs;
2152 }
2153 #endif
2154 
2156 {
2157  HostCheckBox *gc = new HostCheckBox("GuiSizeForTV");
2158 
2159  gc->setLabel(AppearanceSettings::tr("Use GUI size for TV playback"));
2160 
2161  gc->setValue(true);
2162 
2163  gc->setHelpText(AppearanceSettings::tr("If enabled, use the above size for "
2164  "TV, otherwise use full screen."));
2165  return gc;
2166 }
2167 
2168 #if defined(USING_XRANDR) || CONFIG_DARWIN
2170 {
2171  HostCheckBox *gc = new HostCheckBox("UseVideoModes");
2172 
2173  gc->setLabel(VideoModeSettings::tr("Separate video modes for GUI and "
2174  "TV playback"));
2175 
2176  gc->setValue(false);
2177 
2178  gc->setHelpText(VideoModeSettings::tr("Switch X Window video modes for TV. "
2179  "Requires \"xrandr\" support."));
2180  return gc;
2181 }
2182 
2183 static HostSpinBox *VidModeWidth(int idx)
2184 {
2185  HostSpinBox *gs = new HostSpinBox(QString("VidModeWidth%1").arg(idx),
2186  0, 1920, 16, true);
2187 
2188  gs->setLabel((idx<1) ? VideoModeSettings::tr("In X", "Video mode width")
2189  : "");
2190 
2191  gs->setLabelAboveWidget(idx<1);
2192 
2193  gs->setValue(0);
2194 
2195  gs->setHelpText(VideoModeSettings::tr("Horizontal resolution of video "
2196  "which needs a special output "
2197  "resolution."));
2198  return gs;
2199 }
2200 
2201 static HostSpinBox *VidModeHeight(int idx)
2202 {
2203  HostSpinBox *gs = new HostSpinBox(QString("VidModeHeight%1").arg(idx),
2204  0, 1080, 16, true);
2205 
2206  gs->setLabel((idx<1) ? VideoModeSettings::tr("In Y", "Video mode height")
2207  : "");
2208 
2209  gs->setLabelAboveWidget(idx<1);
2210 
2211  gs->setValue(0);
2212 
2213  gs->setHelpText(VideoModeSettings::tr("Vertical resolution of video "
2214  "which needs a special output "
2215  "resolution."));
2216  return gs;
2217 }
2218 
2220 {
2221  HostComboBox *gc = new HostComboBox("GuiVidModeResolution");
2222 
2223  gc->setLabel(VideoModeSettings::tr("GUI"));
2224 
2225  gc->setLabelAboveWidget(true);
2226 
2227  gc->setHelpText(VideoModeSettings::tr("Resolution of screen when not "
2228  "watching a video."));
2229 
2230  const vector<DisplayResScreen> scr = GetVideoModes();
2231  for (uint i=0; i<scr.size(); ++i)
2232  {
2233  int w = scr[i].Width(), h = scr[i].Height();
2234  QString sel = QString("%1x%2").arg(w).arg(h);
2235  gc->addSelection(sel, sel);
2236  }
2237 
2238  // if no resolution setting, set it with a reasonable initial value
2239  if (scr.size() && (gCoreContext->GetSetting("GuiVidModeResolution").isEmpty()))
2240  {
2241  int w = 0, h = 0;
2242  gCoreContext->GetResolutionSetting("GuiVidMode", w, h);
2243  if ((w <= 0) || (h <= 0))
2244  (w = 640), (h = 480);
2245 
2246  DisplayResScreen dscr(w, h, -1, -1, -1.0, 0);
2247  double rate = -1.0;
2248  int i = DisplayResScreen::FindBestMatch(scr, dscr, rate);
2249  gc->setValue((i >= 0) ? i : scr.size()-1);
2250  }
2251 
2252  return gc;
2253 }
2254 
2256 {
2257  QString dhelp = VideoModeSettings::tr("Default screen resolution "
2258  "when watching a video.");
2259  QString ohelp = VideoModeSettings::tr("Screen resolution when watching a "
2260  "video at a specific resolution.");
2261 
2262  QString qstr = (idx<0) ? "TVVidModeResolution" :
2263  QString("TVVidModeResolution%1").arg(idx);
2264  HostComboBox *gc = new HostComboBox(qstr);
2265  QString lstr = (idx<0) ? VideoModeSettings::tr("Video output") :
2266  ((idx<1) ? VideoModeSettings::tr("Output") : "");
2267  QString hstr = (idx<0) ? dhelp : ohelp;
2268 
2269  gc->setLabel(lstr);
2270 
2271  gc->setLabelAboveWidget(idx<1);
2272  gc->setHelpText(hstr);
2273 
2274  const vector<DisplayResScreen> scr = GetVideoModes();
2275 
2276  for (uint i=0; i<scr.size(); ++i)
2277  {
2278  QString sel = QString("%1x%2").arg(scr[i].Width()).arg(scr[i].Height());
2279  gc->addSelection(sel, sel);
2280  }
2281 
2282  return gc;
2283 }
2284 
2286 {
2287  QString dhelp = VideoModeSettings::tr("Default refresh rate when watching "
2288  "a video. Leave at \"Auto\" to "
2289  "automatically use the best "
2290  "available");
2291  QString ohelp = VideoModeSettings::tr("Refresh rate when watching a "
2292  "video at a specific resolution. "
2293  "Leave at \"Auto\" to automatically "
2294  "use the best available");
2295 
2296  QString qstr = (idx<0) ? "TVVidModeRefreshRate" :
2297  QString("TVVidModeRefreshRate%1").arg(idx);
2299  QString lstr = (idx<1) ? VideoModeSettings::tr("Rate") : "";
2300  QString hstr = (idx<0) ? dhelp : ohelp;
2301 
2302  gc->setLabel(lstr);
2303  gc->setLabelAboveWidget(idx<1);
2304  gc->setHelpText(hstr);
2305  gc->setEnabled(false);
2306  return gc;
2307 }
2308 
2310 {
2311  QString dhelp = VideoModeSettings::tr("Aspect ratio when watching a "
2312  "video. Leave at \"%1\" to "
2313  "use ratio reported by the monitor. "
2314  "Set to 16:9 or 4:3 to force a "
2315  "specific aspect ratio.");
2316 
2317 
2318 
2319  QString ohelp = VideoModeSettings::tr("Aspect ratio when watching a "
2320  "video at a specific resolution. "
2321  "Leave at \"%1\" to use ratio "
2322  "reported by the monitor. Set to "
2323  "16:9 or 4:3 to force a specific "
2324  "aspect ratio.");
2325 
2326  QString qstr = (idx<0) ? "TVVidModeForceAspect" :
2327  QString("TVVidModeForceAspect%1").arg(idx);
2328 
2329  HostComboBox *gc = new HostComboBox(qstr);
2330 
2331  gc->setLabel( (idx<1) ? VideoModeSettings::tr("Aspect") : "" );
2332 
2333  gc->setLabelAboveWidget(idx<1);
2334 
2335  QString hstr = (idx<0) ? dhelp : ohelp;
2336 
2337  gc->setHelpText(hstr.arg(VideoModeSettings::tr("Default")));
2338 
2339  gc->addSelection(VideoModeSettings::tr("Default"), "0.0");
2340  gc->addSelection("16:9", "1.77777777777");
2341  gc->addSelection("4:3", "1.33333333333");
2342 
2343  return gc;
2344 }
2345 
2348 {
2349  setLabel(tr("Video Mode Settings"));
2350  setUseLabel(false);
2351 
2353  addChild(videomode);
2354  setTrigger(videomode);
2355 
2357  new HorizontalConfigurationGroup(false, false);
2358 
2361 
2362  defaultsettings->addChild(GuiVidModeResolution());
2363  defaultsettings->addChild(res);
2364  defaultsettings->addChild(rate);
2365  defaultsettings->addChild(TVVidModeForceAspect());
2366  connect(res, SIGNAL(valueChanged(const QString&)),
2367  rate, SLOT(ChangeResolution(const QString&)));
2368 
2369  ConfigurationGroup* overrides =
2370  new GridConfigurationGroup(5, true, true, false, true);
2371 
2372  overrides->setLabel(tr("Overrides for specific video sizes"));
2373 
2374  for (int idx = 0; idx < 3; ++idx)
2375  {
2376  //input side
2377  overrides->addChild(VidModeWidth(idx));
2378  overrides->addChild(VidModeHeight(idx));
2379  // output side
2380  overrides->addChild(res = TVVidModeResolution(idx));
2381  overrides->addChild(rate = TVVidModeRefreshRate(idx));
2382  overrides->addChild(TVVidModeForceAspect(idx));
2383 
2384  connect(res, SIGNAL(valueChanged(const QString&)),
2385  rate, SLOT(ChangeResolution(const QString&)));
2386  }
2387 
2388  ConfigurationGroup* settings = new VerticalConfigurationGroup(false);
2389 
2390  settings->addChild(defaultsettings);
2391  settings->addChild(overrides);
2392 
2393  addTarget("1", settings);
2394  addTarget("0", new VerticalConfigurationGroup(true));
2395 
2396 };
2397 #endif
2398 
2400 {
2401  HostCheckBox *gc = new HostCheckBox("HideMouseCursor");
2402 
2403  gc->setLabel(AppearanceSettings::tr("Hide mouse cursor in MythTV"));
2404 
2405  gc->setValue(false);
2406 
2407  gc->setHelpText(AppearanceSettings::tr("Toggles mouse cursor visibility "
2408  "for touchscreens. By default "
2409  "MythTV will auto-hide the cursor "
2410  "if the mouse doesn't move for a "
2411  "period, this setting disables the "
2412  "cursor entirely."));
2413  return gc;
2414 };
2415 
2416 
2418 {
2419  HostCheckBox *gc = new HostCheckBox("RunFrontendInWindow");
2420 
2421  gc->setLabel(AppearanceSettings::tr("Use window border"));
2422 
2423  gc->setValue(false);
2424 
2425  gc->setHelpText(AppearanceSettings::tr("Toggles between windowed and "
2426  "borderless operation."));
2427  return gc;
2428 }
2429 
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 
2444 {
2445  HostCheckBox *gc = new HostCheckBox("AlwaysOnTop");
2446 
2447  gc->setLabel(AppearanceSettings::tr("Always On Top"));
2448 
2449  gc->setValue(false);
2450 
2451  gc->setHelpText(AppearanceSettings::tr("If enabled, MythTV will always be "
2452  "on top"));
2453  return gc;
2454 }
2455 
2457 {
2458  HostComboBox *gc = new HostComboBox("DateFormat");
2459  gc->setLabel(AppearanceSettings::tr("Date format"));
2460 
2461  QDate sampdate = MythDate::current().toLocalTime().date();
2462  QString sampleStr = AppearanceSettings::tr("Samples are shown using "
2463  "today's date.");
2464 
2465  if (sampdate.month() == sampdate.day())
2466  {
2467  sampdate = sampdate.addDays(1);
2468  sampleStr = AppearanceSettings::tr("Samples are shown using "
2469  "tomorrow's date.");
2470  }
2471 
2472  QLocale locale = gCoreContext->GetQLocale();
2473 
2474  gc->addSelection(locale.toString(sampdate, "ddd MMM d"), "ddd MMM d");
2475  gc->addSelection(locale.toString(sampdate, "ddd d MMM"), "ddd d MMM");
2476  gc->addSelection(locale.toString(sampdate, "ddd MMMM d"), "ddd MMMM d");
2477  gc->addSelection(locale.toString(sampdate, "ddd d MMMM"), "ddd d MMMM");
2478  gc->addSelection(locale.toString(sampdate, "dddd MMM d"), "dddd MMM d");
2479  gc->addSelection(locale.toString(sampdate, "dddd d MMM"), "dddd d MMM");
2480  gc->addSelection(locale.toString(sampdate, "MMM d"), "MMM d");
2481  gc->addSelection(locale.toString(sampdate, "d MMM"), "d MMM");
2482  gc->addSelection(locale.toString(sampdate, "MM/dd"), "MM/dd");
2483  gc->addSelection(locale.toString(sampdate, "dd/MM"), "dd/MM");
2484  gc->addSelection(locale.toString(sampdate, "MM.dd"), "MM.dd");
2485  gc->addSelection(locale.toString(sampdate, "dd.MM"), "dd.MM");
2486  gc->addSelection(locale.toString(sampdate, "M/d/yyyy"), "M/d/yyyy");
2487  gc->addSelection(locale.toString(sampdate, "d/M/yyyy"), "d/M/yyyy");
2488  gc->addSelection(locale.toString(sampdate, "MM.dd.yyyy"), "MM.dd.yyyy");
2489  gc->addSelection(locale.toString(sampdate, "dd.MM.yyyy"), "dd.MM.yyyy");
2490  gc->addSelection(locale.toString(sampdate, "yyyy-MM-dd"), "yyyy-MM-dd");
2491  gc->addSelection(locale.toString(sampdate, "ddd MMM d yyyy"), "ddd MMM d yyyy");
2492  gc->addSelection(locale.toString(sampdate, "ddd d MMM yyyy"), "ddd d MMM yyyy");
2493  gc->addSelection(locale.toString(sampdate, "ddd yyyy-MM-dd"), "ddd yyyy-MM-dd");
2494 
2495  QString cn_long = QString("dddd yyyy") + QChar(0x5E74) +
2496  "M" + QChar(0x6708) + "d"+ QChar(0x65E5); // dddd yyyy年M月d日
2497  gc->addSelection(locale.toString(sampdate, cn_long), cn_long);
2498  QString cn_med = QString("dddd ") +
2499  "M" + QChar(0x6708) + "d"+ QChar(0x65E5); // dddd M月d日
2500 
2501  gc->addSelection(locale.toString(sampdate, cn_med), cn_med);
2502 
2503  //: %1 gives additional information regarding the date format
2504  gc->setHelpText(AppearanceSettings::tr("Your preferred date format. %1")
2505  .arg(sampleStr));
2506 
2507  return gc;
2508 }
2509 
2511 {
2512  HostComboBox *gc = new HostComboBox("ShortDateFormat");
2513  gc->setLabel(AppearanceSettings::tr("Short date format"));
2514 
2515  QDate sampdate = MythDate::current().toLocalTime().date();
2516 
2517  QString sampleStr = AppearanceSettings::tr("Samples are shown using "
2518  "today's date.");
2519 
2520  if (sampdate.month() == sampdate.day())
2521  {
2522  sampdate = sampdate.addDays(1);
2523  sampleStr = AppearanceSettings::tr("Samples are shown using "
2524  "tomorrow's date.");
2525  }
2526  QLocale locale = gCoreContext->GetQLocale();
2527 
2528  gc->addSelection(locale.toString(sampdate, "M/d"), "M/d");
2529  gc->addSelection(locale.toString(sampdate, "d/M"), "d/M");
2530  gc->addSelection(locale.toString(sampdate, "MM/dd"), "MM/dd");
2531  gc->addSelection(locale.toString(sampdate, "dd/MM"), "dd/MM");
2532  gc->addSelection(locale.toString(sampdate, "MM.dd"), "MM.dd");
2533  gc->addSelection(locale.toString(sampdate, "dd.MM."), "dd.MM.");
2534  gc->addSelection(locale.toString(sampdate, "M.d."), "M.d.");
2535  gc->addSelection(locale.toString(sampdate, "d.M."), "d.M.");
2536  gc->addSelection(locale.toString(sampdate, "MM-dd"), "MM-dd");
2537  gc->addSelection(locale.toString(sampdate, "dd-MM"), "dd-MM");
2538  gc->addSelection(locale.toString(sampdate, "MMM d"), "MMM d");
2539  gc->addSelection(locale.toString(sampdate, "d MMM"), "d MMM");
2540  gc->addSelection(locale.toString(sampdate, "ddd d"), "ddd d");
2541  gc->addSelection(locale.toString(sampdate, "d ddd"), "d ddd");
2542  gc->addSelection(locale.toString(sampdate, "ddd M/d"), "ddd M/d");
2543  gc->addSelection(locale.toString(sampdate, "ddd d/M"), "ddd d/M");
2544  gc->addSelection(locale.toString(sampdate, "ddd d.M"), "ddd d.M");
2545  gc->addSelection(locale.toString(sampdate, "ddd dd.MM"), "ddd dd.MM");
2546  gc->addSelection(locale.toString(sampdate, "M/d ddd"), "M/d ddd");
2547  gc->addSelection(locale.toString(sampdate, "d/M ddd"), "d/M ddd");
2548 
2549  QString cn = QString("M") + QChar(0x6708) + "d" + QChar(0x65E5); // M月d日
2550 
2551  gc->addSelection(locale.toString(sampdate, cn), cn);
2552 
2553  //: %1 gives additional information regarding the date format
2554  gc->setHelpText(AppearanceSettings::tr("Your preferred short date format. %1")
2555  .arg(sampleStr));
2556  return gc;
2557 }
2558 
2560 {
2561  HostComboBox *gc = new HostComboBox("TimeFormat");
2562 
2563  gc->setLabel(AppearanceSettings::tr("Time format"));
2564 
2565  QTime samptime = QTime::currentTime();
2566 
2567  QLocale locale = gCoreContext->GetQLocale();
2568 
2569  gc->addSelection(locale.toString(samptime, "h:mm AP"), "h:mm AP");
2570  gc->addSelection(locale.toString(samptime, "h:mm ap"), "h:mm ap");
2571  gc->addSelection(locale.toString(samptime, "hh:mm AP"), "hh:mm AP");
2572  gc->addSelection(locale.toString(samptime, "hh:mm ap"), "hh:mm ap");
2573  gc->addSelection(locale.toString(samptime, "h:mm"), "h:mm");
2574  gc->addSelection(locale.toString(samptime, "hh:mm"), "hh:mm");
2575  gc->addSelection(locale.toString(samptime, "hh.mm"), "hh.mm");
2576  gc->addSelection(locale.toString(samptime, "AP h:mm"), "AP h:mm");
2577 
2578  gc->setHelpText(AppearanceSettings::tr("Your preferred time format. You "
2579  "must choose a format with \"AM\" "
2580  "or \"PM\" in it, otherwise your "
2581  "time display will be 24-hour or "
2582  "\"military\" time."));
2583  return gc;
2584 }
2585 
2586 #if ! CONFIG_DARWIN
2588 {
2589  HostComboBox *gc = new HostComboBox("ThemePainter");
2590 
2591  gc->setLabel(AppearanceSettings::tr("Paint engine"));
2592 
2593  gc->addSelection(QCoreApplication::translate("(Common)", "Qt"), QT_PAINTER);
2594  gc->addSelection(QCoreApplication::translate("(Common)", "Auto", "Automatic"),
2595  AUTO_PAINTER);
2596 #ifdef USING_OPENGL
2597  gc->addSelection(QCoreApplication::translate("(Common)", "OpenGL 1"),
2598  OPENGL_PAINTER);
2599 #endif
2600 #ifdef _WIN32
2601  gc->addSelection(QCoreApplication::translate("(Common)", "Direct3D"),
2602  D3D9_PAINTER);
2603 #endif
2604  gc->setHelpText(
2605  AppearanceSettings::tr("This selects what MythTV uses to draw. "
2606  "Choosing '%1' is recommended, unless running "
2607  "on systems with broken OpenGL implementations "
2608  "(broken hardware or drivers or windowing "
2609  "systems) where only Qt works.")
2610  .arg(QCoreApplication::translate("(Common)", "Auto", "Automatic")));
2611 
2612  return gc;
2613 }
2614 #endif
2615 
2617 {
2618  HostComboBox *gc = new HostComboBox("ChannelFormat");
2619 
2620  gc->setLabel(GeneralSettings::tr("Channel format"));
2621 
2622  gc->addSelection(GeneralSettings::tr("number"), "<num>");
2623  gc->addSelection(GeneralSettings::tr("number callsign"), "<num> <sign>");
2624  gc->addSelection(GeneralSettings::tr("number name"), "<num> <name>");
2625  gc->addSelection(GeneralSettings::tr("callsign"), "<sign>");
2626  gc->addSelection(GeneralSettings::tr("name"), "<name>");
2627 
2628  gc->setHelpText(GeneralSettings::tr("Your preferred channel format."));
2629 
2630  gc->setValue(1);
2631 
2632  return gc;
2633 }
2634 
2636 {
2637  HostComboBox *gc = new HostComboBox("LongChannelFormat");
2638 
2639  gc->setLabel(GeneralSettings::tr("Long channel format"));
2640 
2641  gc->addSelection(GeneralSettings::tr("number"), "<num>");
2642  gc->addSelection(GeneralSettings::tr("number callsign"), "<num> <sign>");
2643  gc->addSelection(GeneralSettings::tr("number name"), "<num> <name>");
2644  gc->addSelection(GeneralSettings::tr("callsign"), "<sign>");
2645  gc->addSelection(GeneralSettings::tr("name"), "<name>");
2646 
2647  gc->setHelpText(GeneralSettings::tr("Your preferred long channel format."));
2648 
2649  gc->setValue(2);
2650 
2651  return gc;
2652 }
2653 
2655 {
2656  HostCheckBox *gc = new HostCheckBox("ChannelGroupRememberLast");
2657 
2658  gc->setLabel(ChannelGroupSettings::tr("Remember last channel group"));
2659 
2660  gc->setHelpText(ChannelGroupSettings::tr("If enabled, the EPG will "
2661  "initially display only the "
2662  "channels from the last channel "
2663  "group selected. Pressing \"4\" "
2664  "will toggle channel group."));
2665 
2666  gc->setValue(false);
2667 
2668  return gc;
2669 }
2670 
2672 {
2673  HostComboBox *gc = new HostComboBox("ChannelGroupDefault");
2674 
2675  gc->setLabel(ChannelGroupSettings::tr("Default channel group"));
2676 
2677  ChannelGroupList changrplist;
2678 
2679  changrplist = ChannelGroup::GetChannelGroups();
2680 
2681  gc->addSelection(ChannelGroupSettings::tr("All Channels"), "-1");
2682 
2683  ChannelGroupList::iterator it;
2684 
2685  for (it = changrplist.begin(); it < changrplist.end(); ++it)
2686  gc->addSelection(it->name, QString("%1").arg(it->grpid));
2687 
2688  gc->setHelpText(ChannelGroupSettings::tr("Default channel group to be "
2689  "shown in the EPG. Pressing "
2690  "GUIDE key will toggle channel "
2691  "group."));
2692  gc->setValue(false);
2693 
2694  return gc;
2695 }
2696 
2698 {
2699  HostCheckBox *gc = new HostCheckBox("BrowseChannelGroup");
2700 
2701  gc->setLabel(GeneralSettings::tr("Browse/change channels from Channel "
2702  "Group"));
2703 
2704  gc->setHelpText(GeneralSettings::tr("If enabled, Live TV will browse or "
2705  "change channels from the selected "
2706  "channel group. The \"All Channels\" "
2707  "channel group may be selected to "
2708  "browse all channels."));
2709  gc->setValue(false);
2710 
2711  return gc;
2712 }
2713 
2714 // Channel Group Settings
2717 {
2718  setLabel(tr("Remember last channel group"));
2719  setUseLabel(false);
2720 
2721  Setting* RememberChanGrpEnabled = ChannelGroupRememberLast();
2722  addChild(RememberChanGrpEnabled);
2723  setTrigger(RememberChanGrpEnabled);
2724 
2725  ConfigurationGroup* settings = new VerticalConfigurationGroup(false,false);
2726  settings->addChild(ChannelGroupDefault());
2727  addTarget("0", settings);
2728 
2729  // show nothing if RememberChanGrpEnabled is on
2730  addTarget("1", new VerticalConfigurationGroup(true,false));
2731 };
2732 
2733 // General RecPriorities settings
2734 
2736 {
2737  GlobalComboBox *bc = new GlobalComboBox("SchedOpenEnd");
2738 
2739  bc->setLabel(GeneralRecPrioritiesSettings::tr("Avoid back to back "
2740  "recordings"));
2741 
2742  bc->setHelpText(
2743  GeneralRecPrioritiesSettings::tr("Selects the situations where the "
2744  "scheduler will avoid assigning shows "
2745  "to the same card if their end time "
2746  "and start time match. This will be "
2747  "allowed when necessary in order to "
2748  "resolve conflicts."));
2749 
2750  bc->addSelection(GeneralRecPrioritiesSettings::tr("Never"), "0");
2751  bc->addSelection(GeneralRecPrioritiesSettings::tr("Different Channels"),
2752  "1");
2753  bc->addSelection(GeneralRecPrioritiesSettings::tr("Always"), "2");
2754 
2755  bc->setValue(0);
2756 
2757  return bc;
2758 }
2759 
2761 {
2762  GlobalSpinBox *bs = new GlobalSpinBox("PrefInputPriority", 1, 99, 1);
2763 
2764  bs->setLabel(GeneralRecPrioritiesSettings::tr("Preferred input priority"));
2765 
2766  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority when "
2767  "a showing matches the "
2768  "preferred input selected "
2769  "in the 'Scheduling "
2770  "Options' section of the "
2771  "recording rule."));
2772 
2773  bs->setValue(2);
2774  return bs;
2775 }
2776 
2778 {
2779  GlobalSpinBox *bs = new GlobalSpinBox("HDTVRecPriority", -99, 99, 1);
2780 
2781  bs->setLabel(GeneralRecPrioritiesSettings::tr("HDTV recording priority"));
2782 
2783  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority when "
2784  "a showing is marked as an "
2785  "HDTV broadcast in the TV "
2786  "listings."));
2787 
2788  bs->setValue(0);
2789 
2790  return bs;
2791 }
2792 
2794 {
2795  GlobalSpinBox *bs = new GlobalSpinBox("WSRecPriority", -99, 99, 1);
2796 
2797  bs->setLabel(GeneralRecPrioritiesSettings::tr("Widescreen recording "
2798  "priority"));
2799 
2800  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority when "
2801  "a showing is marked as "
2802  "widescreen in the TV "
2803  "listings."));
2804 
2805  bs->setValue(0);
2806 
2807  return bs;
2808 }
2809 
2811 {
2812  GlobalSpinBox *bs = new GlobalSpinBox("SignLangRecPriority",
2813  -99, 99, 1);
2814 
2815  bs->setLabel(GeneralRecPrioritiesSettings::tr("Sign language recording "
2816  "priority"));
2817 
2818  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority "
2819  "when a showing is "
2820  "marked as having "
2821  "in-vision sign "
2822  "language."));
2823 
2824  bs->setValue(0);
2825 
2826  return bs;
2827 }
2828 
2830 {
2831  GlobalSpinBox *bs = new GlobalSpinBox("OnScrSubRecPriority",
2832  -99, 99, 1);
2833 
2834  bs->setLabel(GeneralRecPrioritiesSettings::tr("In-vision Subtitles "
2835  "Recording Priority"));
2836 
2837  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority "
2838  "when a showing is marked "
2839  "as having in-vision "
2840  "subtitles."));
2841 
2842  bs->setValue(0);
2843 
2844  return bs;
2845 }
2846 
2848 {
2849  GlobalSpinBox *bs = new GlobalSpinBox("CCRecPriority",
2850  -99, 99, 1);
2851 
2852  bs->setLabel(GeneralRecPrioritiesSettings::tr("Subtitles/CC recording "
2853  "priority"));
2854 
2855  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority when "
2856  "a showing is marked as "
2857  "having subtitles or "
2858  "closed captioning (CC) "
2859  "available."));
2860 
2861  bs->setValue(0);
2862 
2863  return bs;
2864 }
2865 
2867 {
2868  GlobalSpinBox *bs = new GlobalSpinBox("HardHearRecPriority",
2869  -99, 99, 1);
2870 
2871  bs->setLabel(GeneralRecPrioritiesSettings::tr("Hard of hearing priority"));
2872 
2873  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority when "
2874  "a showing is marked as "
2875  "having support for "
2876  "viewers with impaired "
2877  "hearing."));
2878 
2879  bs->setValue(0);
2880 
2881  return bs;
2882 }
2883 
2885 {
2886  GlobalSpinBox *bs = new GlobalSpinBox("AudioDescRecPriority",
2887  -99, 99, 1);
2888 
2889  bs->setLabel(GeneralRecPrioritiesSettings::tr("Audio described priority"));
2890 
2891  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority when "
2892  "a showing is marked as "
2893  "being Audio Described."));
2894 
2895  bs->setValue(0);
2896 
2897  return bs;
2898 }
2899 
2901 {
2902  HostLineEdit *ge = new HostLineEdit("DefaultTVChannel");
2903 
2904  ge->setLabel(EPGSettings::tr("Guide starts at channel"));
2905 
2906  ge->setValue("3");
2907 
2908  ge->setHelpText(EPGSettings::tr("The program guide starts on this channel "
2909  "if it is run from outside of Live TV "
2910  "mode. Leave blank to enable Live TV "
2911  "automatic start channel."));
2912 
2913  return ge;
2914 }
2915 
2917 {
2918  HostSpinBox *gs = new HostSpinBox("SelChangeRecThreshold", 1, 600, 1);
2919 
2920  gs->setLabel(EPGSettings::tr("Record threshold"));
2921 
2922  gs->setValue(16);
2923 
2924  gs->setHelpText(EPGSettings::tr("Pressing SELECT on a show that is at "
2925  "least this many minutes into the future "
2926  "will schedule a recording."));
2927  return gs;
2928 }
2929 
2931 {
2932  GlobalComboBox *gc = new GlobalComboBox("Language");
2933 
2934  gc->setLabel(AppearanceSettings::tr("Language"));
2935 
2936  QMap<QString, QString> langMap = MythTranslation::getLanguages();
2937  QStringList langs = langMap.values();
2938  langs.sort();
2939  QString langCode = gCoreContext->GetSetting("Language").toLower();
2940 
2941  if (langCode.isEmpty())
2942  langCode = "en_US";
2943 
2944  gc->clearSelections();
2945 
2946  for (QStringList::Iterator it = langs.begin(); it != langs.end(); ++it)
2947  {
2948  QString label = *it;
2949  QString value = langMap.key(label);
2950  gc->addSelection(label, value, (value.toLower() == langCode));
2951  }
2952 
2953  gc->setHelpText(AppearanceSettings::tr("Your preferred language for the "
2954  "user interface."));
2955  return gc;
2956 }
2957 
2959 {
2960  widget->clearSelections();
2961  QString q = QString("ISO639Language%1").arg(i);
2962  QString lang = gCoreContext->GetSetting(q, "").toLower();
2963 
2964  if ((lang.isEmpty() || lang == "aar") &&
2965  !gCoreContext->GetSetting("Language", "").isEmpty())
2966  {
2967  lang = iso639_str2_to_str3(gCoreContext->GetLanguage().toLower());
2968  }
2969 
2970  QMap<int,QString>::iterator it = _iso639_key_to_english_name.begin();
2971  QMap<int,QString>::iterator ite = _iso639_key_to_english_name.end();
2972 
2973  for (; it != ite; ++it)
2974  {
2975  QString desc = (*it);
2976  int idx = desc.indexOf(";");
2977  if (idx > 0)
2978  desc = desc.left(idx);
2979 
2980  const QString il = iso639_key_to_str3(it.key());
2981  widget->addSelection(desc, il, il == lang);
2982  }
2983 }
2984 
2986 {
2987  GlobalComboBox *gc = new GlobalComboBox(QString("ISO639Language%1").arg(i));
2988 
2989  gc->setLabel(AppearanceSettings::tr("Guide language #%1").arg(i+1));
2990 
2991  // We should try to get language from "MythLanguage"
2992  // then use code 2 to code 3 map in iso639.h
2993  ISO639_fill_selections(gc, i);
2994 
2995  gc->setHelpText(AppearanceSettings::tr("Your #%1 preferred language for "
2996  "Program Guide data and captions.")
2997  .arg(i+1));
2998  return gc;
2999 }
3000 
3002 {
3003  HostCheckBox *gc = new HostCheckBox("NetworkControlEnabled");
3004 
3005  gc->setLabel(MainGeneralSettings::tr("Enable Network Remote Control "
3006  "interface"));
3007 
3008  gc->setHelpText(MainGeneralSettings::tr("This enables support for "
3009  "controlling MythFrontend "
3010  "over the network."));
3011 
3012  gc->setValue(false);
3013 
3014  return gc;
3015 }
3016 
3018 {
3019  HostSpinBox *gs = new HostSpinBox("NetworkControlPort", 1025, 65535, 1);
3020 
3021  gs->setLabel(MainGeneralSettings::tr("Network Remote Control port"));
3022 
3023  gs->setValue(6546);
3024 
3025  gs->setHelpText(MainGeneralSettings::tr("This specifies what port the "
3026  "Network Remote Control "
3027  "interface will listen on for "
3028  "new connections."));
3029  return gs;
3030 }
3031 
3033 {
3034  HostLineEdit *ge = new HostLineEdit("UDPNotifyPort");
3035 
3036  ge->setLabel(MainGeneralSettings::tr("UDP notify port"));
3037 
3038  ge->setValue("6948");
3039 
3040  ge->setHelpText(MainGeneralSettings::tr("MythTV will listen for "
3041  "connections from the "
3042  "\"mythutil\" program on "
3043  "this port."));
3044  return ge;
3045 }
3046 
3047 #ifdef USING_AIRPLAY
3048 // AirPlay Settings
3050 {
3051  HostCheckBox *gc = new HostCheckBox("AirPlayEnabled");
3052 
3053  gc->setLabel(MainGeneralSettings::tr("Enable AirPlay"));
3054 
3055  gc->setHelpText(MainGeneralSettings::tr("AirPlay lets you wirelessly view "
3056  "content on your TV from your "
3057  "iPhone, iPad, iPod Touch, or "
3058  "iTunes on your computer."));
3059 
3060  gc->setValue(true);
3061 
3062  return gc;
3063 }
3064 
3066 {
3067  HostCheckBox *gc = new HostCheckBox("AirPlayAudioOnly");
3068 
3069  gc->setLabel(MainGeneralSettings::tr("Only support AirTunes (no video)"));
3070 
3071  gc->setHelpText(MainGeneralSettings::tr("Only stream audio from your "
3072  "iPhone, iPad, iPod Touch, or "
3073  "iTunes on your computer"));
3074 
3075  gc->setValue(false);
3076 
3077  return gc;
3078 }
3079 
3081 {
3082  HostCheckBox *gc = new HostCheckBox("AirPlayPasswordEnabled");
3083 
3084  gc->setLabel(MainGeneralSettings::tr("Require password"));
3085 
3086  gc->setValue(false);
3087 
3088  gc->setHelpText(MainGeneralSettings::tr("Require a password to use "
3089  "AirPlay. Your iPhone, iPad, iPod "
3090  "Touch, or iTunes on your computer "
3091  "will prompt you when required"));
3092  return gc;
3093 }
3094 
3096 {
3097  HostLineEdit *ge = new HostLineEdit("AirPlayPassword");
3098 
3099  ge->setValue("0000");
3100 
3101  ge->setHelpText(MainGeneralSettings::tr("Your iPhone, iPad, iPod Touch, or "
3102  "iTunes on your computer will "
3103  "prompt you for this password "
3104  "when required"));
3105  return ge;
3106 }
3107 
3109 {
3111  new HorizontalConfigurationGroup(false, false, false, false);
3112 
3114  hc->addChild(AirPlayPassword());
3115 
3116  return hc;
3117 }
3118 
3120 {
3121  HostCheckBox *gc = new HostCheckBox("AirPlayFullScreen");
3122 
3123  gc->setLabel(MainGeneralSettings::tr("AirPlay full screen playback"));
3124 
3125  gc->setValue(false);
3126 
3127  gc->setHelpText(MainGeneralSettings::tr("During music playback, displays "
3128  "album cover and various media "
3129  "information in full screen mode"));
3130  return gc;
3131 }
3132 
3134 {
3136 
3137  ts->setValue(MainGeneralSettings::tr("All AirPlay settings take effect "
3138  "when you restart MythFrontend."));
3139  return ts;
3140 }
3141 
3143 {
3145 
3146  if (MythRAOPConnection::LoadKey() == NULL)
3147  {
3148  ts->setValue(MainGeneralSettings::tr("AirTunes RSA key couldn't be "
3149  "loaded. Check http://www.mythtv.org/wiki/AirTunes/AirPlay. "
3150  "Last Error: %1")
3152  }
3153  else
3154  {
3155  ts->setValue(MainGeneralSettings::tr("AirTunes RSA key successfully "
3156  "loaded."));
3157  }
3158 
3159  return ts;
3160 }
3161 #endif
3162 
3164 {
3165  HostCheckBox *gc = new HostCheckBox("RealtimePriority");
3166 
3167  gc->setLabel(PlaybackSettings::tr("Enable realtime priority threads"));
3168 
3169  gc->setHelpText(PlaybackSettings::tr("When running mythfrontend with root "
3170  "privileges, some threads can be "
3171  "given enhanced priority. Disable "
3172  "this if MythFrontend freezes during "
3173  "video playback."));
3174  gc->setValue(true);
3175 
3176  return gc;
3177 }
3178 
3180 {
3181  HostLineEdit *ge = new HostLineEdit("IgnoreDevices");
3182 
3183  ge->setLabel(MainGeneralSettings::tr("Ignore devices"));
3184 
3185  ge->setValue("");
3186 
3187  ge->setHelpText(MainGeneralSettings::tr("If there are any devices that you "
3188  "do not want to be monitored, list "
3189  "them here with commas in-between. "
3190  "The plugins will ignore them. "
3191  "Requires restart."));
3192  return ge;
3193 }
3194 
3196 {
3197  HostComboBox *gc = new HostComboBox("DisplayGroupTitleSort");
3198 
3199  gc->setLabel(PlaybackSettings::tr("Sort titles"));
3200 
3201  gc->addSelection(PlaybackSettings::tr("Alphabetically"),
3202  QString::number(PlaybackBox::TitleSortAlphabetical));
3203  gc->addSelection(PlaybackSettings::tr("By recording priority"),
3204  QString::number(PlaybackBox::TitleSortRecPriority));
3205 
3206  gc->setHelpText(PlaybackSettings::tr("Sets the title sorting order when "
3207  "the view is set to Titles only."));
3208  return gc;
3209 }
3210 
3212 {
3213  HostCheckBox *gc = new HostCheckBox("PlaybackWatchList");
3214 
3215  gc->setLabel(WatchListSettings::tr("Include the 'Watch List' group"));
3216 
3217  gc->setValue(true);
3218 
3219  gc->setHelpText(WatchListSettings::tr("The 'Watch List' is an abbreviated "
3220  "list of recordings sorted to "
3221  "highlight series and shows that "
3222  "need attention in order to keep up "
3223  "to date."));
3224  return gc;
3225 }
3226 
3228 {
3229  HostCheckBox *gc = new HostCheckBox("PlaybackWLStart");
3230 
3231  gc->setLabel(WatchListSettings::tr("Start from the Watch List view"));
3232 
3233  gc->setValue(false);
3234 
3235  gc->setHelpText(WatchListSettings::tr("If enabled, the 'Watch List' will "
3236  "be the initial view each time you "
3237  "enter the Watch Recordings screen"));
3238  return gc;
3239 }
3240 
3242 {
3243  HostCheckBox *gc = new HostCheckBox("PlaybackWLAutoExpire");
3244 
3245  gc->setLabel(WatchListSettings::tr("Exclude recordings not set for "
3246  "Auto-Expire"));
3247 
3248  gc->setValue(false);
3249 
3250  gc->setHelpText(WatchListSettings::tr("Set this if you turn off "
3251  "Auto-Expire only for recordings "
3252  "that you've seen and intend to "
3253  "keep. This option will exclude "
3254  "these recordings from the "
3255  "'Watch List'."));
3256  return gc;
3257 }
3258 
3260 {
3261  HostSpinBox *gs = new HostSpinBox("PlaybackWLMaxAge", 30, 180, 10);
3262 
3263  gs->setLabel(WatchListSettings::tr("Maximum days counted in the score"));
3264 
3265  gs->setValue(60);
3266 
3267  gs->setHelpText(WatchListSettings::tr("The 'Watch List' scores are based "
3268  "on 1 point equals one day since "
3269  "recording. This option limits the "
3270  "maximum score due to age and "
3271  "affects other weighting factors."));
3272  return gs;
3273 }
3274 
3276 {
3277  HostSpinBox *gs = new HostSpinBox("PlaybackWLBlackOut", 0, 5, 1);
3278 
3279  gs->setLabel(WatchListSettings::tr("Days to exclude weekly episodes after "
3280  "delete"));
3281 
3282  gs->setValue(2);
3283 
3284  gs->setHelpText(WatchListSettings::tr("When an episode is deleted or "
3285  "marked as watched, other episodes "
3286  "of the series are excluded from the "
3287  "'Watch List' for this interval of "
3288  "time. Daily shows also have a "
3289  "smaller interval based on this "
3290  "setting."));
3291  return gs;
3292 }
3293 
3296 {
3297 
3298  Setting* watchList = PlaybackWatchList();
3299  addChild(watchList);
3300  setTrigger(watchList);
3301 
3302  ConfigurationGroup* settings = new VerticalConfigurationGroup(false);
3303 
3304  settings->addChild(PlaybackWLStart());
3305  settings->addChild(PlaybackWLAutoExpire());
3306  settings->addChild(PlaybackWLMaxAge());
3307  settings->addChild(PlaybackWLBlackOut());
3308 
3309  addTarget("1", settings);
3310 
3311  addTarget("0", new VerticalConfigurationGroup(true));
3312 };
3313 
3315 {
3316  HostCheckBox *gc = new HostCheckBox("LCDShowTime");
3317 
3318  gc->setLabel(LcdSettings::tr("Display time"));
3319 
3320  gc->setHelpText(LcdSettings::tr("Display current time on idle LCD "
3321  "display."));
3322 
3323  gc->setValue(true);
3324 
3325  return gc;
3326 }
3327 
3329 {
3330  HostCheckBox *gc = new HostCheckBox("LCDShowRecStatus");
3331 
3332  gc->setLabel(LcdSettings::tr("Display recording status"));
3333 
3334  gc->setHelpText(LcdSettings::tr("Display current recordings information "
3335  "on LCD display."));
3336 
3337  gc->setValue(false);
3338 
3339  return gc;
3340 }
3341 
3343 {
3344  HostCheckBox *gc = new HostCheckBox("LCDShowMenu");
3345 
3346  gc->setLabel(LcdSettings::tr("Display menus"));
3347 
3348  gc->setHelpText(LcdSettings::tr("Display selected menu on LCD display. "));
3349 
3350  gc->setValue(true);
3351 
3352  return gc;
3353 }
3354 
3356 {
3357  HostSpinBox *gs = new HostSpinBox("LCDPopupTime", 1, 300, 1, true);
3358 
3359  gs->setLabel(LcdSettings::tr("Menu pop-up time"));
3360 
3361  gs->setHelpText(LcdSettings::tr("How many seconds the menu will remain "
3362  "visible after navigation."));
3363 
3364  gs->setValue(5);
3365 
3366  return gs;
3367 }
3368 
3370 {
3371  HostCheckBox *gc = new HostCheckBox("LCDShowMusic");
3372 
3373  gc->setLabel(LcdSettings::tr("Display music artist and title"));
3374 
3375  gc->setHelpText(LcdSettings::tr("Display playing artist and song title in "
3376  "MythMusic on LCD display."));
3377 
3378  gc->setValue(true);
3379 
3380  return gc;
3381 }
3382 
3384 {
3385  HostComboBox *gc = new HostComboBox("LCDShowMusicItems");
3386 
3387  gc->setLabel(LcdSettings::tr("Items"));
3388 
3389  gc->addSelection(LcdSettings::tr("Artist - Title"), "ArtistTitle");
3390  gc->addSelection(LcdSettings::tr("Artist [Album] Title"),
3391  "ArtistAlbumTitle");
3392 
3393  gc->setHelpText(LcdSettings::tr("Which items to show when playing music."));
3394 
3395  return gc;
3396 }
3397 
3399 {
3400  HostCheckBox *gc = new HostCheckBox("LCDShowChannel");
3401 
3402  gc->setLabel(LcdSettings::tr("Display channel information"));
3403 
3404  gc->setHelpText(LcdSettings::tr("Display tuned channel information on LCD "
3405  "display."));
3406 
3407  gc->setValue(true);
3408 
3409  return gc;
3410 }
3411 
3413 {
3414  HostCheckBox *gc = new HostCheckBox("LCDShowVolume");
3415 
3416  gc->setLabel(LcdSettings::tr("Display volume information"));
3417 
3418  gc->setHelpText(LcdSettings::tr("Display volume level information "
3419  "on LCD display."));
3420 
3421  gc->setValue(true);
3422 
3423  return gc;
3424 }
3425 
3427 {
3428  HostCheckBox *gc = new HostCheckBox("LCDShowGeneric");
3429 
3430  gc->setLabel(LcdSettings::tr("Display generic information"));
3431 
3432  gc->setHelpText(LcdSettings::tr("Display generic information on LCD display."));
3433 
3434  gc->setValue(true);
3435 
3436  return gc;
3437 }
3438 
3440 {
3441  HostCheckBox *gc = new HostCheckBox("LCDBacklightOn");
3442 
3443  gc->setLabel(LcdSettings::tr("Backlight always on"));
3444 
3445  gc->setHelpText(LcdSettings::tr("Turn on the backlight permanently on the "
3446  "LCD display."));
3447  gc->setValue(true);
3448 
3449  return gc;
3450 }
3451 
3453 {
3454  HostCheckBox *gc = new HostCheckBox("LCDHeartBeatOn");
3455 
3456  gc->setLabel(LcdSettings::tr("Heartbeat always on"));
3457 
3458  gc->setHelpText(LcdSettings::tr("Turn on the LCD heartbeat."));
3459 
3460  gc->setValue(false);
3461 
3462  return gc;
3463 }
3464 
3466 {
3467  HostCheckBox *gc = new HostCheckBox("LCDBigClock");
3468 
3469  gc->setLabel(LcdSettings::tr("Display large clock"));
3470 
3471  gc->setHelpText(LcdSettings::tr("On multiline displays try and display the "
3472  "time as large as possible."));
3473 
3474  gc->setValue(false);
3475 
3476  return gc;
3477 }
3478 
3480 {
3481  HostLineEdit *ge = new HostLineEdit("LCDKeyString");
3482 
3483  ge->setLabel(LcdSettings::tr("LCD key order"));
3484 
3485  ge->setValue("ABCDEF");
3486 
3487  ge->setHelpText(
3488  LcdSettings::tr("Enter the 6 Keypad Return Codes for your LCD keypad "
3489  "in the order in which you want the functions "
3490  "up/down/left/right/yes/no to operate. (See "
3491  "lcdproc/server/drivers/hd44780.c/keyMapMatrix[] "
3492  "or the matrix for your display)"));
3493  return ge;
3494 }
3495 
3497 {
3498  HostCheckBox *gc = new HostCheckBox("LCDEnable");
3499 
3500  gc->setLabel(LcdSettings::tr("Enable LCD device"));
3501 
3502  gc->setHelpText(LcdSettings::tr("Use an LCD display to view MythTV status "
3503  "information."));
3504 
3505  gc->setValue(false);
3506 
3507  return gc;
3508 }
3509 
3511  false, false,
3512  false, false,
3513  false, false)
3514 {
3515  setLabel(tr("LCD device display"));
3516  setUseLabel(false);
3517 
3518  Setting* lcd_enable = LCDEnable();
3519  addChild(lcd_enable);
3520  setTrigger(lcd_enable);
3521 
3522  ConfigurationGroup *settings =
3523  new VerticalConfigurationGroup(false, true, false, false);
3524  ConfigurationGroup *setHoriz =
3525  new HorizontalConfigurationGroup(false, false, false, false);
3526 
3527  ConfigurationGroup* setLeft =
3528  new VerticalConfigurationGroup(false, false, false, false);
3529  ConfigurationGroup* setRight =
3530  new VerticalConfigurationGroup(false, false, false, false);
3531 
3532  setLeft->addChild(LCDShowTime());
3533  setLeft->addChild(LCDShowMenu());
3534  setLeft->addChild(LCDShowMusic());
3535  setLeft->addChild(LCDShowMusicItems());
3536  setLeft->addChild(LCDShowChannel());
3537  setLeft->addChild(LCDShowRecStatus());
3538  setRight->addChild(LCDShowVolume());
3539  setRight->addChild(LCDShowGeneric());
3540  setRight->addChild(LCDBacklightOn());
3541  setRight->addChild(LCDHeartBeatOn());
3542  setRight->addChild(LCDBigClock());
3543  setRight->addChild(LCDKeyString());
3544  setHoriz->addChild(setLeft);
3545  setHoriz->addChild(setRight);
3546  settings->addChild(setHoriz);
3547  settings->addChild(LCDPopupTime());
3548 
3549  addTarget("1", settings);
3550 
3551  addTarget("0", new VerticalConfigurationGroup(true));
3552 };
3553 
3554 
3555 #if CONFIG_DARWIN
3557 {
3558  HostCheckBox *gc = new HostCheckBox("MacGammaCorrect");
3559 
3560  gc->setLabel(PlaybackSettings::tr("Enable gamma correction for video"));
3561 
3562  gc->setValue(false);
3563 
3564  gc->setHelpText(PlaybackSettings::tr("If enabled, QuickTime will correct "
3565  "the gamma of the video to match "
3566  "your monitor. Turning this off can "
3567  "save some CPU cycles."));
3568  return gc;
3569 }
3570 
3572 {
3573  HostCheckBox *gc = new HostCheckBox("MacScaleUp");
3574 
3575  gc->setLabel(PlaybackSettings::tr("Scale video as necessary"));
3576 
3577  gc->setValue(true);
3578 
3579  gc->setHelpText(PlaybackSettings::tr("If enabled, video will be scaled to "
3580  "fit your window or screen. If "
3581  "unchecked, video will never be made "
3582  "larger than its actual pixel size."));
3583  return gc;
3584 }
3585 
3587 {
3588  HostSpinBox *gs = new HostSpinBox("MacFullSkip", 0, 30, 1, true);
3589 
3590  gs->setLabel(PlaybackSettings::tr("Frames to skip in fullscreen mode"));
3591 
3592  gs->setValue(0);
3593 
3594  gs->setHelpText(PlaybackSettings::tr("Video displayed in fullscreen or "
3595  "non-windowed mode will skip this "
3596  "many frames for each frame drawn. "
3597  "Set to 0 to show every frame. Only "
3598  "valid when either \"Use GUI size for "
3599  "TV playback\" or \"Run the frontend "
3600  "in a window\" is not checked."));
3601  return gs;
3602 }
3603 
3605 {
3606  HostCheckBox *gc = new HostCheckBox("MacMainEnabled");
3607 
3608  gc->setLabel(MacMainSettings::tr("Video in main window"));
3609 
3610  gc->setValue(true);
3611 
3612  gc->setHelpText(MacMainSettings::tr("If enabled, video will be displayed "
3613  "in the main GUI window. Disable this "
3614  "when you only want video on the "
3615  "desktop or in a floating window. Only "
3616  "valid when \"Use GUI size for TV "
3617  "playback\" and \"Run the frontend in "
3618  "a window\" are checked."));
3619  return gc;
3620 }
3621 
3623 {
3624  HostSpinBox *gs = new HostSpinBox("MacMainSkip", 0, 30, 1, true);
3625 
3626  gs->setLabel(MacMainSettings::tr("Frames to skip"));
3627 
3628  gs->setValue(0);
3629 
3630  gs->setHelpText(MacMainSettings::tr("Video in the main window will skip "
3631  "this many frames for each frame "
3632  "drawn. Set to 0 to show every "
3633  "frame."));
3634  return gs;
3635 }
3636 
3638 {
3639  HostSpinBox *gs = new HostSpinBox("MacMainOpacity", 0, 100, 5, false);
3640 
3641  gs->setLabel(MacMainSettings::tr("Opacity"));
3642 
3643  gs->setValue(100);
3644 
3645  gs->setHelpText(MacMainSettings::tr("The opacity of the main window. Set "
3646  "to 100 for completely opaque, set "
3647  "to 0 for completely transparent."));
3648  return gs;
3649 }
3650 
3652 {
3653  setLabel(tr("Video in main window"));
3654  setUseLabel(false);
3655  Setting *gc = MacMainEnabled();
3656  addChild(gc);
3657  setTrigger(gc);
3658 
3660  new VerticalConfigurationGroup(false, false);
3661  opts->addChild(MacMainSkip());
3662  opts->addChild(MacMainOpacity());
3663 
3664  addTarget("1", opts);
3665  addTarget("0", new VerticalConfigurationGroup(false, false));
3666 
3667 };
3668 
3670 {
3671  HostCheckBox *gc = new HostCheckBox("MacFloatEnabled");
3672 
3673  gc->setLabel(MacFloatSettings::tr("Video in floating window"));
3674 
3675  gc->setValue(false);
3676 
3677  gc->setHelpText(MacFloatSettings::tr("If enabled, video will be displayed "
3678  "in a floating window. Only valid "
3679  "when \"Use GUI size for TV "
3680  "playback\" and \"Run the frontend "
3681  "in a window\" are checked."));
3682  return gc;
3683 }
3684 
3686 {
3687  HostSpinBox *gs = new HostSpinBox("MacFloatSkip", 0, 30, 1, true);
3688 
3689  gs->setLabel(MacFloatSettings::tr("Frames to skip"));
3690 
3691  gs->setValue(0);
3692 
3693  gs->setHelpText(MacFloatSettings::tr("Video in the floating window will "
3694  "skip this many frames for each "
3695  "frame drawn. Set to 0 to show "
3696  "every frame."));
3697  return gs;
3698 }
3699 
3701 {
3702  HostSpinBox *gs = new HostSpinBox("MacFloatOpacity", 0, 100, 5, false);
3703 
3704  gs->setLabel(MacFloatSettings::tr("Opacity"));
3705 
3706  gs->setValue(100);
3707 
3708  gs->setHelpText(MacFloatSettings::tr("The opacity of the floating window. "
3709  "Set to 100 for completely opaque, "
3710  "set to 0 for completely "
3711  "transparent."));
3712  return gs;
3713 }
3714 
3716 {
3717  setLabel(tr("Video in floating window"));
3718 
3719  setUseLabel(false);
3720  Setting *gc = MacFloatEnabled();
3721  addChild(gc);
3722  setTrigger(gc);
3723 
3725  new VerticalConfigurationGroup(false, false);
3726  opts->addChild(MacFloatSkip());
3727  opts->addChild(MacFloatOpacity());
3728 
3729  addTarget("1", opts);
3730  addTarget("0", new VerticalConfigurationGroup(false, false));
3731 
3732 };
3733 
3735 {
3736  HostCheckBox *gc = new HostCheckBox("MacDockEnabled");
3737 
3738  gc->setLabel(MacDockSettings::tr("Video in the dock"));
3739 
3740  gc->setValue(true);
3741 
3742  gc->setHelpText(MacDockSettings::tr("If enabled, video will be displayed "
3743  "in the application's dock icon. Only "
3744  "valid when \"Use GUI size for TV "
3745  "playback\" and \"Run the frontend in "
3746  "a window\" are checked."));
3747  return gc;
3748 }
3749 
3751 {
3752  HostSpinBox *gs = new HostSpinBox("MacDockSkip", 0, 30, 1, true);
3753 
3754  gs->setLabel(MacDockSettings::tr("Frames to skip"));
3755 
3756  gs->setValue(3);
3757 
3758  gs->setHelpText(MacDockSettings::tr("Video in the dock icon will skip this "
3759  "many frames for each frame drawn. Set "
3760  "to 0 to show every frame."));
3761  return gs;
3762 }
3763 
3765 {
3766  setLabel(tr("Video in the dock"));
3767  setUseLabel(false);
3768  Setting *gc = MacDockEnabled();
3769  addChild(gc);
3770  setTrigger(gc);
3771 
3772  Setting *skip = MacDockSkip();
3773  addTarget("1", skip);
3774  addTarget("0", new HorizontalConfigurationGroup(false, false));
3775 
3776 };
3777 
3779 {
3780  HostCheckBox *gc = new HostCheckBox("MacDesktopEnabled");
3781 
3782  gc->setLabel(MacDesktopSettings::tr("Video on the desktop"));
3783 
3784  gc->setValue(false);
3785 
3786  gc->setHelpText(MacDesktopSettings::tr("If enabled, video will be "
3787  "displayed on the desktop, "
3788  "behind the Finder icons. "
3789  "Only valid when \"Use GUI "
3790  "size for TV playback\" and "
3791  "\"Run the frontend in a "
3792  "window\" are checked."));
3793  return gc;
3794 }
3795 
3797 {
3798  HostSpinBox *gs = new HostSpinBox("MacDesktopSkip", 0, 30, 1, true);
3799 
3800  gs->setLabel(MacDesktopSettings::tr("Frames to skip"));
3801 
3802  gs->setValue(0);
3803 
3804  gs->setHelpText(MacDesktopSettings::tr("Video on the desktop will skip "
3805  "this many frames for each frame "
3806  "drawn. Set to 0 to show every "
3807  "frame."));
3808  return gs;
3809 }
3810 
3812 {
3813  setLabel(tr("Video on the desktop"));
3814  setUseLabel(false);
3815  Setting *gc = MacDesktopEnabled();
3816  addChild(gc);
3817  setTrigger(gc);
3818  Setting *skip = MacDesktopSkip();
3819  addTarget("1", skip);
3820  addTarget("0", new HorizontalConfigurationGroup(false, false));
3821 
3822 };
3823 #endif
3824 
3825 MainGeneralSettings::MainGeneralSettings()
3826 {
3828 
3830  new VerticalConfigurationGroup(false, true, false, false);
3831  pin->setLabel(tr("Settings Access"));
3832  pin->addChild(SetupPinCode());
3833  addChild(pin);
3834 
3835  VerticalConfigurationGroup *general =
3836  new VerticalConfigurationGroup(false, true, false, false);
3837  general->setLabel(tr("General"));
3838  general->addChild(UseVirtualKeyboard());
3839  general->addChild(ScreenShotPath());
3840  addChild(general);
3841 
3843  new VerticalConfigurationGroup(false, true, false, false);
3844  media->setLabel(tr("Media Monitor"));
3845  media->addChild(IgnoreMedia());
3846  addChild(media);
3847 
3848  VerticalConfigurationGroup *remotecontrol =
3849  new VerticalConfigurationGroup(false, true, false, false);
3850  remotecontrol->setLabel(tr("Remote Control"));
3851  remotecontrol->addChild(LircDaemonDevice());
3852  remotecontrol->addChild(NetworkControlEnabled());
3853  remotecontrol->addChild(NetworkControlPort());
3854  remotecontrol->addChild(UDPNotifyPort());
3855  addChild(remotecontrol);
3856 
3857 #ifdef USING_AIRPLAY
3858  VerticalConfigurationGroup *airplay =
3859  new VerticalConfigurationGroup(false, true, false, false);
3860  airplay->setLabel(tr("AirPlay Settings"));
3861  airplay->addChild(AirPlayEnabled());
3862  airplay->addChild(AirPlayFullScreen());
3863  airplay->addChild(AirPlayAudioOnly());
3864  airplay->addChild(AirPlayPasswordSettings());
3865  airplay->addChild(AirPlayInfo());
3866  airplay->addChild(AirPlayRSAInfo());
3867  addChild(airplay);
3868 #endif
3869 
3870  VerticalConfigurationGroup *shutdownSettings =
3871  new VerticalConfigurationGroup(true, true, false, false);
3872  shutdownSettings->setLabel(tr("Shutdown/Reboot Settings"));
3873  shutdownSettings->addChild(FrontendIdleTimeout());
3874  shutdownSettings->addChild(OverrideExitMenu());
3875  shutdownSettings->addChild(HaltCommand());
3876  shutdownSettings->addChild(RebootCommand());
3877  addChild(shutdownSettings);
3878 }
3879 
3880 PlaybackSettings::PlaybackSettings()
3881 {
3882  uint i = 0, total = 8;
3883 #if CONFIG_DARWIN
3884  total += 2;
3885 #endif // USING_DARWIN
3886 
3887 
3888  VerticalConfigurationGroup* general1 =
3889  new VerticalConfigurationGroup(false);
3890 
3891  //: %2 is the position, %2 is the total
3892  general1->setLabel(tr("General Playback (%1/%2)")
3893  .arg(++i).arg(total));
3894 
3895  HorizontalConfigurationGroup *columns =
3896  new HorizontalConfigurationGroup(false, false, true, true);
3897 
3898  VerticalConfigurationGroup *column1 =
3899  new VerticalConfigurationGroup(false, false, true, true);
3900  column1->addChild(RealtimePriority());
3901  column1->addChild(DecodeExtraAudio());
3902  column1->addChild(JumpToProgramOSD());
3903 #if CONFIG_DEBUGTYPE
3904  column1->addChild(FFmpegDemuxer());
3905 #endif
3906  columns->addChild(column1);
3907 
3908  VerticalConfigurationGroup *column2 =
3909  new VerticalConfigurationGroup(false, false, true, true);
3910  column2->addChild(ClearSavedPosition());
3911  column2->addChild(AltClearSavedPosition());
3912  column2->addChild(AutomaticSetWatched());
3913  column2->addChild(ContinueEmbeddedTVPlay());
3914  columns->addChild(column2);
3915 
3916  general1->addChild(columns);
3917  general1->addChild(LiveTVIdleTimeout());
3918  addChild(general1);
3919 
3920  VerticalConfigurationGroup* general2 =
3921  new VerticalConfigurationGroup(false);
3922 
3923  //" %1 is the position, %2 is the total
3924  general2->setLabel(tr("General Playback (%1/%2)")
3925  .arg(++i).arg(total));
3926 
3928  new HorizontalConfigurationGroup(false, false, true, true);
3930  new VerticalConfigurationGroup(false, false, true, true);
3932  new VerticalConfigurationGroup(false, false, true, true);
3933  ocol1->addChild(VertScanPercentage());
3934  ocol1->addChild(YScanDisplacement());
3935  ocol2->addChild(HorizScanPercentage());
3936  ocol2->addChild(XScanDisplacement());
3937  oscan->addChild(ocol1);
3938  oscan->addChild(ocol2);
3939 
3940  HorizontalConfigurationGroup* aspect_fill =
3941  new HorizontalConfigurationGroup(false, false, true, true);
3942  aspect_fill->addChild(AspectOverride());
3943  aspect_fill->addChild(AdjustFill());
3944 
3945  general2->addChild(oscan);
3946  general2->addChild(aspect_fill);
3947  general2->addChild(LetterboxingColour());
3948  general2->addChild(PIPLocationComboBox());
3949  general2->addChild(PlaybackExitPrompt());
3950  general2->addChild(EndOfRecordingExitPrompt());
3951  addChild(general2);
3952 
3953  QString tmp = QString(" (%1/%2)").arg(++i).arg(total);
3954  addChild(new PlaybackProfileConfigs(tmp));
3955 
3957 
3958  //: %1 is the position, %2 is the total
3959  pbox->setLabel(tr("View Recordings (%1/%2)").arg(++i).arg(total));
3960 
3961  pbox->addChild(PlayBoxOrdering());
3962  pbox->addChild(PlayBoxEpisodeSort());
3963  // Disabled until we re-enable live previews
3964  // pbox->addChild(PlaybackPreview());
3965  // pbox->addChild(HWAccelPlaybackPreview());
3966  pbox->addChild(PBBStartInTitle());
3967  addChild(pbox);
3968 
3970 
3971  //: %1 is the position, %2 is the total
3972  pbox2->setLabel(tr("Recording Groups (%1/%2)").arg(++i).arg(total));
3973 
3974  pbox2->addChild(DisplayRecGroup());
3975  pbox2->addChild(QueryInitialFilter());
3976  pbox2->addChild(RememberRecGroup());
3977 
3978  addChild(pbox2);
3979 
3981 
3982  //: %1 is the position, %2 is the total
3983  pbox3->setLabel(tr("View Recordings (%1/%2)").arg(++i).arg(total));
3984 
3985  pbox3->addChild(DisplayGroupTitleSort());
3986  pbox3->addChild(new WatchListSettings());
3987 
3988  addChild(pbox3);
3989 
3991 
3992  //: %1 is the position, %2 is the total
3993  seek->setLabel(tr("Seeking (%1/%2)").arg(++i).arg(total));
3994 
3995  seek->addChild(SmartForward());
3996  seek->addChild(FFRewReposTime());
3997  seek->addChild(FFRewReverse());
3998 
3999  addChild(seek);
4000 
4002 
4003  //: %1 is the position, %2 is the total
4004  comms->setLabel(tr("Commercial Skip (%1/%2)").arg(++i).arg(total));
4005 
4006  comms->addChild(AutoCommercialSkip());
4007  comms->addChild(CommRewindAmount());
4008  comms->addChild(CommNotifyAmount());
4009  comms->addChild(MaximumCommercialSkip());
4010  comms->addChild(MergeShortCommBreaks());
4011 
4012  addChild(comms);
4013 
4014 #if CONFIG_DARWIN
4016 
4017  //: %1 is the position, %2 is the total
4018  mac1->setLabel(tr("Mac OS X Video Setting (%1/%2)").arg(++i).arg(total));
4019 
4020  mac1->addChild(MacGammaCorrect());
4021  mac1->addChild(MacScaleUp());
4022  mac1->addChild(MacFullSkip());
4023 
4024  addChild(mac1);
4025 
4027 
4028  //: %1 is the position, %2 is the total
4029  mac2->setLabel(tr("Mac OS X Video Settings (%1/%2)").arg(++i).arg(total));
4030 
4031  mac2->addChild(new MacMainSettings());
4032  mac2->addChild(new MacFloatSettings());
4033 
4035  new HorizontalConfigurationGroup(false, false, true, true);
4036  row->addChild(new MacDockSettings());
4037  row->addChild(new MacDesktopSettings());
4038  mac2->addChild(row);
4039 
4040  addChild(mac2);
4041 #endif
4042 }
4043 
4044 OSDSettings::OSDSettings()
4045 {
4047 
4048  osd->setLabel(tr("On-screen Display"));
4049 
4050  osd->addChild(EnableMHEG());
4051  osd->addChild(EnableMHEGic());
4053  osd->addChild(BrowseAllTuners());
4054  osd->addChild(DefaultCCMode());
4055  osd->addChild(SubtitleCodec());
4056 
4057  addChild(osd);
4058 
4059  //VerticalConfigurationGroup *cc = new VerticalConfigurationGroup(false);
4060  //cc->setLabel(tr("Closed Captions"));
4061  //cc->addChild(DecodeVBIFormat());
4062  //addChild(cc);
4063 
4064 #if defined(Q_OS_MACX)
4065  // Any Mac OS-specific OSD stuff would go here.
4066 #endif
4067 }
4068 
4070 {
4072 
4073  general->setLabel(tr("General (Basic)"));
4074  general->addChild(ChannelOrdering());
4075  general->addChild(ChannelFormat());
4076  general->addChild(LongChannelFormat());
4077 
4078  addChild(general);
4079 
4081 
4082  autoexp->setLabel(tr("General (Auto-Expire)"));
4083 
4084  autoexp->addChild(AutoExpireMethod());
4085 
4086  VerticalConfigurationGroup *expgrp0 =
4087  new VerticalConfigurationGroup(false, false, true, true);
4088 
4089  expgrp0->addChild(RerecordWatched());
4090  expgrp0->addChild(AutoExpireWatchedPriority());
4091 
4092  VerticalConfigurationGroup *expgrp1 =
4093  new VerticalConfigurationGroup(false, false, true, true);
4094 
4095  expgrp1->addChild(AutoExpireLiveTVMaxAge());
4096  expgrp1->addChild(AutoExpireDayPriority());
4097  expgrp1->addChild(AutoExpireExtraSpace());
4098 
4100  new HorizontalConfigurationGroup(false, false, true, true);
4101 
4102  expgrp->addChild(expgrp0);
4103  expgrp->addChild(expgrp1);
4104 
4105  autoexp->addChild(expgrp);
4106 // autoexp->addChild(new DeletedExpireOptions());
4107  autoexp->addChild(DeletedMaxAge());
4108 
4109  addChild(autoexp);
4110 
4112 
4113  jobs->setLabel(tr("General (Jobs)"));
4114 
4115  jobs->addChild(CommercialSkipMethod());
4116  jobs->addChild(CommFlagFast());
4117  jobs->addChild(AggressiveCommDetect());
4119 
4120  addChild(jobs);
4121 
4123 
4124  general2->setLabel(tr("General (Advanced)"));
4125 
4126  general2->addChild(RecordPreRoll());
4127  general2->addChild(RecordOverTime());
4128  general2->addChild(CategoryOverTimeSettings());
4129  addChild(general2);
4130 
4132 
4133  changrp->setLabel(tr("General (Channel Groups)"));
4134 
4135  ChannelGroupSettings *changroupsettings = new ChannelGroupSettings();
4136  changrp->addChild(changroupsettings);
4137  changrp->addChild(BrowseChannelGroup());
4138 
4139  addChild(changrp);
4140 }
4141 
4142 EPGSettings::EPGSettings()
4143 {
4145 
4146  epg->setLabel(tr("Program Guide %1/%2").arg("1").arg("1"));
4147 
4148  epg->addChild(DefaultTVChannel());
4149  epg->addChild(EPGRecThreshold());
4150 
4151  addChild(epg);
4152 }
4153 
4154 GeneralRecPrioritiesSettings::GeneralRecPrioritiesSettings()
4155 {
4157 
4158  sched->setLabel(tr("Scheduler Options"));
4159 
4160  sched->addChild(GRSchedOpenEnd());
4161  sched->addChild(GRPrefInputRecPriority());
4162  sched->addChild(GRHDTVRecPriority());
4163  sched->addChild(GRWSRecPriority());
4164 
4165  addChild(sched);
4166 
4168 
4169  access->setLabel(tr("Accessibility Options"));
4170 
4171  access->addChild(GRSignLangRecPriority());
4172  access->addChild(GROnScrSubRecPriority());
4173  access->addChild(GRCCRecPriority());
4174  access->addChild(GRHardHearRecPriority());
4175  access->addChild(GRAudioDescRecPriority());
4176 
4177  addChild(access);
4178 }
4179 
4180 AppearanceSettings::AppearanceSettings()
4181 {
4183  screen->setLabel(tr("Theme / Screen Settings"));
4184 
4185 #if ! CONFIG_DARWIN
4186  screen->addChild(ThemePainter());
4187 #endif
4188  screen->addChild(MenuTheme());
4189 
4191  {
4192  screen->addChild(XineramaScreen());
4194  }
4195 
4196 // screen->addChild(DisplaySizeHeight());
4197 // screen->addChild(DisplaySizeWidth());
4198 
4199  VerticalConfigurationGroup *column1 =
4200  new VerticalConfigurationGroup(false, false, false, false);
4201 
4202  column1->addChild(GuiWidth());
4203  column1->addChild(GuiHeight());
4204  column1->addChild(GuiOffsetX());
4205  column1->addChild(GuiOffsetY());
4206 
4207  VerticalConfigurationGroup *column2 =
4208  new VerticalConfigurationGroup(false, false, false, false);
4209 
4210  column2->addChild(GuiSizeForTV());
4211  column2->addChild(HideMouseCursor());
4212  column2->addChild(RunInWindow());
4213  column2->addChild(UseFixedWindowSize());
4214  column2->addChild(AlwaysOnTop());
4215 #ifdef USING_AIRPLAY
4216  column2->addChild(AirPlayFullScreen());
4217 #endif
4218 
4219  HorizontalConfigurationGroup *columns =
4220  new HorizontalConfigurationGroup(false, false, false, false);
4221 
4222  columns->addChild(column1);
4223  columns->addChild(column2);
4224 
4225  screen->addChild(columns);
4226 
4227  addChild(screen);
4228 
4229 #if defined(USING_XRANDR) || CONFIG_DARWIN
4230  const vector<DisplayResScreen> scr = GetVideoModes();
4231  if (!scr.empty())
4232  addChild(new VideoModeSettings());
4233 #endif
4235 
4236  dates->setLabel(tr("Localization"));
4237 
4238  dates->addChild(MythLanguage());
4239  dates->addChild(ISO639PreferredLanguage(0));
4240  dates->addChild(ISO639PreferredLanguage(1));
4241  dates->addChild(MythDateFormatCB());
4242  dates->addChild(MythShortDateFormat());
4243  dates->addChild(MythTimeFormat());
4244 
4245  addChild(dates);
4246 
4247  addChild(new LcdSettings());
4248 }
4249 
4250 // 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:785
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:431
static HostRefreshRateComboBox * TVVidModeRefreshRate(int idx=-1)
static QString GetDeinterlacerName(const QString &short_name)
static HostComboBox * OverrideExitMenu()
virtual void Load(void)
void orenderChanged(const QString &renderer)
static QStringList GetOSDs(const QString &video_renderer)
void valueChanged(const QString &)
static HostComboBox * TVVidModeForceAspect(int idx=-1)
VERBOSE_PREAMBLE false
Definition: verbosedefs.h:83
static uint GetProfileGroupID(const QString &profilename, const QString &hostname)
static HostCheckBox * ChannelGroupRememberLast()
virtual void setLabel(QString str)
Definition: settings.cpp:930
static GlobalSpinBox * DeletedMaxAge()
static HostSpinBox * GuiWidth()
static HostCheckBox * LCDShowGeneric()
static HostComboBox * XineramaMonitorAspectRatio()
static void CreateProfiles(const QString &hostname)
bool replaceChild(Configurable *old_child, Configurable *new_child)
static HostCheckBox * PlaybackWLStart()
void priorityChanged(const QString &name, int)
static QString RSALastError(void)
static HostSpinBox * MacMainSkip()
virtual 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:47
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)
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:139
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()
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()
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()
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:542
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:428
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 HostCheckBox * AlwaysOnTop()
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
VERBOSE_PREAMBLE Most Errors or other very important messages true
Definition: verbosedefs.h:91
string defaultsettings
Definition: mythburn.py:137
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.
Definition: mythdbcon.cpp:810
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:67
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:86
virtual void setLabel(QString str)
Definition: settings.h:57
virtual DialogCode exec(bool saveOnExec=true, bool doLoad=true)
static HostSpinBox * DisplaySizeWidth()
static HostSpinBox * YScanDisplacement()
void swap(int indexA, int intexB)
static GlobalSpinBox * RecordOverTime()
void Set(const QString &value, const QString &data)
static HostComboBox * LongChannelFormat()
static HostComboBox * MythDateFormatCB()
LetterBoxColour
Definition: videoouttypes.h: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:59
static HostComboBox * ChannelOrdering()
static HostLineEdit * RebootCommand()
Scheduler * sched
static QString GetDecoderHelp(QString decoder=QString::null)
static GlobalComboBox * AutoExpireMethod()
static bool SaveDB(uint groupid, item_list_t &)
static QString iso639_key_to_str3(int code)
Definition: iso639.h:45
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:610
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()
GLenum GLsizei len
static HostCheckBox * UseVideoModes()
virtual void setValue(int newValue)
Definition: settings.cpp:521
QMap< int, QString > _iso639_key_to_english_name
Definition: iso639.cpp:9
virtual void Save(void)
void addChild(Configurable *child)
static HostCheckBox * AltClearSavedPosition()
void addTarget(QString triggerValue, Configurable *target)
static HostSpinBox * FFRewReposTime()