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


C++ Control函数代码示例

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


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

示例1: Control

// ----------------------------------------------------------------------------
// CCreate2WayVideoSessionDialog::PreLayoutDynInitL()
// .
// ----------------------------------------------------------------------------
//
void CCreate2WayVideoSessionDialog::PreLayoutDynInitL()
    {
    CEikEdwin* edwinPoCAddress = static_cast<CEikEdwin*>(
                               Control( ESessionDialog2WayVideoRecipientAddress ) );
      
    TBuf<KBufLength> defaultAddress;
    defaultAddress.Copy(iParams->iRecipentAddress);
    edwinPoCAddress->SetTextL(&defaultAddress);
    edwinPoCAddress->SetCursorPosL(defaultAddress.Length(),EFalse);
    
    CAknPopupFieldText* popupFieldText = 
        static_cast <CAknPopupFieldText*> (Control(ESessionDialog2WayVideoVideoCodec));
        
    popupFieldText->SetCurrentValueIndex(0);
    
    popupFieldText = 
        static_cast <CAknPopupFieldText*> (Control(ESessionDialog2WayVideoAudioCodec));
        
    popupFieldText->SetCurrentValueIndex(0);
    
    popupFieldText = 
        static_cast <CAknPopupFieldText*> (Control(ESessionDialog2WayVideoViewFinder));
        
    popupFieldText->SetCurrentValueIndex(0);
    
    popupFieldText = 
        static_cast <CAknPopupFieldText*> (Control(ESessionDialog2WayVideoCamera));
        
    popupFieldText->SetCurrentValueIndex(0);
    
    CAknForm::PreLayoutDynInitL();
    }
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:37,代码来源:create2wayvideosessiondialog.cpp

示例2: traits_del_unlocked

bool TimerTraits::traits_del_unlocked (TimerTraits::Index & idx)
{
    bool ret = false;

    if (idx.valid)
    {
        ControlSet::iterator i = _timer_set.lower_bound(Control(idx.era, idx.msec));
        ControlSet::iterator j = _timer_set.upper_bound(Control(idx.era, idx.msec));

        for (; i != j; i++)
        {
            const Control & ctrl = (*i);

            if ((idx.value && !(ctrl._value & idx.value)))
                continue;

            if (((idx.func && ctrl._func == idx.func) || !idx.func) && ((idx.data && ctrl._data == idx.data) || !idx.data))
            {
                if (_timer_set.begin() == i)
                    _condition.signal();

                _timer_set.erase(i);

                ret = true;
                break;
            }
        }

        idx.valid = false;
    }

    return ret;
}
开发者ID:AbrahamJewowich,项目名称:FreeSWITCH,代码行数:33,代码来源:timer.cpp

示例3: bind_joyhat

void
JoystickKeyboardController::process_hat_event(const SDL_JoyHatEvent& jhat)
{
  Uint8 changed = hat_state ^ jhat.value;

  if (wait_for_joystick >= 0)
  {
    if (changed & SDL_HAT_UP && jhat.value & SDL_HAT_UP)
      bind_joyhat(jhat.which, SDL_HAT_UP, Control(wait_for_joystick));

    if (changed & SDL_HAT_DOWN && jhat.value & SDL_HAT_DOWN)
      bind_joyhat(jhat.which, SDL_HAT_DOWN, Control(wait_for_joystick));

    if (changed & SDL_HAT_LEFT && jhat.value & SDL_HAT_LEFT)
      bind_joyhat(jhat.which, SDL_HAT_LEFT, Control(wait_for_joystick));

    if (changed & SDL_HAT_RIGHT && jhat.value & SDL_HAT_RIGHT)
      bind_joyhat(jhat.which, SDL_HAT_RIGHT, Control(wait_for_joystick));

    MenuStorage::get_joystick_options_menu()->update();
    wait_for_joystick = -1;
  }
  else
  {
    if (changed & SDL_HAT_UP)
    {
      HatMap::iterator it = joy_hat_map.find(std::make_pair(jhat.which, SDL_HAT_UP));
      if (it != joy_hat_map.end())
        set_joy_controls(it->second, jhat.value & SDL_HAT_UP);
    }

    if (changed & SDL_HAT_DOWN)
    {
      HatMap::iterator it = joy_hat_map.find(std::make_pair(jhat.which, SDL_HAT_DOWN));
      if (it != joy_hat_map.end())
        set_joy_controls(it->second, jhat.value & SDL_HAT_DOWN);
    }

    if (changed & SDL_HAT_LEFT)
    {
      HatMap::iterator it = joy_hat_map.find(std::make_pair(jhat.which, SDL_HAT_LEFT));
      if (it != joy_hat_map.end())
        set_joy_controls(it->second, jhat.value & SDL_HAT_LEFT);
    }

    if (changed & SDL_HAT_RIGHT)
    {
      HatMap::iterator it = joy_hat_map.find(std::make_pair(jhat.which, SDL_HAT_RIGHT));
      if (it != joy_hat_map.end())
        set_joy_controls(it->second, jhat.value & SDL_HAT_RIGHT);
    }
  }

  hat_state = jhat.value;
}
开发者ID:ed00m,项目名称:supertux,代码行数:55,代码来源:joystickkeyboardcontroller.cpp

