Messagelib

aggregationcombobox.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 namespace MessageList
11 {
12 namespace Core
13 {
14 class Aggregation;
15 class StorageModel;
16 }
17 
18 namespace Utils
19 {
20 class AggregationComboBoxPrivate;
21 /**
22  * A specialized QComboBox that lists all message list aggregations.
23  */
24 class MESSAGELIST_EXPORT AggregationComboBox : public QComboBox
25 {
26  Q_OBJECT
27 
28 public:
29  explicit AggregationComboBox(QWidget *parent);
30  ~AggregationComboBox() override;
31 
32  Q_REQUIRED_RESULT 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 
43 public Q_SLOTS:
44  void selectDefault();
45  void slotLoadAggregations();
46 
47 private:
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-2022 The KDE developers.
Generated on Thu May 26 2022 03:52:53 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.