1
/****************************************************************************
3
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
4
** All rights reserved.
5
** Contact: Nokia Corporation (qt-info@nokia.com)
7
** This file is part of the Qt Mobility Components.
9
** $QT_BEGIN_LICENSE:LGPL$
11
** Licensees holding valid Qt Commercial licenses may use this file in
12
** accordance with the Qt Commercial License Agreement provided with
13
** the Software or, alternatively, in accordance with the terms
14
** contained in a written agreement between you and Nokia.
16
** GNU Lesser General Public License Usage
17
** Alternatively, this file may be used under the terms of the GNU Lesser
18
** General Public License version 2.1 as published by the Free Software
19
** Foundation and appearing in the file LICENSE.LGPL included in the
20
** packaging of this file. Please review the following information to
21
** ensure the GNU Lesser General Public License version 2.1 requirements
22
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24
** In addition, as a special exception, Nokia gives you certain additional
25
** rights. These rights are described in the Nokia Qt LGPL Exception
26
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28
** GNU General Public License Usage
29
** Alternatively, this file may be used under the terms of the GNU
30
** General Public License version 3.0 as published by the Free Software
31
** Foundation and appearing in the file LICENSE.GPL included in the
32
** packaging of this file. Please review the following information to
33
** ensure the GNU General Public License version 3.0 requirements will be
34
** met: http://www.gnu.org/copyleft/gpl.html.
36
** If you are unsure which license is appropriate for your use, please
37
** contact the sales department at qt-sales@nokia.com.
40
****************************************************************************/
42
#include "qorganizeritemidfilter.h"
43
#include "qorganizeritemidfilter_p.h"
44
#include "qorganizeritemfilter_p.h"
45
#include "qorganizermanager.h"
50
\class QOrganizerItemIdFilter
51
\brief The QOrganizerItemIdFilter class provides a filter based around a list of organizer item ids
53
\ingroup organizer-filters
55
It may be used to select organizer items whose ids are contained in the given list of ids.
57
Note: a QOrganizerItemIdFilter will not be preserved if streamed to a QDataStream.
60
Q_IMPLEMENT_ORGANIZERITEMFILTER_PRIVATE(QOrganizerItemIdFilter);
63
* \fn QOrganizerItemIdFilter::QOrganizerItemIdFilter(const QOrganizerItemFilter& other)
64
* Constructs a copy of \a other if possible, otherwise constructs a new organizer item id filter
68
* Constructs a new organizer item id filter
70
QOrganizerItemIdFilter::QOrganizerItemIdFilter()
71
: QOrganizerItemFilter(new QOrganizerItemIdFilterPrivate)
76
* Sets the list which contains the ids of possible matching organizer items to \a ids
79
void QOrganizerItemIdFilter::setIds(const QList<QOrganizerItemId>& ids)
81
Q_D(QOrganizerItemIdFilter);
86
* Inserts the id \a id into the list which contains the ids of possible matching items
89
void QOrganizerItemIdFilter::insert(const QOrganizerItemId& id)
91
Q_D(QOrganizerItemIdFilter);
92
if (!d->m_ids.contains(id))
97
* Removes the id \a id from the list which contains the ids of possible matching items,
98
* if it is contained in the list, otherwise has no effect.
101
void QOrganizerItemIdFilter::remove(const QOrganizerItemId& id)
103
Q_D(QOrganizerItemIdFilter);
104
d->m_ids.removeAll(id);
108
* Clears the list which contains the ids of possible matching items.
109
* A id filter with a cleared list will match no items.
112
void QOrganizerItemIdFilter::clear()
114
Q_D(QOrganizerItemIdFilter);
119
* Returns the list of ids of organizer items which match this filter
122
QList<QOrganizerItemId> QOrganizerItemIdFilter::ids() const
124
Q_D(const QOrganizerItemIdFilter);