summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Brauch <svenbrauch@googlemail.com>2014-01-22 23:11:06 (GMT)
committerSven Brauch <svenbrauch@googlemail.com>2014-01-22 23:11:16 (GMT)
commit2b581a487ed32dfaffc63e6c48df630637c5d41b (patch)
treecc39f6020842df794349151de60b4a120b584e0f
parent9a80eb0443b1f04b8bbc6a46e241fe0c8470c3a3 (diff)
Add ConfigIface keys: icon border, folding, lineno, modification markers
-rw-r--r--ktexteditor/configinterface.h5
-rw-r--r--part/view/kateview.cpp19
2 files changed, 23 insertions, 1 deletions
diff --git a/ktexteditor/configinterface.h b/ktexteditor/configinterface.h
index e163f07..ebbc2e8 100644
--- a/ktexteditor/configinterface.h
+++ b/ktexteditor/configinterface.h
@@ -76,6 +76,11 @@ namespace KTextEditor
* - allow-mark-menu [bool], enable/disable the menu shown when right clicking
* on the left gutter. When disabled, click on the gutter will always set
* or clear the mark of default type.
+ * - icon-border-color [QColor] read/set the icon border color (on the left,
+ * with the line numbers)
+ * - folding-marker-color [QColor] read/set folding marker colors (in the icon border)
+ * - line-number-color [QColor] read/set line number colors (in the icon border)
+ * - modification-markers [bool] read/set whether the modification markers are shown
*
* KTextEditor::Document has support for the following:
* - backup-on-save-local [bool], enable/disable backup when saving local files
diff --git a/part/view/kateview.cpp b/part/view/kateview.cpp
index 0ede409..9d9cff6 100644
--- a/part/view/kateview.cpp
+++ b/part/view/kateview.cpp
@@ -2853,7 +2853,8 @@ QStringList KateView::configKeys() const
return QStringList() << "icon-bar" << "line-numbers" << "dynamic-word-wrap"
<< "background-color" << "selection-color"
<< "search-highlight-color" << "replace-highlight-color"
- << "folding-bar";
+ << "folding-bar" << "icon-border-color" << "folding-marker-color"
+ << "line-number-color" << "modification-markers";
}
QVariant KateView::configValue(const QString &key)
@@ -2878,6 +2879,14 @@ QVariant KateView::configValue(const QString &key)
return config()->allowMarkMenu();
else if (key == "folding-bar")
return config()->foldingBar();
+ else if (key == "icon-border-color")
+ return renderer()->config()->iconBarColor();
+ else if (key == "folding-marker-color")
+ return renderer()->config()->foldingColor();
+ else if (key == "line-number-color")
+ return renderer()->config()->lineNumberColor();
+ else if (key == "modification-markers")
+ return config()->lineModification();
// return invalid variant
return QVariant();
@@ -2894,6 +2903,12 @@ void KateView::setConfigValue(const QString &key, const QVariant &value)
renderer()->config()->setSearchHighlightColor(value.value<QColor>());
else if (key == "replace-highlight-color")
renderer()->config()->setReplaceHighlightColor(value.value<QColor>());
+ else if (key == "icon-border-color")
+ renderer()->config()->setIconBarColor(value.value<QColor>());
+ else if (key == "folding-marker-color")
+ renderer()->config()->setFoldingColor(value.value<QColor>());
+ else if (key == "line-number-color")
+ renderer()->config()->setLineNumberColor(value.value<QColor>());
} else if ( value.type() == QVariant::Bool ) {
// Note explicit type check above. If we used canConvert, then
// values of type UInt will be trapped here.
@@ -2907,6 +2922,8 @@ void KateView::setConfigValue(const QString &key, const QVariant &value)
config()->setAllowMarkMenu(value.toBool());
else if (key == "folding-bar")
config()->setFoldingBar(value.toBool());
+ else if (key == "modification-markers")
+ config()->setLineModification(value.toBool());
} else if ( value.canConvert(QVariant::UInt) ) {
if (key == "default-mark-type")
config()->setDefaultMarkType(value.toUInt());