示例4: PreLayoutDynInitL

void CStopwatchForm::PreLayoutDynInitL()
{
    CEikDurationEditor* durationEd = (CEikDurationEditor*)Control( EStopwatchSettingDuration );
    durationEd->SetDuration( iData->iDuration );

    CAknPopupFieldText* popupFieldTextWhen = (CAknPopupFieldText*)Control( EStopwatchSettingPlayWhen );
    popupFieldTextWhen->SetCurrentValueIndex( iData->iPlayWhenIndex );

    CAknPopupFieldText* popupFieldTextWhat = (CAknPopupFieldText*)Control( EStopwatchSettingPlayWhat );
    popupFieldTextWhat->SetCurrentValueIndex( iData->iPlayWhatIndex );
}
开发者ID:lohanf,项目名称:MLauncher,代码行数:11,代码来源:StopwatchSettings.cpp

示例5: main

int main(void)
{

	int i = 100000000;
	int j = 10000000;
	int  cnt = 1000;
	delay_init();

	led_Configuration();
	MPU6050_Configuration();
//	PWM_Configuration();
	TIM3_PWM_Init();
	TIM1_PWM_Init();
	TIM2_PWM_Init();
	
//	SysTick_Config(SystemCoreClock / 1000); // ms
	
	CtrData = CTRL_UP;
	
	while (i-- > 0) {
		while (j-- > 0) {
			;
		}
	}
	while (1) {
		
		
		if(schedulercnt_2ms >= 2)
		{	 
			if (cnt > 0)
			{
				//读加速度计和陀螺仪数据
				READ_MPU6050();
					//飞控函数
				Control();
				//PWM波输出函数
				PWMControl(PWM);
				cnt--;
			}
			else {
				CtrData = CTRL_STOP;
				Control();
				PWMControl(PWM);
				
			}
			
		schedulercnt_2ms = 0;
	    }
		

		
	}
	
}
开发者ID:reveriel,项目名称:uCOS,代码行数:54,代码来源:main.c

示例6: PreLayoutDynInitL

void CRecordFormatOptionsDialog::PreLayoutDynInitL()
	{
	// set up bit rate, sample, channel, codec lists
	CFormatOptionsDialog::PreLayoutDynInitL();
	// add gain and balance, which are recording specific parameters
    CEikNumberEditor* gain = static_cast<CEikNumberEditor*>(Control(EGain));
	gain->SetMinimumAndMaximum(0,iMaxGain);
	gain->SetNumber(iMaxGain/2);
    CEikNumberEditor* balance = static_cast<CEikNumberEditor*>(Control(EBalance));
	balance->SetMinimumAndMaximum(KMMFBalanceMaxLeft,KMMFBalanceMaxRight);
	balance->SetNumber(KMMFBalanceCenter);
	}
开发者ID:huellif,项目名称:symbian-example,代码行数:12,代码来源:CMediaClientAppUI.cpp

