forked from vnotex/vnote
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathveditconfig.h
More file actions
48 lines (34 loc) · 1.12 KB
/
veditconfig.h
File metadata and controls
48 lines (34 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef VEDITCONFIG_H
#define VEDITCONFIG_H
#include <QFontMetrics>
#include <QString>
#include <QColor>
class VEditConfig {
public:
VEditConfig() : m_tabStopWidth(0),
m_tabSpaces("\t"),
m_enableVimMode(false),
m_highlightWholeBlock(false),
m_lineDistanceHeight(0),
m_enableHeadingSequence(false)
{}
void init(const QFontMetrics &p_metric,
bool p_enableHeadingSequence);
// Only update those configs which could be updated online.
void update(const QFontMetrics &p_metric);
// Width in pixels.
int m_tabStopWidth;
bool m_expandTab;
// The literal string for Tab. It is spaces if Tab is expanded.
QString m_tabSpaces;
bool m_enableVimMode;
// The background color of cursor line.
QColor m_cursorLineBg;
// Whether highlight a visual line or a whole block.
bool m_highlightWholeBlock;
// Line distance height in pixels.
int m_lineDistanceHeight;
// Whether enable auto heading sequence.
bool m_enableHeadingSequence;
};
#endif // VEDITCONFIG_H