edbee - Qt Editor Library v0.11.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
keymapparser.h
Go to the documentation of this file.
1// edbee - Copyright (c) 2012-2025 by Rick Blommers and contributors
2// SPDX-License-Identifier: MIT
3
4#pragma once
5
6#include "edbee/exports.h"
7
8#include <QHash>
9#include <QString>
10#include <QVariant>
11
12class QIODevice;
13
14namespace edbee {
15
16class JsonParser;
18
47public:
49 virtual ~KeyMapParser();
50
51 bool parse(const QString& filename, TextEditorKeyMap* keyMap );
52 bool parse( QIODevice* device, TextEditorKeyMap* keyMap );
53 bool parse( const QByteArray& bytes, TextEditorKeyMap* keyMap );
54 bool parse( const QVariant& variant, TextEditorKeyMap* keyMap );
55
56 QString errorMessage() const;
57
58
59private:
60
61 void buildErrorMessageFromParser();
62
63 bool parseBindingBlock(const QVariantMap &valueObject, TextEditorKeyMap* keyMap );
64
65 QString errorMessage_;
66 JsonParser* parser_;
67};
68
69} // edbee
A Json Parser that supports strings in json sources! standard json doesn't support comments....
Definition jsonparser.h:17
QString errorMessage() const
Returns the error message.
Definition keymapparser.cpp:98
KeyMapParser()
constructs the keymapparser
Definition keymapparser.cpp:21
bool parse(const QString &filename, TextEditorKeyMap *keyMap)
loads the given keymap file returns true on success
Definition keymapparser.cpp:39
A text editor key map This key map, maps key-sequences to action-names.
Definition texteditorkeymap.h:39
#define EDBEE_EXPORT
Definition exports.h:15
QT Acessibility has an issue with reporting blank lines between elements lines. defining 'WINDOWS_EMP...
Definition commentcommand.cpp:20