1 | /* |
---|---|
2 | SPDX-FileCopyrightText: KDE Developers |
3 | |
4 | SPDX-License-Identifier: LGPL-2.0-or-later |
5 | */ |
6 | |
7 | #ifndef KATEVI_CONFIG_TAB_H |
8 | #define KATEVI_CONFIG_TAB_H |
9 | |
10 | #include <dialogs/kateconfigpage.h> |
11 | #include <vimode/mappings.h> |
12 | |
13 | class QTableWidget; |
14 | |
15 | namespace KateVi |
16 | { |
17 | namespace Ui |
18 | { |
19 | class ConfigWidget; |
20 | } |
21 | |
22 | class ConfigTab : public KateConfigPage |
23 | { |
24 | public: |
25 | explicit ConfigTab(QWidget *parent, Mappings *mappings); |
26 | ~ConfigTab() override; |
27 | |
28 | QString name() const override; |
29 | |
30 | protected: |
31 | Ui::ConfigWidget *ui; |
32 | |
33 | private: |
34 | void applyTab(QTableWidget *mappingsTable, Mappings::MappingMode mode); |
35 | void reloadTab(QTableWidget *mappingsTable, Mappings::MappingMode mode); |
36 | |
37 | public: |
38 | void apply() override; |
39 | void reload() override; |
40 | void reset() override; |
41 | void defaults() override; |
42 | |
43 | private: |
44 | void showWhatsThis(const QString &text); |
45 | void addMappingRow(); |
46 | void removeSelectedMappingRows(); |
47 | void importNormalMappingRow(); |
48 | |
49 | private: |
50 | Mappings *m_mappings; |
51 | }; |
52 | } |
53 | |
54 | #endif /* KATEVI_CONFIG_TAB_H */ |
55 |