19 bool foundtheme = LoadWindowFromXML(
"video-ui.xml",
"playersettings",
this);
24 dynamic_cast<MythUITextEdit *> (GetChild(
"defaultplayer"));
25 m_dvdPlayerEdit = dynamic_cast<MythUITextEdit *> (GetChild(
"dvdplayer"));
26 m_dvdDriveEdit = dynamic_cast<MythUITextEdit *> (GetChild(
"dvddrive"));
28 dynamic_cast<MythUITextEdit *> (GetChild(
"bluraymount"));
29 m_altPlayerEdit = dynamic_cast<MythUITextEdit *> (GetChild(
"altplayer"));
32 dynamic_cast<MythUIButtonList *> (GetChild(
"blurayregionlist"));
34 m_altCheck = dynamic_cast<MythUICheckBox *> (GetChild(
"altcheck"));
36 m_okButton = dynamic_cast<MythUIButton *> (GetChild(
"ok"));
37 m_cancelButton = dynamic_cast<MythUIButton *> (GetChild(
"cancel"));
39 if (!m_defaultPlayerEdit || !m_dvdPlayerEdit || !m_blurayRegionList ||
40 !m_altCheck || !m_altPlayerEdit || !m_dvdDriveEdit ||
41 !m_blurayMountEdit || !m_okButton || !m_cancelButton)
43 LOG(VB_GENERAL, LOG_ERR,
"Theme is missing critical theme elements.");
55 GetSetting(
"mythdvd.DVDPlayerCommand",
"Internal"));
61 "mythvideo.VideoAlternatePlayer",
"Internal"));
64 m_altPlayerEdit->SetVisible(
true);
66 m_altPlayerEdit->SetVisible(
false);
68 connect(m_okButton, SIGNAL(Clicked()),
this, SLOT(slotSave()));
69 connect(m_cancelButton, SIGNAL(Clicked()),
this, SLOT(Close()));
71 connect(m_altCheck, SIGNAL(valueChanged()), SLOT(toggleAlt()));
73 m_defaultPlayerEdit->SetHelpText(
74 tr(
"This is the command used for any file " 75 "whose extension is not specifically defined. " 76 "You may also enter the name of one of the playback " 77 "plugins such as 'Internal'."));
78 m_dvdPlayerEdit->SetHelpText(
79 tr(
"This can be any command to launch a DVD " 80 " player. Internal is the default. For other players, %d " 81 "will be substituted for the DVD device (e.g. /dev/dvd)."));
82 m_dvdDriveEdit->SetHelpText(
83 tr(
"This device must exist, and the user " 84 "playing the DVD needs to have read permission " 85 "on the device. 'default' will let the " 86 "MediaMonitor choose a device."));
87 m_blurayMountEdit->SetHelpText(
88 tr(
"This path is the location your " 89 "operating system mounts Blu-ray discs."));
90 m_altPlayerEdit->SetHelpText(
91 tr(
"If for some reason the default player " 92 "doesn't play a video, you can play it in an alternate " 93 "player by selecting 'Play in Alternate Player.'"));
94 m_blurayRegionList->SetHelpText(
95 tr(
"Some Blu-ray discs require that a player region be " 96 "explicitly set. Only change the value from " 97 "'No Region' if you encounter a disc which " 98 "fails to play citing a region mismatch."));
99 m_cancelButton->SetHelpText(tr(
"Exit without saving settings"));
100 m_okButton->SetHelpText(tr(
"Save settings and Exit"));
118 m_blurayRegionList->GetItemCurrent()->GetData().toInt());
130 if (GetFocusWidget()->keyPressEvent(event))
142 m_altPlayerEdit->SetVisible(checkstate != 0);
149 noRegion->SetData(0);
153 "The Americas, Southeast Asia, Japan"));
158 "Europe, Middle East, Africa, Oceania"));
163 "Eastern Europe, Central and South Asia"));
171 m_blurayRegionList->SetItemCurrent(item);
void SaveSetting(const QString &key, int newValue)
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
bool keyPressEvent(QKeyEvent *) override
Key event handler.
void fillRegionList(void)
QString GetSetting(const QString &key, const QString &defaultval="")
bool Create(void) override
int GetNumSetting(const QString &key, int defaultval=0)
bool keyPressEvent(QKeyEvent *) override
Key event handler.
#define LOG(_MASK_, _LEVEL_, _STRING_)