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 
19 class QMenu;
20 class KXmlGuiWindow;
21 
22 namespace KSTheme
23 {
24 
25 class Manager : public QObject
26 {
27  Q_OBJECT
28 
29 public:
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 
47 signals:
48 
49  void signalThemeChanged();
50 
51 private Q_SLOTS:
52 
53  void slotChangePalette();
54  void slotSettingsChanged();
55 
56 private:
57 
58  Manager();
59 
60  void populateThemeMenu();
61  QPixmap createSchemePreviewIcon(const KSharedConfigPtr& config) const;
62  QString currentDesktopdefaultTheme() const;
63  void updateCurrentDesktopDefaultThemePreview();
64 
65 private:
66 
67  friend class ThemeManagerCreator;
68 
69  class Private;
70  Private* const d;
71 };
72 
73 }
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
Primary class to handle all Ekos modules. The Ekos Manager class manages startup and shutdown of INDI...
Definition: manager.h:52
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Fri Aug 19 2022 03:57:55 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.