logic: background indexing (issue #175)
* allow hiding of indexing dialogs to browse loaded project while indexing * show indexing status in status bar while indexing * use different dialog views for different use cases to avoid state collisions * fixed error label in status bar jittering while indexing * show hand cursors for clickable elements in status bar * indexing is not interrupted on pressing ESC while in hidden * disable error table and error label while indexing * refactored indexing messages * forbid indexing and changing project while indexing * don't show indexing status messages in status bar when indexing in the background * allow tasks to run in the background fortune cookie message = A journey is waiting for you.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#include "component/ComponentManager.h"
|
||||
|
||||
#include "utility/logging/logging.h"
|
||||
|
||||
#include "component/controller/Controller.h"
|
||||
#include "component/controller/ScreenSearchController.h"
|
||||
#include "component/view/CompositeView.h"
|
||||
@@ -59,15 +61,19 @@ void ComponentManager::setup(ViewLayout* viewLayout)
|
||||
screenSearchController->addResponder(dynamic_cast<ScreenSearchResponder*>(codeComponent->getViewPtr()));
|
||||
m_components.push_back(screenSearchComponent);
|
||||
|
||||
m_dialogView = m_componentFactory->getViewFactory()->createDialogView(viewLayout, m_componentFactory->getStorageAccess());
|
||||
for (DialogView::UseCase useCase :
|
||||
{ DialogView::UseCase::GENERAL, DialogView::UseCase::INDEXING, DialogView::UseCase::PROJECT_SETUP })
|
||||
{
|
||||
m_dialogViews.emplace(
|
||||
useCase,
|
||||
m_componentFactory->getViewFactory()->createDialogView(viewLayout, useCase, m_componentFactory->getStorageAccess())
|
||||
);
|
||||
}
|
||||
|
||||
std::shared_ptr<TabbedView> tabbedView =
|
||||
m_componentFactory->getViewFactory()->createTabbedView(viewLayout, "Status");
|
||||
m_tabbedViews.push_back(tabbedView);
|
||||
|
||||
// std::shared_ptr<Component> logComponent = m_componentFactory->createLogComponent(tabbedView.get());
|
||||
// m_components.push_back(logComponent);
|
||||
|
||||
std::shared_ptr<Component> statusComponent = m_componentFactory->createStatusComponent(tabbedView.get());
|
||||
m_components.push_back(statusComponent);
|
||||
|
||||
@@ -112,9 +118,16 @@ void ComponentManager::refreshViews()
|
||||
}
|
||||
}
|
||||
|
||||
std::shared_ptr<DialogView> ComponentManager::getDialogView() const
|
||||
std::shared_ptr<DialogView> ComponentManager::getDialogView(DialogView::UseCase useCase) const
|
||||
{
|
||||
return m_dialogView;
|
||||
auto it = m_dialogViews.find(useCase);
|
||||
if (it == m_dialogViews.end())
|
||||
{
|
||||
LOG_ERROR_STREAM(<< "No DialogView available for useCase " << int(useCase));
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return it->second;
|
||||
}
|
||||
|
||||
ComponentManager::ComponentManager()
|
||||
|
||||
Reference in New Issue
Block a user