|
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 "hswidgetcomponentregistry.h" |
|
19 #include "hswidgetcomponent.h" |
|
20 #include "hswidgetcomponentdescriptor.h" |
|
21 #include "caentry.h" |
|
22 #include "hsscene.h" |
|
23 |
|
24 #include <HbMainWindow> |
|
25 #include <QCoreApplication> |
|
26 |
|
27 HsWidgetComponentRegistry *HsWidgetComponentRegistry::mInstance = 0; |
|
28 |
|
29 |
|
30 /*! |
|
31 |
|
32 */ |
|
33 HsWidgetComponentRegistry* HsWidgetComponentRegistry::instance() |
|
34 { |
|
35 if (!mInstance) { |
|
36 mInstance = new HsWidgetComponentRegistry; |
|
37 mInstance->setParent(QCoreApplication::instance()); |
|
38 } |
|
39 return mInstance; |
|
40 } |
|
41 |
|
42 /*! |
|
43 |
|
44 */ |
|
45 HsWidgetComponentRegistry::~HsWidgetComponentRegistry() |
|
46 { |
|
47 qDeleteAll(mRegistry); |
|
48 } |
|
49 |
|
50 /*! |
|
51 */ |
|
52 HsWidgetComponent *HsWidgetComponentRegistry::component(const QString &uri) |
|
53 { |
|
54 return new HsWidgetComponent(uri); |
|
55 } |
|
56 |
|
57 /*! |
|
58 */ |
|
59 void HsWidgetComponentRegistry::uninstallComponent(const HsWidgetComponentDescriptor &componentDescriptor) |
|
60 { |
|
61 Q_UNUSED(componentDescriptor); |
|
62 } |
|
63 |
|
64 /*! |
|
65 |
|
66 */ |
|
67 HsWidgetComponentRegistry::HsWidgetComponentRegistry(QObject *parent) |
|
68 : QObject(parent) |
|
69 { |
|
70 } |
|
71 |
|
72 /*! |
|
73 |
|
74 */ |
|
75 void HsWidgetComponentRegistry::handleEntryAdded(const CaEntry &entry, const QString &uri) |
|
76 { |
|
77 Q_UNUSED(entry); |
|
78 Q_UNUSED(uri); |
|
79 } |
|
80 |
|
81 /*! |
|
82 */ |
|
83 void HsWidgetComponentRegistry::handleEntryRemoved(const CaEntry &entry, const QString &uri) |
|
84 { |
|
85 Q_UNUSED(entry); |
|
86 Q_UNUSED(uri); |
|
87 } |
|
88 |
|
89 /*! |
|
90 |
|
91 */ |
|
92 void HsWidgetComponentRegistry::handleEntryUpdated(const CaEntry &entry, const QString &uri) |
|
93 { |
|
94 Q_UNUSED(entry); |
|
95 Q_UNUSED(uri); |
|
96 } |
|
97 |
|
98 /*! |
|
99 |
|
100 */ |
|
101 void HsWidgetComponentRegistry::registerService(const CaEntry &entry, const QString& uri, bool reset) |
|
102 { |
|
103 Q_UNUSED(entry); |
|
104 Q_UNUSED(uri); |
|
105 Q_UNUSED(reset); |
|
106 } |
|
107 |
|
108 /*! |
|
109 |
|
110 */ |
|
111 void HsWidgetComponentRegistry::onEntryChanged(const CaEntry &entry, ChangeType changeType) |
|
112 { |
|
113 Q_UNUSED(entry); |
|
114 Q_UNUSED(changeType); |
|
115 } |