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

📄 localcontainer.h

📁 symbian 的文件保密软件,可以把文件设置为私有或者还原为公共,私有时,别人没有权限是看不到的,还可以参照您的需求或建议为您定制软件.
💻 H
字号:
/*
* ============================================================================
*  Name     : CLocalContainer from LocalContainer.h
*  Part of  : Netfrog
*  Created  : 14.11.2006 by Patrick Chen
*  Description:
*     Declares container control for application.
*  Version  :
*  Copyright: Qianxun Investment Holding Ltd
* ============================================================================
*/

#ifndef LOCALCONTAINER_H
#define LOCALCONTAINER_H

// INCLUDES
#include <coecntrl.h>
#include <eiklbo.h>			// MEikListBoxObserver  
#include "localrsgfile.h"
// FORWARD DECLARATIONS

class CAknDoubleLargeStyleListBox;
class CGAFileList;
// CLASS DECLARATION

/**
*  CLocalContainer  container control class.
*  
*/
class CLocalContainer : public CCoeControl, MEikListBoxObserver
    {
    public: // Constructors and destructor
        
        /**
        * EPOC default constructor.
        * @param aRect Frame rectangle for container.
        */
        void ConstructL(const TRect& aRect);
		CLocalContainer();

        /**
        * Destructor.
        */
        ~CLocalContainer();

    public: // New functions
		//判断是否有文件打开
		TBool	IsFolderOpen();
		//打开video,music,image和other文件夹之一
		void OpenFolder();
		//打开选中的文件
		void OpenSelectFile();
		//从filelist中返回
		void BackFromFileList();
		//判断选中的文件夹下是否有文件
		TBool IsFolderEmpty();
		//删除选中的文件
		void	DeleteFileL();
		//修改选中的文件名
		void	RenameFileL();
		//返回选中LISTBOX文件列表中的文件绝对存储路径
		TBool GetPath(TDes& aPath);

		//重新创建一个LISTBOX
		void ReCreateListBoxL();
		
		//把文件设为私有
		void FileOccupyL();
		//还原文件
		void FileRecoverL();

    public: // Functions from base classes

    private: // Functions from base classes

       /**
        * From CoeControl,SizeChanged.
        */
        void SizeChanged();

       /**
        * From CoeControl,CountComponentControls.
        */
        TInt CountComponentControls() const;

       /**
        * From CCoeControl,ComponentControl.
        */
        CCoeControl* ComponentControl(TInt aIndex) const;

       /**
        * From CCoeControl,Draw.
        */
        void Draw(const TRect& aRect) const;

		//from MEikListBoxObserver
		void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);

		TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
		
 private:
	 //初始化一个双行大图标的LISTBOX
	void InitListBoxL();
	//初始化LISTBOX的TEXTARRAY
	void InitListBoxTextArrayL();
	//初始化LISTBOX的ICONARRAY
	void InitListBoxIconArrayL();

	//得到Listbox当前ITEM INDEX
	TInt GetCurrentItemIndex();
	//测试磁盘的个数
	TInt TestDiskNumber();
	
private:
	CAknDoubleLargeStyleListBox*	iLocalViewList;	//四个文件夹选项
	CGAFileList*					iFileList;		//四个文件夹之一的文件列表
	TRect							iClientRect;	//客户区域的矩形区域
	TBool							iFolderOpen;	//是否有文件被打开
    };

#endif

// End of File

⌨️ 快捷键说明

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