1 /* |
|
2 * Copyright (c) 2007-2008 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: Interface for model base |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef I_MULMODELBASE_H |
|
20 #define I_MULMODELBASE_H |
|
21 |
|
22 //Includes |
|
23 |
|
24 namespace Alf |
|
25 { |
|
26 // Forward Declaration |
|
27 class IMulModelAccessor; |
|
28 |
|
29 |
|
30 /*! @class IMulModelBase |
|
31 * @brief An interface for common data model's base class. |
|
32 * |
|
33 * Client can query Accessor() interface from this class |
|
34 * and can set Accessor to Multi-item Widgets. |
|
35 * |
|
36 * <b>Note:</b> <b><i>There has been a change in the way multi-item widget accesses |
|
37 * the data model (for other widgets continue to set the model to the widget in the same way). |
|
38 * The widget gets a restrictive access to the data model via IMulModelAccessor |
|
39 * interface. The new way of assigning model to the widget is shown in the |
|
40 * example given below. The client applications can't access the IMulModelAccessor |
|
41 * interface anymore as its not export from now on.</i></b> |
|
42 * |
|
43 */ |
|
44 class IMulModelBase |
|
45 { |
|
46 public: |
|
47 |
|
48 /** |
|
49 * Return pointer of accessor interface. |
|
50 * This pointer is required to call SetModel Api IMulWidget. |
|
51 * Ownership of Accessor is not transferred. |
|
52 * |
|
53 * @return IMulModelAccessor Accessor interface. |
|
54 * <B>Examples:</b> |
|
55 * @code |
|
56 * Create the data model using widget factory and assign it to a widget. |
|
57 * |
|
58 * mWidgetModel = widgetFactory.createModel<IMulModel> (KLoadNameModel); |
|
59 * |
|
60 * Set the default visualization for the list items. If the visualization is not |
|
61 * specified there will be a panic when the model is assigned to the widget. |
|
62 * |
|
63 * mWidgetModel->SetTemplate( UString ( mulwidget::KTemplate6)); |
|
64 * |
|
65 * Setting the data model to the widget. |
|
66 * |
|
67 * AddItems(10); |
|
68 * mListWidget->SetModel( mWidgetModel); |
|
69 * @endcode |
|
70 */ |
|
71 virtual IMulModelAccessor* Accessor() = 0 ; |
|
72 |
|
73 }; //End of class |
|
74 |
|
75 } // namespace Alf |
|
76 |
|
77 #endif // I_MULMODELBASE_H |
|
78 |
|
79 //End of file |
|
80 |
|