ui: Improved scrolling and layouting in QtCodeView and colored locations of active TokenId differently

This commit is contained in:
Eberhard Graether
2014-07-04 15:33:51 +02:00
parent 610aa2eb09
commit a70a9009cc
15 changed files with 142 additions and 33 deletions
+5 -1
View File
@@ -40,12 +40,15 @@ public:
const std::string& code,
const TokenLocationFile& locationFile,
int startLineNumber,
Id activeTokenId,
QWidget *parent = 0
);
virtual ~QtCodeSnippet();
QSize sizeHint() const;
void lineNumberAreaPaintEvent(QPaintEvent *event);
int lineNumberAreaWidth();
int lineNumberAreaWidth() const;
void annotateText(const TokenLocationFile& locationFile);
@@ -73,6 +76,7 @@ private:
QWidget *m_lineNumberArea;
const int m_startLineNumber;
const Id m_activeTokenId;
std::vector<Annotation> m_annotations;
};