00001
00002
00003
00004
00005 #include <unistd.h>
00006 #include <fcntl.h>
00007 #include <sys/types.h>
00008 #include <sys/stat.h>
00009
00010
00011 #include <QCoreApplication>
00012 #include <QEvent>
00013 #include <QFileInfo>
00014 #include <QFile>
00015 #include <QDialog>
00016 #include <QCursor>
00017 #include <QDir>
00018 #include <QImage>
00019 #include <QTextCodec>
00020 #include <QFontDatabase>
00021
00022
00023 #include "mythconfig.h"
00024 #include "mythcorecontext.h"
00025 #include "mythdbcon.h"
00026 #include "mythlogging.h"
00027 #include "dbsettings.h"
00028 #include "mythtranslation.h"
00029 #include "iso639.h"
00030 #include "playbackbox.h"
00031 #include "globalsettings.h"
00032 #include "recordingprofile.h"
00033 #include "mythdisplay.h"
00034 #include "DisplayRes.h"
00035 #include "uitypes.h"
00036 #include "cardutil.h"
00037 #include "themeinfo.h"
00038 #include "mythconfig.h"
00039 #include "mythdirs.h"
00040 #include "mythuihelper.h"
00041
00042 #if defined(Q_OS_MACX)
00043 #include "privatedecoder_vda.h"
00044 #endif
00045
00046 static HostCheckBox *DecodeExtraAudio()
00047 {
00048 HostCheckBox *gc = new HostCheckBox("DecodeExtraAudio");
00049 gc->setLabel(QObject::tr("Extra audio buffering"));
00050 gc->setValue(true);
00051 gc->setHelpText(QObject::tr("Enable this setting if MythTV is playing "
00052 "\"crackly\" audio. This setting affects digital tuners "
00053 "(QAM/DVB/ATSC) and hardware encoders. It will have no "
00054 "effect on framegrabbers (MPEG-4/RTJPEG). MythTV will "
00055 "keep extra audio data in its internal buffers to "
00056 "workaround this bug."));
00057 return gc;
00058 }
00059
00060 static HostComboBox *PIPLocationComboBox()
00061 {
00062 HostComboBox *gc = new HostComboBox("PIPLocation");
00063 gc->setLabel(QObject::tr("PIP video location"));
00064 for (uint loc = 0; loc < kPIP_END; ++loc)
00065 gc->addSelection(toString((PIPLocation) loc), QString::number(loc));
00066 gc->setHelpText(QObject::tr("Location of PIP Video window."));
00067 return gc;
00068 }
00069
00070 static HostComboBox *DisplayRecGroup()
00071 {
00072 HostComboBox *gc = new HostComboBox("DisplayRecGroup");
00073 gc->setLabel(QObject::tr("Default group filter to apply"));
00074
00075 gc->addSelection(QObject::tr("All Programs"), QString("All Programs"));
00076 gc->addSelection(QObject::tr("Default"), QString("Default"));
00077
00078 MSqlQuery query(MSqlQuery::InitCon());
00079 query.prepare("SELECT DISTINCT recgroup from recorded;");
00080
00081 if (query.exec())
00082 {
00083 while (query.next())
00084 {
00085 if (query.value(0).toString() != "Default")
00086 {
00087 QString recgroup = query.value(0).toString();
00088 gc->addSelection(recgroup, recgroup);
00089 }
00090 }
00091 }
00092
00093 query.prepare("SELECT DISTINCT category from recorded;");
00094
00095 if (query.exec())
00096 {
00097 while (query.next())
00098 {
00099 QString key = query.value(0).toString();
00100 gc->addSelection(key, key);
00101 }
00102 }
00103
00104 gc->setHelpText(QObject::tr("Default group filter to apply "
00105 "on the View Recordings screen."));
00106 return gc;
00107 }
00108
00109 static HostCheckBox *QueryInitialFilter()
00110 {
00111 HostCheckBox *gc = new HostCheckBox("QueryInitialFilter");
00112 gc->setLabel(QObject::tr("Always prompt for initial group filter"));
00113 gc->setValue(false);
00114 gc->setHelpText(QObject::tr("If enabled, always prompt the user for the "
00115 "initial filter to apply when entering the "
00116 "Watch Recordings screen."));
00117 return gc;
00118 }
00119
00120 static HostCheckBox *RememberRecGroup()
00121 {
00122 HostCheckBox *gc = new HostCheckBox("RememberRecGroup");
00123 gc->setLabel(QObject::tr("Save current group filter when changed"));
00124 gc->setValue(true);
00125 gc->setHelpText(QObject::tr("If enabled, remember the last selected filter "
00126 "instead of displaying the default filter "
00127 "whenever you enter the playback screen."));
00128 return gc;
00129 }
00130
00131 static HostCheckBox *UseGroupNameAsAllPrograms()
00132 {
00133 HostCheckBox *gc = new HostCheckBox("DispRecGroupAsAllProg");
00134 gc->setLabel(QObject::tr("Show filter name instead of \"All Programs\""));
00135 gc->setValue(false);
00136 gc->setHelpText(QObject::tr("If enabled, use the name of the display "
00137 "filter currently applied in place of the term \"All "
00138 "Programs\" in the playback screen."));
00139 return gc;
00140 }
00141
00142 static HostCheckBox *PBBStartInTitle()
00143 {
00144 HostCheckBox *gc = new HostCheckBox("PlaybackBoxStartInTitle");
00145 gc->setLabel(QObject::tr("Start in group list"));
00146 gc->setValue(true);
00147 gc->setHelpText(QObject::tr("If enabled, the focus will "
00148 "start on the group list, otherwise the "
00149 "focus will default to the recordings."));
00150 return gc;
00151 }
00152
00153 static HostCheckBox *SmartForward()
00154 {
00155 HostCheckBox *gc = new HostCheckBox("SmartForward");
00156 gc->setLabel(QObject::tr("Smart fast forwarding"));
00157 gc->setValue(false);
00158 gc->setHelpText(QObject::tr("If enabled, then immediately after "
00159 "rewinding, only skip forward the same amount as "
00160 "skipping backwards."));
00161 return gc;
00162 }
00163
00164 static GlobalComboBox *CommercialSkipMethod()
00165 {
00166 GlobalComboBox *bc = new GlobalComboBox("CommercialSkipMethod");
00167 bc->setLabel(QObject::tr("Commercial detection method"));
00168 bc->setHelpText(QObject::tr(
00169 "This determines the method used by MythTV to "
00170 "detect when commercials start and end."));
00171
00172 deque<int> tmp = GetPreferredSkipTypeCombinations();
00173 for (uint i = 0; i < tmp.size(); ++i)
00174 bc->addSelection(SkipTypeToString(tmp[i]), QString::number(tmp[i]));
00175
00176 return bc;
00177 }
00178
00179 static GlobalCheckBox *CommFlagFast()
00180 {
00181 GlobalCheckBox *gc = new GlobalCheckBox("CommFlagFast");
00182 gc->setLabel(QObject::tr("Enable experimental speedup of commercial detection"));
00183 gc->setValue(false);
00184 gc->setHelpText(QObject::tr("If enabled, experimental commercial detection "
00185 "speedups will be enabled."));
00186 return gc;
00187 }
00188
00189 static HostComboBox *AutoCommercialSkip()
00190 {
00191 HostComboBox *gc = new HostComboBox("AutoCommercialSkip");
00192 gc->setLabel(QObject::tr("Automatically skip commercials"));
00193 gc->addSelection(QObject::tr("Off"), "0");
00194 gc->addSelection(QObject::tr("Notify, but do not skip"), "2");
00195 gc->addSelection(QObject::tr("Automatically Skip"), "1");
00196 gc->setHelpText(QObject::tr("Automatically skip commercial breaks that "
00197 "have been flagged during automatic commercial detection "
00198 "or by the mythcommflag program, or just notify that a "
00199 "commercial has been detected."));
00200 return gc;
00201 }
00202
00203 static GlobalSpinBox *DeferAutoTranscodeDays()
00204 {
00205 GlobalSpinBox *gs = new GlobalSpinBox("DeferAutoTranscodeDays", 0, 365, 1);
00206 gs->setLabel(QObject::tr("Deferral days for auto transcode jobs"));
00207 gs->setHelpText(QObject::tr("If non-zero, automatic transcode jobs will "
00208 "be scheduled to run this many days after a recording "
00209 "completes instead of immediately afterwards."));
00210 gs->setValue(0);
00211 return gs;
00212 }
00213
00214 static GlobalCheckBox *AggressiveCommDetect()
00215 {
00216 GlobalCheckBox *bc = new GlobalCheckBox("AggressiveCommDetect");
00217 bc->setLabel(QObject::tr("Strict commercial detection"));
00218 bc->setValue(true);
00219 bc->setHelpText(QObject::tr("Enable stricter commercial detection code. "
00220 "Disable if some commercials are not being detected."));
00221 return bc;
00222 }
00223
00224 static HostSpinBox *CommRewindAmount()
00225 {
00226 HostSpinBox *gs = new HostSpinBox("CommRewindAmount", 0, 10, 1);
00227 gs->setLabel(QObject::tr("Commercial skip automatic rewind amount (secs)"));
00228 gs->setHelpText(QObject::tr("MythTV will automatically rewind "
00229 "this many seconds after performing a commercial skip."));
00230 gs->setValue(0);
00231 return gs;
00232 }
00233
00234 static HostSpinBox *CommNotifyAmount()
00235 {
00236 HostSpinBox *gs = new HostSpinBox("CommNotifyAmount", 0, 10, 1);
00237 gs->setLabel(QObject::tr("Commercial skip notify amount (secs)"));
00238 gs->setHelpText(QObject::tr("MythTV will act like a commercial "
00239 "begins this many seconds early. This can be useful "
00240 "when commercial notification is used in place of "
00241 "automatic skipping."));
00242 gs->setValue(0);
00243 return gs;
00244 }
00245
00246 static GlobalSpinBox *MaximumCommercialSkip()
00247 {
00248 GlobalSpinBox *bs = new GlobalSpinBox("MaximumCommercialSkip", 0, 3600, 10);
00249 bs->setLabel(QObject::tr("Maximum commercial skip (secs)"));
00250 bs->setHelpText(QObject::tr("MythTV will discourage long manual commercial "
00251 "skips. Skips which are longer than this will require the "
00252 "user to hit the SKIP key twice. Automatic commercial "
00253 "skipping is not affected by this limit."));
00254 bs->setValue(3600);
00255 return bs;
00256 }
00257
00258 static GlobalSpinBox *MergeShortCommBreaks()
00259 {
00260 GlobalSpinBox *bs = new GlobalSpinBox("MergeShortCommBreaks", 0, 3600, 5);
00261 bs->setLabel(QObject::tr("Merge short commercial breaks (secs)"));
00262 bs->setHelpText(QObject::tr("Treat consecutive commercial breaks shorter "
00263 "than this as one break when skipping forward. Useful if "
00264 "you have to skip a few times during breaks. Applies to "
00265 "automatic skipping as well. Set to 0 to disable."));
00266 bs->setValue(0);
00267 return bs;
00268 }
00269
00270 static GlobalSpinBox *AutoExpireExtraSpace()
00271 {
00272 GlobalSpinBox *bs = new GlobalSpinBox("AutoExpireExtraSpace", 0, 200, 1);
00273 bs->setLabel(QObject::tr("Extra disk space (GB)"));
00274 bs->setHelpText(QObject::tr("Extra disk space (in gigabytes) beyond what "
00275 "MythTV requires that you want to keep free on the "
00276 "recording file systems."));
00277 bs->setValue(1);
00278 return bs;
00279 };
00280
00281 #if 0
00282 static GlobalCheckBox *AutoExpireInsteadOfDelete()
00283 {
00284 GlobalCheckBox *cb = new GlobalCheckBox("AutoExpireInsteadOfDelete");
00285 cb->setLabel(QObject::tr("Auto-Expire instead of delete recording"));
00286 cb->setValue(false);
00287 cb->setHelpText(QObject::tr("If enabled, move deleted recordings to the "
00288 "'Deleted' recgroup and turn on autoexpire "
00289 "instead of deleting immediately."));
00290 return cb;
00291 }
00292 #endif
00293
00294 static GlobalSpinBox *DeletedMaxAge()
00295 {
00296 GlobalSpinBox *bs = new GlobalSpinBox("DeletedMaxAge", -1, 365, 1);
00297 bs->setLabel(QObject::tr("Time to retain deleted recordings (days)"));
00298 bs->setHelpText(QObject::tr("Determines the maximum number of days before "
00299 "undeleting a recording will become impossible. "
00300 "A value of zero means the recording will be "
00301 "permanently deleted between 5 and 20 minutes "
00302 "later. A value of minus one means recordings "
00303 "will be retained until space is required. "
00304 "A recording will always be removed before this "
00305 "time if the space is needed for a new recording."));
00306 bs->setValue(0);
00307 return bs;
00308 };
00309
00310 #if 0
00311 class DeletedExpireOptions : public TriggeredConfigurationGroup
00312 {
00313 public:
00314 DeletedExpireOptions() :
00315 TriggeredConfigurationGroup(false, false, false, false)
00316 {
00317 setLabel(QObject::tr("DeletedExpireOptions"));
00318 Setting* enabled = AutoExpireInsteadOfDelete();
00319 addChild(enabled);
00320 setTrigger(enabled);
00321
00322 HorizontalConfigurationGroup* settings =
00323 new HorizontalConfigurationGroup(false);
00324 settings->addChild(DeletedMaxAge());
00325 addTarget("1", settings);
00326
00327
00328 addTarget("0", new HorizontalConfigurationGroup(true));
00329 };
00330 };
00331 #endif
00332
00333 static GlobalComboBox *AutoExpireMethod()
00334 {
00335 GlobalComboBox *bc = new GlobalComboBox("AutoExpireMethod");
00336 bc->setLabel(QObject::tr("Auto-Expire method"));
00337 bc->addSelection(QObject::tr("Oldest show first"), "1");
00338 bc->addSelection(QObject::tr("Lowest priority first"), "2");
00339 bc->addSelection(QObject::tr("Weighted time/priority combination"), "3");
00340 bc->setHelpText(QObject::tr("Method used to determine which recorded "
00341 "shows to delete first. Live TV recordings will always "
00342 "expire before normal recordings."));
00343 bc->setValue(1);
00344 return bc;
00345 }
00346
00347 static GlobalCheckBox *AutoExpireWatchedPriority()
00348 {
00349 GlobalCheckBox *bc = new GlobalCheckBox("AutoExpireWatchedPriority");
00350 bc->setLabel(QObject::tr("Watched before unwatched"));
00351 bc->setValue(false);
00352 bc->setHelpText(QObject::tr("If enabled, programs that have been marked as "
00353 "watched will be expired before programs that have not "
00354 "been watched."));
00355 return bc;
00356 }
00357
00358 static GlobalSpinBox *AutoExpireDayPriority()
00359 {
00360 GlobalSpinBox *bs = new GlobalSpinBox("AutoExpireDayPriority", 1, 400, 1);
00361 bs->setLabel(QObject::tr("Priority weight"));
00362 bs->setHelpText(QObject::tr("The number of days bonus a program gets for "
00363 "each priority point. This is only used when the Weighted "
00364 "time/priority Auto-Expire method is selected."));
00365 bs->setValue(3);
00366 return bs;
00367 };
00368
00369 static GlobalSpinBox *AutoExpireLiveTVMaxAge()
00370 {
00371 GlobalSpinBox *bs = new GlobalSpinBox("AutoExpireLiveTVMaxAge", 1, 365, 1);
00372 bs->setLabel(QObject::tr("Live TV max age (days)"));
00373 bs->setHelpText(QObject::tr("Auto-Expire will force expiration of Live "
00374 "TV recordings when they are this many days old. Live TV "
00375 "recordings may also be expired early if necessary to "
00376 "free up disk space."));
00377 bs->setValue(1);
00378 return bs;
00379 };
00380
00381 #if 0
00382 static GlobalSpinBox *MinRecordDiskThreshold()
00383 {
00384 GlobalSpinBox *bs = new GlobalSpinBox("MinRecordDiskThreshold",
00385 0, 1000000, 100);
00386 bs->setLabel(QObject::tr("New recording free disk space threshold "
00387 "(MB)"));
00388 bs->setHelpText(QObject::tr("MythTV will stop scheduling new recordings on "
00389 "a backend when its free disk space (in megabytes) falls "
00390 "below this value."));
00391 bs->setValue(300);
00392 return bs;
00393 }
00394 #endif
00395
00396 static GlobalCheckBox *RerecordWatched()
00397 {
00398 GlobalCheckBox *bc = new GlobalCheckBox("RerecordWatched");
00399 bc->setLabel(QObject::tr("Re-record watched"));
00400 bc->setValue(false);
00401 bc->setHelpText(QObject::tr("If enabled, programs that have been marked as "
00402 "watched and are Auto-Expired will be re-recorded if "
00403 "they are shown again."));
00404 return bc;
00405 }
00406
00407 static GlobalSpinBox *RecordPreRoll()
00408 {
00409 GlobalSpinBox *bs = new GlobalSpinBox("RecordPreRoll", 0, 600, 60, true);
00410 bs->setLabel(QObject::tr("Time to record before start of show "
00411 "(secs)"));
00412 bs->setHelpText(QObject::tr("This global setting allows the recorder "
00413 "to start before the scheduled start time. It does "
00414 "not affect the scheduler. It is ignored when two shows "
00415 "have been scheduled without enough time in between."));
00416 bs->setValue(0);
00417 return bs;
00418 }
00419
00420 static GlobalSpinBox *RecordOverTime()
00421 {
00422 GlobalSpinBox *bs = new GlobalSpinBox("RecordOverTime", 0, 1800, 60, true);
00423 bs->setLabel(QObject::tr("Time to record past end of show (secs)"));
00424 bs->setValue(0);
00425 bs->setHelpText(QObject::tr("This global setting allows the recorder "
00426 "to record beyond the scheduled end time. It does "
00427 "not affect the scheduler. It is ignored when two shows "
00428 "have been scheduled without enough time in between."));
00429 return bs;
00430 }
00431
00432 static GlobalComboBox *OverTimeCategory()
00433 {
00434 GlobalComboBox *gc = new GlobalComboBox("OverTimeCategory");
00435 gc->setLabel(QObject::tr("Category of shows to be extended"));
00436 gc->setHelpText(QObject::tr("For a special category (e.g. "
00437 "\"Sports event\"), request that shows be autoextended. "
00438 "Only works if a show's category can be determined."));
00439
00440 MSqlQuery query(MSqlQuery::InitCon());
00441 query.prepare("SELECT DISTINCT category FROM program GROUP BY category;");
00442
00443 gc->addSelection("", "");
00444 if (query.exec())
00445 {
00446 while (query.next())
00447 {
00448 QString key = query.value(0).toString();
00449 if (!key.trimmed().isEmpty())
00450 gc->addSelection(key, key);
00451 }
00452 }
00453
00454 return gc;
00455 }
00456
00457 static GlobalSpinBox *CategoryOverTime()
00458 {
00459 GlobalSpinBox *bs = new GlobalSpinBox("CategoryOverTime",
00460 0, 180, 60, true);
00461 bs->setLabel(QObject::tr("Record past end of show (mins)"));
00462 bs->setValue(30);
00463 bs->setHelpText(QObject::tr("For the specified category, an attempt "
00464 "will be made to extend the recording by the specified "
00465 "number of minutes. It is ignored when two shows have "
00466 "been scheduled without enough time in-between."));
00467 return bs;
00468 }
00469
00470 static VerticalConfigurationGroup *CategoryOverTimeSettings()
00471 {
00472 VerticalConfigurationGroup *vcg =
00473 new VerticalConfigurationGroup(false, false);
00474
00475 vcg->setLabel(QObject::tr("Category record over-time"));
00476 vcg->setUseLabel(true);
00477 vcg->addChild(OverTimeCategory());
00478 vcg->addChild(CategoryOverTime());
00479 return vcg;
00480 }
00481
00482 static QString trunc(const QString &str, int len)
00483 {
00484 if (str.length() > len)
00485 return str.mid(0, len - 5) + " . . . ";
00486 return str;
00487 }
00488
00489 static QString pad(const QString &str, int len)
00490 {
00491 QString tmp = str;
00492
00493 while (tmp.length() + 4 < len)
00494 tmp += " ";
00495
00496 while (tmp.length() < len)
00497 tmp += " ";
00498
00499 return tmp;
00500 }
00501
00502 PlaybackProfileItemConfig::PlaybackProfileItemConfig(ProfileItem &_item) :
00503 item(_item)
00504 {
00505 setLabel(QObject::tr("Profile Item"));
00506
00507 HorizontalConfigurationGroup *row[2];
00508
00509 row[0] = new HorizontalConfigurationGroup(false, false, true, true);
00510 cmp[0] = new TransComboBoxSetting();
00511 width[0] = new TransSpinBoxSetting(0, 1920, 64, true);
00512 height[0] = new TransSpinBoxSetting(0, 1088, 64, true);
00513 row[1] = new HorizontalConfigurationGroup(false, false, true, true);
00514 cmp[1] = new TransComboBoxSetting();
00515 width[1] = new TransSpinBoxSetting(0, 1920, 64, true);
00516 height[1] = new TransSpinBoxSetting(0, 1088, 64, true);
00517 decoder = new TransComboBoxSetting();
00518 max_cpus = new TransSpinBoxSetting(1, HAVE_THREADS ? 4 : 1, 1, true);
00519 skiploop = new TransCheckBoxSetting();
00520 vidrend = new TransComboBoxSetting();
00521 osdrend = new TransComboBoxSetting();
00522 osdfade = new TransCheckBoxSetting();
00523 deint0 = new TransComboBoxSetting();
00524 deint1 = new TransComboBoxSetting();
00525 filters = new TransLineEditSetting(true);
00526
00527 for (uint i = 0; i < 2; ++i)
00528 {
00529 const QString kCMP[6] = { "", "<", "<=", "==", ">=", ">" };
00530 for (uint j = 0; j < 6; ++j)
00531 cmp[i]->addSelection(kCMP[j]);
00532
00533 cmp[i]->setLabel(tr("Match criteria"));
00534 width[i]->setName(QString("w%1").arg(i));
00535 width[i]->setLabel(tr("W", "Width"));
00536 height[i]->setName(QString("h%1").arg(i));
00537 height[i]->setLabel(tr("H", "Height"));
00538
00539 row[i]->addChild(cmp[i]);
00540 row[i]->addChild(width[i]);
00541 row[i]->addChild(height[i]);
00542 }
00543
00544 HorizontalConfigurationGroup *vid_row =
00545 new HorizontalConfigurationGroup(false, false, true, true);
00546 HorizontalConfigurationGroup *osd_row =
00547 new HorizontalConfigurationGroup(false, false, true, true);
00548
00549 decoder->setLabel(tr("Decoder"));
00550 max_cpus->setLabel(tr("Max CPUs"));
00551 skiploop->setLabel(tr("Deblocking filter"));
00552 vidrend->setLabel(tr("Video renderer"));
00553 osdrend->setLabel(tr("OSD renderer"));
00554 osdfade->setLabel(tr("OSD fade"));
00555 deint0->setLabel(tr("Primary deinterlacer"));
00556 deint1->setLabel(tr("Fallback deinterlacer"));
00557 filters->setLabel(tr("Custom filters"));
00558
00559 max_cpus->setHelpText(
00560 tr("Maximum number of CPU cores used for video decoding and filtering.") +
00561 (HAVE_THREADS ? "" :
00562 tr(" Multithreaded decoding disabled-only one CPU "
00563 "will be used, please recompile with "
00564 "--enable-ffmpeg-pthreads to enable.")));
00565
00566 filters->setHelpText(
00567 QObject::tr("Example custom filter list: 'ivtc,denoise3d'"));
00568
00569 skiploop->setHelpText(
00570 tr("When unchecked the deblocking loopfilter will be disabled ") + "\n" +
00571 tr("Disabling will significantly reduce the load on the CPU "
00572 "when watching HD H.264 but may significantly reduce video quality."));
00573
00574 osdfade->setHelpText(
00575 tr("When unchecked the OSD will not fade away but instead "
00576 "will disappear abruptly.") + '\n' +
00577 tr("Uncheck this if the video studders while the OSD is "
00578 "fading away."));
00579
00580 vid_row->addChild(decoder);
00581 vid_row->addChild(max_cpus);
00582 vid_row->addChild(skiploop);
00583 osd_row->addChild(vidrend);
00584 osd_row->addChild(osdrend);
00585 osd_row->addChild(osdfade);
00586
00587 VerticalConfigurationGroup *grp =
00588 new VerticalConfigurationGroup(false, false, true, true);
00589 grp->addChild(row[0]);
00590 grp->addChild(row[1]);
00591 grp->addChild(vid_row);
00592 grp->addChild(osd_row);
00593 addChild(grp);
00594
00595 VerticalConfigurationGroup *page2 =
00596 new VerticalConfigurationGroup(false, false, true, true);
00597 page2->addChild(deint0);
00598 page2->addChild(deint1);
00599 page2->addChild(filters);
00600 addChild(page2);
00601
00602 connect(decoder, SIGNAL(valueChanged(const QString&)),
00603 this, SLOT(decoderChanged(const QString&)));\
00604 connect(vidrend, SIGNAL(valueChanged(const QString&)),
00605 this, SLOT(vrenderChanged(const QString&)));
00606 connect(osdrend, SIGNAL(valueChanged(const QString&)),
00607 this, SLOT(orenderChanged(const QString&)));
00608 connect(deint0, SIGNAL(valueChanged(const QString&)),
00609 this, SLOT(deint0Changed(const QString&)));
00610 connect(deint1, SIGNAL(valueChanged(const QString&)),
00611 this, SLOT(deint1Changed(const QString&)));
00612 }
00613
00614 void PlaybackProfileItemConfig::Load(void)
00615 {
00616 for (uint i = 0; i < 2; ++i)
00617 {
00618 QString pcmp = item.Get(QString("pref_cmp%1").arg(i));
00619 QStringList clist = pcmp.split(" ");
00620
00621 if (clist.size() == 0)
00622 clist<<((i) ? "" : ">");
00623 if (clist.size() == 1)
00624 clist<<"0";
00625 if (clist.size() == 2)
00626 clist<<"0";
00627
00628 cmp[i]->setValue(clist[0]);
00629 width[i]->setValue(clist[1].toInt());
00630 height[i]->setValue(clist[2].toInt());
00631 }
00632
00633 QString pdecoder = item.Get("pref_decoder");
00634 QString pmax_cpus = item.Get("pref_max_cpus");
00635 QString pskiploop = item.Get("pref_skiploop");
00636 QString prenderer = item.Get("pref_videorenderer");
00637 QString posd = item.Get("pref_osdrenderer");
00638 QString posdfade = item.Get("pref_osdfade");
00639 QString pdeint0 = item.Get("pref_deint0");
00640 QString pdeint1 = item.Get("pref_deint1");
00641 QString pfilter = item.Get("pref_filters");
00642 bool found = false;
00643
00644 QString dech = VideoDisplayProfile::GetDecoderHelp();
00645 QStringList decr = VideoDisplayProfile::GetDecoders();
00646 QStringList decn = VideoDisplayProfile::GetDecoderNames();
00647 QStringList::const_iterator itr = decr.begin();
00648 QStringList::const_iterator itn = decn.begin();
00649 for (; (itr != decr.end()) && (itn != decn.end()); ++itr, ++itn)
00650 {
00651 decoder->addSelection(*itn, *itr, (*itr == pdecoder));
00652 found |= (*itr == pdecoder);
00653 }
00654 if (!found && !pdecoder.isEmpty())
00655 {
00656 decoder->SelectSetting::addSelection(
00657 VideoDisplayProfile::GetDecoderName(pdecoder), pdecoder, true);
00658 }
00659 decoder->setHelpText(VideoDisplayProfile::GetDecoderHelp(pdecoder));
00660
00661 if (!pmax_cpus.isEmpty())
00662 max_cpus->setValue(pmax_cpus.toUInt());
00663
00664 skiploop->setValue((!pskiploop.isEmpty()) ? (bool) pskiploop.toInt() : true);
00665
00666 if (!prenderer.isEmpty())
00667 vidrend->setValue(prenderer);
00668 if (!posd.isEmpty())
00669 osdrend->setValue(posd);
00670
00671 osdfade->setValue((!posdfade.isEmpty()) ? (bool) posdfade.toInt() : true);
00672
00673 if (!pdeint0.isEmpty())
00674 deint0->setValue(pdeint0);
00675 if (!pdeint1.isEmpty())
00676 deint1->setValue(pdeint1);
00677 if (!pfilter.isEmpty())
00678 filters->setValue(pfilter);
00679 }
00680
00681 void PlaybackProfileItemConfig::Save(void)
00682 {
00683 for (uint i = 0; i < 2; ++i)
00684 {
00685 QString val = QString("pref_cmp%1").arg(i);
00686 QString data;
00687 if (!cmp[i]->getValue().isEmpty())
00688 {
00689 data = QString("%1 %2 %3")
00690 .arg(cmp[i]->getValue())
00691 .arg(width[i]->intValue())
00692 .arg(height[i]->intValue());
00693 }
00694 item.Set(val, data);
00695 }
00696
00697 item.Set("pref_decoder", decoder->getValue());
00698 item.Set("pref_max_cpus", max_cpus->getValue());
00699 item.Set("pref_skiploop", (skiploop->boolValue()) ? "1" : "0");
00700 item.Set("pref_videorenderer", vidrend->getValue());
00701 item.Set("pref_osdrenderer", osdrend->getValue());
00702 item.Set("pref_osdfade", (osdfade->boolValue()) ? "1" : "0");
00703 item.Set("pref_deint0", deint0->getValue());
00704 item.Set("pref_deint1", deint1->getValue());
00705
00706 QString tmp0 = filters->getValue();
00707 QString tmp1 = vidrend->getValue();
00708 QString tmp3 = VideoDisplayProfile::IsFilterAllowed(tmp1) ? tmp0 : "";
00709 item.Set("pref_filters", tmp3);
00710 }
00711
00712 void PlaybackProfileItemConfig::decoderChanged(const QString &dec)
00713 {
00714 QString vrenderer = vidrend->getValue();
00715 QStringList renderers = VideoDisplayProfile::GetVideoRenderers(dec);
00716 QStringList::const_iterator it;
00717
00718 QString prenderer;
00719 for (it = renderers.begin(); it != renderers.end(); ++it)
00720 prenderer = (*it == vrenderer) ? vrenderer : prenderer;
00721 if (prenderer.isEmpty())
00722 prenderer = VideoDisplayProfile::GetPreferredVideoRenderer(dec);
00723
00724 vidrend->clearSelections();
00725 for (it = renderers.begin(); it != renderers.end(); ++it)
00726 {
00727 if (*it != "null")
00728 vidrend->addSelection(*it, *it, (*it == prenderer));
00729 }
00730
00731 decoder->setHelpText(VideoDisplayProfile::GetDecoderHelp(dec));
00732 }
00733
00734 void PlaybackProfileItemConfig::vrenderChanged(const QString &renderer)
00735 {
00736 QStringList osds = VideoDisplayProfile::GetOSDs(renderer);
00737 QStringList deints = VideoDisplayProfile::GetDeinterlacers(renderer);
00738 QString losd = osdrend->getValue();
00739 QString ldeint0 = deint0->getValue();
00740 QString ldeint1 = deint1->getValue();
00741 QStringList::const_iterator it;
00742
00743 osdrend->clearSelections();
00744 for (it = osds.begin(); it != osds.end(); ++it)
00745 osdrend->addSelection(*it, *it, (*it == losd));
00746
00747 deint0->clearSelections();
00748 for (it = deints.begin(); it != deints.end(); ++it)
00749 {
00750 deint0->addSelection(VideoDisplayProfile::GetDeinterlacerName(*it),
00751 *it, (*it == ldeint0));
00752 }
00753
00754 deint1->clearSelections();
00755 for (it = deints.begin(); it != deints.end(); ++it)
00756 {
00757 if (!(*it).contains("bobdeint") && !(*it).contains("doublerate") &&
00758 !(*it).contains("doubleprocess"))
00759 deint1->addSelection(VideoDisplayProfile::GetDeinterlacerName(*it),
00760 *it, (*it == ldeint1));
00761 }
00762
00763 filters->setEnabled(VideoDisplayProfile::IsFilterAllowed(renderer));
00764 vidrend->setHelpText(VideoDisplayProfile::GetVideoRendererHelp(renderer));
00765 }
00766
00767 void PlaybackProfileItemConfig::orenderChanged(const QString &renderer)
00768 {
00769 osdrend->setHelpText(VideoDisplayProfile::GetOSDHelp(renderer));
00770 }
00771
00772 void PlaybackProfileItemConfig::deint0Changed(const QString &deint)
00773 {
00774 deint0->setHelpText(
00775 QObject::tr("Main deinterlacing method.") + ' ' +
00776 VideoDisplayProfile::GetDeinterlacerHelp(deint));
00777 }
00778
00779 void PlaybackProfileItemConfig::deint1Changed(const QString &deint)
00780 {
00781 deint1->setHelpText(
00782 QObject::tr("Fallback deinterlacing method.") + ' ' +
00783 VideoDisplayProfile::GetDeinterlacerHelp(deint));
00784 }
00785
00786 PlaybackProfileConfig::PlaybackProfileConfig(const QString &profilename) :
00787 VerticalConfigurationGroup(false, false, true, true),
00788 profile_name(profilename), needs_save(false),
00789 groupid(0), last_main(NULL)
00790 {
00791 groupid = VideoDisplayProfile::GetProfileGroupID(
00792 profilename, gCoreContext->GetHostName());
00793
00794 items = VideoDisplayProfile::LoadDB(groupid);
00795
00796 InitUI();
00797 }
00798
00799 PlaybackProfileConfig::~PlaybackProfileConfig()
00800 {
00801 }
00802
00803 void PlaybackProfileConfig::InitLabel(uint i)
00804 {
00805 if (!labels[i])
00806 return;
00807
00808 QString andStr = QObject::tr("&", "and");
00809 QString cmp0 = items[i].Get("pref_cmp0");
00810 QString cmp1 = items[i].Get("pref_cmp1");
00811 QString str = QObject::tr("if rez") + ' ' + cmp0;
00812
00813 if (!cmp1.isEmpty())
00814 str += " " + andStr + ' ' + cmp1;
00815
00816 str += " -> ";
00817 str += items[i].Get("pref_decoder");
00818 str += " " + andStr + ' ';
00819 str += items[i].Get("pref_videorenderer");
00820 str.replace("-blit", "");
00821 str.replace("ivtv " + andStr + " ivtv", "ivtv");
00822 str.replace("xvmc " + andStr + " xvmc", "xvmc");
00823 str.replace("xvmc", "XvMC");
00824 str.replace("xv", "XVideo");
00825
00826 labels[i]->setValue(pad(trunc(str, 48), 48));
00827 }
00828
00829 void PlaybackProfileConfig::InitUI(void)
00830 {
00831 VerticalConfigurationGroup *main =
00832 new VerticalConfigurationGroup(false, false, true, true);
00833
00834 HorizontalConfigurationGroup *rows =
00835 new HorizontalConfigurationGroup(false, false, true, true);
00836 VerticalConfigurationGroup *column1 =
00837 new VerticalConfigurationGroup(false, false, true, true);
00838 VerticalConfigurationGroup *column2 =
00839 new VerticalConfigurationGroup(false, false, true, true);
00840
00841 labels.resize(items.size());
00842
00843 for (uint i = 0; i < items.size(); ++i)
00844 {
00845 labels[i] = new TransLabelSetting();
00846 InitLabel(i);
00847 column1->addChild(labels[i]);
00848 }
00849
00850 editProf.resize(items.size());
00851 delProf.resize(items.size());
00852 priority.resize(items.size());
00853
00854 for (uint i = 0; i < items.size(); ++i)
00855 {
00856 HorizontalConfigurationGroup *grp =
00857 new HorizontalConfigurationGroup(false, false, true, true);
00858
00859 editProf[i] = new TransButtonSetting(QString("edit%1").arg(i));
00860 delProf[i] = new TransButtonSetting(QString("del%1").arg(i));
00861 priority[i] = new TransSpinBoxSetting(1, items.size(), 1);
00862 priority[i]->setName(QString("pri%1").arg(i));
00863
00864 editProf[i]->setLabel(QObject::tr("Edit"));
00865 delProf[i]->setLabel(QObject::tr("Delete"));
00866 priority[i]->setValue(i + 1);
00867 items[i].Set("pref_priority", QString::number(i + 1));
00868
00869 grp->addChild(editProf[i]);
00870 grp->addChild(delProf[i]);
00871 grp->addChild(priority[i]);
00872
00873 connect(editProf[i], SIGNAL(pressed(QString)),
00874 this, SLOT (pressed(QString)));
00875 connect(delProf[i], SIGNAL(pressed(QString)),
00876 this, SLOT (pressed(QString)));
00877 connect(priority[i], SIGNAL(valueChanged( const QString&, int)),
00878 this, SLOT( priorityChanged(const QString&, int)));
00879
00880 column2->addChild(grp);
00881 }
00882
00883 rows->addChild(column1);
00884 rows->addChild(column2);
00885
00886 TransButtonSetting *addEntry = new TransButtonSetting("addentry");
00887 addEntry->setLabel(QObject::tr("Add New Entry"));
00888
00889 main->addChild(rows);
00890 main->addChild(addEntry);
00891
00892 connect(addEntry, SIGNAL(pressed(QString)),
00893 this, SLOT (pressed(QString)));
00894
00895 if (last_main)
00896 replaceChild(last_main, main);
00897 else
00898 addChild(main);
00899
00900 last_main = main;
00901 }
00902
00903 void PlaybackProfileConfig::Load(void)
00904 {
00905
00906 }
00907
00908 void PlaybackProfileConfig::Save(void)
00909 {
00910 if (!needs_save)
00911 return;
00912
00913 bool ok = VideoDisplayProfile::DeleteDB(groupid, del_items);
00914 if (!ok)
00915 {
00916 LOG(VB_GENERAL, LOG_ERR,
00917 "PlaybackProfileConfig::Save() -- failed to delete items");
00918 return;
00919 }
00920
00921 ok = VideoDisplayProfile::SaveDB(groupid, items);
00922 if (!ok)
00923 {
00924 LOG(VB_GENERAL, LOG_ERR,
00925 "PlaybackProfileConfig::Save() -- failed to save items");
00926 return;
00927 }
00928 }
00929
00930 void PlaybackProfileConfig::pressed(QString cmd)
00931 {
00932 if (cmd.left(4) == "edit")
00933 {
00934 uint i = cmd.mid(4).toUInt();
00935 PlaybackProfileItemConfig itemcfg(items[i]);
00936
00937 if (itemcfg.exec() != kDialogCodeAccepted)
00938 LOG(VB_GENERAL, LOG_ERR, QString("edit #%1").arg(i) + " rejected");
00939
00940 InitLabel(i);
00941 needs_save = true;
00942 }
00943 else if (cmd.left(3) == "del")
00944 {
00945 uint i = cmd.mid(3).toUInt();
00946 del_items.push_back(items[i]);
00947 items.erase(items.begin() + i);
00948
00949 InitUI();
00950 needs_save = true;
00951 }
00952 else if (cmd == "addentry")
00953 {
00954 ProfileItem item;
00955 PlaybackProfileItemConfig itemcfg(item);
00956
00957 if (itemcfg.exec() != kDialogCodeAccepted)
00958 LOG(VB_GENERAL, LOG_ERR, "addentry rejected");
00959
00960 items.push_back(item);
00961 InitUI();
00962 needs_save = true;
00963 }
00964
00965 repaint();
00966 }
00967
00968 void PlaybackProfileConfig::priorityChanged(const QString &name, int val)
00969 {
00970 uint i = name.mid(3).toInt();
00971 uint j = i;
00972
00973 priority[i]->SetRelayEnabled(false);
00974
00975 if (((int)items[i].GetPriority() < val) &&
00976 (i + 1 < priority.size()) &&
00977 ((int)items[i+1].GetPriority() == val))
00978 {
00979 j++;
00980 priority[j]->SetRelayEnabled(false);
00981
00982 swap(i, j);
00983 priority[j]->setFocus();
00984 }
00985 else if (((int)items[i].GetPriority() > val) &&
00986 (i > 0) &&
00987 ((int)items[i-1].GetPriority() == val))
00988 {
00989 j--;
00990 priority[j]->SetRelayEnabled(false);
00991
00992 swap(i, j);
00993
00994 priority[j]->setFocus();
00995 }
00996 else
00997 {
00998 priority[i]->setValue((int) items[i].GetPriority());
00999 }
01000
01001 needs_save = true;
01002
01003 repaint();
01004
01005 priority[i]->SetRelayEnabled(true);
01006 if (i != j)
01007 priority[j]->SetRelayEnabled(true);
01008 }
01009
01010 void PlaybackProfileConfig::swap(int i, int j)
01011 {
01012 int pri_i = items[i].GetPriority();
01013 int pri_j = items[j].GetPriority();
01014
01015 ProfileItem item = items[j];
01016 items[j] = items[i];
01017 items[i] = item;
01018
01019 priority[i]->setValue(pri_i);
01020 priority[j]->setValue(pri_j);
01021
01022 items[i].Set("pref_priority", QString::number(pri_i));
01023 items[j].Set("pref_priority", QString::number(pri_j));
01024
01025 const QString label_i = labels[i]->getValue();
01026 const QString label_j = labels[j]->getValue();
01027 labels[i]->setValue(label_j);
01028 labels[j]->setValue(label_i);
01029 }
01030
01031 PlaybackProfileConfigs::PlaybackProfileConfigs(const QString &str) :
01032 TriggeredConfigurationGroup(false, true, true, true,
01033 false, false, true, true), grouptrigger(NULL)
01034 {
01035 setLabel(QObject::tr("Playback Profiles") + str);
01036
01037 QString host = gCoreContext->GetHostName();
01038 QStringList profiles = VideoDisplayProfile::GetProfiles(host);
01039 if (profiles.empty())
01040 {
01041 VideoDisplayProfile::CreateProfiles(host);
01042 profiles = VideoDisplayProfile::GetProfiles(host);
01043 }
01044 if (profiles.empty())
01045 return;
01046
01047 if (!profiles.contains("Normal") &&
01048 !profiles.contains("High Quality") &&
01049 !profiles.contains("Slim"))
01050 {
01051 VideoDisplayProfile::CreateNewProfiles(host);
01052 profiles = VideoDisplayProfile::GetProfiles(host);
01053 }
01054
01055 #ifdef USING_VDPAU
01056 if (!profiles.contains("VDPAU Normal") &&
01057 !profiles.contains("VDPAU High Quality") &&
01058 !profiles.contains("VDPAU Slim"))
01059 {
01060 VideoDisplayProfile::CreateVDPAUProfiles(host);
01061 profiles = VideoDisplayProfile::GetProfiles(host);
01062 }
01063 #endif
01064
01065 #if defined(Q_OS_MACX)
01066 if (VDALibrary::GetVDALibrary() != NULL)
01067 {
01068 if (!profiles.contains("VDA Normal") &&
01069 !profiles.contains("VDA High Quality") &&
01070 !profiles.contains("VDA Slim"))
01071 {
01072 VideoDisplayProfile::CreateVDAProfiles(host);
01073 profiles = VideoDisplayProfile::GetProfiles(host);
01074 }
01075 }
01076 #endif
01077
01078 #ifdef USING_OPENGL_VIDEO
01079 if (!profiles.contains("OpenGL Normal") &&
01080 !profiles.contains("OpenGL High Quality") &&
01081 !profiles.contains("OpenGL Slim"))
01082 {
01083 VideoDisplayProfile::CreateOpenGLProfiles(host);
01084 profiles = VideoDisplayProfile::GetProfiles(host);
01085 }
01086 #endif
01087
01088 #ifdef USING_GLVAAPI
01089 if (!profiles.contains("VAAPI Normal"))
01090 {
01091 VideoDisplayProfile::CreateVAAPIProfiles(host);
01092 profiles = VideoDisplayProfile::GetProfiles(host);
01093 }
01094 #endif
01095
01096 QString profile = VideoDisplayProfile::GetDefaultProfileName(host);
01097 if (!profiles.contains(profile))
01098 {
01099 profile = (profiles.contains("Normal")) ? "Normal" : profiles[0];
01100 VideoDisplayProfile::SetDefaultProfileName(profile, host);
01101 }
01102
01103 grouptrigger = new HostComboBox("DefaultVideoPlaybackProfile");
01104 grouptrigger->setLabel(QObject::tr("Current Video Playback Profile"));
01105 QStringList::const_iterator it;
01106 for (it = profiles.begin(); it != profiles.end(); ++it)
01107 grouptrigger->addSelection(ProgramInfo::i18n(*it), *it);
01108
01109 HorizontalConfigurationGroup *grp =
01110 new HorizontalConfigurationGroup(false, false, true, true);
01111 TransButtonSetting *addProf = new TransButtonSetting("add");
01112 TransButtonSetting *delProf = new TransButtonSetting("del");
01113
01114 addProf->setLabel(QObject::tr("Add New"));
01115 delProf->setLabel(QObject::tr("Delete"));
01116
01117 grp->addChild(grouptrigger);
01118 grp->addChild(addProf);
01119 grp->addChild(delProf);
01120
01121 addChild(grp);
01122
01123 setTrigger(grouptrigger);
01124 for (it = profiles.begin(); it != profiles.end(); ++it)
01125 addTarget(*it, new PlaybackProfileConfig(*it));
01126 setSaveAll(true);
01127
01128 connect(addProf, SIGNAL(pressed( QString)),
01129 this, SLOT (btnPress(QString)));
01130 connect(delProf, SIGNAL(pressed( QString)),
01131 this, SLOT (btnPress(QString)));
01132 }
01133
01134 PlaybackProfileConfigs::~PlaybackProfileConfigs()
01135 {
01136 #if 0
01137 LOG(VB_GENERAL, LOG_DEBUG, "~PlaybackProfileConfigs()");
01138 #endif
01139 }
01140
01141 void PlaybackProfileConfigs::btnPress(QString cmd)
01142 {
01143 if (cmd == "add")
01144 {
01145 QString name;
01146
01147 QString host = gCoreContext->GetHostName();
01148 QStringList not_ok_list = VideoDisplayProfile::GetProfiles(host);
01149
01150 bool ok = true;
01151 while (ok)
01152 {
01153 QString msg = QObject::tr("Enter Playback Group Name");
01154
01155 ok = MythPopupBox::showGetTextPopup(
01156 GetMythMainWindow(), msg, msg, name);
01157
01158 if (!ok)
01159 return;
01160
01161 if (not_ok_list.contains(name) || name.isEmpty())
01162 {
01163 msg = (name.isEmpty()) ?
01164 QObject::tr(
01165 "Sorry, playback group\nname cannot be blank.") :
01166 QObject::tr(
01167 "Sorry, playback group name\n"
01168 "'%1' is already being used.").arg(name);
01169
01170 MythPopupBox::showOkPopup(
01171 GetMythMainWindow(), QObject::tr("Error"), msg);
01172
01173 continue;
01174 }
01175
01176 break;
01177 }
01178
01179 VideoDisplayProfile::CreateProfileGroup(name, gCoreContext->GetHostName());
01180 addTarget(name, new PlaybackProfileConfig(name));
01181
01182 if (grouptrigger)
01183 grouptrigger->addSelection(name, name, true);
01184 }
01185 else if ((cmd == "del") && grouptrigger)
01186 {
01187 const QString name = grouptrigger->getSelectionLabel();
01188 if (!name.isEmpty())
01189 {
01190 removeTarget(name);
01191 VideoDisplayProfile::DeleteProfileGroup(
01192 name, gCoreContext->GetHostName());
01193 }
01194 }
01195
01196 repaint();
01197 }
01198
01199 void PlaybackProfileConfigs::triggerChanged(const QString &trig)
01200 {
01201 TriggeredConfigurationGroup::triggerChanged(trig);
01202 }
01203
01204 static HostComboBox *PlayBoxOrdering()
01205 {
01206 QString str[4] =
01207 {
01208 QObject::tr("Sort all sub-titles/multi-titles Ascending"),
01209 QObject::tr("Sort all sub-titles/multi-titles Descending"),
01210 QObject::tr("Sort sub-titles Descending, multi-titles Ascending"),
01211 QObject::tr("Sort sub-titles Ascending, multi-titles Descending"),
01212 };
01213 QString help = QObject::tr(
01214 "Selects how to sort show episodes. Sub-titles refers to the "
01215 "episodes listed under a specific show title. Multi-title "
01216 "refers to sections (e.g. \"All Programs\") which list "
01217 "multiple titles. Sections in parentheses are not affected.");
01218
01219 HostComboBox *gc = new HostComboBox("PlayBoxOrdering");
01220 gc->setLabel(QObject::tr("Episode sort orderings"));
01221
01222 for (int i = 0; i < 4; ++i)
01223 gc->addSelection(str[i], QString::number(i));
01224
01225 gc->setValue(1);
01226 gc->setHelpText(help);
01227
01228 return gc;
01229 }
01230
01231 static HostComboBox *PlayBoxEpisodeSort()
01232 {
01233 HostComboBox *gc = new HostComboBox("PlayBoxEpisodeSort");
01234 gc->setLabel(QObject::tr("Sort episodes"));
01235 gc->addSelection(QObject::tr("Record date"), "Date");
01236 gc->addSelection(QObject::tr("Season/Episode"), "Season");
01237 gc->addSelection(QObject::tr("Original air date"), "OrigAirDate");
01238 gc->addSelection(QObject::tr("Program ID"), "Id");
01239 gc->setHelpText(QObject::tr("Selects how to sort a shows episodes"));
01240 return gc;
01241 }
01242
01243 static HostSpinBox *FFRewReposTime()
01244 {
01245 HostSpinBox *gs = new HostSpinBox("FFRewReposTime", 0, 200, 5);
01246 gs->setLabel(QObject::tr("Fast forward/rewind reposition amount"));
01247 gs->setValue(100);
01248 gs->setHelpText(QObject::tr("When exiting sticky keys fast forward/rewind "
01249 "mode, reposition this many 1/100th seconds before "
01250 "resuming normal playback. This "
01251 "compensates for the reaction time between seeing "
01252 "where to resume playback and actually exiting seeking."));
01253 return gs;
01254 }
01255
01256 static HostCheckBox *FFRewReverse()
01257 {
01258 HostCheckBox *gc = new HostCheckBox("FFRewReverse");
01259 gc->setLabel(QObject::tr("Reverse direction in fast forward/rewind"));
01260 gc->setValue(true);
01261 gc->setHelpText(QObject::tr("If enabled, pressing the sticky rewind key "
01262 "in fast forward mode switches to rewind mode, and "
01263 "vice versa. If disabled, it will decrease the "
01264 "current speed or switch to play mode if "
01265 "the speed can't be decreased further."));
01266 return gc;
01267 }
01268
01269 static HostComboBox *MenuTheme()
01270 {
01271 HostComboBox *gc = new HostComboBox("MenuTheme");
01272 gc->setLabel(QObject::tr("Menu theme"));
01273
01274 QList<ThemeInfo> themelist = GetMythUI()->GetThemes(THEME_MENU);
01275
01276 QList<ThemeInfo>::iterator it;
01277 for( it = themelist.begin(); it != themelist.end(); ++it )
01278 {
01279 gc->addSelection((*it).GetName(), (*it).GetDirectoryName(),
01280 (*it).GetDirectoryName() == "defaultmenu");
01281 }
01282
01283 return gc;
01284 }
01285
01286 static HostComboBox MUNUSED *DecodeVBIFormat()
01287 {
01288 QString beVBI = gCoreContext->GetSetting("VbiFormat");
01289 QString fmt = beVBI.toLower().left(4);
01290 int sel = (fmt == "pal ") ? 1 : ((fmt == "ntsc") ? 2 : 0);
01291
01292 HostComboBox *gc = new HostComboBox("DecodeVBIFormat");
01293 gc->setLabel(QObject::tr("Decode VBI format"));
01294 gc->addSelection(QObject::tr("None"), "none", 0 == sel);
01295 gc->addSelection(QObject::tr("PAL teletext"), "pal_txt", 1 == sel);
01296 gc->addSelection(QObject::tr("NTSC closed caption"), "ntsc_cc", 2 == sel);
01297 gc->setHelpText(
01298 QObject::tr("If enabled, this overrides the mythtv-setup setting "
01299 "used during recording when decoding captions."));
01300
01301 return gc;
01302 }
01303
01304 static HostComboBox *SubtitleCodec()
01305 {
01306 HostComboBox *gc = new HostComboBox("SubtitleCodec");
01307
01308 gc->setLabel(QObject::tr("Subtitle Codec"));
01309 QList<QByteArray> list = QTextCodec::availableCodecs();
01310 for (uint i = 0; i < (uint) list.size(); ++i)
01311 {
01312 QString val = QString(list[i]);
01313 gc->addSelection(val, val, val.toLower() == "utf-8");
01314 }
01315
01316 return gc;
01317 }
01318
01319 static HostComboBox *ChannelOrdering()
01320 {
01321 HostComboBox *gc = new HostComboBox("ChannelOrdering");
01322 gc->setLabel(QObject::tr("Channel ordering"));
01323 gc->addSelection(QObject::tr("channel number"), "channum");
01324 gc->addSelection(QObject::tr("callsign"), "callsign");
01325 return gc;
01326 }
01327
01328 static HostSpinBox *VertScanPercentage()
01329 {
01330 HostSpinBox *gs = new HostSpinBox("VertScanPercentage", -100, 100, 1);
01331 gs->setLabel(QObject::tr("Vertical scaling"));
01332 gs->setValue(0);
01333 gs->setHelpText(QObject::tr(
01334 "Adjust this if the image does not fill your "
01335 "screen vertically. Range -100% to 100%"));
01336 return gs;
01337 }
01338
01339 static HostSpinBox *HorizScanPercentage()
01340 {
01341 HostSpinBox *gs = new HostSpinBox("HorizScanPercentage", -100, 100, 1);
01342 gs->setLabel(QObject::tr("Horizontal scaling"));
01343 gs->setValue(0);
01344 gs->setHelpText(QObject::tr(
01345 "Adjust this if the image does not fill your "
01346 "screen horizontally. Range -100% to 100%"));
01347 return gs;
01348 };
01349
01350 static HostSpinBox *XScanDisplacement()
01351 {
01352 HostSpinBox *gs = new HostSpinBox("XScanDisplacement", -50, 50, 1);
01353 gs->setLabel(QObject::tr("Scan displacement (X)"));
01354 gs->setValue(0);
01355 gs->setHelpText(QObject::tr("Adjust this to move the image horizontally."));
01356 return gs;
01357 }
01358
01359 static HostSpinBox *YScanDisplacement()
01360 {
01361 HostSpinBox *gs = new HostSpinBox("YScanDisplacement", -50, 50, 1);
01362 gs->setLabel(QObject::tr("Scan displacement (Y)"));
01363 gs->setValue(0);
01364 gs->setHelpText(QObject::tr("Adjust this to move the image vertically."));
01365 return gs;
01366 };
01367
01368 static HostCheckBox *DefaultCCMode()
01369 {
01370 HostCheckBox *gc = new HostCheckBox("DefaultCCMode");
01371 gc->setLabel(QObject::tr("Always display closed captioning or subtitles"));
01372 gc->setValue(false);
01373 gc->setHelpText(QObject::tr(
01374 "If enabled, captions will be displayed "
01375 "when playing back recordings or watching "
01376 "Live TV. Closed Captioning can be turned on or off "
01377 "by pressing \"T\" during playback."));
01378 return gc;
01379 }
01380
01381 static HostCheckBox *EnableMHEG()
01382 {
01383 HostCheckBox *gc = new HostCheckBox("EnableMHEG");
01384 gc->setLabel(QObject::tr("Enable interactive TV"));
01385 gc->setValue(false);
01386 gc->setHelpText(QObject::tr(
01387 "If enabled, interactive TV applications (MHEG) will "
01388 "be activated. This is used for teletext and logos for "
01389 "radio and channels that are currently off-air."));
01390 return gc;
01391 }
01392
01393 static HostCheckBox *PersistentBrowseMode()
01394 {
01395 HostCheckBox *gc = new HostCheckBox("PersistentBrowseMode");
01396 gc->setLabel(QObject::tr("Always use browse mode in Live TV"));
01397 gc->setValue(true);
01398 gc->setHelpText(
01399 QObject::tr(
01400 "If enabled, browse mode will automatically be activated "
01401 "whenever you use channel up/down while watching Live TV."));
01402 return gc;
01403 }
01404
01405 static HostCheckBox *BrowseAllTuners()
01406 {
01407 HostCheckBox *gc = new HostCheckBox("BrowseAllTuners");
01408 gc->setLabel(QObject::tr("Browse all channels"));
01409 gc->setValue(false);
01410 gc->setHelpText(
01411 QObject::tr(
01412 "If enabled, browse mode will shows channels on all "
01413 "available recording devices, instead of showing "
01414 "channels on just the current recorder."));
01415 return gc;
01416 }
01417
01418 static HostCheckBox *ClearSavedPosition()
01419 {
01420 HostCheckBox *gc = new HostCheckBox("ClearSavedPosition");
01421 gc->setLabel(QObject::tr("Clear bookmark on playback"));
01422 gc->setValue(true);
01423 gc->setHelpText(QObject::tr("If enabled, automatically clear the "
01424 "bookmark on a recording when the recording is played "
01425 "back. If disabled, you can mark the beginning with "
01426 "rewind then save position."));
01427 return gc;
01428 }
01429
01430 static HostCheckBox *AltClearSavedPosition()
01431 {
01432 HostCheckBox *gc = new HostCheckBox("AltClearSavedPosition");
01433 gc->setLabel(QObject::tr("Alternate clear and save bookmark"));
01434 gc->setValue(true);
01435 gc->setHelpText(QObject::tr("During playback the SELECT key "
01436 "(Enter or Space) will alternate between \"Bookmark "
01437 "Saved\" and \"Bookmark Cleared\". If disabled, the "
01438 "SELECT key will save the current position for each "
01439 "keypress."));
01440 return gc;
01441 }
01442
01443 static HostComboBox *PlaybackExitPrompt()
01444 {
01445 HostComboBox *gc = new HostComboBox("PlaybackExitPrompt");
01446 gc->setLabel(QObject::tr("Action on playback exit"));
01447 gc->addSelection(QObject::tr("Just exit"), "0");
01448 gc->addSelection(QObject::tr("Save position and exit"), "2");
01449 gc->addSelection(QObject::tr("Always prompt (excluding Live TV)"), "1");
01450 gc->addSelection(QObject::tr("Always prompt (including Live TV)"), "4");
01451 gc->addSelection(QObject::tr("Prompt for Live TV only"), "8");
01452 gc->setHelpText(QObject::tr("If set to prompt, a menu will be displayed "
01453 "when you exit playback mode. The options available will "
01454 "allow you to save your position, delete the "
01455 "recording, or continue watching."));
01456 return gc;
01457 }
01458
01459 static HostCheckBox *EndOfRecordingExitPrompt()
01460 {
01461 HostCheckBox *gc = new HostCheckBox("EndOfRecordingExitPrompt");
01462 gc->setLabel(QObject::tr("Prompt at end of recording"));
01463 gc->setValue(false);
01464 gc->setHelpText(QObject::tr("If enabled, a menu will be displayed allowing "
01465 "you to delete the recording when it has finished "
01466 "playing."));
01467 return gc;
01468 }
01469
01470 static HostCheckBox *JumpToProgramOSD()
01471 {
01472 HostCheckBox *gc = new HostCheckBox("JumpToProgramOSD");
01473 gc->setLabel(QObject::tr("Jump to program OSD"));
01474 gc->setValue(true);
01475 gc->setHelpText(QObject::tr(
01476 "Set the choice between viewing the current "
01477 "recording group in the OSD, or showing the "
01478 "'Watch Recording' screen when 'Jump to Program' "
01479 "is activated. If enabled, the recordings are shown "
01480 "in the OSD"));
01481 return gc;
01482 }
01483
01484 static HostCheckBox *ContinueEmbeddedTVPlay()
01485 {
01486 HostCheckBox *gc = new HostCheckBox("ContinueEmbeddedTVPlay");
01487 gc->setLabel(QObject::tr("Continue playback when embedded"));
01488 gc->setValue(false);
01489 gc->setHelpText(QObject::tr(
01490 "If enabled, TV playback continues when the TV window "
01491 "is embedded in the upcoming program list or recorded "
01492 "list. The default is to pause the recorded show when "
01493 "embedded."));
01494 return gc;
01495 }
01496
01497 static HostCheckBox *AutomaticSetWatched()
01498 {
01499 HostCheckBox *gc = new HostCheckBox("AutomaticSetWatched");
01500 gc->setLabel(QObject::tr("Automatically mark a recording as watched"));
01501 gc->setValue(false);
01502 gc->setHelpText(QObject::tr("If enabled, when you exit near the end of a "
01503 "recording it will be marked as watched. The automatic "
01504 "detection is not foolproof, so do not enable this "
01505 "setting if you don't want an unwatched recording marked "
01506 "as watched."));
01507 return gc;
01508 }
01509
01510 static HostSpinBox *LiveTVIdleTimeout()
01511 {
01512 HostSpinBox *gs = new HostSpinBox("LiveTVIdleTimeout", 0, 3600, 1);
01513 gs->setLabel(QObject::tr("Live TV idle timeout (mins)"));
01514 gs->setValue(0);
01515 gs->setHelpText(QObject::tr(
01516 "Exit Live TV automatically if left idle for the "
01517 "specified number of minutes. "
01518 "0 disables the timeout."));
01519 return gs;
01520 }
01521
01522
01523
01524
01525
01526
01527
01528
01529
01530
01531
01532
01533
01534
01535
01536
01537
01538
01539
01540
01541
01542
01543
01544
01545
01546
01547 static HostCheckBox *UseVirtualKeyboard()
01548 {
01549 HostCheckBox *gc = new HostCheckBox("UseVirtualKeyboard");
01550 gc->setLabel(QObject::tr("Use line edit virtual keyboards"));
01551 gc->setValue(true);
01552 gc->setHelpText(QObject::tr("If enabled, you can use a virtual keyboard "
01553 "in MythTV's line edit boxes. To use, hit SELECT (Enter "
01554 "or Space) while a line edit is in focus."));
01555 return gc;
01556 }
01557
01558 static HostSpinBox *FrontendIdleTimeout()
01559 {
01560 HostSpinBox *gs = new HostSpinBox("FrontendIdleTimeout", 0, 360, 15);
01561 gs->setLabel(QObject::tr("Idle time before entering standby mode (minutes)"));
01562 gs->setValue(90);
01563 gs->setHelpText(QObject::tr("Number of minutes to wait when the frontend "
01564 "is idle before entering standby mode. Standby "
01565 "mode allows the backend to power down if "
01566 "configured to do so. Any remote or mouse input "
01567 "will cause the countdown to start again and/or "
01568 "exit idle mode. Video playback suspends the "
01569 "countdown. A value of zero prevents the "
01570 "frontend automatically entering standby."));
01571 return gs;
01572 }
01573
01574 static HostComboBox *OverrideExitMenu()
01575 {
01576 HostComboBox *gc = new HostComboBox("OverrideExitMenu");
01577 gc->setLabel(QObject::tr("Customize exit menu options"));
01578 gc->addSelection(QObject::tr("Default"), "0");
01579 gc->addSelection(QObject::tr("Show quit"), "1");
01580 gc->addSelection(QObject::tr("Show quit and shutdown"), "2");
01581 gc->addSelection(QObject::tr("Show quit, reboot and shutdown"), "3");
01582 gc->addSelection(QObject::tr("Show shutdown"), "4");
01583 gc->addSelection(QObject::tr("Show reboot"), "5");
01584 gc->addSelection(QObject::tr("Show reboot and shutdown"), "6");
01585 gc->setHelpText(QObject::tr("By default, only remote frontends are shown "
01586 "the shutdown option on the exit menu. Here you can force "
01587 "specific shutdown and reboot options to be displayed."));
01588 return gc;
01589 }
01590
01591 static HostLineEdit *RebootCommand()
01592 {
01593 HostLineEdit *ge = new HostLineEdit("RebootCommand");
01594 ge->setLabel(QObject::tr("Reboot command"));
01595 ge->setValue("");
01596 ge->setHelpText(QObject::tr("Optional. Script to run if you select "
01597 "the reboot option from the exit menu, if the option "
01598 "is displayed. You must configure an exit key to "
01599 "display the exit menu."));
01600 return ge;
01601 }
01602
01603 static HostLineEdit *HaltCommand()
01604 {
01605 HostLineEdit *ge = new HostLineEdit("HaltCommand");
01606 ge->setLabel(QObject::tr("Halt command"));
01607 ge->setValue("");
01608 ge->setHelpText(QObject::tr("Optional. Script to run if you select "
01609 "the shutdown option from the exit menu, if the option "
01610 "is displayed. You must configure an exit key to "
01611 "display the exit menu."));
01612 return ge;
01613 }
01614
01615 static HostLineEdit *LircDaemonDevice()
01616 {
01617 HostLineEdit *ge = new HostLineEdit("LircSocket");
01618 ge->setLabel(QObject::tr("LIRC daemon socket"));
01619
01620
01621 QString lirc_socket = "/dev/lircd";
01622 if (!QFile::exists(lirc_socket))
01623 lirc_socket = "/var/run/lirc/lircd";
01624 ge->setValue(lirc_socket);
01625 QString help = QObject::tr(
01626 "UNIX socket or IP address[:port] to connect in "
01627 "order to communicate with the LIRC Daemon.");
01628 ge->setHelpText(help);
01629 return ge;
01630 }
01631
01632 static HostLineEdit *ScreenShotPath()
01633 {
01634 HostLineEdit *ge = new HostLineEdit("ScreenShotPath");
01635 ge->setLabel(QObject::tr("Screen shot path"));
01636 ge->setValue("/tmp/");
01637 ge->setHelpText(QObject::tr("Path to screenshot storage location. Should be writable by the frontend"));
01638 return ge;
01639 }
01640
01641 static HostLineEdit *SetupPinCode()
01642 {
01643 HostLineEdit *ge = new HostLineEdit("SetupPinCode");
01644 ge->setLabel(QObject::tr("Setup PIN code"));
01645 ge->setHelpText(QObject::tr("This PIN is used to control access to the "
01646 "setup menus. If you want to use this feature, then "
01647 "setting the value to all numbers will make your life "
01648 "much easier. Set it to blank to disable."));
01649 return ge;
01650 }
01651
01652 static HostCheckBox *SetupPinCodeRequired()
01653 {
01654 HostCheckBox *gc = new HostCheckBox("SetupPinCodeRequired");
01655 gc->setLabel(QObject::tr("Require setup PIN") + " ");
01656 gc->setValue(false);
01657 gc->setHelpText(QObject::tr("If enabled, you will not be able to return "
01658 "to this screen and reset the Setup PIN without first "
01659 "entering the current PIN."));
01660 return gc;
01661 }
01662
01663 static HostComboBox *XineramaScreen()
01664 {
01665 HostComboBox *gc = new HostComboBox("XineramaScreen", false);
01666 int num = MythDisplay::GetNumberXineramaScreens();
01667 for (int i=0; i<num; ++i)
01668 gc->addSelection(QString::number(i), QString::number(i));
01669 gc->addSelection(QObject::tr("All"), QString::number(-1));
01670 gc->setLabel(QObject::tr("Display on screen"));
01671 gc->setValue(0);
01672 gc->setHelpText(QObject::tr("Run on the specified screen or "
01673 "spanning all screens."));
01674 return gc;
01675 }
01676
01677
01678 static HostComboBox *XineramaMonitorAspectRatio()
01679 {
01680 HostComboBox *gc = new HostComboBox("XineramaMonitorAspectRatio");
01681 gc->setLabel(QObject::tr("Monitor aspect ratio"));
01682 gc->addSelection(QObject::tr("4:3"), "1.3333");
01683 gc->addSelection(QObject::tr("16:9"), "1.7777");
01684 gc->addSelection(QObject::tr("16:10"), "1.6");
01685 gc->setHelpText(QObject::tr(
01686 "The aspect ratio of a Xinerama display cannot be "
01687 "queried from the display, so it must be specified."));
01688 return gc;
01689 }
01690
01691 static HostComboBox *LetterboxingColour()
01692 {
01693 HostComboBox *gc = new HostComboBox("LetterboxColour");
01694 gc->setLabel(QObject::tr("Letterboxing color"));
01695 for (int m = kLetterBoxColour_Black; m < kLetterBoxColour_END; ++m)
01696 gc->addSelection(toString((LetterBoxColour)m), QString::number(m));
01697 gc->setHelpText(
01698 QObject::tr(
01699 "By default MythTV uses black letterboxing to match broadcaster "
01700 "letterboxing, but those with plasma screens may prefer gray "
01701 "to minimize burn-in.") + " " +
01702 QObject::tr("Currently only works with XVideo video renderer."));
01703 return gc;
01704 }
01705
01706 static HostComboBox *AspectOverride()
01707 {
01708 HostComboBox *gc = new HostComboBox("AspectOverride");
01709 gc->setLabel(QObject::tr("Video aspect override"));
01710 for (int m = kAspect_Off; m < kAspect_END; ++m)
01711 gc->addSelection(toString((AspectOverrideMode)m), QString::number(m));
01712 gc->setHelpText(QObject::tr(
01713 "When enabled, these will override the aspect "
01714 "ratio specified by any broadcaster for all "
01715 "video streams."));
01716 return gc;
01717 }
01718
01719 static HostComboBox *AdjustFill()
01720 {
01721 HostComboBox *gc = new HostComboBox("AdjustFill");
01722 gc->setLabel(QObject::tr("Zoom"));
01723 for (int m = kAdjustFill_Off; m < kAdjustFill_END; ++m)
01724 gc->addSelection(toString((AdjustFillMode)m), QString::number(m));
01725 gc->addSelection(toString(kAdjustFill_AutoDetect_DefaultOff),
01726 QString::number(kAdjustFill_AutoDetect_DefaultOff));
01727 gc->addSelection(toString(kAdjustFill_AutoDetect_DefaultHalf),
01728 QString::number(kAdjustFill_AutoDetect_DefaultHalf));
01729 gc->setHelpText(QObject::tr(
01730 "When enabled, these will apply a predefined "
01731 "zoom to all video playback in MythTV."));
01732 return gc;
01733 }
01734
01735
01736
01737 static HostSpinBox *GuiWidth()
01738 {
01739 HostSpinBox *gs = new HostSpinBox("GuiWidth", 0, 1920, 8, true);
01740 gs->setLabel(QObject::tr("GUI width (pixels)"));
01741 gs->setValue(0);
01742 gs->setHelpText(QObject::tr("The width of the GUI. Do not make the GUI "
01743 "wider than your actual screen resolution. Set to 0 to "
01744 "automatically scale to fullscreen."));
01745 return gs;
01746 }
01747
01748 static HostSpinBox *GuiHeight()
01749 {
01750 HostSpinBox *gs = new HostSpinBox("GuiHeight", 0, 1600, 8, true);
01751 gs->setLabel(QObject::tr("GUI height (pixels)"));
01752 gs->setValue(0);
01753 gs->setHelpText(QObject::tr("The height of the GUI. Do not make the GUI "
01754 "taller than your actual screen resolution. Set to 0 to "
01755 "automatically scale to fullscreen."));
01756 return gs;
01757 }
01758
01759 static HostSpinBox *GuiOffsetX()
01760 {
01761 HostSpinBox *gs = new HostSpinBox("GuiOffsetX", -3840, 3840, 32, true);
01762 gs->setLabel(QObject::tr("GUI X offset"));
01763 gs->setValue(0);
01764 gs->setHelpText(QObject::tr("The horizontal offset where the GUI will be "
01765 "displayed. May only work if run in a window."));
01766 return gs;
01767 }
01768
01769 static HostSpinBox *GuiOffsetY()
01770 {
01771 HostSpinBox *gs = new HostSpinBox("GuiOffsetY", -1600, 1600, 8, true);
01772 gs->setLabel(QObject::tr("GUI Y offset"));
01773 gs->setValue(0);
01774 gs->setHelpText(QObject::tr("The vertical offset where the GUI will be "
01775 "displayed."));
01776 return gs;
01777 }
01778
01779 #if 0
01780 static HostSpinBox *DisplaySizeWidth()
01781 {
01782 HostSpinBox *gs = new HostSpinBox("DisplaySizeWidth", 0, 10000, 1);
01783 gs->setLabel(QObject::tr("Display size - width"));
01784 gs->setValue(0);
01785 gs->setHelpText(QObject::tr("Horizontal size of the monitor or TV. Used "
01786 "to calculate the actual aspect ratio of the display. This "
01787 "will override the DisplaySize from the system."));
01788 return gs;
01789 }
01790
01791 static HostSpinBox *DisplaySizeHeight()
01792 {
01793 HostSpinBox *gs = new HostSpinBox("DisplaySizeHeight", 0, 10000, 1);
01794 gs->setLabel(QObject::tr("Display size - height"));
01795 gs->setValue(0);
01796 gs->setHelpText(QObject::tr("Vertical size of the monitor or TV. Used "
01797 "to calculate the actual aspect ratio of the display. This "
01798 "will override the DisplaySize from the system."));
01799 return gs;
01800 }
01801 #endif
01802
01803 static HostCheckBox *GuiSizeForTV()
01804 {
01805 HostCheckBox *gc = new HostCheckBox("GuiSizeForTV");
01806 gc->setLabel(QObject::tr("Use GUI size for TV playback"));
01807 gc->setValue(true);
01808 gc->setHelpText(QObject::tr("If enabled, use the above size for TV, "
01809 "otherwise use full screen."));
01810 return gc;
01811 }
01812
01813 #if defined(USING_XRANDR) || CONFIG_DARWIN
01814 static HostCheckBox *UseVideoModes()
01815 {
01816 HostCheckBox *gc = new HostCheckBox("UseVideoModes");
01817 gc->setLabel(QObject::tr("Separate video modes for GUI and TV playback"));
01818 gc->setValue(false);
01819 gc->setHelpText(QObject::tr("Switch X Window video modes for TV. "
01820 "Requires \"xrandr\" support."));
01821 return gc;
01822 }
01823
01824 static HostSpinBox *VidModeWidth(int idx)
01825 {
01826 HostSpinBox *gs = new HostSpinBox(QString("VidModeWidth%1").arg(idx),
01827 0, 1920, 16, true);
01828 gs->setLabel((idx<1) ? QObject::tr("In X"): "");
01829 gs->setLabelAboveWidget(idx<1);
01830 gs->setValue(0);
01831 gs->setHelpText(QObject::tr("Horizontal resolution of video "
01832 "which needs a special output resolution."));
01833 return gs;
01834 }
01835
01836 static HostSpinBox *VidModeHeight(int idx)
01837 {
01838 HostSpinBox *gs = new HostSpinBox(QString("VidModeHeight%1").arg(idx),
01839 0, 1080, 16, true);
01840 gs->setLabel((idx<1) ? QObject::tr("In Y"): "");
01841 gs->setLabelAboveWidget(idx<1);
01842 gs->setValue(0);
01843 gs->setHelpText(QObject::tr("Vertical resolution of video "
01844 "which needs a special output resolution."));
01845 return gs;
01846 }
01847
01848 static HostComboBox *GuiVidModeResolution()
01849 {
01850 HostComboBox *gc = new HostComboBox("GuiVidModeResolution");
01851 gc->setLabel(QObject::tr("GUI"));
01852 gc->setLabelAboveWidget(true);
01853 gc->setHelpText(QObject::tr("Resolution of screen "
01854 "when not watching a video."));
01855
01856 const vector<DisplayResScreen> scr = GetVideoModes();
01857 for (uint i=0; i<scr.size(); ++i)
01858 {
01859 int w = scr[i].Width(), h = scr[i].Height();
01860 QString sel = QString("%1x%2").arg(w).arg(h);
01861 gc->addSelection(sel, sel);
01862 }
01863
01864
01865 if (scr.size() && (gCoreContext->GetSetting("GuiVidModeResolution").isEmpty()))
01866 {
01867 int w = 0, h = 0;
01868 gCoreContext->GetResolutionSetting("GuiVidMode", w, h);
01869 if ((w <= 0) || (h <= 0))
01870 (w = 640), (h = 480);
01871
01872 DisplayResScreen dscr(w, h, -1, -1, -1.0, 0);
01873 double rate = -1.0;
01874 int i = DisplayResScreen::FindBestMatch(scr, dscr, rate);
01875 gc->setValue((i >= 0) ? i : scr.size()-1);
01876 }
01877
01878 return gc;
01879 }
01880
01881 static HostComboBox *TVVidModeResolution(int idx=-1)
01882 {
01883 QString dhelp = QObject::tr("Default screen resolution "
01884 "when watching a video.");
01885 QString ohelp = QObject::tr("Screen resolution when watching a "
01886 "video at a specific resolution.");
01887
01888 QString qstr = (idx<0) ? "TVVidModeResolution" :
01889 QString("TVVidModeResolution%1").arg(idx);
01890 HostComboBox *gc = new HostComboBox(qstr);
01891 QString lstr = (idx<0) ? QObject::tr("Video output") :
01892 ((idx<1) ? QObject::tr("Output") : "");
01893 QString hstr = (idx<0) ? dhelp : ohelp;
01894
01895 gc->setLabel(lstr);
01896 gc->setLabelAboveWidget(idx<1);
01897 gc->setHelpText(hstr);
01898
01899 const vector<DisplayResScreen> scr = GetVideoModes();
01900 for (uint i=0; i<scr.size(); ++i)
01901 {
01902 QString sel = QString("%1x%2").arg(scr[i].Width()).arg(scr[i].Height());
01903 gc->addSelection(sel, sel);
01904 }
01905 return gc;
01906 }
01907
01908 static HostRefreshRateComboBox *TVVidModeRefreshRate(int idx=-1)
01909 {
01910 QString dhelp = QObject::tr("Default refresh rate "
01911 "when watching a video. "
01912 "Leave at \"Auto\" to automatically use the best available");
01913 QString ohelp = QObject::tr("Refresh rate when watching a "
01914 "video at a specific resolution. "
01915 "Leave at \"Auto\" to automatically use the best available");
01916 QString qstr = (idx<0) ? "TVVidModeRefreshRate" :
01917 QString("TVVidModeRefreshRate%1").arg(idx);
01918 HostRefreshRateComboBox *gc = new HostRefreshRateComboBox(qstr);
01919 QString lstr = (idx<1) ? QObject::tr("Rate") : "";
01920 QString hstr = (idx<0) ? dhelp : ohelp;
01921
01922 gc->setLabel(lstr);
01923 gc->setLabelAboveWidget(idx<1);
01924 gc->setHelpText(hstr);
01925 gc->setEnabled(false);
01926 return gc;
01927 }
01928
01929 static HostComboBox *TVVidModeForceAspect(int idx=-1)
01930 {
01931 QString dhelp = QObject::tr("Aspect ratio when watching a video.");
01932 QString ohelp = QObject::tr("Aspect ratio when watching a "
01933 "video at a specific resolution.");
01934
01935 QString qstr = (idx<0) ? "TVVidModeForceAspect" :
01936 QString("TVVidModeForceAspect%1").arg(idx);
01937 HostComboBox *gc = new HostComboBox(qstr);
01938 gc->setLabel( (idx<1) ? QObject::tr("Aspect") : "" );
01939 gc->setLabelAboveWidget(idx<1);
01940
01941 QString hstr = (idx<0) ? dhelp : ohelp;
01942 gc->setHelpText(hstr+" "+
01943 QObject::tr("Leave at \"Default\" to use ratio reported by "
01944 "the monitor. Set to 16:9 or 4:3 to "
01945 "force a specific aspect ratio."));
01946 gc->addSelection(QObject::tr("Default"), "0.0");
01947 gc->addSelection("16:9", "1.77777777777");
01948 gc->addSelection("4:3", "1.33333333333");
01949 return gc;
01950 }
01951
01952 class VideoModeSettings : public TriggeredConfigurationGroup
01953 {
01954 public:
01955 VideoModeSettings() :
01956 TriggeredConfigurationGroup(false, true, false, false)
01957 {
01958 setLabel(QObject::tr("Video Mode Settings"));
01959 setUseLabel(false);
01960
01961 Setting *videomode = UseVideoModes();
01962 addChild(videomode);
01963 setTrigger(videomode);
01964
01965 ConfigurationGroup* defaultsettings =
01966 new HorizontalConfigurationGroup(false, false);
01967
01968 HostComboBox *res = TVVidModeResolution();
01969 HostRefreshRateComboBox *rate = TVVidModeRefreshRate();
01970 defaultsettings->addChild(GuiVidModeResolution());
01971 defaultsettings->addChild(res);
01972 defaultsettings->addChild(rate);
01973 defaultsettings->addChild(TVVidModeForceAspect());
01974 connect(res, SIGNAL(valueChanged(const QString&)),
01975 rate, SLOT(ChangeResolution(const QString&)));
01976
01977 ConfigurationGroup* overrides =
01978 new GridConfigurationGroup(5, true, true, false, true);
01979 overrides->setLabel(QObject::tr("Overrides for specific video sizes"));
01980
01981 for (int idx = 0; idx < 3; ++idx)
01982 {
01983
01984 overrides->addChild(VidModeWidth(idx));
01985 overrides->addChild(VidModeHeight(idx));
01986
01987 overrides->addChild(res = TVVidModeResolution(idx));
01988 overrides->addChild(rate = TVVidModeRefreshRate(idx));
01989 overrides->addChild(TVVidModeForceAspect(idx));
01990 connect(res, SIGNAL(valueChanged(const QString&)),
01991 rate, SLOT(ChangeResolution(const QString&)));
01992 }
01993
01994 ConfigurationGroup* settings = new VerticalConfigurationGroup(false);
01995 settings->addChild(defaultsettings);
01996 settings->addChild(overrides);
01997
01998 addTarget("1", settings);
01999 addTarget("0", new VerticalConfigurationGroup(true));
02000 }
02001 };
02002 #endif
02003
02004 static HostCheckBox *HideMouseCursor()
02005 {
02006 HostCheckBox *gc = new HostCheckBox("HideMouseCursor");
02007 gc->setLabel(QObject::tr("Hide mouse cursor in MythTV"));
02008 gc->setValue(false);
02009 gc->setHelpText(QObject::tr("Toggles mouse cursor visibility for touchscreens. "
02010 "By default MythTV will auto-hide the cursor if the mouse doesn't "
02011 "move for a period, this setting disables the cursor entirely."));
02012 return gc;
02013 };
02014
02015
02016 static HostCheckBox *RunInWindow()
02017 {
02018 HostCheckBox *gc = new HostCheckBox("RunFrontendInWindow");
02019 gc->setLabel(QObject::tr("Use window border"));
02020 gc->setValue(false);
02021 gc->setHelpText(QObject::tr("Toggles between windowed and "
02022 "borderless operation."));
02023 return gc;
02024 }
02025
02026 static HostCheckBox *UseFixedWindowSize()
02027 {
02028 {
02029 HostCheckBox *gc = new HostCheckBox("UseFixedWindowSize");
02030 gc->setLabel(QObject::tr("Use fixed window size"));
02031 gc->setValue(true);
02032 gc->setHelpText(QObject::tr(
02033 "If disabled, the video playback "
02034 "window can be resized"));
02035 return gc;
02036 }
02037 }
02038
02039 static HostComboBox *MythDateFormatCB()
02040 {
02041 HostComboBox *gc = new HostComboBox("DateFormat");
02042 gc->setLabel(QObject::tr("Date format"));
02043
02044 QDate sampdate = QDate::currentDate();
02045 QString sampleStr =
02046 QObject::tr("Samples are shown using today's date.");
02047
02048 if (sampdate.month() == sampdate.day())
02049 {
02050 sampdate = sampdate.addDays(1);
02051 sampleStr =
02052 QObject::tr("Samples are shown using tomorrow's date.");
02053 }
02054
02055 QLocale locale = gCoreContext->GetQLocale();
02056
02057 gc->addSelection(locale.toString(sampdate, "ddd MMM d"), "ddd MMM d");
02058 gc->addSelection(locale.toString(sampdate, "ddd d MMM"), "ddd d MMM");
02059 gc->addSelection(locale.toString(sampdate, "ddd MMMM d"), "ddd MMMM d");
02060 gc->addSelection(locale.toString(sampdate, "ddd d MMMM"), "ddd d MMMM");
02061 gc->addSelection(locale.toString(sampdate, "dddd MMM d"), "dddd MMM d");
02062 gc->addSelection(locale.toString(sampdate, "dddd d MMM"), "dddd d MMM");
02063 gc->addSelection(locale.toString(sampdate, "MMM d"), "MMM d");
02064 gc->addSelection(locale.toString(sampdate, "d MMM"), "d MMM");
02065 gc->addSelection(locale.toString(sampdate, "MM/dd"), "MM/dd");
02066 gc->addSelection(locale.toString(sampdate, "dd/MM"), "dd/MM");
02067 gc->addSelection(locale.toString(sampdate, "MM.dd"), "MM.dd");
02068 gc->addSelection(locale.toString(sampdate, "dd.MM"), "dd.MM");
02069 gc->addSelection(locale.toString(sampdate, "M/d/yyyy"), "M/d/yyyy");
02070 gc->addSelection(locale.toString(sampdate, "d/M/yyyy"), "d/M/yyyy");
02071 gc->addSelection(locale.toString(sampdate, "MM.dd.yyyy"), "MM.dd.yyyy");
02072 gc->addSelection(locale.toString(sampdate, "dd.MM.yyyy"), "dd.MM.yyyy");
02073 gc->addSelection(locale.toString(sampdate, "yyyy-MM-dd"), "yyyy-MM-dd");
02074 gc->addSelection(locale.toString(sampdate, "ddd MMM d yyyy"), "ddd MMM d yyyy");
02075 gc->addSelection(locale.toString(sampdate, "ddd d MMM yyyy"), "ddd d MMM yyyy");
02076 gc->addSelection(locale.toString(sampdate, "ddd yyyy-MM-dd"), "ddd yyyy-MM-dd");
02077 gc->addSelection(locale.toString(sampdate,
02078 QString::fromUtf8("dddd yyyy\u5E74M\u6708d\u65E5")),
02079 QString::fromUtf8("dddd yyyy\u5E74M\u6708d\u65E5"));
02080 gc->addSelection(locale.toString(sampdate,
02081 QString::fromUtf8("ddd M\u6708d\u65E5")),
02082 QString::fromUtf8("ddd M\u6708d\u65E5"));
02083 gc->setHelpText(QObject::tr("Your preferred date format.") + ' ' +
02084 sampleStr);
02085 return gc;
02086 }
02087
02088 static HostComboBox *MythShortDateFormat()
02089 {
02090 HostComboBox *gc = new HostComboBox("ShortDateFormat");
02091 gc->setLabel(QObject::tr("Short date format"));
02092
02093 QDate sampdate = QDate::currentDate();
02094 QString sampleStr =
02095 QObject::tr("Samples are shown using today's date.");
02096
02097 if (sampdate.month() == sampdate.day())
02098 {
02099 sampdate = sampdate.addDays(1);
02100 sampleStr =
02101 QObject::tr("Samples are shown using tomorrow's date.");
02102 }
02103 QLocale locale = gCoreContext->GetQLocale();
02104
02105 gc->addSelection(locale.toString(sampdate, "M/d"), "M/d");
02106 gc->addSelection(locale.toString(sampdate, "d/M"), "d/M");
02107 gc->addSelection(locale.toString(sampdate, "MM/dd"), "MM/dd");
02108 gc->addSelection(locale.toString(sampdate, "dd/MM"), "dd/MM");
02109 gc->addSelection(locale.toString(sampdate, "MM.dd"), "MM.dd");
02110 gc->addSelection(locale.toString(sampdate, "dd.MM."), "dd.MM.");
02111 gc->addSelection(locale.toString(sampdate, "M.d."), "M.d.");
02112 gc->addSelection(locale.toString(sampdate, "d.M."), "d.M.");
02113 gc->addSelection(locale.toString(sampdate, "MM-dd"), "MM-dd");
02114 gc->addSelection(locale.toString(sampdate, "dd-MM"), "dd-MM");
02115 gc->addSelection(locale.toString(sampdate, "MMM d"), "MMM d");
02116 gc->addSelection(locale.toString(sampdate, "d MMM"), "d MMM");
02117 gc->addSelection(locale.toString(sampdate, "ddd d"), "ddd d");
02118 gc->addSelection(locale.toString(sampdate, "d ddd"), "d ddd");
02119 gc->addSelection(locale.toString(sampdate, "ddd M/d"), "ddd M/d");
02120 gc->addSelection(locale.toString(sampdate, "ddd d/M"), "ddd d/M");
02121 gc->addSelection(locale.toString(sampdate, "M/d ddd"), "M/d ddd");
02122 gc->addSelection(locale.toString(sampdate, "d/M ddd"), "d/M ddd");
02123 gc->addSelection(locale.toString(sampdate,
02124 QString::fromUtf8("M\u6708d\u65E5")),
02125 QString::fromUtf8("M\u6708d\u65E5"));
02126 gc->setHelpText(QObject::tr("Your preferred short date format.") + ' ' +
02127 sampleStr);
02128 return gc;
02129 }
02130
02131 static HostComboBox *MythTimeFormat()
02132 {
02133 HostComboBox *gc = new HostComboBox("TimeFormat");
02134 gc->setLabel(QObject::tr("Time format"));
02135
02136 QTime samptime = QTime::currentTime();
02137
02138 QLocale locale = gCoreContext->GetQLocale();
02139
02140 gc->addSelection(locale.toString(samptime, "h:mm AP"), "h:mm AP");
02141 gc->addSelection(locale.toString(samptime, "h:mm ap"), "h:mm ap");
02142 gc->addSelection(locale.toString(samptime, "hh:mm AP"), "hh:mm AP");
02143 gc->addSelection(locale.toString(samptime, "hh:mm ap"), "hh:mm ap");
02144 gc->addSelection(locale.toString(samptime, "h:mm"), "h:mm");
02145 gc->addSelection(locale.toString(samptime, "hh:mm"), "hh:mm");
02146 gc->addSelection(locale.toString(samptime, "hh.mm"), "hh.mm");
02147 gc->addSelection(locale.toString(samptime, "AP h:mm"), "AP h:mm");
02148 gc->setHelpText(QObject::tr("Your preferred time format. You must choose "
02149 "a format with \"AM\" or \"PM\" in it, otherwise your "
02150 "time display will be 24-hour or \"military\" time."));
02151 return gc;
02152 }
02153
02154 static HostComboBox *ThemePainter()
02155 {
02156 HostComboBox *gc = new HostComboBox("ThemePainter");
02157 gc->setLabel(QObject::tr("Paint engine"));
02158 gc->addSelection(QObject::tr("Qt"), "qt");
02159 gc->addSelection(QObject::tr("Auto"), "auto");
02160 #ifdef USING_OPENGL
02161 gc->addSelection(QObject::tr("OpenGL"), "opengl");
02162 #endif
02163 #ifdef USING_MINGW
02164 gc->addSelection(QObject::tr("Direct3D"), "d3d9");
02165 #endif
02166 gc->setHelpText(QObject::tr("This selects what MythTV uses to draw. "
02167 "Choosing 'Auto' is recommended, unless running on systems "
02168 "with broken OpenGL implementations (broken hardware or "
02169 "drivers or windowing systems) where only Qt works."));
02170 return gc;
02171 }
02172
02173 static HostComboBox *ChannelFormat()
02174 {
02175 HostComboBox *gc = new HostComboBox("ChannelFormat");
02176 gc->setLabel(QObject::tr("Channel format"));
02177 gc->addSelection(QObject::tr("number"), "<num>");
02178 gc->addSelection(QObject::tr("number callsign"), "<num> <sign>");
02179 gc->addSelection(QObject::tr("number name"), "<num> <name>");
02180 gc->addSelection(QObject::tr("callsign"), "<sign>");
02181 gc->addSelection(QObject::tr("name"), "<name>");
02182 gc->setHelpText(QObject::tr("Your preferred channel format."));
02183 gc->setValue(1);
02184 return gc;
02185 }
02186
02187 static HostComboBox *LongChannelFormat()
02188 {
02189 HostComboBox *gc = new HostComboBox("LongChannelFormat");
02190 gc->setLabel(QObject::tr("Long channel format"));
02191 gc->addSelection(QObject::tr("number"), "<num>");
02192 gc->addSelection(QObject::tr("number callsign"), "<num> <sign>");
02193 gc->addSelection(QObject::tr("number name"), "<num> <name>");
02194 gc->addSelection(QObject::tr("callsign"), "<sign>");
02195 gc->addSelection(QObject::tr("name"), "<name>");
02196 gc->setHelpText(QObject::tr("Your preferred long channel format."));
02197 gc->setValue(2);
02198 return gc;
02199 }
02200
02201 static GlobalCheckBox *LiveTVPriority()
02202 {
02203 GlobalCheckBox *bc = new GlobalCheckBox("LiveTVPriority");
02204 bc->setLabel(QObject::tr("Allow Live TV to move scheduled shows"));
02205 bc->setValue(false);
02206 bc->setHelpText(QObject::tr("If enabled, scheduled recordings will "
02207 "be moved to other cards (where possible), so that "
02208 "Live TV will not be interrupted."));
02209 return bc;
02210 }
02211
02212 static HostCheckBox *ChannelGroupRememberLast()
02213 {
02214 HostCheckBox *gc = new HostCheckBox("ChannelGroupRememberLast");
02215 gc->setLabel(QObject::tr("Remember last channel group"));
02216 gc->setHelpText(QObject::tr("If enabled, the EPG will initially display "
02217 "only the channels from the last channel group selected. Pressing "
02218 "\"4\" will toggle channel group."));
02219 gc->setValue(false);
02220 return gc;
02221 }
02222
02223 static HostComboBox *ChannelGroupDefault()
02224 {
02225 HostComboBox *gc = new HostComboBox("ChannelGroupDefault");
02226 gc->setLabel(QObject::tr("Default channel group"));
02227
02228 ChannelGroupList changrplist;
02229
02230 changrplist = ChannelGroup::GetChannelGroups();
02231
02232 gc->addSelection(QObject::tr("All Channels"), "-1");
02233
02234 ChannelGroupList::iterator it;
02235
02236 for (it = changrplist.begin(); it < changrplist.end(); ++it)
02237 gc->addSelection(it->name, QString("%1").arg(it->grpid));
02238
02239 gc->setHelpText(QObject::tr("Default channel group to be shown in the the EPG"
02240 "Pressing GUIDE key will toggle channel group."));
02241 gc->setValue(false);
02242 return gc;
02243 }
02244
02245 static HostCheckBox *BrowseChannelGroup()
02246 {
02247 HostCheckBox *gc = new HostCheckBox("BrowseChannelGroup");
02248 gc->setLabel(QObject::tr("Browse/change channels from Channel Group"));
02249 gc->setHelpText(QObject::tr("If enabled, Live TV will browse or change "
02250 "channels from the selected channel group. The \"All "
02251 "Channels\" channel group may be selected to browse all "
02252 "channels."));
02253 gc->setValue(false);
02254 return gc;
02255 }
02256
02257
02258 class ChannelGroupSettings : public TriggeredConfigurationGroup
02259 {
02260 public:
02261 ChannelGroupSettings() : TriggeredConfigurationGroup(false, true, false, false)
02262 {
02263 setLabel(QObject::tr("Remember last channel group"));
02264 setUseLabel(false);
02265
02266 Setting* RememberChanGrpEnabled = ChannelGroupRememberLast();
02267 addChild(RememberChanGrpEnabled);
02268 setTrigger(RememberChanGrpEnabled);
02269
02270 ConfigurationGroup* settings = new VerticalConfigurationGroup(false,false);
02271 settings->addChild(ChannelGroupDefault());
02272 addTarget("0", settings);
02273
02274
02275 addTarget("1", new VerticalConfigurationGroup(true,false));
02276 };
02277 };
02278
02279
02280
02281 static GlobalCheckBox *GRSchedMoveHigher()
02282 {
02283 GlobalCheckBox *bc = new GlobalCheckBox("SchedMoveHigher");
02284 bc->setLabel(QObject::tr("Reschedule higher priorities"));
02285 bc->setHelpText(QObject::tr("Move higher priority programs to other "
02286 "cards and showings when resolving conflicts. This "
02287 "can be used to record lower priority programs that "
02288 "would otherwise not be recorded, but risks missing "
02289 "a higher priority program if the schedule changes."));
02290 bc->setValue(true);
02291 return bc;
02292 }
02293
02294 static GlobalComboBox *GRSchedOpenEnd()
02295 {
02296 GlobalComboBox *bc = new GlobalComboBox("SchedOpenEnd");
02297 bc->setLabel(QObject::tr("Avoid back to back recordings"));
02298 bc->setHelpText(QObject::tr("Selects the situations where the scheduler "
02299 "will avoid assigning shows to the same card if their "
02300 "end time and start time match. This will be allowed "
02301 "when necessary in order to resolve conflicts."));
02302 bc->addSelection(QObject::tr("Never"), "0");
02303 bc->addSelection(QObject::tr("Different Channels"), "1");
02304 bc->addSelection(QObject::tr("Always"), "2");
02305 bc->setValue(0);
02306 return bc;
02307 }
02308
02309 static GlobalSpinBox *GRPrefInputRecPriority()
02310 {
02311 GlobalSpinBox *bs = new GlobalSpinBox("PrefInputPriority", 1, 99, 1);
02312 bs->setLabel(QObject::tr("Preferred input priority"));
02313 bs->setHelpText(QObject::tr("Additional priority when a showing "
02314 "matches the preferred input selected in the 'Scheduling "
02315 "Options' section of the recording rule."));
02316 bs->setValue(2);
02317 return bs;
02318 }
02319
02320 static GlobalSpinBox *GRHDTVRecPriority()
02321 {
02322 GlobalSpinBox *bs = new GlobalSpinBox("HDTVRecPriority", -99, 99, 1);
02323 bs->setLabel(QObject::tr("HDTV recording priority"));
02324 bs->setHelpText(QObject::tr("Additional priority when a showing "
02325 "is marked as an HDTV broadcast in the TV listings."));
02326 bs->setValue(0);
02327 return bs;
02328 }
02329
02330 static GlobalSpinBox *GRWSRecPriority()
02331 {
02332 GlobalSpinBox *bs = new GlobalSpinBox("WSRecPriority", -99, 99, 1);
02333 bs->setLabel(QObject::tr("Widescreen recording priority"));
02334 bs->setHelpText(QObject::tr("Additional priority when a showing "
02335 "is marked as widescreen in the TV listings."));
02336 bs->setValue(0);
02337 return bs;
02338 }
02339
02340 static GlobalSpinBox *GRAutoRecPriority()
02341 {
02342 GlobalSpinBox *bs = new GlobalSpinBox("AutoRecPriority", -99, 99, 1);
02343 bs->setLabel(QObject::tr("Automatic priority range (+/-)"));
02344 bs->setHelpText(QObject::tr("Up to this number of priority points may "
02345 "be added for titles that are usually watched soon after "
02346 "recording or subtracted for titles that are often "
02347 "watched several days or weeks later."));
02348 bs->setValue(0);
02349 return bs;
02350 }
02351
02352 static GlobalSpinBox *GRSignLangRecPriority()
02353 {
02354 GlobalSpinBox *bs = new GlobalSpinBox("SignLangRecPriority",
02355 -99, 99, 1);
02356 bs->setLabel(QObject::tr("Sign language recording priority"));
02357 bs->setHelpText(QObject::tr("Additional priority when a showing "
02358 "is marked as having in-vision sign language."));
02359 bs->setValue(0);
02360 return bs;
02361 }
02362
02363 static GlobalSpinBox *GROnScrSubRecPriority()
02364 {
02365 GlobalSpinBox *bs = new GlobalSpinBox("OnScrSubRecPriority",
02366 -99, 99, 1);
02367 bs->setLabel(QObject::tr("In-vision Subtitles Recording Priority"));
02368 bs->setHelpText(QObject::tr("Additional priority when a showing "
02369 "is marked as having in-vision subtitles."));
02370 bs->setValue(0);
02371 return bs;
02372 }
02373
02374 static GlobalSpinBox *GRCCRecPriority()
02375 {
02376 GlobalSpinBox *bs = new GlobalSpinBox("CCRecPriority",
02377 -99, 99, 1);
02378 bs->setLabel(QObject::tr("Subtitles/CC recording priority"));
02379 bs->setHelpText(QObject::tr("Additional priority when a showing "
02380 "is marked as having subtitles or closed captioning "
02381 "(CC) available."));
02382 bs->setValue(0);
02383 return bs;
02384 }
02385
02386 static GlobalSpinBox *GRHardHearRecPriority()
02387 {
02388 GlobalSpinBox *bs = new GlobalSpinBox("HardHearRecPriority",
02389 -99, 99, 1);
02390 bs->setLabel(QObject::tr("Hard of hearing priority"));
02391 bs->setHelpText(QObject::tr("Additional priority when a showing "
02392 "is marked as having support for viewers with impaired "
02393 "hearing."));
02394 bs->setValue(0);
02395 return bs;
02396 }
02397
02398 static GlobalSpinBox *GRAudioDescRecPriority()
02399 {
02400 GlobalSpinBox *bs = new GlobalSpinBox("AudioDescRecPriority",
02401 -99, 99, 1);
02402 bs->setLabel(QObject::tr("Audio described priority"));
02403 bs->setHelpText(QObject::tr("Additional priority when a showing "
02404 "is marked as being Audio Described."));
02405 bs->setValue(0);
02406 return bs;
02407 }
02408
02409 static GlobalSpinBox *GRSingleRecordRecPriority()
02410 {
02411 GlobalSpinBox *bs = new GlobalSpinBox("SingleRecordRecPriority",
02412 -99, 99, 1);
02413 bs->setLabel(QObject::tr("Single recordings priority"));
02414 bs->setHelpText(QObject::tr("Single recordings will receive this "
02415 "additional recording priority value."));
02416 bs->setValue(1);
02417 return bs;
02418 }
02419
02420 static GlobalSpinBox *GRWeekslotRecordRecPriority()
02421 {
02422 GlobalSpinBox *bs = new GlobalSpinBox("WeekslotRecordRecPriority",
02423 -99, 99, 1);
02424 bs->setLabel(QObject::tr("Weekslot recordings priority"));
02425 bs->setHelpText(QObject::tr("Weekslot recordings will receive this "
02426 "additional recording priority value."));
02427 bs->setValue(0);
02428 return bs;
02429 }
02430
02431 static GlobalSpinBox *GRTimeslotRecordRecPriority()
02432 {
02433 GlobalSpinBox *bs = new GlobalSpinBox("TimeslotRecordRecPriority",
02434 -99, 99, 1);
02435 bs->setLabel(QObject::tr("Timeslot recordings priority"));
02436 bs->setHelpText(QObject::tr("Timeslot recordings will receive this "
02437 "additional recording priority value."));
02438 bs->setValue(0);
02439 return bs;
02440 }
02441
02442 static GlobalSpinBox *GRChannelRecordRecPriority()
02443 {
02444 GlobalSpinBox *bs = new GlobalSpinBox("ChannelRecordRecPriority",
02445 -99, 99, 1);
02446 bs->setLabel(QObject::tr("Channel recordings priority"));
02447 bs->setHelpText(QObject::tr("Channel recordings will receive this "
02448 "additional recording priority value."));
02449 bs->setValue(0);
02450 return bs;
02451 }
02452
02453 static GlobalSpinBox *GRAllRecordRecPriority()
02454 {
02455 GlobalSpinBox *bs = new GlobalSpinBox("AllRecordRecPriority",
02456 -99, 99, 1);
02457 bs->setLabel(QObject::tr("All recordings priority"));
02458 bs->setHelpText(QObject::tr("The 'All' recording type will receive this "
02459 "additional recording priority value."));
02460 bs->setValue(0);
02461 return bs;
02462 }
02463
02464 static GlobalSpinBox *GRFindOneRecordRecPriority()
02465 {
02466 GlobalSpinBox *bs = new GlobalSpinBox("FindOneRecordRecPriority",
02467 -99, 99, 1);
02468 bs->setLabel(QObject::tr("Find one recordings priority"));
02469 bs->setHelpText(QObject::tr("Find One, Find Weekly and Find Daily "
02470 "recording types will receive this "
02471 "additional recording priority value."));
02472 bs->setValue(-1);
02473 return bs;
02474 }
02475
02476 static GlobalSpinBox *GROverrideRecordRecPriority()
02477 {
02478 GlobalSpinBox *bs = new GlobalSpinBox("OverrideRecordRecPriority",
02479 -99, 99, 1);
02480 bs->setLabel(QObject::tr("Override recordings priority"));
02481 bs->setHelpText(QObject::tr("Override recordings will receive this "
02482 "additional recording priority value."));
02483 bs->setValue(0);
02484 return bs;
02485 }
02486
02487 static HostLineEdit *DefaultTVChannel()
02488 {
02489 HostLineEdit *ge = new HostLineEdit("DefaultTVChannel");
02490 ge->setLabel(QObject::tr("Guide starts at channel"));
02491 ge->setValue("3");
02492 ge->setHelpText(QObject::tr("The program guide starts on this channel if "
02493 "it is run from outside of Live TV mode."));
02494 return ge;
02495 }
02496
02497 static HostSpinBox *EPGRecThreshold()
02498 {
02499 HostSpinBox *gs = new HostSpinBox("SelChangeRecThreshold", 1, 600, 1);
02500 gs->setLabel(QObject::tr("Record threshold"));
02501 gs->setValue(16);
02502 gs->setHelpText(QObject::tr("Pressing SELECT on a show that is at least "
02503 "this many minutes into the future will schedule a "
02504 "recording."));
02505 return gs;
02506 }
02507
02508 static HostComboBox *MythLanguage()
02509 {
02510 HostComboBox *gc = new HostComboBox("Language");
02511 gc->setLabel(QObject::tr("Language"));
02512
02513 QMap<QString, QString> langMap = MythTranslation::getLanguages();
02514 QStringList langs = langMap.values();
02515 langs.sort();
02516 QString langCode = gCoreContext->GetSetting("Language").toLower();
02517 if (langCode.isEmpty())
02518 langCode = "en_US";
02519 gc->clearSelections();
02520 for (QStringList::Iterator it = langs.begin(); it != langs.end(); ++it)
02521 {
02522 QString label = *it;
02523 QString value = langMap.key(label);
02524 gc->addSelection(label, value, (value.toLower() == langCode));
02525 }
02526
02527 gc->setHelpText(
02528 QObject::tr("Your preferred language for the user interface."));
02529 return gc;
02530 }
02531
02532 static void ISO639_fill_selections(SelectSetting *widget, uint i)
02533 {
02534 widget->clearSelections();
02535 QString q = QString("ISO639Language%1").arg(i);
02536 QString lang = gCoreContext->GetSetting(q, "").toLower();
02537
02538 if ((lang.isEmpty() || lang == "aar") &&
02539 !gCoreContext->GetSetting("Language", "").isEmpty())
02540 {
02541 lang = iso639_str2_to_str3(gCoreContext->GetLanguage().toLower());
02542 }
02543
02544 QMap<int,QString>::iterator it = _iso639_key_to_english_name.begin();
02545 QMap<int,QString>::iterator ite = _iso639_key_to_english_name.end();
02546
02547 for (; it != ite; ++it)
02548 {
02549 QString desc = (*it);
02550 int idx = desc.indexOf(";");
02551 if (idx > 0)
02552 desc = desc.left(idx);
02553
02554 const QString il = iso639_key_to_str3(it.key());
02555 widget->addSelection(desc, il, il == lang);
02556 }
02557 }
02558
02559 static GlobalComboBox *ISO639PreferredLanguage(uint i)
02560 {
02561 GlobalComboBox *gc = new GlobalComboBox(QString("ISO639Language%1").arg(i));
02562 gc->setLabel(QObject::tr("Guide language #%1").arg(i+1));
02563
02564
02565 ISO639_fill_selections(gc, i);
02566 gc->setHelpText(
02567 QObject::tr("Your #%1 preferred language for "
02568 "Program Guide data and captions.").arg(i+1));
02569 return gc;
02570 }
02571
02572 static HostCheckBox *NetworkControlEnabled()
02573 {
02574 HostCheckBox *gc = new HostCheckBox("NetworkControlEnabled");
02575 gc->setLabel(QObject::tr("Enable Network Remote Control interface"));
02576 gc->setHelpText(QObject::tr("This enables support for controlling "
02577 "mythfrontend over the network."));
02578 gc->setValue(false);
02579 return gc;
02580 }
02581
02582 static HostSpinBox *NetworkControlPort()
02583 {
02584 HostSpinBox *gs = new HostSpinBox("NetworkControlPort", 1025, 65535, 1);
02585 gs->setLabel(QObject::tr("Network Remote Control port"));
02586 gs->setValue(6546);
02587 gs->setHelpText(QObject::tr("This specifies what port the network remote "
02588 "Control interface will listen on for new connections."));
02589 return gs;
02590 }
02591
02592 static HostLineEdit *UDPNotifyPort()
02593 {
02594 HostLineEdit *ge = new HostLineEdit("UDPNotifyPort");
02595 ge->setLabel(QObject::tr("UDP notify port"));
02596 ge->setValue("6948");
02597 ge->setHelpText(QObject::tr("MythTV will listen for connections "
02598 "from the \"mythutil\" program on this port."));
02599 return ge;
02600 }
02601
02602 static HostCheckBox *RealtimePriority()
02603 {
02604 HostCheckBox *gc = new HostCheckBox("RealtimePriority");
02605 gc->setLabel(QObject::tr("Enable realtime priority threads"));
02606 gc->setHelpText(QObject::tr("When running mythfrontend with root "
02607 "privileges, some threads can be given enhanced priority. "
02608 "Disable this if mythfrontend freezes during video "
02609 "playback."));
02610 gc->setValue(true);
02611 return gc;
02612 }
02613
02614 static HostCheckBox *EnableMediaMon()
02615 {
02616 HostCheckBox *gc = new HostCheckBox("MonitorDrives");
02617 gc->setLabel(QObject::tr("Monitor CD/DVD") +
02618 QObject::tr(" (and other removable devices)"));
02619 gc->setHelpText(QObject::tr("This enables support for monitoring your "
02620 "CD/DVD drives for new disks and launching the proper "
02621 "plugin to handle them. Requires restart."));
02622 gc->setValue(false);
02623 return gc;
02624 }
02625
02626 static HostLineEdit *IgnoreMedia()
02627 {
02628 HostLineEdit *ge = new HostLineEdit("IgnoreDevices");
02629 ge->setLabel(QObject::tr("Ignore devices"));
02630 ge->setValue("");
02631 ge->setHelpText(QObject::tr("If there are any devices that you do not want "
02632 "to be monitored, list them here with commas "
02633 "in-between. The plugins will ignore them. "
02634 "Requires restart."));
02635 return ge;
02636 }
02637
02638 class MythMediaSettings : public TriggeredConfigurationGroup
02639 {
02640 public:
02641 MythMediaSettings() :
02642 TriggeredConfigurationGroup(false, false, true, true)
02643 {
02644 setLabel(QObject::tr("MythMediaMonitor"));
02645 setUseLabel(false);
02646
02647 Setting* enabled = EnableMediaMon();
02648 addChild(enabled);
02649 setTrigger(enabled);
02650
02651 ConfigurationGroup* settings = new VerticalConfigurationGroup(false);
02652 settings->addChild(IgnoreMedia());
02653 addTarget("1", settings);
02654
02655
02656 addTarget("0", new VerticalConfigurationGroup(true));
02657 };
02658 };
02659
02660
02661 static HostComboBox *DisplayGroupTitleSort()
02662 {
02663 HostComboBox *gc = new HostComboBox("DisplayGroupTitleSort");
02664 gc->setLabel(QObject::tr("Sort titles"));
02665 gc->addSelection(QObject::tr("Alphabetically"),
02666 QString::number(PlaybackBox::TitleSortAlphabetical));
02667 gc->addSelection(QObject::tr("By recording priority"),
02668 QString::number(PlaybackBox::TitleSortRecPriority));
02669 gc->setHelpText(QObject::tr("Sets the title sorting order when the "
02670 "view is set to Titles only."));
02671 return gc;
02672 }
02673
02674 static HostCheckBox *PlaybackWatchList()
02675 {
02676 HostCheckBox *gc = new HostCheckBox("PlaybackWatchList");
02677 gc->setLabel(QObject::tr("Include the 'Watch List' group"));
02678 gc->setValue(true);
02679 gc->setHelpText(QObject::tr("The 'Watch List' is an abbreviated list of "
02680 "recordings sorted to highlight series and "
02681 "shows that need attention in order to "
02682 "keep up to date."));
02683 return gc;
02684 }
02685
02686 static HostCheckBox *PlaybackWLStart()
02687 {
02688 HostCheckBox *gc = new HostCheckBox("PlaybackWLStart");
02689 gc->setLabel(QObject::tr("Start from the Watch List view"));
02690 gc->setValue(false);
02691 gc->setHelpText(QObject::tr("If enabled, the 'Watch List' will be the "
02692 "initial view each time you enter the "
02693 "Watch Recordings screen"));
02694 return gc;
02695 }
02696
02697 static HostCheckBox *PlaybackWLAutoExpire()
02698 {
02699 HostCheckBox *gc = new HostCheckBox("PlaybackWLAutoExpire");
02700 gc->setLabel(QObject::tr("Exclude recordings not set for Auto-Expire"));
02701 gc->setValue(false);
02702 gc->setHelpText(QObject::tr("Set this if you turn off Auto-Expire only "
02703 "for recordings that you've seen and intend "
02704 "to keep. This option will exclude these "
02705 "recordings from the 'Watch List'."));
02706 return gc;
02707 }
02708
02709 static HostSpinBox *PlaybackWLMaxAge()
02710 {
02711 HostSpinBox *gs = new HostSpinBox("PlaybackWLMaxAge", 30, 180, 10);
02712 gs->setLabel(QObject::tr("Maximum days counted in the score"));
02713 gs->setValue(60);
02714 gs->setHelpText(QObject::tr("The 'Watch List' scores are based on 1 point "
02715 "equals one day since recording. This option "
02716 "limits the maximum score due to age and "
02717 "affects other weighting factors."));
02718 return gs;
02719 }
02720
02721 static HostSpinBox *PlaybackWLBlackOut()
02722 {
02723 HostSpinBox *gs = new HostSpinBox("PlaybackWLBlackOut", 0, 5, 1);
02724 gs->setLabel(QObject::tr("Days to exclude weekly episodes after delete"));
02725 gs->setValue(2);
02726 gs->setHelpText(QObject::tr("When an episode is deleted or marked as "
02727 "watched, other episodes of the series are "
02728 "excluded from the 'Watch List' for this "
02729 "interval of time. Daily shows also have a "
02730 "smaller interval based on this setting."));
02731 return gs;
02732 }
02733
02734 class WatchListSettings : public TriggeredConfigurationGroup
02735 {
02736 public:
02737 WatchListSettings() :
02738 TriggeredConfigurationGroup(false, false, true, true)
02739 {
02740
02741 Setting* watchList = PlaybackWatchList();
02742 addChild(watchList);
02743 setTrigger(watchList);
02744
02745 ConfigurationGroup* settings = new VerticalConfigurationGroup(false);
02746 settings->addChild(PlaybackWLStart());
02747 settings->addChild(PlaybackWLAutoExpire());
02748 settings->addChild(PlaybackWLMaxAge());
02749 settings->addChild(PlaybackWLBlackOut());
02750 addTarget("1", settings);
02751
02752 addTarget("0", new VerticalConfigurationGroup(true));
02753 };
02754 };
02755
02756 static HostCheckBox *LCDShowTime()
02757 {
02758 HostCheckBox *gc = new HostCheckBox("LCDShowTime");
02759 gc->setLabel(QObject::tr("Display time"));
02760 gc->setHelpText(QObject::tr("Display current time on idle LCD display. "));
02761 gc->setValue(true);
02762 return gc;
02763 }
02764
02765 static HostCheckBox *LCDShowRecStatus()
02766 {
02767 HostCheckBox *gc = new HostCheckBox("LCDShowRecStatus");
02768 gc->setLabel(QObject::tr("Display recording status"));
02769 gc->setHelpText(QObject::tr("Display current recordings information on "
02770 "LCD display."));
02771 gc->setValue(false);
02772 return gc;
02773 }
02774
02775 static HostCheckBox *LCDShowMenu()
02776 {
02777 HostCheckBox *gc = new HostCheckBox("LCDShowMenu");
02778 gc->setLabel(QObject::tr("Display menus"));
02779 gc->setHelpText(QObject::tr("Display selected menu on LCD display. "));
02780 gc->setValue(true);
02781 return gc;
02782 }
02783
02784 static HostSpinBox *LCDPopupTime()
02785 {
02786 HostSpinBox *gs = new HostSpinBox("LCDPopupTime", 1, 300, 1, true);
02787 gs->setLabel(QObject::tr("Menu pop-up time"));
02788 gs->setHelpText(QObject::tr("How many seconds the menu will "
02789 "remain visible after navigation."));
02790 gs->setValue(5);
02791 return gs;
02792 }
02793
02794 static HostCheckBox *LCDShowMusic()
02795 {
02796 HostCheckBox *gc = new HostCheckBox("LCDShowMusic");
02797 gc->setLabel(QObject::tr("Display music artist and title"));
02798 gc->setHelpText(QObject::tr("Display playing artist and song title in "
02799 "MythMusic on LCD display."));
02800 gc->setValue(true);
02801 return gc;
02802 }
02803
02804 static HostComboBox *LCDShowMusicItems()
02805 {
02806 HostComboBox *gc = new HostComboBox("LCDShowMusicItems");
02807 gc->setLabel(QObject::tr("Items"));
02808 gc->addSelection(QObject::tr("Artist - Title"), "ArtistTitle");
02809 gc->addSelection(QObject::tr("Artist [Album] Title"), "ArtistAlbumTitle");
02810 gc->setHelpText(QObject::tr("Which items to show when playing music."));
02811 return gc;
02812 }
02813
02814 static HostCheckBox *LCDShowChannel()
02815 {
02816 HostCheckBox *gc = new HostCheckBox("LCDShowChannel");
02817 gc->setLabel(QObject::tr("Display channel information"));
02818 gc->setHelpText(QObject::tr("Display tuned channel information on LCD display."));
02819 gc->setValue(true);
02820 return gc;
02821 }
02822
02823 static HostCheckBox *LCDShowVolume()
02824 {
02825 HostCheckBox *gc = new HostCheckBox("LCDShowVolume");
02826 gc->setLabel(QObject::tr("Display volume information"));
02827 gc->setHelpText(QObject::tr("Display volume level information "
02828 "on LCD display."));
02829 gc->setValue(true);
02830 return gc;
02831 }
02832
02833 static HostCheckBox *LCDShowGeneric()
02834 {
02835 HostCheckBox *gc = new HostCheckBox("LCDShowGeneric");
02836 gc->setLabel(QObject::tr("Display generic information"));
02837 gc->setHelpText(QObject::tr("Display generic information on LCD display."));
02838 gc->setValue(true);
02839 return gc;
02840 }
02841
02842 static HostCheckBox *LCDBacklightOn()
02843 {
02844 HostCheckBox *gc = new HostCheckBox("LCDBacklightOn");
02845 gc->setLabel(QObject::tr("Backlight always on"));
02846 gc->setHelpText(QObject::tr("Turn on the backlight permanently "
02847 "on the LCD display."));
02848 gc->setValue(true);
02849 return gc;
02850 }
02851
02852 static HostCheckBox *LCDHeartBeatOn()
02853 {
02854 HostCheckBox *gc = new HostCheckBox("LCDHeartBeatOn");
02855 gc->setLabel(QObject::tr("Heartbeat always on"));
02856 gc->setHelpText(QObject::tr("Turn on the LCD heartbeat."));
02857 gc->setValue(false);
02858 return gc;
02859 }
02860
02861 static HostCheckBox *LCDBigClock()
02862 {
02863 HostCheckBox *gc = new HostCheckBox("LCDBigClock");
02864 gc->setLabel(QObject::tr("Display large clock"));
02865 gc->setHelpText(QObject::tr("On multiline displays try and display the time as large as possible."));
02866 gc->setValue(false);
02867 return gc;
02868 }
02869
02870 static HostLineEdit *LCDKeyString()
02871 {
02872 HostLineEdit *ge = new HostLineEdit("LCDKeyString");
02873 ge->setLabel(QObject::tr("LCD key order"));
02874 ge->setValue("ABCDEF");
02875 ge->setHelpText(QObject::tr("Enter the 6 Keypad Return Codes for your "
02876 "LCD keypad in the order in which you want the functions "
02877 "up/down/left/right/yes/no to operate. "
02878 "(See lcdproc/server/drivers/hd44780.c/keyMapMatrix[] "
02879 "or the matrix for your display)"));
02880 return ge;
02881 }
02882
02883 static HostCheckBox *LCDEnable()
02884 {
02885 HostCheckBox *gc = new HostCheckBox("LCDEnable");
02886 gc->setLabel(QObject::tr("Enable LCD device"));
02887 gc->setHelpText(QObject::tr("Use an LCD display to view MythTV status "
02888 "information."));
02889 gc->setValue(false);
02890 return gc;
02891 }
02892
02893 class LcdSettings : public TriggeredConfigurationGroup
02894 {
02895 public:
02896 LcdSettings() : TriggeredConfigurationGroup(false, false, false, false,
02897 false, false, false, false)
02898 {
02899 setLabel(QObject::tr("LCD device display"));
02900 setUseLabel(false);
02901
02902 Setting* lcd_enable = LCDEnable();
02903 addChild(lcd_enable);
02904 setTrigger(lcd_enable);
02905
02906 ConfigurationGroup *settings =
02907 new VerticalConfigurationGroup(false, true, false, false);
02908 ConfigurationGroup *setHoriz =
02909 new HorizontalConfigurationGroup(false, false, false, false);
02910
02911 ConfigurationGroup* setLeft =
02912 new VerticalConfigurationGroup(false, false, false, false);
02913 ConfigurationGroup* setRight =
02914 new VerticalConfigurationGroup(false, false, false, false);
02915
02916 setLeft->addChild(LCDShowTime());
02917 setLeft->addChild(LCDShowMenu());
02918 setLeft->addChild(LCDShowMusic());
02919 setLeft->addChild(LCDShowMusicItems());
02920 setLeft->addChild(LCDShowChannel());
02921 setLeft->addChild(LCDShowRecStatus());
02922 setRight->addChild(LCDShowVolume());
02923 setRight->addChild(LCDShowGeneric());
02924 setRight->addChild(LCDBacklightOn());
02925 setRight->addChild(LCDHeartBeatOn());
02926 setRight->addChild(LCDBigClock());
02927 setRight->addChild(LCDKeyString());
02928 setHoriz->addChild(setLeft);
02929 setHoriz->addChild(setRight);
02930 settings->addChild(setHoriz);
02931 settings->addChild(LCDPopupTime());
02932
02933 addTarget("1", settings);
02934
02935 addTarget("0", new VerticalConfigurationGroup(true));
02936 };
02937 };
02938
02939
02940 #if CONFIG_DARWIN
02941 static HostCheckBox *MacGammaCorrect()
02942 {
02943 HostCheckBox *gc = new HostCheckBox("MacGammaCorrect");
02944 gc->setLabel(QObject::tr("Enable gamma correction for video"));
02945 gc->setValue(false);
02946 gc->setHelpText(QObject::tr("If enabled, QuickTime will correct the gamma "
02947 "of the video to match your monitor. Turning this off can "
02948 "save some CPU cycles."));
02949 return gc;
02950 }
02951
02952 static HostCheckBox *MacScaleUp()
02953 {
02954 HostCheckBox *gc = new HostCheckBox("MacScaleUp");
02955 gc->setLabel(QObject::tr("Scale video as necessary"));
02956 gc->setValue(true);
02957 gc->setHelpText(QObject::tr("If enabled, video will be scaled to fit your "
02958 "window or screen. If unchecked, video will never be made "
02959 "larger than its actual pixel size."));
02960 return gc;
02961 }
02962
02963 static HostSpinBox *MacFullSkip()
02964 {
02965 HostSpinBox *gs = new HostSpinBox("MacFullSkip", 0, 30, 1, true);
02966 gs->setLabel(QObject::tr("Frames to skip in fullscreen mode"));
02967 gs->setValue(0);
02968 gs->setHelpText(QObject::tr("Video displayed in fullscreen or non-windowed "
02969 "mode will skip this many frames for each frame drawn. "
02970 "Set to 0 to show every frame. Only valid when either "
02971 "\"Use GUI size for TV playback\" or \"Run the frontend "
02972 "in a window\" is not checked."));
02973 return gs;
02974 }
02975
02976 static HostCheckBox *MacMainEnabled()
02977 {
02978 HostCheckBox *gc = new HostCheckBox("MacMainEnabled");
02979 gc->setLabel(QObject::tr("Video in main window"));
02980 gc->setValue(true);
02981 gc->setHelpText(QObject::tr("If enabled, video will be displayed in the "
02982 "main GUI window. Disable this when you only want video "
02983 "on the desktop or in a floating window. Only valid when "
02984 "\"Use GUI size for TV playback\" and \"Run the "
02985 "frontend in a window\" are checked."));
02986 return gc;
02987 }
02988
02989 static HostSpinBox *MacMainSkip()
02990 {
02991 HostSpinBox *gs = new HostSpinBox("MacMainSkip", 0, 30, 1, true);
02992 gs->setLabel(QObject::tr("Frames to skip"));
02993 gs->setValue(0);
02994 gs->setHelpText(QObject::tr("Video in the main window will skip this many "
02995 "frames for each frame drawn. Set to 0 to show "
02996 "every frame."));
02997 return gs;
02998 }
02999
03000 static HostSpinBox *MacMainOpacity()
03001 {
03002 HostSpinBox *gs = new HostSpinBox("MacMainOpacity", 0, 100, 5, false);
03003 gs->setLabel(QObject::tr("Opacity"));
03004 gs->setValue(100);
03005 gs->setHelpText(QObject::tr("The opacity of the main window. Set to "
03006 "100 for completely opaque, set to 0 for completely "
03007 "transparent."));
03008 return gs;
03009 }
03010
03011 class MacMainSettings : public TriggeredConfigurationGroup
03012 {
03013 public:
03014 MacMainSettings() : TriggeredConfigurationGroup(false)
03015 {
03016 setLabel(QObject::tr("Video in main window"));
03017 setUseLabel(false);
03018 Setting *gc = MacMainEnabled();
03019 addChild(gc);
03020 setTrigger(gc);
03021
03022 VerticalConfigurationGroup *opts =
03023 new VerticalConfigurationGroup(false, false);
03024 opts->addChild(MacMainSkip());
03025 opts->addChild(MacMainOpacity());
03026
03027 addTarget("1", opts);
03028 addTarget("0", new VerticalConfigurationGroup(false, false));
03029 }
03030 };
03031
03032 static HostCheckBox *MacFloatEnabled()
03033 {
03034 HostCheckBox *gc = new HostCheckBox("MacFloatEnabled");
03035 gc->setLabel(QObject::tr("Video in floating window"));
03036 gc->setValue(false);
03037 gc->setHelpText(QObject::tr("If enabled, video will be displayed in a "
03038 "floating window. Only valid when \"Use GUI size for TV "
03039 "playback\" and \"Run the frontend in a window\" are "
03040 "checked."));
03041 return gc;
03042 }
03043
03044 static HostSpinBox *MacFloatSkip()
03045 {
03046 HostSpinBox *gs = new HostSpinBox("MacFloatSkip", 0, 30, 1, true);
03047 gs->setLabel(QObject::tr("Frames to skip"));
03048 gs->setValue(0);
03049 gs->setHelpText(QObject::tr("Video in the floating window will skip "
03050 "this many frames for each frame drawn. Set to 0 to show "
03051 "every frame."));
03052 return gs;
03053 }
03054
03055 static HostSpinBox *MacFloatOpacity()
03056 {
03057 HostSpinBox *gs = new HostSpinBox("MacFloatOpacity", 0, 100, 5, false);
03058 gs->setLabel(QObject::tr("Opacity"));
03059 gs->setValue(100);
03060 gs->setHelpText(QObject::tr("The opacity of the floating window. Set to "
03061 "100 for completely opaque, set to 0 for completely "
03062 "transparent."));
03063 return gs;
03064 }
03065
03066 class MacFloatSettings : public TriggeredConfigurationGroup
03067 {
03068 public:
03069 MacFloatSettings() : TriggeredConfigurationGroup(false)
03070 {
03071 setLabel(QObject::tr("Video in floating window"));
03072 setUseLabel(false);
03073 Setting *gc = MacFloatEnabled();
03074 addChild(gc);
03075 setTrigger(gc);
03076
03077 VerticalConfigurationGroup *opts =
03078 new VerticalConfigurationGroup(false, false);
03079 opts->addChild(MacFloatSkip());
03080 opts->addChild(MacFloatOpacity());
03081
03082 addTarget("1", opts);
03083 addTarget("0", new VerticalConfigurationGroup(false, false));
03084 }
03085 };
03086
03087 static HostCheckBox *MacDockEnabled()
03088 {
03089 HostCheckBox *gc = new HostCheckBox("MacDockEnabled");
03090 gc->setLabel(QObject::tr("Video in the dock"));
03091 gc->setValue(true);
03092 gc->setHelpText(QObject::tr("If enabled, video will be displayed in the "
03093 "application's dock icon. Only valid when \"Use GUI size "
03094 "for TV playback\" and \"Run the frontend in a window\" "
03095 "are checked."));
03096 return gc;
03097 }
03098
03099 static HostSpinBox *MacDockSkip()
03100 {
03101 HostSpinBox *gs = new HostSpinBox("MacDockSkip", 0, 30, 1, true);
03102 gs->setLabel(QObject::tr("Frames to skip"));
03103 gs->setValue(3);
03104 gs->setHelpText(QObject::tr("Video in the dock icon will skip this many "
03105 "frames for each frame drawn. Set to 0 to show "
03106 "every frame."));
03107 return gs;
03108 }
03109
03110 class MacDockSettings : public TriggeredConfigurationGroup
03111 {
03112 public:
03113 MacDockSettings() : TriggeredConfigurationGroup(false)
03114 {
03115 setLabel(QObject::tr("Video in the dock"));
03116 setUseLabel(false);
03117 Setting *gc = MacDockEnabled();
03118 addChild(gc);
03119 setTrigger(gc);
03120
03121 Setting *skip = MacDockSkip();
03122 addTarget("1", skip);
03123 addTarget("0", new HorizontalConfigurationGroup(false, false));
03124 }
03125 };
03126
03127 static HostCheckBox *MacDesktopEnabled()
03128 {
03129 HostCheckBox *gc = new HostCheckBox("MacDesktopEnabled");
03130 gc->setLabel(QObject::tr("Video on the desktop"));
03131 gc->setValue(false);
03132 gc->setHelpText(QObject::tr("If enabled, video will be displayed on the "
03133 "desktop, behind the Finder icons. Only valid when \"Use "
03134 "GUI size for TV playback\" and \"Run the frontend in a "
03135 "window\" are checked."));
03136 return gc;
03137 }
03138
03139 static HostSpinBox *MacDesktopSkip()
03140 {
03141 HostSpinBox *gs = new HostSpinBox("MacDesktopSkip", 0, 30, 1, true);
03142 gs->setLabel(QObject::tr("Frames to skip"));
03143 gs->setValue(0);
03144 gs->setHelpText(QObject::tr("Video on the desktop will skip this many "
03145 "frames for each frame drawn. Set to 0 to show "
03146 "every frame."));
03147 return gs;
03148 }
03149
03150 class MacDesktopSettings : public TriggeredConfigurationGroup
03151 {
03152 public:
03153 MacDesktopSettings() : TriggeredConfigurationGroup(false)
03154 {
03155 setLabel(QObject::tr("Video on the desktop"));
03156 setUseLabel(false);
03157 Setting *gc = MacDesktopEnabled();
03158 addChild(gc);
03159 setTrigger(gc);
03160
03161 Setting *skip = MacDesktopSkip();
03162 addTarget("1", skip);
03163 addTarget("0", new HorizontalConfigurationGroup(false, false));
03164 }
03165 };
03166 #endif
03167
03168 static HostCheckBox *WatchTVGuide()
03169 {
03170 HostCheckBox *gc = new HostCheckBox("WatchTVGuide");
03171 gc->setLabel(QObject::tr("Show the program guide when starting Live TV"));
03172 gc->setHelpText(QObject::tr("This starts the program guide immediately "
03173 "upon starting to watch Live TV."));
03174 gc->setValue(false);
03175 return gc;
03176 }
03177
03178 MainGeneralSettings::MainGeneralSettings()
03179 {
03180 DatabaseSettings::addDatabaseSettings(this);
03181
03182 VerticalConfigurationGroup *pin =
03183 new VerticalConfigurationGroup(false, true, false, false);
03184 pin->setLabel(QObject::tr("Settings Access"));
03185 pin->addChild(SetupPinCodeRequired());
03186 pin->addChild(SetupPinCode());
03187 addChild(pin);
03188
03189 VerticalConfigurationGroup *general =
03190 new VerticalConfigurationGroup(false, true, false, false);
03191 general->setLabel(QObject::tr("General"));
03192 general->addChild(UseVirtualKeyboard());
03193 general->addChild(ScreenShotPath());
03194 addChild(general);
03195
03196 VerticalConfigurationGroup *media =
03197 new VerticalConfigurationGroup(false, true, false, false);
03198 media->setLabel(QObject::tr("Media Monitor"));
03199 MythMediaSettings *mediaMon = new MythMediaSettings();
03200 media->addChild(mediaMon);
03201 addChild(media);
03202
03203 VerticalConfigurationGroup *shutdownSettings =
03204 new VerticalConfigurationGroup(true, true, false, false);
03205 shutdownSettings->setLabel(QObject::tr("Shutdown/Reboot Settings"));
03206 shutdownSettings->addChild(FrontendIdleTimeout());
03207 shutdownSettings->addChild(OverrideExitMenu());
03208 shutdownSettings->addChild(HaltCommand());
03209 shutdownSettings->addChild(RebootCommand());
03210 addChild(shutdownSettings);
03211
03212 VerticalConfigurationGroup *remotecontrol =
03213 new VerticalConfigurationGroup(false, true, false, false);
03214 remotecontrol->setLabel(QObject::tr("Remote Control"));
03215 remotecontrol->addChild(LircDaemonDevice());
03216 remotecontrol->addChild(NetworkControlEnabled());
03217 remotecontrol->addChild(NetworkControlPort());
03218 remotecontrol->addChild(UDPNotifyPort());
03219 addChild(remotecontrol);
03220 }
03221
03222 PlaybackSettings::PlaybackSettings()
03223 {
03224 uint i = 0, total = 8;
03225 #if CONFIG_DARWIN
03226 total += 2;
03227 #endif // USING_DARWIN
03228
03229
03230 VerticalConfigurationGroup* general1 =
03231 new VerticalConfigurationGroup(false);
03232 general1->setLabel(QObject::tr("General Playback") +
03233 QString(" (%1/%2)").arg(++i).arg(total));
03234
03235 HorizontalConfigurationGroup *columns =
03236 new HorizontalConfigurationGroup(false, false, true, true);
03237
03238 VerticalConfigurationGroup *column1 =
03239 new VerticalConfigurationGroup(false, false, true, true);
03240 column1->addChild(RealtimePriority());
03241 column1->addChild(DecodeExtraAudio());
03242 column1->addChild(JumpToProgramOSD());
03243 columns->addChild(column1);
03244
03245 VerticalConfigurationGroup *column2 =
03246 new VerticalConfigurationGroup(false, false, true, true);
03247 column2->addChild(ClearSavedPosition());
03248 column2->addChild(AltClearSavedPosition());
03249 column2->addChild(AutomaticSetWatched());
03250 column2->addChild(ContinueEmbeddedTVPlay());
03251 columns->addChild(column2);
03252
03253 general1->addChild(columns);
03254 general1->addChild(LiveTVIdleTimeout());
03255 addChild(general1);
03256
03257 VerticalConfigurationGroup* general2 =
03258 new VerticalConfigurationGroup(false);
03259 general2->setLabel(QObject::tr("General Playback") +
03260 QString(" (%1/%2)").arg(++i).arg(total));
03261
03262 HorizontalConfigurationGroup* oscan =
03263 new HorizontalConfigurationGroup(false, false, true, true);
03264 VerticalConfigurationGroup *ocol1 =
03265 new VerticalConfigurationGroup(false, false, true, true);
03266 VerticalConfigurationGroup *ocol2 =
03267 new VerticalConfigurationGroup(false, false, true, true);
03268 ocol1->addChild(VertScanPercentage());
03269 ocol1->addChild(YScanDisplacement());
03270 ocol2->addChild(HorizScanPercentage());
03271 ocol2->addChild(XScanDisplacement());
03272 oscan->addChild(ocol1);
03273 oscan->addChild(ocol2);
03274
03275 HorizontalConfigurationGroup* aspect_fill =
03276 new HorizontalConfigurationGroup(false, false, true, true);
03277 aspect_fill->addChild(AspectOverride());
03278 aspect_fill->addChild(AdjustFill());
03279
03280 general2->addChild(oscan);
03281 general2->addChild(aspect_fill);
03282 general2->addChild(LetterboxingColour());
03283 general2->addChild(PIPLocationComboBox());
03284 general2->addChild(PlaybackExitPrompt());
03285 general2->addChild(EndOfRecordingExitPrompt());
03286 addChild(general2);
03287
03288 QString tmp = QString(" (%1/%2)").arg(++i).arg(total);
03289 addChild(new PlaybackProfileConfigs(tmp));
03290
03291 VerticalConfigurationGroup* pbox = new VerticalConfigurationGroup(false);
03292 pbox->setLabel(QObject::tr("View Recordings") +
03293 QString(" (%1/%2)").arg(++i).arg(total));
03294 pbox->addChild(PlayBoxOrdering());
03295 pbox->addChild(PlayBoxEpisodeSort());
03296
03297
03298
03299 pbox->addChild(PBBStartInTitle());
03300 addChild(pbox);
03301
03302 VerticalConfigurationGroup* pbox2 = new VerticalConfigurationGroup(false);
03303 pbox2->setLabel(QObject::tr("Recording Groups") +
03304 QString(" (%1/%2)").arg(++i).arg(total));
03305 pbox2->addChild(DisplayRecGroup());
03306 pbox2->addChild(QueryInitialFilter());
03307 pbox2->addChild(RememberRecGroup());
03308 pbox2->addChild(UseGroupNameAsAllPrograms());
03309 addChild(pbox2);
03310
03311 VerticalConfigurationGroup* pbox3 = new VerticalConfigurationGroup(false);
03312 pbox3->setLabel(QObject::tr("View Recordings") +
03313 QString(" (%1/%2)").arg(++i).arg(total));
03314 pbox3->addChild(DisplayGroupTitleSort());
03315 pbox3->addChild(new WatchListSettings());
03316 addChild(pbox3);
03317
03318 VerticalConfigurationGroup* seek = new VerticalConfigurationGroup(false);
03319 seek->setLabel(QObject::tr("Seeking") +
03320 QString(" (%1/%2)").arg(++i).arg(total));
03321 seek->addChild(SmartForward());
03322 seek->addChild(FFRewReposTime());
03323 seek->addChild(FFRewReverse());
03324 addChild(seek);
03325
03326 VerticalConfigurationGroup* comms = new VerticalConfigurationGroup(false);
03327 comms->setLabel(QObject::tr("Commercial Skip") +
03328 QString(" (%1/%2)").arg(++i).arg(total));
03329 comms->addChild(AutoCommercialSkip());
03330 comms->addChild(CommRewindAmount());
03331 comms->addChild(CommNotifyAmount());
03332 comms->addChild(MaximumCommercialSkip());
03333 comms->addChild(MergeShortCommBreaks());
03334 addChild(comms);
03335
03336 #if CONFIG_DARWIN
03337 VerticalConfigurationGroup* mac1 = new VerticalConfigurationGroup(false);
03338 mac1->setLabel(QObject::tr("Mac OS X Video Settings") +
03339 QString(" (%1/%2)").arg(++i).arg(total));
03340 mac1->addChild(MacGammaCorrect());
03341 mac1->addChild(MacScaleUp());
03342 mac1->addChild(MacFullSkip());
03343 addChild(mac1);
03344
03345 VerticalConfigurationGroup* mac2 = new VerticalConfigurationGroup(false);
03346 mac2->setLabel(QObject::tr("Mac OS X Video Settings") +
03347 QString(" (%1/%2)").arg(++i).arg(total));
03348 mac2->addChild(new MacMainSettings());
03349 mac2->addChild(new MacFloatSettings());
03350
03351 HorizontalConfigurationGroup *row =
03352 new HorizontalConfigurationGroup(false, false, true, true);
03353 row->addChild(new MacDockSettings());
03354 row->addChild(new MacDesktopSettings());
03355 mac2->addChild(row);
03356
03357 addChild(mac2);
03358 #endif
03359 }
03360
03361 OSDSettings::OSDSettings()
03362 {
03363 VerticalConfigurationGroup* osd = new VerticalConfigurationGroup(false);
03364 osd->setLabel(QObject::tr("On-screen Display"));
03365
03366 osd->addChild(EnableMHEG());
03367 osd->addChild(PersistentBrowseMode());
03368 osd->addChild(BrowseAllTuners());
03369 osd->addChild(DefaultCCMode());
03370 osd->addChild(SubtitleCodec());
03371 addChild(osd);
03372
03373
03374
03375
03376
03377
03378 #if CONFIG_DARWIN
03379
03380
03381 #endif
03382 }
03383
03384 GeneralSettings::GeneralSettings()
03385 {
03386 VerticalConfigurationGroup* general = new VerticalConfigurationGroup(false);
03387 general->setLabel(QObject::tr("General (Basic)"));
03388 general->addChild(ChannelOrdering());
03389 general->addChild(ChannelFormat());
03390 general->addChild(LongChannelFormat());
03391 general->addChild(LiveTVPriority());
03392 addChild(general);
03393
03394 VerticalConfigurationGroup* autoexp = new VerticalConfigurationGroup(false);
03395 autoexp->setLabel(QObject::tr("General (Auto-Expire)"));
03396 autoexp->addChild(AutoExpireMethod());
03397
03398 VerticalConfigurationGroup *expgrp0 =
03399 new VerticalConfigurationGroup(false, false, true, true);
03400 expgrp0->addChild(RerecordWatched());
03401 expgrp0->addChild(AutoExpireWatchedPriority());
03402
03403 VerticalConfigurationGroup *expgrp1 =
03404 new VerticalConfigurationGroup(false, false, true, true);
03405 expgrp1->addChild(AutoExpireLiveTVMaxAge());
03406 expgrp1->addChild(AutoExpireDayPriority());
03407 expgrp1->addChild(AutoExpireExtraSpace());
03408
03409 HorizontalConfigurationGroup *expgrp =
03410 new HorizontalConfigurationGroup(false, false, true, true);
03411 expgrp->addChild(expgrp0);
03412 expgrp->addChild(expgrp1);
03413
03414 autoexp->addChild(expgrp);
03415
03416 autoexp->addChild(DeletedMaxAge());
03417
03418 addChild(autoexp);
03419
03420 VerticalConfigurationGroup* jobs = new VerticalConfigurationGroup(false);
03421 jobs->setLabel(QObject::tr("General (Jobs)"));
03422 jobs->addChild(CommercialSkipMethod());
03423 jobs->addChild(CommFlagFast());
03424 jobs->addChild(AggressiveCommDetect());
03425 jobs->addChild(DeferAutoTranscodeDays());
03426
03427 addChild(jobs);
03428
03429 VerticalConfigurationGroup* general2 = new VerticalConfigurationGroup(false);
03430 general2->setLabel(QObject::tr("General (Advanced)"));
03431 general2->addChild(RecordPreRoll());
03432 general2->addChild(RecordOverTime());
03433 general2->addChild(CategoryOverTimeSettings());
03434 addChild(general2);
03435
03436 VerticalConfigurationGroup* changrp = new VerticalConfigurationGroup(false);
03437 changrp->setLabel(QObject::tr("General (Channel Groups)"));
03438 ChannelGroupSettings *changroupsettings = new ChannelGroupSettings();
03439 changrp->addChild(changroupsettings);
03440 changrp->addChild(BrowseChannelGroup());
03441 addChild(changrp);
03442 }
03443
03444 EPGSettings::EPGSettings()
03445 {
03446 VerticalConfigurationGroup* epg = new VerticalConfigurationGroup(false);
03447 epg->setLabel(QObject::tr("Program Guide") + " 1/1");
03448 epg->addChild(WatchTVGuide());
03449 epg->addChild(DefaultTVChannel());
03450 epg->addChild(EPGRecThreshold());
03451 addChild(epg);
03452 }
03453
03454 GeneralRecPrioritiesSettings::GeneralRecPrioritiesSettings()
03455 {
03456 VerticalConfigurationGroup* sched = new VerticalConfigurationGroup(false);
03457 sched->setLabel(QObject::tr("Scheduler Options"));
03458
03459 sched->addChild(GRSchedMoveHigher());
03460 sched->addChild(GRSchedOpenEnd());
03461 sched->addChild(GRPrefInputRecPriority());
03462 sched->addChild(GRHDTVRecPriority());
03463 sched->addChild(GRWSRecPriority());
03464 sched->addChild(GRAutoRecPriority());
03465 addChild(sched);
03466
03467 VerticalConfigurationGroup* access = new VerticalConfigurationGroup(false);
03468 access->setLabel(QObject::tr("Accessibility Options"));
03469
03470 access->addChild(GRSignLangRecPriority());
03471 access->addChild(GROnScrSubRecPriority());
03472 access->addChild(GRCCRecPriority());
03473 access->addChild(GRHardHearRecPriority());
03474 access->addChild(GRAudioDescRecPriority());
03475 addChild(access);
03476
03477 VerticalConfigurationGroup* rtype = new VerticalConfigurationGroup(false);
03478 rtype->setLabel(QObject::tr("Recording Type Priority Settings"));
03479
03480 rtype->addChild(GRSingleRecordRecPriority());
03481 rtype->addChild(GROverrideRecordRecPriority());
03482 rtype->addChild(GRFindOneRecordRecPriority());
03483 rtype->addChild(GRWeekslotRecordRecPriority());
03484 rtype->addChild(GRTimeslotRecordRecPriority());
03485 rtype->addChild(GRChannelRecordRecPriority());
03486 rtype->addChild(GRAllRecordRecPriority());
03487 addChild(rtype);
03488 }
03489
03490 AppearanceSettings::AppearanceSettings()
03491 {
03492 VerticalConfigurationGroup* screen = new VerticalConfigurationGroup(false);
03493 screen->setLabel(QObject::tr("Theme") + " / " + QObject::tr("Screen Settings"));
03494
03495 screen->addChild(ThemePainter());
03496 screen->addChild(MenuTheme());
03497
03498 if (MythDisplay::GetNumberXineramaScreens() > 1)
03499 {
03500 screen->addChild(XineramaScreen());
03501 screen->addChild(XineramaMonitorAspectRatio());
03502 }
03503
03504
03505
03506
03507 VerticalConfigurationGroup *column1 =
03508 new VerticalConfigurationGroup(false, false, false, false);
03509
03510 column1->addChild(GuiWidth());
03511 column1->addChild(GuiHeight());
03512 column1->addChild(GuiOffsetX());
03513 column1->addChild(GuiOffsetY());
03514
03515 VerticalConfigurationGroup *column2 =
03516 new VerticalConfigurationGroup(false, false, false, false);
03517
03518 column2->addChild(GuiSizeForTV());
03519 column2->addChild(HideMouseCursor());
03520 column2->addChild(RunInWindow());
03521 column2->addChild(UseFixedWindowSize());
03522
03523 HorizontalConfigurationGroup *columns =
03524 new HorizontalConfigurationGroup(false, false, false, false);
03525
03526 columns->addChild(column1);
03527 columns->addChild(column2);
03528
03529 screen->addChild(columns);
03530
03531 addChild(screen);
03532
03533 #if defined(USING_XRANDR) || CONFIG_DARWIN
03534 const vector<DisplayResScreen> scr = GetVideoModes();
03535 if (!scr.empty())
03536 addChild(new VideoModeSettings());
03537 #endif
03538 VerticalConfigurationGroup* dates = new VerticalConfigurationGroup(false);
03539 dates->setLabel(QObject::tr("Localization"));
03540 dates->addChild(MythLanguage());
03541 dates->addChild(ISO639PreferredLanguage(0));
03542 dates->addChild(ISO639PreferredLanguage(1));
03543 dates->addChild(MythDateFormatCB());
03544 dates->addChild(MythShortDateFormat());
03545 dates->addChild(MythTimeFormat());
03546 addChild(dates);
03547
03548 addChild(new LcdSettings());
03549 }
03550
03551