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
+11
View File
@@ -39,6 +39,14 @@ public:
virtual void initView();
virtual void refreshView();
// ScreenSearchResponder implementation
virtual bool isVisible() const;
virtual void findMatches(ScreenSearchSender* sender, const std::string& query);
virtual void activateMatch(size_t matchIndex);
virtual void deactivateMatch(size_t matchIndex);
virtual void clearMatches();
// GraphView implementation
virtual void rebuildGraph(
std::shared_ptr<Graph> graph,
const std::vector<std::shared_ptr<DummyNode>>& nodes,
@@ -164,6 +172,9 @@ private:
QLabel* m_trailDepthLabel;
std::vector<QRectF> m_virtualNodeRects;
// Name matches
std::vector<QtGraphNode*> m_matchedNodes;
};
#endif // QT_GRAPH_VIEW_H