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 #include <QDebug> |
|
19 #include "qcontactdetail.h" |
|
20 #include "qcontactname.h" |
|
21 #include "qcontactphonenumber.h" |
|
22 |
|
23 Q_DEFINE_LATIN1_LITERAL(QContactName::DefinitionName, "Name"); |
|
24 Q_DEFINE_LATIN1_LITERAL(QContactPhoneNumber::DefinitionName, "PhoneNumber"); |
|
25 Q_DEFINE_LATIN1_LITERAL(QContactPhoneNumber::FieldNumber, "PhoneNumber"); |
|
26 Q_DEFINE_LATIN1_LITERAL(QContactName::FieldFirst, "First"); |
|
27 Q_DEFINE_LATIN1_LITERAL(QContactName::FieldLast, "Last"); |
|
28 // ============================ MEMBER FUNCTIONS =============================== |
|
29 |
|
30 // ----------------------------------------------------------------------------- |
|
31 // QContactDetail::QContactDetail |
|
32 // ----------------------------------------------------------------------------- |
|
33 // |
|
34 QContactDetail::QContactDetail() |
|
35 { |
|
36 } |
|
37 // ----------------------------------------------------------------------------- |
|
38 // QContactDetail::QContactDetail |
|
39 // ----------------------------------------------------------------------------- |
|
40 // |
|
41 QContactDetail::QContactDetail(const QString& definitionName) |
|
42 { |
|
43 mDefinition = definitionName; |
|
44 } |
|
45 // ----------------------------------------------------------------------------- |
|
46 // D'tor |
|
47 // ----------------------------------------------------------------------------- |
|
48 // |
|
49 QContactDetail::~QContactDetail() |
|
50 { |
|
51 } |
|
52 |
|
53 QString QContactDetail::definitionName () const |
|
54 { |
|
55 return mDefinition; |
|
56 } |
|
57 // ----------------------------------------------------------------------------- |
|
58 // Copy c'tor |
|
59 // ----------------------------------------------------------------------------- |
|
60 // |
|
61 QContactDetail::QContactDetail(const QContactDetail& other) |
|
62 { |
|
63 mValue = other.value(""); |
|
64 } |
|
65 // ----------------------------------------------------------------------------- |
|
66 // Operator = |
|
67 // ----------------------------------------------------------------------------- |
|
68 // |
|
69 QContactDetail& QContactDetail::operator=(const QContactDetail& other) |
|
70 { |
|
71 mValue = other.value(""); |
|
72 return *this; |
|
73 } |
|
74 // ----------------------------------------------------------------------------- |
|
75 // QContactDetail |
|
76 // ----------------------------------------------------------------------------- |
|
77 // |
|
78 QString QContactDetail::value(const QString& key) const |
|
79 { |
|
80 Q_UNUSED(key) |
|
81 return mValue; |
|
82 } |
|
83 |
|
84 // ----------------------------------------------------------------------------- |
|
85 // QContactDetail |
|
86 // ----------------------------------------------------------------------------- |
|
87 // |
|
88 void QContactDetail::setValue(const QString& value) |
|
89 { |
|
90 mValue = value; |
|
91 } |
|