KTextEditor

registers.h
1/*
2 SPDX-FileCopyrightText: KDE Developers
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#ifndef KATEVI_REGISTERS_H
8#define KATEVI_REGISTERS_H
9
10#include "definitions.h"
11
12#include <QChar>
13#include <QList>
14#include <QString>
15#include <map>
16
17class KConfigGroup;
18
19namespace KateVi
20{
21const QChar BlackHoleRegister = QLatin1Char('_');
22const QChar SmallDeleteRegister = QLatin1Char('-');
23const QChar ZeroRegister = QLatin1Char('0');
24const QChar PrependNumberedRegister = QLatin1Char('!');
25const QChar FirstNumberedRegister = QLatin1Char('1');
26const QChar LastNumberedRegister = QLatin1Char('9');
27const QChar SystemSelectionRegister = QLatin1Char('*');
28const QChar SystemClipboardRegister = QLatin1Char('+');
29const QChar UnnamedRegister = QLatin1Char('"');
30const QChar InsertStoppedRegister = QLatin1Char('^');
31
32class Registers
33{
34public:
35 void writeConfig(KConfigGroup &config) const;
36 void readConfig(const KConfigGroup &config);
37
38 void setInsertStopped(const QString &text);
39
40 void set(const QChar &reg, const QString &text, OperationMode flag = CharWise);
41 QString getContent(const QChar &reg) const;
42 OperationMode getFlag(const QChar &reg) const;
43
44private:
45 typedef QPair<QString, OperationMode> Register;
46
47private:
48 void setNumberedRegister(const QChar &reg, const QString &text, OperationMode flag = CharWise);
49 Register getRegister(const QChar &reg) const;
50
51private:
52 QList<Register> m_numbered;
53 std::map<QChar, Register> m_registers;
54 QChar m_default;
55};
56
57}
58
59#endif // KATEVI_REGISTERS_H
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 4 2024 12:03:01 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.