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


C++ UpdateSettings函数代码示例

本文整理汇总了C++中UpdateSettings函数的典型用法代码示例。如果您正苦于以下问题:C++ UpdateSettings函数的具体用法?C++ UpdateSettings怎么用?C++ UpdateSettings使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: switch

void
OutputView::MessageReceived(BMessage *message)
{
	switch (message->what) {
		case kCheckBoxAreaSelectionChanged:
			_UpdatePreview(NULL);
			break;	
		
		case kMsgControllerVideoDepthChanged:
			UpdateSettings();
			break;
			
		case kRebuildCodec:
		case kFileTypeChanged:
			fController->SetMediaFormatFamily(FormatFamily());
			UpdateSettings();
			break;
				
		case kFileNameChanged:
			fController->SetOutputFileName(fFileName->Text());
			break;
		
		case kMinimizeOnRecording:
			Settings().SetMinimizeOnRecording(fMinimizeOnStart->Value() == B_CONTROL_ON);
			break;
		
		case kCodecChanged:
		{
			media_codec_info *info;
			ssize_t size;
			if (message->FindData(kCodecData, B_SIMPLE_DATA,
					(const void **)&info, &size) == B_OK)
				fController->SetMediaCodecInfo(*info);
			break;				
		}
		
		case B_OBSERVER_NOTICE_CHANGE:
		{
			int32 code;
			message->FindInt32("be:observe_change_what", &code);
			switch (code) {
				case kSelectionWindowClosed:
				case kMsgControllerTargetFrameChanged:
				case kClipSizeChanged:
					_UpdatePreview(message);
					break;
				default:
					break;
			}
			break;
		}
					
		default:
			BView::MessageReceived(message);
			break;
	}
}
开发者ID:noryb009,项目名称:bescreencapture,代码行数:57,代码来源:OutputView.cpp

示例2: FreeControls

void CGUIDialogVisualisationSettings::SetupPage()
{
  // cleanup first, if necessary
  FreeControls();
  m_pOriginalSpin = (CGUISpinControlEx*)GetControl(CONTROL_DEFAULT_SPIN);
  m_pOriginalRadioButton = (CGUIRadioButtonControl *)GetControl(CONTROL_DEFAULT_RADIOBUTTON);
  m_pOriginalSettingsButton = (CGUIButtonControl *)GetControl(CONTROL_DEFAULT_BUTTON);
  if (!m_pOriginalSpin || !m_pOriginalRadioButton || !m_pOriginalSettingsButton)
    return;
  m_pOriginalSpin->SetVisible(false);
  m_pOriginalRadioButton->SetVisible(false);
  m_pOriginalSettingsButton->SetVisible(false);

  // update our settings label
  CStdString strSettings;
  strSettings.Format("%s %s", g_infoManager.GetLabel(402).c_str(), g_localizeStrings.Get(5));
  SET_CONTROL_LABEL(CONTROL_SETTINGS_LABEL, strSettings);

  CGUIControlGroupList *group = (CGUIControlGroupList *)GetControl(CONTROL_GROUP_LIST);
#ifdef PRE_SKIN_VERSION_2_1_COMPATIBILITY
  if (!group || group->GetControlType() != CGUIControl::GUICONTROL_GROUPLIST)
  {
    // our controls for layout...
    CGUIControl *pArea = (CGUIControl *)GetControl(CONTROL_AREA);
    const CGUIControl *pGap = GetControl(CONTROL_GAP);
    if (!pArea || !pGap)
      return;
    Remove(CONTROL_AREA);
    group = new CGUIControlGroupList(GetID(), CONTROL_GROUP_LIST, pArea->GetXPosition(), pArea->GetYPosition(),
                                     pArea->GetWidth(), pArea->GetHeight(), pGap->GetHeight() - m_pOriginalSettingsButton->GetHeight(),
                                     0, VERTICAL, false);
    group->SetNavigation(CONTROL_GROUP_LIST, CONTROL_GROUP_LIST, CONTROL_GROUP_LIST, CONTROL_GROUP_LIST);
    Insert(group, pGap);
    pArea->FreeResources();
    delete pArea;
    SET_CONTROL_HIDDEN(CONTROL_PAGE);
  }
#endif
  if (!group)
    return;

  if (!m_pSettings || !m_pSettings->size())
  { // no settings available
    SET_CONTROL_VISIBLE(CONTROL_NONE_AVAILABLE);
    return;
  }
  else
  {
    SET_CONTROL_HIDDEN(CONTROL_NONE_AVAILABLE);
  }


  // run through and create our controls
  for (unsigned int i = 0; i < m_pSettings->size(); i++)
  {
    VisSetting &setting = m_pSettings->at(i);
    AddSetting(setting, group->GetWidth(), CONTROL_START + i);
  }
  UpdateSettings();
}
开发者ID:Avoidnf8,项目名称:xbmc-fork,代码行数:60,代码来源:GUIDialogVisualisationSettings.cpp

