85
|
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: caentry.h
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef CAENTRY_H
|
|
19 |
#define CAENTRY_H
|
|
20 |
|
|
21 |
#include <QMap>
|
|
22 |
#include <QSharedDataPointer>
|
86
|
23 |
#include <QSize>
|
85
|
24 |
|
|
25 |
#include "caclient_global.h"
|
|
26 |
#include "cadefs.h"
|
|
27 |
#include "caicondescription.h"
|
|
28 |
|
|
29 |
CA_CLIENT_TEST_CLASS( TestCaClient )
|
|
30 |
|
|
31 |
class CaObjectAdapter;
|
|
32 |
class CaEntryPrivate;
|
86
|
33 |
class HbIcon;
|
85
|
34 |
|
|
35 |
class CACLIENT_EXPORT CaEntry
|
|
36 |
{
|
|
37 |
/*!
|
|
38 |
* This class is not intended to be derived.
|
|
39 |
*/
|
|
40 |
|
|
41 |
public:
|
|
42 |
|
|
43 |
explicit CaEntry(EntryRole entryRole = ItemEntryRole);
|
|
44 |
|
|
45 |
virtual ~CaEntry();
|
|
46 |
|
|
47 |
int id() const;
|
|
48 |
|
|
49 |
QString text() const;
|
|
50 |
void setText(const QString &text);
|
|
51 |
|
|
52 |
QString description() const;
|
|
53 |
void setDescription(const QString &text);
|
|
54 |
|
|
55 |
CaIconDescription iconDescription() const;
|
|
56 |
void setIconDescription(const CaIconDescription &iconDescription);
|
|
57 |
|
|
58 |
EntryFlags flags() const;
|
|
59 |
void setFlags(EntryFlags flags);
|
|
60 |
|
|
61 |
QString entryTypeName() const;
|
|
62 |
void setEntryTypeName(const QString &entryTypeName);
|
|
63 |
|
|
64 |
QMap<QString, QString> attributes() const;
|
|
65 |
|
|
66 |
QString attribute(const QString &name) const;
|
|
67 |
void setAttribute(const QString &name, const QString &value);
|
|
68 |
|
86
|
69 |
HbIcon makeIcon(const QSize &size = QSize(70, 70)) const;
|
85
|
70 |
|
|
71 |
EntryRole role() const;
|
|
72 |
|
|
73 |
CaEntry(const CaEntry &entry);
|
|
74 |
CaEntry &operator=(const CaEntry &entry);
|
|
75 |
|
|
76 |
private:
|
|
77 |
|
|
78 |
void setId(int id);
|
|
79 |
|
|
80 |
private:
|
|
81 |
/*!
|
|
82 |
* A special kind of pointer, supporting sharing data, to a private
|
|
83 |
* implementation.
|
|
84 |
*/
|
|
85 |
QSharedDataPointer<CaEntryPrivate> m_d;
|
|
86 |
|
|
87 |
friend class CaEntryPrivate;
|
|
88 |
friend class ::CaObjectAdapter;
|
|
89 |
|
|
90 |
CA_CLIENT_TEST_FRIEND_CLASS( TestCaClient )
|
|
91 |
|
|
92 |
};
|
|
93 |
|
|
94 |
|
|
95 |
#endif // CAENTRY_H
|