|
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_p.h |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CAQUERY_PRIVATE_H |
|
19 #define CAQUERY_PRIVATE_H |
|
20 |
|
21 #include <QString> |
|
22 #include <QStringList> |
|
23 |
|
24 #include "cadefs.h" |
|
25 |
|
26 class CaQuery; |
|
27 |
|
28 class CaQueryPrivate |
|
29 { |
|
30 public: |
|
31 |
|
32 explicit CaQueryPrivate(CaQuery *queryPublic); |
|
33 CaQueryPrivate &operator=(const CaQueryPrivate &queryPrivate); |
|
34 ~CaQueryPrivate(); |
|
35 |
|
36 EntryRoles entryRoles() const; |
|
37 void setEntryRoles(EntryRoles entryRoles); |
|
38 |
|
39 int parentId() const; |
|
40 void setParentId(int id); |
|
41 |
|
42 int childId() const; |
|
43 void setChildId(int id); |
|
44 |
|
45 QStringList entryTypeNames() const; |
|
46 void setEntryTypeNames(const QStringList &entryTypeNames); |
|
47 |
|
48 void addEntryTypeName(const QString &entryTypeName); |
|
49 |
|
50 void setFlagsOn(const EntryFlags &onFlags); |
|
51 EntryFlags flagsOn() const; |
|
52 void setFlagsOff(const EntryFlags &offFlags); |
|
53 EntryFlags flagsOff() const; |
|
54 |
|
55 void getSort(SortAttribute &sortAttribute, |
|
56 Qt::SortOrder &sortOrder) const; |
|
57 void setSort(SortAttribute sortAttribute, |
|
58 Qt::SortOrder = Qt::AscendingOrder); |
|
59 |
|
60 unsigned int count() const; |
|
61 void setCount(unsigned int count); |
|
62 |
|
63 QMap<QString, QString> attributes() const; |
|
64 QString attribute(const QString &name) const; |
|
65 void setAttribute(const QString &name, const QString &value); |
|
66 void removeAttribute(const QString &name); |
|
67 |
|
68 void clear(); |
|
69 |
|
70 private: |
|
71 |
|
72 CaQuery *const m_q; |
|
73 |
|
74 EntryRoles mEntryRoles; |
|
75 |
|
76 int mParentId; |
|
77 |
|
78 int mChildId; |
|
79 |
|
80 QStringList mEntryTypeNames; |
|
81 |
|
82 EntryFlags mFlagsOn; |
|
83 |
|
84 EntryFlags mFlagsOff; |
|
85 |
|
86 SortAttribute mSortAttribute; |
|
87 |
|
88 Qt::SortOrder mSortOrder; |
|
89 |
|
90 unsigned int mCount; |
|
91 |
|
92 QMap<QString, QString> mAttributes; |
|
93 }; |
|
94 |
|
95 #endif //CAQUERY_PRIVATE_H |