Q3270
A Qt-based 3270 Terminal Emulator
Loading...
Searching...
No Matches
KeyboardMapWidget.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 KEYBOARDMAPWIDGET_H
12#define KEYBOARDMAPWIDGET_H
13
14#include <QWidget>
15#include <QTableWidget>
16
17#include "Models/KeyboardMap.h"
18
19namespace Ui
20{
22}
23
24class KeyboardMapWidget : public QWidget
25{
26 Q_OBJECT
27
28 public:
29 explicit KeyboardMapWidget(QWidget *parent = nullptr);
31
32 void setTheme(const KeyboardMap &map);
33
34 QString functionNameForRow(int row) const;
35 QStringList mappingsForRow(int row) const;
36
38
39 signals:
40
41 void mappingClicked(int row, const QString &functionName, const QStringList &mappings);
42
43 private slots:
44 void handleItemClicked(QTableWidgetItem *item);
45
46
47 private:
48 Ui::KeyboardMapWidget *ui;
49};
50
51#endif // KEYBOARDMAPWIDGET_H
Definition KeyboardMapWidget.h:25
void setTheme(const KeyboardMap &map)
KeyboardMapWidget::setTheme - set the keyboard map to display.
Definition KeyboardMapWidget.cpp:50
QStringList mappingsForRow(int row) const
KeyboardMapWidget::mappingsForRow - get the key mappings for a given row.
Definition KeyboardMapWidget.cpp:87
~KeyboardMapWidget()
KeyboardMapWidget::~KeyboardMapWidget - destructor.
Definition KeyboardMapWidget.cpp:39
KeyboardMap currentMappings() const
KeyboardMapWidget::currentMappings - get the current keyboard map from the table.
Definition KeyboardMapWidget.cpp:118
QString functionNameForRow(int row) const
KeyboardMapWidget::functionNameForRow - get the function name for a given row.
Definition KeyboardMapWidget.cpp:72
Definition KeyboardMap.h:26