-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFileListAppUi.cpp
More file actions
119 lines (110 loc) · 3.67 KB
/
FileListAppUi.cpp
File metadata and controls
119 lines (110 loc) · 3.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
/*
* ============================================================================
* Name : CFileListAppUi from FileListAppUi.cpp
* Part of : FileList
* Created : 18.12.2002 by Forum Nokia
* Implementation notes:
* Initial content was generated by Nokia Series 60 AppWizard.
* Version : 1.0
* Copyright: Nokia Corporation
* ============================================================================
*/
// INCLUDE FILES
#include "FileListAppUi.h"
#include "FileListContainer.h"
#include <FileList.rsg>
#include "filelist.hrh"
#include <avkon.hrh>
// ================= MEMBER FUNCTIONS =======================
//
// ----------------------------------------------------------
// CFileListAppUi::ConstructL()
// Constructor: Creates container
// ----------------------------------------------------------
//
void CFileListAppUi::ConstructL()
{
BaseConstructL();
iAppContainer = new (ELeave) CFileListContainer;
iAppContainer->SetMopParent(this);
iAppContainer->ConstructL( ClientRect() );
AddToStackL( iAppContainer );
}
// ----------------------------------------------------
// CFileListAppUi::~CFileListAppUi()
// Destructor
// Frees reserved resources
// ----------------------------------------------------
//
CFileListAppUi::~CFileListAppUi()
{
if (iAppContainer)
{
RemoveFromStack( iAppContainer );
delete iAppContainer;
}
}
// ------------------------------------------------------------------------------
// CFileListAppUi::::DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane)
// This function is called by the EIKON framework just before it displays
// a menu pane. Its default implementation is empty, and by overriding it,
// the application can set the state of menu items dynamically according
// to the state of application data.
// ------------------------------------------------------------------------------
//
void CFileListAppUi::DynInitMenuPaneL(
TInt /*aResourceId*/,CEikMenuPane* /*aMenuPane*/)
{
}
// ----------------------------------------------------
// CFileListAppUi::HandleKeyEventL(
// const TKeyEvent& aKeyEvent,TEventCode /*aType*/)
// Handles keyevents. In this application keyevents are
// caught in CFileListContainer::OfferKeyEventL()
// ----------------------------------------------------
//
TKeyResponse CFileListAppUi::HandleKeyEventL(
const TKeyEvent& /*aKeyEvent*/,TEventCode /*aType*/)
{
return EKeyWasNotConsumed;
}
// ----------------------------------------------------
// CFileListAppUi::HandleCommandL(TInt aCommand)
// Handles menu commands
// ----------------------------------------------------
//
void CFileListAppUi::HandleCommandL(TInt aCommand)
{
switch ( aCommand )
{
case EAknSoftkeyBack:
case EEikCmdExit:
{
Exit();
break;
}
case EFileListCmdAppTest1:
{
iAppContainer->SetFileList(EFileListDirNoChange, EFileListToggle);
break;
}
case EFileListCmdAppTest2:
{
iAppContainer->SetFileList(EFileListSounds, EFileListSizeDateNoChange);
break;
}
case EFileListCmdAppTest3:
{
iAppContainer->SetFileList(EFileListPictures, EFileListSizeDateNoChange);
break;
}
case EFileListCmdAppTest4:
{
iAppContainer->SetFileList(EFileListVideos, EFileListSizeDateNoChange);
break;
}
default:
break;
}
}
// End of File