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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user