|
1 /* |
|
2 * Copyright (c) 2007 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: FreestyleEmailUi download manager visualiser definition |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __FREESTYLEEMAILUI_DOWNLOADMANAGERVISUALISER_H__ |
|
21 #define __FREESTYLEEMAILUI_DOWNLOADMANAGERVISUALISER_H__ |
|
22 |
|
23 // SYSTEM INCLUDES |
|
24 //<cmail> |
|
25 #include "fstreelistconstants.h" |
|
26 #include "fstreelistobserver.h" |
|
27 //</cmail> |
|
28 |
|
29 // INTERNAL INCLUDES |
|
30 #include "FreestyleEmailUiViewBase.h" |
|
31 #include "FreestyleEmailUiAttachmentsListModel.h" |
|
32 |
|
33 // FORWARD DECLARATIONS |
|
34 class CAlfDeckLayout; |
|
35 class CAlfAnchorLayout; |
|
36 class CFsTreeList; |
|
37 class CFsTreeVisualizerBase; |
|
38 class CFreestyleEmailUiDownloadManagerControl; |
|
39 class CFreestyleEmailUiAppUi; |
|
40 class CFsControlBar; |
|
41 class CFSEmailUiDownloadManagerModel; |
|
42 |
|
43 /** |
|
44 * Download manager visualiser. |
|
45 */ |
|
46 class CFSEmailUiDownloadManagerVisualiser : public CFsEmailUiViewBase, |
|
47 public MFSEmailUiAttachmentsStatusObserver, public MFsTreeListObserver |
|
48 { |
|
49 public: |
|
50 static CFSEmailUiDownloadManagerVisualiser* NewL(CAlfEnv& aEnv, CFreestyleEmailUiAppUi* aAppUi, CAlfControlGroup& aControlGroup); |
|
51 static CFSEmailUiDownloadManagerVisualiser* NewLC(CAlfEnv& aEnv, CFreestyleEmailUiAppUi* aAppUi, CAlfControlGroup& aControlGroup); |
|
52 virtual ~CFSEmailUiDownloadManagerVisualiser(); |
|
53 |
|
54 // from MFSEmailUiAttachmentsStatusObserver |
|
55 virtual void DownloadStatusChangedL( TInt aIndex ); |
|
56 |
|
57 // from MFsTreeListObserver |
|
58 // <cmail> Touch |
|
59 virtual void TreeListEventL( const TFsTreeListEvent aEvent, |
|
60 const TFsTreeItemId aId = KFsTreeNoneID ); |
|
61 // </cmail> |
|
62 |
|
63 // From CAknView |
|
64 TUid Id() const; |
|
65 // <cmail> Toolbar |
|
66 /*void DoActivateL(const TVwsViewId& aPrevViewId, |
|
67 TUid aCustomMessageId, |
|
68 const TDesC8& aCustomMessage);*/ |
|
69 // </cmail> Toolbar |
|
70 void ChildDoDeactivate(); |
|
71 void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane); |
|
72 |
|
73 // From CFsEmailUiViewBase |
|
74 |
|
75 void HandleDynamicVariantSwitchL( CFsEmailUiViewBase::TDynamicSwitchType aType ); |
|
76 void HandleDynamicVariantSwitchOnBackgroundL( CFsEmailUiViewBase::TDynamicSwitchType aType ); |
|
77 void GetParentLayoutsL( RPointerArray<CAlfVisual>& aLayoutArray ) const; |
|
78 |
|
79 // Refresh |
|
80 void RefreshL(); |
|
81 |
|
82 // Mail list current model data |
|
83 CFSEmailUiDownloadManagerModel* Model(); |
|
84 |
|
85 // Highlighted index |
|
86 TInt HighlightedIndex(); |
|
87 |
|
88 void ReScaleUiL(); |
|
89 void ResetColorsL(); |
|
90 void SetMskL(); |
|
91 // Event handling forwarded from control |
|
92 TBool OfferEventL( const TAlfEvent& aEvent ); |
|
93 void HandleCommandL(TInt aCommand); |
|
94 |
|
95 CAlfControl* ViewerControl(); |
|
96 |
|
97 void HandleMailBoxEventL( TFSMailEvent aEvent, TFSMailMsgId aMailbox, |
|
98 TAny* aParam1, TAny* /*aParam2*/, TAny* /*aParam3*/ ); |
|
99 |
|
100 // <cmail> Toolbar |
|
101 private: // from |
|
102 |
|
103 /** |
|
104 * @see CFsEmailUiViewBase::ChildDoActivateL |
|
105 */ |
|
106 void ChildDoActivateL( const TVwsViewId& aPrevViewId, |
|
107 TUid aCustomMessageId, |
|
108 const TDesC8& aCustomMessage ); |
|
109 |
|
110 // </cmail> Toolbar |
|
111 |
|
112 private: |
|
113 CFSEmailUiDownloadManagerVisualiser( CAlfEnv& aEnv, |
|
114 CFreestyleEmailUiAppUi* aAppUi, CAlfControlGroup& aControlGroup ); |
|
115 void ConstructL(); |
|
116 |
|
117 TBool IsCommandAvailableOnItem( TInt aCommandId, const TAttachmentData* aFocusedItem ) const; |
|
118 HBufC* CreateSecondLineTextLC( const TAttachmentData& aAttachment ) const; |
|
119 void TryToOpenItemL( TFsTreeItemId aId ); |
|
120 void RemoveAttachmentL( TFsTreeItemId aId ); |
|
121 void LaunchActionMenuL(); |
|
122 |
|
123 void ShortcutCollapseExpandAllToggleL(); |
|
124 void GoToTopL(); |
|
125 void GoToBottomL(); |
|
126 |
|
127 void SetMailboxNameToStatusPaneL(); |
|
128 |
|
129 private: |
|
130 // Reference to Alf environment |
|
131 CAlfEnv& iEnv; |
|
132 |
|
133 // Screen control |
|
134 CFreestyleEmailUiDownloadManagerControl* iScreenControl; |
|
135 |
|
136 // Control bar |
|
137 CFsControlBar* iControlBar; |
|
138 |
|
139 // Mail List |
|
140 CFsTreeList* iDownloadManagerList; |
|
141 CFSEmailUiDownloadManagerModel* iModel; |
|
142 CFsTreeList* iDownloadsList; |
|
143 CAlfDeckLayout* iListLayout; |
|
144 CFsTreeVisualizerBase* iDownloadManagerTreeListVisualizer; |
|
145 TFsTreeItemId iHeaderItemId; |
|
146 }; |
|
147 |
|
148 |
|
149 |
|
150 |
|
151 #endif |