edbee - Qt Editor Library v0.11.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
texteditorconfig.h
Go to the documentation of this file.
1// edbee - Copyright (c) 2012-2025 by Rick Blommers and contributors
2// SPDX-License-Identifier: MIT
3
4#pragma once
5
6#include "edbee/exports.h"
7
8#include <QFont>
9#include <QObject>
10#include <QPen>
11#include <QString>
12#include <QStringList>
13
14namespace edbee {
15
17class EDBEE_EXPORT TextEditorConfig : public QObject
18{
19Q_OBJECT
20
21public:
22
29
30
31
32 TextEditorConfig( QObject* parent=0 );
33 virtual ~TextEditorConfig();
34
35 void beginChanges();
36 void endChanges();
37
38 int caretWidth() const;
39 void setCaretWidth( int width );
40
41 int caretBlinkingRate() const;
42 void setCaretBlinkRate( int rate );
43
44 int indentSize() const;
45 void setIndentSize( int size );
46
47 bool useTabChar() const;
48 void setUseTabChar( bool enable );
49
50 bool smartTab() const;
51 void setSmartTab( bool enable );
52
53 const QStringList& charGroups() const;
54 void setCharGroups( const QStringList& items );
55
56 const QString& whitespaces() const;
57 void setWhitespaces( const QString& value );
58
59 const QString& whitespaceWithoutNewline() const;
60 void setWhitespaceWithoutNewline( const QString& );
61
62 int extraLineSpacing() const;
63 void setExtraLineSpacing( int value );
64
65 bool useLineSeparator() const;
66 void setUseLineSeparator( bool value );
67
68 const QPen& lineSeparatorPen() const;
69 void setLineSeperatorPen( const QPen& pen );
70
71 bool undoGroupPerSpace() const;
72 void setUndoGroupPerSpace( bool enable );
73
74 bool showCaretOffset() const;
75 void setShowCaretOffset( bool enable );
76
77 QString themeName();
78 void setThemeName( const QString& name );
79
80 QFont font() const ;
81 void setFont( const QFont& font );
82
83 bool scrollPastEnd() const;
84 void setScrollPastEnd( bool enabled );
85
86 int showWhitespaceMode() const;
87 void setShowWhitespaceMode( int mode );
88 void setShowWhitespaceMode( const QString& str );
89
90 bool renderBidiContolCharacters() const;
91 void setRenderBidiContolCharacters( bool enabled );
92
93
94 bool autocompleteAutoShow() const;
95 void setAutocompleteAutoShow( bool enable );
96
97 int autocompleteMinimalCharacters() const;
98 void setAutocompleteMinimalCharacters( int amount );
99
100
101signals:
102 void configChanged();
103
104protected:
105 void notifyChange();
106
107private:
108
109 int changeInProgressLevel_;
110 int changeCount_;
111
112 int caretWidth_;
113 int caretBlinkingRate_;
114 int indentSize_;
115 bool useTabChar_;
116 bool smartTab_;
117
118 QStringList charGroups_;
119 QString whitespaces_;
120 QString whitespaceWithoutNewline_;
121 int extraLineSpacing_;
122 bool useLineSeparator_;
123 QPen lineSeparatorPen_;
124 bool undoGroupPerSpace_;
125 bool showCaretOffset_;
126 QString themeName_;
127 QFont font_;
128
129 bool scrollPastEnd_;
130 int showWhitespaceMode_;
131 bool renderBidiContolCharacters_;
132
133 bool autocompleteAutoShow_;
134 int autocompleteMinimalCharacters_;
135};
136
137} // edbee
General configuration settings of the text editor.
Definition texteditorconfig.h:18
ShowWhitespaceMode
an enumeration with the possible types of whitespace showing
Definition texteditorconfig.h:24
@ ShowWhitespaces
Alsways show the whitespace.
Definition texteditorconfig.h:26
@ HideWhitespaces
Don't show whitespaces.
Definition texteditorconfig.h:25
TextEditorConfig(QObject *parent=0)
The default constructor Fills this configuration object with some sane defaults.
Definition texteditorconfig.cpp:14
#define EDBEE_EXPORT
Definition exports.h:15
QT Acessibility has an issue with reporting blank lines between elements lines. defining 'WINDOWS_EMP...
Definition commentcommand.cpp:20