ui: Added on-demand local reference navigation to code view navigation bar (issue #453, #538)

* show local reference navigation for local symbols and multiple edge references
* shortcut Ctrl/Cmd + T
* iterate with consecutive edge clicks
This commit is contained in:
Eberhard Graether
2018-07-23 03:13:41 +02:00
parent 1df330ff2c
commit 95ebfff19c
24 changed files with 511 additions and 99 deletions
+17 -2
View File
@@ -617,12 +617,22 @@ void QtMainWindow::findOnScreen()
void QtMainWindow::codeReferencePrevious()
{
MessageCodeReference(MessageCodeReference::REFERENCE_PREVIOUS).dispatch();
MessageCodeReference(MessageCodeReference::REFERENCE_PREVIOUS, false).dispatch();
}
void QtMainWindow::codeReferenceNext()
{
MessageCodeReference(MessageCodeReference::REFERENCE_NEXT).dispatch();
MessageCodeReference(MessageCodeReference::REFERENCE_NEXT, false).dispatch();
}
void QtMainWindow::codeLocalReferencePrevious()
{
MessageCodeReference(MessageCodeReference::REFERENCE_PREVIOUS, true).dispatch();
}
void QtMainWindow::codeLocalReferenceNext()
{
MessageCodeReference(MessageCodeReference::REFERENCE_NEXT, true).dispatch();
}
void QtMainWindow::overview()
@@ -828,6 +838,11 @@ void QtMainWindow::setupEditMenu()
menu->addAction(tr("Code Reference Previous"), this,
&QtMainWindow::codeReferencePrevious, QKeySequence(Qt::SHIFT + Qt::CTRL + Qt::Key_G));
menu->addAction(tr("Code Local Reference Next"), this,
&QtMainWindow::codeLocalReferenceNext, QKeySequence(Qt::CTRL + Qt::Key_T));
menu->addAction(tr("Code Local Reference Previous"), this,
&QtMainWindow::codeLocalReferencePrevious, QKeySequence(Qt::SHIFT + Qt::CTRL + Qt::Key_T));
menu->addSeparator();
menu->addAction(tr("&To overview"), this, &QtMainWindow::overview, QKeySequence::MoveToStartOfDocument);