示例3: lock

bool CSettingsManager::Load(const TiXmlElement *root, bool &updated, bool triggerEvents /* = true */, std::map<std::string, CSetting*> *loadedSettings /* = NULL */)
{
  CSharedLock lock(m_critical);
  CExclusiveLock settingsLock(m_settingsCritical);
  if (m_loaded || root == NULL)
    return false;

  if (triggerEvents && !OnSettingsLoading())
    return false;

  if (!Deserialize(root, loadedSettings))
    return false;

  bool ret = true;
  // load any ISubSettings implementations
  if (triggerEvents)
    ret = Load(root);

  updated = UpdateSettings(root);

  if (triggerEvents)
    OnSettingsLoaded();

  return ret;
}
开发者ID:Anankin,项目名称:xbmc,代码行数:25,代码来源:SettingsManager.cpp

示例4: switch

INT_PTR ConfigPage::DoNotify(HWND hwndDlg, LPARAM lParam)
{
  NMHDR* phdr = (NMHDR*)lParam;

  switch (phdr->code)
  {
  case PSN_APPLY:
    if (UpdateSettings(hwndDlg))
    {
      SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, PSNRET_NOERROR);
    }
    else
    {
      SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, PSNRET_INVALID);
    }
    return 1;

  case PSN_SETACTIVE:
    SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, 0);
    return 1;

  case PSN_KILLACTIVE:
    SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, FALSE);
    return 1;
  }

  return 0;
}
开发者ID:Alim-Oezdemir,项目名称:emergedesktop,代码行数:28,代码来源:ConfigPage.cpp

示例5: assert

void
CBEditProjPrefsDialog::Receive
	(
	JBroadcaster*	sender,
	const Message&	message
	)
{
	if (sender == this && message.Is(JXDialogDirector::kDeactivated))
		{
		const JXDialogDirector::Deactivated* info =
			dynamic_cast<const JXDialogDirector::Deactivated*>(&message);
		assert( info != NULL );
		if (info->Successful())
			{
			UpdateSettings();
			}
		}

	else if (sender == itsHelpButton && message.Is(JXButton::kPushed))
		{
		(JXGetHelpManager())->ShowSection(kCBProjectPrefsHelpName);
		}

	else
		{
		JXDialogDirector::Receive(sender, message);
		}
}
开发者ID:raorn,项目名称:jx_application_framework,代码行数:28,代码来源:CBEditProjPrefsDialog.cpp

示例6: UpdateSettings

void CHLTVDirector::FrameUpdatePostEntityThink( void )
{
	if ( !m_pHLTVServer )
		return;	// don't do anything

	// This function is called each tick
	UpdateSettings();	// update settings from cvars

	if ( m_nNextAnalyzeTick < gpGlobals->tickcount )
	{
		m_nNextAnalyzeTick = gpGlobals->tickcount + TIME_TO_TICKS( 0.5f );

		AnalyzePlayers();

		AnalyzeCameras();
	}

	if ( m_nBroadcastTick <= 0 )
	{
		// game start is still in delay loop
		StartDelayMessage();
	}
	else if ( m_nNextShotTick <= m_nBroadcastTick )
	{
		// game is being broadcasted, generate camera shots
		StartNewShot();		
	}
}
开发者ID:paralin,项目名称:hl2sdk,代码行数:28,代码来源:hltvdirector.cpp

示例7: BScreen

