File indexing completed on 2025-01-05 04:59:50

0001 /*
0002  * SPDX-FileCopyrightText: 2015 Kevin Ottens <ervin@kde.org>
0003  * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0004  */
0005 
0006 
0007 #ifndef TESTLIB_GENCOLLECTION_H
0008 #define TESTLIB_GENCOLLECTION_H
0009 
0010 #include <QObject>
0011 
0012 #include <Akonadi/Collection>
0013 
0014 namespace Testlib {
0015 
0016 class GenCollection
0017 {
0018 public:
0019     explicit GenCollection(const Akonadi::Collection &collection = Akonadi::Collection());
0020 
0021     operator Akonadi::Collection();
0022 
0023     GenCollection &withId(Akonadi::Collection::Id id);
0024     GenCollection &withParent(Akonadi::Collection::Id id);
0025     GenCollection &withRootAsParent();
0026     GenCollection &withName(const QString &name);
0027     GenCollection &withIcon(const QString &iconName);
0028     GenCollection &selected(bool value = true);
0029     GenCollection &withTaskContent(bool value = true);
0030     GenCollection &withNoteContent(bool value = true);
0031 
0032 private:
0033     Akonadi::Collection m_collection;
0034 };
0035 
0036 }
0037 
0038 #endif // TESTLIB_GENCOLLECTION_H