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:
@@ -45,6 +45,52 @@ void QtCodeView::refreshView()
|
||||
});
|
||||
}
|
||||
|
||||
bool QtCodeView::isVisible() const
|
||||
{
|
||||
return m_widget->isVisible();
|
||||
}
|
||||
|
||||
void QtCodeView::findMatches(ScreenSearchSender* sender, const std::string& query)
|
||||
{
|
||||
m_onQtThread(
|
||||
[sender, query, this]()
|
||||
{
|
||||
size_t matchCount = m_widget->findScreenMatches(query);
|
||||
sender->foundMatches(this, matchCount);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
void QtCodeView::activateMatch(size_t matchIndex)
|
||||
{
|
||||
m_onQtThread(
|
||||
[matchIndex, this]()
|
||||
{
|
||||
m_widget->activateScreenMatch(matchIndex);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
void QtCodeView::deactivateMatch(size_t matchIndex)
|
||||
{
|
||||
m_onQtThread(
|
||||
[matchIndex, this]()
|
||||
{
|
||||
m_widget->deactivateScreenMatch(matchIndex);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
void QtCodeView::clearMatches()
|
||||
{
|
||||
m_onQtThread(
|
||||
[this]()
|
||||
{
|
||||
m_widget->clearScreenMatches();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
void QtCodeView::clear()
|
||||
{
|
||||
m_onQtThread([=]()
|
||||
|
||||
Reference in New Issue
Block a user