Messagelib

themecombobox.h
1/* SPDX-FileCopyrightText: 2009 James Bendig <james@imptalk.com>
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>
11namespace MessageList
12{
13namespace Core
14{
15class StorageModel;
16class Theme;
17} // namespace Core
18
19namespace Utils
20{
21class ThemeComboBoxPrivate;
22
23/**
24 * A specialized QComboBox that lists all message list themes.
25 */
26class MESSAGELIST_EXPORT ThemeComboBox : public QComboBox
27{
28 Q_OBJECT
29
30public:
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
44public Q_SLOTS:
45 void slotLoadThemes();
46 void selectDefault();
47
48private:
49 std::unique_ptr<ThemeComboBoxPrivate> const d;
50};
51} // namespace Utils
52} // namespace MessageList
The QAbstractItemModel based interface that you need to provide for your storage to work with Message...
A specialized QComboBox that lists all message list themes.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:33:26 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.