void
OutputView::_UpdatePreview(BMessage* message)
{
	fSelectArea->SetEnabled(fCustomArea->Value() == B_CONTROL_ON);
	BRect screenFrame = BScreen(Window()).Frame();
	Settings settings;
	//BRect captureArea;
	//settings.GetCaptureArea(captureArea);
	//if (captureArea == screenFrame)
	//	return;
	if (fWholeScreen->Value() == B_CONTROL_ON)
		settings.SetCaptureArea(screenFrame);
	
	//UpdatePreview();
	if (message != NULL) {
		BRect rect;
		message->FindRect("selection", &rect);
		fRectView->SetRect(rect);
		
		BBitmap* bitmap = NULL;
		if (message->FindPointer("bitmap", (void**)&bitmap) == B_OK) {
			fRectView->UpdateBitmap(bitmap);
			delete bitmap;
		}
	} else {
		BRect captureArea;
		settings.GetCaptureArea(captureArea);
		fRectView->SetRect(captureArea);
		fRectView->UpdateBitmap(NULL);
	}
			
	// the size of the destination
	// clip maybe isn't supported by the codec	
	UpdateSettings();
}
开发者ID:noryb009,项目名称:bescreencapture,代码行数:35,代码来源:OutputView.cpp

示例8: GetClientRect

LRESULT CHeaderView::OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
  RECT rc;
  GetClientRect(&rc);
  rc.right -= 20;

  const DWORD dwTopicStyle = WS_CHILD | WS_VISIBLE 
                         | ES_CENTER | ES_READONLY | ES_MULTILINE                          
                         | WS_VSCROLL | WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
              dwTopicExStyle = 0;

  m_EditCtrl.Create(m_hWnd, &rc, NULL, dwTopicStyle, dwTopicExStyle);
  m_EditCtrl.SetAutoURLDetect(TRUE);
  m_EditCtrl.SetEventMask(ENM_LINK);
  /*
  m_EditCtrl.ReplaceSel("The professional IRC Client | 0.3.100 | www.hydrairc.com | Say hi to new op, `duckman");
  ::SendMessage(m_MessageWindow,WM_HEADERCHANGED,(WPARAM)0,(LPARAM)NULL);
  */
  
  GetClientRect(&rc);

  const DWORD dwButtonStyle = BS_FLAT | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN;
  rc.left = rc.right - 20;
  m_ButtonCtrl.Create(m_hWnd,&rc,_T("  X  "),dwButtonStyle,0);
  m_ButtonCtrl.SetFont ( AtlGetStockFont ( DEFAULT_GUI_FONT ) );

  UpdateSettings();
  return 0;
}
开发者ID:HydraIRC,项目名称:hydrairc,代码行数:29,代码来源:HeaderView.cpp

示例9: switch

void iwDistribution::Msg_ButtonClick(const unsigned ctrl_id)
{
    if(GAMECLIENT.IsReplayModeOn())
        return;
    switch(ctrl_id)
    {
        default: return;

        case 2:
        {
            WINDOWMANAGER.Show(new iwHelp(GUI_ID(CGI_HELP), _(
                "The priority of goods for the individual buildings can be set here. "
                "The higher the value, the quicker the required goods are delivered "
                "to the building concerned.")));

        } break;
            // Default button
        case 10:
        {
            GAMECLIENT.visual_settings.distribution = GAMECLIENT.default_settings.distribution;
            UpdateSettings();
            settings_changed = true;
        } break;
    }
}
开发者ID:vader1986,项目名称:s25client,代码行数:25,代码来源:iwDistribution.cpp

示例10: IngameWindow

