1 /*
2     SPDX-License-Identifier: GPL-2.0-or-later
3 
4     SPDX-FileCopyrightText: 2005 Ismail Donmez <ismail@kde.org>
5     SPDX-FileCopyrightText: 2006 Dario Abatianni <eisfuchs@tigress.com>
6     SPDX-FileCopyrightText: 2006 John Tapsell <johnflux@gmail.com>
7     SPDX-FileCopyrightText: 2007 Eike Hein <hein@kde.org>
8 */
9 
10 #ifndef THEME_CONFIG_H
11 #define THEME_CONFIG_H
12 
13 #include "ui_theme_configui.h"
14 #include "settingspage.h"
15 
16 #include <KIO/Job>
17 
18 
19 class Theme_Config : public QWidget, public KonviSettingsPage, private Ui::Theme_ConfigUI
20 {
21     Q_OBJECT
22 
23     public:
24         explicit Theme_Config(QWidget* parent, const char* name = nullptr);
25         ~Theme_Config() override;
26 
27         void restorePageToDefaults() override;
28         void saveSettings() override;
29         void loadSettings() override;
30 
31         bool hasChanged() override;
32 
33     Q_SIGNALS:
34         void modified();
35 
36     private Q_SLOTS:
37         void updatePreview(int id);
38         void updateButtons();
39         void installTheme();
40         void removeTheme();
41         void gotNewSchemes();
42         void postRemoveTheme(KJob* delete_job);
43 
44     private:
45         QStringList m_dirs;
46         QString m_oldTheme;
47         QString m_currentTheme;
48         int m_defaultThemeIndex;
49 
50         Q_DISABLE_COPY(Theme_Config)
51 };
52 
53 #endif
54