|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: caquery.h |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CAQUERY_H |
|
19 #define CAQUERY_H |
|
20 |
|
21 #include <QStringList> |
|
22 #include "caclient_global.h" |
|
23 #include "cadefs.h" |
|
24 |
|
25 class CaQueryPrivate; |
|
26 |
|
27 class CACLIENT_EXPORT CaQuery |
|
28 { |
|
29 |
|
30 public: |
|
31 |
|
32 CaQuery(); |
|
33 CaQuery(const CaQuery &query); |
|
34 CaQuery &operator=(const CaQuery &query); |
|
35 ~CaQuery(); |
|
36 |
|
37 void setEntryRoles(EntryRoles entryRoles); |
|
38 EntryRoles entryRoles() const; |
|
39 |
|
40 void setParentId(int id); |
|
41 int parentId() const; |
|
42 |
|
43 void setChildId(int id); |
|
44 int childId() const; |
|
45 |
|
46 void setEntryTypeNames(const QStringList &entryTypeNames); |
|
47 QStringList entryTypeNames() const; |
|
48 |
|
49 void addEntryTypeName(const QString &entryTypeName); |
|
50 |
|
51 void setFlagsOn(const EntryFlags &onFlags); |
|
52 EntryFlags flagsOn() const; |
|
53 void setFlagsOff(const EntryFlags &offFlags); |
|
54 EntryFlags flagsOff() const; |
|
55 |
|
56 void setSort(SortAttribute sortAttribute, |
|
57 Qt::SortOrder sortOrder = Qt::AscendingOrder); |
|
58 void getSort(SortAttribute& sortAttribute, |
|
59 Qt::SortOrder& sortOrder) const; |
|
60 |
|
61 unsigned int count() const; |
|
62 void setCount(unsigned int count); |
|
63 |
|
64 QMap<QString, QString> attributes() const; |
|
65 QString attribute(const QString &name) const; |
|
66 void setAttribute(const QString &name, const QString &value); |
|
67 void removeAttribute(const QString &name); |
|
68 |
|
69 void clear(); |
|
70 |
|
71 private: |
|
72 |
|
73 /** |
|
74 * Pointer to a private implementation. |
|
75 */ |
|
76 CaQueryPrivate * const m_d; |
|
77 friend class CaQueryPrivate; |
|
78 |
|
79 }; |
|
80 |
|
81 #endif // CAQUERY_H |