|
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 #ifndef MEMSPYVIEWFBSERVBITMAPS_H |
|
19 #define MEMSPYVIEWFBSERVBITMAPS_H |
|
20 |
|
21 // System includes |
|
22 #include <coecntrl.h> |
|
23 #include <aknlists.h> |
|
24 #include <eikimage.h> |
|
25 #include <AknDialog.h> |
|
26 |
|
27 // User includes |
|
28 #include "MemSpyViewBase.h" |
|
29 |
|
30 // Engine includes |
|
31 #include <memspy/engine/memspyenginehelperfbserv.h> |
|
32 |
|
33 |
|
34 |
|
35 class CMemSpyViewFBServBase : public CMemSpyViewBase |
|
36 { |
|
37 public: |
|
38 CMemSpyViewFBServBase( CMemSpyEngine& aEngine, MMemSpyViewObserver& aObserver, CMemSpyEngineFbServBitmapArray* aBitmaps ); |
|
39 ~CMemSpyViewFBServBase(); |
|
40 |
|
41 public: // From CMemSpyViewBase |
|
42 TBool HandleCommandL( TInt aCommand ); |
|
43 |
|
44 public: // Menu framework |
|
45 TUint MenuCascadeResourceId() const { return R_MEMSPY_MENUPANE_IMAGES; } |
|
46 TInt MenuCascadeCommandId() const { return EMemSpyCmdImages; } |
|
47 |
|
48 protected: // Command handlers |
|
49 void OnCmdSlideShowL(); |
|
50 void OnCmdExportToMemoryCardL(); |
|
51 void OnCmdImageListingL(); |
|
52 |
|
53 protected: // Data members |
|
54 CMemSpyEngineFbServBitmapArray* iBitmaps; |
|
55 }; |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 |
|
61 class CMemSpyViewFBServBitmaps : public CMemSpyViewFBServBase, public MMemSpyEngineFbSerbBitmapArrayObserver |
|
62 { |
|
63 public: |
|
64 CMemSpyViewFBServBitmaps( CMemSpyEngine& aEngine, MMemSpyViewObserver& aObserver ); |
|
65 CMemSpyViewFBServBitmaps( CMemSpyEngine& aEngine, MMemSpyViewObserver& aObserver, CMemSpyEngineFbServBitmapArray* aBitmaps ); |
|
66 ~CMemSpyViewFBServBitmaps(); |
|
67 void ConstructL( const TRect& aRect, CCoeControl& aContainer, TAny* aSelectionRune = NULL ); |
|
68 |
|
69 public: // From CMemSpyViewBase |
|
70 void RefreshL(); |
|
71 TMemSpyViewType ViewType() const; |
|
72 CMemSpyViewBase* PrepareParentViewL(); |
|
73 CMemSpyViewBase* PrepareChildViewL(); |
|
74 |
|
75 private: // From MMemSpyEngineFbSerbBitmapArrayObserver |
|
76 void HandleFbServBitmapArrayEventL( TEvent aEvent ); |
|
77 |
|
78 private: // From CMemSpyViewBase |
|
79 void SetListBoxModelL(); |
|
80 void HandleListBoxItemActionedL( TInt aIndex ); |
|
81 void HandleListBoxItemSelectedL( TInt aIndex ); |
|
82 |
|
83 private: // Idle timer update |
|
84 static TInt IdleUpdateListBoxModel( TAny* aSelf ); |
|
85 void DoIdleUpdateListBoxModelL(); |
|
86 |
|
87 private: // Data members |
|
88 RArray<TInt> iBitmapHandles; |
|
89 CMemSpyEngineFbServBitmap* iCurrentBitmap; |
|
90 CPeriodic* iIdleResetListboxTimer; |
|
91 }; |
|
92 |
|
93 |
|
94 |
|
95 class CMemSpyViewFBServBitmapInfo : public CMemSpyViewFBServBase |
|
96 { |
|
97 public: |
|
98 CMemSpyViewFBServBitmapInfo( CMemSpyEngine& aEngine, MMemSpyViewObserver& aObserver, CMemSpyEngineFbServBitmapArray* aBitmaps, CMemSpyEngineFbServBitmap& aSelectedBitmap ); |
|
99 void ConstructL( const TRect& aRect, CCoeControl& aContainer, TAny* aSelectionRune = NULL ); |
|
100 |
|
101 public: // From CMemSpyViewBase |
|
102 void RefreshL(); |
|
103 TMemSpyViewType ViewType() const; |
|
104 CMemSpyViewBase* PrepareParentViewL(); |
|
105 CMemSpyViewBase* PrepareChildViewL(); |
|
106 |
|
107 private: // From CMemSpyViewBase |
|
108 void SetListBoxModelL(); |
|
109 void HandleListBoxItemActionedL( TInt aIndex ); |
|
110 |
|
111 private: // Data members |
|
112 CMemSpyEngineFbServBitmap& iBitmapObject; |
|
113 }; |
|
114 |
|
115 |
|
116 |
|
117 |
|
118 class CMemSpyViewFBServBitmapViewer : public CMemSpyViewFBServBase |
|
119 { |
|
120 public: |
|
121 CMemSpyViewFBServBitmapViewer( CMemSpyEngine& aEngine, MMemSpyViewObserver& aObserver, CMemSpyEngineFbServBitmapArray* aBitmaps, CMemSpyEngineFbServBitmap& aSelectedBitmap ); |
|
122 ~CMemSpyViewFBServBitmapViewer(); |
|
123 void ConstructL( const TRect& aRect, CCoeControl& aContainer, TAny* aSelectionRune = NULL ); |
|
124 |
|
125 public: // From CMemSpyViewBase |
|
126 void RefreshL(); |
|
127 TMemSpyViewType ViewType() const; |
|
128 CMemSpyViewBase* PrepareParentViewL(); |
|
129 |
|
130 private: // From CMemSpyViewBase |
|
131 void SetListBoxModelL(); |
|
132 CEikListBox* ConstructListBoxL(); |
|
133 |
|
134 private: // From CCoeControl |
|
135 void Draw(const TRect& aRect) const; |
|
136 void SizeChanged(); |
|
137 TInt CountComponentControls() const; |
|
138 CCoeControl* ComponentControl( TInt aIndex ) const; |
|
139 |
|
140 private: // Data members |
|
141 CMemSpyEngineFbServBitmap& iBitmapObject; |
|
142 CEikImage* iImage; |
|
143 TRect iBorderRect; |
|
144 }; |
|
145 |
|
146 |
|
147 |
|
148 |
|
149 |
|
150 class CMemSpyViewFBServSlideshow : public CAknDialog |
|
151 { |
|
152 public: |
|
153 static void NewLD( CMemSpyEngineFbServBitmapArray& aBitmaps, TInt& aIndex ); |
|
154 ~CMemSpyViewFBServSlideshow(); |
|
155 |
|
156 private: |
|
157 CMemSpyViewFBServSlideshow( CMemSpyEngineFbServBitmapArray& aBitmaps, TInt& aIndex ); |
|
158 void ConstructL(); |
|
159 |
|
160 private: |
|
161 void PreLayoutDynInitL(); |
|
162 TBool OkToExitL(TInt aButtonId); |
|
163 |
|
164 private: // Idle timer update |
|
165 static TInt IdleUpdate( TAny* aSelf ); |
|
166 void ShowNextImageL(); |
|
167 |
|
168 private: // Data members |
|
169 CMemSpyEngineFbServBitmapArray& iBitmaps; |
|
170 TInt& iIndex; |
|
171 CPeriodic* iTimer; |
|
172 }; |
|
173 |
|
174 |
|
175 |
|
176 |
|
177 #endif |