ui: Added single file mode to code view
* Added navigation to top of code view for iterating references and switching between list and single file mode * current file name and reference count is shown on top in single file mode * refactored scrolling to location or line via request system * added parameters animated and toTop to scrolling system * refactored class hierarchy and removed unused stuff in list mode
This commit is contained in:
@@ -123,6 +123,11 @@ QtCodeFile* QtCodeSnippet::getFile() const
|
||||
return m_file;
|
||||
}
|
||||
|
||||
QtCodeArea* QtCodeSnippet::getArea() const
|
||||
{
|
||||
return m_codeArea.get();
|
||||
}
|
||||
|
||||
uint QtCodeSnippet::getStartLineNumber() const
|
||||
{
|
||||
return m_codeArea->getStartLineNumber();
|
||||
@@ -160,9 +165,9 @@ uint QtCodeSnippet::getLineNumberForLocationId(Id locationId) const
|
||||
return m_codeArea->getLineNumberForLocationId(locationId);
|
||||
}
|
||||
|
||||
int QtCodeSnippet::getStartLineNumberOfFirstActiveScope() const
|
||||
uint QtCodeSnippet::getStartLineNumberOfFirstActiveLocationOfTokenId(Id tokenId) const
|
||||
{
|
||||
return m_codeArea->getStartLineNumberOfFirstActiveScope();
|
||||
return m_codeArea->getStartLineNumberOfFirstActiveLocationOfTokenId(tokenId);
|
||||
}
|
||||
|
||||
QRectF QtCodeSnippet::getLineRectForLineNumber(uint lineNumber) const
|
||||
@@ -186,7 +191,7 @@ void QtCodeSnippet::clickedTitle()
|
||||
getFile()->clickedMaximizeButton();
|
||||
}
|
||||
|
||||
m_navigator->requestScrollToLine(getFile(), getStartLineNumber());
|
||||
m_navigator->requestScroll(getFile()->getFilePath(), getStartLineNumber(), 0, true, false);
|
||||
}
|
||||
|
||||
void QtCodeSnippet::clickedFooter()
|
||||
@@ -195,7 +200,7 @@ void QtCodeSnippet::clickedFooter()
|
||||
{
|
||||
MessageShowScope(m_footerId, m_navigator->hasErrors()).dispatch();
|
||||
|
||||
m_navigator->requestScrollToLine(getFile(), getEndLineNumber());
|
||||
m_navigator->requestScroll(getFile()->getFilePath(), getEndLineNumber(), 0, true, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user