本文整理汇总了C++中BaseSettingControlPtr::GetID方法的典型用法代码示例。如果您正苦于以下问题:C++ BaseSettingControlPtr::GetID方法的具体用法?C++ BaseSettingControlPtr::GetID怎么用?C++ BaseSettingControlPtr::GetID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseSettingControlPtr
的用法示例。
在下文中一共展示了BaseSettingControlPtr::GetID方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateControls
void CGUIDialogMediaFilter::UpdateControls()
{
for (map<std::string, Filter>::iterator itFilter = m_filters.begin(); itFilter != m_filters.end(); itFilter++)
{
if (itFilter->second.controlType != "list")
continue;
std::vector<std::string> items;
int size = GetItems(itFilter->second, items, true);
std::string label = g_localizeStrings.Get(itFilter->second.label);
BaseSettingControlPtr control = GetSettingControl(itFilter->second.setting->GetId());
if (control == NULL)
continue;
if (size <= 0 ||
(size == 1 && itFilter->second.field != FieldSet && itFilter->second.field != FieldTag))
CONTROL_DISABLE(control->GetID());
else
{
CONTROL_ENABLE(control->GetID());
label = StringUtils::Format(g_localizeStrings.Get(21470).c_str(), label.c_str(), size);
}
SET_CONTROL_LABEL(control->GetID(), label);
}
}
示例2: SetButtonLabels
void CGUIDialogPVRTimerSettings::SetButtonLabels()
{
// timer start time
BaseSettingControlPtr settingControl = GetSettingControl(SETTING_TMR_BEGIN);
if (settingControl != NULL && settingControl->GetControl() != NULL)
{
if (!m_bIsNewTimer && m_bStartAnytime)
SET_CONTROL_LABEL2(settingControl->GetID(), g_localizeStrings.Get(19161)); // "any time"
else
SET_CONTROL_LABEL2(settingControl->GetID(), m_timerStartTimeStr);
}
// timer end time
settingControl = GetSettingControl(SETTING_TMR_END);
if (settingControl != NULL && settingControl->GetControl() != NULL)
{
if (!m_bIsNewTimer && m_bEndAnytime)
SET_CONTROL_LABEL2(settingControl->GetID(), g_localizeStrings.Get(19161)); // "any time"
else
SET_CONTROL_LABEL2(settingControl->GetID(), m_timerEndTimeStr);
}
// weekdays
settingControl = GetSettingControl(SETTING_TMR_WEEKDAYS);
if (settingControl != NULL && settingControl->GetControl() != NULL)
SET_CONTROL_LABEL2(settingControl->GetID(),
CPVRTimerInfoTag::GetWeekdaysString(
m_iWeekdays, m_timerType->IsEpgBased(), true));
}
示例3: ToggleState
void CGUIDialogContentSettings::ToggleState(const std::string &settingid, bool enabled)
{
BaseSettingControlPtr settingControl = GetSettingControl(settingid);
if (settingControl != NULL && settingControl->GetControl() != NULL)
{
if (enabled)
CONTROL_ENABLE(settingControl->GetID());
else
CONTROL_DISABLE(settingControl->GetID());
}
}
示例4: setButtonLabels
void CGUIDialogPVRTimerSettings::setButtonLabels()
{
// timer start time
BaseSettingControlPtr settingControl = GetSettingControl(SETTING_TMR_BEGIN);
if (settingControl != NULL && settingControl->GetControl() != NULL)
SET_CONTROL_LABEL2(settingControl->GetID(), m_timerStartTimeStr);
// timer end time
settingControl = GetSettingControl(SETTING_TMR_END);
if (settingControl != NULL && settingControl->GetControl() != NULL)
SET_CONTROL_LABEL2(settingControl->GetID(), m_timerEndTimeStr);
}
示例5: OnProtocolChange
void CGUIDialogNetworkSetup::OnProtocolChange()
{
BaseSettingControlPtr settingControl = GetSettingControl(SETTING_PROTOCOL);
if (settingControl != NULL && settingControl->GetControl() != NULL)
{
CGUIMessage msg(GUI_MSG_ITEM_SELECTED, GetID(), settingControl->GetID());
if (!OnMessage(msg))
return;
m_protocol = (NET_PROTOCOL)msg.GetParam1();
// set defaults for the port
if (m_protocol == NET_PROTOCOL_FTP)
m_port = "21";
else if (m_protocol == NET_PROTOCOL_HTTP ||
m_protocol == NET_PROTOCOL_RSS ||
m_protocol == NET_PROTOCOL_DAV)
m_port = "80";
else if (m_protocol == NET_PROTOCOL_HTTPS || m_protocol == NET_PROTOCOL_DAVS)
m_port = "443";
else if (m_protocol == NET_PROTOCOL_SFTP)
m_port = "22";
else
m_port = "0";
UpdateButtons();
}
}
示例6: setLockCodeLabel
void CGUIDialogLockSettings::setLockCodeLabel()
{
// adjust label2 of the lock code button
if (m_locks.mode > LOCK_MODE_QWERTY)
m_locks.mode = LOCK_MODE_EVERYONE;
BaseSettingControlPtr settingControl = GetSettingControl(SETTING_LOCKCODE);
if (settingControl != NULL && settingControl->GetControl() != NULL)
SET_CONTROL_LABEL2(settingControl->GetID(), g_localizeStrings.Get(m_locks.mode == LOCK_MODE_EVERYONE ? 1223 : 12336 + m_locks.mode));
}
示例7: UpdateSettingControl
void CGUIDialogSettingsBase::UpdateSettingControl(BaseSettingControlPtr pSettingControl)
{
if (pSettingControl == NULL)
return;
// we send a thread message so that it's processed the following frame (some settings won't
// like being changed during Render())
CGUIMessage message(GUI_MSG_UPDATE_ITEM, GetID(), pSettingControl->GetID());
g_windowManager.SendThreadMessage(message, GetID());
}
示例8: OnDeinitWindow
void CGUIDialogNetworkSetup::OnDeinitWindow(int nextWindowID)
{
// clear protocol spinner
BaseSettingControlPtr settingControl = GetSettingControl(SETTING_PROTOCOL);
if (settingControl != NULL && settingControl->GetControl() != NULL)
{
CGUIMessage msg(GUI_MSG_LABEL_RESET, GetID(), settingControl->GetID());
OnMessage(msg);
}
CGUIDialogSettingsManualBase::OnDeinitWindow(nextWindowID);
}
示例9: SetFocus
void CGUIDialogContentSettings::SetFocus(const std::string &settingid)
{
BaseSettingControlPtr settingControl = GetSettingControl(settingid);
if (settingControl != NULL && settingControl->GetControl() != NULL)
SET_CONTROL_FOCUS(settingControl->GetID(), 0);
}
示例10: GetSettingControl
void CGUIDialogContentSettings::SetLabel2(const std::string &settingid, const std::string &label)
{
BaseSettingControlPtr settingControl = GetSettingControl(settingid);
if (settingControl != NULL && settingControl->GetControl() != NULL)
SET_CONTROL_LABEL2(settingControl->GetID(), label);
}
示例11: updateProfileDirectory
void CGUIDialogProfileSettings::updateProfileDirectory()
{
BaseSettingControlPtr settingControl = GetSettingControl(SETTING_PROFILE_DIRECTORY);
if (settingControl != NULL && settingControl->GetControl() != NULL)
SET_CONTROL_LABEL2(settingControl->GetID(), m_directory);
}
示例12: UpdateProfileImage
void CGUIDialogProfileSettings::UpdateProfileImage()
{
BaseSettingControlPtr settingControl = GetSettingControl(SETTING_PROFILE_IMAGE);
if (settingControl != NULL && settingControl->GetControl() != NULL)
SET_CONTROL_LABEL2(settingControl->GetID(), URIUtils::GetFileName(m_thumb));
}
示例13: UpdateButtons
void CGUIDialogNetworkSetup::UpdateButtons()
{
// Address label
BaseSettingControlPtr addressControl = GetSettingControl(SETTING_SERVER_ADDRESS);
if (addressControl != NULL && addressControl->GetControl() != NULL)
{
int addressControlID = addressControl->GetID();
SET_CONTROL_LABEL2(addressControlID, m_server);
if (m_protocol == NET_PROTOCOL_SMB)
{
SET_CONTROL_LABEL(addressControlID, 1010); // Server name
}
else
{
SET_CONTROL_LABEL(addressControlID, 1009); // Server Address
}
SendMessage(GUI_MSG_SET_TYPE, addressControlID, CGUIEditControl::INPUT_TYPE_TEXT, 1016);
}
// remote path
BaseSettingControlPtr pathControl = GetSettingControl(SETTING_REMOTE_PATH);
if (pathControl != NULL && pathControl->GetControl() != NULL)
{
int pathControlID = pathControl->GetID();
SET_CONTROL_LABEL2(pathControlID, m_path);
CONTROL_ENABLE_ON_CONDITION(pathControlID, m_protocol != NET_PROTOCOL_UPNP);
if (m_protocol == NET_PROTOCOL_FTP ||
m_protocol == NET_PROTOCOL_HTTP ||
m_protocol == NET_PROTOCOL_HTTPS ||
m_protocol == NET_PROTOCOL_RSS ||
m_protocol == NET_PROTOCOL_DAV ||
m_protocol == NET_PROTOCOL_DAVS||
m_protocol == NET_PROTOCOL_SFTP||
m_protocol == NET_PROTOCOL_NFS)
{
SET_CONTROL_LABEL(pathControlID, 1011); // Remote Path
}
else
{
SET_CONTROL_LABEL(pathControlID, 1012); // Shared Folder
}
SendMessage(GUI_MSG_SET_TYPE, pathControlID, CGUIEditControl::INPUT_TYPE_TEXT, 1017);
}
// username
BaseSettingControlPtr userControl = GetSettingControl(SETTING_USERNAME);
if (userControl != NULL && userControl->GetControl() != NULL)
{
int userControlID = userControl->GetID();
SET_CONTROL_LABEL2(userControlID, m_username);
CONTROL_ENABLE_ON_CONDITION(userControlID, m_protocol != NET_PROTOCOL_UPNP &&
m_protocol != NET_PROTOCOL_NFS);
SendMessage(GUI_MSG_SET_TYPE, userControlID, CGUIEditControl::INPUT_TYPE_TEXT, 1019);
}
// port
BaseSettingControlPtr portControl = GetSettingControl(SETTING_PORT_NUMBER);
if (portControl != NULL && portControl->GetControl() != NULL)
{
int portControlID = portControl->GetID();
SET_CONTROL_LABEL2(portControlID, m_port);
CONTROL_ENABLE_ON_CONDITION(portControlID, m_protocol == NET_PROTOCOL_FTP ||
m_protocol == NET_PROTOCOL_HTTP ||
m_protocol == NET_PROTOCOL_HTTPS ||
m_protocol == NET_PROTOCOL_DAV ||
m_protocol == NET_PROTOCOL_DAVS ||
m_protocol == NET_PROTOCOL_RSS ||
m_protocol == NET_PROTOCOL_SFTP);
SendMessage(GUI_MSG_SET_TYPE, portControlID, CGUIEditControl::INPUT_TYPE_NUMBER, 1018);
}
// password
BaseSettingControlPtr passControl = GetSettingControl(SETTING_PASSWORD);
if (passControl != NULL && passControl->GetControl() != NULL)
{
int passControlID = passControl->GetID();
SET_CONTROL_LABEL2(passControlID, m_password);
CONTROL_ENABLE_ON_CONDITION(passControlID, m_protocol != NET_PROTOCOL_UPNP &&
m_protocol != NET_PROTOCOL_NFS);
SendMessage(GUI_MSG_SET_TYPE, passControlID, CGUIEditControl::INPUT_TYPE_PASSWORD, 12326);
}
// server browse should be disabled if we are in FTP, HTTP, HTTPS, RSS, DAV or DAVS
BaseSettingControlPtr browseControl = GetSettingControl(SETTING_SERVER_BROWSE);
if (browseControl != NULL && browseControl->GetControl() != NULL)
{
int browseControlID = browseControl->GetID();
CONTROL_ENABLE_ON_CONDITION(browseControlID, !m_server.empty() || !(m_protocol == NET_PROTOCOL_FTP ||
m_protocol == NET_PROTOCOL_HTTP ||
m_protocol == NET_PROTOCOL_HTTPS ||
m_protocol == NET_PROTOCOL_DAV ||
m_protocol == NET_PROTOCOL_DAVS ||
m_protocol == NET_PROTOCOL_RSS ||
m_protocol == NET_PROTOCOL_SFTP));
}
}