equal
deleted
inserted
replaced
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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef QCONTACTDETAIL_H |
|
19 #define QCONTACTDETAIL_H |
|
20 |
|
21 #include "qtcontactsglobal.h" |
|
22 |
|
23 #include <QString> |
|
24 |
|
25 |
|
26 class QContactDetail |
|
27 { |
|
28 public: |
|
29 QContactDetail(); |
|
30 QContactDetail(const QString& definitionName); |
|
31 virtual ~QContactDetail(); |
|
32 QContactDetail(const QContactDetail& other); |
|
33 QContactDetail& operator=(const QContactDetail& other); |
|
34 QString value(const QString& key) const; |
|
35 QString definitionName() const; |
|
36 public: //for testing |
|
37 void setValue(const QString& value); |
|
38 |
|
39 |
|
40 |
|
41 private: |
|
42 QString mValue; |
|
43 QString mDefinition; |
|
44 |
|
45 }; |
|
46 |
|
47 |
|
48 |
|
49 #define Q_DECLARE_CUSTOM_CONTACT_DETAIL(className, definitionNameString) \ |
|
50 className() : QContactDetail(DefinitionName) {}\ |
|
51 Q_DECLARE_LATIN1_LITERAL(DefinitionName, definitionNameString); |
|
52 |
|
53 #define Q_IMPLEMENT_CUSTOM_CONTACT_DETAIL(className, definitionNameString) \ |
|
54 Q_DEFINE_LATIN1_LITERAL(className::DefinitionName, definitionNameString) |
|
55 |
|
56 #endif //qcontactdetail |
|
57 |
|
58 |
|
59 |
|