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


C++ SetActive函数代码示例

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


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

示例1: SetActive

//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CVGuiScreen::InputSetActive( inputdata_t &inputdata )
{
	SetActive( true );
}
开发者ID:Adidasman1,项目名称:source-sdk-2013,代码行数:7,代码来源:vguiscreen.cpp

示例2: new


//.........这里部分代码省略.........
		count = iInboxCount;

	iInboxSelectedSms = new CArrayFixFlat<TInt>(count);
	InboxSmsDatearray = new (ELeave) CDesCArrayFlat(count);
	InboxSmsMessagearray = new (ELeave) CDesCArrayFlat(count);
	InboxSmsDetailsarray = new (ELeave) CDesCArrayFlat(count);

	TInt j;
	for (j=0;j<iInboxCount; ++j){
		iInboxSelectedSms->AppendL(aInboxSelectedSms->At(j));
		InboxSmsDatearray->InsertL(j,(*aInboxSmsDatearray)[j]);
		InboxSmsMessagearray->InsertL(j,(*aInboxSmsMessagearray)[j]);
		InboxSmsDetailsarray->InsertL(j,(*aInboxSmsDetailsarray)[j]);
	}

	if(iSentItemCount == 0)
		count = 1;
	else
		count = iSentItemCount;

	iSentItemsSelectedSms = new CArrayFixFlat<TInt>(count);
	SentSmsDatearray = new (ELeave) CDesCArrayFlat(count);
	SentSmsMessagearray = new (ELeave) CDesCArrayFlat(count);
	SentSmsDetailsarray = new (ELeave) CDesCArrayFlat(count);

	for (j=0;j<iSentItemCount; ++j){
		iSentItemsSelectedSms->AppendL(aSentItemsSelectedSms->At(j));
		SentSmsDatearray->InsertL(j,(*aSentSmsDatearray)[j]);
		SentSmsMessagearray->InsertL(j,(*aSentSmsMessagearray)[j]);
		SentSmsDetailsarray->InsertL(j,(*aSentSmsDetailsarray)[j]);
	}

/*	TInt8 choice;
	iAppUi.GetChoice(choice);
	if(!choice)
			{
		choice = 1;
		iAppUi.SaveChoice(choice);
		iAppUi.ActivateView(KViewIdMainScreen);	
			}
			else
			{
		iAppUi.ActivateView(KViewIdEmptyScreen);
		iAppUi.ActivateView(KViewIdStatusScreen);
			}
*/
	/*iWaitDialog = NULL;
	
    if(iWaitDialog == NULL)
	{
		iWaitDialog = new(ELeave)CAknWaitDialog( (REINTERPRET_CAST(CEikDialog**,&iWaitDialog)));
		iWaitDialog->SetTone( CAknNoteDialog::EConfirmationTone );
		iWaitDialog->SetTextL(*(CEikonEnv::Static()->AllocReadResourceL(R_TEXT_SMS_BACKUP_PROGRESS)));
		
        iWaitDialog->ExecuteLD(R_WAITNOTE_SCAN_DIALOG);
	}*/

	CnvUtfConverter converter;
	TBuf8<500> data;
	TBuf<500> tempdata;

	iFileName = CRippleVaultAppUi::ApplicationDriveAndPath();
	iFileName.Append(_L("smsbackup.man"));
	
	fs.Connect();
	
	iFile.Replace(fs, iFileName, EFileWrite | EFileStream);

	tempdata.Copy(_L("<root><h><msgt>smsbackup</msgt><msg></msg><uid>"));
	converter.ConvertFromUnicodeToUtf8(data,tempdata);
	iFile.Write(data);
	
	tempdata.Copy(iAppUi.iUserNames);
	converter.ConvertFromUnicodeToUtf8(data,tempdata);
	iFile.Write(data);

	tempdata.Copy(_L("</uid><hp>"));
	converter.ConvertFromUnicodeToUtf8(data,tempdata);
	iFile.Write(data);
	
	tempdata.Copy(iAppUi.iMobileNo);
	converter.ConvertFromUnicodeToUtf8(data,tempdata);
	iFile.Write(data);

	tempdata.Copy(_L("</hp><did>"));
	converter.ConvertFromUnicodeToUtf8(data,tempdata);
	iFile.Write(data);

    tempdata.Copy(iAppUi.PhoneImei()); 
	converter.ConvertFromUnicodeToUtf8(data,tempdata);
	iFile.Write(data);
	
	tempdata.Copy(_L("</did><currec></currec><totrec></totrec><loc>en_us</loc><ctime></ctime><lstime>0</lstime><synctype><mod>cs</mod><gran>contactlevel</gran><adde>true</adde><upde>true</upde><dele>true</dele></synctype></h><b>"));
	converter.ConvertFromUnicodeToUtf8(data,tempdata);
	iFile.Write(data);

	SetActive();
	TRequestStatus* status = &iStatus;
	User::RequestComplete(status, KErrNone);
}
开发者ID:deepakprabhakara,项目名称:ripplevault,代码行数:101,代码来源:writesmsao.cpp

