📄 mobilestorageview.h
字号:
/*
* Copyright (c) 2007,苏州丰达
* All rights reserved.
* 版权所有(C)2007-2008 苏州丰达
* 公司地址:中国,江苏省苏州市
* 网址:http://www.
*
* 文件名称:CM3UIQ2AppUi.cpp
* 摘 要:
*
* 产品版本:彩视 1.0
*
* 作 者:xxxx
* 创建日期:xxxxx
* 负责人:xxxxx
*
* 修改者:司治国
* 修改日期:2008.1.17
*
* 编译器或环境等描述:uiqsdk2.1
* 适用于VC2003+symbian 7.x的环境开发。
*
**/
#ifndef MOBILESTORAGEVIEW_H
#define MOBILESTORAGEVIEW_H
// INCLUDES
#include <coecntrl.h>
#include <coeview.h>
#include <eikclb.h>
#include <eiklbo.h>
#include "M3Directory.h"
/**
* 手机空间视图
*
*/
class CMobileStorageView : public CCoeControl, public MCoeView, public MEikListBoxObserver
{
public:
/**
* 析构
*/
~CMobileStorageView();
/**
* 二步构造
* @param aRect 显示区域
**/
static CMobileStorageView* NewL(const TRect &aRect);
/**
* 二步构造
* @param aRect 显示区域
**/
static CMobileStorageView* NewLC(const TRect &aRect);
/**
* Implements MCoeView返回视图id
* @Return 视图id
**/
virtual TVwsViewId ViewId() const;
/**
* 激活视图
* @param aTVwsViewId
* @param aCustomMessageId
* @param aCustomMessage
**/
void ViewActivatedL(const TVwsViewId &aPrevViewId, TUid aCustomMessageId, const TDesC8 &aCustomMessage);
/**
* 隐藏视图
**/
void ViewDeactivated();
/**
* 返回视图uid
* @Return 视图uid
**/
TUid ViewUid() const;
/**
* 处理列表事件
* @param aListBox
* @param aEventType
**/
virtual void HandleListBoxEventL(CEikListBox *aListBox, TListBoxEvent aEventType);
virtual TKeyResponse OfferKeyEventL(const TKeyEvent &aKeyEvent, TEventCode aType);
CEikColumnListBox * ListBox();
/**
* 视图改变
**/
void SizeChanged();
/**
* 实现CCoeControl
* 返回控件
* @param aIndex 索引
* @Return 返回控件
**/
CCoeControl *ComponentControl(TInt aIndex) const;
/**
* 返回控件个数
* @param 控件个数
**/
TInt CountComponentControls() const;
/**
* 得到被选中的文件
**/
TDesC* FileName();
/*
* 得到M3Directory
*/
M3Directory* GetM3Directory();
/*
* 是否是目录
*/
TBool IsDir();
private:
/**
* 构造函数
*/
CMobileStorageView();
/**
* 二步默认构造
*/
void ConstructL(const TRect &aRect);
/**
* 绘制
**/
void Draw(const TRect& /* aRect */) const;
/**
* 创建列表框
**/
void CreateListBoxL(M3Directory *aDir);
/**
* 输入事件
* @param aLine
**/
void HandleEnter(TInt aLine = -1);
/**
* 刷新列表
* @param apos
* @param aGetList
**/
void RefreshList(TInt pos = 0,TBool getList = ETrue);
private:
CEikColumnListBox *iListBox;
M3Directory* iDir;
RFs *iFs;
// Descriptor array in which to hold text descriptions of the shapes
CDesC16ArrayFlat *iStringArray;
};
#endif // MOBILESTORAGEVIEW_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -