⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 filelistappui.cpp

📁 Source codes and documents for how to find files in phone memory or mmc card in Symbian OS. Compatib
💻 CPP
字号:
/*
* ============================================================================
*  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  

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -