Changeset View
Changeset View
Standalone View
Standalone View
src/utils/kateconfig.cpp
Show First 20 Lines • Show All 91 Lines • ▼ Show 20 Line(s) | 495 | KateViewConfig::KateViewConfig() | |||
---|---|---|---|---|---|
529 | m_showWordCountSet(false), | 529 | m_showWordCountSet(false), | ||
530 | m_showLineCountSet(false), | 530 | m_showLineCountSet(false), | ||
531 | m_autoBracketsSet(false), | 531 | m_autoBracketsSet(false), | ||
532 | m_backspaceRemoveComposedSet(false) | 532 | m_backspaceRemoveComposedSet(false) | ||
533 | 533 | | |||
534 | { | 534 | { | ||
535 | s_global = this; | 535 | s_global = this; | ||
536 | 536 | | |||
537 | /** | ||||
538 | * Init all known config entries | ||||
539 | * <EnumKey>, <ConfigKey>, <CommandName>, <DefaultValue>, [<ValidatorFunction>] | ||||
540 | */ | ||||
541 | addConfigEntry(ConfigEntry(CharsToEncloseSelection, "Chars To Enclose Selection", QString(), QString())); | ||||
542 | | ||||
537 | // init with defaults from config or really hardcoded ones | 543 | // init with defaults from config or really hardcoded ones | ||
538 | KConfigGroup config(KTextEditor::EditorPrivate::config(), "KTextEditor View"); | 544 | KConfigGroup config(KTextEditor::EditorPrivate::config(), "KTextEditor View"); | ||
539 | readConfig(config); | 545 | readConfig(config); | ||
540 | } | 546 | } | ||
541 | 547 | | |||
542 | KateViewConfig::KateViewConfig(KTextEditor::ViewPrivate *view) | 548 | KateViewConfig::KateViewConfig(KTextEditor::ViewPrivate *view) | ||
543 | : KateConfig(s_global), | 549 | : KateConfig(s_global), | ||
544 | m_searchFlags(PowerModePlainText), | 550 | m_searchFlags(PowerModePlainText), | ||
▲ Show 20 Lines • Show All 182 Lines • ▼ Show 20 Line(s) | 1061 | { | |||
1060 | configStart(); | 1066 | configStart(); | ||
1061 | 1067 | | |||
1062 | m_autoBracketsSet = true; | 1068 | m_autoBracketsSet = true; | ||
1063 | m_autoBrackets = on; | 1069 | m_autoBrackets = on; | ||
1064 | 1070 | | |||
1065 | configEnd(); | 1071 | configEnd(); | ||
1066 | } | 1072 | } | ||
1067 | 1073 | | |||
1074 | bool KateViewConfig::encloseSelectionInChars() const | ||||
1075 | { | ||||
1076 | return !value(CharsToEncloseSelection).toString().isEmpty(); | ||||
1077 | } | ||||
1078 | | ||||
1079 | QString KateViewConfig::charsToEncloseSelection() const | ||||
1080 | { | ||||
1081 | return value(CharsToEncloseSelection).toString(); | ||||
1082 | } | ||||
1083 | | ||||
1068 | bool KateViewConfig::iconBar() const | 1084 | bool KateViewConfig::iconBar() const | ||
1069 | { | 1085 | { | ||
1070 | if (m_iconBarSet || isGlobal()) { | 1086 | if (m_iconBarSet || isGlobal()) { | ||
1071 | return m_iconBar; | 1087 | return m_iconBar; | ||
1072 | } | 1088 | } | ||
1073 | 1089 | | |||
1074 | return s_global->iconBar(); | 1090 | return s_global->iconBar(); | ||
1075 | } | 1091 | } | ||
▲ Show 20 Lines • Show All 91 Lines • Show Last 20 Lines |