コード例 #1
0
void FNavigationBuildingNotificationImpl::Tick(float DeltaTime)
{
#if WITH_NAVIGATION_GENERATOR
	if (FPlayWorldCommandCallbacks::IsInPIE_AndRunning())
	{
		return;
	}

	UEditorEngine* const EEngine = Cast<UEditorEngine>(GEngine);
	if (EEngine != NULL)
	{
		const bool bUserRequestedBuild = FEditorBuildUtils::IsBuildingNavigationFromUserRequest();
		FWorldContext &EditorContext = EEngine->GetEditorWorldContext();
		
		const bool bBuildInProgress = EditorContext.World() != NULL && EditorContext.World()->GetNavigationSystem() != NULL 
			&& EditorContext.World()->GetNavigationSystem()->IsNavigationBuildInProgress( GetDefault<ULevelEditorMiscSettings>()->bNavigationAutoUpdate ? true : false) == true;

		if (!bPreviouslyDetectedBuild && bBuildInProgress)
		{
			TimeOfStartedBuild = FPlatformTime::Seconds();
		}
		else if(bPreviouslyDetectedBuild && !bBuildInProgress)
		{
			TimeOfStoppedBuild = FPlatformTime::Seconds();
		}

		if( bBuildInProgress && bPreviouslyDetectedBuild && 
			!NavigationBuildNotificationPtr.IsValid() && 
			(bUserRequestedBuild || (!bUserRequestedBuild && (FPlatformTime::Seconds() - TimeOfStartedBuild) > 0.1))
		) 
		{
			BuildStarted();
		}
		// Disable the notification when we are no longer doing an async compile
		else if (!bBuildInProgress && !bPreviouslyDetectedBuild && (FPlatformTime::Seconds() - TimeOfStoppedBuild) > 1.0)
		{
			BuildFinished();
		}

		bPreviouslyDetectedBuild = bBuildInProgress;
	}
#endif
}
コード例 #2
0
ファイル: mainwindow.cpp プロジェクト: mefest/apdvmupdater
void MainWindow::connectland()
{
	connect(Btn_Close, SIGNAL(clicked()), qApp, SLOT(closeAllWindows()));
	connect(Btn_First_Ignore, SIGNAL(clicked()),this, SLOT(START_IgnorePath()));
	connect(Btn_First_Ok, SIGNAL(clicked()),this, SLOT(START_SetUpdaterPath()));
	connect(Btn_First_Search, SIGNAL(clicked()),this, SLOT(START_SearchPathUpdater()));
	connect(Btn_Item_addfolder, SIGNAL(clicked()),treeWidget, SLOT(AddFolder()));
	connect(Btn_Item_addfile, SIGNAL(clicked()),treeWidget, SLOT(AddFile()));
	connect(Btn_Item_remove, SIGNAL(clicked()),treeWidget, SLOT(DeleteSelectedFile()));

    connect(Btn_Apply_Edit, SIGNAL(clicked()), this, SLOT(Liste_Edit_Apply()));
    connect(checkBox, SIGNAL(clicked(bool)),treeWidget, SLOT(setFilelevel(bool)));

    connect(CBoxAfficherMsgBox, SIGNAL(stateChanged(int)), this, SLOT(EnableMsgBox(int)));
	connect(treeWidget,SIGNAL(TaskToShowInStatusbar(QString)), this, SLOT(Set_Status_Msg(QString)));
	connect(treeWidget,SIGNAL(TaskToShowGbEdit(bool)), this, SLOT(Liste_Show_Edit(bool)));
	connect(treeWidget,SIGNAL(TaskToEnableGUI(bool)), this, SLOT(EnableControls(bool)));
	connect(Btn_Apply, SIGNAL(clicked()), this, SLOT(LaunchGen()));
        connect(&OXM_Generator,SIGNAL(NotifyErrorMsg(QString)),this,SLOT(ShowMsgError(QString)));
        connect(&OXM_Generator,SIGNAL(NotifyMsg(QString)),this,SLOT(ShowMsg(QString)));
        connect(&OXM_Generator,SIGNAL(NotifyProgress(int, int)),this,SLOT(Showprogress(int, int)));
        connect(treeWidget,SIGNAL(NotifyProgress(int, int)),this,SLOT(Showprogress(int, int)));
        connect(&OXM_Generator,SIGNAL(finished()),this,SLOT(BuildFinished()));
}