32 #include <kconfiggroup.h>
33 #include <kglobalsettings.h>
34 #include <kcolorscheme.h>
35 #include <kcolorutils.h>
36 #include <kcharsets.h>
38 #include <kcomponentdata.h>
41 #include <QtCore/QTextCodec>
42 #include <QStringListModel>
46 : configSessionNumber (0), configIsRunning (false)
56 configSessionNumber++;
58 if (configSessionNumber > 1)
61 configIsRunning =
true;
66 if (configSessionNumber == 0)
69 configSessionNumber--;
71 if (configSessionNumber > 0)
74 configIsRunning =
false;
86 KateGlobalConfig::KateGlobalConfig ()
91 KConfigGroup cg( KGlobal::config(),
"Kate Part Defaults");
95 KateGlobalConfig::~KateGlobalConfig ()
101 const char *
const KEY_PROBER_TYPE =
"Encoding Prober Type";
102 const char *
const KEY_FALLBACK_ENCODING =
"Fallback Encoding";
109 setProberType ((KEncodingProber::ProberType)config.readEntry(KEY_PROBER_TYPE, (
int)KEncodingProber::Universal));
117 config.writeEntry(KEY_PROBER_TYPE, (
int)
proberType());
134 return m_fallbackEncoding;
139 if (m_fallbackEncoding.
isEmpty())
142 return KGlobal::charsets()->
codecForName (m_fallbackEncoding);
155 codec = KGlobal::charsets()->
codecForName (encoding, found);
157 if (!found || !codec)
161 m_fallbackEncoding = codec->
name();
166 KateDocumentConfig::KateDocumentConfig ()
167 : m_indentationWidth (2),
169 m_tabHandling (tabSmart),
172 m_tabWidthSet (false),
173 m_indentationWidthSet (false),
174 m_indentationModeSet (false),
175 m_wordWrapSet (false),
176 m_wordWrapAtSet (false),
177 m_pageUpDownMovesCursorSet (false),
178 m_keepExtraSpacesSet (false),
179 m_indentPastedTextSet (false),
180 m_backspaceIndentsSet (false),
181 m_smartHomeSet (false),
182 m_showTabsSet (false),
183 m_showSpacesSet (false),
184 m_replaceTabsDynSet (false),
185 m_removeSpacesSet (false),
186 m_newLineAtEofSet (false),
187 m_overwiteModeSet (false),
188 m_tabIndentsSet (false),
189 m_encodingSet (false),
192 m_allowEolDetectionSet (false),
193 m_allowSimpleModeSet (false),
194 m_backupFlagsSet (false),
195 m_searchDirConfigDepthSet (false),
196 m_backupPrefixSet (false),
197 m_backupSuffixSet (false),
198 m_swapFileNoSyncSet (false),
199 m_onTheFlySpellCheckSet (false),
200 m_lineLengthLimitSet (false),
206 KConfigGroup cg( KGlobal::config(),
"Kate Document Defaults");
210 KateDocumentConfig::KateDocumentConfig (
const KConfigGroup &cg)
211 : m_indentationWidth (2),
213 m_tabHandling (tabSmart),
216 m_tabWidthSet (false),
217 m_indentationWidthSet (false),
218 m_indentationModeSet (false),
219 m_wordWrapSet (false),
220 m_wordWrapAtSet (false),
221 m_pageUpDownMovesCursorSet (false),
222 m_keepExtraSpacesSet (false),
223 m_indentPastedTextSet (false),
224 m_backspaceIndentsSet (false),
225 m_smartHomeSet (false),
226 m_showTabsSet (false),
227 m_showSpacesSet (false),
228 m_replaceTabsDynSet (false),
229 m_removeSpacesSet (false),
230 m_newLineAtEofSet (false),
231 m_overwiteModeSet (false),
232 m_tabIndentsSet (false),
233 m_encodingSet (false),
236 m_allowEolDetectionSet (false),
237 m_allowSimpleModeSet (false),
238 m_backupFlagsSet (false),
239 m_searchDirConfigDepthSet (false),
240 m_backupPrefixSet (false),
241 m_backupSuffixSet (false),
242 m_swapFileNoSyncSet (false),
243 m_onTheFlySpellCheckSet (false),
244 m_lineLengthLimitSet (false),
252 : m_tabHandling (tabSmart),
254 m_tabWidthSet (false),
255 m_indentationWidthSet (false),
256 m_indentationModeSet (false),
257 m_wordWrapSet (false),
258 m_wordWrapAtSet (false),
259 m_pageUpDownMovesCursorSet (false),
260 m_keepExtraSpacesSet (false),
261 m_indentPastedTextSet (false),
262 m_backspaceIndentsSet (false),
263 m_smartHomeSet (false),
264 m_showTabsSet (false),
265 m_showSpacesSet (false),
266 m_replaceTabsDynSet (false),
267 m_removeSpacesSet (false),
268 m_newLineAtEofSet (false),
269 m_overwiteModeSet (false),
270 m_tabIndentsSet (false),
271 m_encodingSet (false),
274 m_allowEolDetectionSet (false),
275 m_allowSimpleModeSet (false),
276 m_backupFlagsSet (false),
277 m_searchDirConfigDepthSet (false),
278 m_backupPrefixSet (false),
279 m_backupSuffixSet (false),
280 m_swapFileNoSyncSet (false),
281 m_onTheFlySpellCheckSet (false),
282 m_lineLengthLimitSet (false),
293 const char *
const KEY_TAB_WIDTH =
"Tab Width";
294 const char *
const KEY_INDENTATION_WIDTH =
"Indentation Width";
295 const char *
const KEY_INDENTATION_MODE =
"Indentation Mode";
296 const char *
const KEY_TAB_HANDLING =
"Tab Handling";
297 const char *
const KEY_WORD_WRAP =
"Word Wrap";
298 const char *
const KEY_WORD_WRAP_AT =
"Word Wrap Column";
299 const char *
const KEY_PAGEUP_DOWN_MOVES_CURSOR =
"PageUp/PageDown Moves Cursor";
300 const char *
const KEY_SMART_HOME =
"Smart Home";
301 const char *
const KEY_SHOW_TABS =
"Show Tabs";
302 const char *
const KEY_TAB_INDENTS =
"Indent On Tab";
303 const char *
const KEY_KEEP_EXTRA_SPACES =
"Keep Extra Spaces";
304 const char *
const KEY_INDENT_PASTED_TEXT =
"Indent On Text Paste";
305 const char *
const KEY_BACKSPACE_INDENTS =
"Indent On Backspace";
306 const char *
const KEY_SHOW_SPACES =
"Show Spaces";
307 const char *
const KEY_REPLACE_TABS_DYN =
"ReplaceTabsDyn";
308 const char *
const KEY_REMOVE_SPACES =
"Remove Spaces";
309 const char *
const KEY_NEWLINE_AT_EOF =
"Newline At EOF";
310 const char *
const KEY_OVR =
"Overwrite Mode";
311 const char *
const KEY_ENCODING =
"Encoding";
312 const char *
const KEY_EOL =
"End of Line";
313 const char *
const KEY_ALLOW_EOL_DETECTION =
"Allow End of Line Detection";
314 const char *
const KEY_BOM =
"BOM";
315 const char *
const KEY_ALLOW_SIMPLE_MODE =
"Allow Simple Mode";
316 const char *
const KEY_BACKUP_FLAGS =
"Backup Flags";
317 const char *
const KEY_SEARCH_DIR_CONFIG_DEPTH =
"Search Dir Config Depth";
318 const char *
const KEY_BACKUP_PREFIX =
"Backup Prefix";
319 const char *
const KEY_BACKUP_SUFFIX =
"Backup Suffix";
320 const char *
const KEY_SWAP_FILE_NO_SYNC =
"No sync";
321 const char *
const KEY_ON_THE_FLY_SPELLCHECK =
"On-The-Fly Spellcheck";
322 const char *
const KEY_LINE_LENGTH_LIMIT =
"Line Length Limit";
337 setWordWrap (config.readEntry(KEY_WORD_WRAP,
false));
342 setShowTabs (config.readEntry(KEY_SHOW_TABS,
true));
351 setOvr (config.readEntry(KEY_OVR,
false));
355 setEol (config.readEntry(KEY_EOL, 0));
358 setBom (config.readEntry(KEY_BOM,
false));
381 config.writeEntry(KEY_TAB_WIDTH,
tabWidth());
386 config.writeEntry(KEY_TAB_HANDLING,
tabHandling());
388 config.writeEntry(KEY_WORD_WRAP,
wordWrap());
389 config.writeEntry(KEY_WORD_WRAP_AT,
wordWrapAt());
393 config.writeEntry(KEY_SMART_HOME,
smartHome());
394 config.writeEntry(KEY_SHOW_TABS,
showTabs());
399 config.writeEntry(KEY_SHOW_SPACES,
showSpaces());
403 config.writeEntry(KEY_OVR,
ovr());
405 config.writeEntry(KEY_ENCODING,
encoding());
407 config.writeEntry(KEY_EOL,
eol());
410 config.writeEntry(KEY_BOM,
bom());
414 config.writeEntry(KEY_BACKUP_FLAGS,
backupFlags());
457 if (m_tabWidthSet && m_tabWidth == tabWidth)
462 m_tabWidthSet =
true;
470 if (m_indentationWidthSet ||
isGlobal())
471 return m_indentationWidth;
478 if (indentationWidth < 1)
481 if (m_indentationWidthSet && m_indentationWidth == indentationWidth)
486 m_indentationWidthSet =
true;
494 if (m_indentationModeSet ||
isGlobal())
495 return m_indentationMode;
502 if (m_indentationModeSet && m_indentationMode == indentationMode)
507 m_indentationModeSet =
true;
518 return m_tabHandling;
542 if (m_wordWrapSet && m_wordWrap == on)
547 m_wordWrapSet =
true;
566 if (m_wordWrapAtSet && m_wordWrapAt == col)
571 m_wordWrapAtSet =
true;
579 if (m_pageUpDownMovesCursorSet ||
isGlobal())
580 return m_pageUpDownMovesCursor;
587 if (m_pageUpDownMovesCursorSet && m_pageUpDownMovesCursor == on)
592 m_pageUpDownMovesCursorSet =
true;
593 m_pageUpDownMovesCursor = on;
600 if (m_keepExtraSpacesSet && m_keepExtraSpaces == on)
605 m_keepExtraSpacesSet =
true;
606 m_keepExtraSpaces = on;
613 if (m_keepExtraSpacesSet ||
isGlobal())
614 return m_keepExtraSpaces;
621 if (m_indentPastedTextSet && m_indentPastedText == on)
626 m_indentPastedTextSet =
true;
627 m_indentPastedText = on;
634 if (m_indentPastedTextSet ||
isGlobal())
635 return m_indentPastedText;
642 if (m_backspaceIndentsSet && m_backspaceIndents == on)
647 m_backspaceIndentsSet =
true;
648 m_backspaceIndents = on;
655 if (m_backspaceIndentsSet ||
isGlobal())
656 return m_backspaceIndents;
663 if (m_smartHomeSet && m_smartHome == on)
668 m_smartHomeSet =
true;
684 if (m_showTabsSet && m_showTabs == on)
689 m_showTabsSet =
true;
705 if (m_showSpacesSet && m_showSpaces == on)
710 m_showSpacesSet =
true;
726 if (m_replaceTabsDynSet && m_replaceTabsDyn == on)
731 m_replaceTabsDynSet =
true;
732 m_replaceTabsDyn = on;
739 if (m_replaceTabsDynSet ||
isGlobal())
740 return m_replaceTabsDyn;
747 if (m_removeSpacesSet && m_removeSpaces == triState)
752 m_removeSpacesSet =
true;
753 m_removeSpaces = triState;
760 if (m_removeSpacesSet ||
isGlobal())
761 return m_removeSpaces;
768 if (m_newLineAtEofSet && m_newLineAtEof == on)
773 m_newLineAtEofSet =
true;
781 if (m_newLineAtEofSet ||
isGlobal())
782 return m_newLineAtEof;
789 if (m_overwiteModeSet && m_overwiteMode == on)
794 m_overwiteModeSet =
true;
802 if (m_overwiteModeSet ||
isGlobal())
803 return m_overwiteMode;
805 return s_global->
ovr();
810 if (m_tabIndentsSet && m_tabIndents == on)
815 m_tabIndentsSet =
true;
842 return KGlobal::locale()->codecForEncoding();
844 return s_global->
codec ();
849 return s_global->
codec ();
858 codec = s_global->
codec();
862 codec = KGlobal::charsets()->
codecForName (encoding, found);
864 if (!found || !codec)
868 m_encodingSet =
true;
869 m_encoding = codec->
name();
880 return m_encodingSet;
888 return s_global->
eol();
905 if (m_eolSet && m_eol == mode)
918 if (m_bomSet && m_bom == bom)
934 return s_global->
bom();
939 if (m_allowEolDetectionSet ||
isGlobal())
940 return m_allowEolDetection;
947 if (m_allowEolDetectionSet && m_allowEolDetection == on)
952 m_allowEolDetectionSet =
true;
953 m_allowEolDetection = on;
960 if (m_allowSimpleModeSet ||
isGlobal())
961 return m_allowSimpleMode;
968 if (m_allowSimpleModeSet && m_allowSimpleMode == on)
973 m_allowSimpleModeSet =
true;
974 m_allowSimpleMode = on;
982 return m_backupFlags;
989 if (m_backupFlagsSet && m_backupFlags == flags)
994 m_backupFlagsSet =
true;
995 m_backupFlags = flags;
1002 if (m_backupPrefixSet ||
isGlobal())
1003 return m_backupPrefix;
1010 if (m_backupSuffixSet ||
isGlobal())
1011 return m_backupSuffix;
1018 if (m_backupPrefixSet && m_backupPrefix == prefix)
1023 m_backupPrefixSet =
true;
1024 m_backupPrefix = prefix;
1031 if (m_backupSuffixSet && m_backupSuffix == suffix)
1036 m_backupSuffixSet =
true;
1037 m_backupSuffix = suffix;
1044 if (m_swapFileNoSyncSet ||
isGlobal())
1045 return m_swapFileNoSync;
1052 if (m_swapFileNoSyncSet && m_swapFileNoSync == on)
1057 m_swapFileNoSyncSet =
true;
1058 m_swapFileNoSync = on;
1065 if (m_searchDirConfigDepthSet ||
isGlobal())
1066 return m_searchDirConfigDepth;
1073 if (m_searchDirConfigDepthSet && m_searchDirConfigDepth == depth)
1078 m_searchDirConfigDepthSet =
true;
1079 m_searchDirConfigDepth = depth;
1089 KConfigGroup configGroup(KGlobal::config(),
"Spelling");
1090 return configGroup.readEntry(
"checkerEnabledByDefault",
false);
1092 if (m_onTheFlySpellCheckSet) {
1093 return m_onTheFlySpellCheck;
1101 if (m_onTheFlySpellCheckSet && m_onTheFlySpellCheck == on)
1106 m_onTheFlySpellCheckSet =
true;
1107 m_onTheFlySpellCheck = on;
1115 if (m_lineLengthLimitSet ||
isGlobal())
1116 return m_lineLengthLimit;
1123 if (m_lineLengthLimitSet && m_lineLengthLimit == lineLengthLimit)
1128 m_lineLengthLimitSet =
true;
1139 KateViewConfig::KateViewConfig ()
1141 m_dynWordWrapSet (false),
1142 m_dynWordWrapIndicatorsSet (false),
1143 m_dynWordWrapAlignIndentSet (false),
1144 m_lineNumbersSet (false),
1145 m_scrollBarMarksSet (false),
1146 m_scrollBarMiniMapSet (false),
1147 m_scrollBarMiniMapAllSet (false),
1148 m_scrollBarMiniMapWidthSet (false),
1149 m_showScrollbarsSet (false),
1150 m_iconBarSet (false),
1151 m_foldingBarSet (false),
1152 m_lineModificationSet (false),
1153 m_bookmarkSortSet (false),
1154 m_autoCenterLinesSet (false),
1155 m_searchFlagsSet (false),
1156 m_defaultMarkTypeSet (false),
1157 m_persistentSelectionSet (false),
1158 m_viInputModeSet (false),
1159 m_viInputModeStealKeysSet (false),
1160 m_viRelativeLineNumbersSet (false),
1161 m_viInputModeEmulateCommandBarSet(false),
1162 m_automaticCompletionInvocationSet (false),
1163 m_wordCompletionSet (false),
1164 m_keywordCompletionSet (false),
1165 m_wordCompletionMinimalWordLengthSet (false),
1166 m_smartCopyCutSet (false),
1167 m_scrollPastEndSet (false),
1168 m_allowMarkMenu (true),
1169 m_wordCompletionRemoveTailSet (false),
1170 m_foldFirstLineSet (false),
1176 KConfigGroup config( KGlobal::config(),
"Kate View Defaults");
1182 m_searchFlags (PowerModePlainText),
1183 m_maxHistorySize (100),
1184 m_dynWordWrapSet (false),
1185 m_dynWordWrapIndicatorsSet (false),
1186 m_dynWordWrapAlignIndentSet (false),
1187 m_lineNumbersSet (false),
1188 m_scrollBarMarksSet (false),
1189 m_scrollBarMiniMapSet (false),
1190 m_scrollBarMiniMapAllSet (false),
1191 m_scrollBarMiniMapWidthSet (false),
1192 m_showScrollbarsSet (false),
1193 m_iconBarSet (false),
1194 m_foldingBarSet (false),
1195 m_lineModificationSet (false),
1196 m_bookmarkSortSet (false),
1197 m_autoCenterLinesSet (false),
1198 m_searchFlagsSet (false),
1199 m_defaultMarkTypeSet (false),
1200 m_persistentSelectionSet (false),
1201 m_viInputModeSet (false),
1202 m_viInputModeStealKeysSet (false),
1203 m_viRelativeLineNumbersSet (false),
1204 m_viInputModeEmulateCommandBarSet(false),
1205 m_automaticCompletionInvocationSet (false),
1206 m_wordCompletionSet (false),
1207 m_keywordCompletionSet (false),
1208 m_wordCompletionMinimalWordLengthSet (false),
1209 m_smartCopyCutSet (false),
1210 m_scrollPastEndSet (false),
1211 m_allowMarkMenu (true),
1212 m_wordCompletionRemoveTailSet (false),
1213 m_foldFirstLineSet (false),
1224 const char *
const KEY_SEARCH_REPLACE_FLAGS =
"Search/Replace Flags";
1225 const char *
const KEY_PATTERN_HISTORY =
"Search Pattern History";
1226 const char *
const KEY_REPLACEMENT_HISTORY =
"Replacement Text History";
1227 const char *
const KEY_DYN_WORD_WRAP =
"Dynamic Word Wrap";
1228 const char *
const KEY_DYN_WORD_WRAP_INDICATORS =
"Dynamic Word Wrap Indicators";
1229 const char *
const KEY_DYN_WORD_WRAP_ALIGN_INDENT =
"Dynamic Word Wrap Align Indent";
1230 const char *
const KEY_LINE_NUMBERS =
"Line Numbers";
1231 const char *
const KEY_SCROLL_BAR_MARKS =
"Scroll Bar Marks";
1232 const char *
const KEY_SCROLL_BAR_MINI_MAP =
"Scroll Bar Mini Map";
1233 const char *
const KEY_SCROLL_BAR_MINI_MAP_ALL =
"Scroll Bar Mini Map All";
1234 const char *
const KEY_SCROLL_BAR_MINI_MAP_WIDTH =
"Scroll Bar Mini Map Width";
1235 const char *
const KEY_SHOW_SCROLLBARS =
"Show Scrollbars";
1236 const char *
const KEY_ICON_BAR =
"Icon Bar";
1237 const char *
const KEY_FOLDING_BAR =
"Folding Bar";
1238 const char *
const KEY_LINE_MODIFICATION =
"Line Modification";
1239 const char *
const KEY_BOOKMARK_SORT =
"Bookmark Menu Sorting";
1240 const char *
const KEY_AUTO_CENTER_LINES =
"Auto Center Lines";
1241 const char *
const KEY_MAX_HISTORY_SIZE =
"Maximum Search History Size";
1242 const char *
const KEY_DEFAULT_MARK_TYPE =
"Default Mark Type";
1243 const char *
const KEY_ALLOW_MARK_MENU =
"Allow Mark Menu";
1244 const char *
const KEY_PERSISTENT_SELECTION =
"Persistent Selection";
1245 const char *
const KEY_VI_INPUT_MODE =
"Vi Input Mode";
1246 const char *
const KEY_VI_INPUT_MODE_STEAL_KEYS =
"Vi Input Mode Steal Keys";
1247 const char *
const KEY_VI_RELATIVE_LINE_NUMBERS =
"Vi Relative Line Numbers";
1248 const char *
const KEY_VI_INPUT_MODE_EMULATE_COMMAND_BAR =
"Vi Input Mode Emulate Command Bar";
1249 const char *
const KEY_AUTOMATIC_COMPLETION_INVOCATION =
"Auto Completion";
1250 const char *
const KEY_WORD_COMPLETION =
"Word Completion";
1251 const char *
const KEY_KEYWORD_COMPLETION =
"Keyword Completion";
1252 const char *
const KEY_WORD_COMPLETION_MINIMAL_WORD_LENGTH =
"Word Completion Minimal Word Length";
1253 const char *
const KEY_WORD_COMPLETION_REMOVE_TAIL =
"Word Completion Remove Tail";
1254 const char *
const KEY_SMART_COPY_CUT =
"Smart Copy Cut";
1255 const char *
const KEY_SCROLL_PAST_END =
"Scroll Past End";
1256 const char *
const KEY_FOLD_FIRST_LINE =
"Fold First Line";
1280 setIconBar (config.readEntry( KEY_ICON_BAR,
false ));
1293 m_maxHistorySize = config.readEntry(KEY_MAX_HISTORY_SIZE, 100);
1295 setDefaultMarkType (config.readEntry( KEY_DEFAULT_MARK_TYPE,
int(KTextEditor::MarkInterface::markType01) ));
1321 m_replacementHistoryModel.
setStringList(replacementHistory);
1329 config.writeEntry( KEY_DYN_WORD_WRAP,
dynWordWrap() );
1333 config.writeEntry( KEY_LINE_NUMBERS,
lineNumbers() );
1345 config.writeEntry( KEY_ICON_BAR,
iconBar() );
1347 config.writeEntry( KEY_FOLDING_BAR,
foldingBar() );
1351 config.writeEntry( KEY_BOOKMARK_SORT,
bookmarkSort() );
1355 config.writeEntry(KEY_SEARCH_REPLACE_FLAGS,
int(
searchFlags()));
1357 config.writeEntry(KEY_MAX_HISTORY_SIZE, m_maxHistorySize);
1371 config.writeEntry( KEY_SMART_COPY_CUT,
smartCopyCut() );
1375 config.writeEntry( KEY_VI_INPUT_MODE,
viInputMode());
1383 config.writeEntry(KEY_PATTERN_HISTORY, m_patternHistoryModel.
stringList());
1386 config.writeEntry(KEY_REPLACEMENT_HISTORY, m_replacementHistoryModel.
stringList());
1407 if (m_dynWordWrapSet ||
isGlobal())
1408 return m_dynWordWrap;
1415 if (m_dynWordWrapSet && m_dynWordWrap == wrap)
1420 m_dynWordWrapSet =
true;
1421 m_dynWordWrap = wrap;
1428 if (m_dynWordWrapIndicatorsSet ||
isGlobal())
1429 return m_dynWordWrapIndicators;
1436 if (m_dynWordWrapIndicatorsSet && m_dynWordWrapIndicators == mode)
1441 m_dynWordWrapIndicatorsSet =
true;
1442 m_dynWordWrapIndicators = qBound(0, mode, 80);
1449 if (m_dynWordWrapAlignIndentSet ||
isGlobal())
1450 return m_dynWordWrapAlignIndent;
1457 if (m_dynWordWrapAlignIndentSet && m_dynWordWrapAlignIndent == indent)
1462 m_dynWordWrapAlignIndentSet =
true;
1463 m_dynWordWrapAlignIndent = indent;
1470 if (m_lineNumbersSet ||
isGlobal())
1471 return m_lineNumbers;
1478 if (m_lineNumbersSet && m_lineNumbers == on)
1483 m_lineNumbersSet =
true;
1491 if (m_scrollBarMarksSet ||
isGlobal())
1492 return m_scrollBarMarks;
1499 if (m_scrollBarMarksSet && m_scrollBarMarks == on)
1504 m_scrollBarMarksSet =
true;
1505 m_scrollBarMarks = on;
1512 if (m_scrollBarMiniMapSet ||
isGlobal())
1513 return m_scrollBarMiniMap;
1520 if (m_scrollBarMiniMapSet && m_scrollBarMiniMap == on)
1525 m_scrollBarMiniMapSet =
true;
1526 m_scrollBarMiniMap = on;
1533 if (m_scrollBarMiniMapAllSet ||
isGlobal())
1534 return m_scrollBarMiniMapAll;
1541 if (m_scrollBarMiniMapAllSet && m_scrollBarMiniMapAll == on)
1546 m_scrollBarMiniMapAllSet =
true;
1547 m_scrollBarMiniMapAll = on;
1554 if (m_scrollBarMiniMapWidthSet ||
isGlobal())
1555 return m_scrollBarMiniMapWidth;
1562 if (m_scrollBarMiniMapWidthSet && m_scrollBarMiniMapWidth == width)
1567 m_scrollBarMiniMapWidthSet =
true;
1568 m_scrollBarMiniMapWidth = width;
1575 if (m_showScrollbarsSet ||
isGlobal())
1576 return m_showScrollbars;
1583 if (m_showScrollbarsSet && m_showScrollbars == mode)
1588 m_showScrollbarsSet =
true;
1589 m_showScrollbars = qBound(0, mode, 80);
1604 if (m_iconBarSet && m_iconBar == on)
1609 m_iconBarSet =
true;
1618 return m_foldingBar;
1625 if (m_foldingBarSet && m_foldingBar == on)
1630 m_foldingBarSet =
true;
1638 if (m_lineModificationSet ||
isGlobal())
1639 return m_lineModification;
1646 if (m_lineModificationSet && m_lineModification == on)
1651 m_lineModificationSet =
true;
1652 m_lineModification = on;
1659 if (m_bookmarkSortSet ||
isGlobal())
1660 return m_bookmarkSort;
1667 if (m_bookmarkSortSet && m_bookmarkSort == mode)
1672 m_bookmarkSortSet =
true;
1673 m_bookmarkSort = mode;
1680 if (m_autoCenterLinesSet ||
isGlobal())
1681 return m_autoCenterLines;
1691 if (m_autoCenterLinesSet && m_autoCenterLines == lines)
1696 m_autoCenterLinesSet =
true;
1697 m_autoCenterLines = lines;
1704 if (m_searchFlagsSet ||
isGlobal())
1705 return m_searchFlags;
1712 if (m_searchFlagsSet && m_searchFlags == flags)
1717 m_searchFlagsSet =
true;
1718 m_searchFlags = flags;
1727 return &m_patternHistoryModel;
1734 return m_maxHistorySize;
1741 return &m_replacementHistoryModel;
1748 if (m_defaultMarkTypeSet ||
isGlobal())
1749 return m_defaultMarkType;
1756 if (m_defaultMarkTypeSet && m_defaultMarkType == type)
1761 m_defaultMarkTypeSet =
true;
1762 m_defaultMarkType = type;
1769 return m_allowMarkMenu;
1774 m_allowMarkMenu = allow;
1779 if (m_persistentSelectionSet ||
isGlobal())
1780 return m_persistentSelection;
1787 if (m_persistentSelectionSet && m_persistentSelection == on)
1792 m_persistentSelectionSet =
true;
1793 m_persistentSelection = on;
1800 if (m_viInputModeSet ||
isGlobal())
1801 return m_viInputMode;
1808 if (m_viInputModeSet && m_viInputMode == on)
1813 m_viInputModeSet =
true;
1817 if (!on && m_view) {
1826 if (m_viInputModeStealKeysSet ||
isGlobal())
1827 return m_viInputModeStealKeys;
1834 if (m_viInputModeStealKeysSet && m_viInputModeStealKeys == on)
1838 m_viInputModeStealKeysSet =
true;
1839 m_viInputModeStealKeys = on;
1845 if (m_viRelativeLineNumbersSet ||
isGlobal())
1846 return m_viRelativeLineNumbers;
1853 if (m_viRelativeLineNumbersSet && m_viRelativeLineNumbers == on)
1857 m_viRelativeLineNumbersSet =
true;
1858 m_viRelativeLineNumbers = on;
1864 if (m_viInputModeEmulateCommandBarSet ||
isGlobal())
1865 return m_viInputModeEmulateCommandBar;
1872 if (m_viInputModeEmulateCommandBarSet && m_viInputModeEmulateCommandBar == on)
1876 m_viInputModeEmulateCommandBarSet =
true;
1877 m_viInputModeEmulateCommandBar = on;
1883 if (m_automaticCompletionInvocationSet ||
isGlobal())
1884 return m_automaticCompletionInvocation;
1891 if (m_automaticCompletionInvocationSet && m_automaticCompletionInvocation == on)
1895 m_automaticCompletionInvocationSet =
true;
1896 m_automaticCompletionInvocation = on;
1902 if (m_wordCompletionSet ||
isGlobal())
1903 return m_wordCompletion;
1910 if (m_wordCompletionSet && m_wordCompletion == on)
1914 m_wordCompletionSet =
true;
1915 m_wordCompletion = on;
1921 if (m_keywordCompletionSet ||
isGlobal())
1922 return m_keywordCompletion;
1928 if (m_keywordCompletionSet && m_keywordCompletion == on)
1931 m_keywordCompletionSet =
true;
1932 m_keywordCompletion = on;
1938 if (m_wordCompletionMinimalWordLengthSet ||
isGlobal())
1939 return m_wordCompletionMinimalWordLength;
1946 if (m_wordCompletionMinimalWordLengthSet && m_wordCompletionMinimalWordLength == length)
1951 m_wordCompletionMinimalWordLengthSet =
true;
1952 m_wordCompletionMinimalWordLength = length;
1959 if (m_wordCompletionRemoveTailSet ||
isGlobal())
1960 return m_wordCompletionRemoveTail;
1967 if (m_wordCompletionRemoveTailSet && m_wordCompletionRemoveTail == on)
1971 m_wordCompletionRemoveTailSet =
true;
1972 m_wordCompletionRemoveTail = on;
1978 if (m_smartCopyCutSet ||
isGlobal())
1979 return m_smartCopyCut;
1986 if (m_smartCopyCutSet && m_smartCopyCut == on)
1991 m_smartCopyCutSet =
true;
1992 m_smartCopyCut = on;
1999 if (m_scrollPastEndSet ||
isGlobal())
2000 return m_scrollPastEnd;
2007 if (m_scrollPastEndSet && m_scrollPastEnd == on)
2012 m_scrollPastEndSet =
true;
2013 m_scrollPastEnd = on;
2020 if (m_foldFirstLineSet ||
isGlobal())
2021 return m_foldFirstLine;
2028 if (m_foldFirstLineSet && m_foldFirstLine == on)
2033 m_foldFirstLineSet =
true;
2034 m_foldFirstLine = on;
2042 KateRendererConfig::KateRendererConfig ()
2043 : m_fontMetrics(
QFont()),
2044 m_lineMarkerColor (KTextEditor::MarkInterface::reservedMarkersCount()),
2045 m_wordWrapMarker (false),
2046 m_showIndentationLines (false),
2047 m_showWholeBracketExpression (false),
2048 m_animateBracketMatching (false),
2049 m_schemaSet (false),
2051 m_wordWrapMarkerSet (false),
2052 m_showIndentationLinesSet (false),
2053 m_showWholeBracketExpressionSet (false),
2054 m_backgroundColorSet (false),
2055 m_selectionColorSet (false),
2056 m_highlightedLineColorSet (false),
2057 m_highlightedBracketColorSet (false),
2058 m_wordWrapMarkerColorSet (false),
2059 m_tabMarkerColorSet (false),
2060 m_indentationLineColorSet (false),
2061 m_iconBarColorSet (false),
2062 m_foldingColorSet (false),
2063 m_lineNumberColorSet (false),
2064 m_separatorColorSet (false),
2065 m_spellingMistakeLineColorSet (false),
2066 m_templateColorsSet (false),
2067 m_modifiedLineColorSet (false),
2068 m_savedLineColorSet (false),
2069 m_searchHighlightColorSet (false),
2070 m_replaceHighlightColorSet (false),
2071 m_lineMarkerColorSet (m_lineMarkerColor.size()),
2075 m_lineMarkerColorSet.fill (
true);
2080 KConfigGroup config(KGlobal::config(),
"Kate Renderer Defaults");
2085 : m_fontMetrics(
QFont()),
2086 m_lineMarkerColor (KTextEditor::MarkInterface::reservedMarkersCount()),
2087 m_schemaSet (false),
2089 m_wordWrapMarkerSet (false),
2090 m_showIndentationLinesSet (false),
2091 m_showWholeBracketExpressionSet (false),
2092 m_backgroundColorSet (false),
2093 m_selectionColorSet (false),
2094 m_highlightedLineColorSet (false),
2095 m_highlightedBracketColorSet (false),
2096 m_wordWrapMarkerColorSet (false),
2097 m_tabMarkerColorSet (false),
2098 m_indentationLineColorSet (false),
2099 m_iconBarColorSet (false),
2100 m_foldingColorSet (false),
2101 m_lineNumberColorSet (false),
2102 m_separatorColorSet (false),
2103 m_spellingMistakeLineColorSet (false),
2104 m_templateColorsSet(false),
2105 m_modifiedLineColorSet(false),
2106 m_savedLineColorSet(false),
2107 m_searchHighlightColorSet(false),
2108 m_replaceHighlightColorSet(false),
2109 m_lineMarkerColorSet (m_lineMarkerColor.size()),
2110 m_renderer (renderer)
2113 m_lineMarkerColorSet.
fill (
false);
2122 const char *
const KEY_SCHEMA =
"Schema";
2123 const char *
const KEY_WORD_WRAP_MARKER =
"Word Wrap Marker";
2124 const char *
const KEY_SHOW_INDENTATION_LINES =
"Show Indentation Lines";
2125 const char *
const KEY_SHOW_WHOLE_BRACKET_EXPRESSION =
"Show Whole Bracket Expression";
2126 const char *
const KEY_ANIMATE_BRACKET_MATCHING =
"Animate Bracket Matching";
2134 setSchema (config.readEntry(KEY_SCHEMA,
"Normal"));
2149 config.writeEntry (KEY_SCHEMA,
schema());
2180 return s_global->
schema();
2185 if (m_schemaSet && m_schema == schema)
2191 setSchemaInternal( schema );
2198 setSchemaInternal( m_schema );
2203 else if ( m_renderer && m_schemaSet )
2204 setSchemaInternal( m_schema );
2207 void KateRendererConfig::setSchemaInternal(
const QString &schema )
2217 m_backgroundColorSet =
true;
2219 m_selectionColorSet =
true;
2221 m_highlightedLineColorSet =
true;
2223 m_highlightedBracketColorSet =
true;
2225 m_wordWrapMarkerColorSet =
true;
2227 m_tabMarkerColorSet =
true;
2229 m_indentationLineColorSet =
true;
2231 m_iconBarColorSet =
true;
2233 m_foldingColorSet =
true;
2235 m_lineNumberColorSet =
true;
2237 m_separatorColorSet =
true;
2239 m_spellingMistakeLineColorSet =
true;
2242 m_modifiedLineColorSet =
true;
2244 m_savedLineColorSet =
true;
2246 m_searchHighlightColorSet =
true;
2248 m_replaceHighlightColorSet =
true;
2251 QColor col = config.readEntry(
QString(
"Color MarkType %1").arg(i + 1), colors.
mark(i));
2252 m_lineMarkerColorSet[i] =
true;
2253 m_lineMarkerColor[i] = col;
2256 QFont f (KGlobalSettings::fixedFont());
2258 m_font = config.readEntry(
"Font", f);
2264 m_templateFocusedEditablePlaceholderColor = config.readEntry(
QString(
"Color Template Focused Editable Placeholder"),
2267 m_templateEditablePlaceholderColor = config.readEntry(
QString(
"Color Template Editable Placeholder"),
2270 m_templateNotEditablePlaceholderColor = config.readEntry(
QString(
"Color Template Not Editable Placeholder"),
2273 m_templateColorsSet=
true;
2281 return s_global->
font();
2287 return m_fontMetrics;
2294 if (m_fontSet && m_font == font)
2308 if (m_wordWrapMarkerSet ||
isGlobal())
2309 return m_wordWrapMarker;
2316 if (m_wordWrapMarkerSet && m_wordWrapMarker == on)
2321 m_wordWrapMarkerSet =
true;
2322 m_wordWrapMarker = on;
2329 if (m_backgroundColorSet ||
isGlobal())
2330 return m_backgroundColor;
2337 if (m_backgroundColorSet && m_backgroundColor == col)
2342 m_backgroundColorSet =
true;
2343 m_backgroundColor = col;
2350 if (m_selectionColorSet ||
isGlobal())
2351 return m_selectionColor;
2358 if (m_selectionColorSet && m_selectionColor == col)
2363 m_selectionColorSet =
true;
2364 m_selectionColor = col;
2371 if (m_highlightedLineColorSet ||
isGlobal())
2372 return m_highlightedLineColor;
2379 if (m_highlightedLineColorSet && m_highlightedLineColor == col)
2384 m_highlightedLineColorSet =
true;
2385 m_highlightedLineColor = col;
2393 if (type > 0) {
while((type >> index++) ^ 1) {} }
2396 if ( index < 0 || index >= KTextEditor::MarkInterface::reservedMarkersCount() )
2402 if (m_lineMarkerColorSet[index] ||
isGlobal())
2403 return m_lineMarkerColor[index];
2410 int index =
static_cast<int>( log(static_cast<double>(type)) / log(2.0) );
2411 Q_ASSERT( index >= 0 && index < KTextEditor::MarkInterface::reservedMarkersCount() );
2413 if (m_lineMarkerColorSet[index] && m_lineMarkerColor[index] == col)
2418 m_lineMarkerColorSet[index] =
true;
2419 m_lineMarkerColor[index] = col;
2426 if (m_highlightedBracketColorSet ||
isGlobal())
2427 return m_highlightedBracketColor;
2434 if (m_highlightedBracketColorSet && m_highlightedBracketColor == col)
2439 m_highlightedBracketColorSet =
true;
2440 m_highlightedBracketColor = col;
2447 if (m_wordWrapMarkerColorSet ||
isGlobal())
2448 return m_wordWrapMarkerColor;
2455 if (m_wordWrapMarkerColorSet && m_wordWrapMarkerColor == col)
2460 m_wordWrapMarkerColorSet =
true;
2461 m_wordWrapMarkerColor = col;
2468 if (m_tabMarkerColorSet ||
isGlobal())
2469 return m_tabMarkerColor;
2476 if (m_tabMarkerColorSet && m_tabMarkerColor == col)
2481 m_tabMarkerColorSet =
true;
2482 m_tabMarkerColor = col;
2489 if (m_indentationLineColorSet ||
isGlobal())
2490 return m_indentationLineColor;
2497 if (m_indentationLineColorSet && m_indentationLineColor == col)
2502 m_indentationLineColorSet =
true;
2503 m_indentationLineColor = col;
2510 if (m_iconBarColorSet ||
isGlobal())
2511 return m_iconBarColor;
2518 if (m_iconBarColorSet && m_iconBarColor == col)
2523 m_iconBarColorSet =
true;
2524 m_iconBarColor = col;
2531 if (m_foldingColorSet ||
isGlobal())
2532 return m_foldingColor;
2539 if (m_foldingColorSet && m_foldingColor == col)
2544 m_foldingColorSet =
true;
2545 m_foldingColor = col;
2552 if (m_templateColorsSet ||
isGlobal())
2553 return m_templateBackgroundColor;
2560 if (m_templateColorsSet ||
isGlobal())
2561 return m_templateEditablePlaceholderColor;
2568 if (m_templateColorsSet ||
isGlobal())
2569 return m_templateFocusedEditablePlaceholderColor;
2576 if (m_templateColorsSet ||
isGlobal())
2577 return m_templateNotEditablePlaceholderColor;
2584 if (m_lineNumberColorSet ||
isGlobal())
2585 return m_lineNumberColor;
2592 if (m_lineNumberColorSet && m_lineNumberColor == col)
2597 m_lineNumberColorSet =
true;
2598 m_lineNumberColor = col;
2605 if (m_separatorColorSet ||
isGlobal())
2606 return m_separatorColor;
2613 if (m_separatorColorSet && m_separatorColor == col)
2618 m_separatorColorSet =
true;
2619 m_separatorColor = col;
2626 if (m_spellingMistakeLineColorSet ||
isGlobal())
2627 return m_spellingMistakeLineColor;
2634 if (m_spellingMistakeLineColorSet && m_spellingMistakeLineColor == col)
2639 m_spellingMistakeLineColorSet =
true;
2640 m_spellingMistakeLineColor = col;
2647 if (m_modifiedLineColorSet ||
isGlobal())
2648 return m_modifiedLineColor;
2655 if (m_modifiedLineColorSet && m_modifiedLineColor == col)
2660 m_modifiedLineColorSet =
true;
2661 m_modifiedLineColor = col;
2668 if (m_savedLineColorSet ||
isGlobal())
2669 return m_savedLineColor;
2676 if (m_savedLineColorSet && m_savedLineColor == col)
2681 m_savedLineColorSet =
true;
2682 m_savedLineColor = col;
2689 if (m_searchHighlightColorSet ||
isGlobal())
2690 return m_searchHighlightColor;
2697 if (m_searchHighlightColorSet && m_searchHighlightColor == col)
2702 m_searchHighlightColorSet =
true;
2703 m_searchHighlightColor = col;
2710 if (m_replaceHighlightColorSet ||
isGlobal())
2711 return m_replaceHighlightColor;
2718 if (m_replaceHighlightColorSet && m_replaceHighlightColor == col)
2723 m_replaceHighlightColorSet =
true;
2724 m_replaceHighlightColor = col;
2732 if (m_showIndentationLinesSet ||
isGlobal())
2733 return m_showIndentationLines;
2740 if (m_showIndentationLinesSet && m_showIndentationLines == on)
2745 m_showIndentationLinesSet =
true;
2746 m_showIndentationLines = on;
2753 if (m_showWholeBracketExpressionSet ||
isGlobal())
2754 return m_showWholeBracketExpression;
2761 if (m_showWholeBracketExpressionSet && m_showWholeBracketExpression == on)
2766 m_showWholeBracketExpressionSet =
true;
2767 m_showWholeBracketExpression = on;
2774 return s_global->m_animateBracketMatching;
2781 }
else if (on != m_animateBracketMatching) {
2783 m_animateBracketMatching = on;
void setKeepExtraSpaces(bool on)
bool showWholeBracketExpression() const
void setWordCompletionRemoveTail(bool on)
void setSchema(const QString &schema)
const QString & backupPrefix() const
bool keepExtraSpaces() const
const QColor & selectionColor() const
void setIndentationMode(const QString &identationMode)
bool viInputModeEmulateCommandBar() const
bool wordWrapMarker() const
void setViInputModeStealKeys(bool on)
const QColor & highlightedBracketColor() const
void setFoldFirstLine(bool on)
QList< KateDocument * > & kateDocuments()
return a list of all registered docs
void setHighlightedBracketColor(const QColor &col)
virtual void updateConfig()=0
do the real update
virtual QByteArray name() const =0
KateRenderer * renderer()
const QColor & lineMarkerColor(KTextEditor::MarkInterface::MarkTypes type=KTextEditor::MarkInterface::markType01) const
void setTabHandling(uint tabHandling)
bool smartCopyCut() const
bool scrollBarMarks() const
bool onTheFlySpellCheck() const
void setAllowEolDetection(bool on)
const QColor & replaceHighlightColor() const
void setNewLineAtEof(bool on)
void setFoldingColor(const QColor &col)
void setLineMarkerColor(const QColor &col, KTextEditor::MarkInterface::MarkTypes type=KTextEditor::MarkInterface::markType01)
void setShowScrollbars(int mode)
QColor color(Kate::ColorRole color) const
void setViInputModeEmulateCommandBar(bool on)
bool scrollBarMiniMap() const
bool lineModification() const
int wordCompletionMinimalWordLength() const
void setBackupSuffix(const QString &suffix)
bool indentPastedText() const
void setScrollBarMiniMapAll(bool on)
void setLineModification(bool on)
void setTabIndents(bool on)
void configEnd()
end a config change transaction, update the concerned documents/views/renderers
void setWordCompletion(bool on)
void writeConfig(KConfigGroup &config)
Write config to object.
const QColor & iconBarColor() const
void readConfig(const KConfigGroup &config)
Read config from object.
void setFont(const QFont &font)
static KateGlobal * self()
Kate Part Internal stuff ;)
void setSwapFileNoSync(bool on)
const QColor & wordWrapMarkerColor() const
void setSelectionColor(const QColor &col)
const QColor & foldingColor() const
bool animateBracketMatching() const
void setSpellingMistakeLineColor(const QColor &col)
void setModifiedLineColor(const QColor &col)
QTextCodec * codec() const
void setScrollBarMarks(bool on)
const QColor & indentationLineColor() const
const QColor & lineNumberColor() const
bool wordCompletionRemoveTail() const
void setDynWordWrapAlignIndent(int indent)
void configStart()
start some config changes this method is needed to init some kind of transaction for config changes...
void setScrollPastEnd(bool on)
int dynWordWrapAlignIndent() const
const QColor & modifiedLineColor() const
bool scrollBarMiniMapAll() const
void setOnTheFlySpellCheck(bool on)
bool replaceTabsDyn() const
Handles all of the work of rendering the text (used for the views and printing)
QTextCodec * fallbackCodec() const
void setBackspaceIndents(bool on)
const QColor & templateBackgroundColor() const
QStringList stringList() const
void setViInputMode(bool on)
int showScrollbars() const
void setShowWholeBracketExpression(bool on)
const QString & backupSuffix() const
void setAutoCenterLines(int lines)
KateRendererConfig * config() const
Configuration.
void setProberType(KEncodingProber::ProberType proberType)
const QColor & templateEditablePlaceholderColor() const
KateConfig()
Default Constructor.
void setWordWrapAt(int col)
bool viInputModeStealKeys() const
void setWordCompletionMinimalWordLength(int length)
void updateConfig()
do the real update
const QString & fallbackEncoding() const
~KateDocumentConfig()
Cu DocumentConfig.
bool persistentSelection() const
void setLineNumberColor(const QColor &col)
void setPersistentSelection(bool on)
QStringListModel * replacementHistoryModel()
QList< KateView * > & views()
return a list of all registered views
void setLineLengthLimit(int limit)
void setTabMarkerColor(const QColor &col)
KEncodingProber::ProberType proberType() const
void setBackgroundColor(const QColor &col)
void setSmartHome(bool on)
void updateConfig()
do the real update
void setDefaultMarkType(uint type)
const QColor & tabMarkerColor() const
void setRemoveSpaces(int triState)
Remove trailing spaces on save.
void reloadSchema()
Reload the schema from the schema manager.
~KateRendererConfig()
Cu DocumentConfig.
bool allowEolDetection() const
bool wordCompletion() const
void setIndentationLineColor(const QColor &col)
void setShowTabs(bool on)
void setShowIndentationLines(bool on)
void writeConfig(KConfigGroup &config)
Write config to object.
const QString & encoding() const
void readConfig(const KConfigGroup &config)
Read config from object.
void setWordWrapMarker(bool on)
void setBackupPrefix(const QString &prefix)
void setViRelativeLineNumbers(bool on)
void updateConfig()
do the real update
const QColor & highlightedLineColor() const
void setSearchDirConfigDepth(int depth)
void setAutomaticCompletionInvocation(bool on)
void writeConfig(KConfigGroup &config)
Write config to object.
bool allowMarkMenu() const
KateSchemaManager * schemaManager()
manager for the katepart schemas
void setUndoMergeAllEdits(bool merge)
void setFoldingBar(bool on)
void setAllowSimpleMode(bool on)
KConfigGroup schema(const QString &name)
return kconfiggroup for the given schema
const QString & indentationMode() const
void setSearchHighlightColor(const QColor &col)
int indentationWidth() const
void setWordWrap(bool on)
const QString & schema() const
int autoCenterLines() const
~KateViewConfig()
Cu DocumentConfig.
const QColor & separatorColor() const
QColor mark(Kate::Mark mark) const
void setSavedLineColor(const QColor &col)
bool swapFileNoSync() const
bool automaticCompletionInvocation() const
void updateConfig()
do the real update
bool keywordCompletion() const
const QFont & font() const
void setShowSpaces(bool on)
void setPageUpDownMovesCursor(bool on)
int scrollBarMiniMapWidth() const
void setAnimateBracketMatching(bool on)
QTextCodec * codecForName(const QByteArray &name)
const QColor & savedLineColor() const
void setBookmarkSort(int mode)
void setSmartCopyCut(bool on)
void readConfig(const KConfigGroup &config)
Read config from object.
bool scrollPastEnd() const
bool setFallbackEncoding(const QString &encoding)
const QColor & searchHighlightColor() const
bool isSetEncoding() const
void setReplaceTabsDyn(bool on)
bool viRelativeLineNumbers() const
const QColor & backgroundColor() const
bool pageUpDownMovesCursor() const
void setWordWrapMarkerColor(const QColor &col)
bool showIndentationLines() const
void writeConfig(KConfigGroup &config)
Write config to object.
void setLineNumbers(bool on)
void setIconBarColor(const QColor &col)
KateDocument * doc()
accessor to katedocument pointer
bool tabIndentsEnabled() const
const QColor & templateNotEditablePlaceholderColor() const
uint defaultMarkType() const
int dynWordWrapIndicators() const
void setScrollBarMiniMapWidth(int width)
const QFontMetricsF & fontMetrics() const
void setIndentPastedText(bool on)
void setKeywordCompletion(bool on)
bool fill(bool value, int size)
int lineLengthLimit() const
void setReplaceHighlightColor(const QColor &col)
int maxHistorySize() const
void setAllowMarkMenu(bool allow)
virtual ~KateConfig()
Virtual Destructor.
void setDynWordWrap(bool wrap)
bool backspaceIndents() const
void setTabWidth(int tabWidth)
int searchDirConfigDepth() const
Should Kate Part search for dir wide config file and if, how depth?
void setStringList(const QStringList &strings)
void setSeparatorColor(const QColor &col)
void setIndentationWidth(int indentationWidth)
bool allowSimpleMode() const
void setHighlightedLineColor(const QColor &col)
QStringListModel * patternHistoryModel()
void readConfig(const KConfigGroup &config)
Read config from object.
void setScrollBarMiniMap(bool on)
const QColor & spellingMistakeLineColor() const
void setDynWordWrapIndicators(int mode)
void setSearchFlags(long flags)
bool setEncoding(const QString &encoding)
const QColor & templateFocusedEditablePlaceholderColor() const
bool newLineAtEof() const
bool foldFirstLine() const
void setBackupFlags(uint flags)
indents in leading space, otherwise inserts tab