logic: Refactored Code View to process all contents in one update

* Use unified showCodeSnippets method for setting file information on CodeView
* Made async initial file and snippet expansion synced
* Add ScrollParams API to CodeView
* Regard scope size when scrolling to definition
* Only use QtThreadedLambdaFunctor in QtCodeView now
This commit is contained in:
Eberhard Graether
2017-06-05 14:23:43 +02:00
parent 893b223bbc
commit de645be37a
29 changed files with 613 additions and 613 deletions
+3 -2
View File
@@ -19,8 +19,9 @@ public:
virtual QAbstractScrollArea* getScrollArea() = 0;
virtual void addCodeSnippet(const CodeSnippetParams& params, bool insert = false) = 0;
virtual void addCodeSnippet(const CodeSnippetParams& params) = 0;
virtual void requestFileContent(const FilePath& filePath) = 0;
virtual bool requestScroll(const FilePath& filePath, uint lineNumber, Id locationId, bool animated, bool onTop) = 0;
virtual void updateFiles() = 0;
@@ -30,7 +31,7 @@ public:
protected:
void ensureWidgetVisibleAnimated(QWidget* parentWidget, QWidget *childWidget, QRectF rect, bool animated, bool onTop);
void ensurePercentVisibleAnimated(double percent, bool animated, bool onTop);
void ensurePercentVisibleAnimated(double percentA, double percentB, bool animated, bool onTop);
};
#endif // QT_CODE_NAVIGATEABLE_H