1 | /* |
2 | SPDX-FileCopyrightText: 2001-2010 Christoph Cullmann <cullmann@kde.org> |
3 | |
4 | SPDX-License-Identifier: LGPL-2.0-or-later |
5 | */ |
6 | |
7 | #ifndef KATE_MODECONFIGPAGE_H |
8 | #define KATE_MODECONFIGPAGE_H |
9 | |
10 | #include <QHash> |
11 | #include <QPointer> |
12 | |
13 | #include "katedialogs.h" |
14 | #include "katemodemanager.h" |
15 | |
16 | namespace Ui |
17 | { |
18 | class FileTypeConfigWidget; |
19 | } |
20 | |
21 | class ModeConfigPage : public KateConfigPage |
22 | { |
23 | public: |
24 | explicit ModeConfigPage(QWidget *parent); |
25 | ~ModeConfigPage() override; |
26 | QString name() const override; |
27 | |
28 | public: |
29 | void apply() override; |
30 | void reload() override; |
31 | void reset() override; |
32 | void defaults() override; |
33 | |
34 | private: |
35 | void update(); |
36 | void deleteType(); |
37 | void newType(); |
38 | void typeChanged(int type); |
39 | void showMTDlg(); |
40 | void save(); |
41 | |
42 | private: |
43 | Ui::FileTypeConfigWidget *ui; |
44 | |
45 | QList<KateFileType *> m_types; |
46 | int m_lastType; |
47 | }; |
48 | |
49 | #endif |
50 | |