NCBI C++ ToolKit
|
Search Toolkit Book for CSelectProjectOptions
CProjectSelectOptions - describes how new Project Items shall be added to a workspace. More...
#include <gui/core/select_project_options.hpp>
Public Types | |
enum | EAction { eInvalidAction = -1 , eDecideLater , eCreateNewProject , eCreateSeparateProjects , eAddToExistingProject } |
using | TProjectId = objects::CGBProjectHandle::TId |
typedef CRef< objects::CProjectItem > | TItemRef |
typedef vector< TItemRef > | TItems |
typedef CRef< objects::CLoaderDescriptor > | TLoaderRef |
typedef vector< TLoaderRef > | TLoaders |
typedef map< TLoaderRef, TItems > | TData |
Public Member Functions | |
CSelectProjectOptions () | |
CSelectProjectOptions. More... | |
void | Set_DecideLater () |
void | Set_CreateNewProject (const string &folder=kEmptyStr) |
void | Set_CreateSeparateProjects () |
void | Set_AddToExistingProject (TProjectId &project_id, const string &folder=kEmptyStr) |
void | SetNewProjectName (const string &newProjectName) |
EAction | GetAction () |
TProjectId | GetTargetProjectId () |
string | GetFolderName () |
bool | AddItemsToWorkspace (CProjectService *service, const TData &data) |
Static Public Member Functions | |
static void | InitProjectnameGenerator (objects::CGBWorkspace &ws, CUniqueLabelGenerator &projectNames) |
static CGBDocument * | CreateProject (CProjectService *service, const string &prjName, const string &prjDesc) |
Protected Member Functions | |
bool | x_ShowSelectProjectDialog (CProjectService *service, TItems &items) |
void | x_AddToExistingProject (CProjectService *service, TItems &items, const TLoaders &loaders) |
void | x_CreateOneProject (CProjectService *service, TItems &items, const TLoaders &loaders) |
void | x_CreateSeparateProjects (CProjectService *service, const TData &data) |
for every Project Item in m_Items creates a new project, adds the item to the project and loads the data More... | |
Protected Attributes | |
EAction | m_Action |
TProjectId | m_TargetProjectId |
string | m_FolderName |
string | m_NewProjectName |
CProjectSelectOptions - describes how new Project Items shall be added to a workspace.
If folder name is not empty a new Project Folder will be created for the items.
Definition at line 54 of file select_project_options.hpp.
typedef map<TLoaderRef, TItems> CSelectProjectOptions::TData |
Definition at line 88 of file select_project_options.hpp.
typedef CRef<objects::CProjectItem> CSelectProjectOptions::TItemRef |
Definition at line 82 of file select_project_options.hpp.
typedef vector<TItemRef> CSelectProjectOptions::TItems |
Definition at line 83 of file select_project_options.hpp.
typedef CRef<objects::CLoaderDescriptor> CSelectProjectOptions::TLoaderRef |
Definition at line 85 of file select_project_options.hpp.
typedef vector<TLoaderRef> CSelectProjectOptions::TLoaders |
Definition at line 86 of file select_project_options.hpp.
using CSelectProjectOptions::TProjectId = objects::CGBProjectHandle::TId |
Definition at line 64 of file select_project_options.hpp.
Enumerator | |
---|---|
eInvalidAction | |
eDecideLater | |
eCreateNewProject | |
eCreateSeparateProjects | |
eAddToExistingProject |
Definition at line 57 of file select_project_options.hpp.
CSelectProjectOptions::CSelectProjectOptions | ( | ) |
Definition at line 51 of file select_project_options.cpp.
bool CSelectProjectOptions::AddItemsToWorkspace | ( | CProjectService * | service, |
const TData & | data | ||
) |
Definition at line 104 of file select_project_options.cpp.
References _ASSERT, eAddToExistingProject, eCreateNewProject, eCreateSeparateProjects, eDecideLater, ITERATE, m_Action, x_AddToExistingProject(), x_CreateOneProject(), x_CreateSeparateProjects(), and x_ShowSelectProjectDialog().
Referenced by CObjectLoadingTask::AddObjects(), CDataLoadingAppTask::Run(), CDataLoadingAppTask::x_OnAppJobProgress(), and CCreateGeneModelTask::x_Run().
|
static |
Definition at line 190 of file select_project_options.cpp.
References _ASSERT, CGBDocument::CreateProjectScope(), CTime::eCurrent, CRef< C, Locker >::Release(), CProjectDescr_Base::SetComment(), CProjectDescr::SetCreateDate(), and CProjectDescr::SetModifiedDate().
Referenced by CFileLoadManager::x_CreateNewProject(), x_CreateOneProject(), and x_CreateSeparateProjects().
CSelectProjectOptions::EAction CSelectProjectOptions::GetAction | ( | void | ) |
Definition at line 87 of file select_project_options.cpp.
References m_Action.
Referenced by CFileLoadManager::GetTask().
string CSelectProjectOptions::GetFolderName | ( | ) |
Definition at line 99 of file select_project_options.cpp.
References m_FolderName.
Referenced by CFileLoadManager::GetTask().
CSelectProjectOptions::TProjectId CSelectProjectOptions::GetTargetProjectId | ( | ) |
Definition at line 93 of file select_project_options.cpp.
References m_TargetProjectId.
Referenced by CBlastSearchTask::Init_RetrieveRID().
|
static |
Definition at line 181 of file select_project_options.cpp.
References CUniqueLabelGenerator::AddExistingLabel(), and CGBWorkspace_Base::GetWorkspace().
Referenced by CFileLoadManager::x_CreateNewProject(), x_CreateOneProject(), and x_CreateSeparateProjects().
void CSelectProjectOptions::Set_AddToExistingProject | ( | TProjectId & | project_id, |
const string & | folder = kEmptyStr |
||
) |
Definition at line 78 of file select_project_options.cpp.
References eAddToExistingProject, m_Action, m_FolderName, and m_TargetProjectId.
Referenced by CFileLoadManager::GetTask(), CPhyTreeView::OnCreateSelectedSubtree(), CKalignTool::QuickLaunch(), CMafftTool::QuickLaunch(), CMuscleTool::QuickLaunch(), CSplignTool::QuickLaunch(), and SProjectSelectorParams::ToLoadingOptions().
Definition at line 63 of file select_project_options.cpp.
References eCreateNewProject, m_Action, m_FolderName, and m_TargetProjectId.
Referenced by CSrcEditTool::GetTask(), LoadFileForSubmission(), CIndexerAppModeExtension::OnFileOpen(), CKalignTool::QuickLaunch(), CMafftTool::QuickLaunch(), CMuscleTool::QuickLaunch(), CSplignTool::QuickLaunch(), SProjectSelectorParams::ToLoadingOptions(), and CDataMiningPanel::x_AddToProject().
void CSelectProjectOptions::Set_CreateSeparateProjects | ( | ) |
Definition at line 71 of file select_project_options.cpp.
References eCreateSeparateProjects, m_Action, and m_FolderName.
Referenced by SProjectSelectorParams::ToLoadingOptions().
void CSelectProjectOptions::Set_DecideLater | ( | ) |
Definition at line 57 of file select_project_options.cpp.
References eDecideLater, and m_Action.
Referenced by CDataMiningPanel::x_AddToProject(), and CNetBLASTUIDataSource::x_StartTask().
Definition at line 76 of file select_project_options.hpp.
References m_NewProjectName.
|
protected |
Definition at line 166 of file select_project_options.cpp.
References CGBDocument::AddItems(), Error(), CProjectService::GetGBWorkspace(), LOG_POST, m_FolderName, and m_TargetProjectId.
Referenced by AddItemsToWorkspace().
|
protected |
Definition at line 210 of file select_project_options.cpp.
References CGBDocument::AddItems(), CProjectService::AddProject(), CProjectService::CreateNewWorkspace(), CreateProject(), CProjectService::GetGBWorkspace(), CProjectService::HasWorkspace(), InitProjectnameGenerator(), m_FolderName, m_NewProjectName, and CUniqueLabelGenerator::MakeUniqueLabel().
Referenced by AddItemsToWorkspace().
|
protected |
for every Project Item in m_Items creates a new project, adds the item to the project and loads the data
Definition at line 228 of file select_project_options.cpp.
References CUniqueLabelGenerator::AddExistingLabel(), CGBDocument::AddItems(), CProjectService::AddProject(), CProjectService::CreateNewWorkspace(), CreateProject(), CProjectService::GetGBWorkspace(), CProjectService::HasWorkspace(), InitProjectnameGenerator(), ITERATE, m_NewProjectName, and CUniqueLabelGenerator::MakeUniqueLabel().
Referenced by AddItemsToWorkspace().
|
protected |
Definition at line 140 of file select_project_options.cpp.
References CScope::AddDefaults(), CObjectManager::GetInstance(), CProjectItem::GetObject(), CProjectSelectorDlg::GetParams(), i, NULL, CProjectSelectorDlg::SetObjects(), CProjectSelectorDlg::SetProjectService(), CDialog::SetRegistryPath(), SProjectSelectorParams::ToLoadingOptions(), wxID_ANY, and wxT.
Referenced by AddItemsToWorkspace().
|
protected |
Definition at line 102 of file select_project_options.hpp.
Referenced by AddItemsToWorkspace(), GetAction(), Set_AddToExistingProject(), Set_CreateNewProject(), Set_CreateSeparateProjects(), and Set_DecideLater().
|
protected |
Definition at line 104 of file select_project_options.hpp.
Referenced by GetFolderName(), Set_AddToExistingProject(), Set_CreateNewProject(), Set_CreateSeparateProjects(), x_AddToExistingProject(), and x_CreateOneProject().
|
protected |
Definition at line 105 of file select_project_options.hpp.
Referenced by SetNewProjectName(), x_CreateOneProject(), and x_CreateSeparateProjects().
|
protected |
Definition at line 103 of file select_project_options.hpp.
Referenced by GetTargetProjectId(), Set_AddToExistingProject(), Set_CreateNewProject(), and x_AddToExistingProject().