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