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:
@@ -0,0 +1,38 @@
|
||||
#ifndef QT_CODE_NAVIGATEABLE_H
|
||||
#define QT_CODE_NAVIGATEABLE_H
|
||||
|
||||
#include <set>
|
||||
|
||||
#include "utility/file/FilePath.h"
|
||||
#include "utility/TimePoint.h"
|
||||
#include "utility/types.h"
|
||||
|
||||
#include "component/view/helper/CodeSnippetParams.h"
|
||||
|
||||
class QRectF;
|
||||
class QAbstractScrollArea;
|
||||
class QWidget;
|
||||
|
||||
class QtCodeNavigateable
|
||||
{
|
||||
public:
|
||||
virtual ~QtCodeNavigateable();
|
||||
|
||||
virtual QAbstractScrollArea* getScrollArea() = 0;
|
||||
|
||||
virtual void addCodeSnippet(const CodeSnippetParams& params, bool insert = false) = 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;
|
||||
virtual void showContents() = 0;
|
||||
|
||||
virtual void onWindowFocus() = 0;
|
||||
|
||||
protected:
|
||||
void ensureWidgetVisibleAnimated(QWidget* parentWidget, QWidget *childWidget, QRectF rect, bool animated, bool onTop);
|
||||
void ensurePercentVisibleAnimated(double percent, bool animated, bool onTop);
|
||||
};
|
||||
|
||||
#endif // QT_CODE_NAVIGATEABLE_H
|
||||
Reference in New Issue
Block a user