示例3: RenderTools

void CMenus::RenderServerControl(CUIRect MainView)
{
	static int s_ControlPage = 0;

	// render background
	CUIRect Bottom, Extended, TabBar, Button;
	MainView.HSplitTop(20.0f, &Bottom, &MainView);
	RenderTools()->DrawUIRect(&Bottom, ms_ColorTabbarActive, CUI::CORNER_T, 10.0f);
	MainView.HSplitTop(20.0f, &TabBar, &MainView);
	RenderTools()->DrawUIRect(&MainView, ms_ColorTabbarActive, CUI::CORNER_B, 10.0f);
	MainView.Margin(10.0f, &MainView);
	MainView.HSplitBottom(90.0f, &MainView, &Extended);

	// tab bar
	{
		TabBar.VSplitLeft(TabBar.w/3, &Button, &TabBar);
		static int s_Button0 = 0;
		if(DoButton_MenuTab(&s_Button0, Localize("Change settings"), s_ControlPage == 0, &Button, 0))
			s_ControlPage = 0;

		TabBar.VSplitMid(&Button, &TabBar);
		static int s_Button1 = 0;
		if(DoButton_MenuTab(&s_Button1, Localize("Kick player"), s_ControlPage == 1, &Button, 0))
			s_ControlPage = 1;

		static int s_Button2 = 0;
		if(DoButton_MenuTab(&s_Button2, Localize("Move player to spectators"), s_ControlPage == 2, &TabBar, 0))
			s_ControlPage = 2;
	}

	// render page
	MainView.HSplitBottom(ms_ButtonHeight + 5*2, &MainView, &Bottom);
	Bottom.HMargin(5.0f, &Bottom);

	if(s_ControlPage == 0)
		RenderServerControlServer(MainView);
	else if(s_ControlPage == 1)
		RenderServerControlKick(MainView, false);
	else if(s_ControlPage == 2)
		RenderServerControlKick(MainView, true);

	// vote menu
	{
		CUIRect Button;
		Bottom.VSplitRight(120.0f, &Bottom, &Button);

		static int s_CallVoteButton = 0;
		if(DoButton_Menu(&s_CallVoteButton, Localize("Call vote"), 0, &Button))
		{
			if(s_ControlPage == 0)
				m_pClient->m_pVoting->CallvoteOption(m_CallvoteSelectedOption, m_aCallvoteReason);
			else if(s_ControlPage == 1)
			{
				if(m_CallvoteSelectedPlayer >= 0 && m_CallvoteSelectedPlayer < MAX_CLIENTS &&
					m_pClient->m_Snap.m_paPlayerInfos[m_CallvoteSelectedPlayer])
				{
					m_pClient->m_pVoting->CallvoteKick(m_CallvoteSelectedPlayer, m_aCallvoteReason);
					SetActive(false);
				}
			}
			else if(s_ControlPage == 2)
			{
				if(m_CallvoteSelectedPlayer >= 0 && m_CallvoteSelectedPlayer < MAX_CLIENTS &&
					m_pClient->m_Snap.m_paPlayerInfos[m_CallvoteSelectedPlayer])
				{
					m_pClient->m_pVoting->CallvoteSpectate(m_CallvoteSelectedPlayer, m_aCallvoteReason);
					SetActive(false);
				}
			}
			m_aCallvoteReason[0] = 0;
		}

		// render kick reason
		CUIRect Reason;
		Bottom.VSplitRight(40.0f, &Bottom, 0);
		Bottom.VSplitRight(160.0f, &Bottom, &Reason);
		Reason.HSplitTop(5.0f, 0, &Reason);
		const char *pLabel = Localize("Reason:");
		UI()->DoLabelScaled(&Reason, pLabel, 14.0f, -1);
		float w = TextRender()->TextWidth(0, 14.0f, pLabel, -1);
		Reason.VSplitLeft(w+10.0f, 0, &Reason);
		static float s_Offset = 0.0f;
		DoEditBox(&m_aCallvoteReason, &Reason, m_aCallvoteReason, sizeof(m_aCallvoteReason), 14.0f, &s_Offset, false, CUI::CORNER_ALL);

		// extended features (only available when authed in rcon)
		if(Client()->RconAuthed())
		{
			// background
			Extended.Margin(10.0f, &Extended);
			Extended.HSplitTop(20.0f, &Bottom, &Extended);
			Extended.HSplitTop(5.0f, 0, &Extended);

			// force vote
			Bottom.VSplitLeft(5.0f, 0, &Bottom);
			Bottom.VSplitLeft(120.0f, &Button, &Bottom);
			static int s_ForceVoteButton = 0;
			if(DoButton_Menu(&s_ForceVoteButton, Localize("Force vote"), 0, &Button))
			{
				if(s_ControlPage == 0)
					m_pClient->m_pVoting->CallvoteOption(m_CallvoteSelectedOption, m_aCallvoteReason, true);
//.........这里部分代码省略.........
开发者ID:Siile,项目名称:Ninslash,代码行数:101,代码来源:menus_ingame.cpp

示例4: switch

void CWebServerEng::RunL()
{
	if (iStatus==KErrNone)
	{
			switch(iWebServerState)
			{
			case EWaitingForConnections:
				ASSERT(iCon != NULL);

				iCon->SetObserver(iObserver);
				if (iCurrentNumberConnections > MAX_NUMBER_CONNECTIONS) // This must be dynamic.(E.g: Only 10% memory free then WebserverBusy)
				{
					iCon->WebServerBusyL();
				}
				else
				{
					iCon->StartConnection();
				}
				iConList.AddLast(*iCon);
				iCurrentNumberConnections++;
				iTotalNumberConnections++;
				iObserver->UpdateNumberConL();
	

				TRAPD(err, CreateSocketAndConnectionL());
				if (err >= KErrNone)
				{
					ASSERT(iConnection != NULL);
					iWebServerState = EWaitingForConnections;		
					iSocket.Accept(*iConnection,iStatus);
					SetActive();
				}
				else
				{
					iCon = 0;
					delete iConnection;
					iConnection = 0;
					iWebServerState = EErrorRecovery;
				}
				break;
			case EShuttingDownServer:
				delete this;
				break;
			case EErrorRecovery:
				User::Panic(_L("BAD STATE IN THE STATE MACHINE"),2);
				break;
			default: //Something is going VERY, VERY wrong
				User::Panic(_L("UnKnown State in the WebServer."),2);
				break;
			}
		
	}
	else if (iStatus == KErrWouldBlock)
	{
		ASSERT(iConnection != NULL);
		iStatusText.Format(_L("\r\nRECOVERING ACCEPT !!!!!\r\n"),iCurrentNumberConnections);
		NotifyStatus();

		iSocket.Accept(*iConnection,iStatus);
		SetActive();	
	}
	else if(iWebServerState == EShuttingDownServer)
	{
		delete this;
	}
	else
	{		
		if (iWebServerState == EWaitingForConnections)
			iSocket.CancelAccept();
		
		iWebServerState = EShuttingDownServer;
		iSocket.Shutdown(RSocket::ENormal,iStatus);
		SetActive();
	}
		
}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:76,代码来源:ws_eng.cpp

示例5: SetActive

// -----------------------------------------------------------------------------
// CPosLmActiveCompacter::CompleteSelf
//
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
void CPosLmActiveCompacter::CompleteSelf()
    {
    TRequestStatus* status = &iStatus;
    User::RequestComplete(status, KErrNone);
    SetActive();
    }
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:12,代码来源:EPos_CPosLmActiveCompacter.cpp

示例6: index

TInt DRM::CDrmUtilityGlobalNoteWrapper::ShowPreviewListQueryL(
    TInt aResourceId )
    {
    TInt index( 0 );
    CAknGlobalListQuery* listQuery( CAknGlobalListQuery::NewLC() );
    HBufC* buffer( HBufC::NewLC( DRM::KDRMNoteBufferMaxSize ) );
    TPtr bufPtr( buffer->Des() );

    bufPtr = iResourceReader->ReadResourceString( R_DRMUTILITY_ACTIVATE_PREVIEW );
    listQuery->SetHeadingL( bufPtr );

    CDesCArray* listArray( new( ELeave ) CDesCArrayFlat( 2 ) );
    CleanupStack::PushL( listArray );

    bufPtr = iResourceReader->ReadResourceString( R_DRMUTILITY_ACTIVATE );
    listArray->AppendL( bufPtr );

    switch( aResourceId )
        {
        case R_DRMUTILITY_PREV_AUDIO_GET_LIST_QUERY:

            bufPtr = iResourceReader->ReadResourceString(
                                            R_DRMUTILITY_GET_PREVIEW );


            break;

        case R_DRMUTILITY_PREV_VIDEO_GET_LIST_QUERY:

            bufPtr = iResourceReader->ReadResourceString(
                                            R_DRMUTILITY_GET_PREVIEW_VIDEO );

            break;

        case R_DRMUTILITY_PREV_AUDIO_PLAY_LIST_QUERY:

            bufPtr = iResourceReader->ReadResourceString(
                                            R_DRMUTILITY_PLAY_PREVIEW );

            break;

        case R_DRMUTILITY_PREV_VIDEO_PLAY_LIST_QUERY:

            bufPtr = iResourceReader->ReadResourceString(
                                            R_DRMUTILITY_PLAY_PREVIEW_VIDEO );

            break;

        default:

            return 0;

        }

    listArray->AppendL( bufPtr );

    if ( FeatureManager::FeatureSupported( KFeatureIdCoverDisplay ) &&
        DRM::CDrmUtilityInfoNoteWrapper::EvaluateCoverResourceId( aResourceId ) )
        {
        RProcess myProcess;
        TUid myProcessUid( KNullUid );
        RThread().Process( myProcess );
        myProcessUid = myProcess.Identity();

        TUtilitySDData utilityData;
        // First field is DrmUtility's Uid
        utilityData.iUtilityUid = KUidCoverUiCategoryDrmUtility;
        // ProcessId which uses DrmUtility
        utilityData.iHandlerProcessId = myProcessUid;
        TUtilitySDDataPckg pckg( utilityData );
        CAknSDData* sd( CAknSDData::NewL( KUidCoverUiCategoryDrmUtility,
                                          aResourceId,
                                          pckg ) );

        // ownership to notifier client
        listQuery->SetSecondaryDisplayData( sd );
        }

    iStatus = KRequestPending;
    listQuery->ShowListQueryL( listArray, iStatus );
    SetActive();
    iWait.Start();

    CleanupStack::PopAndDestroy( 3, listQuery ); //listArray, buffer, listQuery

    if ( iStatus.Int() != EAknSoftkeyNo )
        {
        index = iStatus.Int() + 1;
        }

    return index;
    }
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:92,代码来源:DrmUtilityGlobalNoteWrapper.cpp

示例7: stopBlock

void CommandMoveLeft::update(float dt) {
	if (!_block)
		return;

	auto body1 = _block->getBody();
	if (!body1) {
		stopBlock();
		return;
	}
	auto body2 = _block->getAttachedBody();
	if (!body2) {
		stopBlock();
		return;
	}
	float32 offset = ConstantsRegistry::getValueForKey(ConstantsRegistry::constants::MOVEOFFSET);
	float32 blockSizeInMeters = _blockSize.width / ConstantsRegistry::getValueForKey(ConstantsRegistry::constants::SCALE_RATIO_BOX2D);

	if (body1->GetFixtureList()->GetFilterData().categoryBits == Block::blockFlags::PASSIVE
		|| body2->GetFixtureList()->GetFilterData().categoryBits == Block::blockFlags::PASSIVE)
		stopBlock();
	
	if (body1->GetFixtureList()->GetFilterData().categoryBits == Block::blockFlags::NEED_TO_STOP
		|| body2->GetFixtureList()->GetFilterData().categoryBits == Block::blockFlags::NEED_TO_STOP) {
		Vec2 posOnField = _block->getPosOnField();
		Sprite *sprite1 = (Sprite*)body1->GetUserData();
		Sprite *sprite2 = (Sprite*)body2->GetUserData();
		Size size = sprite1->getContentSize();
		b2Filter filter;

		if (GameField::getBlock({ posOnField.x - 1, posOnField.y })){
			stopBlock();

			filter = body1->GetFixtureList()->GetFilterData();
			filter.categoryBits = Block::blockFlags::ACTIVE;
			body1->GetFixtureList()->SetFilterData(filter);

			filter = body2->GetFixtureList()->GetFilterData();
			filter.categoryBits = Block::blockFlags::ACTIVE;
			body2->GetFixtureList()->SetFilterData(filter);

			body1->SetTransform(_positionOldFirst, 0);
			body2->SetTransform(_positionOldSecond, 0);

			sprite1->setPosition({ (body1->GetPosition().x 
					* ConstantsRegistry::getValueForKey(ConstantsRegistry::constants::SCALE_RATIO_BOX2D)) - size.width / 2
				, (body1->GetPosition().y 
					* ConstantsRegistry::getValueForKey(ConstantsRegistry::constants::SCALE_RATIO_BOX2D)) - size.height / 2 });
			sprite2->setPosition({ (body2->GetPosition().x 
					* ConstantsRegistry::getValueForKey(ConstantsRegistry::constants::SCALE_RATIO_BOX2D)) - size.width / 2
				, (body2->GetPosition().y 
					* ConstantsRegistry::getValueForKey(ConstantsRegistry::constants::SCALE_RATIO_BOX2D)) - size.height / 2 });

			SimpleUI *simpleUI = MainGameScene::getUI();
			UserInput *input = (UserInput*)simpleUI->getChildrenByName(UserInput::name());
			input->dropInputEvents();

			return;
		}

		if (!_isUndo) {
			body1->SetTransform({ _positionOldFirst.x - blockSizeInMeters, body1->GetPosition().y }, 0);
			body2->SetTransform({ _positionOldSecond.x - blockSizeInMeters, body2->GetPosition().y }, 0);
		}
		else {
			body1->SetTransform({ _positionOldFirst.x + blockSizeInMeters, body1->GetPosition().y }, 0);
			body2->SetTransform({ _positionOldSecond.x + blockSizeInMeters, body2->GetPosition().y }, 0);
		}
		sprite1->setPosition({ (body1->GetPosition().x 
				* ConstantsRegistry::getValueForKey(ConstantsRegistry::constants::SCALE_RATIO_BOX2D)) - size.width / 2
			, (body1->GetPosition().y 
				* ConstantsRegistry::getValueForKey(ConstantsRegistry::constants::SCALE_RATIO_BOX2D)) - size.height / 2 });
		sprite2->setPosition({ (body2->GetPosition().x 
				* ConstantsRegistry::getValueForKey(ConstantsRegistry::constants::SCALE_RATIO_BOX2D)) - size.width / 2
			, (body2->GetPosition().y 
				* ConstantsRegistry::getValueForKey(ConstantsRegistry::constants::SCALE_RATIO_BOX2D)) - size.height / 2 });

		stopBlock();

		filter = body1->GetFixtureList()->GetFilterData();
		filter.categoryBits ^= Block::blockFlags::NEED_TO_STOP;
		filter.categoryBits = Block::blockFlags::STOPPED;
		body1->GetFixtureList()->SetFilterData(filter);
		
		filter = body2->GetFixtureList()->GetFilterData();
		filter.categoryBits ^= Block::blockFlags::NEED_TO_STOP;
		filter.categoryBits = Block::blockFlags::STOPPED;
		body2->GetFixtureList()->SetFilterData(filter);

		body1->SetActive(false);
		body1->SetActive(true);
		body2->SetActive(false);
		body2->SetActive(true);
	}

	if ((_positionOldFirst.x - body1->GetPosition().x) < blockSizeInMeters
			&& !_isUndo
			&& _isExecute) {
		if ((_positionOldFirst.x - (body1->GetPosition().x - offset)) >= blockSizeInMeters) {
			while (offset > 0) {
				offset -= ConstantsRegistry::getValueForKey(ConstantsRegistry::constants::MOVEOFFSET) / 100;
//.........这里部分代码省略.........
开发者ID:Davarg,项目名称:blocks-revenge-of-sparrow,代码行数:101,代码来源:CommandMoveLeft.cpp

示例8: SetActive

/**
* Outstanding request has been completed, start waiting for another request.
**/
void CTRadioUtilityConsole::ReadConsoleL()
	{
	iConsole->Read(iStatus);
	SetActive();
	}
开发者ID:kuailexs,项目名称:symbiandump-mw2,代码行数:8,代码来源:TFMRadioUtility.cpp

示例9: SetActive

void UActorComponent::ToggleActive()
{
	SetActive(!bIsActive);
}
开发者ID:mysheng8,项目名称:UnrealEngine,代码行数:4,代码来源:ActorComponent.cpp

示例10: switch

void CViewTester::RunL()
	{
	switch (iState)
		{
		case ECreate_RemoteView:
			iTest.Next(_L("Named Remote View creation View Ready event"));

			iNamedRemoteView = CContactNamedRemoteView::NewL( *this, KViewName, iDb, iSortOrder[0], EContactsOnly );
			// Wait for view to be created
			iTimer.After( iStatus, KViewWaitTimeout );
			SetActive();
			NextState();
		break;


		// It is an error for the RTimer to trigger before the state has changed.
		case EWait_RemoteView:
			iTest.Printf(_L("Timeout waiting for Remote View to be created"));
			TRAP_IGNORE(CleanupFilesL() );
			iTest( EFalse); // failed
		break;

		case ECreate_FilteredView:
			iTest.Next(_L("Filtered View creation View Ready event"));

			iFilteredView = CContactFilteredView::NewL( *this, iDb, *iNamedRemoteView, CContactDatabase::ESmsable );
			// Wait for view to be created
			iTimer.After( iStatus, KViewWaitTimeout );
			SetActive();
			NextState();
		break;


		// It is an error for the RTimer to trigger before the state has changed.
		case EWait_FilteredView:
			iTest.Printf(_L("Timeout waiting for Filtered View to be created"));
			TRAP_IGNORE(CleanupFilesL() );
			iTest( EFalse ); // failed
		break;

		case EChangeSortOrder:
			iTest.Next(_L("Re-sort Remote View and Filtered View, wait for view events"));

			iNamedRemoteView->ChangeSortOrderL( iSortOrder[1] );
			// Wait for views to be resorted
			iTimer.After( iStatus, KViewWaitTimeout );
			SetActive();
			NextState();
		break;


		// It is an error for the RTimer to trigger before the state has changed.
		case EWait_SortViewEvents:
			// Give information on what went wrong:
			iTest.Printf(_L("Test Timeout waiting for Filtered and Remote View to be resorted:\n"));
			switch(iRemoteViewEvent)
				{
				case TContactViewEvent::EReady:
					iTest.Printf(_L("  Named Remote View; sort not started\n"));
				break;

				case TContactViewEvent::EUnavailable:
					iTest.Printf(_L("  Named Remote View; sort not finished\n"));
				break;

				case TContactViewEvent::ESortOrderChanged:
					// Remote View Sorted & Ready
				break;

				default:
					// error in test
					User::Invariant();
				}

			switch(iFilteredViewEvent)
				{
				case TContactViewEvent::EReady:
					iTest.Printf(_L("  Filtered View; sort not started\n"));
				break;

				case TContactViewEvent::EUnavailable:
					iTest.Printf(_L("  Filtered View; sort not finished\n"));
				break;

				case TContactViewEvent::ESortOrderChanged:
					// Filtered View Sorted & Ready
				break;

				default:
					// error in test
					User::Invariant();
				}
			TRAP_IGNORE(CleanupFilesL() );
			iTest( EFalse ); // failed
		break;

		case EFinished:
			CActiveScheduler::Stop(); // we're done.
		break;

//.........这里部分代码省略.........
开发者ID:Esclapion,项目名称:qt-mobility,代码行数:101,代码来源:t_filterbroadcast.cpp

示例11: SetActive

void CViewTester::CallRunLAgain()
	{
	TRequestStatus *pS=&iStatus;
	User::RequestComplete(pS,KErrNone);
	SetActive();
	}
开发者ID:Esclapion,项目名称:qt-mobility,代码行数:6,代码来源:t_filterbroadcast.cpp

示例12: defined

// Async equivalent to QHostInfoAgent::fromName()
void QSymbianHostResolver::requestHostLookup()
{

#if defined(QHOSTINFO_DEBUG)
    qDebug("QSymbianHostResolver::requestHostLookup(%s) looking up... (id = %d)",
        iHostName.toLatin1().constData(), id());
#endif

    QSymbianHostInfoLookupManager *manager = QSymbianHostInfoLookupManager::globalInstance();
    if (manager->cache.isEnabled()) {
        //check if name has been put in the cache while this request was queued
        bool valid;
        QHostInfo cachedResult = manager->cache.get(iHostName, &valid);
        if (valid) {
#if defined(QHOSTINFO_DEBUG)
            qDebug("...found in cache");
#endif
            iResults = cachedResult;
            iState = ECompleteFromCache;
            SetActive();
            TRequestStatus* stat = &iStatus;
            User::RequestComplete(stat, KErrNone);
            return;
        }
    }

    int err;
    if (iNetworkSession) {
        err = QNetworkSessionPrivate::nativeOpenHostResolver(*iNetworkSession, iHostResolver, KAfInet, KProtocolInetUdp);
#if defined(QHOSTINFO_DEBUG)
        qDebug("using resolver from session (err = %d)", err);
#endif
    } else {
        err = iHostResolver.Open(iSocketServ, KAfInet, KProtocolInetUdp);
#if defined(QHOSTINFO_DEBUG)
        qDebug("using default resolver (err = %d)", err);
#endif
    }
    if (err) {
        setError_helper(iResults, err);
    } else {

        if (iAddress.setAddress(iHostName)) {
            // Reverse lookup
            IpAdd.Input(qt_QString2TPtrC(iHostName));

            // Asynchronous request.
            iHostResolver.GetByAddress(IpAdd, iNameResult, iStatus); // <---- ASYNC
            iState = EGetByAddress;

        } else {

            // IDN support
            QByteArray aceHostname = QUrl::toAce(iHostName);
            iResults.setHostName(iHostName);
            if (aceHostname.isEmpty()) {
                iResults.setError(QHostInfo::HostNotFound);
                iResults.setErrorString(iHostName.isEmpty() ?
                                       QCoreApplication::translate("QHostInfoAgent", "No host name given") :
                                       QCoreApplication::translate("QHostInfoAgent", "Invalid hostname"));

                err = KErrArgument;
            } else {
                iEncodedHostName = QString::fromLatin1(aceHostname);
                iHostNamePtr.Set(qt_QString2TPtrC(iEncodedHostName));

                // Asynchronous request.
                iHostResolver.GetByName(iHostNamePtr, iNameResult, iStatus);
                iState = EGetByName;
            }
        }
    }
    SetActive();
    if (err) {
        iHostResolver.Close();

        //self complete so that RunL can inform manager without causing recursion
        iState = EError;
        TRequestStatus* stat = &iStatus;
        User::RequestComplete(stat, err);
    }
}
开发者ID:13W,项目名称:phantomjs,代码行数:83,代码来源:qhostinfo_symbian.cpp

示例13: ScrollLineUp

void ScrollableSelectorWidget::AcceptMessage(const Message& message) {
	if (message.is("ScrollUp")) {
		ScrollLineUp();
	} else if (message.is("ScrollDown")) {
		ScrollLineDown();
	} else if (message.is("UpdateButtons")) {
		UpdateScrollButtons();
	} else if (message.is("Add")) {
		_itemsList.push_back(message.getData());
		UpdateScrollButtons();
	} else if (message.is("Set")) {
		Assert(false);
        /*if (!activeTextListItemController)
		{
			activeTextListItemController = new ActiveSelectorItemController;
			Core::controllerKernel.addController(activeTextListItemController);
		}*/
		SetActive(message.getData());
		UpdateScrollButtons();
	} else if (message.is("Clear")) {
		_itemsList.clear();
		_startString = 0;
		_choosedString = 0;
	} else if (message.is("DeleteFromIndex")) {
		ItemsList::iterator i = _itemsList.begin();
		std::advance(i, message.getIntegerParam());
		ItemsList::iterator set = _itemsList.erase(i);
		if (set!=_itemsList.end())
		{
			SetActive(*set);
		}
		if (set==_itemsList.end() && !_itemsList.empty())
		{
			SetActive(_itemsList.back());
		}
	} else if (message.is("Delete")) {
		ItemsList::iterator i = std::find(_itemsList.begin(), _itemsList.end(), message.getData());
		if (i!=_itemsList.end())
		{
			ItemsList::iterator set = _itemsList.erase(i);
			if (set!=_itemsList.end())
			{
				SetActive(*set);
			}
			if (set==_itemsList.end() && !_itemsList.empty())
			{
				SetActive(_itemsList.back());
			}

		}
		UpdateScrollButtons();
	} /*else if (message.is("KeyPress")) {
		int key = utils::lexical_cast <int> (message.getData());
		if (key == -VK_UP) {
			ScrollLineUp();
		} else if (key == -VK_DOWN) {
			ScrollLineDown();
		} else if (key == -VK_PRIOR) {
			ScrollPageUp();
		} else if (key == -VK_NEXT) {
			ScrollPageDown();
		}
	}*/
}
开发者ID:code4funnn,项目名称:4-Elements-Test,代码行数:64,代码来源:ScrollableSelectorWidget.cpp

示例14: SetActive

// --------------------------------------------------------------------------
// Issue request to read from wsrv event queue
// --------------------------------------------------------------------------
void CAknCompaSrvWsEventHandler::IssueRequest()
    {
    iWsSession.EventReady(&iStatus);
    SetActive();
    }
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:8,代码来源:akncompaserver.cpp

示例15: SetActive

void BLOCO_API HumanView::Console::Update( const int deltaMilliseconds )
{
	//Don't do anything if not active.
	if ( !m_bActive )
	{
		return;	//Bail!
	}

	//Do we have a string to execute?
	if ( true == m_bExecuteStringOnUpdate )
	{
		const std::string renderedInputString = std::string("> ") + m_CurrentInputString;
		if ( 0 == m_CurrentInputString.compare( kExitString ) )
		{
			SetActive( false );
			m_CurrentInputString.clear();
			m_helperPos = -1;
		}
		else if ( 0 == m_CurrentInputString.compare( kClearString ) )
		{
			m_CurrentOutputString.clear();	//clear
			m_CurrentInputString.clear();
			m_helperPos = -1;
		}
		else
		{
			//Attempt to execute the current input string...
			if (m_CurrentInputString.size() > 1)
			{
				const int retVal = g_pApp->m_pLuaStateManager->ExecuteString( m_CurrentInputString.c_str() );
				
				//Clear the input string
				if ( 0 == retVal )
				{	
					vector<string> temp;
					temp.push_back(m_CurrentInputString);
					for (UINT i = 0; i < m_history.size(); i++)
					{
						temp.push_back(m_history[i]);
					}

					m_history = temp;
					
					//Put the input string into the output window.
					AddDisplayText( renderedInputString );
				}
			}

			m_CurrentInputString.clear();		
		}

		//We're accepting input again.
		m_bExecuteStringOnUpdate = false;
	}

	//Update the cursor blink timer...
	m_CursorBlinkTimer -= deltaMilliseconds;

	if ( m_CursorBlinkTimer < 0 )
	{
		m_CursorBlinkTimer = 0;

		m_bCursorOn = !m_bCursorOn;

		m_CursorBlinkTimer = kCursorBlinkTimeMS;
	}
}
开发者ID:Beliazz,项目名称:Bloco,代码行数:67,代码来源:HumanView.cpp


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