9#ifndef KATE_SCHEMA_CONFIG_H
10#define KATE_SCHEMA_CONFIG_H
12#include "kateconfigpage.h"
13#include "kateextendedattribute.h"
16#include <unordered_map>
19class KateColorTreeWidget;
31class KateThemeConfigColorTab :
public QWidget
36 KateThemeConfigColorTab();
38 QColor backgroundColor()
const;
39 QColor selectionColor()
const;
44 void schemaChanged(
const QString &newSchema);
51 std::map<QString, QList<KateColorItem>> m_schemas;
52 QString m_currentSchema;
53 KateColorTreeWidget *ui;
56class KateThemeConfigDefaultStylesTab :
public QWidget
61 explicit KateThemeConfigDefaultStylesTab(KateThemeConfigColorTab *colorTab);
67 void schemaChanged(
const QString &schema);
71 KateAttributeList *attributeList(
const QString &schema);
74 void showEvent(QShowEvent *
event)
override;
75 void updateColorPalette(
const QColor &textColor);
78 KateStyleTreeWidget *m_defaultStyles;
79 std::unordered_map<QString, KateAttributeList> m_defaultStyleLists;
80 KateThemeConfigColorTab *m_colorTab;
81 QString m_currentSchema;
84class KateThemeConfigHighlightTab :
public QWidget
89 explicit KateThemeConfigHighlightTab(KateThemeConfigDefaultStylesTab *page, KateThemeConfigColorTab *colorTab);
91 void schemaChanged(
const QString &schema);
99 void hlChanged(
int z);
102 void showEvent(QShowEvent *
event)
override;
103 void updateColorPalette(
const QColor &textColor);
106 KateThemeConfigDefaultStylesTab *m_defaults;
107 KateThemeConfigColorTab *m_colorTab;
110 KateStyleTreeWidget *m_styles;
115 QHash<QString, QHash<int, QList<KTextEditor::Attribute::Ptr>>> m_hlDict;
123 std::map<QString, std::map<QString, std::map<QString, std::pair<KTextEditor::Attribute::Ptr, KTextEditor::Attribute::Ptr>>>> m_uniqueAttributes;
126 QList<int> hlsForSchema(
const QString &schema);
129class KateThemeConfigPage :
public KateConfigPage
133 QString name()
const override;
134 QString fullName()
const override;
135 QIcon icon()
const override;
138 void apply()
override;
139 void reload()
override;
140 void reset()
override;
141 void defaults()
override;
142 void exportFullSchema();
143 void importFullSchema();
146 void layoutThemeChooserTab(
QWidget *tab);
147 void layoutThemeEditorTab(
QWidget *tab);
150 void schemaChanged(
const QString &schema);
151 void comboBoxIndexChanged(
int currentIndex);
154 void refillCombos(
const QString &schemaName,
const QString &defaultSchemaName);
157 QString m_currentSchema;
159 KMessageWidget *m_readOnlyThemeLabel =
nullptr;
160 class QPushButton *btndel;
161 class QComboBox *defaultSchemaCombo;
162 class QComboBox *schemaCombo;
163 KateThemeConfigColorTab *m_colorTab;
164 KateThemeConfigDefaultStylesTab *m_defaultStylesTab;
165 KateThemeConfigHighlightTab *m_highlightTab;
166 KTextEditor::DocumentPrivate *m_doc =
nullptr;
167 KTextEditor::ViewPrivate *m_themePreview =
nullptr;
Backend of KTextEditor::Document related public KTextEditor interfaces.
The KTextEditor namespace contains all the public API that is required to use the KTextEditor compone...
virtual bool event(QEvent *e)
QObject * parent() const const