KSyntaxHighlighting

repository.h
1 /*
2  Copyright (C) 2016 Volker Krause <[email protected]>
3 
4  Permission is hereby granted, free of charge, to any person obtaining
5  a copy of this software and associated documentation files (the
6  "Software"), to deal in the Software without restriction, including
7  without limitation the rights to use, copy, modify, merge, publish,
8  distribute, sublicense, and/or sell copies of the Software, and to
9  permit persons to whom the Software is furnished to do so, subject to
10  the following conditions:
11 
12  The above copyright notice and this permission notice shall be included
13  in all copies or substantial portions of the Software.
14 
15  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20  TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 */
23 
24 #ifndef KSYNTAXHIGHLIGHTING_REPOSITORY_H
25 #define KSYNTAXHIGHLIGHTING_REPOSITORY_H
26 
27 #include "ksyntaxhighlighting_export.h"
28 
29 #include <memory>
30 #include <qglobal.h>
31 
32 QT_BEGIN_NAMESPACE
33 class QString;
34 template<typename T> class QVector;
35 QT_END_NAMESPACE
36 
46 namespace KSyntaxHighlighting
47 {
48 class Definition;
49 class RepositoryPrivate;
50 class Theme;
51 
132 class KSYNTAXHIGHLIGHTING_EXPORT Repository
133 {
134 public:
142  Repository();
143  ~Repository();
144 
156  Definition definitionForName(const QString &defName) const;
157 
167  Definition definitionForFileName(const QString &fileName) const;
168 
176  QVector<Definition> definitionsForFileName(const QString &fileName) const;
177 
186  Definition definitionForMimeType(const QString &mimeType) const;
187 
193  QVector<Definition> definitionsForMimeType(const QString &mimeType) const;
194 
200  QVector<Definition> definitions() const;
201 
206  QVector<Theme> themes() const;
207 
213  Theme theme(const QString &themeName) const;
214 
223  DarkTheme
224  };
225 
230  Theme defaultTheme(DefaultTheme t = LightTheme);
231 
237  void reload();
238 
254  void addCustomSearchPath(const QString &path);
255 
263  QVector<QString> customSearchPaths() const;
264 
265 private:
266  Q_DISABLE_COPY(Repository)
267  friend class RepositoryPrivate;
268  std::unique_ptr<RepositoryPrivate> d;
269 };
270 
271 }
272 
273 #endif // KSYNTAXHIGHLIGHTING_REPOSITORY_H
Theme with a light background color.
Definition: repository.h:221
Represents a syntax definition.
Definition: definition.h:103
DefaultTheme
Built-in default theme types.
Definition: repository.h:219
Syntax highlighting engine for Kate syntax definitions.
Color theme definition used for highlighting.
Definition: theme.h:81
Syntax highlighting repository.
Definition: repository.h:132
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Jul 10 2020 22:57:28 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.