Kstars

thememanager.h
1/*
2 This file is a part of digiKam project
3 https://www.digikam.org
4
5 SPDX-FileCopyrightText: 2006-2018 Gilles Caulier <caulier dot gilles at gmail dot com>
6
7 SPDX-License-Identifier: GPL-2.0-or-later
8*/
9
10#pragma once
11
12#include <ksharedconfig.h>
13
14#include <QObject>
15#include <QPixmap>
16#include <QString>
17#include <QListWidget>
18
19class QMenu;
20class KXmlGuiWindow;
21
22namespace KSTheme
23{
24
25class Manager : public QObject
26{
28
29public:
30
31 typedef enum { BREEZE_THEME, BREEZE_DARK_THEME } IconTheme;
32
33 ~Manager();
34 static Manager* instance();
35
36 QString currentThemeName() const;
37 void setCurrentTheme(const QString& name);
38
39 QString defaultThemeName() const;
40
41 void setThemeMenuAction(QMenu* const action);
42 void registerThemeActions(KXmlGuiWindow * const win);
43 void populateThemeQListWidget(QListWidget *themeWidget);
44
45 void setIconTheme(IconTheme theme);
46
47signals:
48
49 void signalThemeChanged();
50
51private Q_SLOTS:
52
53 void slotChangePalette();
54 void slotSettingsChanged();
55
56private:
57
58 Manager();
59
60 void populateThemeMenu();
61 QPixmap createSchemePreviewIcon(const KSharedConfigPtr& config) const;
62 QString currentDesktopdefaultTheme() const;
63 void updateCurrentDesktopDefaultThemePreview();
64
65private:
66
67 friend class ThemeManagerCreator;
68
69 class Private;
70 Private* const d;
71};
72
73}
Primary class to handle all Ekos modules.
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:38:42 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.