|
1 /* |
|
2 * Copyright (c) 2008-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: Delete command handler |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __C_GLXCOMMANDHANDLERSAVE_H__ |
|
22 #define __C_GLXCOMMANDHANDLERSAVE_H__ |
|
23 |
|
24 #include <e32base.h> |
|
25 #include <glxmpxcommandcommandhandler.h> |
|
26 #include <glximageviewermanager.h> |
|
27 |
|
28 class MGlxMediaListProvider; |
|
29 class CGlxUiUtility; |
|
30 |
|
31 /** |
|
32 * @class CGlxCommandHandlerSave |
|
33 * |
|
34 * Command handler that deletes selected items from a media list. |
|
35 * |
|
36 */ |
|
37 |
|
38 NONSHARABLE_CLASS( CGlxCommandHandlerSave) |
|
39 : public CGlxMpxCommandCommandHandler |
|
40 { |
|
41 public: |
|
42 /** |
|
43 * Two-phase constructor |
|
44 * @param aMediaListProvider object that provides the media list |
|
45 * @param aHasToolbarItem Whether Command Should be toolbar item (ETrue - if toolbar item) |
|
46 * @return pointer to CGlxCommandHandlerSave object |
|
47 */ |
|
48 IMPORT_C static CGlxCommandHandlerSave* NewL( |
|
49 MGlxMediaListProvider* aMediaListProvider, TBool aHasToolbarItem); |
|
50 |
|
51 /** Destructor */ |
|
52 IMPORT_C ~CGlxCommandHandlerSave(); |
|
53 |
|
54 public: // From CGlxMpxCommandCommandHandler |
|
55 /** See @ref CGlxMpxCommandCommandHandler::CreateCommandL */ |
|
56 virtual CMPXCommand* CreateCommandL(TInt aCommandId, MGlxMediaList& aList, |
|
57 TBool& aConsume) const; |
|
58 |
|
59 public: // From CGlxCommandHandler |
|
60 /** See @ref CGlxCommandHandler::DoActivateL */ |
|
61 void DoActivateL(TInt aViewId); |
|
62 virtual void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane); |
|
63 /** See @ref CGlxCommandHandler::OfferKeyEventL */ |
|
64 TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType); |
|
65 |
|
66 protected: |
|
67 /** See @ref CGlxCommandHandler::PopulateToolbar*/ |
|
68 void PopulateToolbarL(); |
|
69 |
|
70 private: |
|
71 /** Second phase constructor */ |
|
72 void ConstructL(); |
|
73 |
|
74 /** Constructor */ |
|
75 CGlxCommandHandlerSave(MGlxMediaListProvider* aMediaListProvider, TBool aHasToolbarItem); |
|
76 |
|
77 |
|
78 private: |
|
79 /// Resource file offset |
|
80 TInt iResourceOffset; |
|
81 |
|
82 |
|
83 CGlxUiUtility* iUiUtility; |
|
84 // Not own |
|
85 CGlxImageViewerManager* iImageViewerInstance; |
|
86 }; |
|
87 |
|
88 |
|
89 #endif // __C_GLXCOMMANDHANDLERSAVE_H__ |