KTextEditor

editorconfig.h
1/*
2 SPDX-FileCopyrightText: 2017 Grzegorz Szymaszek <gszymaszek@short.pl>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#ifndef _EDITORCONFIG_H_
8#define _EDITORCONFIG_H_
9
10#include <QLatin1String>
11
12#include <editorconfig/editorconfig.h>
13#include <editorconfig/editorconfig_handle.h>
14
15class KateDocumentConfig;
16
17namespace KTextEditor
18{
19class DocumentPrivate;
20}
21
22class EditorConfig
23{
24public:
25 explicit EditorConfig(KTextEditor::DocumentPrivate *document);
26 ~EditorConfig();
27 EditorConfig(const EditorConfig &) = delete;
28 EditorConfig &operator=(const EditorConfig &) = delete;
29 /**
30 * Runs EditorConfig parser and sets proper parent DocumentPrivate
31 * configuration. Implemented options: charset, end_of_line, indent_size,
32 * indent_style, insert_final_newline, max_line_length, tab_width,
33 * trim_trailing_whitespace.
34 *
35 * @see https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties
36 *
37 * @return 0 if EditorConfig library reported successful file parsing,
38 * positive integer if a parsing error occurred (the return value would be
39 * the line number of parsing error), negative integer if another error
40 * occurred. In other words, returns value returned by editorconfig_parse.
41 */
42 int parse();
43
44private:
46 editorconfig_handle m_handle;
47};
48
49#endif
Backend of KTextEditor::Document related public KTextEditor interfaces.
The KTextEditor namespace contains all the public API that is required to use the KTextEditor compone...
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:11:26 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.