Akonadi

etmviewstatesaver.h
1 /*
2  SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB,
3  a KDAB Group company, [email protected]
4  SPDX-FileContributor: Stephen Kelly <[email protected]>
5 
6  SPDX-License-Identifier: LGPL-2.0-or-later
7 */
8 
9 #pragma once
10 
11 #include <KConfigViewStateSaver>
12 
13 // AkonadiCore
14 #include <akonadi/collection.h>
15 #include <akonadi/item.h>
16 
17 #include "akonadiwidgets_export.h"
18 
19 namespace Akonadi
20 {
21 class AKONADIWIDGETS_EXPORT ETMViewStateSaver : public KConfigViewStateSaver // krazy:exclude=dpointer
22 {
23  Q_OBJECT
24 public:
25  explicit ETMViewStateSaver(QObject *parent = nullptr);
26 
27  void selectCollections(const Akonadi::Collection::List &list);
28  void selectCollections(const QList<Akonadi::Collection::Id> &list);
29  void selectItems(const Akonadi::Item::List &list);
30  void selectItems(const QList<Akonadi::Item::Id> &list);
31 
32  void setCurrentItem(const Akonadi::Item &item);
33  void setCurrentCollection(const Akonadi::Collection &collection);
34 
35 protected:
36  /* reimp */
37  QModelIndex indexFromConfigString(const QAbstractItemModel *model, const QString &key) const override;
38  QString indexToConfigString(const QModelIndex &index) const override;
39 };
40 
41 }
42 
Represents a collection of PIM items.
Definition: collection.h:61
Definition: item.h:32
Represents a PIM item stored in Akonadi storage.
Definition: item.h:104
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jun 30 2022 03:51:46 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.