From f3bb0d6ba00ee914e7bef89b92249482ee143b32 Mon Sep 17 00:00:00 2001 From: Nicolas Riendeau Date: Wed, 31 Jul 2013 23:23:36 -0400 Subject: [PATCH] Miscellaneous translation fixes Context changes. Concatenated string fixes. PS: Let's hope this ocmpile on Mac since I can't test the block of code that is only compiled on Darwin... --- .../programs/mythfrontend/globalsettings.cpp | 2593 +++++++++++------ mythtv/programs/mythfrontend/globalsettings.h | 86 +- 2 files changed, 1750 insertions(+), 929 deletions(-) diff --git a/mythtv/programs/mythfrontend/globalsettings.cpp b/mythtv/programs/mythfrontend/globalsettings.cpp index 47c6c4e3725..4c3c651807e 100644 --- a/mythtv/programs/mythfrontend/globalsettings.cpp +++ b/mythtv/programs/mythfrontend/globalsettings.cpp @@ -48,14 +48,20 @@ static HostCheckBox *DecodeExtraAudio() { HostCheckBox *gc = new HostCheckBox("DecodeExtraAudio"); - gc->setLabel(QObject::tr("Extra audio buffering")); + + gc->setLabel(PlaybackSettings::tr("Extra audio buffering")); + gc->setValue(true); - gc->setHelpText(QObject::tr("Enable this setting if MythTV is playing " - "\"crackly\" audio. This setting affects digital tuners " - "(QAM/DVB/ATSC) and hardware encoders. It will have no " - "effect on framegrabbers (MPEG-4/RTJPEG). MythTV will " - "keep extra audio data in its internal buffers to " - "workaround this bug.")); + + gc->setHelpText(PlaybackSettings::tr("Enable this setting if MythTV is " + "playing \"crackly\" audio. This " + "setting affects digital tuners " + "(QAM/DVB/ATSC) and hardware " + "encoders. It will have no effect on " + "framegrabbers (MPEG-4/RTJPEG). " + "MythTV will keep extra audio data in " + "its internal buffers to workaround " + "this bug.")); return gc; } @@ -63,10 +69,14 @@ static HostCheckBox *DecodeExtraAudio() static HostCheckBox *FFmpegDemuxer() { HostCheckBox *gc = new HostCheckBox("FFMPEGTS"); - gc->setLabel(QObject::tr("Use FFmpeg's original MPEG-TS demuxer")); + + gc->setLabel(PlaybackSettings::tr("Use FFmpeg's original MPEG-TS demuxer")); + gc->setValue(false); - gc->setHelpText(QObject::tr("Experimental: Enable this setting to use FFmpeg's native demuxer. " - "Things will be broken.")); + + gc->setHelpText(PlaybackSettings::tr("Experimental: Enable this setting to " + "use FFmpeg's native demuxer. Things " + "will be broken.")); return gc; } #endif @@ -74,20 +84,27 @@ static HostCheckBox *FFmpegDemuxer() static HostComboBox *PIPLocationComboBox() { HostComboBox *gc = new HostComboBox("PIPLocation"); - gc->setLabel(QObject::tr("PIP video location")); + + gc->setLabel(PlaybackSettings::tr("PIP video location")); + for (uint loc = 0; loc < kPIP_END; ++loc) gc->addSelection(toString((PIPLocation) loc), QString::number(loc)); - gc->setHelpText(QObject::tr("Location of PIP Video window.")); + + gc->setHelpText(PlaybackSettings::tr("Location of PIP Video window.")); + return gc; } static HostComboBox *DisplayRecGroup() { HostComboBox *gc = new HostComboBox("DisplayRecGroup"); - gc->setLabel(QObject::tr("Default group filter to apply")); - gc->addSelection(QObject::tr("All Programs"), QString("All Programs")); - gc->addSelection(QObject::tr("Default"), QString("Default")); + gc->setLabel(PlaybackSettings::tr("Default group filter to apply")); + + + gc->addSelection(PlaybackSettings::tr("All Programs"), QString("All Programs")); + gc->addSelection(QCoreApplication::translate("(Common)", "Default"), + QString("Default")); MSqlQuery query(MSqlQuery::InitCon()); query.prepare("SELECT DISTINCT recgroup from recorded;"); @@ -115,64 +132,84 @@ static HostComboBox *DisplayRecGroup() } } - gc->setHelpText(QObject::tr("Default group filter to apply " - "on the View Recordings screen.")); + gc->setHelpText(PlaybackSettings::tr("Default group filter to apply on the " + "View Recordings screen.")); return gc; } static HostCheckBox *QueryInitialFilter() { HostCheckBox *gc = new HostCheckBox("QueryInitialFilter"); - gc->setLabel(QObject::tr("Always prompt for initial group filter")); + + gc->setLabel(PlaybackSettings::tr("Always prompt for initial group " + "filter")); + gc->setValue(false); - gc->setHelpText(QObject::tr("If enabled, always prompt the user for the " - "initial filter to apply when entering the " - "Watch Recordings screen.")); + + gc->setHelpText(PlaybackSettings::tr("If enabled, always prompt the user " + "for the initial filter to apply " + "when entering the Watch Recordings " + "screen.")); return gc; } static HostCheckBox *RememberRecGroup() { HostCheckBox *gc = new HostCheckBox("RememberRecGroup"); - gc->setLabel(QObject::tr("Save current group filter when changed")); + + gc->setLabel(PlaybackSettings::tr("Save current group filter when " + "changed")); + gc->setValue(true); - gc->setHelpText(QObject::tr("If enabled, remember the last selected filter " - "instead of displaying the default filter " - "whenever you enter the playback screen.")); + + gc->setHelpText(PlaybackSettings::tr("If enabled, remember the last " + "selected filter instead of " + "displaying the default filter " + "whenever you enter the playback " + "screen.")); return gc; } static HostCheckBox *PBBStartInTitle() { HostCheckBox *gc = new HostCheckBox("PlaybackBoxStartInTitle"); - gc->setLabel(QObject::tr("Start in group list")); + + gc->setLabel(PlaybackSettings::tr("Start in group list")); + gc->setValue(true); - gc->setHelpText(QObject::tr("If enabled, the focus will " - "start on the group list, otherwise the " - "focus will default to the recordings.")); + + gc->setHelpText(PlaybackSettings::tr("If enabled, the focus will start on " + "the group list, otherwise the focus " + "will default to the recordings.")); return gc; } static HostCheckBox *SmartForward() { HostCheckBox *gc = new HostCheckBox("SmartForward"); - gc->setLabel(QObject::tr("Smart fast forwarding")); + + gc->setLabel(PlaybackSettings::tr("Smart fast forwarding")); + gc->setValue(false); - gc->setHelpText(QObject::tr("If enabled, then immediately after " - "rewinding, only skip forward the same amount as " - "skipping backwards.")); + + gc->setHelpText(PlaybackSettings::tr("If enabled, then immediately after " + "rewinding, only skip forward the " + "same amount as skipping backwards.")); return gc; } static GlobalComboBox *CommercialSkipMethod() { GlobalComboBox *bc = new GlobalComboBox("CommercialSkipMethod"); - bc->setLabel(QObject::tr("Commercial detection method")); - bc->setHelpText(QObject::tr( - "This determines the method used by MythTV to " - "detect when commercials start and end.")); + + bc->setLabel(GeneralSettings::tr("Commercial detection method")); + + bc->setHelpText(GeneralSettings::tr("This determines the method used by " + "MythTV to detect when commercials " + "start and end.")); deque tmp = GetPreferredSkipTypeCombinations(); + for (uint i = 0; i < tmp.size(); ++i) bc->addSelection(SkipTypeToString(tmp[i]), QString::number(tmp[i])); @@ -182,102 +219,150 @@ static GlobalComboBox *CommercialSkipMethod() static GlobalCheckBox *CommFlagFast() { GlobalCheckBox *gc = new GlobalCheckBox("CommFlagFast"); - gc->setLabel(QObject::tr("Enable experimental speedup of commercial detection")); + + gc->setLabel(GeneralSettings::tr("Enable experimental speedup of " + "commercial detection")); + gc->setValue(false); - gc->setHelpText(QObject::tr("If enabled, experimental commercial detection " - "speedups will be enabled.")); + + gc->setHelpText(GeneralSettings::tr("If enabled, experimental commercial " + "detection speedups will be enabled.")); return gc; } static HostComboBox *AutoCommercialSkip() { HostComboBox *gc = new HostComboBox("AutoCommercialSkip"); - gc->setLabel(QObject::tr("Automatically skip commercials")); - gc->addSelection(QObject::tr("Off"), "0"); - gc->addSelection(QObject::tr("Notify, but do not skip"), "2"); - gc->addSelection(QObject::tr("Automatically Skip"), "1"); - gc->setHelpText(QObject::tr("Automatically skip commercial breaks that " - "have been flagged during automatic commercial detection " - "or by the mythcommflag program, or just notify that a " - "commercial has been detected.")); + + gc->setLabel(PlaybackSettings::tr("Automatically skip commercials")); + + gc->addSelection(QCoreApplication::translate("(Common)", "Off"), "0"); + gc->addSelection(PlaybackSettings::tr("Notify, but do not skip", + "Skip commercials"), "2"); + gc->addSelection(PlaybackSettings::tr("Automatically Skip", + "Skip commercials"), "1"); + + gc->setHelpText(PlaybackSettings::tr("Automatically skip commercial breaks " + "that have been flagged during " + "automatic commercial detection " + "or by the mythcommflag program, or " + "just notify that a commercial has " + "been detected.")); return gc; } static GlobalSpinBox *DeferAutoTranscodeDays() { GlobalSpinBox *gs = new GlobalSpinBox("DeferAutoTranscodeDays", 0, 365, 1); - gs->setLabel(QObject::tr("Deferral days for auto transcode jobs")); - gs->setHelpText(QObject::tr("If non-zero, automatic transcode jobs will " - "be scheduled to run this many days after a recording " - "completes instead of immediately afterwards.")); + + gs->setLabel(GeneralSettings::tr("Deferral days for auto transcode jobs")); + + gs->setHelpText(GeneralSettings::tr("If non-zero, automatic transcode jobs " + "will be scheduled to run this many " + "days after a recording completes " + "instead of immediately afterwards.")); + gs->setValue(0); + return gs; } static GlobalCheckBox *AggressiveCommDetect() { GlobalCheckBox *bc = new GlobalCheckBox("AggressiveCommDetect"); - bc->setLabel(QObject::tr("Strict commercial detection")); + + bc->setLabel(GeneralSettings::tr("Strict commercial detection")); + bc->setValue(true); - bc->setHelpText(QObject::tr("Enable stricter commercial detection code. " - "Disable if some commercials are not being detected.")); + + bc->setHelpText(GeneralSettings::tr("Enable stricter commercial detection " + "code. Disable if some commercials are " + "not being detected.")); return bc; } static HostSpinBox *CommRewindAmount() { HostSpinBox *gs = new HostSpinBox("CommRewindAmount", 0, 10, 1); - gs->setLabel(QObject::tr("Commercial skip automatic rewind amount (secs)")); - gs->setHelpText(QObject::tr("MythTV will automatically rewind " - "this many seconds after performing a commercial skip.")); + + gs->setLabel(PlaybackSettings::tr("Commercial skip automatic rewind amount " + "(secs)")); + + gs->setHelpText(PlaybackSettings::tr("MythTV will automatically rewind " + "this many seconds after performing a " + "commercial skip.")); + gs->setValue(0); + return gs; } static HostSpinBox *CommNotifyAmount() { HostSpinBox *gs = new HostSpinBox("CommNotifyAmount", 0, 10, 1); - gs->setLabel(QObject::tr("Commercial skip notify amount (secs)")); - gs->setHelpText(QObject::tr("MythTV will act like a commercial " - "begins this many seconds early. This can be useful " - "when commercial notification is used in place of " - "automatic skipping.")); + + gs->setLabel(PlaybackSettings::tr("Commercial skip notify amount (secs)")); + + gs->setHelpText(PlaybackSettings::tr("MythTV will act like a commercial " + "begins this many seconds early. This " + "can be useful when commercial " + "notification is used in place of " + "automatic skipping.")); + gs->setValue(0); + return gs; } static GlobalSpinBox *MaximumCommercialSkip() { GlobalSpinBox *bs = new GlobalSpinBox("MaximumCommercialSkip", 0, 3600, 10); - bs->setLabel(QObject::tr("Maximum commercial skip (secs)")); - bs->setHelpText(QObject::tr("MythTV will discourage long manual commercial " - "skips. Skips which are longer than this will require the " - "user to hit the SKIP key twice. Automatic commercial " - "skipping is not affected by this limit.")); + + bs->setLabel(PlaybackSettings::tr("Maximum commercial skip (secs)")); + + bs->setHelpText(PlaybackSettings::tr("MythTV will discourage long manual " + "commercial skips. Skips which are " + "longer than this will require the " + "user to hit the SKIP key twice. " + "Automatic commercial skipping is " + "not affected by this limit.")); + bs->setValue(3600); + return bs; } static GlobalSpinBox *MergeShortCommBreaks() { GlobalSpinBox *bs = new GlobalSpinBox("MergeShortCommBreaks", 0, 3600, 5); - bs->setLabel(QObject::tr("Merge short commercial breaks (secs)")); - bs->setHelpText(QObject::tr("Treat consecutive commercial breaks shorter " - "than this as one break when skipping forward. Useful if " - "you have to skip a few times during breaks. Applies to " - "automatic skipping as well. Set to 0 to disable.")); + + bs->setLabel(PlaybackSettings::tr("Merge short commercial breaks (secs)")); + + bs->setHelpText(PlaybackSettings::tr("Treat consecutive commercial breaks " + "shorter than this as one break when " + "skipping forward. Useful if you have " + "to skip a few times during breaks. " + "Applies to automatic skipping as " + "well. Set to 0 to disable.")); + bs->setValue(0); + return bs; } static GlobalSpinBox *AutoExpireExtraSpace() { GlobalSpinBox *bs = new GlobalSpinBox("AutoExpireExtraSpace", 0, 200, 1); - bs->setLabel(QObject::tr("Extra disk space (GB)")); - bs->setHelpText(QObject::tr("Extra disk space (in gigabytes) beyond what " - "MythTV requires that you want to keep free on the " - "recording file systems.")); + + bs->setLabel(GeneralSettings::tr("Extra disk space (GB)")); + + bs->setHelpText(GeneralSettings::tr("Extra disk space (in gigabytes) " + "beyond what MythTV requires that " + "you want to keep free on the " + "recording file systems.")); + bs->setValue(1); + return bs; }; @@ -285,9 +370,12 @@ static GlobalSpinBox *AutoExpireExtraSpace() static GlobalCheckBox *AutoExpireInsteadOfDelete() { GlobalCheckBox *cb = new GlobalCheckBox("AutoExpireInsteadOfDelete"); - cb->setLabel(QObject::tr("Auto-Expire instead of delete recording")); + + cb->setLabel(DeletedExpireOptions::tr("Auto-Expire instead of delete recording")); + cb->setValue(false); - cb->setHelpText(QObject::tr("If enabled, move deleted recordings to the " + + cb->setHelpText(DeletedExpireOptions::tr("If enabled, move deleted recordings to the " "'Deleted' recgroup and turn on autoexpire " "instead of deleting immediately.")); return cb; @@ -297,15 +385,21 @@ static GlobalCheckBox *AutoExpireInsteadOfDelete() static GlobalSpinBox *DeletedMaxAge() { GlobalSpinBox *bs = new GlobalSpinBox("DeletedMaxAge", -1, 365, 1); - bs->setLabel(QObject::tr("Time to retain deleted recordings (days)")); - bs->setHelpText(QObject::tr("Determines the maximum number of days before " - "undeleting a recording will become impossible. " - "A value of zero means the recording will be " - "permanently deleted between 5 and 20 minutes " - "later. A value of minus one means recordings " - "will be retained until space is required. " - "A recording will always be removed before this " - "time if the space is needed for a new recording.")); + + bs->setLabel(GeneralSettings::tr("Time to retain deleted recordings " + "(days)")); + + bs->setHelpText(GeneralSettings::tr("Determines the maximum number of days " + "before undeleting a recording will " + "become impossible. A value of zero " + "means the recording will be " + "permanently deleted between 5 and 20 " + "minutes later. A value of minus one " + "means recordings will be retained " + "until space is required. A recording " + "will always be removed before this " + "time if the space is needed for a new " + "recording.")); bs->setValue(0); return bs; }; @@ -317,7 +411,7 @@ class DeletedExpireOptions : public TriggeredConfigurationGroup DeletedExpireOptions() : TriggeredConfigurationGroup(false, false, false, false) { - setLabel(QObject::tr("DeletedExpireOptions")); + setLabel(tr("DeletedExpireOptions")); Setting* enabled = AutoExpireInsteadOfDelete(); addChild(enabled); setTrigger(enabled); @@ -336,61 +430,81 @@ class DeletedExpireOptions : public TriggeredConfigurationGroup static GlobalComboBox *AutoExpireMethod() { GlobalComboBox *bc = new GlobalComboBox("AutoExpireMethod"); - bc->setLabel(QObject::tr("Auto-Expire method")); - bc->addSelection(QObject::tr("Oldest show first"), "1"); - bc->addSelection(QObject::tr("Lowest priority first"), "2"); - bc->addSelection(QObject::tr("Weighted time/priority combination"), "3"); - bc->setHelpText(QObject::tr("Method used to determine which recorded " - "shows to delete first. Live TV recordings will always " - "expire before normal recordings.")); + + bc->setLabel(GeneralSettings::tr("Auto-Expire method")); + + bc->addSelection(GeneralSettings::tr("Oldest show first"), "1"); + bc->addSelection(GeneralSettings::tr("Lowest priority first"), "2"); + bc->addSelection(GeneralSettings::tr("Weighted time/priority combination"), + "3"); + + bc->setHelpText(GeneralSettings::tr("Method used to determine which " + "recorded shows to delete first. " + "Live TV recordings will always " + "expire before normal recordings.")); bc->setValue(1); + return bc; } static GlobalCheckBox *AutoExpireWatchedPriority() { GlobalCheckBox *bc = new GlobalCheckBox("AutoExpireWatchedPriority"); - bc->setLabel(QObject::tr("Watched before unwatched")); + + bc->setLabel(GeneralSettings::tr("Watched before unwatched")); + bc->setValue(false); - bc->setHelpText(QObject::tr("If enabled, programs that have been marked as " - "watched will be expired before programs that have not " - "been watched.")); + + bc->setHelpText(GeneralSettings::tr("If enabled, programs that have been " + "marked as watched will be expired " + "before programs that have not " + "been watched.")); return bc; } static GlobalSpinBox *AutoExpireDayPriority() { GlobalSpinBox *bs = new GlobalSpinBox("AutoExpireDayPriority", 1, 400, 1); - bs->setLabel(QObject::tr("Priority weight")); - bs->setHelpText(QObject::tr("The number of days bonus a program gets for " - "each priority point. This is only used when the Weighted " - "time/priority Auto-Expire method is selected.")); + + bs->setLabel(GeneralSettings::tr("Priority weight")); + + bs->setHelpText(GeneralSettings::tr("The number of days bonus a program " + "gets for each priority point. This " + "is only used when the Weighted " + "time/priority Auto-Expire method " + "is selected.")); bs->setValue(3); + return bs; }; static GlobalSpinBox *AutoExpireLiveTVMaxAge() { GlobalSpinBox *bs = new GlobalSpinBox("AutoExpireLiveTVMaxAge", 1, 365, 1); - bs->setLabel(QObject::tr("Live TV max age (days)")); - bs->setHelpText(QObject::tr("Auto-Expire will force expiration of Live " - "TV recordings when they are this many days old. Live TV " - "recordings may also be expired early if necessary to " - "free up disk space.")); + + bs->setLabel(GeneralSettings::tr("Live TV max age (days)")); + + bs->setHelpText(GeneralSettings::tr("Auto-Expire will force expiration of " + "Live TV recordings when they are this " + "many days old. Live TV recordings may " + "also be expired early if necessary to " + "free up disk space.")); bs->setValue(1); + return bs; }; #if 0 +// Translations have been removed, please put back if reactivated... static GlobalSpinBox *MinRecordDiskThreshold() { GlobalSpinBox *bs = new GlobalSpinBox("MinRecordDiskThreshold", 0, 1000000, 100); - bs->setLabel(QObject::tr("New recording free disk space threshold " - "(MB)")); - bs->setHelpText(QObject::tr("MythTV will stop scheduling new recordings on " + bs->setLabel("New recording free disk space threshold " + "(MB)"); + bs->setHelpText("MythTV will stop scheduling new recordings on " "a backend when its free disk space (in megabytes) falls " - "below this value.")); + "below this value."); bs->setValue(300); return bs; } @@ -399,48 +513,67 @@ static GlobalSpinBox *MinRecordDiskThreshold() static GlobalCheckBox *RerecordWatched() { GlobalCheckBox *bc = new GlobalCheckBox("RerecordWatched"); - bc->setLabel(QObject::tr("Re-record watched")); + + bc->setLabel(GeneralSettings::tr("Re-record watched")); + bc->setValue(false); - bc->setHelpText(QObject::tr("If enabled, programs that have been marked as " - "watched and are Auto-Expired will be re-recorded if " - "they are shown again.")); + + bc->setHelpText(GeneralSettings::tr("If enabled, programs that have been " + "marked as watched and are " + "Auto-Expired will be re-recorded if " + "they are shown again.")); return bc; } static GlobalSpinBox *RecordPreRoll() { GlobalSpinBox *bs = new GlobalSpinBox("RecordPreRoll", 0, 600, 60, true); - bs->setLabel(QObject::tr("Time to record before start of show " - "(secs)")); - bs->setHelpText(QObject::tr("This global setting allows the recorder " - "to start before the scheduled start time. It does " - "not affect the scheduler. It is ignored when two shows " - "have been scheduled without enough time in between.")); + + bs->setLabel(GeneralSettings::tr("Time to record before start of show " + "(secs)")); + + bs->setHelpText(GeneralSettings::tr("This global setting allows the " + "recorder to start before the " + "scheduled start time. It does not " + "affect the scheduler. It is ignored " + "when two shows have been scheduled " + "without enough time in between.")); bs->setValue(0); + return bs; } static GlobalSpinBox *RecordOverTime() { GlobalSpinBox *bs = new GlobalSpinBox("RecordOverTime", 0, 1800, 60, true); - bs->setLabel(QObject::tr("Time to record past end of show (secs)")); + + bs->setLabel(GeneralSettings::tr("Time to record past end of show (secs)")); + bs->setValue(0); - bs->setHelpText(QObject::tr("This global setting allows the recorder " - "to record beyond the scheduled end time. It does " - "not affect the scheduler. It is ignored when two shows " - "have been scheduled without enough time in between.")); + + bs->setHelpText(GeneralSettings::tr("This global setting allows the " + "recorder to record beyond the " + "scheduled end time. It does not " + "affect the scheduler. It is ignored " + "when two shows have been scheduled " + "without enough time in between.")); return bs; } static GlobalComboBox *OverTimeCategory() { GlobalComboBox *gc = new GlobalComboBox("OverTimeCategory"); - gc->setLabel(QObject::tr("Category of shows to be extended")); - gc->setHelpText(QObject::tr("For a special category (e.g. " - "\"Sports event\"), request that shows be autoextended. " - "Only works if a show's category can be determined.")); + + gc->setLabel(GeneralSettings::tr("Category of shows to be extended")); + + gc->setHelpText(GeneralSettings::tr("For a special category (e.g. " + "\"Sports event\"), request that " + "shows be autoextended. Only works " + "if a show's category can be " + "determined.")); MSqlQuery query(MSqlQuery::InitCon()); + query.prepare("SELECT DISTINCT category FROM program GROUP BY category;"); gc->addSelection("", ""); @@ -461,12 +594,17 @@ static GlobalSpinBox *CategoryOverTime() { GlobalSpinBox *bs = new GlobalSpinBox("CategoryOverTime", 0, 180, 60, true); - bs->setLabel(QObject::tr("Record past end of show (mins)")); + + bs->setLabel(GeneralSettings::tr("Record past end of show (mins)")); + bs->setValue(30); - bs->setHelpText(QObject::tr("For the specified category, an attempt " - "will be made to extend the recording by the specified " - "number of minutes. It is ignored when two shows have " - "been scheduled without enough time in-between.")); + + bs->setHelpText(GeneralSettings::tr("For the specified category, an " + "attempt will be made to extend " + "the recording by the specified " + "number of minutes. It is ignored " + "when two shows have been scheduled " + "without enough time in-between.")); return bs; } @@ -475,10 +613,13 @@ static VerticalConfigurationGroup *CategoryOverTimeSettings() VerticalConfigurationGroup *vcg = new VerticalConfigurationGroup(false, false); - vcg->setLabel(QObject::tr("Category record over-time")); + vcg->setLabel(GeneralSettings::tr("Category record over-time")); + vcg->setUseLabel(true); + vcg->addChild(OverTimeCategory()); vcg->addChild(CategoryOverTime()); + return vcg; } @@ -505,7 +646,7 @@ static QString pad(const QString &str, int len) PlaybackProfileItemConfig::PlaybackProfileItemConfig(ProfileItem &_item) : item(_item) { - setLabel(QObject::tr("Profile Item")); + setLabel(tr("Profile Item")); HorizontalConfigurationGroup *row[2]; @@ -567,7 +708,7 @@ PlaybackProfileItemConfig::PlaybackProfileItemConfig(ProfileItem &_item) : "--enable-ffmpeg-pthreads to enable."))); filters->setHelpText( - QObject::tr("Example custom filter list: 'ivtc,denoise3d'")); + tr("Example custom filter list: 'ivtc,denoise3d'")); skiploop->setHelpText( tr("When unchecked the deblocking loopfilter will be disabled ") + "\n" + @@ -775,15 +916,15 @@ void PlaybackProfileItemConfig::orenderChanged(const QString &renderer) void PlaybackProfileItemConfig::deint0Changed(const QString &deint) { deint0->setHelpText( - QObject::tr("Main deinterlacing method.") + ' ' + - VideoDisplayProfile::GetDeinterlacerHelp(deint)); + tr("Main deinterlacing method. %1") + .arg(VideoDisplayProfile::GetDeinterlacerHelp(deint))); } void PlaybackProfileItemConfig::deint1Changed(const QString &deint) { deint1->setHelpText( - QObject::tr("Fallback deinterlacing method.") + ' ' + - VideoDisplayProfile::GetDeinterlacerHelp(deint)); + tr("Fallback deinterlacing method. %1") + .arg(VideoDisplayProfile::GetDeinterlacerHelp(deint))); } PlaybackProfileConfig::PlaybackProfileConfig(const QString &profilename) : @@ -808,10 +949,10 @@ void PlaybackProfileConfig::InitLabel(uint i) if (!labels[i]) return; - QString andStr = QObject::tr("&", "and"); + QString andStr = tr("&", "and"); QString cmp0 = items[i].Get("pref_cmp0"); QString cmp1 = items[i].Get("pref_cmp1"); - QString str = QObject::tr("if rez") + ' ' + cmp0; + QString str = tr("if rez") + ' ' + cmp0; if (!cmp1.isEmpty()) str += " " + andStr + ' ' + cmp1; @@ -864,8 +1005,8 @@ void PlaybackProfileConfig::InitUI(void) priority[i] = new TransSpinBoxSetting(1, items.size(), 1); priority[i]->setName(QString("pri%1").arg(i)); - editProf[i]->setLabel(QObject::tr("Edit")); - delProf[i]->setLabel(QObject::tr("Delete")); + editProf[i]->setLabel(QCoreApplication::translate("(Common)", "Edit")); + delProf[i]->setLabel(QCoreApplication::translate("(Common)", "Delete")); priority[i]->setValue(i + 1); items[i].Set("pref_priority", QString::number(i + 1)); @@ -887,7 +1028,7 @@ void PlaybackProfileConfig::InitUI(void) rows->addChild(column2); TransButtonSetting *addEntry = new TransButtonSetting("addentry"); - addEntry->setLabel(QObject::tr("Add New Entry")); + addEntry->setLabel(tr("Add New Entry")); main->addChild(rows); main->addChild(addEntry); @@ -1035,7 +1176,7 @@ PlaybackProfileConfigs::PlaybackProfileConfigs(const QString &str) : TriggeredConfigurationGroup(false, true, true, true, false, false, true, true), grouptrigger(NULL) { - setLabel(QObject::tr("Playback Profiles") + str); + setLabel(tr("Playback Profiles %1").arg(str)); QString host = gCoreContext->GetHostName(); QStringList profiles = VideoDisplayProfile::GetProfiles(host); @@ -1104,7 +1245,9 @@ PlaybackProfileConfigs::PlaybackProfileConfigs(const QString &str) : } grouptrigger = new HostComboBox("DefaultVideoPlaybackProfile"); - grouptrigger->setLabel(QObject::tr("Current Video Playback Profile")); + + grouptrigger->setLabel(tr("Current Video Playback Profile")); + QStringList::const_iterator it; for (it = profiles.begin(); it != profiles.end(); ++it) grouptrigger->addSelection(ProgramInfo::i18n(*it), *it); @@ -1114,8 +1257,8 @@ PlaybackProfileConfigs::PlaybackProfileConfigs(const QString &str) : TransButtonSetting *addProf = new TransButtonSetting("add"); TransButtonSetting *delProf = new TransButtonSetting("del"); - addProf->setLabel(QObject::tr("Add New")); - delProf->setLabel(QObject::tr("Delete")); + addProf->setLabel(tr("Add New")); + delProf->setLabel(QCoreApplication::translate("(Common)", "Delete")); grp->addChild(grouptrigger); grp->addChild(addProf); @@ -1153,7 +1296,7 @@ void PlaybackProfileConfigs::btnPress(QString cmd) bool ok = true; while (ok) { - QString msg = QObject::tr("Enter Playback Group Name"); + QString msg = tr("Enter Playback Group Name"); ok = MythPopupBox::showGetTextPopup( GetMythMainWindow(), msg, msg, name); @@ -1164,14 +1307,13 @@ void PlaybackProfileConfigs::btnPress(QString cmd) if (not_ok_list.contains(name) || name.isEmpty()) { msg = (name.isEmpty()) ? - QObject::tr( - "Sorry, playback group\nname cannot be blank.") : - QObject::tr( - "Sorry, playback group name\n" - "'%1' is already being used.").arg(name); + tr("Sorry, playback group\nname cannot be blank.") : + tr("Sorry, playback group name\n" + "'%1' is already being used.").arg(name); MythPopupBox::showOkPopup( - GetMythMainWindow(), QObject::tr("Error"), msg); + GetMythMainWindow(), QCoreApplication::translate("(Common)", + "Error"), msg); continue; } @@ -1208,19 +1350,24 @@ static HostComboBox *PlayBoxOrdering() { QString str[4] = { - QObject::tr("Sort all sub-titles/multi-titles Ascending"), - QObject::tr("Sort all sub-titles/multi-titles Descending"), - QObject::tr("Sort sub-titles Descending, multi-titles Ascending"), - QObject::tr("Sort sub-titles Ascending, multi-titles Descending"), + PlaybackSettings::tr("Sort all sub-titles/multi-titles Ascending"), + PlaybackSettings::tr("Sort all sub-titles/multi-titles Descending"), + PlaybackSettings::tr("Sort sub-titles Descending, multi-titles" + "Ascending"), + PlaybackSettings::tr("Sort sub-titles Ascending, multi-titles Descending"), }; - QString help = QObject::tr( - "Selects how to sort show episodes. Sub-titles refers to the " - "episodes listed under a specific show title. Multi-title " - "refers to sections (e.g. \"All Programs\") which list " - "multiple titles. Sections in parentheses are not affected."); + + QString help = PlaybackSettings::tr("Selects how to sort show episodes. " + "Sub-titles refers to the episodes " + "listed under a specific show title. " + "Multi-title refers to sections (e.g. " + "\"All Programs\") which list multiple " + "titles. Sections in parentheses are " + "not affected."); HostComboBox *gc = new HostComboBox("PlayBoxOrdering"); - gc->setLabel(QObject::tr("Episode sort orderings")); + + gc->setLabel(PlaybackSettings::tr("Episode sort orderings")); for (int i = 0; i < 4; ++i) gc->addSelection(str[i], QString::number(i)); @@ -1234,45 +1381,63 @@ static HostComboBox *PlayBoxOrdering() static HostComboBox *PlayBoxEpisodeSort() { HostComboBox *gc = new HostComboBox("PlayBoxEpisodeSort"); - gc->setLabel(QObject::tr("Sort episodes")); - gc->addSelection(QObject::tr("Record date"), "Date"); - gc->addSelection(QObject::tr("Season/Episode"), "Season"); - gc->addSelection(QObject::tr("Original air date"), "OrigAirDate"); - gc->addSelection(QObject::tr("Program ID"), "Id"); - gc->setHelpText(QObject::tr("Selects how to sort a show's episodes")); + + gc->setLabel(PlaybackSettings::tr("Sort episodes")); + + gc->addSelection(PlaybackSettings::tr("Record date"), "Date"); + gc->addSelection(PlaybackSettings::tr("Season/Episode"), "Season"); + gc->addSelection(PlaybackSettings::tr("Original air date"), "OrigAirDate"); + gc->addSelection(PlaybackSettings::tr("Program ID"), "Id"); + + gc->setHelpText(PlaybackSettings::tr("Selects how to sort a show's " + "episodes")); + return gc; } static HostSpinBox *FFRewReposTime() { HostSpinBox *gs = new HostSpinBox("FFRewReposTime", 0, 200, 5); - gs->setLabel(QObject::tr("Fast forward/rewind reposition amount")); + + gs->setLabel(PlaybackSettings::tr("Fast forward/rewind reposition amount")); + gs->setValue(100); - gs->setHelpText(QObject::tr("When exiting sticky keys fast forward/rewind " - "mode, reposition this many 1/100th seconds before " - "resuming normal playback. This " - "compensates for the reaction time between seeing " - "where to resume playback and actually exiting seeking.")); + + gs->setHelpText(PlaybackSettings::tr("When exiting sticky keys fast " + "forward/rewind mode, reposition " + "this many 1/100th seconds before " + "resuming normal playback. This " + "compensates for the reaction time " + "between seeing where to resume " + "playback and actually exiting " + "seeking.")); return gs; } static HostCheckBox *FFRewReverse() { HostCheckBox *gc = new HostCheckBox("FFRewReverse"); - gc->setLabel(QObject::tr("Reverse direction in fast forward/rewind")); + + gc->setLabel(PlaybackSettings::tr("Reverse direction in fast " + "forward/rewind")); + gc->setValue(true); - gc->setHelpText(QObject::tr("If enabled, pressing the sticky rewind key " - "in fast forward mode switches to rewind mode, and " - "vice versa. If disabled, it will decrease the " - "current speed or switch to play mode if " - "the speed can't be decreased further.")); + + gc->setHelpText(PlaybackSettings::tr("If enabled, pressing the sticky " + "rewind key in fast forward mode " + "switches to rewind mode, and " + "vice versa. If disabled, it will " + "decrease the current speed or " + "switch to play mode if the speed " + "can't be decreased further.")); return gc; } static HostComboBox *MenuTheme() { HostComboBox *gc = new HostComboBox("MenuTheme"); - gc->setLabel(QObject::tr("Menu theme")); + + gc->setLabel(AppearanceSettings::tr("Menu theme")); QList themelist = GetMythUI()->GetThemes(THEME_MENU); @@ -1293,13 +1458,19 @@ static HostComboBox MUNUSED *DecodeVBIFormat() int sel = (fmt == "pal ") ? 1 : ((fmt == "ntsc") ? 2 : 0); HostComboBox *gc = new HostComboBox("DecodeVBIFormat"); - gc->setLabel(QObject::tr("Decode VBI format")); - gc->addSelection(QObject::tr("None"), "none", 0 == sel); - gc->addSelection(QObject::tr("PAL teletext"), "pal_txt", 1 == sel); - gc->addSelection(QObject::tr("NTSC closed caption"), "ntsc_cc", 2 == sel); + + gc->setLabel(OSDSettings::tr("Decode VBI format")); + + gc->addSelection(OSDSettings::tr("None"), "none", + 0 == sel); + gc->addSelection(OSDSettings::tr("PAL teletext"), "pal_txt", + 1 == sel); + gc->addSelection(OSDSettings::tr("NTSC closed caption"), "ntsc_cc", + 2 == sel); + gc->setHelpText( - QObject::tr("If enabled, this overrides the mythtv-setup setting " - "used during recording when decoding captions.")); + OSDSettings::tr("If enabled, this overrides the mythtv-setup setting " + "used during recording when decoding captions.")); return gc; } @@ -1308,8 +1479,10 @@ static HostComboBox *SubtitleCodec() { HostComboBox *gc = new HostComboBox("SubtitleCodec"); - gc->setLabel(QObject::tr("Subtitle Codec")); + gc->setLabel(OSDSettings::tr("Subtitle Codec")); + QList list = QTextCodec::availableCodecs(); + for (uint i = 0; i < (uint) list.size(); ++i) { QString val = QString(list[i]); @@ -1322,336 +1495,454 @@ static HostComboBox *SubtitleCodec() static HostComboBox *ChannelOrdering() { HostComboBox *gc = new HostComboBox("ChannelOrdering"); - gc->setLabel(QObject::tr("Channel ordering")); - gc->addSelection(QObject::tr("channel number"), "channum"); - gc->addSelection(QObject::tr("callsign"), "callsign"); + + gc->setLabel(GeneralSettings::tr("Channel ordering")); + + gc->addSelection(GeneralSettings::tr("channel number"), "channum"); + gc->addSelection(GeneralSettings::tr("callsign"), "callsign"); + return gc; } static HostSpinBox *VertScanPercentage() { HostSpinBox *gs = new HostSpinBox("VertScanPercentage", -100, 100, 1); - gs->setLabel(QObject::tr("Vertical scaling")); + + gs->setLabel(PlaybackSettings::tr("Vertical scaling")); + gs->setValue(0); - gs->setHelpText(QObject::tr( - "Adjust this if the image does not fill your " - "screen vertically. Range -100% to 100%")); + + gs->setHelpText(PlaybackSettings::tr("Adjust this if the image does not " + "fill your screen vertically. Range " + "-100% to 100%")); return gs; } static HostSpinBox *HorizScanPercentage() { HostSpinBox *gs = new HostSpinBox("HorizScanPercentage", -100, 100, 1); - gs->setLabel(QObject::tr("Horizontal scaling")); + + gs->setLabel(PlaybackSettings::tr("Horizontal scaling")); + gs->setValue(0); - gs->setHelpText(QObject::tr( - "Adjust this if the image does not fill your " - "screen horizontally. Range -100% to 100%")); + + gs->setHelpText(PlaybackSettings::tr("Adjust this if the image does not " + "fill your screen horizontally. Range " + "-100% to 100%")); return gs; }; static HostSpinBox *XScanDisplacement() { HostSpinBox *gs = new HostSpinBox("XScanDisplacement", -50, 50, 1); - gs->setLabel(QObject::tr("Scan displacement (X)")); + + gs->setLabel(PlaybackSettings::tr("Scan displacement (X)")); + gs->setValue(0); - gs->setHelpText(QObject::tr("Adjust this to move the image horizontally.")); + + gs->setHelpText(PlaybackSettings::tr("Adjust this to move the image " + "horizontally.")); + return gs; } static HostSpinBox *YScanDisplacement() { HostSpinBox *gs = new HostSpinBox("YScanDisplacement", -50, 50, 1); - gs->setLabel(QObject::tr("Scan displacement (Y)")); + + gs->setLabel(PlaybackSettings::tr("Scan displacement (Y)")); + gs->setValue(0); - gs->setHelpText(QObject::tr("Adjust this to move the image vertically.")); + + gs->setHelpText(PlaybackSettings::tr("Adjust this to move the image " + "vertically.")); + return gs; }; static HostCheckBox *DefaultCCMode() { HostCheckBox *gc = new HostCheckBox("DefaultCCMode"); - gc->setLabel(QObject::tr("Always display closed captioning or subtitles")); + + gc->setLabel(OSDSettings::tr("Always display closed captioning or " + "subtitles")); + gc->setValue(false); - gc->setHelpText(QObject::tr( - "If enabled, captions will be displayed " - "when playing back recordings or watching " - "Live TV. Closed Captioning can be turned on or off " - "by pressing \"T\" during playback.")); + + gc->setHelpText(OSDSettings::tr("If enabled, captions will be displayed " + "when playing back recordings or watching " + "Live TV. Closed Captioning can be turned " + "on or off by pressing \"T\" during" + "playback.")); return gc; } static HostCheckBox *EnableMHEG() { HostCheckBox *gc = new HostCheckBox("EnableMHEG"); - gc->setLabel(QObject::tr("Enable interactive TV")); + + gc->setLabel(OSDSettings::tr("Enable interactive TV")); + gc->setValue(false); - gc->setHelpText(QObject::tr( - "If enabled, interactive TV applications (MHEG) will " - "be activated. This is used for teletext and logos for " - "radio and channels that are currently off-air.")); + + gc->setHelpText(OSDSettings::tr("If enabled, interactive TV applications " + "(MHEG) will be activated. This is used " + "for teletext and logos for radio and " + "channels that are currently off-air.")); return gc; } static HostCheckBox *PersistentBrowseMode() { HostCheckBox *gc = new HostCheckBox("PersistentBrowseMode"); - gc->setLabel(QObject::tr("Always use browse mode in Live TV")); + + gc->setLabel(OSDSettings::tr("Always use browse mode in Live TV")); + gc->setValue(true); - gc->setHelpText( - QObject::tr( - "If enabled, browse mode will automatically be activated " - "whenever you use channel up/down while watching Live TV.")); + + gc->setHelpText(OSDSettings::tr("If enabled, browse mode will " + "automatically be activated whenever " + "you use channel up/down while watching " + "Live TV.")); return gc; } static HostCheckBox *BrowseAllTuners() { HostCheckBox *gc = new HostCheckBox("BrowseAllTuners"); - gc->setLabel(QObject::tr("Browse all channels")); + + gc->setLabel(OSDSettings::tr("Browse all channels")); + gc->setValue(false); - gc->setHelpText( - QObject::tr( - "If enabled, browse mode will show channels on all " - "available recording devices, instead of showing " - "channels on just the current recorder.")); + + gc->setHelpText(OSDSettings::tr("If enabled, browse mode will show " + "channels on all available recording " + "devices, instead of showing channels " + "on just the current recorder.")); return gc; } static HostCheckBox *ClearSavedPosition() { HostCheckBox *gc = new HostCheckBox("ClearSavedPosition"); - gc->setLabel(QObject::tr("Clear bookmark on playback")); + + gc->setLabel(PlaybackSettings::tr("Clear bookmark on playback")); + gc->setValue(true); - gc->setHelpText(QObject::tr("If enabled, automatically clear the " - "bookmark on a recording when the recording is played " - "back. If disabled, you can mark the beginning with " - "rewind then save position.")); + + gc->setHelpText(PlaybackSettings::tr("If enabled, automatically clear the " + "bookmark on a recording when the " + "recording is played back. If " + "disabled, you can mark the " + "beginning with rewind then save " + "position.")); return gc; } static HostCheckBox *AltClearSavedPosition() { HostCheckBox *gc = new HostCheckBox("AltClearSavedPosition"); - gc->setLabel(QObject::tr("Alternate clear and save bookmark")); + + gc->setLabel(PlaybackSettings::tr("Alternate clear and save bookmark")); + gc->setValue(true); - gc->setHelpText(QObject::tr("During playback the SELECT key " - "(Enter or Space) will alternate between \"Bookmark " - "Saved\" and \"Bookmark Cleared\". If disabled, the " - "SELECT key will save the current position for each " - "keypress.")); + + gc->setHelpText(PlaybackSettings::tr("During playback the SELECT key " + "(Enter or Space) will alternate " + "between \"Bookmark Saved\" and " + "\"Bookmark Cleared\". If disabled, " + "the SELECT key will save the current " + "position for each keypress.")); return gc; } static HostComboBox *PlaybackExitPrompt() { HostComboBox *gc = new HostComboBox("PlaybackExitPrompt"); - gc->setLabel(QObject::tr("Action on playback exit")); - gc->addSelection(QObject::tr("Just exit"), "0"); - gc->addSelection(QObject::tr("Save position and exit"), "2"); - gc->addSelection(QObject::tr("Always prompt (excluding Live TV)"), "1"); - gc->addSelection(QObject::tr("Always prompt (including Live TV)"), "4"); - gc->addSelection(QObject::tr("Prompt for Live TV only"), "8"); - gc->setHelpText(QObject::tr("If set to prompt, a menu will be displayed " - "when you exit playback mode. The options available will " - "allow you to save your position, delete the " - "recording, or continue watching.")); + + gc->setLabel(PlaybackSettings::tr("Action on playback exit")); + + gc->addSelection(PlaybackSettings::tr("Just exit"), "0"); + gc->addSelection(PlaybackSettings::tr("Save position and exit"), "2"); + gc->addSelection(PlaybackSettings::tr("Always prompt (excluding Live TV)"), + "1"); + gc->addSelection(PlaybackSettings::tr("Always prompt (including Live TV)"), + "4"); + gc->addSelection(PlaybackSettings::tr("Prompt for Live TV only"), "8"); + + gc->setHelpText(PlaybackSettings::tr("If set to prompt, a menu will be " + "displayed when you exit playback " + "mode. The options available will " + "allow you to save your position, " + "delete the recording, or continue " + "watching.")); return gc; } static HostCheckBox *EndOfRecordingExitPrompt() { HostCheckBox *gc = new HostCheckBox("EndOfRecordingExitPrompt"); - gc->setLabel(QObject::tr("Prompt at end of recording")); + + gc->setLabel(PlaybackSettings::tr("Prompt at end of recording")); + gc->setValue(false); - gc->setHelpText(QObject::tr("If enabled, a menu will be displayed allowing " - "you to delete the recording when it has finished " - "playing.")); + + gc->setHelpText(PlaybackSettings::tr("If enabled, a menu will be displayed " + "allowing you to delete the recording " + "when it has finished playing.")); return gc; } static HostCheckBox *JumpToProgramOSD() { HostCheckBox *gc = new HostCheckBox("JumpToProgramOSD"); - gc->setLabel(QObject::tr("Jump to program OSD")); + + gc->setLabel(PlaybackSettings::tr("Jump to program OSD")); + gc->setValue(true); - gc->setHelpText(QObject::tr( - "Set the choice between viewing the current " - "recording group in the OSD, or showing the " - "'Watch Recording' screen when 'Jump to Program' " - "is activated. If enabled, the recordings are shown " - "in the OSD")); + + gc->setHelpText(PlaybackSettings::tr("Set the choice between viewing the " + "current recording group in the OSD, " + "or showing the 'Watch Recording' " + "screen when 'Jump to Program' is " + "activated. If enabled, the " + "recordings are shown in the OSD")); return gc; } static HostCheckBox *ContinueEmbeddedTVPlay() { HostCheckBox *gc = new HostCheckBox("ContinueEmbeddedTVPlay"); - gc->setLabel(QObject::tr("Continue playback when embedded")); + + gc->setLabel(PlaybackSettings::tr("Continue playback when embedded")); + gc->setValue(false); - gc->setHelpText(QObject::tr( - "If enabled, TV playback continues when the TV window " - "is embedded in the upcoming program list or recorded " - "list. The default is to pause the recorded show when " - "embedded.")); + + gc->setHelpText(PlaybackSettings::tr("If enabled, TV playback continues " + "when the TV window is embedded in " + "the upcoming program list or " + "recorded list. The default is to " + "pause the recorded show when " + "embedded.")); return gc; } static HostCheckBox *AutomaticSetWatched() { HostCheckBox *gc = new HostCheckBox("AutomaticSetWatched"); - gc->setLabel(QObject::tr("Automatically mark a recording as watched")); + + gc->setLabel(PlaybackSettings::tr("Automatically mark a recording as " + "watched")); + gc->setValue(false); - gc->setHelpText(QObject::tr("If enabled, when you exit near the end of a " - "recording it will be marked as watched. The automatic " - "detection is not foolproof, so do not enable this " - "setting if you don't want an unwatched recording marked " - "as watched.")); + + gc->setHelpText(PlaybackSettings::tr("If enabled, when you exit near the " + "end of a recording it will be marked " + "as watched. The automatic detection " + "is not foolproof, so do not enable " + "this setting if you don't want an " + "unwatched recording marked as " + "watched.")); return gc; } static HostSpinBox *LiveTVIdleTimeout() { HostSpinBox *gs = new HostSpinBox("LiveTVIdleTimeout", 0, 3600, 1); - gs->setLabel(QObject::tr("Live TV idle timeout (mins)")); + + gs->setLabel(PlaybackSettings::tr("Live TV idle timeout (mins)")); + gs->setValue(0); - gs->setHelpText(QObject::tr( - "Exit Live TV automatically if left idle for the " - "specified number of minutes. " - "0 disables the timeout.")); + + gs->setHelpText(PlaybackSettings::tr("Exit Live TV automatically if left " + "idle for the specified number of " + "minutes. 0 disables the timeout.")); return gs; } // static HostCheckBox *PlaybackPreview() // { // HostCheckBox *gc = new HostCheckBox("PlaybackPreview"); -// gc->setLabel(QObject::tr("Display live preview of recordings")); +// +// gc->setLabel(PlaybackSettings::tr("Display live preview of recordings")); +// // gc->setValue(true); -// gc->setHelpText(QObject::tr("If enabled, a preview of the recording " +// +// gc->setHelpText(PlaybackSettings::tr("If enabled, a preview of the recording " // "will play in a small window on the \"Watch a " // "Recording\" menu.")); +// // return gc; // } // // static HostCheckBox *HWAccelPlaybackPreview() // { // HostCheckBox *gc = new HostCheckBox("HWAccelPlaybackPreview"); -// gc->setLabel(QObject::tr("Use HW Acceleration for live recording preview")); +// +// gc->setLabel(PlaybackSettings::tr("Use HW Acceleration for live recording preview")); +// // gc->setValue(false); +// // gc->setHelpText( -// QObject::tr( +// PlaybackSettings::tr( // "If enabled, live recording preview will use hardware " // "acceleration. The video renderer used is determined by the " // "selected CPU profile. Disable if playback is sluggish or " // "causes high CPU load")); +// // return gc; // } static HostCheckBox *UseVirtualKeyboard() { HostCheckBox *gc = new HostCheckBox("UseVirtualKeyboard"); - gc->setLabel(QObject::tr("Use line edit virtual keyboards")); + + gc->setLabel(MainGeneralSettings::tr("Use line edit virtual keyboards")); + gc->setValue(true); - gc->setHelpText(QObject::tr("If enabled, you can use a virtual keyboard " - "in MythTV's line edit boxes. To use, hit SELECT (Enter " - "or Space) while a line edit is in focus.")); + + gc->setHelpText(MainGeneralSettings::tr("If enabled, you can use a virtual " + "keyboard in MythTV's line edit " + "boxes. To use, hit SELECT (Enter " + "or Space) while a line edit is in " + "focus.")); return gc; } static HostSpinBox *FrontendIdleTimeout() { HostSpinBox *gs = new HostSpinBox("FrontendIdleTimeout", 0, 360, 15); - gs->setLabel(QObject::tr("Idle time before entering standby mode (minutes)")); + + gs->setLabel(MainGeneralSettings::tr("Idle time before entering standby " + "mode (minutes)")); + gs->setValue(90); - gs->setHelpText(QObject::tr("Number of minutes to wait when the frontend " - "is idle before entering standby mode. Standby " - "mode allows the backend to power down if " - "configured to do so. Any remote or mouse input " - "will cause the countdown to start again and/or " - "exit idle mode. Video playback suspends the " - "countdown. A value of zero prevents the " - "frontend automatically entering standby.")); + + gs->setHelpText(MainGeneralSettings::tr("Number of minutes to wait when " + "the frontend is idle before " + "entering standby mode. Standby " + "mode allows the backend to power " + "down if configured to do so. Any " + "remote or mouse input will cause " + "the countdown to start again " + "and/or exit idle mode. Video " + "playback suspends the countdown. " + "A value of zero prevents the " + "frontend automatically entering " + "standby.")); return gs; } static HostComboBox *OverrideExitMenu() { HostComboBox *gc = new HostComboBox("OverrideExitMenu"); - gc->setLabel(QObject::tr("Customize exit menu options")); - gc->addSelection(QObject::tr("Default"), "0"); - gc->addSelection(QObject::tr("Show quit"), "1"); - gc->addSelection(QObject::tr("Show quit and shutdown"), "2"); - gc->addSelection(QObject::tr("Show quit, reboot and shutdown"), "3"); - gc->addSelection(QObject::tr("Show shutdown"), "4"); - gc->addSelection(QObject::tr("Show reboot"), "5"); - gc->addSelection(QObject::tr("Show reboot and shutdown"), "6"); - gc->setHelpText(QObject::tr("By default, only remote frontends are shown " - "the shutdown option on the exit menu. Here you can force " - "specific shutdown and reboot options to be displayed.")); + + gc->setLabel(MainGeneralSettings::tr("Customize exit menu options")); + + gc->addSelection(MainGeneralSettings::tr("Default"), "0"); + gc->addSelection(MainGeneralSettings::tr("Show quit"), "1"); + gc->addSelection(MainGeneralSettings::tr("Show quit and shutdown"), "2"); + gc->addSelection(MainGeneralSettings::tr("Show quit, reboot and shutdown"), + "3"); + gc->addSelection(MainGeneralSettings::tr("Show shutdown"), "4"); + gc->addSelection(MainGeneralSettings::tr("Show reboot"), "5"); + gc->addSelection(MainGeneralSettings::tr("Show reboot and shutdown"), "6"); + + gc->setHelpText( + MainGeneralSettings::tr("By default, only remote frontends are shown " + "the shutdown option on the exit menu. Here " + "you can force specific shutdown and reboot " + "options to be displayed.")); return gc; } static HostLineEdit *RebootCommand() { HostLineEdit *ge = new HostLineEdit("RebootCommand"); - ge->setLabel(QObject::tr("Reboot command")); + + ge->setLabel(MainGeneralSettings::tr("Reboot command")); + ge->setValue(""); - ge->setHelpText(QObject::tr("Optional. Script to run if you select " - "the reboot option from the exit menu, if the option " - "is displayed. You must configure an exit key to " - "display the exit menu.")); + + ge->setHelpText(MainGeneralSettings::tr("Optional. Script to run if you " + "select the reboot option from the " + "exit menu, if the option is " + "displayed. You must configure an " + "exit key to display the exit " + "menu.")); return ge; } static HostLineEdit *HaltCommand() { HostLineEdit *ge = new HostLineEdit("HaltCommand"); - ge->setLabel(QObject::tr("Halt command")); + + ge->setLabel(MainGeneralSettings::tr("Halt command")); + ge->setValue(""); - ge->setHelpText(QObject::tr("Optional. Script to run if you select " - "the shutdown option from the exit menu, if the option " - "is displayed. You must configure an exit key to " - "display the exit menu.")); + + ge->setHelpText(MainGeneralSettings::tr("Optional. Script to run if you " + "select the shutdown option from " + "the exit menu, if the option is " + "displayed. You must configure an " + "exit key to display the exit " + "menu.")); return ge; } static HostLineEdit *LircDaemonDevice() { HostLineEdit *ge = new HostLineEdit("LircSocket"); - ge->setLabel(QObject::tr("LIRC daemon socket")); + + ge->setLabel(MainGeneralSettings::tr("LIRC daemon socket")); /* lircd socket moved from /dev/ to /var/run/lirc/ in lirc 0.8.6 */ QString lirc_socket = "/dev/lircd"; + if (!QFile::exists(lirc_socket)) lirc_socket = "/var/run/lirc/lircd"; + ge->setValue(lirc_socket); - QString help = QObject::tr( - "UNIX socket or IP address[:port] to connect in " - "order to communicate with the LIRC Daemon."); + + QString help = MainGeneralSettings::tr("UNIX socket or IP address[:port] " + "to connect in order to communicate " + "with the LIRC Daemon."); ge->setHelpText(help); + return ge; } static HostLineEdit *ScreenShotPath() { HostLineEdit *ge = new HostLineEdit("ScreenShotPath"); - ge->setLabel(QObject::tr("Screen shot path")); + + ge->setLabel(MainGeneralSettings::tr("Screen shot path")); + ge->setValue("/tmp/"); - ge->setHelpText(QObject::tr("Path to screenshot storage location. Should be writable by the frontend")); + + ge->setHelpText(MainGeneralSettings::tr("Path to screenshot storage " + "location. Should be writable " + "by the frontend")); + return ge; } static HostLineEdit *SetupPinCode() { HostLineEdit *ge = new HostLineEdit("SetupPinCode"); - ge->setLabel(QObject::tr("Setup PIN code")); - ge->setHelpText(QObject::tr("This PIN is used to control access to the " - "setup menus. If you want to use this feature, then " - "setting the value to all numbers will make your life " - "much easier. Set it to blank to disable." - "If enabled, you will not be able to return " - "to this screen and reset the Setup PIN without first " - "entering the current PIN.")); + + ge->setLabel(MainGeneralSettings::tr("Setup PIN code")); + + ge->setHelpText(MainGeneralSettings::tr("This PIN is used to control " + "access to the setup menus. " + "If you want to use this feature, " + "then setting the value to all " + "numbers will make your life much " + "easier. Set it to blank to " + "disable. If enabled, you will not " + "be able to return to this screen " + "and reset the Setup PIN without " + "first entering the current PIN.")); return ge; } @@ -1659,13 +1950,18 @@ static HostComboBox *XineramaScreen() { HostComboBox *gc = new HostComboBox("XineramaScreen", false); int num = MythDisplay::GetNumberXineramaScreens(); + for (int i=0; iaddSelection(QString::number(i), QString::number(i)); - gc->addSelection(QObject::tr("All"), QString::number(-1)); - gc->setLabel(QObject::tr("Display on screen")); + + gc->addSelection(AppearanceSettings::tr("All"), QString::number(-1)); + + gc->setLabel(AppearanceSettings::tr("Display on screen")); + gc->setValue(0); - gc->setHelpText(QObject::tr("Run on the specified screen or " - "spanning all screens.")); + + gc->setHelpText(AppearanceSettings::tr("Run on the specified screen or " + "spanning all screens.")); return gc; } @@ -1673,57 +1969,69 @@ static HostComboBox *XineramaScreen() static HostComboBox *XineramaMonitorAspectRatio() { HostComboBox *gc = new HostComboBox("XineramaMonitorAspectRatio"); - gc->setLabel(QObject::tr("Monitor aspect ratio")); - gc->addSelection(QObject::tr("16:9"), "1.7777"); - gc->addSelection(QObject::tr("16:10"), "1.6"); - gc->addSelection(QObject::tr("4:3"), "1.3333"); - gc->setHelpText(QObject::tr( - "The aspect ratio of a Xinerama display cannot be " - "queried from the display, so it must be specified.")); + + gc->setLabel(AppearanceSettings::tr("Monitor aspect ratio")); + + gc->addSelection(AppearanceSettings::tr("16:9"), "1.7777"); + gc->addSelection(AppearanceSettings::tr("16:10"), "1.6"); + gc->addSelection(AppearanceSettings::tr("4:3"), "1.3333"); + + gc->setHelpText(AppearanceSettings::tr("The aspect ratio of a Xinerama " + "display cannot be queried from " + "the display, so it must be " + "specified.")); return gc; } static HostComboBox *LetterboxingColour() { HostComboBox *gc = new HostComboBox("LetterboxColour"); - gc->setLabel(QObject::tr("Letterboxing color")); + + gc->setLabel(PlaybackSettings::tr("Letterboxing color")); + for (int m = kLetterBoxColour_Black; m < kLetterBoxColour_END; ++m) gc->addSelection(toString((LetterBoxColour)m), QString::number(m)); - gc->setHelpText( - QObject::tr( - "By default MythTV uses black letterboxing to match broadcaster " - "letterboxing, but those with plasma screens may prefer gray " - "to minimize burn-in.") + " " + - QObject::tr("Currently only works with XVideo video renderer.")); + + gc->setHelpText(PlaybackSettings::tr("By default MythTV uses black " + "letterboxing to match broadcaster " + "letterboxing, but those with plasma " + "screens may prefer gray to minimize " + "burn-in. Currently only works with " + "XVideo video renderer.")); return gc; } static HostComboBox *AspectOverride() { HostComboBox *gc = new HostComboBox("AspectOverride"); - gc->setLabel(QObject::tr("Video aspect override")); + + gc->setLabel(PlaybackSettings::tr("Video aspect override")); + for (int m = kAspect_Off; m < kAspect_END; ++m) gc->addSelection(toString((AspectOverrideMode)m), QString::number(m)); - gc->setHelpText(QObject::tr( - "When enabled, these will override the aspect " - "ratio specified by any broadcaster for all " - "video streams.")); + + gc->setHelpText(PlaybackSettings::tr("When enabled, these will override " + "the aspect ratio specified by any " + "broadcaster for all video streams.")); return gc; } static HostComboBox *AdjustFill() { HostComboBox *gc = new HostComboBox("AdjustFill"); - gc->setLabel(QObject::tr("Zoom")); + + gc->setLabel(PlaybackSettings::tr("Zoom")); + for (int m = kAdjustFill_Off; m < kAdjustFill_END; ++m) gc->addSelection(toString((AdjustFillMode)m), QString::number(m)); gc->addSelection(toString(kAdjustFill_AutoDetect_DefaultOff), QString::number(kAdjustFill_AutoDetect_DefaultOff)); gc->addSelection(toString(kAdjustFill_AutoDetect_DefaultHalf), QString::number(kAdjustFill_AutoDetect_DefaultHalf)); - gc->setHelpText(QObject::tr( - "When enabled, these will apply a predefined " - "zoom to all video playback in MythTV.")); + + gc->setHelpText(PlaybackSettings::tr("When enabled, these will apply a " + "predefined zoom to all video " + "playback in MythTV.")); return gc; } @@ -1732,42 +2040,59 @@ static HostComboBox *AdjustFill() static HostSpinBox *GuiWidth() { HostSpinBox *gs = new HostSpinBox("GuiWidth", 0, 1920, 8, true); - gs->setLabel(QObject::tr("GUI width (pixels)")); + + gs->setLabel(AppearanceSettings::tr("GUI width (pixels)")); + gs->setValue(0); - gs->setHelpText(QObject::tr("The width of the GUI. Do not make the GUI " - "wider than your actual screen resolution. Set to 0 to " - "automatically scale to fullscreen.")); + + gs->setHelpText(AppearanceSettings::tr("The width of the GUI. Do not make " + "the GUI wider than your actual " + "screen resolution. Set to 0 to " + "automatically scale to " + "fullscreen.")); return gs; } static HostSpinBox *GuiHeight() { HostSpinBox *gs = new HostSpinBox("GuiHeight", 0, 1600, 8, true); - gs->setLabel(QObject::tr("GUI height (pixels)")); + + gs->setLabel(AppearanceSettings::tr("GUI height (pixels)")); + gs->setValue(0); - gs->setHelpText(QObject::tr("The height of the GUI. Do not make the GUI " - "taller than your actual screen resolution. Set to 0 to " - "automatically scale to fullscreen.")); + + gs->setHelpText(AppearanceSettings::tr("The height of the GUI. Do not make " + "the GUI taller than your actual " + "screen resolution. Set to 0 to " + "automatically scale to " + "fullscreen.")); return gs; } static HostSpinBox *GuiOffsetX() { HostSpinBox *gs = new HostSpinBox("GuiOffsetX", -3840, 3840, 32, true); - gs->setLabel(QObject::tr("GUI X offset")); + + gs->setLabel(AppearanceSettings::tr("GUI X offset")); + gs->setValue(0); - gs->setHelpText(QObject::tr("The horizontal offset where the GUI will be " - "displayed. May only work if run in a window.")); + + gs->setHelpText(AppearanceSettings::tr("The horizontal offset where the " + "GUI will be displayed. May only " + "work if run in a window.")); return gs; } static HostSpinBox *GuiOffsetY() { HostSpinBox *gs = new HostSpinBox("GuiOffsetY", -1600, 1600, 8, true); - gs->setLabel(QObject::tr("GUI Y offset")); + + gs->setLabel(AppearanceSettings::tr("GUI Y offset")); + gs->setValue(0); - gs->setHelpText(QObject::tr("The vertical offset where the GUI will be " - "displayed.")); + + gs->setHelpText(AppearanceSettings::tr("The vertical offset where the " + "GUI will be displayed.")); return gs; } @@ -1775,22 +2100,30 @@ static HostSpinBox *GuiOffsetY() static HostSpinBox *DisplaySizeWidth() { HostSpinBox *gs = new HostSpinBox("DisplaySizeWidth", 0, 10000, 1); - gs->setLabel(QObject::tr("Display size - width")); + + gs->setLabel(AppearanceSettings::tr("Display size - width")); + gs->setValue(0); - gs->setHelpText(QObject::tr("Horizontal size of the monitor or TV. Used " + + gs->setHelpText(AppearanceSettings::tr("Horizontal size of the monitor or TV. Used " "to calculate the actual aspect ratio of the display. This " "will override the DisplaySize from the system.")); + return gs; } static HostSpinBox *DisplaySizeHeight() { HostSpinBox *gs = new HostSpinBox("DisplaySizeHeight", 0, 10000, 1); - gs->setLabel(QObject::tr("Display size - height")); + + gs->setLabel(AppearanceSettings::tr("Display size - height")); + gs->setValue(0); - gs->setHelpText(QObject::tr("Vertical size of the monitor or TV. Used " + + gs->setHelpText(AppearanceSettings::tr("Vertical size of the monitor or TV. Used " "to calculate the actual aspect ratio of the display. This " "will override the DisplaySize from the system.")); + return gs; } #endif @@ -1798,10 +2131,13 @@ static HostSpinBox *DisplaySizeHeight() static HostCheckBox *GuiSizeForTV() { HostCheckBox *gc = new HostCheckBox("GuiSizeForTV"); - gc->setLabel(QObject::tr("Use GUI size for TV playback")); + + gc->setLabel(AppearanceSettings::tr("Use GUI size for TV playback")); + gc->setValue(true); - gc->setHelpText(QObject::tr("If enabled, use the above size for TV, " - "otherwise use full screen.")); + + gc->setHelpText(AppearanceSettings::tr("If enabled, use the above size for " + "TV, otherwise use full screen.")); return gc; } @@ -1809,10 +2145,14 @@ static HostCheckBox *GuiSizeForTV() static HostCheckBox *UseVideoModes() { HostCheckBox *gc = new HostCheckBox("UseVideoModes"); - gc->setLabel(QObject::tr("Separate video modes for GUI and TV playback")); + + gc->setLabel(VideoModeSettings::tr("Separate video modes for GUI and " + "TV playback")); + gc->setValue(false); - gc->setHelpText(QObject::tr("Switch X Window video modes for TV. " - "Requires \"xrandr\" support.")); + + gc->setHelpText(VideoModeSettings::tr("Switch X Window video modes for TV. " + "Requires \"xrandr\" support.")); return gc; } @@ -1820,11 +2160,17 @@ static HostSpinBox *VidModeWidth(int idx) { HostSpinBox *gs = new HostSpinBox(QString("VidModeWidth%1").arg(idx), 0, 1920, 16, true); - gs->setLabel((idx<1) ? QObject::tr("In X"): ""); + + gs->setLabel((idx<1) ? VideoModeSettings::tr("In X", "Video mode width") + : ""); + gs->setLabelAboveWidget(idx<1); + gs->setValue(0); - gs->setHelpText(QObject::tr("Horizontal resolution of video " - "which needs a special output resolution.")); + + gs->setHelpText(VideoModeSettings::tr("Horizontal resolution of video " + "which needs a special output " + "resolution.")); return gs; } @@ -1832,21 +2178,30 @@ static HostSpinBox *VidModeHeight(int idx) { HostSpinBox *gs = new HostSpinBox(QString("VidModeHeight%1").arg(idx), 0, 1080, 16, true); - gs->setLabel((idx<1) ? QObject::tr("In Y"): ""); + + gs->setLabel((idx<1) ? VideoModeSettings::tr("In Y", "Video mode height") + : ""); + gs->setLabelAboveWidget(idx<1); + gs->setValue(0); - gs->setHelpText(QObject::tr("Vertical resolution of video " - "which needs a special output resolution.")); + + gs->setHelpText(VideoModeSettings::tr("Vertical resolution of video " + "which needs a special output " + "resolution.")); return gs; } static HostComboBox *GuiVidModeResolution() { HostComboBox *gc = new HostComboBox("GuiVidModeResolution"); - gc->setLabel(QObject::tr("GUI")); + + gc->setLabel(VideoModeSettings::tr("GUI")); + gc->setLabelAboveWidget(true); - gc->setHelpText(QObject::tr("Resolution of screen " - "when not watching a video.")); + + gc->setHelpText(VideoModeSettings::tr("Resolution of screen when not " + "watching a video.")); const vector scr = GetVideoModes(); for (uint i=0; isetLabel(lstr); + gc->setLabelAboveWidget(idx<1); gc->setHelpText(hstr); const vector scr = GetVideoModes(); + for (uint i=0; iaddSelection(sel, sel); } + return gc; } static HostRefreshRateComboBox *TVVidModeRefreshRate(int idx=-1) { - QString dhelp = QObject::tr("Default refresh rate " - "when watching a video. " - "Leave at \"Auto\" to automatically use the best available"); - QString ohelp = QObject::tr("Refresh rate when watching a " - "video at a specific resolution. " - "Leave at \"Auto\" to automatically use the best available"); + QString dhelp = VideoModeSettings::tr("Default refresh rate when watching " + "a video. Leave at \"Auto\" to " + "automatically use the best " + "available"); + QString ohelp = VideoModeSettings::tr("Refresh rate when watching a " + "video at a specific resolution. " + "Leave at \"Auto\" to automatically " + "use the best available"); + QString qstr = (idx<0) ? "TVVidModeRefreshRate" : QString("TVVidModeRefreshRate%1").arg(idx); HostRefreshRateComboBox *gc = new HostRefreshRateComboBox(qstr); - QString lstr = (idx<1) ? QObject::tr("Rate") : ""; + QString lstr = (idx<1) ? VideoModeSettings::tr("Rate") : ""; QString hstr = (idx<0) ? dhelp : ohelp; gc->setLabel(lstr); @@ -1923,87 +2284,108 @@ static HostRefreshRateComboBox *TVVidModeRefreshRate(int idx=-1) static HostComboBox *TVVidModeForceAspect(int idx=-1) { - QString dhelp = QObject::tr("Aspect ratio when watching a video."); - QString ohelp = QObject::tr("Aspect ratio when watching a " - "video at a specific resolution."); + QString dhelp = VideoModeSettings::tr("Aspect ratio when watching a " + "video. Leave at \"%1\" to " + "use ratio reported by the monitor. " + "Set to 16:9 or 4:3 to force a " + "specific aspect ratio."); + + + + QString ohelp = VideoModeSettings::tr("Aspect ratio when watching a " + "video at a specific resolution. " + "Leave at \"%1\" to use ratio " + "reported by the monitor. Set to " + "16:9 or 4:3 to force a specific " + "aspect ratio."); QString qstr = (idx<0) ? "TVVidModeForceAspect" : QString("TVVidModeForceAspect%1").arg(idx); + HostComboBox *gc = new HostComboBox(qstr); - gc->setLabel( (idx<1) ? QObject::tr("Aspect") : "" ); + + gc->setLabel( (idx<1) ? VideoModeSettings::tr("Aspect") : "" ); + gc->setLabelAboveWidget(idx<1); QString hstr = (idx<0) ? dhelp : ohelp; - gc->setHelpText(hstr+" "+ - QObject::tr("Leave at \"Default\" to use ratio reported by " - "the monitor. Set to 16:9 or 4:3 to " - "force a specific aspect ratio.")); - gc->addSelection(QObject::tr("Default"), "0.0"); + + gc->setHelpText(hstr.arg(VideoModeSettings::tr("Default"))); + + gc->addSelection(VideoModeSettings::tr("Default"), "0.0"); gc->addSelection("16:9", "1.77777777777"); gc->addSelection("4:3", "1.33333333333"); + return gc; } -class VideoModeSettings : public TriggeredConfigurationGroup +VideoModeSettings::VideoModeSettings() : + TriggeredConfigurationGroup(false, true, false, false) { - public: - VideoModeSettings() : - TriggeredConfigurationGroup(false, true, false, false) + setLabel(tr("Video Mode Settings")); + setUseLabel(false); + + Setting *videomode = UseVideoModes(); + addChild(videomode); + setTrigger(videomode); + + ConfigurationGroup* defaultsettings = + new HorizontalConfigurationGroup(false, false); + + HostComboBox *res = TVVidModeResolution(); + HostRefreshRateComboBox *rate = TVVidModeRefreshRate(); + + defaultsettings->addChild(GuiVidModeResolution()); + defaultsettings->addChild(res); + defaultsettings->addChild(rate); + defaultsettings->addChild(TVVidModeForceAspect()); + connect(res, SIGNAL(valueChanged(const QString&)), + rate, SLOT(ChangeResolution(const QString&))); + + ConfigurationGroup* overrides = + new GridConfigurationGroup(5, true, true, false, true); + + overrides->setLabel(tr("Overrides for specific video sizes")); + + for (int idx = 0; idx < 3; ++idx) { - setLabel(QObject::tr("Video Mode Settings")); - setUseLabel(false); - - Setting *videomode = UseVideoModes(); - addChild(videomode); - setTrigger(videomode); - - ConfigurationGroup* defaultsettings = - new HorizontalConfigurationGroup(false, false); - - HostComboBox *res = TVVidModeResolution(); - HostRefreshRateComboBox *rate = TVVidModeRefreshRate(); - defaultsettings->addChild(GuiVidModeResolution()); - defaultsettings->addChild(res); - defaultsettings->addChild(rate); - defaultsettings->addChild(TVVidModeForceAspect()); + //input side + overrides->addChild(VidModeWidth(idx)); + overrides->addChild(VidModeHeight(idx)); + // output side + overrides->addChild(res = TVVidModeResolution(idx)); + overrides->addChild(rate = TVVidModeRefreshRate(idx)); + overrides->addChild(TVVidModeForceAspect(idx)); + connect(res, SIGNAL(valueChanged(const QString&)), rate, SLOT(ChangeResolution(const QString&))); + } - ConfigurationGroup* overrides = - new GridConfigurationGroup(5, true, true, false, true); - overrides->setLabel(QObject::tr("Overrides for specific video sizes")); + ConfigurationGroup* settings = new VerticalConfigurationGroup(false); - for (int idx = 0; idx < 3; ++idx) - { - //input side - overrides->addChild(VidModeWidth(idx)); - overrides->addChild(VidModeHeight(idx)); - // output side - overrides->addChild(res = TVVidModeResolution(idx)); - overrides->addChild(rate = TVVidModeRefreshRate(idx)); - overrides->addChild(TVVidModeForceAspect(idx)); - connect(res, SIGNAL(valueChanged(const QString&)), - rate, SLOT(ChangeResolution(const QString&))); - } + settings->addChild(defaultsettings); + settings->addChild(overrides); - ConfigurationGroup* settings = new VerticalConfigurationGroup(false); - settings->addChild(defaultsettings); - settings->addChild(overrides); + addTarget("1", settings); + addTarget("0", new VerticalConfigurationGroup(true)); - addTarget("1", settings); - addTarget("0", new VerticalConfigurationGroup(true)); - } }; #endif static HostCheckBox *HideMouseCursor() { HostCheckBox *gc = new HostCheckBox("HideMouseCursor"); - gc->setLabel(QObject::tr("Hide mouse cursor in MythTV")); + + gc->setLabel(AppearanceSettings::tr("Hide mouse cursor in MythTV")); + gc->setValue(false); - gc->setHelpText(QObject::tr("Toggles mouse cursor visibility for touchscreens. " - "By default MythTV will auto-hide the cursor if the mouse doesn't " - "move for a period, this setting disables the cursor entirely.")); + + gc->setHelpText(AppearanceSettings::tr("Toggles mouse cursor visibility " + "for touchscreens. By default " + "MythTV will auto-hide the cursor " + "if the mouse doesn't move for a " + "period, this setting disables the " + "cursor entirely.")); return gc; }; @@ -2011,10 +2393,13 @@ static HostCheckBox *HideMouseCursor() static HostCheckBox *RunInWindow() { HostCheckBox *gc = new HostCheckBox("RunFrontendInWindow"); - gc->setLabel(QObject::tr("Use window border")); + + gc->setLabel(AppearanceSettings::tr("Use window border")); + gc->setValue(false); - gc->setHelpText(QObject::tr("Toggles between windowed and " - "borderless operation.")); + + gc->setHelpText(AppearanceSettings::tr("Toggles between windowed and " + "borderless operation.")); return gc; } @@ -2022,11 +2407,13 @@ static HostCheckBox *UseFixedWindowSize() { { HostCheckBox *gc = new HostCheckBox("UseFixedWindowSize"); - gc->setLabel(QObject::tr("Use fixed window size")); + + gc->setLabel(AppearanceSettings::tr("Use fixed window size")); + gc->setValue(true); - gc->setHelpText(QObject::tr( - "If disabled, the video playback " - "window can be resized")); + + gc->setHelpText(AppearanceSettings::tr("If disabled, the video playback " + "window can be resized")); return gc; } } @@ -2034,17 +2421,17 @@ static HostCheckBox *UseFixedWindowSize() static HostComboBox *MythDateFormatCB() { HostComboBox *gc = new HostComboBox("DateFormat"); - gc->setLabel(QObject::tr("Date format")); + gc->setLabel(AppearanceSettings::tr("Date format")); QDate sampdate = MythDate::current().toLocalTime().date(); - QString sampleStr = - QObject::tr("Samples are shown using today's date."); + QString sampleStr = AppearanceSettings::tr("Samples are shown using " + "today's date."); if (sampdate.month() == sampdate.day()) { sampdate = sampdate.addDays(1); - sampleStr = - QObject::tr("Samples are shown using tomorrow's date."); + sampleStr = AppearanceSettings::tr("Samples are shown using " + "tomorrow's date."); } QLocale locale = gCoreContext->GetQLocale(); @@ -2069,31 +2456,37 @@ static HostComboBox *MythDateFormatCB() gc->addSelection(locale.toString(sampdate, "ddd MMM d yyyy"), "ddd MMM d yyyy"); gc->addSelection(locale.toString(sampdate, "ddd d MMM yyyy"), "ddd d MMM yyyy"); gc->addSelection(locale.toString(sampdate, "ddd yyyy-MM-dd"), "ddd yyyy-MM-dd"); - QString jp_long = QString("dddd yyyy") + QChar(0x5E74) + + + QString cn_long = QString("dddd yyyy") + QChar(0x5E74) + "M" + QChar(0x6708) + "d"+ QChar(0x65E5); // dddd yyyy年M月d日 - gc->addSelection(locale.toString(sampdate, jp_long), jp_long); - QString jp_med = QString("dddd ") + + gc->addSelection(locale.toString(sampdate, cn_long), cn_long); + QString cn_med = QString("dddd ") + "M" + QChar(0x6708) + "d"+ QChar(0x65E5); // dddd M月d日 - gc->addSelection(locale.toString(sampdate, jp_med), jp_med); - gc->setHelpText(QObject::tr("Your preferred date format.") + ' ' + - sampleStr); + + gc->addSelection(locale.toString(sampdate, cn_med), cn_med); + + //: %1 gives additional information regarding the date format + gc->setHelpText(AppearanceSettings::tr("Your preferred date format. %1") + .arg(sampleStr)); + return gc; } static HostComboBox *MythShortDateFormat() { HostComboBox *gc = new HostComboBox("ShortDateFormat"); - gc->setLabel(QObject::tr("Short date format")); + gc->setLabel(AppearanceSettings::tr("Short date format")); QDate sampdate = MythDate::current().toLocalTime().date(); - QString sampleStr = - QObject::tr("Samples are shown using today's date."); + + QString sampleStr = AppearanceSettings::tr("Samples are shown using " + "today's date."); if (sampdate.month() == sampdate.day()) { sampdate = sampdate.addDays(1); - sampleStr = - QObject::tr("Samples are shown using tomorrow's date."); + sampleStr = AppearanceSettings::tr("Samples are shown using " + "tomorrow's date."); } QLocale locale = gCoreContext->GetQLocale(); @@ -2115,17 +2508,22 @@ static HostComboBox *MythShortDateFormat() gc->addSelection(locale.toString(sampdate, "ddd d/M"), "ddd d/M"); gc->addSelection(locale.toString(sampdate, "M/d ddd"), "M/d ddd"); gc->addSelection(locale.toString(sampdate, "d/M ddd"), "d/M ddd"); - QString jp = QString("M") + QChar(0x6708) + "d" + QChar(0x65E5); // M月d日 - gc->addSelection(locale.toString(sampdate, jp), jp); - gc->setHelpText(QObject::tr("Your preferred short date format.") + ' ' + - sampleStr); + + QString cn = QString("M") + QChar(0x6708) + "d" + QChar(0x65E5); // M月d日 + + gc->addSelection(locale.toString(sampdate, cn), cn); + + //: %1 gives additional information regarding the date format + gc->setHelpText(AppearanceSettings::tr("Your preferred short date format. %1") + .arg(sampleStr)); return gc; } static HostComboBox *MythTimeFormat() { HostComboBox *gc = new HostComboBox("TimeFormat"); - gc->setLabel(QObject::tr("Time format")); + + gc->setLabel(AppearanceSettings::tr("Time format")); QTime samptime = QTime::currentTime(); @@ -2139,9 +2537,12 @@ static HostComboBox *MythTimeFormat() gc->addSelection(locale.toString(samptime, "hh:mm"), "hh:mm"); gc->addSelection(locale.toString(samptime, "hh.mm"), "hh.mm"); gc->addSelection(locale.toString(samptime, "AP h:mm"), "AP h:mm"); - gc->setHelpText(QObject::tr("Your preferred time format. You must choose " - "a format with \"AM\" or \"PM\" in it, otherwise your " - "time display will be 24-hour or \"military\" time.")); + + gc->setHelpText(AppearanceSettings::tr("Your preferred time format. You " + "must choose a format with \"AM\" " + "or \"PM\" in it, otherwise your " + "time display will be 24-hour or " + "\"military\" time.")); return gc; } @@ -2149,116 +2550,147 @@ static HostComboBox *MythTimeFormat() static HostComboBox *ThemePainter() { HostComboBox *gc = new HostComboBox("ThemePainter"); - gc->setLabel(QObject::tr("Paint engine")); - gc->addSelection(QObject::tr("Qt"), QT_PAINTER); - gc->addSelection(QObject::tr("Auto"), AUTO_PAINTER); + + gc->setLabel(AppearanceSettings::tr("Paint engine")); + + gc->addSelection(QCoreApplication::translate("(Common)", "Qt"), QT_PAINTER); + gc->addSelection(QCoreApplication::translate("(Common)", "Auto", "Automatic"), + AUTO_PAINTER); #ifdef USING_OPENGL - gc->addSelection(QObject::tr("OpenGL"), OPENGL_PAINTER); + gc->addSelection(QCoreApplication::translate("(Common)", "OpenGL"), + OPENGL_PAINTER); #endif #ifdef USING_MINGW - gc->addSelection(QObject::tr("Direct3D"), D3D9_PAINTER); + gc->addSelection(QCoreApplication::translate("(Common)", "Direct3D"), + D3D9_PAINTER); #endif - gc->setHelpText(QObject::tr("This selects what MythTV uses to draw. " - "Choosing 'Auto' is recommended, unless running on systems " - "with broken OpenGL implementations (broken hardware or " - "drivers or windowing systems) where only Qt works.")); - return gc; + gc->setHelpText( + AppearanceSettings::tr("This selects what MythTV uses to draw. " + "Choosing '%1' is recommended, unless running " + "on systems with broken OpenGL implementations " + "(broken hardware or drivers or windowing " + "systems) where only Qt works.") + .arg(QCoreApplication::translate("(Common)", "Auto", "Automatic"))); + + return gc; } #endif static HostComboBox *ChannelFormat() { HostComboBox *gc = new HostComboBox("ChannelFormat"); - gc->setLabel(QObject::tr("Channel format")); - gc->addSelection(QObject::tr("number"), ""); - gc->addSelection(QObject::tr("number callsign"), " "); - gc->addSelection(QObject::tr("number name"), " "); - gc->addSelection(QObject::tr("callsign"), ""); - gc->addSelection(QObject::tr("name"), ""); - gc->setHelpText(QObject::tr("Your preferred channel format.")); + + gc->setLabel(GeneralSettings::tr("Channel format")); + + gc->addSelection(GeneralSettings::tr("number"), ""); + gc->addSelection(GeneralSettings::tr("number callsign"), " "); + gc->addSelection(GeneralSettings::tr("number name"), " "); + gc->addSelection(GeneralSettings::tr("callsign"), ""); + gc->addSelection(GeneralSettings::tr("name"), ""); + + gc->setHelpText(GeneralSettings::tr("Your preferred channel format.")); + gc->setValue(1); + return gc; } static HostComboBox *LongChannelFormat() { HostComboBox *gc = new HostComboBox("LongChannelFormat"); - gc->setLabel(QObject::tr("Long channel format")); - gc->addSelection(QObject::tr("number"), ""); - gc->addSelection(QObject::tr("number callsign"), " "); - gc->addSelection(QObject::tr("number name"), " "); - gc->addSelection(QObject::tr("callsign"), ""); - gc->addSelection(QObject::tr("name"), ""); - gc->setHelpText(QObject::tr("Your preferred long channel format.")); + + gc->setLabel(GeneralSettings::tr("Long channel format")); + + gc->addSelection(GeneralSettings::tr("number"), ""); + gc->addSelection(GeneralSettings::tr("number callsign"), " "); + gc->addSelection(GeneralSettings::tr("number name"), " "); + gc->addSelection(GeneralSettings::tr("callsign"), ""); + gc->addSelection(GeneralSettings::tr("name"), ""); + + gc->setHelpText(GeneralSettings::tr("Your preferred long channel format.")); + gc->setValue(2); + return gc; } static HostCheckBox *ChannelGroupRememberLast() { HostCheckBox *gc = new HostCheckBox("ChannelGroupRememberLast"); - gc->setLabel(QObject::tr("Remember last channel group")); - gc->setHelpText(QObject::tr("If enabled, the EPG will initially display " - "only the channels from the last channel group selected. Pressing " - "\"4\" will toggle channel group.")); + + gc->setLabel(ChannelGroupSettings::tr("Remember last channel group")); + + gc->setHelpText(ChannelGroupSettings::tr("If enabled, the EPG will " + "initially display only the " + "channels from the last channel " + "group selected. Pressing \"4\" " + "will toggle channel group.")); + gc->setValue(false); + return gc; } static HostComboBox *ChannelGroupDefault() { HostComboBox *gc = new HostComboBox("ChannelGroupDefault"); - gc->setLabel(QObject::tr("Default channel group")); + + gc->setLabel(ChannelGroupSettings::tr("Default channel group")); ChannelGroupList changrplist; changrplist = ChannelGroup::GetChannelGroups(); - gc->addSelection(QObject::tr("All Channels"), "-1"); + gc->addSelection(ChannelGroupSettings::tr("All Channels"), "-1"); ChannelGroupList::iterator it; for (it = changrplist.begin(); it < changrplist.end(); ++it) gc->addSelection(it->name, QString("%1").arg(it->grpid)); - gc->setHelpText(QObject::tr("Default channel group to be shown in the the EPG" - "Pressing GUIDE key will toggle channel group.")); + gc->setHelpText(ChannelGroupSettings::tr("Default channel group to be " + "shown in the the EPGPressing " + "GUIDE key will toggle channel " + "group.")); gc->setValue(false); + return gc; } static HostCheckBox *BrowseChannelGroup() { HostCheckBox *gc = new HostCheckBox("BrowseChannelGroup"); - gc->setLabel(QObject::tr("Browse/change channels from Channel Group")); - gc->setHelpText(QObject::tr("If enabled, Live TV will browse or change " - "channels from the selected channel group. The \"All " - "Channels\" channel group may be selected to browse all " - "channels.")); + + gc->setLabel(GeneralSettings::tr("Browse/change channels from Channel " + "Group")); + + gc->setHelpText(GeneralSettings::tr("If enabled, Live TV will browse or " + "change channels from the selected " + "channel group. The \"All Channels\" " + "channel group may be selected to " + "browse all channels.")); gc->setValue(false); + return gc; } // Channel Group Settings -class ChannelGroupSettings : public TriggeredConfigurationGroup +ChannelGroupSettings::ChannelGroupSettings() : + TriggeredConfigurationGroup(false, true, false, false) { - public: - ChannelGroupSettings() : TriggeredConfigurationGroup(false, true, false, false) - { - setLabel(QObject::tr("Remember last channel group")); - setUseLabel(false); + setLabel(tr("Remember last channel group")); + setUseLabel(false); - Setting* RememberChanGrpEnabled = ChannelGroupRememberLast(); - addChild(RememberChanGrpEnabled); - setTrigger(RememberChanGrpEnabled); + Setting* RememberChanGrpEnabled = ChannelGroupRememberLast(); + addChild(RememberChanGrpEnabled); + setTrigger(RememberChanGrpEnabled); - ConfigurationGroup* settings = new VerticalConfigurationGroup(false,false); - settings->addChild(ChannelGroupDefault()); - addTarget("0", settings); + ConfigurationGroup* settings = new VerticalConfigurationGroup(false,false); + settings->addChild(ChannelGroupDefault()); + addTarget("0", settings); - // show nothing if RememberChanGrpEnabled is on - addTarget("1", new VerticalConfigurationGroup(true,false)); - }; + // show nothing if RememberChanGrpEnabled is on + addTarget("1", new VerticalConfigurationGroup(true,false)); }; // General RecPriorities settings @@ -2266,25 +2698,41 @@ class ChannelGroupSettings : public TriggeredConfigurationGroup static GlobalComboBox *GRSchedOpenEnd() { GlobalComboBox *bc = new GlobalComboBox("SchedOpenEnd"); - bc->setLabel(QObject::tr("Avoid back to back recordings")); - bc->setHelpText(QObject::tr("Selects the situations where the scheduler " - "will avoid assigning shows to the same card if their " - "end time and start time match. This will be allowed " - "when necessary in order to resolve conflicts.")); - bc->addSelection(QObject::tr("Never"), "0"); - bc->addSelection(QObject::tr("Different Channels"), "1"); - bc->addSelection(QObject::tr("Always"), "2"); + + bc->setLabel(GeneralRecPrioritiesSettings::tr("Avoid back to back " + "recordings")); + + bc->setHelpText( + GeneralRecPrioritiesSettings::tr("Selects the situations where the" + "scheduler will avoid assigning shows " + "to the same card if their end time " + "and start time match. This will be " + "allowed when necessary in order to " + "resolve conflicts.")); + + bc->addSelection(GeneralRecPrioritiesSettings::tr("Never"), "0"); + bc->addSelection(GeneralRecPrioritiesSettings::tr("Different Channels"), + "1"); + bc->addSelection(GeneralRecPrioritiesSettings::tr("Always"), "2"); + bc->setValue(0); + return bc; } static GlobalSpinBox *GRPrefInputRecPriority() { GlobalSpinBox *bs = new GlobalSpinBox("PrefInputPriority", 1, 99, 1); - bs->setLabel(QObject::tr("Preferred input priority")); - bs->setHelpText(QObject::tr("Additional priority when a showing " - "matches the preferred input selected in the 'Scheduling " - "Options' section of the recording rule.")); + + bs->setLabel(GeneralRecPrioritiesSettings::tr("Preferred input priority")); + + bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority when " + "a showing matches the " + "preferred input selected " + "in the 'Scheduling " + "Options' section of the " + "recording rule.")); + bs->setValue(2); return bs; } @@ -2292,20 +2740,33 @@ static GlobalSpinBox *GRPrefInputRecPriority() static GlobalSpinBox *GRHDTVRecPriority() { GlobalSpinBox *bs = new GlobalSpinBox("HDTVRecPriority", -99, 99, 1); - bs->setLabel(QObject::tr("HDTV recording priority")); - bs->setHelpText(QObject::tr("Additional priority when a showing " - "is marked as an HDTV broadcast in the TV listings.")); + + bs->setLabel(GeneralRecPrioritiesSettings::tr("HDTV recording priority")); + + bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority when " + "a showing is marked as an " + "HDTV broadcast in the TV " + "listings.")); + bs->setValue(0); + return bs; } static GlobalSpinBox *GRWSRecPriority() { GlobalSpinBox *bs = new GlobalSpinBox("WSRecPriority", -99, 99, 1); - bs->setLabel(QObject::tr("Widescreen recording priority")); - bs->setHelpText(QObject::tr("Additional priority when a showing " - "is marked as widescreen in the TV listings.")); + + bs->setLabel(GeneralRecPrioritiesSettings::tr("Widescreen recording " + "priority")); + + bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority when " + "a showing is marked as " + "widescreen in the TV " + "listings.")); + bs->setValue(0); + return bs; } @@ -2313,10 +2774,18 @@ static GlobalSpinBox *GRSignLangRecPriority() { GlobalSpinBox *bs = new GlobalSpinBox("SignLangRecPriority", -99, 99, 1); - bs->setLabel(QObject::tr("Sign language recording priority")); - bs->setHelpText(QObject::tr("Additional priority when a showing " - "is marked as having in-vision sign language.")); + + bs->setLabel(GeneralRecPrioritiesSettings::tr("Sign language recording " + "priority")); + + bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority " + "when a showing is " + "marked as having " + "in-vision sign " + "language.")); + bs->setValue(0); + return bs; } @@ -2324,10 +2793,17 @@ static GlobalSpinBox *GROnScrSubRecPriority() { GlobalSpinBox *bs = new GlobalSpinBox("OnScrSubRecPriority", -99, 99, 1); - bs->setLabel(QObject::tr("In-vision Subtitles Recording Priority")); - bs->setHelpText(QObject::tr("Additional priority when a showing " - "is marked as having in-vision subtitles.")); + + bs->setLabel(GeneralRecPrioritiesSettings::tr("In-vision Subtitles " + "Recording Priority")); + + bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority " + "when a showing is marked " + "as having in-vision " + "subtitles.")); + bs->setValue(0); + return bs; } @@ -2335,11 +2811,18 @@ static GlobalSpinBox *GRCCRecPriority() { GlobalSpinBox *bs = new GlobalSpinBox("CCRecPriority", -99, 99, 1); - bs->setLabel(QObject::tr("Subtitles/CC recording priority")); - bs->setHelpText(QObject::tr("Additional priority when a showing " - "is marked as having subtitles or closed captioning " - "(CC) available.")); + + bs->setLabel(GeneralRecPrioritiesSettings::tr("Subtitles/CC recording " + "priority")); + + bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority when " + "a showing is marked as " + "having subtitles or " + "closed captioning (CC) " + "available.")); + bs->setValue(0); + return bs; } @@ -2347,11 +2830,17 @@ static GlobalSpinBox *GRHardHearRecPriority() { GlobalSpinBox *bs = new GlobalSpinBox("HardHearRecPriority", -99, 99, 1); - bs->setLabel(QObject::tr("Hard of hearing priority")); - bs->setHelpText(QObject::tr("Additional priority when a showing " - "is marked as having support for viewers with impaired " - "hearing.")); + + bs->setLabel(GeneralRecPrioritiesSettings::tr("Hard of hearing priority")); + + bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority when " + "a showing is marked as " + "having support for " + "viewers with impaired " + "hearing.")); + bs->setValue(0); + return bs; } @@ -2359,46 +2848,63 @@ static GlobalSpinBox *GRAudioDescRecPriority() { GlobalSpinBox *bs = new GlobalSpinBox("AudioDescRecPriority", -99, 99, 1); - bs->setLabel(QObject::tr("Audio described priority")); - bs->setHelpText(QObject::tr("Additional priority when a showing " - "is marked as being Audio Described.")); + + bs->setLabel(GeneralRecPrioritiesSettings::tr("Audio described priority")); + + bs->setHelpText(GeneralRecPrioritiesSettings::tr("Additional priority when " + "a showing is marked as " + "being Audio Described.")); + bs->setValue(0); + return bs; } static HostLineEdit *DefaultTVChannel() { HostLineEdit *ge = new HostLineEdit("DefaultTVChannel"); - ge->setLabel(QObject::tr("Guide starts at channel")); + + ge->setLabel(EPGSettings::tr("Guide starts at channel")); + ge->setValue("3"); - ge->setHelpText(QObject::tr("The program guide starts on this channel if " - "it is run from outside of Live TV mode.")); + + ge->setHelpText(EPGSettings::tr("The program guide starts on this channel " + "if it is run from outside of Live TV " + "mode.")); + return ge; } static HostSpinBox *EPGRecThreshold() { HostSpinBox *gs = new HostSpinBox("SelChangeRecThreshold", 1, 600, 1); - gs->setLabel(QObject::tr("Record threshold")); + + gs->setLabel(EPGSettings::tr("Record threshold")); + gs->setValue(16); - gs->setHelpText(QObject::tr("Pressing SELECT on a show that is at least " - "this many minutes into the future will schedule a " - "recording.")); + + gs->setHelpText(EPGSettings::tr("Pressing SELECT on a show that is at " + "least this many minutes into the future " + "will schedule a recording.")); return gs; } static HostComboBox *MythLanguage() { HostComboBox *gc = new HostComboBox("Language"); - gc->setLabel(QObject::tr("Language")); + + gc->setLabel(AppearanceSettings::tr("Language")); QMap langMap = MythTranslation::getLanguages(); QStringList langs = langMap.values(); langs.sort(); QString langCode = gCoreContext->GetSetting("Language").toLower(); + if (langCode.isEmpty()) langCode = "en_US"; + gc->clearSelections(); + for (QStringList::Iterator it = langs.begin(); it != langs.end(); ++it) { QString label = *it; @@ -2406,8 +2912,8 @@ static HostComboBox *MythLanguage() gc->addSelection(label, value, (value.toLower() == langCode)); } - gc->setHelpText( - QObject::tr("Your preferred language for the user interface.")); + gc->setHelpText(AppearanceSettings::tr("Your preferred language for the " + "user interface.")); return gc; } @@ -2441,43 +2947,62 @@ static void ISO639_fill_selections(SelectSetting *widget, uint i) static GlobalComboBox *ISO639PreferredLanguage(uint i) { GlobalComboBox *gc = new GlobalComboBox(QString("ISO639Language%1").arg(i)); - gc->setLabel(QObject::tr("Guide language #%1").arg(i+1)); + + gc->setLabel(AppearanceSettings::tr("Guide language #%1").arg(i+1)); + // We should try to get language from "MythLanguage" // then use code 2 to code 3 map in iso639.h ISO639_fill_selections(gc, i); - gc->setHelpText( - QObject::tr("Your #%1 preferred language for " - "Program Guide data and captions.").arg(i+1)); + + gc->setHelpText(AppearanceSettings::tr("Your #%1 preferred language for " + "Program Guide data and captions.") + .arg(i+1)); return gc; } static HostCheckBox *NetworkControlEnabled() { HostCheckBox *gc = new HostCheckBox("NetworkControlEnabled"); - gc->setLabel(QObject::tr("Enable Network Remote Control interface")); - gc->setHelpText(QObject::tr("This enables support for controlling " - "mythfrontend over the network.")); + + gc->setLabel(MainGeneralSettings::tr("Enable Network Remote Control " + "interface")); + + gc->setHelpText(MainGeneralSettings::tr("This enables support for " + "controlling MythFrontend " + "over the network.")); + gc->setValue(false); + return gc; } static HostSpinBox *NetworkControlPort() { HostSpinBox *gs = new HostSpinBox("NetworkControlPort", 1025, 65535, 1); - gs->setLabel(QObject::tr("Network Remote Control port")); + + gs->setLabel(MainGeneralSettings::tr("Network Remote Control port")); + gs->setValue(6546); - gs->setHelpText(QObject::tr("This specifies what port the network remote " - "Control interface will listen on for new connections.")); + + gs->setHelpText(MainGeneralSettings::tr("This specifies what port the " + "Network Remote Control " + "interface will listen on for " + "new connections.")); return gs; } static HostLineEdit *UDPNotifyPort() { HostLineEdit *ge = new HostLineEdit("UDPNotifyPort"); - ge->setLabel(QObject::tr("UDP notify port")); + + ge->setLabel(MainGeneralSettings::tr("UDP notify port")); + ge->setValue("6948"); - ge->setHelpText(QObject::tr("MythTV will listen for connections " - "from the \"mythutil\" program on this port.")); + + ge->setHelpText(MainGeneralSettings::tr("MythTV will listen for " + "connections from the " + "\"mythutil\" program on " + "this port.")); return ge; } @@ -2486,42 +3011,59 @@ static HostLineEdit *UDPNotifyPort() static HostCheckBox *AirPlayEnabled() { HostCheckBox *gc = new HostCheckBox("AirPlayEnabled"); - gc->setLabel(QObject::tr("Enable AirPlay")); - gc->setHelpText(QObject::tr("AirPlay lets you wirelessly view content on " - "your TV from your iPhone, iPad, iPod Touch, or " - "iTunes on your computer.")); + + gc->setLabel(MainGeneralSettings::tr("Enable AirPlay")); + + gc->setHelpText(MainGeneralSettings::tr("AirPlay lets you wirelessly view " + "content on your TV from your " + "iPhone, iPad, iPod Touch, or " + "iTunes on your computer.")); + gc->setValue(true); + return gc; } static HostCheckBox *AirPlayAudioOnly() { HostCheckBox *gc = new HostCheckBox("AirPlayAudioOnly"); - gc->setLabel(QObject::tr("Only support AirTunes (no video)")); - gc->setHelpText(QObject::tr("Only stream audio from your iPhone, iPad, " - "iPod Touch, or iTunes on your computer")); + + gc->setLabel(MainGeneralSettings::tr("Only support AirTunes (no video)")); + + gc->setHelpText(MainGeneralSettings::tr("Only stream audio from your " + "iPhone, iPad, iPod Touch, or " + "iTunes on your computer")); + gc->setValue(false); + return gc; } static HostCheckBox *AirPlayPasswordEnabled() { HostCheckBox *gc = new HostCheckBox("AirPlayPasswordEnabled"); - gc->setLabel(QObject::tr("Require password")); + + gc->setLabel(MainGeneralSettings::tr("Require password")); + gc->setValue(false); - gc->setHelpText(QObject::tr("Require a password to use AirPlay. Your iPhone, " - "iPad, iPod Touch, or iTunes on your computer " - "will prompt you when required")); + + gc->setHelpText(MainGeneralSettings::tr("Require a password to use " + "AirPlay. Your iPhone, iPad, iPod " + "Touch, or iTunes on your computer " + "will prompt you when required")); return gc; } static HostLineEdit *AirPlayPassword() { HostLineEdit *ge = new HostLineEdit("AirPlayPassword"); + ge->setValue("0000"); - ge->setHelpText(QObject::tr("Your iPhone, iPad, iPod Touch, or iTunes on " - "your computer will prompt you for this password " - "when required")); + + ge->setHelpText(MainGeneralSettings::tr("Your iPhone, iPad, iPod Touch, or " + "iTunes on your computer will " + "prompt you for this password " + "when required")); return ge; } @@ -2529,43 +3071,53 @@ static HorizontalConfigurationGroup *AirPlayPasswordSettings() { HorizontalConfigurationGroup *hc = new HorizontalConfigurationGroup(false, false, false, false); + hc->addChild(AirPlayPasswordEnabled()); hc->addChild(AirPlayPassword()); + return hc; } static HostCheckBox *AirPlayFullScreen() { HostCheckBox *gc = new HostCheckBox("AirPlayFullScreen"); - gc->setLabel(QObject::tr("AirPlay full screen playback")); + + gc->setLabel(MainGeneralSettings::tr("AirPlay full screen playback")); + gc->setValue(false); - gc->setHelpText(QObject::tr("During music playback, displays album cover " - "and various media information in full screen mode")); + + gc->setHelpText(MainGeneralSettings::tr("During music playback, displays " + "album cover and various media " + "information in full screen mode")); return gc; } static TransLabelSetting *AirPlayInfo() { TransLabelSetting *ts = new TransLabelSetting(); - ts->setValue(QObject::tr("All AirPlay settings take effect when " - "you restart MythFrontend.")); + + ts->setValue(MainGeneralSettings::tr("All AirPlay settings take effect " + "when you restart MythFrontend.")); return ts; } static TransLabelSetting *AirPlayRSAInfo() { TransLabelSetting *ts = new TransLabelSetting(); + if (MythRAOPConnection::LoadKey() == NULL) { - ts->setValue(QObject::tr("AirTunes RSA key couldn't be loaded. " - "Check http://www.mythtv.org/wiki/AirTunes/AirPlay. " - "Last Error: %1") - .arg(MythRAOPConnection::RSALastError())); + ts->setValue(MainGeneralSettings::tr("AirTunes RSA key couldn't be " + "loaded. Check http://www.mythtv.org/wiki/AirTunes/AirPlay. " + "Last Error: %1") + .arg(MythRAOPConnection::RSALastError())); } else { - ts->setValue(QObject::tr("AirTunes RSA key successfully loaded.")); + ts->setValue(MainGeneralSettings::tr("AirTunes RSA key successfully " + "loaded.")); } + return ts; } #endif @@ -2573,303 +3125,392 @@ static TransLabelSetting *AirPlayRSAInfo() static HostCheckBox *RealtimePriority() { HostCheckBox *gc = new HostCheckBox("RealtimePriority"); - gc->setLabel(QObject::tr("Enable realtime priority threads")); - gc->setHelpText(QObject::tr("When running mythfrontend with root " - "privileges, some threads can be given enhanced priority. " - "Disable this if mythfrontend freezes during video " - "playback.")); + + gc->setLabel(PlaybackSettings::tr("Enable realtime priority threads")); + + gc->setHelpText(PlaybackSettings::tr("When running mythfrontend with root " + "privileges, some threads can be " + "given enhanced priority. Disable " + "this if MythFrontend freezes during " + "video playback.")); gc->setValue(true); + return gc; } static HostLineEdit *IgnoreMedia() { HostLineEdit *ge = new HostLineEdit("IgnoreDevices"); - ge->setLabel(QObject::tr("Ignore devices")); + + ge->setLabel(MainGeneralSettings::tr("Ignore devices")); + ge->setValue(""); - ge->setHelpText(QObject::tr("If there are any devices that you do not want " - "to be monitored, list them here with commas " - "in-between. The plugins will ignore them. " - "Requires restart.")); + + ge->setHelpText(MainGeneralSettings::tr("If there are any devices that you " + "do not want to be monitored, list " + "them here with commas in-between. " + "The plugins will ignore them. " + "Requires restart.")); return ge; } static HostComboBox *DisplayGroupTitleSort() { HostComboBox *gc = new HostComboBox("DisplayGroupTitleSort"); - gc->setLabel(QObject::tr("Sort titles")); - gc->addSelection(QObject::tr("Alphabetically"), + + gc->setLabel(PlaybackSettings::tr("Sort titles")); + + gc->addSelection(PlaybackSettings::tr("Alphabetically"), QString::number(PlaybackBox::TitleSortAlphabetical)); - gc->addSelection(QObject::tr("By recording priority"), + gc->addSelection(PlaybackSettings::tr("By recording priority"), QString::number(PlaybackBox::TitleSortRecPriority)); - gc->setHelpText(QObject::tr("Sets the title sorting order when the " - "view is set to Titles only.")); + + gc->setHelpText(PlaybackSettings::tr("Sets the title sorting order when " + "the view is set to Titles only.")); return gc; } static HostCheckBox *PlaybackWatchList() { HostCheckBox *gc = new HostCheckBox("PlaybackWatchList"); - gc->setLabel(QObject::tr("Include the 'Watch List' group")); + + gc->setLabel(WatchListSettings::tr("Include the 'Watch List' group")); + gc->setValue(true); - gc->setHelpText(QObject::tr("The 'Watch List' is an abbreviated list of " - "recordings sorted to highlight series and " - "shows that need attention in order to " - "keep up to date.")); + + gc->setHelpText(WatchListSettings::tr("The 'Watch List' is an abbreviated " + "list of recordings sorted to " + "highlight series and shows that " + "need attention in order to keep up " + "to date.")); return gc; } static HostCheckBox *PlaybackWLStart() { HostCheckBox *gc = new HostCheckBox("PlaybackWLStart"); - gc->setLabel(QObject::tr("Start from the Watch List view")); + + gc->setLabel(WatchListSettings::tr("Start from the Watch List view")); + gc->setValue(false); - gc->setHelpText(QObject::tr("If enabled, the 'Watch List' will be the " - "initial view each time you enter the " - "Watch Recordings screen")); + + gc->setHelpText(WatchListSettings::tr("If enabled, the 'Watch List' will " + "be the initial view each time you " + "enter the Watch Recordings screen")); return gc; } static HostCheckBox *PlaybackWLAutoExpire() { HostCheckBox *gc = new HostCheckBox("PlaybackWLAutoExpire"); - gc->setLabel(QObject::tr("Exclude recordings not set for Auto-Expire")); + + gc->setLabel(WatchListSettings::tr("Exclude recordings not set for " + "Auto-Expire")); + gc->setValue(false); - gc->setHelpText(QObject::tr("Set this if you turn off Auto-Expire only " - "for recordings that you've seen and intend " - "to keep. This option will exclude these " - "recordings from the 'Watch List'.")); + + gc->setHelpText(WatchListSettings::tr("Set this if you turn off " + "Auto-Expire only for recordings " + "that you've seen and intend to " + "keep. This option will exclude " + "these recordings from the " + "'Watch List'.")); return gc; } static HostSpinBox *PlaybackWLMaxAge() { HostSpinBox *gs = new HostSpinBox("PlaybackWLMaxAge", 30, 180, 10); - gs->setLabel(QObject::tr("Maximum days counted in the score")); + + gs->setLabel(WatchListSettings::tr("Maximum days counted in the score")); + gs->setValue(60); - gs->setHelpText(QObject::tr("The 'Watch List' scores are based on 1 point " - "equals one day since recording. This option " - "limits the maximum score due to age and " - "affects other weighting factors.")); + + gs->setHelpText(WatchListSettings::tr("The 'Watch List' scores are based " + "on 1 point equals one day since " + "recording. This option limits the " + "maximum score due to age and " + "affects other weighting factors.")); return gs; } static HostSpinBox *PlaybackWLBlackOut() { HostSpinBox *gs = new HostSpinBox("PlaybackWLBlackOut", 0, 5, 1); - gs->setLabel(QObject::tr("Days to exclude weekly episodes after delete")); + + gs->setLabel(WatchListSettings::tr("Days to exclude weekly episodes after " + "delete")); + gs->setValue(2); - gs->setHelpText(QObject::tr("When an episode is deleted or marked as " - "watched, other episodes of the series are " - "excluded from the 'Watch List' for this " - "interval of time. Daily shows also have a " - "smaller interval based on this setting.")); + + gs->setHelpText(WatchListSettings::tr("When an episode is deleted or " + "marked as watched, other episodes " + "of the series are excluded from the " + "'Watch List' for this interval of " + "time. Daily shows also have a " + "smaller interval based on this " + "setting.")); return gs; } -class WatchListSettings : public TriggeredConfigurationGroup +WatchListSettings::WatchListSettings() : + TriggeredConfigurationGroup(false, false, true, true) { - public: - WatchListSettings() : - TriggeredConfigurationGroup(false, false, true, true) - { - Setting* watchList = PlaybackWatchList(); - addChild(watchList); - setTrigger(watchList); + Setting* watchList = PlaybackWatchList(); + addChild(watchList); + setTrigger(watchList); - ConfigurationGroup* settings = new VerticalConfigurationGroup(false); - settings->addChild(PlaybackWLStart()); - settings->addChild(PlaybackWLAutoExpire()); - settings->addChild(PlaybackWLMaxAge()); - settings->addChild(PlaybackWLBlackOut()); - addTarget("1", settings); + ConfigurationGroup* settings = new VerticalConfigurationGroup(false); - addTarget("0", new VerticalConfigurationGroup(true)); - }; + settings->addChild(PlaybackWLStart()); + settings->addChild(PlaybackWLAutoExpire()); + settings->addChild(PlaybackWLMaxAge()); + settings->addChild(PlaybackWLBlackOut()); + + addTarget("1", settings); + + addTarget("0", new VerticalConfigurationGroup(true)); }; static HostCheckBox *LCDShowTime() { HostCheckBox *gc = new HostCheckBox("LCDShowTime"); - gc->setLabel(QObject::tr("Display time")); - gc->setHelpText(QObject::tr("Display current time on idle LCD display. ")); + + gc->setLabel(LcdSettings::tr("Display time")); + + gc->setHelpText(LcdSettings::tr("Display current time on idle LCD " + "display.")); + gc->setValue(true); + return gc; } static HostCheckBox *LCDShowRecStatus() { HostCheckBox *gc = new HostCheckBox("LCDShowRecStatus"); - gc->setLabel(QObject::tr("Display recording status")); - gc->setHelpText(QObject::tr("Display current recordings information on " - "LCD display.")); + + gc->setLabel(LcdSettings::tr("Display recording status")); + + gc->setHelpText(LcdSettings::tr("Display current recordings information " + "on LCD display.")); + gc->setValue(false); + return gc; } static HostCheckBox *LCDShowMenu() { HostCheckBox *gc = new HostCheckBox("LCDShowMenu"); - gc->setLabel(QObject::tr("Display menus")); - gc->setHelpText(QObject::tr("Display selected menu on LCD display. ")); + + gc->setLabel(LcdSettings::tr("Display menus")); + + gc->setHelpText(LcdSettings::tr("Display selected menu on LCD display. ")); + gc->setValue(true); + return gc; } static HostSpinBox *LCDPopupTime() { HostSpinBox *gs = new HostSpinBox("LCDPopupTime", 1, 300, 1, true); - gs->setLabel(QObject::tr("Menu pop-up time")); - gs->setHelpText(QObject::tr("How many seconds the menu will " - "remain visible after navigation.")); + + gs->setLabel(LcdSettings::tr("Menu pop-up time")); + + gs->setHelpText(LcdSettings::tr("How many seconds the menu will remain " + "visible after navigation.")); + gs->setValue(5); + return gs; } static HostCheckBox *LCDShowMusic() { HostCheckBox *gc = new HostCheckBox("LCDShowMusic"); - gc->setLabel(QObject::tr("Display music artist and title")); - gc->setHelpText(QObject::tr("Display playing artist and song title in " - "MythMusic on LCD display.")); + + gc->setLabel(LcdSettings::tr("Display music artist and title")); + + gc->setHelpText(LcdSettings::tr("Display playing artist and song title in " + "MythMusic on LCD display.")); + gc->setValue(true); + return gc; } static HostComboBox *LCDShowMusicItems() { HostComboBox *gc = new HostComboBox("LCDShowMusicItems"); - gc->setLabel(QObject::tr("Items")); - gc->addSelection(QObject::tr("Artist - Title"), "ArtistTitle"); - gc->addSelection(QObject::tr("Artist [Album] Title"), "ArtistAlbumTitle"); - gc->setHelpText(QObject::tr("Which items to show when playing music.")); + + gc->setLabel(LcdSettings::tr("Items")); + + gc->addSelection(LcdSettings::tr("Artist - Title"), "ArtistTitle"); + gc->addSelection(LcdSettings::tr("Artist [Album] Title"), + "ArtistAlbumTitle"); + + gc->setHelpText(LcdSettings::tr("Which items to show when playing music.")); + return gc; } static HostCheckBox *LCDShowChannel() { HostCheckBox *gc = new HostCheckBox("LCDShowChannel"); - gc->setLabel(QObject::tr("Display channel information")); - gc->setHelpText(QObject::tr("Display tuned channel information on LCD display.")); + + gc->setLabel(LcdSettings::tr("Display channel information")); + + gc->setHelpText(LcdSettings::tr("Display tuned channel information on LCD " + "display.")); + gc->setValue(true); + return gc; } static HostCheckBox *LCDShowVolume() { HostCheckBox *gc = new HostCheckBox("LCDShowVolume"); - gc->setLabel(QObject::tr("Display volume information")); - gc->setHelpText(QObject::tr("Display volume level information " - "on LCD display.")); + + gc->setLabel(LcdSettings::tr("Display volume information")); + + gc->setHelpText(LcdSettings::tr("Display volume level information " + "on LCD display.")); + gc->setValue(true); + return gc; } static HostCheckBox *LCDShowGeneric() { HostCheckBox *gc = new HostCheckBox("LCDShowGeneric"); - gc->setLabel(QObject::tr("Display generic information")); - gc->setHelpText(QObject::tr("Display generic information on LCD display.")); + + gc->setLabel(LcdSettings::tr("Display generic information")); + + gc->setHelpText(LcdSettings::tr("Display generic information on LCD display.")); + gc->setValue(true); + return gc; } static HostCheckBox *LCDBacklightOn() { HostCheckBox *gc = new HostCheckBox("LCDBacklightOn"); - gc->setLabel(QObject::tr("Backlight always on")); - gc->setHelpText(QObject::tr("Turn on the backlight permanently " - "on the LCD display.")); + + gc->setLabel(LcdSettings::tr("Backlight always on")); + + gc->setHelpText(LcdSettings::tr("Turn on the backlight permanently on the " + "LCD display.")); gc->setValue(true); + return gc; } static HostCheckBox *LCDHeartBeatOn() { HostCheckBox *gc = new HostCheckBox("LCDHeartBeatOn"); - gc->setLabel(QObject::tr("Heartbeat always on")); - gc->setHelpText(QObject::tr("Turn on the LCD heartbeat.")); + + gc->setLabel(LcdSettings::tr("Heartbeat always on")); + + gc->setHelpText(LcdSettings::tr("Turn on the LCD heartbeat.")); + gc->setValue(false); + return gc; } static HostCheckBox *LCDBigClock() { HostCheckBox *gc = new HostCheckBox("LCDBigClock"); - gc->setLabel(QObject::tr("Display large clock")); - gc->setHelpText(QObject::tr("On multiline displays try and display the time as large as possible.")); + + gc->setLabel(LcdSettings::tr("Display large clock")); + + gc->setHelpText(LcdSettings::tr("On multiline displays try and display the " + "time as large as possible.")); + gc->setValue(false); + return gc; } static HostLineEdit *LCDKeyString() { HostLineEdit *ge = new HostLineEdit("LCDKeyString"); - ge->setLabel(QObject::tr("LCD key order")); + + ge->setLabel(LcdSettings::tr("LCD key order")); + ge->setValue("ABCDEF"); - ge->setHelpText(QObject::tr("Enter the 6 Keypad Return Codes for your " - "LCD keypad in the order in which you want the functions " - "up/down/left/right/yes/no to operate. " - "(See lcdproc/server/drivers/hd44780.c/keyMapMatrix[] " - "or the matrix for your display)")); + + ge->setHelpText( + LcdSettings::tr("Enter the 6 Keypad Return Codes for your LCD keypad " + "in the order in which you want the functions " + "up/down/left/right/yes/no to operate. (See " + "lcdproc/server/drivers/hd44780.c/keyMapMatrix[] " + "or the matrix for your display)")); return ge; } static HostCheckBox *LCDEnable() { HostCheckBox *gc = new HostCheckBox("LCDEnable"); - gc->setLabel(QObject::tr("Enable LCD device")); - gc->setHelpText(QObject::tr("Use an LCD display to view MythTV status " - "information.")); + + gc->setLabel(LcdSettings::tr("Enable LCD device")); + + gc->setHelpText(LcdSettings::tr("Use an LCD display to view MythTV status " + "information.")); + gc->setValue(false); + return gc; } -class LcdSettings : public TriggeredConfigurationGroup -{ - public: - LcdSettings() : TriggeredConfigurationGroup(false, false, false, false, - false, false, false, false) - { - setLabel(QObject::tr("LCD device display")); - setUseLabel(false); - - Setting* lcd_enable = LCDEnable(); - addChild(lcd_enable); - setTrigger(lcd_enable); - - ConfigurationGroup *settings = - new VerticalConfigurationGroup(false, true, false, false); - ConfigurationGroup *setHoriz = - new HorizontalConfigurationGroup(false, false, false, false); - - ConfigurationGroup* setLeft = - new VerticalConfigurationGroup(false, false, false, false); - ConfigurationGroup* setRight = - new VerticalConfigurationGroup(false, false, false, false); - - setLeft->addChild(LCDShowTime()); - setLeft->addChild(LCDShowMenu()); - setLeft->addChild(LCDShowMusic()); - setLeft->addChild(LCDShowMusicItems()); - setLeft->addChild(LCDShowChannel()); - setLeft->addChild(LCDShowRecStatus()); - setRight->addChild(LCDShowVolume()); - setRight->addChild(LCDShowGeneric()); - setRight->addChild(LCDBacklightOn()); - setRight->addChild(LCDHeartBeatOn()); - setRight->addChild(LCDBigClock()); - setRight->addChild(LCDKeyString()); - setHoriz->addChild(setLeft); - setHoriz->addChild(setRight); - settings->addChild(setHoriz); - settings->addChild(LCDPopupTime()); - - addTarget("1", settings); - - addTarget("0", new VerticalConfigurationGroup(true)); - }; +LcdSettings::LcdSettings() : TriggeredConfigurationGroup(false, false, + false, false, + false, false, + false, false) +{ + setLabel(tr("LCD device display")); + setUseLabel(false); + + Setting* lcd_enable = LCDEnable(); + addChild(lcd_enable); + setTrigger(lcd_enable); + + ConfigurationGroup *settings = + new VerticalConfigurationGroup(false, true, false, false); + ConfigurationGroup *setHoriz = + new HorizontalConfigurationGroup(false, false, false, false); + + ConfigurationGroup* setLeft = + new VerticalConfigurationGroup(false, false, false, false); + ConfigurationGroup* setRight = + new VerticalConfigurationGroup(false, false, false, false); + + setLeft->addChild(LCDShowTime()); + setLeft->addChild(LCDShowMenu()); + setLeft->addChild(LCDShowMusic()); + setLeft->addChild(LCDShowMusicItems()); + setLeft->addChild(LCDShowChannel()); + setLeft->addChild(LCDShowRecStatus()); + setRight->addChild(LCDShowVolume()); + setRight->addChild(LCDShowGeneric()); + setRight->addChild(LCDBacklightOn()); + setRight->addChild(LCDHeartBeatOn()); + setRight->addChild(LCDBigClock()); + setRight->addChild(LCDKeyString()); + setHoriz->addChild(setLeft); + setHoriz->addChild(setRight); + settings->addChild(setHoriz); + settings->addChild(LCDPopupTime()); + + addTarget("1", settings); + + addTarget("0", new VerticalConfigurationGroup(true)); }; @@ -2877,237 +3518,284 @@ class LcdSettings : public TriggeredConfigurationGroup static HostCheckBox *MacGammaCorrect() { HostCheckBox *gc = new HostCheckBox("MacGammaCorrect"); - gc->setLabel(QObject::tr("Enable gamma correction for video")); + + gc->setLabel(PlaybackSettings::tr("Enable gamma correction for video")); + gc->setValue(false); - gc->setHelpText(QObject::tr("If enabled, QuickTime will correct the gamma " - "of the video to match your monitor. Turning this off can " - "save some CPU cycles.")); + + gc->setHelpText(PlaybackSettings::tr("If enabled, QuickTime will correct " + "the gamma of the video to match " + "your monitor. Turning this off can " + "save some CPU cycles.")); return gc; } static HostCheckBox *MacScaleUp() { HostCheckBox *gc = new HostCheckBox("MacScaleUp"); - gc->setLabel(QObject::tr("Scale video as necessary")); + + gc->setLabel(PlaybackSettings::tr("Scale video as necessary")); + gc->setValue(true); - gc->setHelpText(QObject::tr("If enabled, video will be scaled to fit your " - "window or screen. If unchecked, video will never be made " - "larger than its actual pixel size.")); + + gc->setHelpText(PlaybackSettings::tr("If enabled, video will be scaled to " + "fit your window or screen. If " + "unchecked, video will never be made " + "larger than its actual pixel size.")); return gc; } static HostSpinBox *MacFullSkip() { HostSpinBox *gs = new HostSpinBox("MacFullSkip", 0, 30, 1, true); - gs->setLabel(QObject::tr("Frames to skip in fullscreen mode")); + + gs->setLabel(PlaybackSettings::tr("Frames to skip in fullscreen mode")); + gs->setValue(0); - gs->setHelpText(QObject::tr("Video displayed in fullscreen or non-windowed " - "mode will skip this many frames for each frame drawn. " - "Set to 0 to show every frame. Only valid when either " - "\"Use GUI size for TV playback\" or \"Run the frontend " - "in a window\" is not checked.")); + + gs->setHelpText(PlaybackSettings::tr("Video displayed in fullscreen or " + "non-windowed mode will skip this " + "many frames for each frame drawn. " + "Set to 0 to show every frame. Only " + "valid when either \"Use GUI size for " + "TV playback\" or \"Run the frontend " + "in a window\" is not checked.")); return gs; } static HostCheckBox *MacMainEnabled() { HostCheckBox *gc = new HostCheckBox("MacMainEnabled"); - gc->setLabel(QObject::tr("Video in main window")); + + gc->setLabel(MacMainSettings::tr("Video in main window")); + gc->setValue(true); - gc->setHelpText(QObject::tr("If enabled, video will be displayed in the " - "main GUI window. Disable this when you only want video " - "on the desktop or in a floating window. Only valid when " - "\"Use GUI size for TV playback\" and \"Run the " - "frontend in a window\" are checked.")); + + gc->setHelpText(MacMainSettings::tr("If enabled, video will be displayed " + "in the main GUI window. Disable this " + "when you only want video on the " + "desktop or in a floating window. Only " + "valid when "\"Use GUI size for TV " + "playback\" and \"Run the frontend in " + "a window\" are checked.")); return gc; } static HostSpinBox *MacMainSkip() { HostSpinBox *gs = new HostSpinBox("MacMainSkip", 0, 30, 1, true); - gs->setLabel(QObject::tr("Frames to skip")); + + gs->setLabel(MacMainSettings::tr("Frames to skip")); + gs->setValue(0); - gs->setHelpText(QObject::tr("Video in the main window will skip this many " - "frames for each frame drawn. Set to 0 to show " - "every frame.")); + + gs->setHelpText(MacMainSettings::tr("Video in the main window will skip " + "this many frames for each frame " + "drawn. Set to 0 to show every " + "frame.")); return gs; } static HostSpinBox *MacMainOpacity() { HostSpinBox *gs = new HostSpinBox("MacMainOpacity", 0, 100, 5, false); - gs->setLabel(QObject::tr("Opacity")); + + gs->setLabel(MacMainSettings::tr("Opacity")); + gs->setValue(100); - gs->setHelpText(QObject::tr("The opacity of the main window. Set to " - "100 for completely opaque, set to 0 for completely " - "transparent.")); + + gs->setHelpText(MacMainSettings::tr("The opacity of the main window. Set " + "to 100 for completely opaque, set " + "to 0 for completely transparent.")); return gs; } -class MacMainSettings : public TriggeredConfigurationGroup +MacMainSettings::MacMainSettings() : TriggeredConfigurationGroup(false) { - public: - MacMainSettings() : TriggeredConfigurationGroup(false) - { - setLabel(QObject::tr("Video in main window")); - setUseLabel(false); - Setting *gc = MacMainEnabled(); - addChild(gc); - setTrigger(gc); - - VerticalConfigurationGroup *opts = - new VerticalConfigurationGroup(false, false); - opts->addChild(MacMainSkip()); - opts->addChild(MacMainOpacity()); - - addTarget("1", opts); - addTarget("0", new VerticalConfigurationGroup(false, false)); - } + setLabel(tr("Video in main window")); + setUseLabel(false); + Setting *gc = MacMainEnabled(); + addChild(gc); + setTrigger(gc); + + VerticalConfigurationGroup *opts = + new VerticalConfigurationGroup(false, false); + opts->addChild(MacMainSkip()); + opts->addChild(MacMainOpacity()); + + addTarget("1", opts); + addTarget("0", new VerticalConfigurationGroup(false, false)); + }; static HostCheckBox *MacFloatEnabled() { HostCheckBox *gc = new HostCheckBox("MacFloatEnabled"); - gc->setLabel(QObject::tr("Video in floating window")); + + gc->setLabel(MacFloatSettings::tr("Video in floating window")); + gc->setValue(false); - gc->setHelpText(QObject::tr("If enabled, video will be displayed in a " - "floating window. Only valid when \"Use GUI size for TV " - "playback\" and \"Run the frontend in a window\" are " - "checked.")); + + gc->setHelpText(MacFloatSettings::tr("If enabled, video will be displayed " + "in a floating window. Only valid " + "when \"Use GUI size for TV " + "playback\" and \"Run the frontend " + "in a window\" are checked.")); return gc; } static HostSpinBox *MacFloatSkip() { HostSpinBox *gs = new HostSpinBox("MacFloatSkip", 0, 30, 1, true); - gs->setLabel(QObject::tr("Frames to skip")); + + gs->setLabel(MacFloatSettings::tr("Frames to skip")); + gs->setValue(0); - gs->setHelpText(QObject::tr("Video in the floating window will skip " - "this many frames for each frame drawn. Set to 0 to show " - "every frame.")); + + gs->setHelpText(MacFloatSettings::tr("Video in the floating window will " + "skip this many frames for each " + "frame drawn. Set to 0 to show " + "every frame.")); return gs; } static HostSpinBox *MacFloatOpacity() { HostSpinBox *gs = new HostSpinBox("MacFloatOpacity", 0, 100, 5, false); - gs->setLabel(QObject::tr("Opacity")); + + gs->setLabel(MacFloatSettings::tr("Opacity")); + gs->setValue(100); - gs->setHelpText(QObject::tr("The opacity of the floating window. Set to " - "100 for completely opaque, set to 0 for completely " - "transparent.")); + + gs->setHelpText(MacFloatSettings::tr("The opacity of the floating window. " + "Set to 100 for completely opaque, " + "set to 0 for completely " + "transparent.")); return gs; } -class MacFloatSettings : public TriggeredConfigurationGroup +MacFloatSettings::MacFloatSettings() : TriggeredConfigurationGroup(false) { - public: - MacFloatSettings() : TriggeredConfigurationGroup(false) - { - setLabel(QObject::tr("Video in floating window")); - setUseLabel(false); - Setting *gc = MacFloatEnabled(); - addChild(gc); - setTrigger(gc); - - VerticalConfigurationGroup *opts = - new VerticalConfigurationGroup(false, false); - opts->addChild(MacFloatSkip()); - opts->addChild(MacFloatOpacity()); - - addTarget("1", opts); - addTarget("0", new VerticalConfigurationGroup(false, false)); - } + setLabel(tr("Video in floating window")); + + setUseLabel(false); + Setting *gc = MacFloatEnabled(); + addChild(gc); + setTrigger(gc); + + VerticalConfigurationGroup *opts = + new VerticalConfigurationGroup(false, false); + opts->addChild(MacFloatSkip()); + opts->addChild(MacFloatOpacity()); + + addTarget("1", opts); + addTarget("0", new VerticalConfigurationGroup(false, false)); + }; static HostCheckBox *MacDockEnabled() { HostCheckBox *gc = new HostCheckBox("MacDockEnabled"); - gc->setLabel(QObject::tr("Video in the dock")); + + gc->setLabel(MacDockSettings::tr("Video in the dock")); + gc->setValue(true); - gc->setHelpText(QObject::tr("If enabled, video will be displayed in the " - "application's dock icon. Only valid when \"Use GUI size " - "for TV playback\" and \"Run the frontend in a window\" " - "are checked.")); + + gc->setHelpText(MacDockSettings::tr("If enabled, video will be displayed " + "in the application's dock icon. Only " + "valid when \"Use GUI size for TV " + "playback\" and \"Run the frontend in " + "a window\" are checked.")); return gc; } static HostSpinBox *MacDockSkip() { HostSpinBox *gs = new HostSpinBox("MacDockSkip", 0, 30, 1, true); - gs->setLabel(QObject::tr("Frames to skip")); + + gs->setLabel(MacDockSettings::tr("Frames to skip")); + gs->setValue(3); - gs->setHelpText(QObject::tr("Video in the dock icon will skip this many " - "frames for each frame drawn. Set to 0 to show " - "every frame.")); + + gs->setHelpText(MacDockSettings::tr("Video in the dock icon will skip this " + "many frames for each frame drawn. Set " + "to 0 to show every frame.")); return gs; } -class MacDockSettings : public TriggeredConfigurationGroup +MacDockSettings::MacDockSettings() : TriggeredConfigurationGroup(false) { - public: - MacDockSettings() : TriggeredConfigurationGroup(false) - { - setLabel(QObject::tr("Video in the dock")); - setUseLabel(false); - Setting *gc = MacDockEnabled(); - addChild(gc); - setTrigger(gc); - - Setting *skip = MacDockSkip(); - addTarget("1", skip); - addTarget("0", new HorizontalConfigurationGroup(false, false)); - } + setLabel(tr("Video in the dock")); + setUseLabel(false); + Setting *gc = MacDockEnabled(); + addChild(gc); + setTrigger(gc); + + Setting *skip = MacDockSkip(); + addTarget("1", skip); + addTarget("0", new HorizontalConfigurationGroup(false, false)); + }; static HostCheckBox *MacDesktopEnabled() { HostCheckBox *gc = new HostCheckBox("MacDesktopEnabled"); - gc->setLabel(QObject::tr("Video on the desktop")); + + gc->setLabel(MacDesktopSettings::tr("Video on the desktop")); + gc->setValue(false); - gc->setHelpText(QObject::tr("If enabled, video will be displayed on the " - "desktop, behind the Finder icons. Only valid when \"Use " - "GUI size for TV playback\" and \"Run the frontend in a " - "window\" are checked.")); + + gc->setHelpText(MacDesktopSettings::tr("If enabled, video will be " + "displayed on the desktop, " + "behind the Finder icons. " + "Only valid when \"Use GUI " + "size for TV playback\" and " + "\"Run the frontend in a " + "window\" are checked.")); return gc; } static HostSpinBox *MacDesktopSkip() { HostSpinBox *gs = new HostSpinBox("MacDesktopSkip", 0, 30, 1, true); - gs->setLabel(QObject::tr("Frames to skip")); + + gs->setLabel(MacDesktopSettings::tr("Frames to skip")); + gs->setValue(0); - gs->setHelpText(QObject::tr("Video on the desktop will skip this many " - "frames for each frame drawn. Set to 0 to show " - "every frame.")); + + gs->setHelpText(MacDesktopSettings::tr("Video on the desktop will skip " + "this many frames for each frame " + "drawn. Set to 0 to show every " + "frame.")); return gs; } -class MacDesktopSettings : public TriggeredConfigurationGroup +MacDesktopSettings::MacDesktopSettings() : TriggeredConfigurationGroup(false) { - public: - MacDesktopSettings() : TriggeredConfigurationGroup(false) - { - setLabel(QObject::tr("Video on the desktop")); - setUseLabel(false); - Setting *gc = MacDesktopEnabled(); - addChild(gc); - setTrigger(gc); - - Setting *skip = MacDesktopSkip(); - addTarget("1", skip); - addTarget("0", new HorizontalConfigurationGroup(false, false)); - } + setLabel(tr("Video on the desktop")); + setUseLabel(false); + Setting *gc = MacDesktopEnabled(); + addChild(gc); + setTrigger(gc); + Setting *skip = MacDesktopSkip(); + addTarget("1", skip); + addTarget("0", new HorizontalConfigurationGroup(false, false)); + }; #endif static HostCheckBox *WatchTVGuide() { HostCheckBox *gc = new HostCheckBox("WatchTVGuide"); - gc->setLabel(QObject::tr("Show the program guide when starting Live TV")); - gc->setHelpText(QObject::tr("This starts the program guide immediately " - "upon starting to watch Live TV.")); + + gc->setLabel(EPGSettings::tr("Show the program guide when starting " + "Live TV")); + + gc->setHelpText(EPGSettings::tr("This starts the program guide immediately " + "upon starting to watch Live TV.")); + gc->setValue(false); + return gc; } @@ -3117,26 +3805,26 @@ MainGeneralSettings::MainGeneralSettings() VerticalConfigurationGroup *pin = new VerticalConfigurationGroup(false, true, false, false); - pin->setLabel(QObject::tr("Settings Access")); + pin->setLabel(tr("Settings Access")); pin->addChild(SetupPinCode()); addChild(pin); VerticalConfigurationGroup *general = new VerticalConfigurationGroup(false, true, false, false); - general->setLabel(QObject::tr("General")); + general->setLabel(tr("General")); general->addChild(UseVirtualKeyboard()); general->addChild(ScreenShotPath()); addChild(general); VerticalConfigurationGroup *media = new VerticalConfigurationGroup(false, true, false, false); - media->setLabel(QObject::tr("Media Monitor")); + media->setLabel(tr("Media Monitor")); media->addChild(IgnoreMedia()); addChild(media); VerticalConfigurationGroup *remotecontrol = new VerticalConfigurationGroup(false, true, false, false); - remotecontrol->setLabel(QObject::tr("Remote Control")); + remotecontrol->setLabel(tr("Remote Control")); remotecontrol->addChild(LircDaemonDevice()); remotecontrol->addChild(NetworkControlEnabled()); remotecontrol->addChild(NetworkControlPort()); @@ -3146,7 +3834,7 @@ MainGeneralSettings::MainGeneralSettings() #ifdef USING_AIRPLAY VerticalConfigurationGroup *airplay = new VerticalConfigurationGroup(false, true, false, false); - airplay->setLabel(QObject::tr("AirPlay Settings")); + airplay->setLabel(tr("AirPlay Settings")); airplay->addChild(AirPlayEnabled()); airplay->addChild(AirPlayFullScreen()); airplay->addChild(AirPlayAudioOnly()); @@ -3158,7 +3846,7 @@ MainGeneralSettings::MainGeneralSettings() VerticalConfigurationGroup *shutdownSettings = new VerticalConfigurationGroup(true, true, false, false); - shutdownSettings->setLabel(QObject::tr("Shutdown/Reboot Settings")); + shutdownSettings->setLabel(tr("Shutdown/Reboot Settings")); shutdownSettings->addChild(FrontendIdleTimeout()); shutdownSettings->addChild(OverrideExitMenu()); shutdownSettings->addChild(HaltCommand()); @@ -3176,8 +3864,10 @@ PlaybackSettings::PlaybackSettings() VerticalConfigurationGroup* general1 = new VerticalConfigurationGroup(false); - general1->setLabel(QObject::tr("General Playback") + - QString(" (%1/%2)").arg(++i).arg(total)); + + //: %2 is the position, %2 is the total + general1->setLabel(tr("General Playback (%1/%2)") + .arg(++i).arg(total)); HorizontalConfigurationGroup *columns = new HorizontalConfigurationGroup(false, false, true, true); @@ -3206,8 +3896,10 @@ PlaybackSettings::PlaybackSettings() VerticalConfigurationGroup* general2 = new VerticalConfigurationGroup(false); - general2->setLabel(QObject::tr("General Playback") + - QString(" (%1/%2)").arg(++i).arg(total)); + + //" %1 is the position, %2 is the total + general2->setLabel(tr("General Playback (%1/%2)") + .arg(++i).arg(total)); HorizontalConfigurationGroup* oscan = new HorizontalConfigurationGroup(false, false, true, true); @@ -3239,8 +3931,10 @@ PlaybackSettings::PlaybackSettings() addChild(new PlaybackProfileConfigs(tmp)); VerticalConfigurationGroup* pbox = new VerticalConfigurationGroup(false); - pbox->setLabel(QObject::tr("View Recordings") + - QString(" (%1/%2)").arg(++i).arg(total)); + + //: %1 is the position, %2 is the total + pbox->setLabel(tr("View Recordings (%1/%2)").arg(++i).arg(total)); + pbox->addChild(PlayBoxOrdering()); pbox->addChild(PlayBoxEpisodeSort()); // Disabled until we re-enable live previews @@ -3250,50 +3944,67 @@ PlaybackSettings::PlaybackSettings() addChild(pbox); VerticalConfigurationGroup* pbox2 = new VerticalConfigurationGroup(false); - pbox2->setLabel(QObject::tr("Recording Groups") + - QString(" (%1/%2)").arg(++i).arg(total)); + + //: %1 is the position, %2 is the total + pbox2->setLabel(tr("Recording Groups (%1/%2)").arg(++i).arg(total)); + pbox2->addChild(DisplayRecGroup()); pbox2->addChild(QueryInitialFilter()); pbox2->addChild(RememberRecGroup()); + addChild(pbox2); VerticalConfigurationGroup* pbox3 = new VerticalConfigurationGroup(false); - pbox3->setLabel(QObject::tr("View Recordings") + - QString(" (%1/%2)").arg(++i).arg(total)); + + //: %1 is the position, %2 is the total + pbox3->setLabel(tr("View Recordings (%1/%2)").arg(++i).arg(total)); + pbox3->addChild(DisplayGroupTitleSort()); pbox3->addChild(new WatchListSettings()); + addChild(pbox3); VerticalConfigurationGroup* seek = new VerticalConfigurationGroup(false); - seek->setLabel(QObject::tr("Seeking") + - QString(" (%1/%2)").arg(++i).arg(total)); + + //: %1 is the position, %2 is the total + seek->setLabel(tr("Seeking (%1/%2)").arg(++i).arg(total)); + seek->addChild(SmartForward()); seek->addChild(FFRewReposTime()); seek->addChild(FFRewReverse()); + addChild(seek); VerticalConfigurationGroup* comms = new VerticalConfigurationGroup(false); - comms->setLabel(QObject::tr("Commercial Skip") + - QString(" (%1/%2)").arg(++i).arg(total)); + + //: %1 is the position, %2 is the total + comms->setLabel(tr("Commercial Skip (%1/%2)").arg(++i).arg(total)); + comms->addChild(AutoCommercialSkip()); comms->addChild(CommRewindAmount()); comms->addChild(CommNotifyAmount()); comms->addChild(MaximumCommercialSkip()); comms->addChild(MergeShortCommBreaks()); + addChild(comms); #if CONFIG_DARWIN VerticalConfigurationGroup* mac1 = new VerticalConfigurationGroup(false); - mac1->setLabel(QObject::tr("Mac OS X Video Settings") + - QString(" (%1/%2)").arg(++i).arg(total)); + + //: %1 is the position, %2 is the total + mac1->setLabel(tr("Mac OS X Video Setting (%1/%2)").arg(++i).arg(total)); + mac1->addChild(MacGammaCorrect()); mac1->addChild(MacScaleUp()); mac1->addChild(MacFullSkip()); + addChild(mac1); VerticalConfigurationGroup* mac2 = new VerticalConfigurationGroup(false); - mac2->setLabel(QObject::tr("Mac OS X Video Settings") + - QString(" (%1/%2)").arg(++i).arg(total)); + + //: %1 is the position, %2 is the total + mac2->setLabel(tr("Mac OS X Video Settings (%1/%2)").arg(++i).arg(total)); + mac2->addChild(new MacMainSettings()); mac2->addChild(new MacFloatSettings()); @@ -3310,17 +4021,19 @@ PlaybackSettings::PlaybackSettings() OSDSettings::OSDSettings() { VerticalConfigurationGroup* osd = new VerticalConfigurationGroup(false); - osd->setLabel(QObject::tr("On-screen Display")); + + osd->setLabel(tr("On-screen Display")); osd->addChild(EnableMHEG()); osd->addChild(PersistentBrowseMode()); osd->addChild(BrowseAllTuners()); osd->addChild(DefaultCCMode()); osd->addChild(SubtitleCodec()); + addChild(osd); //VerticalConfigurationGroup *cc = new VerticalConfigurationGroup(false); - //cc->setLabel(QObject::tr("Closed Captions")); + //cc->setLabel(tr("Closed Captions")); //cc->addChild(DecodeVBIFormat()); //addChild(cc); @@ -3332,29 +4045,36 @@ OSDSettings::OSDSettings() GeneralSettings::GeneralSettings() { VerticalConfigurationGroup* general = new VerticalConfigurationGroup(false); - general->setLabel(QObject::tr("General (Basic)")); + + general->setLabel(tr("General (Basic)")); general->addChild(ChannelOrdering()); general->addChild(ChannelFormat()); general->addChild(LongChannelFormat()); + addChild(general); VerticalConfigurationGroup* autoexp = new VerticalConfigurationGroup(false); - autoexp->setLabel(QObject::tr("General (Auto-Expire)")); + + autoexp->setLabel(tr("General (Auto-Expire)")); + autoexp->addChild(AutoExpireMethod()); VerticalConfigurationGroup *expgrp0 = new VerticalConfigurationGroup(false, false, true, true); + expgrp0->addChild(RerecordWatched()); expgrp0->addChild(AutoExpireWatchedPriority()); VerticalConfigurationGroup *expgrp1 = new VerticalConfigurationGroup(false, false, true, true); + expgrp1->addChild(AutoExpireLiveTVMaxAge()); expgrp1->addChild(AutoExpireDayPriority()); expgrp1->addChild(AutoExpireExtraSpace()); HorizontalConfigurationGroup *expgrp = new HorizontalConfigurationGroup(false, false, true, true); + expgrp->addChild(expgrp0); expgrp->addChild(expgrp1); @@ -3365,7 +4085,9 @@ GeneralSettings::GeneralSettings() addChild(autoexp); VerticalConfigurationGroup* jobs = new VerticalConfigurationGroup(false); - jobs->setLabel(QObject::tr("General (Jobs)")); + + jobs->setLabel(tr("General (Jobs)")); + jobs->addChild(CommercialSkipMethod()); jobs->addChild(CommFlagFast()); jobs->addChild(AggressiveCommDetect()); @@ -3374,56 +4096,68 @@ GeneralSettings::GeneralSettings() addChild(jobs); VerticalConfigurationGroup* general2 = new VerticalConfigurationGroup(false); - general2->setLabel(QObject::tr("General (Advanced)")); + + general2->setLabel(tr("General (Advanced)")); + general2->addChild(RecordPreRoll()); general2->addChild(RecordOverTime()); general2->addChild(CategoryOverTimeSettings()); addChild(general2); VerticalConfigurationGroup* changrp = new VerticalConfigurationGroup(false); - changrp->setLabel(QObject::tr("General (Channel Groups)")); + + changrp->setLabel(tr("General (Channel Groups)")); + ChannelGroupSettings *changroupsettings = new ChannelGroupSettings(); changrp->addChild(changroupsettings); changrp->addChild(BrowseChannelGroup()); + addChild(changrp); } EPGSettings::EPGSettings() { VerticalConfigurationGroup* epg = new VerticalConfigurationGroup(false); - epg->setLabel(QObject::tr("Program Guide") + " 1/1"); + + epg->setLabel(tr("Program Guide %1/%2").arg("1").arg("2")); + epg->addChild(WatchTVGuide()); epg->addChild(DefaultTVChannel()); epg->addChild(EPGRecThreshold()); + addChild(epg); } GeneralRecPrioritiesSettings::GeneralRecPrioritiesSettings() { VerticalConfigurationGroup* sched = new VerticalConfigurationGroup(false); - sched->setLabel(QObject::tr("Scheduler Options")); + + sched->setLabel(tr("Scheduler Options")); sched->addChild(GRSchedOpenEnd()); sched->addChild(GRPrefInputRecPriority()); sched->addChild(GRHDTVRecPriority()); sched->addChild(GRWSRecPriority()); + addChild(sched); VerticalConfigurationGroup* access = new VerticalConfigurationGroup(false); - access->setLabel(QObject::tr("Accessibility Options")); + + access->setLabel(tr("Accessibility Options")); access->addChild(GRSignLangRecPriority()); access->addChild(GROnScrSubRecPriority()); access->addChild(GRCCRecPriority()); access->addChild(GRHardHearRecPriority()); access->addChild(GRAudioDescRecPriority()); + addChild(access); } AppearanceSettings::AppearanceSettings() { VerticalConfigurationGroup* screen = new VerticalConfigurationGroup(false); - screen->setLabel(QObject::tr("Theme") + " / " + QObject::tr("Screen Settings")); + screen->setLabel(tr("Theme / Screen Settings")); #if ! CONFIG_DARWIN screen->addChild(ThemePainter()); @@ -3474,13 +4208,16 @@ AppearanceSettings::AppearanceSettings() addChild(new VideoModeSettings()); #endif VerticalConfigurationGroup* dates = new VerticalConfigurationGroup(false); - dates->setLabel(QObject::tr("Localization")); + + dates->setLabel(tr("Localization")); + dates->addChild(MythLanguage()); dates->addChild(ISO639PreferredLanguage(0)); dates->addChild(ISO639PreferredLanguage(1)); dates->addChild(MythDateFormatCB()); dates->addChild(MythShortDateFormat()); dates->addChild(MythTimeFormat()); + addChild(dates); addChild(new LcdSettings()); diff --git a/mythtv/programs/mythfrontend/globalsettings.h b/mythtv/programs/mythfrontend/globalsettings.h index a714919988f..a0872aee7b2 100644 --- a/mythtv/programs/mythfrontend/globalsettings.h +++ b/mythtv/programs/mythfrontend/globalsettings.h @@ -3,6 +3,7 @@ #include #include +#include #include "settings.h" #include "mythcontext.h" @@ -14,42 +15,125 @@ class QFileInfo; class PlaybackSettings : public ConfigurationWizard { + Q_DECLARE_TR_FUNCTIONS(PlaybackSettings) + public: PlaybackSettings(); }; -class OSDSettings: virtual public ConfigurationWizard +class VideoModeSettings : public TriggeredConfigurationGroup { + Q_OBJECT + + public: + VideoModeSettings(); +}; + +class LcdSettings : public TriggeredConfigurationGroup +{ + Q_OBJECT + + public: + LcdSettings(); +}; + + +class WatchListSettings : public TriggeredConfigurationGroup +{ + Q_OBJECT + + public: + WatchListSettings(); +}; + +class ChannelGroupSettings : public TriggeredConfigurationGroup +{ + Q_OBJECT + + public: + ChannelGroupSettings(); +}; + +#if CONFIG_DARWIN +class MacMainSettings : public TriggeredConfigurationGroup +{ + Q_OBJECT + + public: + MacMainSettings(); +}; + +class MacFloatSettings : public TriggeredConfigurationGroup +{ + Q_OBJECT + + public: + MacFloatSettings(); +}; + + +class MacDockSettings : public TriggeredConfigurationGroup +{ + Q_OBJECT + + public: + MacDockSettings(); +}; + + +class MacDesktopSettings : public TriggeredConfigurationGroup +{ + Q_OBJECT + + public: + MacDesktopSettings(); +}; +#endif + +class OSDSettings : virtual public ConfigurationWizard +{ + Q_DECLARE_TR_FUNCTIONS(OSDSettings) + public: OSDSettings(); }; class GeneralSettings : public ConfigurationWizard { + Q_DECLARE_TR_FUNCTIONS(GeneralSettings) + public: GeneralSettings(); }; class EPGSettings : public ConfigurationWizard { + Q_DECLARE_TR_FUNCTIONS(EPGSettings) + public: EPGSettings(); }; class AppearanceSettings : public ConfigurationWizard { + Q_DECLARE_TR_FUNCTIONS(AppearanceSettings) + public: AppearanceSettings(); }; class MainGeneralSettings : public ConfigurationWizard { + Q_DECLARE_TR_FUNCTIONS(MainGeneralSettings) + public: MainGeneralSettings(); }; class GeneralRecPrioritiesSettings : public ConfigurationWizard { + Q_DECLARE_TR_FUNCTIONS(GeneralRecPrioritiesSettings) + public: GeneralRecPrioritiesSettings(); };