示例7: PreLayoutDynInitL

void CSettingsDialog::PreLayoutDynInitL()
	{
	// Populate dialog with initial settings
	CEikEdwin* name=(CEikEdwin*)Control(EServerName);
	name->SetTextL(&iConnectSettings.iAddress);
	CEikEdwin* page=(CEikEdwin*)Control(EPage);
	TBuf<KSettingFieldWidth> temp;
	temp.Copy(iConnectSettings.iPage);
	page->SetTextL(&temp);
	CEikNumberEditor* port = (CEikNumberEditor*)Control(EPort);
	port->SetNumber(iConnectSettings.iPortNum);
	}
开发者ID:huellif,项目名称:symbian-example,代码行数:12,代码来源:SecureSockets.cpp

示例8: OkToExitL

TBool CRecordFormatOptionsDialog::OkToExitL(TInt /*aKeycode*/)
	{
	// get bit rate, sample, channel, codec settings
	CFormatOptionsDialog::OkToExitL(0);
	// get gain and balance, which are recording specific parameters
    CEikNumberEditor* gain = static_cast<CEikNumberEditor*>(Control(EGain));
	iRecordFormatOptions.iGain = gain->Number();
    CEikNumberEditor* balance = static_cast<CEikNumberEditor*>(Control(EBalance));
	iRecordFormatOptions.iBalance = balance->Number();
	iRecordFormatOptions.iGainSet = iRecordFormatOptions.iBalanceSet = ETrue;

	return ETrue;
	}
开发者ID:huellif,项目名称:symbian-example,代码行数:13,代码来源:CMediaClientAppUI.cpp

示例9: SaveFormDataL

TBool CStopwatchForm::SaveFormDataL()
{
    CEikDurationEditor* durationEd = (CEikDurationEditor*)Control( EStopwatchSettingDuration );
    iData->iDuration=durationEd->Duration();

    CAknPopupFieldText* popupFieldTextWhen = (CAknPopupFieldText*)Control( EStopwatchSettingPlayWhen );
    iData->iPlayWhenIndex=(TStopwatchData::TPlayWhen)popupFieldTextWhen->CurrentValueIndex();

    CAknPopupFieldText* popupFieldTextWhat = (CAknPopupFieldText*)Control( EStopwatchSettingPlayWhat );
    iData->iPlayWhatIndex=(TStopwatchData::TPlayWhat)popupFieldTextWhat->CurrentValueIndex();

    return ETrue;
}
开发者ID:lohanf,项目名称:MLauncher,代码行数:13,代码来源:StopwatchSettings.cpp

示例10: OkToExitL

TBool CSettingsDialog::OkToExitL(TInt /*aButtonId*/)
	{
	// Store dialog input
	CEikEdwin* name=(CEikEdwin*)Control(EServerName);
	name->GetText(iConnectSettings.iAddress);
	CEikEdwin* page=(CEikEdwin*)Control(EPage);
	TBuf<KSettingFieldWidth> temp;
	page->GetText(temp);
	iConnectSettings.iPage.Copy(temp);
	CEikNumberEditor* port = (CEikNumberEditor*)Control(EPort);
	iConnectSettings.iPortNum = port->Number();

	return ETrue;
	}
开发者ID:huellif,项目名称:symbian-example,代码行数:14,代码来源:SecureSockets.cpp

示例11: main

main()
{
	int a,b,n;
	char c[10];
	Player p;
	PlayerList pl;
	p = GetInitPlayer();
	pl = GetDefaultPlayerList();
	SetPlayerListFromFile(pl,FILENAME);
	do
	{
		menu(pl);
		gets(c);
		fflush(stdin);
		n=Input(pl,c);
		Control(pl,n);


	
	
	
	}while(1);
		
	

}
开发者ID:eddieplus,项目名称:C-project-Amoy-traditional-game-,代码行数:26,代码来源:博饼.c

示例12: traits_add_unlocked

