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

📄 filelistview.h

📁 symbian 的文件保密软件,可以把文件设置为私有或者还原为公共,私有时,别人没有权限是看不到的,还可以参照您的需求或建议为您定制软件.
💻 H
字号:
/*
*======================================================== 
*  文件名	: FileListView.h
*  功能  	: 列出本地Video,Music,Image,Other文件夹下的文件
			  当选中四个文件夹的某一个时,就把它目录下的所有文件列出来
			  文件的排行按文件创建的时间的先后排序
*  创建 	: 11/11/2006 chenqing
*  说明		:
*  项目     : Netfrog    
*  版本 	: 1.0
*  版权		: 深圳千寻网有限公司
*=========================================================
*/

#ifndef _FILELISTVIEW_H_
#define _FILELISTVIEW_H_

#include<coecntrl.h>
#include <eiklbo.h>			// MEikListBoxObserver
#include "ImageEngine.h"	//图片文件转换成图标的引擎

#include "localrsgfile.h"

class CAknColumnListBox;
class CAknDoubleNumberStyleListBox;
class CAknDoubleLargeStyleListBox;
class CGAFileListEngine;	//文件列表数据处理引擎
class CGAFileList;
class CGALaunchSysAppEngine;//使用手机自带应用程序打开选中文件引擎


class CGAFileList  : public CCoeControl,MEikListBoxObserver,MImageEngineObserver
{
public:
	CGAFileList();
	virtual ~CGAFileList();
		
public:
	//打开video文件夹下的文件
	static CGAFileList* VideosL(const TRect& aRect);
	//打开Music文件夹下的文件
	static CGAFileList* MusicL(const TRect& aRect); 
	//打开Image文件夹下的文件
	static CGAFileList* ImagesL(const TRect& aRect); 
	//打开Other文件夹下的文件
	static CGAFileList* OthersL(const TRect& aRect); 
	//video文件夹下的文件数
	static TInt	VideoFolderFileCountL();
	//Music文件夹下的文件数
	static TInt MusicFolderFileCountL();
	//Image文件夹下的文件数
	static TInt ImageFolderFileCountL();
	//Other文件夹下的文件数
	static TInt OtherFolderFileCountL();
	
private:
	static CGAFileList* NewL(const TRect& aRect);
	static CGAFileList* NewLC(const TRect& aRect);
	void ConstructL(const TRect& aRect);
	


	
private: // Functions from base classes
		 /**
		 * See CCoeControl::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType).
	*/
	//只处理EKEYOK键的事件,此时为打开选中的文件
	TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
	
private: // Functions from base classes
		 /**
         * See CCoeControl::SizeChanged().
	*/
	void SizeChanged();
	
	/**
	* See CCoeControl::CountComponentControls() const.
	*/
	TInt CountComponentControls() const;
	
	/**
	* See CCoeControl::ComponentControl(TInt aIndex) const.
	*/
	CCoeControl* ComponentControl(TInt aIndex) const;
	
	/**
	* See CCoeControl::Draw(const TRect& aRect) const.
	*/
	void Draw(const TRect& aRect) const;
	
public:
	//返回选中LISTBOX文件列表中的文件绝对存储路径
	TBool	GetPath(TDes& aPath);
	//返回选中LISTBOX文件列表中的文件名
	TBool	GetFileName(TDes& aPath);
	//打开LISTBOX中选中的文件
	TBool	OpenSelectFile();
	//删除选中的文件
	void	DeleteFileL();
	//修改选中的文件名
	void	RenameFileL();
	
	//当图片转换成缩略图后,图片转换引擎会调用这个函
	void	OkToGetImage(TInt aState,TInt aItemIndex,CGAImageEngine* aEngine);
	//当是选择Image文件夹时,要产生对应的缩略图
	void	CreateBreviaryImage();
	// 设置文件类型
	void SetFileType(TInt aFileType);
	

private:
	//使用文件列表引擎,把文件夹下的文件全部显示在LISTBOX上
	void SetupFileList();
	//得到LISTBOX当前的ITEM INDEX
	TInt GetCurrentSelectItemIndex();
	//设置要打开的文件夹 
	void SetFolder(TInt aFolder);
	
private: 
	//from MEikListBoxObserver
	void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
	
private:
	//文件列表的LISTBOX
	CAknDoubleLargeStyleListBox*	iBasicFileListBox;
	//文件夹下文件处理引擎
	CGAFileListEngine*				iFileEngine;
	//使用手机自带的应用程序打开选中的文件
	CGALaunchSysAppEngine*			iLauncher;
	//要打开的文件夹,是Video,image,music和other四个中的其中之一
	TInt							iFolder;
	//对于Image文件夹下已经处理的缩略图的个数
	TInt							iScaleNumber;
	TInt							iFileType;
	//产生缩略图的引擎
	CGAImageEngine*					iImageEngine;
	CGAImageEngine*					iImageEngine1;
	CGAImageEngine*					iImageEngine2;
	CArrayPtrFlat<CFbsBitmap>*		iBitmapArray;
		
	
};

#endif // _FILELISTVIEW_H_

⌨️ 快捷键说明

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