Messagelib

aggregationcombobox.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>
10namespace MessageList
11{
12namespace Core
13{
14class Aggregation;
15class StorageModel;
16}
17
18namespace Utils
19{
20class AggregationComboBoxPrivate;
21/**
22 * A specialized QComboBox that lists all message list aggregations.
23 */
24class MESSAGELIST_EXPORT AggregationComboBox : public QComboBox
25{
26 Q_OBJECT
27
28public:
29 explicit AggregationComboBox(QWidget *parent);
30 ~AggregationComboBox() override;
31
32 [[nodiscard]] QString currentAggregation() const;
33
34 void writeDefaultConfig() const;
35
36 void writeStorageModelConfig(MessageList::Core::StorageModel *storageModel, bool isPrivateSetting) const;
37 void writeStorageModelConfig(const QString &id, bool isPrivateSetting) const;
38
39 void readStorageModelConfig(MessageList::Core::StorageModel *storageModel, bool &isPrivateSetting);
40 void readStorageModelConfig(const Akonadi::Collection &col, bool &isPrivateSetting);
41 void readStorageModelConfig(const QString &id, bool &isPrivateSetting);
42
43public Q_SLOTS:
44 void selectDefault();
45 void slotLoadAggregations();
46
47private:
48 std::unique_ptr<AggregationComboBoxPrivate> const d;
49};
50} // namespace Utils
51} // 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 aggregations.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:12 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.