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

📄 taskmgrappview.h

📁 S60下的任务管理器!可以实现应用程序切换,结束进程,压缩内存,重启手机,手机系统信息,进程信息,视图切换等功能.
💻 H
字号:
/* Copyright (c) 2003, Nokia. All rights reserved */

#ifndef __TASKMGR_APPVIEW_H__
#define __TASKMGR_APPVIEW_H__

#include <aknlists.h> 
#include <coecntrl.h>

/*! 
  @class CtaskmgrAppView
  
  @discussion An instance of CtaskmgrAppView is the Application View object
  for the taskmgr example application
  */
class CtaskmgrAppView : public CCoeControl,public MEikListBoxObserver
    {
public:

/*!
  @function NewL
   
  @discussion Create a CtaskmgrAppView object, which will draw itself to aRect
  @param aRect The rectangle this view will be drawn to
  @result A pointer to the created instance of CtaskmgrAppView
  */
    static CtaskmgrAppView* NewL(const TRect& aRect);

/*!
  @function NewLC
   
  @discussion Create a CtaskmgrAppView object, which will draw itself to aRect
  @param aRect The rectangle this view will be drawn to
  @result A pointer to the created instance of CtaskmgrAppView
  */
    static CtaskmgrAppView* NewLC(const TRect& aRect);


/*!
  @function ~CtaskmgrAppView
  
  @discussion Destroy the object
  */
     ~CtaskmgrAppView();

TInt CountComponentControls() const;
CCoeControl* ComponentControl(TInt aIndex) const;



public:  // from CCoeControl
/*!
  @function Draw
  
  @discussion Draw this CtaskmgrAppView to the screen
  @param aRect The rectangle of this view that needs updating
  */
    void Draw(const TRect& aRect) const;
  
  
   /** From MEikListBoxObserver
     * Handles listbox event.
     * @param aListBox Pointer to ListBox object is not used.
     * @param aEventType Type of listbox event.
     */
   void HandleListBoxEventL(
							CEikListBox* aListBox,
							TListBoxEvent aEventType 
							);
	void RefreshList();

	void KillApp();

	void NewApp();

	void TaskInfo();                                         
	
	void CompressHeaps();

	void FillProcessList();
	
	void FillTaskList();
	
	void SwitchToApp();	
		
	void RestartDevice();	
	
	void KillProcess();
	
	void ShowSystemInfo();
	
	void ShowProcessInfo();
	
	void SwitchView();
	
	void ShowAbout();
	
private:

/*!
  @function ConstructL
  
  @discussion  Perform the second phase construction of a CtaskmgrAppView object
  @param aRect The rectangle this view will be drawn to
  */
    void ConstructL(const TRect& aRect);

/*!
  @function CtaskmgrAppView
  
  @discussion Perform the first phase of two phase construction 
  */
    CtaskmgrAppView();
    
    TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,
                                       TEventCode aType );
                                       
	
    void CreateListBoxL(const TRect& aRect);
    
    void InitTaskList();
    
    void InitProcessList();
    	
	void ShowInfoDialog(TInt ,TDesC& );
	
    
   
	private://data members
	 
    	CEikFormattedCellListBox*	iListBox;
		CDesCArray *iAppList;
		CDesCArray *iProcList;	
	    TInt iAppCount;
	    TInt iProcCount;    
    	TUid UidArray[100];
	    enum TTaskMgrState{
    		ETaskListState,
    		EProcessListState
	    };
    	TTaskMgrState iAppState;
    	
    	TInt iPhoneIndex;
};


#endif // __TASKMGR_APPVIEW_H__

⌨️ 快捷键说明

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