1 /* |
|
2 * Copyright (c) 2010 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: Qt search document field APIs |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef _QCPIXDOCUMENTFIELD_H |
|
19 #define _QCPIXDOCUMENTFIELD_H |
|
20 |
|
21 #ifdef BUILD_DLL |
|
22 #define DLL_EXPORT Q_DECL_EXPORT |
|
23 #else |
|
24 #define DLL_EXPORT Q_DECL_IMPORT |
|
25 #endif |
|
26 |
|
27 /** |
|
28 * @file |
|
29 * @ingroup Qt Search ClientAPI |
|
30 * @brief Contains CCPixDocument field APIs |
|
31 */ |
|
32 |
|
33 #include <QObject> |
|
34 |
|
35 //Forward decelaration |
|
36 class QCPixDocumentFieldPrivate; |
|
37 |
|
38 /** |
|
39 * @brief Represents the fields of documents returned as a result of a search query. |
|
40 * @ingroup ClientAPI |
|
41 * |
|
42 * Link against: QCPixSearchClient.lib |
|
43 */ |
|
44 class DLL_EXPORT QCPixDocumentField: public QObject |
|
45 { |
|
46 Q_OBJECT |
|
47 public: |
|
48 /** |
|
49 * Constructor. |
|
50 * Creates a QCPixDocumentField object and return a pointer to the created object. |
|
51 * @param aName Name of the field |
|
52 * @param aValue Value of the field |
|
53 * @param aConfig Config for the field |
|
54 * @return A pointer to the created instance of QCPixDocumentField. |
|
55 * |
|
56 * @note After using this constructor, the client has to mandatorily call |
|
57 * SetDatabase() before invoking any search. |
|
58 */ |
|
59 static QCPixDocumentField* newInstance( const QString aName, const QString aValue, const int aConfig ); |
|
60 |
|
61 /** |
|
62 * Destructor. |
|
63 */ |
|
64 virtual ~QCPixDocumentField(); |
|
65 |
|
66 /** |
|
67 * Getter: Gets the name of the field. |
|
68 * @return The name of the field |
|
69 */ |
|
70 QString name() const; |
|
71 |
|
72 /** |
|
73 * Getter: Gets the Value of the field. |
|
74 * @return The value of the field |
|
75 */ |
|
76 QString value() const; |
|
77 |
|
78 /** |
|
79 * Getter: Gets the Config of the field. |
|
80 * @return The config of the field |
|
81 */ |
|
82 int config() const; |
|
83 |
|
84 /** |
|
85 * Setter: Sets the Name of the field. |
|
86 * @param aName The name of the field |
|
87 */ |
|
88 void setName(const QString aName); |
|
89 |
|
90 /** |
|
91 * Setter: Sets the Value of the field. |
|
92 * @param aValue The value of the field |
|
93 */ |
|
94 void setValue(const QString aValue); |
|
95 |
|
96 /** |
|
97 * Setter: Sets the Name of the field. |
|
98 * @param aConfig The config of the field |
|
99 */ |
|
100 void setConfig(const int aConfig); |
|
101 |
|
102 private: |
|
103 /** |
|
104 * Constructor. |
|
105 * Creates a QCPixDocumentField object and return a pointer to the created object. |
|
106 * @param aName Name of the field |
|
107 * @param aValue Value of the field |
|
108 * @param aConfig Config for the field |
|
109 * @return A pointer to the created instance of QCPixDocumentField. |
|
110 */ |
|
111 QCPixDocumentField(const QString aName, const QString aValue, const int aConfig); |
|
112 |
|
113 private: |
|
114 QCPixDocumentFieldPrivate* const iPvtImpl; |
|
115 Q_DECLARE_PRIVATE_D( iPvtImpl, QCPixDocumentField ) |
|
116 }; |
|
117 |
|
118 #endif //_QCPIXDOCUMENTFIELD_H |
|