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