File indexing completed on 2024-05-19 05:11:07

0001 /*
0002   SPDX-FileCopyrightText: 2013 Sérgio Martins <iamsergio@gmail.com>
0003 
0004   SPDX-License-Identifier: GPL-2.0-or-later WITH Qt-Commercial-exception-1.0
0005 */
0006 
0007 #include "options.h"
0008 
0009 Options::Options() = default;
0010 
0011 void Options::setAction(Options::Action action)
0012 {
0013     m_action = action;
0014 }
0015 
0016 Options::Action Options::action() const
0017 {
0018     return m_action;
0019 }
0020 
0021 QList<Akonadi::Collection::Id> Options::collections() const
0022 {
0023     return m_collectionIds;
0024 }
0025 
0026 void Options::setCollections(const QList<Akonadi::Collection::Id> &collections)
0027 {
0028     m_collectionIds = collections;
0029 }
0030 
0031 bool Options::testCollection(Akonadi::Collection::Id id) const
0032 {
0033     return m_collectionIds.isEmpty() || m_collectionIds.contains(id);
0034 }
0035 
0036 bool Options::stripOldAlarms() const
0037 {
0038     return m_stripOldAlarms;
0039 }
0040 
0041 void Options::setStripOldAlarms(bool strip)
0042 {
0043     m_stripOldAlarms = strip;
0044 }