Search Toolkit Book for CFileLoadManager
CFileLoadManager CFileLoadManager - a Loader Manager implementing "File" option in "Open" dialog. More...
#include <gui/core/ui_file_load_manager.hpp>
CFileLoadManager CFileLoadManager - a Loader Manager implementing "File" option in "Open" dialog.
CFileLoadManager combines IFileFormatLoaderManager for different file formats and acts as a Facade for them.
Definition at line 119 of file ui_file_load_manager.hpp.
◆ TFormatMgrRef ◆ TMRUPathList ◆ TProjectId ◆ EState ◆ CFileLoadManager() CFileLoadManager::CFileLoadManager ( ) ◆ AddFileFormat() ◆ CanDo() ◆ CleanUI() void CFileLoadManager::CleanUI ( ) virtual ◆ DoTransition()Performs transition if possible and returns true, otherwise the function shall warn the user about the problem preventing the transition (such as insufficient or invalid input) and return false.
Typically this function would take user input from the current panel, validate the input and go to the next state creating new UI panel if needed.
Implements IUIToolManager.
Definition at line 320 of file ui_file_load_manager.cpp.
References _ASSERT, IUIToolManager::eBack, eCompleted, eFormatDefined, IUIToolManager::eNext, eSelectFiles, eSelectProjects, CCompressedFile::FileExists(), filenames, CFileLoadOptionPanel::GetCheckFormat(), CFileAutoLoader::GetCurrentManager(), IFileFormatLoaderManager::GetFileLoaderId(), CFileLoadOptionPanel::GetFilenames(), CProjectSelectorPanel::GetParams(), CRef< C, Locker >::GetPointer(), CFileLoadOptionPanel::GetSelectedFormat(), ITERATE, m_AltToolManager, m_CurrFormat, m_FormatManagers, m_OptionPanel, m_ProjectParams, m_ProjectSelPanel, m_State, NcbiErrorBox(), NULL, CFileLoadOptionPanel::OnActivatePanel(), CProjectSelectorPanel::TransferDataFromWindow(), wxT, and x_CheckFormatConflict().
◆ GetAlternateToolManager()If a transition fails, it may make sense to switch to a different tool manger When a tool manager identifies a more appropriate manager for a task, it returns it here, otherwise NULL.
Reimplemented from IUIToolManager.
Definition at line 175 of file ui_file_load_manager.hpp.
References m_AltToolManager.
◆ GetCurrentPanel() wxPanel * CFileLoadManager::GetCurrentPanel ( ) virtualReturn the panel corresponding to the current state of Tool Manager.
Implements IUIToolManager.
Definition at line 196 of file ui_file_load_manager.cpp.
References eFormatDefined, eSelectFiles, eSelectProjects, IServiceLocator::GetServiceByType(), m_CurrFormat, m_FormatManagers, m_ParentWindow, m_ProjectParams, m_ProjectSelPanel, m_SrvLocator, m_State, NULL, CProjectSelectorPanel::SetParams(), CProjectSelectorPanel::SetProjectService(), CProjectSelectorPanel::TransferDataToWindow(), and x_GetOptionsPanel().
◆ GetDescriptor() ◆ GetExecuteUnit() ◆ GetFilenames() vector<wxString> CFileLoadManager::GetFilenames ( ) const inline ◆ GetFirstPage() ◆ GetLabel() virtual string CFileLoadManager::GetLabel ( void ) const inlinevirtual ◆ GetTask() IAppTask * CFileLoadManager::GetTask ( ) virtualOnce parameters are gathered and validated this function is called to produce the final Task object that will be executed to do the actual computational work.
Implements IUIToolManager.
Definition at line 431 of file ui_file_load_manager.cpp.
References _ASSERT, CTimeMRUList< T >::Add(), CSelectProjectOptions::eCreateNewProject, filenames, CSelectProjectOptions::GetAction(), CSelectProjectOptions::GetFolderName(), CFileLoadOptionPanel::GetSelectedFormat(), IServiceLocator::GetServiceByType(), ITERATE, label, m_CurrFormat, m_FileMRUList, m_FormatManagers, m_OptionPanel, m_ProjectParams, m_SrvLocator, NULL, CSelectProjectOptions::Set_AddToExistingProject(), CDataLoadingAppTask::SetOptions(), SProjectSelectorParams::ToLoadingOptions(), ToWxString(), and x_CreateNewProject().
◆ InitUI() void CFileLoadManager::InitUI ( ) virtualInitializes the Manager before using it in UI.
This function shall reset Internal state of the tool.
Implements IUIToolManager.
Definition at line 137 of file ui_file_load_manager.cpp.
References eSelectFiles, i, IUIToolManager::InitUI(), m_FormatManagers, m_OptionPanel, m_ParentWindow, m_SrvLocator, m_State, CFileLoadOptionPanel::OnActivatePanel(), IUIToolManager::SetParentWindow(), and IUIToolManager::SetServiceLocator().
◆ IsCompletedState() bool CFileLoadManager::IsCompletedState ( ) virtualManager goes into "Complete" state when "Finish" button is pressed and all input data is gatherred and validated.
Typically this is the last state after Final state. This state does not have an associated UI panel. When manager reaches the Completed state the framework hides the dialog and calls GetTask() function.
Implements IUIToolManager.
Definition at line 273 of file ui_file_load_manager.cpp.
References eCompleted, and m_State.
◆ IsFinalState() bool CFileLoadManager::IsFinalState ( ) virtualTrue if Tool Manager has reached its final state, i.e.
the last page (panel) in the sequence is displayed and "Finish" button is shown. The framework calls this function to decide whether Finish or Next button needs to be shown.
Implements IUIToolManager.
Definition at line 267 of file ui_file_load_manager.cpp.
References eSelectProjects, and m_State.
◆ LoadRegisteredManagers() void CFileLoadManager::LoadRegisteredManagers ( ) ◆ LoadSettings() void CFileLoadManager::LoadSettings ( ) virtualImplements IRegSettings.
Definition at line 706 of file ui_file_load_manager.cpp.
References CTimeMRUList< T >::Add(), CTimeMRUList< T >::Clear(), CTimeFormat::eISO8601_DateTimeSec, FnToWxString(), format, CRegistryReadView::GetBool(), CGuiRegistry::GetInstance(), CRef< C, Locker >::GetPointer(), CTimeFormat::GetPredefined(), CGuiRegistry::GetReadView(), CRegistryReadView::GetString(), CRegistryReadView::GetStringVec(), CTime::GetTimeT(), i, int, kCheckFormatTag, kMRUTag, kSelectedFormatTag, IRegSettings::LoadSettings(), m_CheckFormat, m_CurrFormat, m_FileMRUList, m_FormatManagers, m_RegPath, and t.
◆ OnFormatChanged() void CFileLoadManager::OnFormatChanged ( ) virtual ◆ ResetState() void CFileLoadManager::ResetState ( ) virtual ◆ SaveSettings() void CFileLoadManager::SaveSettings ( ) const virtualImplements IRegSettings.
Definition at line 655 of file ui_file_load_manager.cpp.
References CTime::AsString(), CTimeFormat::eISO8601_DateTimeSec, FnToStdString(), format, CFileLoadOptionPanel::GetCheckFormat(), CGuiRegistry::GetInstance(), CTimeMRUList< T >::GetMap(), CRef< C, Locker >::GetPointer(), CTimeFormat::GetPredefined(), CFileLoadOptionPanel::GetSelectedFormat(), CGuiRegistry::GetWriteView(), i, ITERATE, kCheckFormatTag, kMRUTag, kSelectedFormatTag, m_FileMRUList, m_FormatManagers, m_OptionPanel, m_RegPath, IRegSettings::SaveSettings(), CRegistryWriteView::Set(), and CTime::ToLocalTime().
◆ SetDialog() void CFileLoadManager::SetDialog ( COpenDlg * dlg ) ◆ SetFilenames() void CFileLoadManager::SetFilenames ( vector< wxString > & filenames ) virtual ◆ SetParentWindow() void CFileLoadManager::SetParentWindow ( wxWindow * parent ) virtual ◆ SetPrevPage() ◆ SetRegistryPath() void CFileLoadManager::SetRegistryPath ( const string & path ) virtual ◆ SetServiceLocator() ◆ x_AutoGuessFormat() void CFileLoadManager::x_AutoGuessFormat ( ) protectedDefinition at line 567 of file ui_file_load_manager.cpp.
References _ASSERT, i, int, m_CurrFormat, m_Filenames, m_FormatManagers, m_OptionPanel, ok, IFileFormatLoaderManager::RecognizeFormat(), and CFileLoadOptionPanel::SelectFormat().
Referenced by SetFilenames(), and x_GetOptionsPanel().
◆ x_CanLeavePage() bool CFileLoadManager::x_CanLeavePage ( bool forward ) protectedDefinition at line 535 of file ui_file_load_manager.cpp.
References CTimeMRUList< T >::Add(), filenames, CFileLoadOptionPanel::GetCheckFormat(), CFileLoadOptionPanel::GetFilenames(), CFileLoadOptionPanel::GetSelectedFormat(), ITERATE, label, m_CurrFormat, m_FileMRUList, m_FormatManagers, m_OptionPanel, NcbiErrorBox(), ToWxString(), and x_CheckFormatConflict().
Referenced by CFileLoadManager::CFilePage::CanLeavePage().
◆ x_CheckFormatConflict() bool CFileLoadManager::x_CheckFormatConflict ( const vector< wxString > & filenames, TFormatMgrRef & manager ) protectedDefinition at line 281 of file ui_file_load_manager.cpp.
References eCancel, eDialog_YesNoCancel, eIcon_Exclamation, eNo, filenames, CFileAutoLoader::GetCurrentManager(), CFormatGuess::GetFormatName(), CFileLoadOptionPanel::GetSelectedFormat(), i, kFORMAT_CONFLICT_MSG, m_CurrFormat, m_FormatManagers, m_OptionPanel, NcbiMessageBoxW(), CRef< C, Locker >::Reset(), CFileLoadOptionPanel::SelectFormat(), CFileAutoLoader::SetFormatManager(), ToWxString(), and wxT.
Referenced by DoTransition(), and x_CanLeavePage().
◆ x_CreateNewProject() ◆ x_GetOptionsPanel()Definition at line 589 of file ui_file_load_manager.cpp.
References IUIToolManager::GetDescriptor(), IFileFormatLoaderManager::GetFileLoaderId(), IFileFormatLoaderManager::GetFormatWildcard(), IUIObject::GetLabel(), i, label, m_CheckFormat, m_CurrFormat, m_FileMRUList, m_Filenames, m_FormatManagers, m_OptionPanel, m_ParentWindow, max(), CFileLoadOptionPanel::SelectFormat(), CFileLoadOptionPanel::SetCheckFormat(), CFileLoadOptionPanel::SetFilenames(), CFileLoadOptionPanel::SetFormats(), CFileLoadOptionPanel::SetManager(), CFileLoadOptionPanel::SetMRU(), IFileFormatLoaderManager::SingleFileLoader(), ToWxString(), and x_AutoGuessFormat().
Referenced by GetCurrentPanel(), GetFirstPage(), and CFileLoadManager::CFilePage::GetPanel().
◆ x_UpdateWizardPages() void CFileLoadManager::x_UpdateWizardPages ( ) protectedDefinition at line 509 of file ui_file_load_manager.cpp.
References CWizardDlg::eCmdUpdateButtons, m_CurrFormat, m_FormatManagers, m_OpenDlg, m_OpenObjectsPage, m_ParentWindow, IWizardPage::SetNextPage(), IWizardPage::SetOptionsPage(), COpenDlg::Update(), and wxEVT_COMMAND_MENU_SELECTED.
Referenced by OnFormatChanged(), and SetPrevPage().
◆ m_AltToolManager ◆ m_AutodetectFormat ◆ m_CheckFormat bool CFileLoadManager::m_CheckFormat protected ◆ m_CurrFormat int CFileLoadManager::m_CurrFormat protectedDefinition at line 244 of file ui_file_load_manager.hpp.
Referenced by CanDo(), CleanUI(), DoTransition(), GetCurrentPanel(), GetDescriptor(), GetExecuteUnit(), GetTask(), LoadSettings(), OnFormatChanged(), x_AutoGuessFormat(), x_CanLeavePage(), x_CheckFormatConflict(), x_GetOptionsPanel(), and x_UpdateWizardPages().
◆ m_Descriptor ◆ m_FileMRUList ◆ m_Filenames vector<wxString> CFileLoadManager::m_Filenames protected ◆ m_FilePage ◆ m_FormatManagersDefinition at line 243 of file ui_file_load_manager.hpp.
Referenced by AddFileFormat(), CanDo(), CleanUI(), DoTransition(), GetCurrentPanel(), GetDescriptor(), GetExecuteUnit(), GetTask(), InitUI(), LoadSettings(), SaveSettings(), SetRegistryPath(), x_AutoGuessFormat(), x_CanLeavePage(), x_CheckFormatConflict(), x_GetOptionsPanel(), and x_UpdateWizardPages().
◆ m_OpenDlg ◆ m_OpenObjectsPage ◆ m_OptionPanelDefinition at line 252 of file ui_file_load_manager.hpp.
Referenced by CleanUI(), DoTransition(), GetTask(), InitUI(), OnFormatChanged(), SaveSettings(), SetFilenames(), x_AutoGuessFormat(), x_CanLeavePage(), x_CheckFormatConflict(), and x_GetOptionsPanel().
◆ m_ParentWindow wxWindow* CFileLoadManager::m_ParentWindow protected ◆ m_ProjectParams ◆ m_ProjectSelPanel ◆ m_RegPath string CFileLoadManager::m_RegPath protected ◆ m_SrvLocator ◆ m_State EState CFileLoadManager::m_State protectedThe documentation for this class was generated from the following files:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4