TimerTraits::Index TimerTraits::traits_add_unlocked (unsigned int msecs, const void * func, const void * data, unsigned int value)
{
    unsigned int ms_tick = TimerTraits::tick();

    unsigned int ms_left =  UINT_MAX - ms_tick;
    unsigned int ms_real =  msecs;

    unsigned int age_num = _age_count;

    if (ms_left < msecs)
    {
        ms_real -= ms_left;
        ++age_num;
    }
    else
    {
        ms_real += ms_tick;
    }

    ControlSet::iterator it = _timer_set.insert(Control(age_num,ms_real,func,data,value));

    if (_timer_set.size() == 1 || _timer_set.begin() == it)
    {
        _condition.signal();
    };

    return Index(age_num, ms_real, msecs, func, data, value);
}
开发者ID:AbrahamJewowich,项目名称:FreeSWITCH,代码行数:28,代码来源:timer.cpp

示例13: GetTextureFileName

static int         GetTextureFileName (lua_State          *State)
 {
  P3DPlugLUAControl                    Control(State);
  const char                          *TexName;

  TexName = Control.GetArgString(1);

  Control.Commit();

   {
    std::string    FileName = P3DApp::GetApp()->GetTexFS()->Generic2System(TexName);

    if (FileName.empty())
     {
      Control.PushString(TexName);
     }
    else
     {
      Control.PushString(FileName.c_str());
     }
   }

  Control.Commit();

  return(1);
 }
开发者ID:hinike,项目名称:ngplant,代码行数:26,代码来源:p3dpluglua.cpp

示例14: DifferentialState

returnValue DiscreteTimeExport::setDifferentialEquation(	const Expression& rhs_ )
{
	if( rhs_.getDim() > 0 ) {
		Parameter         dummy0;
		Control           dummy1;
		DifferentialState dummy2;
		AlgebraicState 	  dummy3;
		DifferentialStateDerivative dummy4;
		dummy0.clearStaticCounters();
		dummy1.clearStaticCounters();
		dummy2.clearStaticCounters();
		dummy3.clearStaticCounters();
		dummy4.clearStaticCounters();

		NX2 = rhs_.getDim() - NXA;
		x = DifferentialState(NX1+NX2);
		z = AlgebraicState(NXA);
		dx = DifferentialStateDerivative(NDX);
		u = Control(NU);
		p = Parameter(NP);

		DifferentialEquation f;
		f << rhs_;

		DifferentialEquation g;
		for( uint i = 0; i < rhs_.getDim(); i++ ) {
			g << forwardDerivative( rhs_(i), x );
			g << forwardDerivative( rhs_(i), u );
			// There are not supposed to be algebraic states or differential state derivatives !
		}

		return (rhs.init( f,"acado_rhs",NX,NXA,NU ) & diffs_rhs.init( g,"acado_diffs",NX,NXA,NU ) );
	}
	return SUCCESSFUL_RETURN;
}
开发者ID:skyhawkf119,项目名称:acado,代码行数:35,代码来源:discrete_export.cpp

示例15: result

// -----------------------------------------------------------------------------
// CLandmarksEditDialog::FetchFloatL
// 
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
void CLandmarksEditDialog::FetchFloatL(
    TRealX& aFloat, 
    TInt aEditorResourceId, 
    TInt aErrorResourceId)
    {
    const TChar KDecimalPoint = '.';
    TBuf<KPosLmMaxTextFieldLength> textFieldValue;
    TLex fieldLex;
    TInt result(KErrNone);
    CEikEdwin* editor = static_cast <CEikEdwin*> (Control(aEditorResourceId));

    editor->GetText(textFieldValue);
    if (textFieldValue == KNullDesC)
        {
        // User has indicated that he/she wants this value to be undefined.
        aFloat.SetNaN();
        }
    else 
        {
        // Try to extract value
        fieldLex = textFieldValue;
        TReal floatValue(0);
        result = fieldLex.Val(floatValue, KDecimalPoint);
        if (result != KErrNone)
            {
            NotifyErrorToUserL(aErrorResourceId);
            }

        // Update output parameter
        User::LeaveIfError(aFloat.Set(floatValue));
        }
    }
开发者ID:fedor4ever,项目名称:packaging,代码行数:38,代码来源:LandmarksEditDialog.cpp


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