~ubuntu-branches/ubuntu/quantal/qtmobility/quantal

« back to all changes in this revision

Viewing changes to src/organizer/qorganizeritemfilter.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2010-11-16 16:18:07 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20101116161807-k2dzt2nyse975r3l
Tags: 1.1.0-0ubuntu1
* New upstream release
* Syncronise with Debian, no remaining changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
**
9
9
** $QT_BEGIN_LICENSE:LGPL$
10
10
** Commercial Usage
11
 
** Licensees holding valid Qt Commercial licenses may use this file in
12
 
** accordance with the Qt Solutions Commercial License Agreement provided
13
 
** with the Software or, alternatively, in accordance with the terms
 
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
14
** contained in a written agreement between you and Nokia.
15
15
**
16
16
** GNU Lesser General Public License Usage
33
33
** ensure the GNU General Public License version 3.0 requirements will be
34
34
** met: http://www.gnu.org/copyleft/gpl.html.
35
35
**
36
 
** Please note Third Party Software included with Qt Solutions may impose
37
 
** additional restrictions and it is the user's responsibility to ensure
38
 
** that they have met the licensing requirements of the GPL, LGPL, or Qt
39
 
** Solutions Commercial license and the relevant license of the Third
40
 
** Party Software they are using.
41
 
**
42
36
** If you are unsure which license is appropriate for your use, please
43
37
** contact the sales department at qt-sales@nokia.com.
44
38
** $QT_END_LICENSE$
52
46
#include "qorganizeritemintersectionfilter.h"
53
47
#include "qorganizeritemunionfilter.h"
54
48
 
55
 
#include "qorganizeritemmanager.h"
 
49
#include "qorganizermanager.h"
56
50
 
57
51
 
58
52
 
59
53
/*!
60
54
  \class QOrganizerItemFilter
61
55
  \brief The QOrganizerItemFilter class is used to select organizer items made available
62
 
  through a QOrganizerItemManager.
 
56
  through a QOrganizerManager.
63
57
 
64
58
  \inmodule QtOrganizer
65
59
 
66
60
  \ingroup organizer-main
67
61
 
68
 
  This class is used as a parameter to various functions offered by QOrganizerItemManager, to allow
 
62
  This class is used as a parameter to various functions offered by QOrganizerManager, to allow
69
63
  selection of items which have certain details or properties.
70
64
 */
71
65
 
75
69
  \value InvalidFilter An invalid filter which matches nothing
76
70
  \value OrganizerItemDetailFilter A filter which matches items containing one or more details of a particular definition with a particular value
77
71
  \value OrganizerItemDetailRangeFilter A filter which matches items containing one or more details of a particular definition whose values are within a particular range
78
 
  \value OrganizerItemDateTimePeriodFilter A filter which matches items which occur in a given date/time period
79
72
  \value ChangeLogFilter A filter which matches items whose timestamps have been updated since some particular date and time
80
 
  \omitvalue ActionFilter A filter which matches items for which a particular action is available, or which contain a detail with a particular value for which a particular action is available
81
73
  \value IntersectionFilter A filter which matches all items that are matched by all filters it includes
82
74
  \value UnionFilter A filter which matches any organizer item that is matched by any of the filters it includes
83
 
  \value LocalIdFilter A filter which matches any organizer item whose local id is contained in a particular list of organizer item local ids
 
75
  \value IdFilter A filter which matches any organizer item whose id is contained in a particular list of organizer item ids
 
76
  \value CollectionFilter A filter which matches any organizer item that is matched by collection.
84
77
  \value DefaultFilter A filter which matches everything
85
78
 */
86
79
 
162
155
#ifndef QT_NO_DATASTREAM
163
156
/*!
164
157
 * Writes \a filter to the stream \a out.
 
158
 *
 
159
 * A QOrganizerItemIdFilter will not be preserved if streamed to a QDataStream.
165
160
 */
166
161
QDataStream& operator<<(QDataStream& out, const QOrganizerItemFilter& filter)
167
162
{
174
169
 
175
170
/*!
176
171
 * Reads an organizer item filter from stream \a in into \a filter.
 
172
 *
 
173
 * A QOrganizerItemIdFilter will not be preserved if streamed from a QDataStream.
177
174
 */
178
175
QDataStream& operator>>(QDataStream& in, QOrganizerItemFilter& filter)
179
176
{
201
198
            case QOrganizerItemFilter::UnionFilter:
202
199
                filter = QOrganizerItemUnionFilter();
203
200
                break;
204
 
            case QOrganizerItemFilter::LocalIdFilter:
205
 
                filter = QOrganizerItemLocalIdFilter();
206
 
                break;
207
 
            case QOrganizerItemFilter::OrganizerItemDateTimePeriodFilter:
208
 
                filter = QOrganizerItemDateTimePeriodFilter();
 
201
            case QOrganizerItemFilter::IdFilter:
 
202
                filter = QOrganizerItemIdFilter();
209
203
                break;
210
204
            case QOrganizerItemFilter::DefaultFilter:
211
205
                filter = QOrganizerItemFilter();