iwMilitary::iwMilitary(const GameWorldViewer& gwv, GameCommandFactory& gcFactory):
    IngameWindow(CGI_MILITARY, IngameWindow::posAtMouse,  168, 330, _("Military"), LOADER.GetImageN("io", 5)),
    gwv(gwv), gcFactory(gcFactory), settings_changed(false)
{
    // Einzelne Balken
    AddProgress(0, 17, 25, 132, 26, TC_GREY, 119, 120, MILITARY_SETTINGS_SCALE[0], "", 4, 4, 0, _("Fewer recruits"), _("More recruits")); /* pitch: 4, 4 */
    AddProgress(1, 17, 57, 132, 26, TC_GREY, 121, 122, MILITARY_SETTINGS_SCALE[1], "", 4, 4, 0, _("Weak defense"), _("Strong defense"));
    AddProgress(2, 17, 89, 132, 26, TC_GREY, 123, 124, MILITARY_SETTINGS_SCALE[2], "", 4, 4, 0, _("Fewer defenders"), _("More defenders"));
    AddProgress(3, 17, 121, 132, 26, TC_GREY, 209, 210, MILITARY_SETTINGS_SCALE[3], "", 4, 4, 0, _("Less attackers"), _("More attackers"));
    AddProgress(4, 17, 153, 132, 26, TC_GREY, 129, 130, MILITARY_SETTINGS_SCALE[4], "", 4, 4, 0, _("Interior"), _("Interior"));
    AddProgress(5, 17, 185, 132, 26, TC_GREY, 127, 128, MILITARY_SETTINGS_SCALE[5], "", 4, 4, 0, _("Center of country"), _("Center of country"));
    AddProgress(6, 17, 217, 132, 26, TC_GREY, 1000, 1001, MILITARY_SETTINGS_SCALE[6], "", 4, 4, 0, _("Near harbor points"), _("Near harbor points"));
    AddProgress(7, 17, 249, 132, 26, TC_GREY, 125, 126, MILITARY_SETTINGS_SCALE[7], "", 4, 4, 0, _("Border areas"), _("Border areas"));

    // unteren 2 Buttons
    AddImageButton(20, 18, 282, 30, 32, TC_GREY, LOADER.GetImageN("io", 225), _("Help"));
    AddImageButton(21, 120, 282, 30, 32, TC_GREY, LOADER.GetImageN("io", 191), _("Default"));

    // Falls Verteidiger ändern verboten ist, einfach die Bar ausblenden
    if (gwv.GetWorld().GetGGS().getSelection(AddonId::DEFENDER_BEHAVIOR) == 1)
    {
        GetCtrl<ctrlProgress>(2)->SetVisible(false);
    }

    // Absendetimer, in 2s-Abschnitten wird jeweils das ganze als Netzwerknachricht ggf. abgeschickt
    AddTimer(22, 2000);
    UpdateSettings();
}
开发者ID:vader1986,项目名称:s25client,代码行数:28,代码来源:iwMilitary.cpp

示例11: switch

void iwMilitary::Msg_ButtonClick(const unsigned ctrl_id)
{
    switch(ctrl_id)
    {
        default: return;
            // Default button
        case 20:
        {
            WINDOWMANAGER.Show(new iwHelp(GUI_ID(CGI_HELP), _(
                "This is where you can make adjustments to all military matters. "
                "The upper value corresponds to the recruiting rate of your army. "
                "The higher it is, the more inhabitants are recruited as soldiers. "
                "Below this is the setting to protect your huts. If this value is "
                "set at maximum, your huts are defended by the strongest unit. To "
                "raise the number of attackers leaving your huts per attack, choose "
                "the next setting. The number of defenders who counter the enemy in "
                "the event of an attack is shown by the fourth display. The final "
                "three values correspond to the occupation of your huts in the "
                "interior, in the center of the country and on its borders.")));

        } break;
        case 21:
        {
            GAMECLIENT.visual_settings.military_settings = GAMECLIENT.default_settings.military_settings;
            UpdateSettings();
            settings_changed = true;
        } break;
    }
}
开发者ID:vader1986,项目名称:s25client,代码行数:29,代码来源:iwMilitary.cpp

示例12: connect

void PerfMon::initMessages()
{
    if(m_bUseContextMenu)
    {
        connect(contextMenu,SIGNAL(aboutToShow()),this,SLOT(LoadChannelMenu()));
    }
    connect(updateTimer,SIGNAL(timeout()),this,SLOT(UpdateSettings()));
}
开发者ID:Jinxiaohai,项目名称:QT,代码行数:8,代码来源:perfmon.cpp

示例13: switch

void CTransfersView::OnEvent(int EventID, void *pData)
{
  switch(EventID)
  {
    case EV_PREFSCHANGED:
      UpdateSettings();
      break;
  }
}
开发者ID:mirror,项目名称:hydrairc,代码行数:9,代码来源:TransfersFrm.cpp

示例14: UpdateSettings

void iwMilitary::Msg_Timer(const unsigned int  /*ctrl_id*/)
{
    if(GAMECLIENT.IsReplayModeOn())
        // Im Replay aktualisieren wir die Werte
        UpdateSettings();
    else
        // Im normalen Spielmodus schicken wir den ganzen Spaß ab
        TransmitSettings();
}
开发者ID:vader1986,项目名称:s25client,代码行数:9,代码来源:iwMilitary.cpp

示例15: OSCreateMutex

bool AgentSource::Init(Value &data)
{
		Image.SetPath(String(".\\img\\VideoArea.png"));
		Image.Init();
		AgentList.Add(this);
		HLock = OSCreateMutex();
		UpdateSettings(data);
		return true;
}
开发者ID:wwllww,项目名称:LiveStream_MultiIntance,代码行数:9,代码来源:AgentPlugin.cpp


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