ui: Added on-screen search feature (issue #79)

* Use menu action "Edit -> Find in View" or Ctrl + D
* UI displayed as search bar at bottom of main window
* Hide search bar with ECS or close button
* Entering a query searches in name of graph nodes and code contents of code view
* Use Enter to iterate through matches, well move match into view in graph and code view
* Checkboxes allow for adding/removing results for certain views
* Create Bookmark shortcut is now CTRL + S

bug id = 79
This commit is contained in:
Eberhard Graether
2017-09-19 14:00:40 +02:00
parent 4731f379f4
commit 95ef8c3eec
64 changed files with 1642 additions and 174 deletions
+32 -22
View File
@@ -8,6 +8,7 @@
#include "component/controller/GraphController.h"
#include "component/controller/LogController.h"
#include "component/controller/RefreshController.h"
#include "component/controller/ScreenSearchController.h"
#include "component/controller/SearchController.h"
#include "component/controller/StatusBarController.h"
#include "component/controller/StatusController.h"
@@ -18,6 +19,7 @@
#include "component/view/ErrorView.h"
#include "component/view/LogView.h"
#include "component/view/RefreshView.h"
#include "component/view/ScreenSearchView.h"
#include "component/view/SearchView.h"
#include "component/view/StatusBarView.h"
#include "component/view/StatusView.h"
@@ -58,14 +60,6 @@ std::shared_ptr<Component> ComponentFactory::createActivationComponent()
return std::make_shared<Component>(nullptr, controller);
}
std::shared_ptr<Component> ComponentFactory::createTooltipComponent(ViewLayout* viewLayout)
{
std::shared_ptr<TooltipView> view = m_viewFactory->createTooltipView(viewLayout);
std::shared_ptr<Controller> controller = std::make_shared<TooltipController>(m_storageAccess);
return std::make_shared<Component>(view, controller);
}
std::shared_ptr<Component> ComponentFactory::createBookmarkComponent(ViewLayout* viewLayout)
{
std::shared_ptr<BookmarkView> view = m_viewFactory->createBookmarkView(viewLayout);
@@ -90,6 +84,14 @@ std::shared_ptr<Component> ComponentFactory::createErrorComponent(ViewLayout* vi
return std::make_shared<Component>(view, controller);
}
std::shared_ptr<Component> ComponentFactory::createGraphComponent(ViewLayout* viewLayout)
{
std::shared_ptr<View> view = m_viewFactory->createGraphView(viewLayout);
std::shared_ptr<GraphController> controller = std::make_shared<GraphController>(m_storageAccess);
return std::make_shared<Component>(view, controller);
}
std::shared_ptr<Component> ComponentFactory::createLogComponent(ViewLayout* viewLayout)
{
std::shared_ptr<LogView> view = m_viewFactory->createLogView(viewLayout);
@@ -100,14 +102,6 @@ std::shared_ptr<Component> ComponentFactory::createLogComponent(ViewLayout* view
return std::make_shared<Component>(view, controller);
}
std::shared_ptr<Component> ComponentFactory::createGraphComponent(ViewLayout* viewLayout)
{
std::shared_ptr<View> view = m_viewFactory->createGraphView(viewLayout);
std::shared_ptr<GraphController> controller = std::make_shared<GraphController>(m_storageAccess);
return std::make_shared<Component>(view, controller);
}
std::shared_ptr<Component> ComponentFactory::createRefreshComponent(ViewLayout* viewLayout)
{
std::shared_ptr<View> view = m_viewFactory->createRefreshView(viewLayout);
@@ -116,18 +110,18 @@ std::shared_ptr<Component> ComponentFactory::createRefreshComponent(ViewLayout*
return std::make_shared<Component>(view, controller);
}
std::shared_ptr<Component> ComponentFactory::createSearchComponent(ViewLayout* viewLayout)
std::shared_ptr<Component> ComponentFactory::createScreenSearchComponent(ViewLayout* viewLayout)
{
std::shared_ptr<SearchView> view = m_viewFactory->createSearchView(viewLayout);
std::shared_ptr<SearchController> controller = std::make_shared<SearchController>(m_storageAccess);
std::shared_ptr<ScreenSearchView> view = m_viewFactory->createScreenSearchView(viewLayout);
std::shared_ptr<ScreenSearchController> controller = std::make_shared<ScreenSearchController>();
return std::make_shared<Component>(view, controller);
}
std::shared_ptr<Component> ComponentFactory::createUndoRedoComponent(ViewLayout* viewLayout)
std::shared_ptr<Component> ComponentFactory::createSearchComponent(ViewLayout* viewLayout)
{
std::shared_ptr<UndoRedoView> view = m_viewFactory->createUndoRedoView(viewLayout);
std::shared_ptr<UndoRedoController> controller = std::make_shared<UndoRedoController>(m_storageAccess);
std::shared_ptr<SearchView> view = m_viewFactory->createSearchView(viewLayout);
std::shared_ptr<SearchController> controller = std::make_shared<SearchController>(m_storageAccess);
return std::make_shared<Component>(view, controller);
}
@@ -148,6 +142,22 @@ std::shared_ptr<Component> ComponentFactory::createStatusComponent(ViewLayout* v
return std::make_shared<Component>(view, controller);
}
std::shared_ptr<Component> ComponentFactory::createTooltipComponent(ViewLayout* viewLayout)
{
std::shared_ptr<TooltipView> view = m_viewFactory->createTooltipView(viewLayout);
std::shared_ptr<Controller> controller = std::make_shared<TooltipController>(m_storageAccess);
return std::make_shared<Component>(view, controller);
}
std::shared_ptr<Component> ComponentFactory::createUndoRedoComponent(ViewLayout* viewLayout)
{
std::shared_ptr<UndoRedoView> view = m_viewFactory->createUndoRedoView(viewLayout);
std::shared_ptr<UndoRedoController> controller = std::make_shared<UndoRedoController>(m_storageAccess);
return std::make_shared<Component>(view, controller);
}
ComponentFactory::ComponentFactory()
{
}