Changeset View
Changeset View
Standalone View
Standalone View
src/utils/kateconfig.h
Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Line(s) | |||||
46 | } | 46 | } | ||
47 | 47 | | |||
48 | class KConfig; | 48 | class KConfig; | ||
49 | 49 | | |||
50 | class QTextCodec; | 50 | class QTextCodec; | ||
51 | 51 | | |||
52 | /** | 52 | /** | ||
53 | * Base Class for the Kate Config Classes | 53 | * Base Class for the Kate Config Classes | ||
54 | * Current childs are KateDocumentConfig/KateDocumentConfig/KateDocumentConfig | ||||
54 | */ | 55 | */ | ||
55 | class KTEXTEDITOR_EXPORT KateConfig | 56 | class KTEXTEDITOR_EXPORT KateConfig | ||
56 | { | 57 | { | ||
57 | public: | 58 | public: | ||
58 | /** | 59 | /** | ||
59 | * start some config changes | 60 | * Start some config changes. | ||
60 | * this method is needed to init some kind of transaction | 61 | * This method is needed to init some kind of transaction for config changes, | ||
61 | * for config changes, update will only be done once, at | 62 | * update will only be done once, at configEnd() call. | ||
62 | * configEnd() call | | |||
63 | */ | 63 | */ | ||
64 | void configStart(); | 64 | void configStart(); | ||
65 | 65 | | |||
66 | /** | 66 | /** | ||
67 | * end a config change transaction, update the concerned | 67 | * End a config change transaction, update the concerned | ||
68 | * documents/views/renderers | 68 | * KateDocumentConfig/KateDocumentConfig/KateDocumentConfig | ||
69 | */ | 69 | */ | ||
70 | void configEnd(); | 70 | void configEnd(); | ||
71 | 71 | | |||
72 | /** | 72 | /** | ||
73 | * global config? | 73 | * Is this a global config object? | ||
74 | * @return global config object? | 74 | * @return true when this is a global config object | ||
75 | */ | 75 | */ | ||
76 | bool isGlobal() const | 76 | bool isGlobal() const | ||
77 | { | 77 | { | ||
78 | return !m_parent; | 78 | return !m_parent; | ||
79 | } | 79 | } | ||
80 | 80 | | |||
81 | /** | 81 | /** | ||
82 | * All known config keys. | 82 | * All known config keys. | ||
Show All 13 Lines | |||||
96 | QVariant value(const int key) const; | 96 | QVariant value(const int key) const; | ||
97 | 97 | | |||
98 | /** | 98 | /** | ||
99 | * Set a config value. | 99 | * Set a config value. | ||
100 | * Will assert if key is invalid. | 100 | * Will assert if key is invalid. | ||
101 | * Might not alter the value if given value fails validation. | 101 | * Might not alter the value if given value fails validation. | ||
102 | * @param key config key, aka enum from KateConfig* classes | 102 | * @param key config key, aka enum from KateConfig* classes | ||
103 | * @param value value to set | 103 | * @param value value to set | ||
104 | * @return value set? | 104 | * @return true on success | ||
105 | */ | 105 | */ | ||
106 | bool setValue(const int key, const QVariant &value); | 106 | bool setValue(const int key, const QVariant &value); | ||
107 | 107 | | |||
108 | /** | 108 | /** | ||
109 | * Get a config value for the string key. | 109 | * Get a config value for the string key. | ||
110 | * @param key config key, aka commandName from KateConfig* classes | 110 | * @param key config key, aka commandName from KateConfig* classes | ||
111 | * @return value for the wanted key, will return invalid variant if key invalid | 111 | * @return value for the wanted key, will return invalid variant if key is not known | ||
112 | */ | 112 | */ | ||
113 | QVariant value(const QString &key) const; | 113 | QVariant value(const QString &key) const; | ||
114 | 114 | | |||
115 | /** | 115 | /** | ||
116 | * Set a config value. | 116 | * Set a config value. | ||
117 | * Will ignore set if key not valid | 117 | * Will do nothing if key is not known or the given value fails validation. | ||
118 | * Might not alter the value if given value fails validation. | | |||
119 | * @param key config key, aka commandName from KateConfig* classes | 118 | * @param key config key, aka commandName from KateConfig* classes | ||
120 | * @param value value to set | 119 | * @param value value to set | ||
121 | * @return value set? | 120 | * @return true on success | ||
122 | */ | 121 | */ | ||
123 | bool setValue(const QString &key, const QVariant &value); | 122 | bool setValue(const QString &key, const QVariant &value); | ||
124 | 123 | | |||
125 | protected: | 124 | protected: | ||
126 | /** | 125 | /** | ||
127 | * Construct a KateConfig. | 126 | * Construct a KateConfig. | ||
128 | * @param parent parent config object, if any | 127 | * @param parent parent config object, if any | ||
129 | */ | 128 | */ | ||
Show All 40 Lines | 140 | public: | |||
170 | 169 | | |||
171 | /** | 170 | /** | ||
172 | * Command name as used in e.g. ConfigInterface or modeline/command line | 171 | * Command name as used in e.g. ConfigInterface or modeline/command line | ||
173 | * e.g. tab-width | 172 | * e.g. tab-width | ||
174 | */ | 173 | */ | ||
175 | const QString commandName; | 174 | const QString commandName; | ||
176 | 175 | | |||
177 | /** | 176 | /** | ||
178 | * Default value if nothing configured | 177 | * Default value if nothing special was configured | ||
179 | */ | 178 | */ | ||
180 | const QVariant defaultValue; | 179 | const QVariant defaultValue; | ||
181 | 180 | | |||
182 | /** | 181 | /** | ||
183 | * concrete value, per default == defaultValue | 182 | * The concrete value, per default == defaultValue | ||
184 | */ | 183 | */ | ||
185 | QVariant value; | 184 | QVariant value; | ||
186 | 185 | | |||
187 | /** | 186 | /** | ||
188 | * a validator function, only if this returns true we accept a value for the entry | 187 | * An optional validator function, only when these returns true | ||
189 | * is ignored if not set | 188 | * we accept a given new value. | ||
189 | * Is no validator set, we accept any value. | ||||
190 | */ | 190 | */ | ||
191 | std::function<bool(const QVariant &)> validator; | 191 | std::function<bool(const QVariant &)> validator; | ||
192 | }; | 192 | }; | ||
193 | 193 | | |||
194 | /** | 194 | /** | ||
195 | * Read all config entries from given config group | 195 | * Read all config entries from given config group. | ||
196 | * @param config config group to read from | 196 | * @param config config group to read from | ||
197 | */ | 197 | */ | ||
198 | void readConfigEntries(const KConfigGroup &config); | 198 | void readConfigEntries(const KConfigGroup &config); | ||
199 | 199 | | |||
200 | /** | 200 | /** | ||
201 | * Write all config entries to given config group | 201 | * Write all config entries to given config group. | ||
202 | * @param config config group to write to | 202 | * @param config config group to write to | ||
203 | */ | 203 | */ | ||
204 | void writeConfigEntries(KConfigGroup &config) const; | 204 | void writeConfigEntries(KConfigGroup &config) const; | ||
205 | 205 | | |||
206 | /** | 206 | /** | ||
207 | * Register a new config entry. | 207 | * Register a new config entry. | ||
208 | * Used by the sub classes to register all there known ones. | 208 | * Used by the sub classes to register all there known ones. | ||
209 | * @param entry new entry to add | 209 | * @param entry new entry to add | ||
▲ Show 20 Lines • Show All 182 Lines • ▼ Show 20 Line(s) | 924 | private: | |||
926 | 926 | | |||
927 | /** | 927 | /** | ||
928 | * only used in KTextEditor::EditorPrivate for the static global fallback !!! | 928 | * only used in KTextEditor::EditorPrivate for the static global fallback !!! | ||
929 | */ | 929 | */ | ||
930 | KateViewConfig(); | 930 | KateViewConfig(); | ||
931 | 931 | | |||
932 | public: | 932 | public: | ||
933 | /** | 933 | /** | ||
934 | * Construct a DocumentConfig | 934 | * Construct a ViewConfig | ||
935 | */ | 935 | */ | ||
936 | explicit KateViewConfig(KTextEditor::ViewPrivate *view); | 936 | explicit KateViewConfig(KTextEditor::ViewPrivate *view); | ||
937 | 937 | | |||
938 | /** | 938 | /** | ||
939 | * Cu DocumentConfig | 939 | * Cu ViewConfig | ||
940 | */ | 940 | */ | ||
941 | ~KateViewConfig() override; | 941 | ~KateViewConfig() override; | ||
942 | 942 | | |||
943 | inline static KateViewConfig *global() | 943 | inline static KateViewConfig *global() | ||
944 | { | 944 | { | ||
945 | return s_global; | 945 | return s_global; | ||
946 | } | 946 | } | ||
947 | 947 | | |||
948 | /** | 948 | /** | ||
949 | * Known config entries | 949 | * All known config keys | ||
950 | * Keep them sorted alphabetic for our convenience | ||||
950 | */ | 951 | */ | ||
951 | enum ConfigEntryTypes { | 952 | enum ConfigEntryTypes { | ||
952 | CharsToEncloseSelection | 953 | BackspaceRemoveComposedCharacters, | ||
954 | CharsToEncloseSelection, | ||||
955 | DynWordWrapAlignIndent, | ||||
956 | DynWordWrapIndicators, | ||||
957 | DynWrapAtStaticMarker, | ||||
958 | DynamicWordWrap, | ||||
959 | MaxHistorySize, | ||||
960 | SearchFlags, | ||||
961 | ShowLineNumbers, | ||||
962 | ShowScrollBarMarks, | ||||
963 | ShowScrollBarPreview, | ||||
964 | ShowWordCount, | ||||
dhaumann: Are training commas allowed meanwhile? | |||||
Yes. It's handy while still on work here, but can remove it when I'm done, if desired. loh.tar: Yes. It's handy while still on work here, but can remove it when I'm done, if desired.
Thanks… | |||||
953 | }; | 965 | }; | ||
954 | 966 | | |||
955 | public: | 967 | public: | ||
956 | /** | 968 | /** | ||
957 | * Read config from object | 969 | * Read config from object | ||
958 | */ | 970 | */ | ||
959 | void readConfig(const KConfigGroup &config); | 971 | void readConfig(const KConfigGroup &config); | ||
960 | 972 | | |||
961 | /** | 973 | /** | ||
962 | * Write config to object | 974 | * Write config to object | ||
963 | */ | 975 | */ | ||
964 | void writeConfig(KConfigGroup &config); | 976 | void writeConfig(KConfigGroup &config); | ||
965 | 977 | | |||
966 | protected: | 978 | protected: | ||
967 | void updateConfig() override; | 979 | void updateConfig() override; | ||
968 | 980 | | |||
969 | public: | 981 | public: | ||
970 | bool dynWordWrapSet() const | 982 | bool dynWordWrap() const | ||
983 | { | ||||
984 | return value(DynamicWordWrap).toBool(); | ||||
985 | } | ||||
986 | void setDynWordWrap(bool on) | ||||
971 | { | 987 | { | ||
972 | return m_dynWordWrapSet; | 988 | setValue(DynamicWordWrap, on); | ||
973 | } | 989 | } | ||
974 | bool dynWordWrap() const; | | |||
975 | void setDynWordWrap(bool wrap); | | |||
976 | 990 | | |||
977 | bool dynWrapAtStaticMarker() const; | 991 | bool dynWrapAtStaticMarker() const | ||
978 | void setDynWrapAtStaticMarker(bool on); | 992 | { | ||
993 | return value(DynWrapAtStaticMarker).toBool(); | ||||
994 | } | ||||
979 | 995 | | |||
980 | int dynWordWrapIndicators() const; | 996 | int dynWordWrapIndicators() const | ||
981 | void setDynWordWrapIndicators(int mode); | 997 | { | ||
998 | return value(DynWordWrapIndicators).toInt(); | ||||
999 | } | ||||
982 | 1000 | | |||
983 | int dynWordWrapAlignIndent() const; | 1001 | int dynWordWrapAlignIndent() const | ||
984 | void setDynWordWrapAlignIndent(int indent); | 1002 | { | ||
1003 | return value(DynWordWrapAlignIndent).toInt(); | ||||
1004 | } | ||||
985 | 1005 | | |||
986 | bool lineNumbers() const; | 1006 | bool lineNumbers() const | ||
987 | void setLineNumbers(bool on); | 1007 | { | ||
1008 | return value(ShowLineNumbers).toBool(); | ||||
1009 | } | ||||
988 | 1010 | | |||
989 | bool scrollBarMarks() const; | 1011 | bool scrollBarMarks() const | ||
990 | void setScrollBarMarks(bool on); | 1012 | { | ||
1013 | return value(ShowScrollBarMarks).toBool(); | ||||
1014 | } | ||||
991 | 1015 | | |||
992 | bool scrollBarPreview() const; | 1016 | bool scrollBarPreview() const | ||
993 | void setScrollBarPreview(bool on); | 1017 | { | ||
1018 | return value(ShowScrollBarPreview).toBool(); | ||||
1019 | } | ||||
994 | 1020 | | |||
995 | bool scrollBarMiniMap() const; | 1021 | bool scrollBarMiniMap() const; | ||
996 | void setScrollBarMiniMap(bool on); | 1022 | void setScrollBarMiniMap(bool on); | ||
997 | 1023 | | |||
998 | bool scrollBarMiniMapAll() const; | 1024 | bool scrollBarMiniMapAll() const; | ||
999 | void setScrollBarMiniMapAll(bool on); | 1025 | void setScrollBarMiniMapAll(bool on); | ||
1000 | 1026 | | |||
1001 | int scrollBarMiniMapWidth() const; | 1027 | int scrollBarMiniMapWidth() const; | ||
Show All 37 Lines | 1058 | enum SearchFlags { | |||
1039 | // PowerSelectionOnly = 1 << 6, Better not save to file // Sebastian | 1065 | // PowerSelectionOnly = 1 << 6, Better not save to file // Sebastian | ||
1040 | PowerModePlainText = 1 << 7, | 1066 | PowerModePlainText = 1 << 7, | ||
1041 | PowerModeWholeWords = 1 << 8, | 1067 | PowerModeWholeWords = 1 << 8, | ||
1042 | PowerModeEscapeSequences = 1 << 9, | 1068 | PowerModeEscapeSequences = 1 << 9, | ||
1043 | PowerModeRegularExpression = 1 << 10, | 1069 | PowerModeRegularExpression = 1 << 10, | ||
1044 | PowerUsePlaceholders = 1 << 11 | 1070 | PowerUsePlaceholders = 1 << 11 | ||
1045 | }; | 1071 | }; | ||
1046 | 1072 | | |||
1047 | long searchFlags() const; | 1073 | uint searchFlags() const | ||
1048 | void setSearchFlags(long flags); | 1074 | { | ||
1075 | return value(SearchFlags).toUInt(); | ||||
1076 | } | ||||
1077 | void setSearchFlags(uint flags) | ||||
1078 | { | ||||
1079 | setValue(SearchFlags, flags); | ||||
1080 | } | ||||
1049 | 1081 | | |||
1050 | int maxHistorySize() const; | 1082 | int maxHistorySize() const | ||
1083 | { | ||||
1084 | return value(MaxHistorySize).toInt(); | ||||
1085 | } | ||||
1051 | 1086 | | |||
1052 | uint defaultMarkType() const; | 1087 | uint defaultMarkType() const; | ||
1053 | void setDefaultMarkType(uint type); | 1088 | void setDefaultMarkType(uint type); | ||
1054 | 1089 | | |||
1055 | bool allowMarkMenu() const; | 1090 | bool allowMarkMenu() const; | ||
1056 | void setAllowMarkMenu(bool allow); | 1091 | void setAllowMarkMenu(bool allow); | ||
1057 | 1092 | | |||
1058 | bool persistentSelection() const; | 1093 | bool persistentSelection() const; | ||
Show All 40 Lines | |||||
1099 | void setMousePasteAtCursorPosition(bool on); | 1134 | void setMousePasteAtCursorPosition(bool on); | ||
1100 | 1135 | | |||
1101 | bool scrollPastEnd() const; | 1136 | bool scrollPastEnd() const; | ||
1102 | void setScrollPastEnd(bool on); | 1137 | void setScrollPastEnd(bool on); | ||
1103 | 1138 | | |||
1104 | bool foldFirstLine() const; | 1139 | bool foldFirstLine() const; | ||
1105 | void setFoldFirstLine(bool on); | 1140 | void setFoldFirstLine(bool on); | ||
1106 | 1141 | | |||
1107 | bool showWordCount() const; | 1142 | bool showWordCount() const | ||
1108 | void setShowWordCount(bool on); | 1143 | { | ||
1144 | return value(ShowWordCount).toBool(); | ||||
1145 | } | ||||
1146 | void setShowWordCount(bool on) | ||||
1147 | { | ||||
1148 | setValue(ShowWordCount, on); | ||||
1149 | } | ||||
1109 | 1150 | | |||
1110 | bool showLineCount() const; | 1151 | bool showLineCount() const; | ||
1111 | void setShowLineCount(bool on); | 1152 | void setShowLineCount(bool on); | ||
1112 | 1153 | | |||
1113 | bool autoBrackets() const; | 1154 | bool autoBrackets() const; | ||
1114 | void setAutoBrackets(bool on); | 1155 | void setAutoBrackets(bool on); | ||
1115 | 1156 | | |||
1116 | bool encloseSelectionInChars() const | 1157 | bool encloseSelectionInChars() const | ||
1117 | { | 1158 | { | ||
1118 | return !value(CharsToEncloseSelection).toString().isEmpty(); | 1159 | return !value(CharsToEncloseSelection).toString().isEmpty(); | ||
1119 | } | 1160 | } | ||
1120 | QString charsToEncloseSelection() const | 1161 | QString charsToEncloseSelection() const | ||
1121 | { | 1162 | { | ||
1122 | return value(CharsToEncloseSelection).toString(); | 1163 | return value(CharsToEncloseSelection).toString(); | ||
1123 | } | 1164 | } | ||
1124 | 1165 | | |||
1125 | bool backspaceRemoveComposed() const; | 1166 | bool backspaceRemoveComposed() const | ||
1126 | void setBackspaceRemoveComposed(bool on); | 1167 | { | ||
1168 | return value(BackspaceRemoveComposedCharacters).toBool(); | ||||
1169 | } | ||||
1127 | 1170 | | |||
1128 | private: | 1171 | private: | ||
1129 | bool m_dynWordWrap; | | |||
1130 | bool m_dynWrapAtStaticMarker; | | |||
1131 | int m_dynWordWrapIndicators; | | |||
1132 | int m_dynWordWrapAlignIndent; | | |||
1133 | bool m_lineNumbers; | | |||
1134 | bool m_scrollBarMarks; | | |||
1135 | bool m_scrollBarPreview; | | |||
1136 | bool m_scrollBarMiniMap; | 1172 | bool m_scrollBarMiniMap; | ||
1137 | bool m_scrollBarMiniMapAll; | 1173 | bool m_scrollBarMiniMapAll; | ||
1138 | int m_scrollBarMiniMapWidth; | 1174 | int m_scrollBarMiniMapWidth; | ||
1139 | int m_showScrollbars; | 1175 | int m_showScrollbars; | ||
1140 | bool m_iconBar; | 1176 | bool m_iconBar; | ||
1141 | bool m_foldingBar; | 1177 | bool m_foldingBar; | ||
1142 | bool m_foldingPreview; | 1178 | bool m_foldingPreview; | ||
1143 | bool m_lineModification; | 1179 | bool m_lineModification; | ||
1144 | int m_bookmarkSort; | 1180 | int m_bookmarkSort; | ||
1145 | int m_autoCenterLines; | 1181 | int m_autoCenterLines; | ||
1146 | long m_searchFlags; | | |||
1147 | int m_maxHistorySize; | | |||
1148 | uint m_defaultMarkType; | 1182 | uint m_defaultMarkType; | ||
1149 | bool m_persistentSelection; | 1183 | bool m_persistentSelection; | ||
1150 | KTextEditor::View::InputMode m_inputMode; | 1184 | KTextEditor::View::InputMode m_inputMode; | ||
1151 | bool m_viInputModeStealKeys; | 1185 | bool m_viInputModeStealKeys; | ||
1152 | bool m_viRelativeLineNumbers; | 1186 | bool m_viRelativeLineNumbers; | ||
1153 | bool m_automaticCompletionInvocation; | 1187 | bool m_automaticCompletionInvocation; | ||
1154 | bool m_wordCompletion; | 1188 | bool m_wordCompletion; | ||
1155 | bool m_keywordCompletion; | 1189 | bool m_keywordCompletion; | ||
1156 | int m_wordCompletionMinimalWordLength; | 1190 | int m_wordCompletionMinimalWordLength; | ||
1157 | bool m_wordCompletionRemoveTail; | 1191 | bool m_wordCompletionRemoveTail; | ||
1158 | bool m_smartCopyCut; | 1192 | bool m_smartCopyCut; | ||
1159 | bool m_mousePasteAtCursorPosition = false; | 1193 | bool m_mousePasteAtCursorPosition = false; | ||
1160 | bool m_scrollPastEnd; | 1194 | bool m_scrollPastEnd; | ||
1161 | bool m_foldFirstLine; | 1195 | bool m_foldFirstLine; | ||
1162 | bool m_showWordCount = false; | | |||
1163 | bool m_showLineCount = false; | 1196 | bool m_showLineCount = false; | ||
1164 | bool m_autoBrackets; | 1197 | bool m_autoBrackets; | ||
1165 | bool m_backspaceRemoveComposed; | 1198 | bool m_backspaceRemoveComposed; | ||
1166 | 1199 | | |||
1167 | bool m_dynWordWrapSet : 1; | | |||
1168 | bool m_dynWrapAtStaticMarkerSet : 1; | | |||
1169 | bool m_dynWordWrapIndicatorsSet : 1; | | |||
1170 | bool m_dynWordWrapAlignIndentSet : 1; | | |||
1171 | bool m_lineNumbersSet : 1; | | |||
1172 | bool m_scrollBarMarksSet : 1; | | |||
1173 | bool m_scrollBarPreviewSet : 1; | | |||
1174 | bool m_scrollBarMiniMapSet : 1; | 1200 | bool m_scrollBarMiniMapSet : 1; | ||
1175 | bool m_scrollBarMiniMapAllSet : 1; | 1201 | bool m_scrollBarMiniMapAllSet : 1; | ||
1176 | bool m_scrollBarMiniMapWidthSet : 1; | 1202 | bool m_scrollBarMiniMapWidthSet : 1; | ||
1177 | bool m_showScrollbarsSet : 1; | 1203 | bool m_showScrollbarsSet : 1; | ||
1178 | bool m_iconBarSet : 1; | 1204 | bool m_iconBarSet : 1; | ||
1179 | bool m_foldingBarSet : 1; | 1205 | bool m_foldingBarSet : 1; | ||
1180 | bool m_foldingPreviewSet : 1; | 1206 | bool m_foldingPreviewSet : 1; | ||
1181 | bool m_lineModificationSet : 1; | 1207 | bool m_lineModificationSet : 1; | ||
1182 | bool m_bookmarkSortSet : 1; | 1208 | bool m_bookmarkSortSet : 1; | ||
1183 | bool m_autoCenterLinesSet : 1; | 1209 | bool m_autoCenterLinesSet : 1; | ||
1184 | bool m_searchFlagsSet : 1; | | |||
1185 | bool m_defaultMarkTypeSet : 1; | 1210 | bool m_defaultMarkTypeSet : 1; | ||
1186 | bool m_persistentSelectionSet : 1; | 1211 | bool m_persistentSelectionSet : 1; | ||
1187 | bool m_inputModeSet : 1; | 1212 | bool m_inputModeSet : 1; | ||
1188 | bool m_viInputModeStealKeysSet : 1; | 1213 | bool m_viInputModeStealKeysSet : 1; | ||
1189 | bool m_viRelativeLineNumbersSet : 1; | 1214 | bool m_viRelativeLineNumbersSet : 1; | ||
1190 | bool m_automaticCompletionInvocationSet : 1; | 1215 | bool m_automaticCompletionInvocationSet : 1; | ||
1191 | bool m_wordCompletionSet : 1; | 1216 | bool m_wordCompletionSet : 1; | ||
1192 | bool m_keywordCompletionSet : 1; | 1217 | bool m_keywordCompletionSet : 1; | ||
1193 | bool m_wordCompletionMinimalWordLengthSet : 1; | 1218 | bool m_wordCompletionMinimalWordLengthSet : 1; | ||
1194 | bool m_smartCopyCutSet : 1; | 1219 | bool m_smartCopyCutSet : 1; | ||
1195 | bool m_mousePasteAtCursorPositionSet : 1; | 1220 | bool m_mousePasteAtCursorPositionSet : 1; | ||
1196 | bool m_scrollPastEndSet : 1; | 1221 | bool m_scrollPastEndSet : 1; | ||
1197 | bool m_allowMarkMenu : 1; | 1222 | bool m_allowMarkMenu : 1; | ||
1198 | bool m_wordCompletionRemoveTailSet : 1; | 1223 | bool m_wordCompletionRemoveTailSet : 1; | ||
1199 | bool m_foldFirstLineSet : 1; | 1224 | bool m_foldFirstLineSet : 1; | ||
1200 | bool m_showWordCountSet : 1; | | |||
1201 | bool m_showLineCountSet : 1; | 1225 | bool m_showLineCountSet : 1; | ||
1202 | bool m_autoBracketsSet : 1; | 1226 | bool m_autoBracketsSet : 1; | ||
1203 | bool m_backspaceRemoveComposedSet : 1; | | |||
1204 | 1227 | | |||
1205 | private: | 1228 | private: | ||
1206 | static KateViewConfig *s_global; | 1229 | static KateViewConfig *s_global; | ||
1207 | KTextEditor::ViewPrivate *m_view = nullptr; | 1230 | KTextEditor::ViewPrivate *m_view = nullptr; | ||
1208 | }; | 1231 | }; | ||
1209 | 1232 | | |||
1210 | class KTEXTEDITOR_EXPORT KateRendererConfig : public KateConfig | 1233 | class KTEXTEDITOR_EXPORT KateRendererConfig : public KateConfig | ||
1211 | { | 1234 | { | ||
1212 | private: | 1235 | private: | ||
1213 | friend class KTextEditor::EditorPrivate; | 1236 | friend class KTextEditor::EditorPrivate; | ||
1214 | 1237 | | |||
1215 | /** | 1238 | /** | ||
1216 | * only used in KTextEditor::EditorPrivate for the static global fallback !!! | 1239 | * only used in KTextEditor::EditorPrivate for the static global fallback !!! | ||
1217 | */ | 1240 | */ | ||
1218 | KateRendererConfig(); | 1241 | KateRendererConfig(); | ||
1219 | 1242 | | |||
1220 | public: | 1243 | public: | ||
1221 | /** | 1244 | /** | ||
1222 | * Construct a DocumentConfig | 1245 | * Construct a RendererConfig | ||
1223 | */ | 1246 | */ | ||
1224 | explicit KateRendererConfig(KateRenderer *renderer); | 1247 | explicit KateRendererConfig(KateRenderer *renderer); | ||
1225 | 1248 | | |||
1226 | /** | 1249 | /** | ||
1227 | * Cu DocumentConfig | 1250 | * Cu RendererConfig | ||
1228 | */ | 1251 | */ | ||
1229 | ~KateRendererConfig() override; | 1252 | ~KateRendererConfig() override; | ||
1230 | 1253 | | |||
1231 | inline static KateRendererConfig *global() | 1254 | inline static KateRendererConfig *global() | ||
1232 | { | 1255 | { | ||
1233 | return s_global; | 1256 | return s_global; | ||
1234 | } | 1257 | } | ||
1235 | 1258 | | |||
▲ Show 20 Lines • Show All 91 Lines • Show Last 20 Lines |
Are training commas allowed meanwhile?