Q3270
A Qt-based 3270 Terminal Emulator
Loading...
Searching...
No Matches
KeyboardStore.h
1/*
2 * Q3270 Terminal Emulator
3 *
4 * Copyright (c) 2020–2025 Andy Styles
5 * SPDX-License-Identifier: BSD-3-Clause
6 *
7 * This file is part of Q3270.
8 * See the LICENSE file in the project root for full license information.
9 */
10
11#ifndef KEYBOARDSTORE_H
12#define KEYBOARDSTORE_H
13
14#include <QMap>
15#include <QStringList>
16#include <QSettings>
17
18#include "Models/KeyboardMap.h"
19
21{
22 public:
23
25
26 const QStringList themeNames() const;
27
28 KeyboardMap getTheme(const QString &name) const;
29
30 void removeTheme(const QString &name);
31
32 void setTheme(const QString &name, const KeyboardMap &map);
33 void setThemes(const QMap<QString, KeyboardMap> &newThemes);
34
35 void saveAllThemes() const;
36
37 private:
38
39 QMap<QString, KeyboardMap> themes;
40
41 mutable QSettings settings;
42
43 void load();
44 void loadFactoryTheme();
45};
46
47#endif // KEYBOARDSTORE_H
Definition KeyboardStore.h:21
void saveAllThemes() const
KeyboardStore::saveToSettings.
Definition KeyboardStore.cpp:82
const QStringList themeNames() const
KeyboardStore::themeNames - return a list of all KeyboardMap names.
Definition KeyboardStore.cpp:161
void removeTheme(const QString &name)
KeyboardStore::removeTheme - remove a named KeyboardMap.
Definition KeyboardStore.cpp:149
KeyboardMap getTheme(const QString &name) const
KeyboardStore::getTheme - return a named KeyboardMap.
Definition KeyboardStore.cpp:179
void setTheme(const QString &name, const KeyboardMap &map)
KeyboardStore::setTheme - insert/update a single keyboard map.
Definition KeyboardStore.cpp:134
KeyboardStore()
KeyboardStore::KeyboardStore - persistence layer for KeyboardMaps.
Definition KeyboardStore.cpp:20
void setThemes(const QMap< QString, KeyboardMap > &newThemes)
KeyboardStore::setThemes - replace the keyboard maps in the store.
Definition KeyboardStore.cpp:110
Definition KeyboardMap.h:26