Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Register
Sign in
Toggle navigation
Menu
Егор Галкин
LR3-4_Notepad
Commits
33443fe7
Commit
33443fe7
authored
4 years ago
by
Егор Галкин
Browse files
Options
Download
Patches
Plain Diff
Add new file
parent
41b6fd90
master
No related merge requests found
Pipeline
#1179
canceled with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
codeeditor.h
+28
-0
codeeditor.h
with
28 additions
and
0 deletions
+28
-0
codeeditor.h
0 → 100644
+
28
−
0
View file @
33443fe7
#ifndef CODEEDITOR_H
#define CODEEDITOR_H
#include
<QWidget>
#include
<QPlainTextEdit>
class
CodeEditor
:
public
QPlainTextEdit
{
Q_OBJECT
public:
CodeEditor
(
QWidget
*
parent
=
0
);
void
lineNumberAreaPaintEvent
(
QPaintEvent
*
event
);
int
lineNumberAreaWidth
();
protected:
void
resizeEvent
(
QResizeEvent
*
event
)
override
;
private
slots
:
void
updateLineNumberAreaWidth
(
int
newBlockCount
);
void
highlightCurrentLine
();
void
updateLineNumberArea
(
const
QRect
&
rect
,
int
dy
);
private:
QWidget
*
lineNumberArea
;
};
#endif // CODEEDITOR_H
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets