当前位置: 首页>>代码示例>>C++>>正文


C++ BaseSettingControlPtr::GetControl方法代码示例

本文整理汇总了C++中BaseSettingControlPtr::GetControl方法的典型用法代码示例。如果您正苦于以下问题:C++ BaseSettingControlPtr::GetControl方法的具体用法?C++ BaseSettingControlPtr::GetControl怎么用?C++ BaseSettingControlPtr::GetControl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BaseSettingControlPtr的用法示例。


在下文中一共展示了BaseSettingControlPtr::GetControl方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: 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));
}
开发者ID:Greihawk,项目名称:xbmc,代码行数:29,代码来源:GUIDialogPVRTimerSettings.cpp

示例2: CheckDependency

void CGUIWindowSettingsCategory::CheckDependency(BaseSettingControlPtr pSettingControl, const CSettingDependency &dependency)
{
  if (pSettingControl == NULL || pSettingControl->GetControl() == NULL)
    return;

  CSetting *pSetting = pSettingControl->GetSetting();
  if (pSetting == NULL)
    return;

  switch (dependency.GetType())
  {
    case SettingDependencyTypeEnable:
      pSettingControl->SetEnabled(dependency.Check());
      break;

    case SettingDependencyTypeUpdate:
    {
      FillControl(pSetting, pSettingControl->GetControl());
      break;
    }

    case SettingDependencyTypeNone:
    default:
      break;
  }
}
开发者ID:,项目名称:,代码行数:26,代码来源:

示例3: 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);
}
开发者ID:Inz999,项目名称:xbmc,代码行数:12,代码来源:GUIDialogPVRTimerSettings.cpp

示例4: 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();
  }
}
开发者ID:LS80,项目名称:xbmc,代码行数:26,代码来源:GUIDialogNetworkSetup.cpp

示例5: UpdateSettings

void CGUIWindowSettingsCategory::UpdateSettings()
{
  for (vector<BaseSettingControlPtr>::iterator it = m_settingControls.begin(); it != m_settingControls.end(); it++)
  {
    BaseSettingControlPtr pSettingControl = *it;
    CSetting *pSetting = pSettingControl->GetSetting();
    CGUIControl *pControl = pSettingControl->GetControl();
    if (pSetting == NULL || pControl == NULL)
      continue;

    // update the setting's control's state (enabled/disabled etc)
    const SettingDependencies &deps = pSetting->GetDependencies();
    for (SettingDependencies::const_iterator dep = deps.begin(); dep != deps.end(); dep++)
    {
      // don't check "update" dependencies here as all the controls are already
      // setup properly based on the existing values
      if (dep->GetType() == SettingDependencyTypeUpdate)
        continue;

      CheckDependency(pSettingControl, *dep);
    }

    pSettingControl->Update();
  }
}
开发者ID:,项目名称:,代码行数:25,代码来源:

示例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));
}
开发者ID:micahg,项目名称:xbmc,代码行数:9,代码来源:GUIDialogLockSettings.cpp

示例7: 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());
  }
}
开发者ID:FLyrfors,项目名称:xbmc,代码行数:11,代码来源:GUIDialogContentSettings.cpp

示例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);
}
开发者ID:LS80,项目名称:xbmc,代码行数:12,代码来源:GUIDialogNetworkSetup.cpp

示例9: UpdateSettings

void CGUIDialogSettingsBase::UpdateSettings()
{
  for (vector<BaseSettingControlPtr>::iterator it = m_settingControls.begin(); it != m_settingControls.end(); it++)
  {
    BaseSettingControlPtr pSettingControl = *it;
    CSetting *pSetting = pSettingControl->GetSetting();
    CGUIControl *pControl = pSettingControl->GetControl();
    if (pSetting == NULL || pControl == NULL)
      continue;

    pSettingControl->Update();
  }
}
开发者ID:7orlum,项目名称:xbmc,代码行数:13,代码来源:GUIDialogSettingsBase.cpp

示例10: SetFocus

void CGUIDialogContentSettings::SetFocus(const std::string &settingid)
{
  BaseSettingControlPtr settingControl = GetSettingControl(settingid);
  if (settingControl != NULL && settingControl->GetControl() != NULL)
    SET_CONTROL_FOCUS(settingControl->GetID(), 0);
}
开发者ID:FLyrfors,项目名称:xbmc,代码行数:6,代码来源:GUIDialogContentSettings.cpp

示例11: 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);
}
开发者ID:FLyrfors,项目名称:xbmc,代码行数:6,代码来源:GUIDialogContentSettings.cpp

示例12: updateProfileDirectory

void CGUIDialogProfileSettings::updateProfileDirectory()
{
  BaseSettingControlPtr settingControl = GetSettingControl(SETTING_PROFILE_DIRECTORY);
  if (settingControl != NULL && settingControl->GetControl() != NULL)
    SET_CONTROL_LABEL2(settingControl->GetID(), m_directory);
}
开发者ID:,项目名称:,代码行数:6,代码来源:

示例13: 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));
}
开发者ID:,项目名称:,代码行数:6,代码来源:

示例14: 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));
  }
}
开发者ID:LS80,项目名称:xbmc,代码行数:99,代码来源:GUIDialogNetworkSetup.cpp


注:本文中的BaseSettingControlPtr::GetControl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。