Currently gutter only shows linenumbers. Code is mostly from http://doc.qt.io/qt-5/qtwidgets-widgets-codeeditor-example.html There is a little bit included in this commit from a first try to make toobars adept to the current tab. Code #2
19 lines
335 B
C++
19 lines
335 B
C++
#include "EditorGutter.h"
|
|
#include "CodeEditor.h"
|
|
|
|
EditorGutter::EditorGutter(CodeEditor *editor)
|
|
: QWidget(editor)
|
|
, codeEditor(editor)
|
|
{
|
|
|
|
}
|
|
|
|
QSize EditorGutter::sizeHint() const
|
|
{
|
|
return QSize(codeEditor->gutterAreaWidth(), 0);
|
|
}
|
|
|
|
void EditorGutter::paintEvent(QPaintEvent *event)
|
|
{
|
|
codeEditor->gutterAreaPaintEvent(event);
|
|
}
|