Messagelib

themecombobox.h
1 /* SPDX-FileCopyrightText: 2009 James Bendig <[email protected]>
2 
3  SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
4 */
5 #pragma once
6 
7 #include "messagelist_export.h"
8 #include <Akonadi/Collection>
9 #include <QComboBox>
10 #include <memory>
11 namespace MessageList
12 {
13 namespace Core
14 {
15 class StorageModel;
16 class Theme;
17 } // namespace Core
18 
19 namespace Utils
20 {
21 class ThemeComboBoxPrivate;
22 
23 /**
24  * A specialized QComboBox that lists all message list themes.
25  */
26 class MESSAGELIST_EXPORT ThemeComboBox : public QComboBox
27 {
28  Q_OBJECT
29 
30 public:
31  explicit ThemeComboBox(QWidget *parent);
32  ~ThemeComboBox() override;
33 
34  QString currentTheme() const;
35 
36  void writeDefaultConfig() const;
37 
38  void writeStorageModelConfig(MessageList::Core::StorageModel *storageModel, bool isPrivateSetting) const;
39  void writeStorageModelConfig(const QString &id, bool isPrivateSetting) const;
40 
41  void readStorageModelConfig(const Akonadi::Collection &col, bool &isPrivateSetting);
42  void readStorageModelConfig(MessageList::Core::StorageModel *storageModel, bool &isPrivateSetting);
43 
44 public Q_SLOTS:
45  void slotLoadThemes();
46  void selectDefault();
47 
48 private:
49  std::unique_ptr<ThemeComboBoxPrivate> const d;
50 };
51 } // namespace Utils
52 } // namespace MessageList
A specialized QComboBox that lists all message list themes.
Definition: themecombobox.h:26
The QAbstractItemModel based interface that you need to provide for your storage to work with Message...
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Mar 26 2023 04:08:12 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.