|
1 /* |
|
2 * Copyright (c) 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: Filter Model class for Events management UI start-up view. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CEVTMGMTUIFILTERMODEL_H |
|
20 #define CEVTMGMTUIFILTERMODEL_H |
|
21 |
|
22 // SYSTEM INCLUDES |
|
23 #include <e32base.h> // CBase |
|
24 #include <bamdesca.h> // MDesCArray |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CAknSearchField; |
|
28 |
|
29 /** |
|
30 * Events Management UI start-up view listbox Filter model |
|
31 * |
|
32 * @lib evtmgmtui.exe |
|
33 * @since S60 v5.0 |
|
34 */ |
|
35 class CEvtMgmtUiFilterModel : public CBase, public MDesCArray |
|
36 { |
|
37 public: |
|
38 |
|
39 /** |
|
40 * Virtual destructor |
|
41 */ |
|
42 virtual ~CEvtMgmtUiFilterModel(); |
|
43 |
|
44 /** |
|
45 * Static Two phase constructor |
|
46 * |
|
47 * @return CEvtMgmtUiFilterModel*, Pointer to the newly created object. |
|
48 */ |
|
49 static CEvtMgmtUiFilterModel* NewLC(); |
|
50 |
|
51 /** |
|
52 * Static Two phase constructor |
|
53 * |
|
54 * @return CEvtMgmtUiFilterModel*, Pointer to the newly created object. |
|
55 */ |
|
56 static CEvtMgmtUiFilterModel* NewL(); |
|
57 |
|
58 protected: |
|
59 /** |
|
60 * Default constructor |
|
61 */ |
|
62 CEvtMgmtUiFilterModel(); |
|
63 |
|
64 /** |
|
65 * Two phased constructor |
|
66 */ |
|
67 void ConstructL(); |
|
68 |
|
69 public: |
|
70 /** |
|
71 * Set the Item text Array |
|
72 */ |
|
73 void SetItemTextArray(MDesCArray* aActualItemTextArray); |
|
74 |
|
75 /** |
|
76 * Set the Search Field |
|
77 */ |
|
78 void SetSearchField(CAknSearchField* aSearchField); |
|
79 |
|
80 /** |
|
81 * Returns the String at zero index. |
|
82 */ |
|
83 TPtrC16 GetZeroIndex(); |
|
84 |
|
85 /** |
|
86 * Inherited from MDesCArray |
|
87 */ |
|
88 TInt MdcaCount() const; |
|
89 |
|
90 /** |
|
91 * Inherited from MDesCArray |
|
92 */ |
|
93 TPtrC16 MdcaPoint( TInt aIndex ) const; |
|
94 |
|
95 private: |
|
96 |
|
97 /** |
|
98 * Obtain the current Search text. |
|
99 */ |
|
100 void GetSearchTextL(HBufC*& aString) const; |
|
101 |
|
102 /** |
|
103 * Update the text based on search string. |
|
104 */ |
|
105 void UpdateTextL() const; |
|
106 |
|
107 |
|
108 private: |
|
109 /** |
|
110 * events array |
|
111 * Owns |
|
112 */ |
|
113 CAknSearchField* iSearchField; |
|
114 |
|
115 /** |
|
116 * events array |
|
117 * Owns |
|
118 */ |
|
119 MDesCArray* iActualItemTextArray; |
|
120 |
|
121 HBufC* iBuffer; |
|
122 }; |
|
123 |
|
124 #endif // CEVTMGMTUIFILTERMODEL_H |
|
125 // End of File |