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  !profiles.contains("OpenMAX High Quality"))
1252  {
1254  profiles = VideoDisplayProfile::GetProfiles(host);
1255  }
1256  // Special case for user upgrading from version that only
1257  // has OpenMAX Normal
1258  else if (!profiles.contains("OpenMAX High Quality"))
1259  {
1261  profiles = VideoDisplayProfile::GetProfiles(host);
1262  }
1263 #endif
1264 
1265 
1267  if (!profiles.contains(profile))
1268  {
1269  profile = (profiles.contains("Normal")) ? "Normal" : profiles[0];
1271  }
1272 
1273  grouptrigger = new HostComboBox("DefaultVideoPlaybackProfile");
1274 
1275  grouptrigger->setLabel(tr("Current Video Playback Profile"));
1276 
1277  QStringList::const_iterator it;
1278  for (it = profiles.begin(); it != profiles.end(); ++it)
1280 
1282  new HorizontalConfigurationGroup(false, false, true, true);
1283  TransButtonSetting *addProf = new TransButtonSetting("add");
1284  TransButtonSetting *delProf = new TransButtonSetting("del");
1285 
1286  addProf->setLabel(tr("Add New"));
1287  delProf->setLabel(QCoreApplication::translate("(Common)", "Delete"));
1288 
1289  grp->addChild(grouptrigger);
1290  grp->addChild(addProf);
1291  grp->addChild(delProf);
1292 
1293  addChild(grp);
1294 
1296  for (it = profiles.begin(); it != profiles.end(); ++it)
1297  addTarget(*it, new PlaybackProfileConfig(*it));
1298  setSaveAll(true);
1299 
1300  connect(addProf, SIGNAL(pressed( QString)),
1301  this, SLOT (btnPress(QString)));
1302  connect(delProf, SIGNAL(pressed( QString)),
1303  this, SLOT (btnPress(QString)));
1304 }
1305 
1307 {
1308 #if 0
1309  LOG(VB_GENERAL, LOG_DEBUG, "~PlaybackProfileConfigs()");
1310 #endif
1311 }
1312 
1314 {
1315  if (cmd == "add")
1316  {
1317  QString name;
1318 
1319  QString host = gCoreContext->GetHostName();
1320  QStringList not_ok_list = VideoDisplayProfile::GetProfiles(host);
1321 
1322  bool ok = true;
1323  while (ok)
1324  {
1325  QString msg = tr("Enter Playback Group Name");
1326 
1328  GetMythMainWindow(), msg, msg, name);
1329 
1330  if (!ok)
1331  return;
1332 
1333  if (not_ok_list.contains(name) || name.isEmpty())
1334  {
1335  msg = (name.isEmpty()) ?
1336  tr("Sorry, playback group\nname cannot be blank.") :
1337  tr("Sorry, playback group name\n"
1338  "'%1' is already being used.").arg(name);
1339 
1341  GetMythMainWindow(), QCoreApplication::translate("(Common)",
1342  "Error"), msg);
1343 
1344  continue;
1345  }
1346 
1347  break;
1348  }
1349 
1351  addTarget(name, new PlaybackProfileConfig(name));
1352 
1353  if (grouptrigger)
1354  grouptrigger->addSelection(name, name, true);
1355  }
1356  else if ((cmd == "del") && grouptrigger)
1357  {
1358  const QString name = grouptrigger->getSelectionLabel();
1359  if (!name.isEmpty())
1360  {
1361  removeTarget(name);
1363  name, gCoreContext->GetHostName());
1364  // This would be better done in TriggeredConfigurationGroup::removeTarget
1365  // however, as removeTarget is used elsewhere, limit the changes to this
1366  // case only
1368  }
1369  }
1370 
1371  repaint();
1372 }
1373 
1375 {
1377 }
1378 
1380 {
1381  QString str[4] =
1382  {
1383  PlaybackSettings::tr("Sort all sub-titles/multi-titles Ascending"),
1384  PlaybackSettings::tr("Sort all sub-titles/multi-titles Descending"),
1385  PlaybackSettings::tr("Sort sub-titles Descending, multi-titles "
1386  "Ascending"),
1387  PlaybackSettings::tr("Sort sub-titles Ascending, multi-titles Descending"),
1388  };
1389 
1390  QString help = PlaybackSettings::tr("Selects how to sort show episodes. "
1391  "Sub-titles refers to the episodes "
1392  "listed under a specific show title. "
1393  "Multi-title refers to sections (e.g. "
1394  "\"All Programs\") which list multiple "
1395  "titles. Sections in parentheses are "
1396  "not affected.");
1397 
1398  HostComboBox *gc = new HostComboBox("PlayBoxOrdering");
1399 
1400  gc->setLabel(PlaybackSettings::tr("Episode sort orderings"));
1401 
1402  for (int i = 0; i < 4; ++i)
1403  gc->addSelection(str[i], QString::number(i));
1404 
1405  gc->setValue(1);
1406  gc->setHelpText(help);
1407 
1408  return gc;
1409 }
1410 
1412 {
1413  HostComboBox *gc = new HostComboBox("PlayBoxEpisodeSort");
1414 
1415  gc->setLabel(PlaybackSettings::tr("Sort episodes"));
1416 
1417  gc->addSelection(PlaybackSettings::tr("Record date"), "Date");
1418  gc->addSelection(PlaybackSettings::tr("Season/Episode"), "Season");
1419  gc->addSelection(PlaybackSettings::tr("Original air date"), "OrigAirDate");
1420  gc->addSelection(PlaybackSettings::tr("Program ID"), "Id");
1421 
1422  gc->setHelpText(PlaybackSettings::tr("Selects how to sort a show's "
1423  "episodes"));
1424 
1425  return gc;
1426 }
1427 
1429 {
1430  HostSpinBox *gs = new HostSpinBox("FFRewReposTime", 0, 200, 5);
1431 
1432  gs->setLabel(PlaybackSettings::tr("Fast forward/rewind reposition amount"));
1433 
1434  gs->setValue(100);
1435 
1436  gs->setHelpText(PlaybackSettings::tr("When exiting sticky keys fast "
1437  "forward/rewind mode, reposition "
1438  "this many 1/100th seconds before "
1439  "resuming normal playback. This "
1440  "compensates for the reaction time "
1441  "between seeing where to resume "
1442  "playback and actually exiting "
1443  "seeking."));
1444  return gs;
1445 }
1446 
1448 {
1449  HostCheckBox *gc = new HostCheckBox("FFRewReverse");
1450 
1451  gc->setLabel(PlaybackSettings::tr("Reverse direction in fast "
1452  "forward/rewind"));
1453 
1454  gc->setValue(true);
1455 
1456  gc->setHelpText(PlaybackSettings::tr("If enabled, pressing the sticky "
1457  "rewind key in fast forward mode "
1458  "switches to rewind mode, and "
1459  "vice versa. If disabled, it will "
1460  "decrease the current speed or "
1461  "switch to play mode if the speed "
1462  "can't be decreased further."));
1463  return gc;
1464 }
1465 
1467 {
1468  HostComboBox *gc = new HostComboBox("MenuTheme");
1469 
1470  gc->setLabel(AppearanceSettings::tr("Menu theme"));
1471 
1472  QList<ThemeInfo> themelist = GetMythUI()->GetThemes(THEME_MENU);
1473 
1474  QList<ThemeInfo>::iterator it;
1475  for( it = themelist.begin(); it != themelist.end(); ++it )
1476  {
1477  gc->addSelection((*it).GetName(), (*it).GetDirectoryName(),
1478  (*it).GetDirectoryName() == "defaultmenu");
1479  }
1480 
1481  return gc;
1482 }
1483 
1485 {
1486  QString beVBI = gCoreContext->GetSetting("VbiFormat");
1487  QString fmt = beVBI.toLower().left(4);
1488  int sel = (fmt == "pal ") ? 1 : ((fmt == "ntsc") ? 2 : 0);
1489 
1490  HostComboBox *gc = new HostComboBox("DecodeVBIFormat");
1491 
1492  gc->setLabel(OSDSettings::tr("Decode VBI format"));
1493 
1494  gc->addSelection(OSDSettings::tr("None"), "none",
1495  0 == sel);
1496  gc->addSelection(OSDSettings::tr("PAL teletext"), "pal_txt",
1497  1 == sel);
1498  gc->addSelection(OSDSettings::tr("NTSC closed caption"), "ntsc_cc",
1499  2 == sel);
1500 
1501  gc->setHelpText(
1502  OSDSettings::tr("If enabled, this overrides the mythtv-setup setting "
1503  "used during recording when decoding captions."));
1504 
1505  return gc;
1506 }
1507 
1509 {
1510  HostComboBox *gc = new HostComboBox("SubtitleCodec");
1511 
1512  gc->setLabel(OSDSettings::tr("Subtitle Codec"));
1513 
1514  QList<QByteArray> list = QTextCodec::availableCodecs();
1515 
1516  for (uint i = 0; i < (uint) list.size(); ++i)
1517  {
1518  QString val = QString(list[i]);
1519  gc->addSelection(val, val, val.toLower() == "utf-8");
1520  }
1521 
1522  return gc;
1523 }
1524 
1526 {
1527  HostComboBox *gc = new HostComboBox("ChannelOrdering");
1528 
1529  gc->setLabel(GeneralSettings::tr("Channel ordering"));
1530 
1531  gc->addSelection(GeneralSettings::tr("channel number"), "channum");
1532  gc->addSelection(GeneralSettings::tr("callsign"), "callsign");
1533 
1534  return gc;
1535 }
1536 
1538 {
1539  HostSpinBox *gs = new HostSpinBox("VertScanPercentage", -100, 100, 1);
1540 
1541  gs->setLabel(PlaybackSettings::tr("Vertical scaling"));
1542 
1543  gs->setValue(0);
1544 
1545  gs->setHelpText(PlaybackSettings::tr("Adjust this if the image does not "
1546  "fill your screen vertically. Range "
1547  "-100% to 100%"));
1548  return gs;
1549 }
1550 
1552 {
1553  HostSpinBox *gs = new HostSpinBox("HorizScanPercentage", -100, 100, 1);
1554 
1555  gs->setLabel(PlaybackSettings::tr("Horizontal scaling"));
1556 
1557  gs->setValue(0);
1558 
1559  gs->setHelpText(PlaybackSettings::tr("Adjust this if the image does not "
1560  "fill your screen horizontally. Range "
1561  "-100% to 100%"));
1562  return gs;
1563 };
1564 
1566 {
1567  HostSpinBox *gs = new HostSpinBox("XScanDisplacement", -50, 50, 1);
1568 
1569  gs->setLabel(PlaybackSettings::tr("Scan displacement (X)"));
1570 
1571  gs->setValue(0);
1572 
1573  gs->setHelpText(PlaybackSettings::tr("Adjust this to move the image "
1574  "horizontally."));
1575 
1576  return gs;
1577 }
1578 
1580 {
1581  HostSpinBox *gs = new HostSpinBox("YScanDisplacement", -50, 50, 1);
1582 
1583  gs->setLabel(PlaybackSettings::tr("Scan displacement (Y)"));
1584 
1585  gs->setValue(0);
1586 
1587  gs->setHelpText(PlaybackSettings::tr("Adjust this to move the image "
1588  "vertically."));
1589 
1590  return gs;
1591 };
1592 
1594 {
1595  HostCheckBox *gc = new HostCheckBox("DefaultCCMode");
1596 
1597  gc->setLabel(OSDSettings::tr("Always display closed captioning or "
1598  "subtitles"));
1599 
1600  gc->setValue(false);
1601 
1602  gc->setHelpText(OSDSettings::tr("If enabled, captions will be displayed "
1603  "when playing back recordings or watching "
1604  "Live TV. Closed Captioning can be turned "
1605  "on or off by pressing \"T\" during"
1606  "playback."));
1607  return gc;
1608 }
1609 
1611 {
1612  HostCheckBox *gc = new HostCheckBox("EnableMHEG");
1613 
1614  gc->setLabel(OSDSettings::tr("Enable interactive TV"));
1615 
1616  gc->setValue(false);
1617 
1618  gc->setHelpText(OSDSettings::tr("If enabled, interactive TV applications "
1619  "(MHEG) will be activated. This is used "
1620  "for teletext and logos for radio and "
1621  "channels that are currently off-air."));
1622  return gc;
1623 }
1624 
1626 {
1627  HostCheckBox *gc = new HostCheckBox("EnableMHEGic");
1628  gc->setLabel(OSDSettings::tr("Enable network access for interactive TV"));
1629  gc->setValue(true);
1630  gc->setHelpText(OSDSettings::tr("If enabled, interactive TV applications "
1631  "(MHEG) will be able to access interactive "
1632  "content over the Internet. This is used "
1633  "for BBC iPlayer."));
1634  return gc;
1635 }
1636 
1638 {
1639  HostCheckBox *gc = new HostCheckBox("PersistentBrowseMode");
1640 
1641  gc->setLabel(OSDSettings::tr("Always use browse mode in Live TV"));
1642 
1643  gc->setValue(true);
1644 
1645  gc->setHelpText(OSDSettings::tr("If enabled, browse mode will "
1646  "automatically be activated whenever "
1647  "you use channel up/down while watching "
1648  "Live TV."));
1649  return gc;
1650 }
1651 
1653 {
1654  HostCheckBox *gc = new HostCheckBox("BrowseAllTuners");
1655 
1656  gc->setLabel(OSDSettings::tr("Browse all channels"));
1657 
1658  gc->setValue(false);
1659 
1660  gc->setHelpText(OSDSettings::tr("If enabled, browse mode will show "
1661  "channels on all available recording "
1662  "devices, instead of showing channels "
1663  "on just the current recorder."));
1664  return gc;
1665 }
1666 
1668 {
1669  HostCheckBox *gc = new HostCheckBox("ClearSavedPosition");
1670 
1671  gc->setLabel(PlaybackSettings::tr("Clear bookmark on playback"));
1672 
1673  gc->setValue(true);
1674 
1675  gc->setHelpText(PlaybackSettings::tr("If enabled, automatically clear the "
1676  "bookmark on a recording when the "
1677  "recording is played back. If "
1678  "disabled, you can mark the "
1679  "beginning with rewind then save "
1680  "position."));
1681  return gc;
1682 }
1683 
1685 {
1686  HostCheckBox *gc = new HostCheckBox("AltClearSavedPosition");
1687 
1688  gc->setLabel(PlaybackSettings::tr("Alternate clear and save bookmark"));
1689 
1690  gc->setValue(true);
1691 
1692  gc->setHelpText(PlaybackSettings::tr("During playback the SELECT key "
1693  "(Enter or Space) will alternate "
1694  "between \"Bookmark Saved\" and "
1695  "\"Bookmark Cleared\". If disabled, "
1696  "the SELECT key will save the current "
1697  "position for each keypress."));
1698  return gc;
1699 }
1700 
1702 {
1703  HostComboBox *gc = new HostComboBox("PlaybackExitPrompt");
1704 
1705  gc->setLabel(PlaybackSettings::tr("Action on playback exit"));
1706 
1707  gc->addSelection(PlaybackSettings::tr("Just exit"), "0");
1708  gc->addSelection(PlaybackSettings::tr("Save position and exit"), "2");
1709  gc->addSelection(PlaybackSettings::tr("Always prompt (excluding Live TV)"),
1710  "1");
1711  gc->addSelection(PlaybackSettings::tr("Always prompt (including Live TV)"),
1712  "4");
1713  gc->addSelection(PlaybackSettings::tr("Prompt for Live TV only"), "8");
1714 
1715  gc->setHelpText(PlaybackSettings::tr("If set to prompt, a menu will be "
1716  "displayed when you exit playback "
1717  "mode. The options available will "
1718  "allow you to save your position, "
1719  "delete the recording, or continue "
1720  "watching."));
1721  return gc;
1722 }
1723 
1725 {
1726  HostCheckBox *gc = new HostCheckBox("EndOfRecordingExitPrompt");
1727 
1728  gc->setLabel(PlaybackSettings::tr("Prompt at end of recording"));
1729 
1730  gc->setValue(false);
1731 
1732  gc->setHelpText(PlaybackSettings::tr("If enabled, a menu will be displayed "
1733  "allowing you to delete the recording "
1734  "when it has finished playing."));
1735  return gc;
1736 }
1737 
1739 {
1740  HostCheckBox *gc = new HostCheckBox("JumpToProgramOSD");
1741 
1742  gc->setLabel(PlaybackSettings::tr("Jump to program OSD"));
1743 
1744  gc->setValue(true);
1745 
1746  gc->setHelpText(PlaybackSettings::tr("Set the choice between viewing the "
1747  "current recording group in the OSD, "
1748  "or showing the 'Watch Recording' "
1749  "screen when 'Jump to Program' is "
1750  "activated. If enabled, the "
1751  "recordings are shown in the OSD"));
1752  return gc;
1753 }
1754 
1756 {
1757  HostCheckBox *gc = new HostCheckBox("ContinueEmbeddedTVPlay");
1758 
1759  gc->setLabel(PlaybackSettings::tr("Continue playback when embedded"));
1760 
1761  gc->setValue(false);
1762 
1763  gc->setHelpText(PlaybackSettings::tr("If enabled, TV playback continues "
1764  "when the TV window is embedded in "
1765  "the upcoming program list or "
1766  "recorded list. The default is to "
1767  "pause the recorded show when "
1768  "embedded."));
1769  return gc;
1770 }
1771 
1773 {
1774  HostCheckBox *gc = new HostCheckBox("AutomaticSetWatched");
1775 
1776  gc->setLabel(PlaybackSettings::tr("Automatically mark a recording as "
1777  "watched"));
1778 
1779  gc->setValue(false);
1780 
1781  gc->setHelpText(PlaybackSettings::tr("If enabled, when you exit near the "
1782  "end of a recording it will be marked "
1783  "as watched. The automatic detection "
1784  "is not foolproof, so do not enable "
1785  "this setting if you don't want an "
1786  "unwatched recording marked as "
1787  "watched."));
1788  return gc;
1789 }
1790 
1792 {
1793  HostSpinBox *gs = new HostSpinBox("LiveTVIdleTimeout", 0, 3600, 1);
1794 
1795  gs->setLabel(PlaybackSettings::tr("Live TV idle timeout (mins)"));
1796 
1797  gs->setValue(0);
1798 
1799  gs->setHelpText(PlaybackSettings::tr("Exit Live TV automatically if left "
1800  "idle for the specified number of "
1801  "minutes. 0 disables the timeout."));
1802  return gs;
1803 }
1804 
1805 // static HostCheckBox *PlaybackPreview()
1806 // {
1807 // HostCheckBox *gc = new HostCheckBox("PlaybackPreview");
1808 //
1809 // gc->setLabel(PlaybackSettings::tr("Display live preview of recordings"));
1810 //
1811 // gc->setValue(true);
1812 //
1813 // gc->setHelpText(PlaybackSettings::tr("If enabled, a preview of the recording "
1814 // "will play in a small window on the \"Watch a "
1815 // "Recording\" menu."));
1816 //
1817 // return gc;
1818 // }
1819 //
1820 // static HostCheckBox *HWAccelPlaybackPreview()
1821 // {
1822 // HostCheckBox *gc = new HostCheckBox("HWAccelPlaybackPreview");
1823 //
1824 // gc->setLabel(PlaybackSettings::tr("Use HW Acceleration for live recording preview"));
1825 //
1826 // gc->setValue(false);
1827 //
1828 // gc->setHelpText(
1829 // PlaybackSettings::tr(
1830 // "If enabled, live recording preview will use hardware "
1831 // "acceleration. The video renderer used is determined by the "
1832 // "selected CPU profile. Disable if playback is sluggish or "
1833 // "causes high CPU load"));
1834 //
1835 // return gc;
1836 // }
1837 
1839 {
1840  HostCheckBox *gc = new HostCheckBox("UseVirtualKeyboard");
1841 
1842  gc->setLabel(MainGeneralSettings::tr("Use line edit virtual keyboards"));
1843 
1844  gc->setValue(true);
1845 
1846  gc->setHelpText(MainGeneralSettings::tr("If enabled, you can use a virtual "
1847  "keyboard in MythTV's line edit "
1848  "boxes. To use, hit SELECT (Enter "
1849  "or Space) while a line edit is in "
1850  "focus."));
1851  return gc;
1852 }
1853 
1855 {
1856  HostSpinBox *gs = new HostSpinBox("FrontendIdleTimeout", 0, 360, 15);
1857 
1858  gs->setLabel(MainGeneralSettings::tr("Idle time before entering standby "
1859  "mode (minutes)"));
1860 
1861  gs->setValue(90);
1862 
1863  gs->setHelpText(MainGeneralSettings::tr("Number of minutes to wait when "
1864  "the frontend is idle before "
1865  "entering standby mode. Standby "
1866  "mode allows the backend to power "
1867  "down if configured to do so. Any "
1868  "remote or mouse input will cause "
1869  "the countdown to start again "
1870  "and/or exit idle mode. Video "
1871  "playback suspends the countdown. "
1872  "A value of zero prevents the "
1873  "frontend automatically entering "
1874  "standby."));
1875  return gs;
1876 }
1877 
1879 {
1880  HostComboBox *gc = new HostComboBox("OverrideExitMenu");
1881 
1882  gc->setLabel(MainGeneralSettings::tr("Customize exit menu options"));
1883 
1884  gc->addSelection(MainGeneralSettings::tr("Default"), "0");
1885  gc->addSelection(MainGeneralSettings::tr("Show quit"), "1");
1886  gc->addSelection(MainGeneralSettings::tr("Show quit and shutdown"), "2");
1887  gc->addSelection(MainGeneralSettings::tr("Show quit, reboot and shutdown"),
1888  "3");
1889  gc->addSelection(MainGeneralSettings::tr("Show shutdown"), "4");
1890  gc->addSelection(MainGeneralSettings::tr("Show reboot"), "5");
1891  gc->addSelection(MainGeneralSettings::tr("Show reboot and shutdown"), "6");
1892  gc->addSelection(MainGeneralSettings::tr("Show standby"), "7");
1893 
1894  gc->setHelpText(
1895  MainGeneralSettings::tr("By default, only remote frontends are shown "
1896  "the shutdown option on the exit menu. Here "
1897  "you can force specific shutdown and reboot "
1898  "options to be displayed."));
1899  return gc;
1900 }
1901 
1903 {
1904  HostLineEdit *ge = new HostLineEdit("RebootCommand");
1905 
1906  ge->setLabel(MainGeneralSettings::tr("Reboot command"));
1907 
1908  ge->setValue("");
1909 
1910  ge->setHelpText(MainGeneralSettings::tr("Optional. Script to run if you "
1911  "select the reboot option from the "
1912  "exit menu, if the option is "
1913  "displayed. You must configure an "
1914  "exit key to display the exit "
1915  "menu."));
1916  return ge;
1917 }
1918 
1920 {
1921  HostLineEdit *ge = new HostLineEdit("HaltCommand");
1922 
1923  ge->setLabel(MainGeneralSettings::tr("Halt command"));
1924 
1925  ge->setValue("");
1926 
1927  ge->setHelpText(MainGeneralSettings::tr("Optional. Script to run if you "
1928  "select the shutdown option from "
1929  "the exit menu, if the option is "
1930  "displayed. You must configure an "
1931  "exit key to display the exit "
1932  "menu."));
1933  return ge;
1934 }
1935 
1937 {
1938  HostLineEdit *ge = new HostLineEdit("LircSocket");
1939 
1940  ge->setLabel(MainGeneralSettings::tr("LIRC daemon socket"));
1941 
1942  /* lircd socket moved from /dev/ to /var/run/lirc/ in lirc 0.8.6 */
1943  QString lirc_socket = "/dev/lircd";
1944 
1945  if (!QFile::exists(lirc_socket))
1946  lirc_socket = "/var/run/lirc/lircd";
1947 
1948  ge->setValue(lirc_socket);
1949 
1950  QString help = MainGeneralSettings::tr("UNIX socket or IP address[:port] "
1951  "to connect in order to communicate "
1952  "with the LIRC Daemon.");
1953  ge->setHelpText(help);
1954 
1955  return ge;
1956 }
1957 
1959 {
1960  HostLineEdit *ge = new HostLineEdit("ScreenShotPath");
1961 
1962  ge->setLabel(MainGeneralSettings::tr("Screen shot path"));
1963 
1964  ge->setValue("/tmp/");
1965 
1966  ge->setHelpText(MainGeneralSettings::tr("Path to screenshot storage "
1967  "location. Should be writable "
1968  "by the frontend"));
1969 
1970  return ge;
1971 }
1972 
1974 {
1975  HostLineEdit *ge = new HostLineEdit("SetupPinCode");
1976 
1977  ge->setLabel(MainGeneralSettings::tr("Setup PIN code"));
1978 
1979  ge->setHelpText(MainGeneralSettings::tr("This PIN is used to control "
1980  "access to the setup menus. "
1981  "If you want to use this feature, "
1982  "then setting the value to all "
1983  "numbers will make your life much "
1984  "easier. Set it to blank to "
1985  "disable. If enabled, you will not "
1986  "be able to return to this screen "
1987  "and reset the Setup PIN without "
1988  "first entering the current PIN."));
1989  return ge;
1990 }
1991 
1993 {
1994  HostComboBox *gc = new HostComboBox("XineramaScreen", false);
1996 
1997  for (int i=0; i<num; ++i)
1998  gc->addSelection(QString::number(i), QString::number(i));
1999 
2000  gc->addSelection(AppearanceSettings::tr("All"), QString::number(-1));
2001 
2002  gc->setLabel(AppearanceSettings::tr("Display on screen"));
2003 
2004  gc->setValue(0);
2005 
2006  gc->setHelpText(AppearanceSettings::tr("Run on the specified screen or "
2007  "spanning all screens."));
2008  return gc;
2009 }
2010 
2011 
2013 {
2014  HostComboBox *gc = new HostComboBox("XineramaMonitorAspectRatio");
2015 
2016  gc->setLabel(AppearanceSettings::tr("Monitor aspect ratio"));
2017 
2018  gc->addSelection(AppearanceSettings::tr("16:9"), "1.7777");
2019  gc->addSelection(AppearanceSettings::tr("16:10"), "1.6");
2020  gc->addSelection(AppearanceSettings::tr("4:3"), "1.3333");
2021 
2022  gc->setHelpText(AppearanceSettings::tr("The aspect ratio of a Xinerama "
2023  "display cannot be queried from "
2024  "the display, so it must be "
2025  "specified."));
2026  return gc;
2027 }
2028 
2030 {
2031  HostComboBox *gc = new HostComboBox("LetterboxColour");
2032 
2033  gc->setLabel(PlaybackSettings::tr("Letterboxing color"));
2034 
2035  for (int m = kLetterBoxColour_Black; m < kLetterBoxColour_END; ++m)
2036  gc->addSelection(toString((LetterBoxColour)m), QString::number(m));
2037 
2038  gc->setHelpText(PlaybackSettings::tr("By default MythTV uses black "
2039  "letterboxing to match broadcaster "
2040  "letterboxing, but those with plasma "
2041  "screens may prefer gray to minimize "
2042  "burn-in. Currently only works with "
2043  "XVideo video renderer."));
2044  return gc;
2045 }
2046 
2048 {
2049  HostComboBox *gc = new HostComboBox("AspectOverride");
2050 
2051  gc->setLabel(PlaybackSettings::tr("Video aspect override"));
2052 
2053  for (int m = kAspect_Off; m < kAspect_END; ++m)
2054  gc->addSelection(toString((AspectOverrideMode)m), QString::number(m));
2055 
2056  gc->setHelpText(PlaybackSettings::tr("When enabled, these will override "
2057  "the aspect ratio specified by any "
2058  "broadcaster for all video streams."));
2059  return gc;
2060 }
2061 
2063 {
2064  HostComboBox *gc = new HostComboBox("AdjustFill");
2065 
2066  gc->setLabel(PlaybackSettings::tr("Zoom"));
2067 
2068  for (int m = kAdjustFill_Off; m < kAdjustFill_END; ++m)
2069  gc->addSelection(toString((AdjustFillMode)m), QString::number(m));
2071  QString::number(kAdjustFill_AutoDetect_DefaultOff));
2073  QString::number(kAdjustFill_AutoDetect_DefaultHalf));
2074 
2075  gc->setHelpText(PlaybackSettings::tr("When enabled, these will apply a "
2076  "predefined zoom to all video "
2077  "playback in MythTV."));
2078  return gc;
2079 }
2080 
2081 // Theme settings
2082 
2084 {
2085  HostSpinBox *gs = new HostSpinBox("GuiWidth", 0, 1920, 8, true);
2086 
2087  gs->setLabel(AppearanceSettings::tr("GUI width (pixels)"));
2088 
2089  gs->setValue(0);
2090 
2091  gs->setHelpText(AppearanceSettings::tr("The width of the GUI. Do not make "
2092  "the GUI wider than your actual "
2093  "screen resolution. Set to 0 to "
2094  "automatically scale to "
2095  "fullscreen."));
2096  return gs;
2097 }
2098 
2100 {
2101  HostSpinBox *gs = new HostSpinBox("GuiHeight", 0, 1600, 8, true);
2102 
2103  gs->setLabel(AppearanceSettings::tr("GUI height (pixels)"));
2104 
2105  gs->setValue(0);
2106 
2107  gs->setHelpText(AppearanceSettings::tr("The height of the GUI. Do not make "
2108  "the GUI taller than your actual "
2109  "screen resolution. Set to 0 to "
2110  "automatically scale to "
2111  "fullscreen."));
2112  return gs;
2113 }
2114 
2116 {
2117  HostSpinBox *gs = new HostSpinBox("GuiOffsetX", -3840, 3840, 32, true);
2118 
2119  gs->setLabel(AppearanceSettings::tr("GUI X offset"));
2120 
2121  gs->setValue(0);
2122 
2123  gs->setHelpText(AppearanceSettings::tr("The horizontal offset where the "
2124  "GUI will be displayed. May only "
2125  "work if run in a window."));
2126  return gs;
2127 }
2128 
2130 {
2131  HostSpinBox *gs = new HostSpinBox("GuiOffsetY", -1600, 1600, 8, true);
2132 
2133  gs->setLabel(AppearanceSettings::tr("GUI Y offset"));
2134 
2135  gs->setValue(0);
2136 
2137  gs->setHelpText(AppearanceSettings::tr("The vertical offset where the "
2138  "GUI will be displayed."));
2139  return gs;
2140 }
2141 
2142 #if 0
2144 {
2145  HostSpinBox *gs = new HostSpinBox("DisplaySizeWidth", 0, 10000, 1);
2146 
2147  gs->setLabel(AppearanceSettings::tr("Display size - width"));
2148 
2149  gs->setValue(0);
2150 
2151  gs->setHelpText(AppearanceSettings::tr("Horizontal size of the monitor or TV. Used "
2152  "to calculate the actual aspect ratio of the display. This "
2153  "will override the DisplaySize from the system."));
2154 
2155  return gs;
2156 }
2157 
2159 {
2160  HostSpinBox *gs = new HostSpinBox("DisplaySizeHeight", 0, 10000, 1);
2161 
2162  gs->setLabel(AppearanceSettings::tr("Display size - height"));
2163 
2164  gs->setValue(0);
2165 
2166  gs->setHelpText(AppearanceSettings::tr("Vertical size of the monitor or TV. Used "
2167  "to calculate the actual aspect ratio of the display. This "
2168  "will override the DisplaySize from the system."));
2169 
2170  return gs;
2171 }
2172 #endif
2173 
2175 {
2176  HostCheckBox *gc = new HostCheckBox("GuiSizeForTV");
2177 
2178  gc->setLabel(AppearanceSettings::tr("Use GUI size for TV playback"));
2179 
2180  gc->setValue(true);
2181 
2182  gc->setHelpText(AppearanceSettings::tr("If enabled, use the above size for "
2183  "TV, otherwise use full screen."));
2184  return gc;
2185 }
2186 
2187 #if defined(USING_XRANDR) || CONFIG_DARWIN
2189 {
2190  HostCheckBox *gc = new HostCheckBox("UseVideoModes");
2191 
2192  gc->setLabel(VideoModeSettings::tr("Separate video modes for GUI and "
2193  "TV playback"));
2194 
2195  gc->setValue(false);
2196 
2197  gc->setHelpText(VideoModeSettings::tr("Switch X Window video modes for TV. "
2198  "Requires \"xrandr\" support."));
2199  return gc;
2200 }
2201 
2202 static HostSpinBox *VidModeWidth(int idx)
2203 {
2204  HostSpinBox *gs = new HostSpinBox(QString("VidModeWidth%1").arg(idx),
2205  0, 1920, 16, true);
2206 
2207  gs->setLabel((idx<1) ? VideoModeSettings::tr("In X", "Video mode width")
2208  : "");
2209 
2210  gs->setLabelAboveWidget(idx<1);
2211 
2212  gs->setValue(0);
2213 
2214  gs->setHelpText(VideoModeSettings::tr("Horizontal resolution of video "
2215  "which needs a special output "
2216  "resolution."));
2217  return gs;
2218 }
2219 
2220 static HostSpinBox *VidModeHeight(int idx)
2221 {
2222  HostSpinBox *gs = new HostSpinBox(QString("VidModeHeight%1").arg(idx),
2223  0, 1080, 16, true);
2224 
2225  gs->setLabel((idx<1) ? VideoModeSettings::tr("In Y", "Video mode height")
2226  : "");
2227 
2228  gs->setLabelAboveWidget(idx<1);
2229 
2230  gs->setValue(0);
2231 
2232  gs->setHelpText(VideoModeSettings::tr("Vertical resolution of video "
2233  "which needs a special output "
2234  "resolution."));
2235  return gs;
2236 }
2237 
2239 {
2240  HostComboBox *gc = new HostComboBox("GuiVidModeResolution");
2241 
2242  gc->setLabel(VideoModeSettings::tr("GUI"));
2243 
2244  gc->setLabelAboveWidget(true);
2245 
2246  gc->setHelpText(VideoModeSettings::tr("Resolution of screen when not "
2247  "watching a video."));
2248 
2249  const vector<DisplayResScreen> scr = GetVideoModes();
2250  for (uint i=0; i<scr.size(); ++i)
2251  {
2252  int w = scr[i].Width(), h = scr[i].Height();
2253  QString sel = QString("%1x%2").arg(w).arg(h);
2254  gc->addSelection(sel, sel);
2255  }
2256 
2257  // if no resolution setting, set it with a reasonable initial value
2258  if (scr.size() && (gCoreContext->GetSetting("GuiVidModeResolution").isEmpty()))
2259  {
2260  int w = 0, h = 0;
2261  gCoreContext->GetResolutionSetting("GuiVidMode", w, h);
2262  if ((w <= 0) || (h <= 0))
2263  (w = 640), (h = 480);
2264 
2265  DisplayResScreen dscr(w, h, -1, -1, -1.0, 0);
2266  double rate = -1.0;
2267  int i = DisplayResScreen::FindBestMatch(scr, dscr, rate);
2268  gc->setValue((i >= 0) ? i : scr.size()-1);
2269  }
2270 
2271  return gc;
2272 }
2273 
2275 {
2276  QString dhelp = VideoModeSettings::tr("Default screen resolution "
2277  "when watching a video.");
2278  QString ohelp = VideoModeSettings::tr("Screen resolution when watching a "
2279  "video at a specific resolution.");
2280 
2281  QString qstr = (idx<0) ? "TVVidModeResolution" :
2282  QString("TVVidModeResolution%1").arg(idx);
2283  HostComboBox *gc = new HostComboBox(qstr);
2284  QString lstr = (idx<0) ? VideoModeSettings::tr("Video output") :
2285  ((idx<1) ? VideoModeSettings::tr("Output") : "");
2286  QString hstr = (idx<0) ? dhelp : ohelp;
2287 
2288  gc->setLabel(lstr);
2289 
2290  gc->setLabelAboveWidget(idx<1);
2291  gc->setHelpText(hstr);
2292 
2293  const vector<DisplayResScreen> scr = GetVideoModes();
2294 
2295  for (uint i=0; i<scr.size(); ++i)
2296  {
2297  QString sel = QString("%1x%2").arg(scr[i].Width()).arg(scr[i].Height());
2298  gc->addSelection(sel, sel);
2299  }
2300 
2301  return gc;
2302 }
2303 
2305 {
2306  QString dhelp = VideoModeSettings::tr("Default refresh rate when watching "
2307  "a video. Leave at \"Auto\" to "
2308  "automatically use the best "
2309  "available");
2310  QString ohelp = VideoModeSettings::tr("Refresh rate when watching a "
2311  "video at a specific resolution. "
2312  "Leave at \"Auto\" to automatically "
2313  "use the best available");
2314 
2315  QString qstr = (idx<0) ? "TVVidModeRefreshRate" :
2316  QString("TVVidModeRefreshRate%1").arg(idx);
2318  QString lstr = (idx<1) ? VideoModeSettings::tr("Rate") : "";
2319  QString hstr = (idx<0) ? dhelp : ohelp;
2320 
2321  gc->setLabel(lstr);
2322  gc->setLabelAboveWidget(idx<1);
2323  gc->setHelpText(hstr);
2324  gc->setEnabled(false);
2325  return gc;
2326 }
2327 
2329 {
2330  QString dhelp = VideoModeSettings::tr("Aspect ratio when watching a "
2331  "video. Leave at \"%1\" to "
2332  "use ratio reported by the monitor. "
2333  "Set to 16:9 or 4:3 to force a "
2334  "specific aspect ratio.");
2335 
2336 
2337 
2338  QString ohelp = VideoModeSettings::tr("Aspect ratio when watching a "
2339  "video at a specific resolution. "
2340  "Leave at \"%1\" to use ratio "
2341  "reported by the monitor. Set to "
2342  "16:9 or 4:3 to force a specific "
2343  "aspect ratio.");
2344 
2345  QString qstr = (idx<0) ? "TVVidModeForceAspect" :
2346  QString("TVVidModeForceAspect%1").arg(idx);
2347 
2348  HostComboBox *gc = new HostComboBox(qstr);
2349 
2350  gc->setLabel( (idx<1) ? VideoModeSettings::tr("Aspect") : "" );
2351 
2352  gc->setLabelAboveWidget(idx<1);
2353 
2354  QString hstr = (idx<0) ? dhelp : ohelp;
2355 
2356  gc->setHelpText(hstr.arg(VideoModeSettings::tr("Default")));
2357 
2358  gc->addSelection(VideoModeSettings::tr("Default"), "0.0");
2359  gc->addSelection("16:9", "1.77777777777");
2360  gc->addSelection("4:3", "1.33333333333");
2361 
2362  return gc;
2363 }
2364 
2367 {
2368  setLabel(tr("Video Mode Settings"));
2369  setUseLabel(false);
2370 
2372  addChild(videomode);
2373  setTrigger(videomode);
2374 
2376  new HorizontalConfigurationGroup(false, false);
2377 
2380 
2381  defaultsettings->addChild(GuiVidModeResolution());
2382  defaultsettings->addChild(res);
2383  defaultsettings->addChild(rate);
2384  defaultsettings->addChild(TVVidModeForceAspect());
2385  connect(res, SIGNAL(valueChanged(const QString&)),
2386  rate, SLOT(ChangeResolution(const QString&)));
2387 
2388  ConfigurationGroup* overrides =
2389  new GridConfigurationGroup(5, true, true, false, true);
2390 
2391  overrides->setLabel(tr("Overrides for specific video sizes"));
2392 
2393  for (int idx = 0; idx < 3; ++idx)
2394  {
2395  //input side
2396  overrides->addChild(VidModeWidth(idx));
2397  overrides->addChild(VidModeHeight(idx));
2398  // output side
2399  overrides->addChild(res = TVVidModeResolution(idx));
2400  overrides->addChild(rate = TVVidModeRefreshRate(idx));
2401  overrides->addChild(TVVidModeForceAspect(idx));
2402 
2403  connect(res, SIGNAL(valueChanged(const QString&)),
2404  rate, SLOT(ChangeResolution(const QString&)));
2405  }
2406 
2407  ConfigurationGroup* settings = new VerticalConfigurationGroup(false);
2408 
2409  settings->addChild(defaultsettings);
2410  settings->addChild(overrides);
2411 
2412  addTarget("1", settings);
2413  addTarget("0", new VerticalConfigurationGroup(true));
2414 
2415 };
2416 #endif
2417 
2419 {
2420  HostCheckBox *gc = new HostCheckBox("HideMouseCursor");
2421 
2422  gc->setLabel(AppearanceSettings::tr("Hide mouse cursor in MythTV"));
2423 
2424  gc->setValue(false);
2425 
2426  gc->setHelpText(AppearanceSettings::tr("Toggles mouse cursor visibility "
2427  "for touchscreens. By default "
2428  "MythTV will auto-hide the cursor "
2429  "if the mouse doesn't move for a "
2430  "period, this setting disables the "
2431  "cursor entirely."));
2432  return gc;
2433 };
2434 
2435 
2437 {
2438  HostCheckBox *gc = new HostCheckBox("RunFrontendInWindow");
2439 
2440  gc->setLabel(AppearanceSettings::tr("Use window border"));
2441 
2442  gc->setValue(false);
2443 
2444  gc->setHelpText(AppearanceSettings::tr("Toggles between windowed and "
2445  "borderless operation."));
2446  return gc;
2447 }
2448 
2450 {
2451  HostCheckBox *gc = new HostCheckBox("UseFixedWindowSize");
2452 
2453  gc->setLabel(AppearanceSettings::tr("Use fixed window size"));
2454 
2455  gc->setValue(true);
2456 
2457  gc->setHelpText(AppearanceSettings::tr("If disabled, the video playback "
2458  "window can be resized"));
2459  return gc;
2460 }
2461 
2463 {
2464  HostCheckBox *gc = new HostCheckBox("AlwaysOnTop");
2465 
2466  gc->setLabel(AppearanceSettings::tr("Always On Top"));
2467 
2468  gc->setValue(false);
2469 
2470  gc->setHelpText(AppearanceSettings::tr("If enabled, MythTV will always be "
2471  "on top"));
2472  return gc;
2473 }
2474 
2476 {
2477  HostComboBox *gc = new HostComboBox("DateFormat");
2478  gc->setLabel(AppearanceSettings::tr("Date format"));
2479 
2480  QDate sampdate = MythDate::current().toLocalTime().date();
2481  QString sampleStr = AppearanceSettings::tr("Samples are shown using "
2482  "today's date.");
2483 
2484  if (sampdate.month() == sampdate.day())
2485  {
2486  sampdate = sampdate.addDays(1);
2487  sampleStr = AppearanceSettings::tr("Samples are shown using "
2488  "tomorrow's date.");
2489  }
2490 
2491  QLocale locale = gCoreContext->GetQLocale();
2492 
2493  gc->addSelection(locale.toString(sampdate, "ddd MMM d"), "ddd MMM d");
2494  gc->addSelection(locale.toString(sampdate, "ddd d MMM"), "ddd d MMM");
2495  gc->addSelection(locale.toString(sampdate, "ddd MMMM d"), "ddd MMMM d");
2496  gc->addSelection(locale.toString(sampdate, "ddd d MMMM"), "ddd d MMMM");
2497  gc->addSelection(locale.toString(sampdate, "dddd MMM d"), "dddd MMM d");
2498  gc->addSelection(locale.toString(sampdate, "dddd d MMM"), "dddd d MMM");
2499  gc->addSelection(locale.toString(sampdate, "MMM d"), "MMM d");
2500  gc->addSelection(locale.toString(sampdate, "d MMM"), "d MMM");
2501  gc->addSelection(locale.toString(sampdate, "MM/dd"), "MM/dd");
2502  gc->addSelection(locale.toString(sampdate, "dd/MM"), "dd/MM");
2503  gc->addSelection(locale.toString(sampdate, "MM.dd"), "MM.dd");
2504  gc->addSelection(locale.toString(sampdate, "dd.MM"), "dd.MM");
2505  gc->addSelection(locale.toString(sampdate, "M/d/yyyy"), "M/d/yyyy");
2506  gc->addSelection(locale.toString(sampdate, "d/M/yyyy"), "d/M/yyyy");
2507  gc->addSelection(locale.toString(sampdate, "MM.dd.yyyy"), "MM.dd.yyyy");
2508  gc->addSelection(locale.toString(sampdate, "dd.MM.yyyy"), "dd.MM.yyyy");
2509  gc->addSelection(locale.toString(sampdate, "yyyy-MM-dd"), "yyyy-MM-dd");
2510  gc->addSelection(locale.toString(sampdate, "ddd MMM d yyyy"), "ddd MMM d yyyy");
2511  gc->addSelection(locale.toString(sampdate, "ddd d MMM yyyy"), "ddd d MMM yyyy");
2512  gc->addSelection(locale.toString(sampdate, "ddd yyyy-MM-dd"), "ddd yyyy-MM-dd");
2513 
2514  QString cn_long = QString("dddd yyyy") + QChar(0x5E74) +
2515  "M" + QChar(0x6708) + "d"+ QChar(0x65E5); // dddd yyyy年M月d日
2516  gc->addSelection(locale.toString(sampdate, cn_long), cn_long);
2517  QString cn_med = QString("dddd ") +
2518  "M" + QChar(0x6708) + "d"+ QChar(0x65E5); // dddd M月d日
2519 
2520  gc->addSelection(locale.toString(sampdate, cn_med), cn_med);
2521 
2522  //: %1 gives additional information regarding the date format
2523  gc->setHelpText(AppearanceSettings::tr("Your preferred date format. %1")
2524  .arg(sampleStr));
2525 
2526  return gc;
2527 }
2528 
2530 {
2531  HostComboBox *gc = new HostComboBox("ShortDateFormat");
2532  gc->setLabel(AppearanceSettings::tr("Short date format"));
2533 
2534  QDate sampdate = MythDate::current().toLocalTime().date();
2535 
2536  QString sampleStr = AppearanceSettings::tr("Samples are shown using "
2537  "today's date.");
2538 
2539  if (sampdate.month() == sampdate.day())
2540  {
2541  sampdate = sampdate.addDays(1);
2542  sampleStr = AppearanceSettings::tr("Samples are shown using "
2543  "tomorrow's date.");
2544  }
2545  QLocale locale = gCoreContext->GetQLocale();
2546 
2547  gc->addSelection(locale.toString(sampdate, "M/d"), "M/d");
2548  gc->addSelection(locale.toString(sampdate, "d/M"), "d/M");
2549  gc->addSelection(locale.toString(sampdate, "MM/dd"), "MM/dd");
2550  gc->addSelection(locale.toString(sampdate, "dd/MM"), "dd/MM");
2551  gc->addSelection(locale.toString(sampdate, "MM.dd"), "MM.dd");
2552  gc->addSelection(locale.toString(sampdate, "dd.MM."), "dd.MM.");
2553  gc->addSelection(locale.toString(sampdate, "M.d."), "M.d.");
2554  gc->addSelection(locale.toString(sampdate, "d.M."), "d.M.");
2555  gc->addSelection(locale.toString(sampdate, "MM-dd"), "MM-dd");
2556  gc->addSelection(locale.toString(sampdate, "dd-MM"), "dd-MM");
2557  gc->addSelection(locale.toString(sampdate, "MMM d"), "MMM d");
2558  gc->addSelection(locale.toString(sampdate, "d MMM"), "d MMM");
2559  gc->addSelection(locale.toString(sampdate, "ddd d"), "ddd d");
2560  gc->addSelection(locale.toString(sampdate, "d ddd"), "d ddd");
2561  gc->addSelection(locale.toString(sampdate, "ddd M/d"), "ddd M/d");
2562  gc->addSelection(locale.toString(sampdate, "ddd d/M"), "ddd d/M");
2563  gc->addSelection(locale.toString(sampdate, "ddd d.M"), "ddd d.M");
2564  gc->addSelection(locale.toString(sampdate, "ddd dd.MM"), "ddd dd.MM");
2565  gc->addSelection(locale.toString(sampdate, "M/d ddd"), "M/d ddd");
2566  gc->addSelection(locale.toString(sampdate, "d/M ddd"), "d/M ddd");
2567 
2568  QString cn_short1 = QString("M") + QChar(0x6708) + "d" + QChar(0x65E5); // M月d日
2569 
2570  gc->addSelection(locale.toString(sampdate, cn_short1), cn_short1);
2571 
2572  QString cn_short2 = QString("ddd M") + QChar(0x6708) + "d" + QChar(0x65E5); // ddd M月d日
2573 
2574  gc->addSelection(locale.toString(sampdate, cn_short2), cn_short2);
2575 
2576  //: %1 gives additional information regarding the date format
2577  gc->setHelpText(AppearanceSettings::tr("Your preferred short date format. %1")
2578  .arg(sampleStr));
2579  return gc;
2580 }
2581 
2583 {
2584  HostComboBox *gc = new HostComboBox("TimeFormat");
2585 
2586  gc->setLabel(AppearanceSettings::tr("Time format"));
2587 
2588  QTime samptime = QTime::currentTime();
2589 
2590  QLocale locale = gCoreContext->GetQLocale();
2591 
2592  gc->addSelection(locale.toString(samptime, "h:mm AP"), "h:mm AP");
2593  gc->addSelection(locale.toString(samptime, "h:mm ap"), "h:mm ap");
2594  gc->addSelection(locale.toString(samptime, "hh:mm AP"), "hh:mm AP");
2595  gc->addSelection(locale.toString(samptime, "hh:mm ap"), "hh:mm ap");
2596  gc->addSelection(locale.toString(samptime, "h:mm"), "h:mm");
2597  gc->addSelection(locale.toString(samptime, "hh:mm"), "hh:mm");
2598  gc->addSelection(locale.toString(samptime, "hh.mm"), "hh.mm");
2599  gc->addSelection(locale.toString(samptime, "AP h:mm"), "AP h:mm");
2600 
2601  gc->setHelpText(AppearanceSettings::tr("Your preferred time format. You "
2602  "must choose a format with \"AM\" "
2603  "or \"PM\" in it, otherwise your "
2604  "time display will be 24-hour or "
2605  "\"military\" time."));
2606  return gc;
2607 }
2608 
2609 #if ! CONFIG_DARWIN
2611 {
2612  HostComboBox *gc = new HostComboBox("ThemePainter");
2613 
2614  gc->setLabel(AppearanceSettings::tr("Paint engine"));
2615 
2616  gc->addSelection(QCoreApplication::translate("(Common)", "Qt"), QT_PAINTER);
2617  gc->addSelection(QCoreApplication::translate("(Common)", "Auto", "Automatic"),
2618  AUTO_PAINTER);
2619 #if defined USING_OPENGL && ! defined USING_OPENGLES
2620  gc->addSelection(QCoreApplication::translate("(Common)", "OpenGL 2"),
2621  OPENGL2_PAINTER);
2622  gc->addSelection(QCoreApplication::translate("(Common)", "OpenGL 1"),
2623  OPENGL_PAINTER);
2624 #endif
2625 #ifdef _WIN32
2626  gc->addSelection(QCoreApplication::translate("(Common)", "Direct3D"),
2627  D3D9_PAINTER);
2628 #endif
2629  gc->setHelpText(
2630  AppearanceSettings::tr("This selects what MythTV uses to draw. "
2631  "Choosing '%1' is recommended, unless running "
2632  "on systems with broken OpenGL implementations "
2633  "(broken hardware or drivers or windowing "
2634  "systems) where only Qt works.")
2635  .arg(QCoreApplication::translate("(Common)", "Auto", "Automatic")));
2636 
2637  return gc;
2638 }
2639 #endif
2640 
2642 {
2643  HostComboBox *gc = new HostComboBox("ChannelFormat");
2644 
2645  gc->setLabel(GeneralSettings::tr("Channel format"));
2646 
2647  gc->addSelection(GeneralSettings::tr("number"), "<num>");
2648  gc->addSelection(GeneralSettings::tr("number callsign"), "<num> <sign>");
2649  gc->addSelection(GeneralSettings::tr("number name"), "<num> <name>");
2650  gc->addSelection(GeneralSettings::tr("callsign"), "<sign>");
2651  gc->addSelection(GeneralSettings::tr("name"), "<name>");
2652 
2653  gc->setHelpText(GeneralSettings::tr("Your preferred channel format."));
2654 
2655  gc->setValue(1);
2656 
2657  return gc;
2658 }
2659 
2661 {
2662  HostComboBox *gc = new HostComboBox("LongChannelFormat");
2663 
2664  gc->setLabel(GeneralSettings::tr("Long channel format"));
2665 
2666  gc->addSelection(GeneralSettings::tr("number"), "<num>");
2667  gc->addSelection(GeneralSettings::tr("number callsign"), "<num> <sign>");
2668  gc->addSelection(GeneralSettings::tr("number name"), "<num> <name>");
2669  gc->addSelection(GeneralSettings::tr("callsign"), "<sign>");
2670  gc->addSelection(GeneralSettings::tr("name"), "<name>");
2671 
2672  gc->setHelpText(GeneralSettings::tr("Your preferred long channel format."));
2673 
2674  gc->setValue(2);
2675 
2676  return gc;
2677 }
2678 
2680 {
2681  HostCheckBox *gc = new HostCheckBox("ChannelGroupRememberLast");
2682 
2683  gc->setLabel(ChannelGroupSettings::tr("Remember last channel group"));
2684 
2685  gc->setHelpText(ChannelGroupSettings::tr("If enabled, the EPG will "
2686  "initially display only the "
2687  "channels from the last channel "
2688  "group selected. Pressing \"4\" "
2689  "will toggle channel group."));
2690 
2691  gc->setValue(false);
2692 
2693  return gc;
2694 }
2695 
2697 {
2698  HostComboBox *gc = new HostComboBox("ChannelGroupDefault");
2699 
2700  gc->setLabel(ChannelGroupSettings::tr("Default channel group"));
2701 
2702  ChannelGroupList changrplist;
2703 
2704  changrplist = ChannelGroup::GetChannelGroups();
2705 
2706  gc->addSelection(ChannelGroupSettings::tr("All Channels"), "-1");
2707 
2708  ChannelGroupList::iterator it;
2709 
2710  for (it = changrplist.begin(); it < changrplist.end(); ++it)
2711  gc->addSelection(it->name, QString("%1").arg(it->grpid));
2712 
2713  gc->setHelpText(ChannelGroupSettings::tr("Default channel group to be "
2714  "shown in the EPG. Pressing "
2715  "GUIDE key will toggle channel "
2716  "group."));
2717  gc->setValue(false);
2718 
2719  return gc;
2720 }
2721 
2723 {
2724  HostCheckBox *gc = new HostCheckBox("BrowseChannelGroup");
2725 
2726  gc->setLabel(GeneralSettings::tr("Browse/change channels from Channel "
2727  "Group"));
2728 
2729  gc->setHelpText(GeneralSettings::tr("If enabled, Live TV will browse or "
2730  "change channels from the selected "
2731  "channel group. The \"All Channels\" "
2732  "channel group may be selected to "
2733  "browse all channels."));
2734  gc->setValue(false);
2735 
2736  return gc;
2737 }
2738 
2739 // Channel Group Settings
2742 {
2743  setLabel(tr("Remember last channel group"));
2744  setUseLabel(false);
2745 
2746  Setting* RememberChanGrpEnabled = ChannelGroupRememberLast();
2747  addChild(RememberChanGrpEnabled);
2748  setTrigger(RememberChanGrpEnabled);
2749 
2750  ConfigurationGroup* settings = new VerticalConfigurationGroup(false,false);
2751  settings->addChild(ChannelGroupDefault());
2752  addTarget("0", settings);
2753 
2754  // show nothing if RememberChanGrpEnabled is on
2755  addTarget("1", new VerticalConfigurationGroup(true,false));
2756 };
2757 
2758 // General RecPriorities settings
2759 
2761 {
2762  GlobalComboBox *bc = new GlobalComboBox("SchedOpenEnd");
2763 
2764  bc->setLabel(GeneralRecPrioritiesSettings::tr("Avoid back to back "
2765  "recordings"));
2766 
2767  bc->setHelpText(
2768  GeneralRecPrioritiesSettings::tr("Selects the situations where the "
2769  "scheduler will avoid assigning shows "
2770  "to the same card if their end time "
2771  "and start time match. This will be "
2772  "allowed when necessary in order to "
2773  "resolve conflicts."));
2774 
2775  bc->addSelection(GeneralRecPrioritiesSettings::tr("Never"), "0");
2776  bc->addSelection(GeneralRecPrioritiesSettings::tr("Different Channels"),
2777  "1");
2778  bc->addSelection(GeneralRecPrioritiesSettings::tr("Always"), "2");
2779 
2780  bc->setValue(0);
2781 
2782  return bc;
2783 }
2784 
2786 {
2787  GlobalSpinBox *bs = new GlobalSpinBox("PrefInputPriority", 1, 99, 1);
2788 
2789  bs->setLabel(GeneralRecPrioritiesSettings::tr("Preferred input priority"));
2790 
2791  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority when "
2792  "a showing matches the "
2793  "preferred input selected "
2794  "in the 'Scheduling "
2795  "Options' section of the "
2796  "recording rule."));
2797 
2798  bs->setValue(2);
2799  return bs;
2800 }
2801 
2803 {
2804  GlobalSpinBox *bs = new GlobalSpinBox("HDTVRecPriority", -99, 99, 1);
2805 
2806  bs->setLabel(GeneralRecPrioritiesSettings::tr("HDTV recording priority"));
2807 
2808  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority when "
2809  "a showing is marked as an "
2810  "HDTV broadcast in the TV "
2811  "listings."));
2812 
2813  bs->setValue(0);
2814 
2815  return bs;
2816 }
2817 
2819 {
2820  GlobalSpinBox *bs = new GlobalSpinBox("WSRecPriority", -99, 99, 1);
2821 
2822  bs->setLabel(GeneralRecPrioritiesSettings::tr("Widescreen recording "
2823  "priority"));
2824 
2825  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority when "
2826  "a showing is marked as "
2827  "widescreen in the TV "
2828  "listings."));
2829 
2830  bs->setValue(0);
2831 
2832  return bs;
2833 }
2834 
2836 {
2837  GlobalSpinBox *bs = new GlobalSpinBox("SignLangRecPriority",
2838  -99, 99, 1);
2839 
2840  bs->setLabel(GeneralRecPrioritiesSettings::tr("Sign language recording "
2841  "priority"));
2842 
2843  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority "
2844  "when a showing is "
2845  "marked as having "
2846  "in-vision sign "
2847  "language."));
2848 
2849  bs->setValue(0);
2850 
2851  return bs;
2852 }
2853 
2855 {
2856  GlobalSpinBox *bs = new GlobalSpinBox("OnScrSubRecPriority",
2857  -99, 99, 1);
2858 
2859  bs->setLabel(GeneralRecPrioritiesSettings::tr("In-vision Subtitles "
2860  "Recording Priority"));
2861 
2862  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority "
2863  "when a showing is marked "
2864  "as having in-vision "
2865  "subtitles."));
2866 
2867  bs->setValue(0);
2868 
2869  return bs;
2870 }
2871 
2873 {
2874  GlobalSpinBox *bs = new GlobalSpinBox("CCRecPriority",
2875  -99, 99, 1);
2876 
2877  bs->setLabel(GeneralRecPrioritiesSettings::tr("Subtitles/CC recording "
2878  "priority"));
2879 
2880  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority when "
2881  "a showing is marked as "
2882  "having subtitles or "
2883  "closed captioning (CC) "
2884  "available."));
2885 
2886  bs->setValue(0);
2887 
2888  return bs;
2889 }
2890 
2892 {
2893  GlobalSpinBox *bs = new GlobalSpinBox("HardHearRecPriority",
2894  -99, 99, 1);
2895 
2896  bs->setLabel(GeneralRecPrioritiesSettings::tr("Hard of hearing priority"));
2897 
2898  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority when "
2899  "a showing is marked as "
2900  "having support for "
2901  "viewers with impaired "
2902  "hearing."));
2903 
2904  bs->setValue(0);
2905 
2906  return bs;
2907 }
2908 
2910 {
2911  GlobalSpinBox *bs = new GlobalSpinBox("AudioDescRecPriority",
2912  -99, 99, 1);
2913 
2914  bs->setLabel(GeneralRecPrioritiesSettings::tr("Audio described priority"));
2915 
2916  bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority when "
2917  "a showing is marked as "
2918  "being Audio Described."));
2919 
2920  bs->setValue(0);
2921 
2922  return bs;
2923 }
2924 
2926 {
2927  HostLineEdit *ge = new HostLineEdit("DefaultTVChannel");
2928 
2929  ge->setLabel(EPGSettings::tr("Guide starts at channel"));
2930 
2931  ge->setValue("3");
2932 
2933  ge->setHelpText(EPGSettings::tr("The program guide starts on this channel "
2934  "if it is run from outside of Live TV "
2935  "mode. Leave blank to enable Live TV "
2936  "automatic start channel."));
2937 
2938  return ge;
2939 }
2940 
2942 {
2943  HostSpinBox *gs = new HostSpinBox("SelChangeRecThreshold", 1, 600, 1);
2944 
2945  gs->setLabel(EPGSettings::tr("Record threshold"));
2946 
2947  gs->setValue(16);
2948 
2949  gs->setHelpText(EPGSettings::tr("Pressing SELECT on a show that is at "
2950  "least this many minutes into the future "
2951  "will schedule a recording."));
2952  return gs;
2953 }
2954 
2956 {
2957  GlobalComboBox *gc = new GlobalComboBox("Language");
2958 
2959  gc->setLabel(AppearanceSettings::tr("Language"));
2960 
2961  QMap<QString, QString> langMap = MythTranslation::getLanguages();
2962  QStringList langs = langMap.values();
2963  langs.sort();
2964  QString langCode = gCoreContext->GetSetting("Language").toLower();
2965 
2966  if (langCode.isEmpty())
2967  langCode = "en_US";
2968 
2969  gc->clearSelections();
2970 
2971  for (QStringList::Iterator it = langs.begin(); it != langs.end(); ++it)
2972  {
2973  QString label = *it;
2974  QString value = langMap.key(label);
2975  gc->addSelection(label, value, (value.toLower() == langCode));
2976  }
2977 
2978  gc->setHelpText(AppearanceSettings::tr("Your preferred language for the "
2979  "user interface."));
2980  return gc;
2981 }
2982 
2984 {
2985  widget->clearSelections();
2986  QString q = QString("ISO639Language%1").arg(i);
2987  QString lang = gCoreContext->GetSetting(q, "").toLower();
2988 
2989  if ((lang.isEmpty() || lang == "aar") &&
2990  !gCoreContext->GetSetting("Language", "").isEmpty())
2991  {
2992  lang = iso639_str2_to_str3(gCoreContext->GetLanguage().toLower());
2993  }
2994 
2995  QMap<int,QString>::iterator it = _iso639_key_to_english_name.begin();
2996  QMap<int,QString>::iterator ite = _iso639_key_to_english_name.end();
2997 
2998  for (; it != ite; ++it)
2999  {
3000  QString desc = (*it);
3001  int idx = desc.indexOf(";");
3002  if (idx > 0)
3003  desc = desc.left(idx);
3004 
3005  const QString il = iso639_key_to_str3(it.key());
3006  widget->addSelection(desc, il, il == lang);
3007  }
3008 }
3009 
3011 {
3012  GlobalComboBox *gc = new GlobalComboBox(QString("ISO639Language%1").arg(i));
3013 
3014  gc->setLabel(AppearanceSettings::tr("Guide language #%1").arg(i+1));
3015 
3016  // We should try to get language from "MythLanguage"
3017  // then use code 2 to code 3 map in iso639.h
3018  ISO639_fill_selections(gc, i);
3019 
3020  gc->setHelpText(AppearanceSettings::tr("Your #%1 preferred language for "
3021  "Program Guide data and captions.")
3022  .arg(i+1));
3023  return gc;
3024 }
3025 
3027 {
3028  HostCheckBox *gc = new HostCheckBox("NetworkControlEnabled");
3029 
3030  gc->setLabel(MainGeneralSettings::tr("Enable Network Remote Control "
3031  "interface"));
3032 
3033  gc->setHelpText(MainGeneralSettings::tr("This enables support for "
3034  "controlling MythFrontend "
3035  "over the network."));
3036 
3037  gc->setValue(false);
3038 
3039  return gc;
3040 }
3041 
3043 {
3044  HostSpinBox *gs = new HostSpinBox("NetworkControlPort", 1025, 65535, 1);
3045 
3046  gs->setLabel(MainGeneralSettings::tr("Network Remote Control port"));
3047 
3048  gs->setValue(6546);
3049 
3050  gs->setHelpText(MainGeneralSettings::tr("This specifies what port the "
3051  "Network Remote Control "
3052  "interface will listen on for "
3053  "new connections."));
3054  return gs;
3055 }
3056 
3058 {
3059  HostLineEdit *ge = new HostLineEdit("UDPNotifyPort");
3060 
3061  ge->setLabel(MainGeneralSettings::tr("UDP notify port"));
3062 
3063  ge->setValue("6948");
3064 
3065  ge->setHelpText(MainGeneralSettings::tr("MythTV will listen for "
3066  "connections from the "
3067  "\"mythutil\" program on "
3068  "this port."));
3069  return ge;
3070 }
3071 
3072 #ifdef USING_AIRPLAY
3073 // AirPlay Settings
3075 {
3076  HostCheckBox *gc = new HostCheckBox("AirPlayEnabled");
3077 
3078  gc->setLabel(MainGeneralSettings::tr("Enable AirPlay"));
3079 
3080  gc->setHelpText(MainGeneralSettings::tr("AirPlay lets you wirelessly view "
3081  "content on your TV from your "
3082  "iPhone, iPad, iPod Touch, or "
3083  "iTunes on your computer."));
3084 
3085  gc->setValue(true);
3086 
3087  return gc;
3088 }
3089 
3091 {
3092  HostCheckBox *gc = new HostCheckBox("AirPlayAudioOnly");
3093 
3094  gc->setLabel(MainGeneralSettings::tr("Only support AirTunes (no video)"));
3095 
3096  gc->setHelpText(MainGeneralSettings::tr("Only stream audio from your "
3097  "iPhone, iPad, iPod Touch, or "
3098  "iTunes on your computer"));
3099 
3100  gc->setValue(false);
3101 
3102  return gc;
3103 }
3104 
3106 {
3107  HostCheckBox *gc = new HostCheckBox("AirPlayPasswordEnabled");
3108 
3109  gc->setLabel(MainGeneralSettings::tr("Require password"));
3110 
3111  gc->setValue(false);
3112 
3113  gc->setHelpText(MainGeneralSettings::tr("Require a password to use "
3114  "AirPlay. Your iPhone, iPad, iPod "
3115  "Touch, or iTunes on your computer "
3116  "will prompt you when required"));
3117  return gc;
3118 }
3119 
3121 {
3122  HostLineEdit *ge = new HostLineEdit("AirPlayPassword");
3123 
3124  ge->setValue("0000");
3125 
3126  ge->setHelpText(MainGeneralSettings::tr("Your iPhone, iPad, iPod Touch, or "
3127  "iTunes on your computer will "
3128  "prompt you for this password "
3129  "when required"));
3130  return ge;
3131 }
3132 
3134 {
3136  new HorizontalConfigurationGroup(false, false, false, false);
3137 
3139  hc->addChild(AirPlayPassword());
3140 
3141  return hc;
3142 }
3143 
3145 {
3146  HostCheckBox *gc = new HostCheckBox("AirPlayFullScreen");
3147 
3148  gc->setLabel(MainGeneralSettings::tr("AirPlay full screen playback"));
3149 
3150  gc->setValue(false);
3151 
3152  gc->setHelpText(MainGeneralSettings::tr("During music playback, displays "
3153  "album cover and various media "
3154  "information in full screen mode"));
3155  return gc;
3156 }
3157 
3159 {
3161 
3162  ts->setValue(MainGeneralSettings::tr("All AirPlay settings take effect "
3163  "when you restart MythFrontend."));
3164  return ts;
3165 }
3166 
3168 {
3170 
3171  if (MythRAOPConnection::LoadKey() == NULL)
3172  {
3173  ts->setValue(MainGeneralSettings::tr("AirTunes RSA key couldn't be "
3174  "loaded. Check http://www.mythtv.org/wiki/AirTunes/AirPlay. "
3175  "Last Error: %1")
3177  }
3178  else
3179  {
3180  ts->setValue(MainGeneralSettings::tr("AirTunes RSA key successfully "
3181  "loaded."));
3182  }
3183 
3184  return ts;
3185 }
3186 #endif
3187 
3189 {
3190  HostCheckBox *gc = new HostCheckBox("RealtimePriority");
3191 
3192  gc->setLabel(PlaybackSettings::tr("Enable realtime priority threads"));
3193 
3194  gc->setHelpText(PlaybackSettings::tr("When running mythfrontend with root "
3195  "privileges, some threads can be "
3196  "given enhanced priority. Disable "
3197  "this if MythFrontend freezes during "
3198  "video playback."));
3199  gc->setValue(true);
3200 
3201  return gc;
3202 }
3203 
3205 {
3206  HostLineEdit *ge = new HostLineEdit("IgnoreDevices");
3207 
3208  ge->setLabel(MainGeneralSettings::tr("Ignore devices"));
3209 
3210  ge->setValue("");
3211 
3212  ge->setHelpText(MainGeneralSettings::tr("If there are any devices that you "
3213  "do not want to be monitored, list "
3214  "them here with commas in-between. "
3215  "The plugins will ignore them. "
3216  "Requires restart."));
3217  return ge;
3218 }
3219 
3221 {
3222  HostComboBox *gc = new HostComboBox("DisplayGroupTitleSort");
3223 
3224  gc->setLabel(PlaybackSettings::tr("Sort titles"));
3225 
3226  gc->addSelection(PlaybackSettings::tr("Alphabetically"),
3227  QString::number(PlaybackBox::TitleSortAlphabetical));
3228  gc->addSelection(PlaybackSettings::tr("By recording priority"),
3229  QString::number(PlaybackBox::TitleSortRecPriority));
3230 
3231  gc->setHelpText(PlaybackSettings::tr("Sets the title sorting order when "
3232  "the view is set to Titles only."));
3233  return gc;
3234 }
3235 
3237 {
3238  HostCheckBox *gc = new HostCheckBox("PlaybackWatchList");
3239 
3240  gc->setLabel(WatchListSettings::tr("Include the 'Watch List' group"));
3241 
3242  gc->setValue(true);
3243 
3244  gc->setHelpText(WatchListSettings::tr("The 'Watch List' is an abbreviated "
3245  "list of recordings sorted to "
3246  "highlight series and shows that "
3247  "need attention in order to keep up "
3248  "to date."));
3249  return gc;
3250 }
3251 
3253 {
3254  HostCheckBox *gc = new HostCheckBox("PlaybackWLStart");
3255 
3256  gc->setLabel(WatchListSettings::tr("Start from the Watch List view"));
3257 
3258  gc->setValue(false);
3259 
3260  gc->setHelpText(WatchListSettings::tr("If enabled, the 'Watch List' will "
3261  "be the initial view each time you "
3262  "enter the Watch Recordings screen"));
3263  return gc;
3264 }
3265 
3267 {
3268  HostCheckBox *gc = new HostCheckBox("PlaybackWLAutoExpire");
3269 
3270  gc->setLabel(WatchListSettings::tr("Exclude recordings not set for "
3271  "Auto-Expire"));
3272 
3273  gc->setValue(false);
3274 
3275  gc->setHelpText(WatchListSettings::tr("Set this if you turn off "
3276  "Auto-Expire only for recordings "
3277  "that you've seen and intend to "
3278  "keep. This option will exclude "
3279  "these recordings from the "
3280  "'Watch List'."));
3281  return gc;
3282 }
3283 
3285 {
3286  HostSpinBox *gs = new HostSpinBox("PlaybackWLMaxAge", 30, 180, 10);
3287 
3288  gs->setLabel(WatchListSettings::tr("Maximum days counted in the score"));
3289 
3290  gs->setValue(60);
3291 
3292  gs->setHelpText(WatchListSettings::tr("The 'Watch List' scores are based "
3293  "on 1 point equals one day since "
3294  "recording. This option limits the "
3295  "maximum score due to age and "
3296  "affects other weighting factors."));
3297  return gs;
3298 }
3299 
3301 {
3302  HostSpinBox *gs = new HostSpinBox("PlaybackWLBlackOut", 0, 5, 1);
3303 
3304  gs->setLabel(WatchListSettings::tr("Days to exclude weekly episodes after "
3305  "delete"));
3306 
3307  gs->setValue(2);
3308 
3309  gs->setHelpText(WatchListSettings::tr("When an episode is deleted or "
3310  "marked as watched, other episodes "
3311  "of the series are excluded from the "
3312  "'Watch List' for this interval of "
3313  "time. Daily shows also have a "
3314  "smaller interval based on this "
3315  "setting."));
3316  return gs;
3317 }
3318 
3321 {
3322 
3323  Setting* watchList = PlaybackWatchList();
3324  addChild(watchList);
3325  setTrigger(watchList);
3326 
3327  ConfigurationGroup* settings = new VerticalConfigurationGroup(false);
3328 
3329  settings->addChild(PlaybackWLStart());
3330  settings->addChild(PlaybackWLAutoExpire());
3331  settings->addChild(PlaybackWLMaxAge());
3332  settings->addChild(PlaybackWLBlackOut());
3333 
3334  addTarget("1", settings);
3335 
3336  addTarget("0", new VerticalConfigurationGroup(true));
3337 };
3338 
3340 {
3341  HostCheckBox *gc = new HostCheckBox("LCDShowTime");
3342 
3343  gc->setLabel(LcdSettings::tr("Display time"));
3344 
3345  gc->setHelpText(LcdSettings::tr("Display current time on idle LCD "
3346  "display."));
3347 
3348  gc->setValue(true);
3349 
3350  return gc;
3351 }
3352 
3354 {
3355  HostCheckBox *gc = new HostCheckBox("LCDShowRecStatus");
3356 
3357  gc->setLabel(LcdSettings::tr("Display recording status"));
3358 
3359  gc->setHelpText(LcdSettings::tr("Display current recordings information "
3360  "on LCD display."));
3361 
3362  gc->setValue(false);
3363 
3364  return gc;
3365 }
3366 
3368 {
3369  HostCheckBox *gc = new HostCheckBox("LCDShowMenu");
3370 
3371  gc->setLabel(LcdSettings::tr("Display menus"));
3372 
3373  gc->setHelpText(LcdSettings::tr("Display selected menu on LCD display. "));
3374 
3375  gc->setValue(true);
3376 
3377  return gc;
3378 }
3379 
3381 {
3382  HostSpinBox *gs = new HostSpinBox("LCDPopupTime", 1, 300, 1, true);
3383 
3384  gs->setLabel(LcdSettings::tr("Menu pop-up time"));
3385 
3386  gs->setHelpText(LcdSettings::tr("How many seconds the menu will remain "
3387  "visible after navigation."));
3388 
3389  gs->setValue(5);
3390 
3391  return gs;
3392 }
3393 
3395 {
3396  HostCheckBox *gc = new HostCheckBox("LCDShowMusic");
3397 
3398  gc->setLabel(LcdSettings::tr("Display music artist and title"));
3399 
3400  gc->setHelpText(LcdSettings::tr("Display playing artist and song title in "
3401  "MythMusic on LCD display."));
3402 
3403  gc->setValue(true);
3404 
3405  return gc;
3406 }
3407 
3409 {
3410  HostComboBox *gc = new HostComboBox("LCDShowMusicItems");
3411 
3412  gc->setLabel(LcdSettings::tr("Items"));
3413 
3414  gc->addSelection(LcdSettings::tr("Artist - Title"), "ArtistTitle");
3415  gc->addSelection(LcdSettings::tr("Artist [Album] Title"),
3416  "ArtistAlbumTitle");
3417 
3418  gc->setHelpText(LcdSettings::tr("Which items to show when playing music."));
3419 
3420  return gc;
3421 }
3422 
3424 {
3425  HostCheckBox *gc = new HostCheckBox("LCDShowChannel");
3426 
3427  gc->setLabel(LcdSettings::tr("Display channel information"));
3428 
3429  gc->setHelpText(LcdSettings::tr("Display tuned channel information on LCD "
3430  "display."));
3431 
3432  gc->setValue(true);
3433 
3434  return gc;
3435 }
3436 
3438 {
3439  HostCheckBox *gc = new HostCheckBox("LCDShowVolume");
3440 
3441  gc->setLabel(LcdSettings::tr("Display volume information"));
3442 
3443  gc->setHelpText(LcdSettings::tr("Display volume level information "
3444  "on LCD display."));
3445 
3446  gc->setValue(true);
3447 
3448  return gc;
3449 }
3450 
3452 {
3453  HostCheckBox *gc = new HostCheckBox("LCDShowGeneric");
3454 
3455  gc->setLabel(LcdSettings::tr("Display generic information"));
3456 
3457  gc->setHelpText(LcdSettings::tr("Display generic information on LCD display."));
3458 
3459  gc->setValue(true);
3460 
3461  return gc;
3462 }
3463 
3465 {
3466  HostCheckBox *gc = new HostCheckBox("LCDBacklightOn");
3467 
3468  gc->setLabel(LcdSettings::tr("Backlight always on"));
3469 
3470  gc->setHelpText(LcdSettings::tr("Turn on the backlight permanently on the "
3471  "LCD display."));
3472  gc->setValue(true);
3473 
3474  return gc;
3475 }
3476 
3478 {
3479  HostCheckBox *gc = new HostCheckBox("LCDHeartBeatOn");
3480 
3481  gc->setLabel(LcdSettings::tr("Heartbeat always on"));
3482 
3483  gc->setHelpText(LcdSettings::tr("Turn on the LCD heartbeat."));
3484 
3485  gc->setValue(false);
3486 
3487  return gc;
3488 }
3489 
3491 {
3492  HostCheckBox *gc = new HostCheckBox("LCDBigClock");
3493 
3494  gc->setLabel(LcdSettings::tr("Display large clock"));
3495 
3496  gc->setHelpText(LcdSettings::tr("On multiline displays try and display the "
3497  "time as large as possible."));
3498 
3499  gc->setValue(false);
3500 
3501  return gc;
3502 }
3503 
3505 {
3506  HostLineEdit *ge = new HostLineEdit("LCDKeyString");
3507 
3508  ge->setLabel(LcdSettings::tr("LCD key order"));
3509 
3510  ge->setValue("ABCDEF");
3511 
3512  ge->setHelpText(
3513  LcdSettings::tr("Enter the 6 Keypad Return Codes for your LCD keypad "
3514  "in the order in which you want the functions "
3515  "up/down/left/right/yes/no to operate. (See "
3516  "lcdproc/server/drivers/hd44780.c/keyMapMatrix[] "
3517  "or the matrix for your display)"));
3518  return ge;
3519 }
3520 
3522 {
3523  HostCheckBox *gc = new HostCheckBox("LCDEnable");
3524 
3525  gc->setLabel(LcdSettings::tr("Enable LCD device"));
3526 
3527  gc->setHelpText(LcdSettings::tr("Use an LCD display to view MythTV status "
3528  "information."));
3529 
3530  gc->setValue(false);
3531 
3532  return gc;
3533 }
3534 
3536  false, false,
3537  false, false,
3538  false, false)
3539 {
3540  setLabel(tr("LCD device display"));
3541  setUseLabel(false);
3542 
3543  Setting* lcd_enable = LCDEnable();
3544  addChild(lcd_enable);
3545  setTrigger(lcd_enable);
3546 
3547  ConfigurationGroup *settings =
3548  new VerticalConfigurationGroup(false, true, false, false);
3549  ConfigurationGroup *setHoriz =
3550  new HorizontalConfigurationGroup(false, false, false, false);
3551 
3552  ConfigurationGroup* setLeft =
3553  new VerticalConfigurationGroup(false, false, false, false);
3554  ConfigurationGroup* setRight =
3555  new VerticalConfigurationGroup(false, false, false, false);
3556 
3557  setLeft->addChild(LCDShowTime());
3558  setLeft->addChild(LCDShowMenu());
3559  setLeft->addChild(LCDShowMusic());
3560  setLeft->addChild(LCDShowMusicItems());
3561  setLeft->addChild(LCDShowChannel());
3562  setLeft->addChild(LCDShowRecStatus());
3563  setRight->addChild(LCDShowVolume());
3564  setRight->addChild(LCDShowGeneric());
3565  setRight->addChild(LCDBacklightOn());
3566  setRight->addChild(LCDHeartBeatOn());
3567  setRight->addChild(LCDBigClock());
3568  setRight->addChild(LCDKeyString());
3569  setHoriz->addChild(setLeft);
3570  setHoriz->addChild(setRight);
3571  settings->addChild(setHoriz);
3572  settings->addChild(LCDPopupTime());
3573 
3574  addTarget("1", settings);
3575 
3576  addTarget("0", new VerticalConfigurationGroup(true));
3577 };
3578 
3579 
3580 #if CONFIG_DARWIN
3582 {
3583  HostCheckBox *gc = new HostCheckBox("MacGammaCorrect");
3584 
3585  gc->setLabel(PlaybackSettings::tr("Enable gamma correction for video"));
3586 
3587  gc->setValue(false);
3588 
3589  gc->setHelpText(PlaybackSettings::tr("If enabled, QuickTime will correct "
3590  "the gamma of the video to match "
3591  "your monitor. Turning this off can "
3592  "save some CPU cycles."));
3593  return gc;
3594 }
3595 
3597 {
3598  HostCheckBox *gc = new HostCheckBox("MacScaleUp");
3599 
3600  gc->setLabel(PlaybackSettings::tr("Scale video as necessary"));
3601 
3602  gc->setValue(true);
3603 
3604  gc->setHelpText(PlaybackSettings::tr("If enabled, video will be scaled to "
3605  "fit your window or screen. If "
3606  "unchecked, video will never be made "
3607  "larger than its actual pixel size."));
3608  return gc;
3609 }
3610 
3612 {
3613  HostSpinBox *gs = new HostSpinBox("MacFullSkip", 0, 30, 1, true);
3614 
3615  gs->setLabel(PlaybackSettings::tr("Frames to skip in fullscreen mode"));
3616 
3617  gs->setValue(0);
3618 
3619  gs->setHelpText(PlaybackSettings::tr("Video displayed in fullscreen or "
3620  "non-windowed mode will skip this "
3621  "many frames for each frame drawn. "
3622  "Set to 0 to show every frame. Only "
3623  "valid when either \"Use GUI size for "
3624  "TV playback\" or \"Run the frontend "
3625  "in a window\" is not checked."));
3626  return gs;
3627 }
3628 
3630 {
3631  HostCheckBox *gc = new HostCheckBox("MacMainEnabled");
3632 
3633  gc->setLabel(MacMainSettings::tr("Video in main window"));
3634 
3635  gc->setValue(true);
3636 
3637  gc->setHelpText(MacMainSettings::tr("If enabled, video will be displayed "
3638  "in the main GUI window. Disable this "
3639  "when you only want video on the "
3640  "desktop or in a floating window. Only "
3641  "valid when \"Use GUI size for TV "
3642  "playback\" and \"Run the frontend in "
3643  "a window\" are checked."));
3644  return gc;
3645 }
3646 
3648 {
3649  HostSpinBox *gs = new HostSpinBox("MacMainSkip", 0, 30, 1, true);
3650 
3651  gs->setLabel(MacMainSettings::tr("Frames to skip"));
3652 
3653  gs->setValue(0);
3654 
3655  gs->setHelpText(MacMainSettings::tr("Video in the main window will skip "
3656  "this many frames for each frame "
3657  "drawn. Set to 0 to show every "
3658  "frame."));
3659  return gs;
3660 }
3661 
3663 {
3664  HostSpinBox *gs = new HostSpinBox("MacMainOpacity", 0, 100, 5, false);
3665 
3666  gs->setLabel(MacMainSettings::tr("Opacity"));
3667 
3668  gs->setValue(100);
3669 
3670  gs->setHelpText(MacMainSettings::tr("The opacity of the main window. Set "
3671  "to 100 for completely opaque, set "
3672  "to 0 for completely transparent."));
3673  return gs;
3674 }
3675 
3677 {
3678  setLabel(tr("Video in main window"));
3679  setUseLabel(false);
3680  Setting *gc = MacMainEnabled();
3681  addChild(gc);
3682  setTrigger(gc);
3683 
3685  new VerticalConfigurationGroup(false, false);
3686  opts->addChild(MacMainSkip());
3687  opts->addChild(MacMainOpacity());
3688 
3689  addTarget("1", opts);
3690  addTarget("0", new VerticalConfigurationGroup(false, false));
3691 
3692 };
3693 
3695 {
3696  HostCheckBox *gc = new HostCheckBox("MacFloatEnabled");
3697 
3698  gc->setLabel(MacFloatSettings::tr("Video in floating window"));
3699 
3700  gc->setValue(false);
3701 
3702  gc->setHelpText(MacFloatSettings::tr("If enabled, video will be displayed "
3703  "in a floating window. Only valid "
3704  "when \"Use GUI size for TV "
3705  "playback\" and \"Run the frontend "
3706  "in a window\" are checked."));
3707  return gc;
3708 }
3709 
3711 {
3712  HostSpinBox *gs = new HostSpinBox("MacFloatSkip", 0, 30, 1, true);
3713 
3714  gs->setLabel(MacFloatSettings::tr("Frames to skip"));
3715 
3716  gs->setValue(0);
3717 
3718  gs->setHelpText(MacFloatSettings::tr("Video in the floating window will "
3719  "skip this many frames for each "
3720  "frame drawn. Set to 0 to show "
3721  "every frame."));
3722  return gs;
3723 }
3724 
3726 {
3727  HostSpinBox *gs = new HostSpinBox("MacFloatOpacity", 0, 100, 5, false);
3728 
3729  gs->setLabel(MacFloatSettings::tr("Opacity"));
3730 
3731  gs->setValue(100);
3732 
3733  gs->setHelpText(MacFloatSettings::tr("The opacity of the floating window. "
3734  "Set to 100 for completely opaque, "
3735  "set to 0 for completely "
3736  "transparent."));
3737  return gs;
3738 }
3739 
3741 {
3742  setLabel(tr("Video in floating window"));
3743 
3744  setUseLabel(false);
3745  Setting *gc = MacFloatEnabled();
3746  addChild(gc);
3747  setTrigger(gc);
3748 
3750  new VerticalConfigurationGroup(false, false);
3751  opts->addChild(MacFloatSkip());
3752  opts->addChild(MacFloatOpacity());
3753 
3754  addTarget("1", opts);
3755  addTarget("0", new VerticalConfigurationGroup(false, false));
3756 
3757 };
3758 
3760 {
3761  HostCheckBox *gc = new HostCheckBox("MacDockEnabled");
3762 
3763  gc->setLabel(MacDockSettings::tr("Video in the dock"));
3764 
3765  gc->setValue(true);
3766 
3767  gc->setHelpText(MacDockSettings::tr("If enabled, video will be displayed "
3768  "in the application's dock icon. Only "
3769  "valid when \"Use GUI size for TV "
3770  "playback\" and \"Run the frontend in "
3771  "a window\" are checked."));
3772  return gc;
3773 }
3774 
3776 {
3777  HostSpinBox *gs = new HostSpinBox("MacDockSkip", 0, 30, 1, true);
3778 
3779  gs->setLabel(MacDockSettings::tr("Frames to skip"));
3780 
3781  gs->setValue(3);
3782 
3783  gs->setHelpText(MacDockSettings::tr("Video in the dock icon will skip this "
3784  "many frames for each frame drawn. Set "
3785  "to 0 to show every frame."));
3786  return gs;
3787 }
3788 
3790 {
3791  setLabel(tr("Video in the dock"));
3792  setUseLabel(false);
3793  Setting *gc = MacDockEnabled();
3794  addChild(gc);
3795  setTrigger(gc);
3796 
3797  Setting *skip = MacDockSkip();
3798  addTarget("1", skip);
3799  addTarget("0", new HorizontalConfigurationGroup(false, false));
3800 
3801 };
3802 
3804 {
3805  HostCheckBox *gc = new HostCheckBox("MacDesktopEnabled");
3806 
3807  gc->setLabel(MacDesktopSettings::tr("Video on the desktop"));
3808 
3809  gc->setValue(false);
3810 
3811  gc->setHelpText(MacDesktopSettings::tr("If enabled, video will be "
3812  "displayed on the desktop, "
3813  "behind the Finder icons. "
3814  "Only valid when \"Use GUI "
3815  "size for TV playback\" and "
3816  "\"Run the frontend in a "
3817  "window\" are checked."));
3818  return gc;
3819 }
3820 
3822 {
3823  HostSpinBox *gs = new HostSpinBox("MacDesktopSkip", 0, 30, 1, true);
3824 
3825  gs->setLabel(MacDesktopSettings::tr("Frames to skip"));
3826 
3827  gs->setValue(0);
3828 
3829  gs->setHelpText(MacDesktopSettings::tr("Video on the desktop will skip "
3830  "this many frames for each frame "
3831  "drawn. Set to 0 to show every "
3832  "frame."));
3833  return gs;
3834 }
3835 
3837 {
3838  setLabel(tr("Video on the desktop"));
3839  setUseLabel(false);
3840  Setting *gc = MacDesktopEnabled();
3841  addChild(gc);
3842  setTrigger(gc);
3843  Setting *skip = MacDesktopSkip();
3844  addTarget("1", skip);
3845  addTarget("0", new HorizontalConfigurationGroup(false, false));
3846 
3847 };
3848 #endif
3849 
3850 MainGeneralSettings::MainGeneralSettings()
3851 {
3853 
3855  new VerticalConfigurationGroup(false, true, false, false);
3856  pin->setLabel(tr("Settings Access"));
3857  pin->addChild(SetupPinCode());
3858  addChild(pin);
3859 
3860  VerticalConfigurationGroup *general =
3861  new VerticalConfigurationGroup(false, true, false, false);
3862  general->setLabel(tr("General"));
3863  general->addChild(UseVirtualKeyboard());
3864  general->addChild(ScreenShotPath());
3865  addChild(general);
3866 
3868  new VerticalConfigurationGroup(false, true, false, false);
3869  media->setLabel(tr("Media Monitor"));
3870  media->addChild(IgnoreMedia());
3871  addChild(media);
3872 
3873  VerticalConfigurationGroup *remotecontrol =
3874  new VerticalConfigurationGroup(false, true, false, false);
3875  remotecontrol->setLabel(tr("Remote Control"));
3876  remotecontrol->addChild(LircDaemonDevice());
3877  remotecontrol->addChild(NetworkControlEnabled());
3878  remotecontrol->addChild(NetworkControlPort());
3879  remotecontrol->addChild(UDPNotifyPort());
3880  addChild(remotecontrol);
3881 
3882 #ifdef USING_AIRPLAY
3883  VerticalConfigurationGroup *airplay =
3884  new VerticalConfigurationGroup(false, true, false, false);
3885  airplay->setLabel(tr("AirPlay Settings"));
3886  airplay->addChild(AirPlayEnabled());
3887  airplay->addChild(AirPlayFullScreen());
3888  airplay->addChild(AirPlayAudioOnly());
3889  airplay->addChild(AirPlayPasswordSettings());
3890  airplay->addChild(AirPlayInfo());
3891  airplay->addChild(AirPlayRSAInfo());
3892  addChild(airplay);
3893 #endif
3894 
3895  VerticalConfigurationGroup *shutdownSettings =
3896  new VerticalConfigurationGroup(true, true, false, false);
3897  shutdownSettings->setLabel(tr("Shutdown/Reboot Settings"));
3898  shutdownSettings->addChild(FrontendIdleTimeout());
3899  shutdownSettings->addChild(OverrideExitMenu());
3900  shutdownSettings->addChild(HaltCommand());
3901  shutdownSettings->addChild(RebootCommand());
3902  addChild(shutdownSettings);
3903 }
3904 
3905 PlaybackSettings::PlaybackSettings()
3906 {
3907  uint i = 0, total = 8;
3908 #if CONFIG_DARWIN
3909  total += 2;
3910 #endif // USING_DARWIN
3911 
3912 
3913  VerticalConfigurationGroup* general1 =
3914  new VerticalConfigurationGroup(false);
3915 
3916  //: %2 is the position, %2 is the total
3917  general1->setLabel(tr("General Playback (%1/%2)")
3918  .arg(++i).arg(total));
3919 
3920  HorizontalConfigurationGroup *columns =
3921  new HorizontalConfigurationGroup(false, false, true, true);
3922 
3923  VerticalConfigurationGroup *column1 =
3924  new VerticalConfigurationGroup(false, false, true, true);
3925  column1->addChild(RealtimePriority());
3926  column1->addChild(DecodeExtraAudio());
3927  column1->addChild(JumpToProgramOSD());
3928 #if CONFIG_DEBUGTYPE
3929  column1->addChild(FFmpegDemuxer());
3930 #endif
3931  columns->addChild(column1);
3932 
3933  VerticalConfigurationGroup *column2 =
3934  new VerticalConfigurationGroup(false, false, true, true);
3935  column2->addChild(ClearSavedPosition());
3936  column2->addChild(AltClearSavedPosition());
3937  column2->addChild(AutomaticSetWatched());
3938  column2->addChild(ContinueEmbeddedTVPlay());
3939  columns->addChild(column2);
3940 
3941  general1->addChild(columns);
3942  general1->addChild(LiveTVIdleTimeout());
3943  addChild(general1);
3944 
3945  VerticalConfigurationGroup* general2 =
3946  new VerticalConfigurationGroup(false);
3947 
3948  //" %1 is the position, %2 is the total
3949  general2->setLabel(tr("General Playback (%1/%2)")
3950  .arg(++i).arg(total));
3951 
3953  new HorizontalConfigurationGroup(false, false, true, true);
3955  new VerticalConfigurationGroup(false, false, true, true);
3957  new VerticalConfigurationGroup(false, false, true, true);
3958  ocol1->addChild(VertScanPercentage());
3959  ocol1->addChild(YScanDisplacement());
3960  ocol2->addChild(HorizScanPercentage());
3961  ocol2->addChild(XScanDisplacement());
3962  oscan->addChild(ocol1);
3963  oscan->addChild(ocol2);
3964 
3965  HorizontalConfigurationGroup* aspect_fill =
3966  new HorizontalConfigurationGroup(false, false, true, true);
3967  aspect_fill->addChild(AspectOverride());
3968  aspect_fill->addChild(AdjustFill());
3969 
3970  general2->addChild(oscan);
3971  general2->addChild(aspect_fill);
3972  general2->addChild(LetterboxingColour());
3973  general2->addChild(PIPLocationComboBox());
3974  general2->addChild(PlaybackExitPrompt());
3975  general2->addChild(EndOfRecordingExitPrompt());
3976  addChild(general2);
3977 
3978  QString tmp = QString(" (%1/%2)").arg(++i).arg(total);
3979  addChild(new PlaybackProfileConfigs(tmp));
3980 
3982 
3983  //: %1 is the position, %2 is the total
3984  pbox->setLabel(tr("View Recordings (%1/%2)").arg(++i).arg(total));
3985 
3986  pbox->addChild(PlayBoxOrdering());
3987  pbox->addChild(PlayBoxEpisodeSort());
3988  // Disabled until we re-enable live previews
3989  // pbox->addChild(PlaybackPreview());
3990  // pbox->addChild(HWAccelPlaybackPreview());
3991  pbox->addChild(PBBStartInTitle());
3992  addChild(pbox);
3993 
3995 
3996  //: %1 is the position, %2 is the total
3997  pbox2->setLabel(tr("Recording Groups (%1/%2)").arg(++i).arg(total));
3998 
3999  pbox2->addChild(DisplayRecGroup());
4000  pbox2->addChild(QueryInitialFilter());
4001  pbox2->addChild(RememberRecGroup());
4002 
4003  addChild(pbox2);
4004 
4006 
4007  //: %1 is the position, %2 is the total
4008  pbox3->setLabel(tr("View Recordings (%1/%2)").arg(++i).arg(total));
4009 
4010  pbox3->addChild(DisplayGroupTitleSort());
4011  pbox3->addChild(new WatchListSettings());
4012 
4013  addChild(pbox3);
4014 
4016 
4017  //: %1 is the position, %2 is the total
4018  seek->setLabel(tr("Seeking (%1/%2)").arg(++i).arg(total));
4019 
4020  seek->addChild(SmartForward());
4021  seek->addChild(FFRewReposTime());
4022  seek->addChild(FFRewReverse());
4023 
4024  addChild(seek);
4025 
4027 
4028  //: %1 is the position, %2 is the total
4029  comms->setLabel(tr("Commercial Skip (%1/%2)").arg(++i).arg(total));
4030 
4031  comms->addChild(AutoCommercialSkip());
4032  comms->addChild(CommRewindAmount());
4033  comms->addChild(CommNotifyAmount());
4034  comms->addChild(MaximumCommercialSkip());
4035  comms->addChild(MergeShortCommBreaks());
4036 
4037  addChild(comms);
4038 
4039 #if CONFIG_DARWIN
4041 
4042  //: %1 is the position, %2 is the total
4043  mac1->setLabel(tr("Mac OS X Video Setting (%1/%2)").arg(++i).arg(total));
4044 
4045  mac1->addChild(MacGammaCorrect());
4046  mac1->addChild(MacScaleUp());
4047  mac1->addChild(MacFullSkip());
4048 
4049  addChild(mac1);
4050 
4052 
4053  //: %1 is the position, %2 is the total
4054  mac2->setLabel(tr("Mac OS X Video Settings (%1/%2)").arg(++i).arg(total));
4055 
4056  mac2->addChild(new MacMainSettings());
4057  mac2->addChild(new MacFloatSettings());
4058 
4060  new HorizontalConfigurationGroup(false, false, true, true);
4061  row->addChild(new MacDockSettings());
4062  row->addChild(new MacDesktopSettings());
4063  mac2->addChild(row);
4064 
4065  addChild(mac2);
4066 #endif
4067 }
4068 
4069 OSDSettings::OSDSettings()
4070 {
4072 
4073  osd->setLabel(tr("On-screen Display"));
4074 
4075  osd->addChild(EnableMHEG());
4076  osd->addChild(EnableMHEGic());
4078  osd->addChild(BrowseAllTuners());
4079  osd->addChild(DefaultCCMode());
4080  osd->addChild(SubtitleCodec());
4081 
4082  addChild(osd);
4083 
4084  //VerticalConfigurationGroup *cc = new VerticalConfigurationGroup(false);
4085  //cc->setLabel(tr("Closed Captions"));
4086  //cc->addChild(DecodeVBIFormat());
4087  //addChild(cc);
4088 
4089 #if defined(Q_OS_MACX)
4090  // Any Mac OS-specific OSD stuff would go here.
4091 #endif
4092 }
4093 
4095 {
4097 
4098  general->setLabel(tr("General (Basic)"));
4099  general->addChild(ChannelOrdering());
4100  general->addChild(ChannelFormat());
4101  general->addChild(LongChannelFormat());
4102 
4103  addChild(general);
4104 
4106 
4107  autoexp->setLabel(tr("General (Auto-Expire)"));
4108 
4109  autoexp->addChild(AutoExpireMethod());
4110 
4111  VerticalConfigurationGroup *expgrp0 =
4112  new VerticalConfigurationGroup(false, false, true, true);
4113 
4114  expgrp0->addChild(RerecordWatched());
4115  expgrp0->addChild(AutoExpireWatchedPriority());
4116 
4117  VerticalConfigurationGroup *expgrp1 =
4118  new VerticalConfigurationGroup(false, false, true, true);
4119 
4120  expgrp1->addChild(AutoExpireLiveTVMaxAge());
4121  expgrp1->addChild(AutoExpireDayPriority());
4122  expgrp1->addChild(AutoExpireExtraSpace());
4123 
4125  new HorizontalConfigurationGroup(false, false, true, true);
4126 
4127  expgrp->addChild(expgrp0);
4128  expgrp->addChild(expgrp1);
4129 
4130  autoexp->addChild(expgrp);
4131 // autoexp->addChild(new DeletedExpireOptions());
4132  autoexp->addChild(DeletedMaxAge());
4133 
4134  addChild(autoexp);
4135 
4137 
4138  jobs->setLabel(tr("General (Jobs)"));
4139 
4140  jobs->addChild(CommercialSkipMethod());
4141  jobs->addChild(CommFlagFast());
4142  jobs->addChild(AggressiveCommDetect());
4144 
4145  addChild(jobs);
4146 
4148 
4149  general2->setLabel(tr("General (Advanced)"));
4150 
4151  general2->addChild(RecordPreRoll());
4152  general2->addChild(RecordOverTime());
4153  general2->addChild(CategoryOverTimeSettings());
4154  addChild(general2);
4155 
4157 
4158  changrp->setLabel(tr("General (Channel Groups)"));
4159 
4160  ChannelGroupSettings *changroupsettings = new ChannelGroupSettings();
4161  changrp->addChild(changroupsettings);
4162  changrp->addChild(BrowseChannelGroup());
4163 
4164  addChild(changrp);
4165 }
4166 
4167 EPGSettings::EPGSettings()
4168 {
4170 
4171  epg->setLabel(tr("Program Guide %1/%2").arg("1").arg("1"));
4172 
4173  epg->addChild(DefaultTVChannel());
4174  epg->addChild(EPGRecThreshold());
4175 
4176  addChild(epg);
4177 }
4178 
4179 GeneralRecPrioritiesSettings::GeneralRecPrioritiesSettings()
4180 {
4182 
4183  sched->setLabel(tr("Scheduler Options"));
4184 
4185  sched->addChild(GRSchedOpenEnd());
4186  sched->addChild(GRPrefInputRecPriority());
4187  sched->addChild(GRHDTVRecPriority());
4188  sched->addChild(GRWSRecPriority());
4189 
4190  addChild(sched);
4191 
4193 
4194  access->setLabel(tr("Accessibility Options"));
4195 
4196  access->addChild(GRSignLangRecPriority());
4197  access->addChild(GROnScrSubRecPriority());
4198  access->addChild(GRCCRecPriority());
4199  access->addChild(GRHardHearRecPriority());
4200  access->addChild(GRAudioDescRecPriority());
4201 
4202  addChild(access);
4203 }
4204 
4205 AppearanceSettings::AppearanceSettings()
4206 {
4208  screen->setLabel(tr("Theme / Screen Settings"));
4209 
4210 #if ! CONFIG_DARWIN
4211  screen->addChild(ThemePainter());
4212 #endif
4213  screen->addChild(MenuTheme());
4214 
4216  {
4217  screen->addChild(XineramaScreen());
4219  }
4220 
4221 // screen->addChild(DisplaySizeHeight());
4222 // screen->addChild(DisplaySizeWidth());
4223 
4224  VerticalConfigurationGroup *column1 =
4225  new VerticalConfigurationGroup(false, false, false, false);
4226 
4227  column1->addChild(GuiWidth());
4228  column1->addChild(GuiHeight());
4229  column1->addChild(GuiOffsetX());
4230  column1->addChild(GuiOffsetY());
4231 
4232  VerticalConfigurationGroup *column2 =
4233  new VerticalConfigurationGroup(false, false, false, false);
4234 
4235  column2->addChild(GuiSizeForTV());
4236  column2->addChild(HideMouseCursor());
4237  column2->addChild(RunInWindow());
4238  column2->addChild(UseFixedWindowSize());
4239  column2->addChild(AlwaysOnTop());
4240 #ifdef USING_AIRPLAY
4241  column2->addChild(AirPlayFullScreen());
4242 #endif
4243 
4244  HorizontalConfigurationGroup *columns =
4245  new HorizontalConfigurationGroup(false, false, false, false);
4246 
4247  columns->addChild(column1);
4248  columns->addChild(column2);
4249 
4250  screen->addChild(columns);
4251 
4252  addChild(screen);
4253 
4254 #if defined(USING_XRANDR) || CONFIG_DARWIN
4255  const vector<DisplayResScreen> scr = GetVideoModes();
4256  if (!scr.empty())
4257  addChild(new VideoModeSettings());
4258 #endif
4260 
4261  dates->setLabel(tr("Localization"));
4262 
4263  dates->addChild(MythLanguage());
4264  dates->addChild(ISO639PreferredLanguage(0));
4265  dates->addChild(ISO639PreferredLanguage(1));
4266  dates->addChild(MythDateFormatCB());
4267  dates->addChild(MythShortDateFormat());
4268  dates->addChild(MythTimeFormat());
4269 
4270  addChild(dates);
4271 
4272  addChild(new LcdSettings());
4273 }
4274 
4275 // 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
static QStringList GetDecoders(void)
static GlobalSpinBox * GRSignLangRecPriority()
static VerticalConfigurationGroup * CategoryOverTimeSettings()
virtual void clearSelections(void)
Definition: settings.cpp:175
static HostCheckBox * LCDHeartBeatOn()
virtual void setHelpText(const QString &str)
Definition: settings.cpp:561
ISO 639-1 and ISO 639-2 support functions.
void vrenderChanged(const QString &renderer)
virtual void setValue(bool check)
Definition: settings.h:434
static HostRefreshRateComboBox * TVVidModeRefreshRate(int idx=-1)
static QString GetDeinterlacerName(const QString &short_name)
static HostComboBox * OverrideExitMenu()
virtual void Load(void)
void orenderChanged(const QString &renderer)
static QStringList GetOSDs(const QString &video_renderer)
void valueChanged(const QString &)
static HostComboBox * TVVidModeForceAspect(int idx=-1)
VERBOSE_PREAMBLE false
Definition: verbosedefs.h:83
static uint GetProfileGroupID(const QString &profilename, const QString &hostname)
static HostCheckBox * ChannelGroupRememberLast()
virtual void setLabel(QString str)
Definition: settings.cpp:930
static GlobalSpinBox * DeletedMaxAge()
static HostSpinBox * GuiWidth()
static HostCheckBox * LCDShowGeneric()
static HostComboBox * XineramaMonitorAspectRatio()
static void CreateProfiles(const QString &hostname)
bool replaceChild(Configurable *old_child, Configurable *new_child)
static HostCheckBox * PlaybackWLStart()
void priorityChanged(const QString &name, int)
static QString RSALastError(void)
static HostSpinBox * MacMainSkip()
virtual void setEnabled(bool b)
Definition: settings.cpp:688
TransComboBoxSetting * osdrend
void deint1Changed(const QString &deint)
static QStringList GetDecoderNames(void)
virtual QString getSelectionLabel(void) const
Definition: settings.cpp:213
static HostCheckBox * ContinueEmbeddedTVPlay()
static HostCheckBox * LCDShowVolume()
static HostComboBox * LCDShowMusicItems()
static HostSpinBox * CommNotifyAmount()
static HostCheckBox * LCDBigClock()
static void SetDefaultProfileName(const QString &profilename, const QString &hostname)
static GlobalSpinBox * GRPrefInputRecPriority()
static HostSpinBox * VertScanPercentage()
virtual void setHelpText(const QString &str)
Definition: settings.cpp:369
static HostSpinBox * NetworkControlPort()
void decoderChanged(const QString &dec)
static HostComboBox * TVVidModeResolution(int idx=-1)
QSqlQuery wrapper that fetches a DB connection from the connection pool.
Definition: mythdbcon.h:125
static HostCheckBox * JumpToProgramOSD()
static GlobalSpinBox * AutoExpireLiveTVMaxAge()
static HostComboBox * ChannelFormat()
void setName(const QString &str)
Definition: settings.h:47
static HostComboBox * GuiVidModeResolution()
static QString GetDecoderName(const QString &decoder)
static HostCheckBox * MacMainEnabled()
static TransLabelSetting * AirPlayInfo()
QString label
Definition: settings.h:89
static item_list_t LoadDB(uint groupid)
const QLocale GetQLocale(void)
static GlobalSpinBox * RecordPreRoll()
virtual void addChild(Configurable *child)
static bool IsFilterAllowed(const QString &video_renderer)
static HostComboBox * PlayBoxOrdering()
static HostComboBox * SubtitleCodec()
static HostCheckBox * FFRewReverse()
static HostLineEdit * LCDKeyString()
vector< ChannelGroupItem > ChannelGroupList
Definition: channelgroup.h:32
static HostCheckBox * QueryInitialFilter()
static HostComboBox * AdjustFill()
static HostCheckBox * AirPlayFullScreen()
static HostLineEdit * DefaultTVChannel()
static HostCheckBox * PersistentBrowseMode()
static HostComboBox * PlaybackExitPrompt()
QString SkipTypeToString(int flags)
virtual void setValue(const QString &newValue)
Definition: settings.cpp:707
unsigned int uint
Definition: compat.h:136
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
static HostComboBox * MenuTheme()
static HostCheckBox * MacDockEnabled()
static HostLineEdit * ScreenShotPath()
static bool DeleteDB(uint groupid, const item_list_t &)
static HostCheckBox * PlaybackWatchList()
static QString GetOSDHelp(const QString &osd)
PlaybackProfileConfig(const QString &profilename)
static GlobalSpinBox * MaximumCommercialSkip()
static HostSpinBox * FrontendIdleTimeout()
static HostCheckBox * RememberRecGroup()
static void CreateVAAPIProfiles(const QString &hostname)
static GlobalCheckBox * AggressiveCommDetect()
static HostSpinBox * CommRewindAmount()
TransSpinBoxSetting * max_cpus
static HostCheckBox * MacFloatEnabled()
static HostComboBox * PlayBoxEpisodeSort()
static GlobalSpinBox * GRHardHearRecPriority()
bool boolValue(void) const
Definition: settings.h:431
static HostCheckBox * MacGammaCorrect()
static HostComboBox * DisplayRecGroup()
TransCheckBoxSetting * osdfade
static HostCheckBox * LCDShowTime()
static HostCheckBox * BrowseChannelGroup()
static HostSpinBox * MacMainOpacity()
static HostComboBox * ThemePainter()
const DisplayResVector GetVideoModes(void)
Definition: DisplayRes.cpp:262
static GlobalSpinBox * GRWSRecPriority()
static RSA * LoadKey(void)
LoadKey.
static HostSpinBox * MacDesktopSkip()
__u8 data[42]
Definition: videodev2.h:1039
virtual void addChild(Configurable *child)
static QStringList GetDeinterlacers(const QString &video_renderer)
virtual void setLabel(QString)
Definition: settings.cpp:1194
static HostCheckBox * AirPlayEnabled()
vector< TransLabelSetting * > labels
static HostCheckBox * LCDShowMusic()
QVariant value(int i) const
Definition: mythdbcon.h:182
void removeTarget(QString triggerValue)
static HostSpinBox * PlaybackWLMaxAge()
static GlobalSpinBox * AutoExpireDayPriority()
static HostCheckBox * LCDShowMenu()
static bool showGetTextPopup(MythMainWindow *parent, QString title, QString message, QString &text)
static HostCheckBox * AutomaticSetWatched()
AspectOverrideMode
Definition: videoouttypes.h:46
static HostSpinBox * LiveTVIdleTimeout()
static HostSpinBox * GuiOffsetX()
TransComboBoxSetting * decoder
static HorizontalConfigurationGroup * AirPlayPasswordSettings()
static HostLineEdit * UDPNotifyPort()
void setLabel(const QString &label)
TransComboBoxSetting * deint0
void GetResolutionSetting(const QString &type, int &width, int &height, double &forced_aspect, double &refreshrate, int index=-1)
static HostComboBox * MythTimeFormat()
const char * name
Definition: ParseText.cpp:338
GeneralSettings(MythScreenStack *parent, const char *name=0)
static HostCheckBox * LCDEnable()
static HostLineEdit * AirPlayPassword()
virtual void addSelection(const QString &label, QString value=QString::null, bool select=false)
Definition: settings.cpp:115
static GlobalSpinBox * MinRecordDiskThreshold()
static HostCheckBox * BrowseAllTuners()
static HostCheckBox * DecodeExtraAudio()
static HostComboBox * DisplayGroupTitleSort()
static GlobalSpinBox * GROnScrSubRecPriority()
QDateTime current(bool stripped)
Returns current Date and Time in UTC.
Definition: mythdate.cpp:10
static HostComboBox * PIPLocationComboBox()
QString GetSetting(const QString &key, const QString &defaultval="")
static HostSpinBox * MacFullSkip()
static HostCheckBox * NetworkControlEnabled()
QList< ThemeInfo > GetThemes(ThemeType type)
static HostCheckBox * UseFixedWindowSize()
static int GetNumberXineramaScreens(void)
static GlobalComboBox * GRSchedOpenEnd()
static HostCheckBox * GuiSizeForTV()
__u64 val
Definition: videodev2.h:1041
static HostCheckBox * HideMouseCursor()
static HostSpinBox * HorizScanPercentage()
static TransLabelSetting * AirPlayRSAInfo()
static HostComboBox * LetterboxingColour()
static HostLineEdit * IgnoreMedia()
PlaybackProfileConfigs(const QString &str)
static QString trunc(const QString &str, int len)
static QString pad(const QString &str, int len)
static GlobalCheckBox * AutoExpireInsteadOfDelete()
static HostComboBox * MythShortDateFormat()
static HostCheckBox * DefaultCCMode()
static void CreateVDPAUProfiles(const QString &hostname)
static QMap< QString, QString > getLanguages(void)
static QString GetDefaultProfileName(const QString &hostname)
static QString GetPreferredVideoRenderer(const QString &decoder)
static void CreateNewProfiles(const QString &hostname)
TransSpinBoxSetting * height[2]
static GlobalSpinBox * CategoryOverTime()
static MSqlQueryInfo InitCon(ConnectionReuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
Definition: mythdbcon.cpp: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 +.
static void CreateOpenMAXProfiles(const QString &hostname, int upgrade=0)
void deint0Changed(const QString &deint)
static void ISO639_fill_selections(SelectSetting *widget, uint i)
virtual void setHelpText(const QString &str)
Definition: settings.cpp:947
static void CreateOpenGLProfiles(const QString &hostname)
MythUIHelper * GetMythUI()
void addSelection(const QString &label, QString value=QString::null, bool select=false)
Definition: settings.cpp:733
static HostCheckBox * AlwaysOnTop()
static GlobalSpinBox * AutoExpireExtraSpace()
static GlobalSpinBox * GRCCRecPriority()
static GlobalSpinBox * GRAudioDescRecPriority()
static HostSpinBox * DisplaySizeHeight()
static HostSpinBox * XScanDisplacement()
MythMainWindow * GetMythMainWindow(void)
static HostComboBox * AutoCommercialSkip()
virtual void setEnabled(bool b)
Definition: settings.cpp:342
static bool showOkPopup(MythMainWindow *parent, const QString &title, const QString &message, QString button_msg=QString())
deque< int > GetPreferredSkipTypeCombinations(void)
static HostComboBox * XineramaScreen()
PIPLocation
Definition: videoouttypes.h:19
static HostSpinBox * PlaybackWLBlackOut()
static HostCheckBox * ClearSavedPosition()
AdjustFillMode
Definition: videoouttypes.h:57
VERBOSE_PREAMBLE Most Errors or other very important messages true
Definition: verbosedefs.h:91
string defaultsettings
Definition: mythburn.py:137
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.
Definition: mythdbcon.cpp:810
static GlobalSpinBox * DeferAutoTranscodeDays()
PlaybackProfileItemConfig(ProfileItem &_item)
static HostCheckBox * LCDBacklightOn()
virtual void triggerChanged(const QString &value)
VerticalConfigurationGroup(bool luselabel=true, bool luseframe=true, bool lzeroMargin=false, bool lzeroSpace=false)
static HostSpinBox * EPGRecThreshold()
static HostCheckBox * SmartForward()
QString iso639_str2_to_str3(const QString &str2)
Definition: iso639.cpp:70
static HostCheckBox * LCDShowChannel()
static MTV_PUBLIC VDALibrary * GetVDALibrary(void)
static HostComboBox * AspectOverride()
static HostLineEdit * HaltCommand()
TransLineEditSetting * filters
static HostSpinBox * VidModeHeight(int idx)
static const char * toString(OMX_AUDIO_DDPBITSTREAMID id)
static int FindBestMatch(const DisplayResVector &dsr, const DisplayResScreen &d, double &target_rate)
static QString GetDeinterlacerHelp(const QString &deint)
static GlobalCheckBox * RerecordWatched()
TransComboBoxSetting * vidrend
vector< TransButtonSetting * > delProf
static HostCheckBox * EnableMHEGic()
static QString GetVideoRendererHelp(const QString &renderer)
static HostSpinBox * GuiOffsetY()
static HostCheckBox * MacScaleUp()
static HostLineEdit * SetupPinCode()
static HostLineEdit * LircDaemonDevice()
virtual void setHelpText(const QString &str)
Definition: settings.cpp:793
static HostComboBox MUNUSED * DecodeVBIFormat()
vector< TransButtonSetting * > editProf
QString Get(const QString &value) const
static HostSpinBox * MacFloatSkip()
bool enabled
Definition: settings.h:86
virtual void setLabel(QString str)
Definition: settings.h:57
virtual DialogCode exec(bool saveOnExec=true, bool doLoad=true)
static HostSpinBox * DisplaySizeWidth()
static HostSpinBox * YScanDisplacement()
void swap(int indexA, int intexB)
static GlobalSpinBox * RecordOverTime()
void Set(const QString &value, const QString &data)
static HostComboBox * LongChannelFormat()
static HostComboBox * MythDateFormatCB()
LetterBoxColour
Definition: videoouttypes.h:72
static HostCheckBox * EnableMHEG()
static bool DeleteProfileGroup(const QString &groupname, const QString &hostname)
virtual QString getValue(void) const
Definition: settings.cpp:91
VerticalConfigurationGroup * last_main
static HostSpinBox * MacDockSkip()
static HostCheckBox * AirPlayAudioOnly()
void setUseLabel(bool useit)
void setLabelAboveWidget(bool l=true)
Definition: settings.h:59
static HostComboBox * ChannelOrdering()
static HostLineEdit * RebootCommand()
Scheduler * sched
static QString GetDecoderHelp(QString decoder=QString::null)
static GlobalComboBox * AutoExpireMethod()
static bool SaveDB(uint groupid, item_list_t &)
static QString iso639_key_to_str3(int code)
Definition: iso639.h:46
TransComboBoxSetting * deint1
TransSpinBoxSetting * width[2]
static HostSpinBox * LCDPopupTime()
void setTrigger(Configurable *_trigger)
static HostCheckBox * FFmpegDemuxer()
static QStringList GetProfiles(const QString &hostname)
static HostCheckBox * RunInWindow()
bool exec(void)
Wrap QSqlQuery::exec() so we can display SQL.
Definition: mythdbcon.cpp:610
string videomode
Definition: mythburn.py:138
virtual void setSaveAll(bool b)
static GlobalSpinBox * GRHDTVRecPriority()
static HostCheckBox * AirPlayPasswordEnabled()
static void CreateVDAProfiles(const QString &hostname)
static GlobalCheckBox * CommFlagFast()
static QStringList GetVideoRenderers(const QString &decoder)
static HostCheckBox * PlaybackWLAutoExpire()
static GlobalSpinBox * MergeShortCommBreaks()
static GlobalComboBox * OverTimeCategory()
TransComboBoxSetting * cmp[2]
QString GetLanguage(void)
Returns two character ISO-639 language descriptor for UI language.
HostComboBox * grouptrigger
static HostCheckBox * LCDShowRecStatus()
QString GetHostName(void)
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()
__s32 value
Definition: videodev2.h:1042
static GlobalCheckBox * AutoExpireWatchedPriority()
static HostCheckBox * UseVideoModes()
virtual void setValue(int newValue)
Definition: settings.cpp:521
QMap< int, QString > _iso639_key_to_english_name
Definition: iso639.cpp:12
virtual void Save(void)
void addChild(Configurable *child)
static HostCheckBox * AltClearSavedPosition()
void addTarget(QString triggerValue, Configurable *target)
static HostSpinBox * FFRewReposTime()