KTextEditor

globalstate.h
1/*
2 SPDX-FileCopyrightText: 2008 Erlend Hamberg <ehamberg@gmail.com>
3 SPDX-FileCopyrightText: 2011 Svyatoslav Kuzmich <svatoslav1@gmail.com>
4 SPDX-FileCopyrightText: 2012-2013 Simon St James <kdedevel@etotheipiplusone.com>
5
6 SPDX-License-Identifier: LGPL-2.0-or-later
7*/
8
9#ifndef KATEVI_GLOBAL_STATE_H
10#define KATEVI_GLOBAL_STATE_H
11
12#include <KSharedConfig>
13#include <ktexteditor_export.h>
14
15namespace KateVi
16{
17class History;
18class Macros;
19class Mappings;
20class Registers;
21
22class GlobalState
23{
24public:
25 explicit GlobalState();
26 ~GlobalState();
27 GlobalState(const GlobalState &) = delete;
28 GlobalState &operator=(const GlobalState &) = delete;
29
30 KTEXTEDITOR_EXPORT void writeConfig(KConfig *config) const;
31 KTEXTEDITOR_EXPORT void readConfig(const KConfig *config);
32
33 inline Macros *macros() const
34 {
35 return m_macros;
36 }
37 inline Mappings *mappings() const
38 {
39 return m_mappings;
40 }
41 inline Registers *registers() const
42 {
43 return m_registers;
44 }
45
46 inline History *searchHistory() const
47 {
48 return m_searchHistory;
49 }
50 inline History *commandHistory() const
51 {
52 return m_commandHistory;
53 }
54 inline History *replaceHistory() const
55 {
56 return m_replaceHistory;
57 }
58
59private:
60 static KSharedConfigPtr config();
61
62private:
63 Macros *m_macros;
64 Mappings *m_mappings;
65 Registers *m_registers;
66
67 History *m_searchHistory;
68 History *m_commandHistory;
69 History *m_replaceHistory;
70};
71}
72
73#endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 11 2024 12:17:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.