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

📄 passwordappview.h

📁 symbian S60 密码本源代码 主要用于保存用户网站,BBS网址,用户名以及密码
💻 H
字号:
/* ====================================================================
 * File: PasswordAppView.h
 * Created: 11/06/07
 * Author: 
 * Copyright (c): , All rights reserved
 * ==================================================================== */

#ifndef __PASSWORD_APPVIEW_H__
#define __PASSWORD_APPVIEW_H__


#include <coecntrl.h>
#include <eiktxlbx.h>


#define MAXLOGREC	10
/*! 
  @class CPasswordAppView
  
  @discussion An instance of the Application View object for the Password 
  example application
  */
class CPasswordDb;
  
class CPasswordAppView : public CCoeControl, public MCoeControlObserver, public MEikListBoxObserver
    {
public:

/*!
  @function NewL
   
  @discussion Create a CPasswordAppView 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 CPasswordAppView
  */
    static CPasswordAppView* NewL(const TRect& aRect);

/*!
  @function NewLC
   
  @discussion Create a CPasswordAppView 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 CPasswordAppView
  */
    static CPasswordAppView* NewLC(const TRect& aRect);


/*!
  @function ~CPasswordAppView
  
  @discussion Destroy the object and release all memory objects
  */
     ~CPasswordAppView();


public:  // from CCoeControl
/*!
  @function Draw
  
  @discussion Draw this CPasswordAppView to the screen
  @param aRect the rectangle of this view that needs updating
  */
    void Draw(const TRect& aRect) const;
     
  	void SizeChanged();
	TInt CountComponentControls() const;
	CCoeControl* ComponentControl(TInt aIndex) const;
	virtual TKeyResponse OfferKeyEventL(const TKeyEvent& keyEvent, TEventCode type);
	virtual void HandleControlEventL(CCoeControl* control, TCoeEvent eventType);

	// MEikListBoxObserver interface implementation
	virtual void HandleListBoxEventL(CEikListBox* listBox, TListBoxEvent eventType);
	void HandleResourceChange(TInt aType);
	TBool isListBoxEmpty() const;
	TInt getCurrentListBoxItem() const;
	CDesCArray* generateListBoxItemsL(CDesCArrayFlat* Items);

	void UpdateList();
	void AppendLog(TInt aRecordTime);
	CDesCArrayFlat* ShowDeatils();
	void SetCaptionL(const TDesC& aNewCaption);
	
	void activateListBoxL(TBool redraw = true);
	CDesCArray* generateListBoxItemsL();
	void FormatItem(TDes16* Buff, TInt i);
	void DeletePassword();
	void SetCurrentIndex(TInt index);
	TInt GetNumberOfItems();
	void UpdatePassword(TInt aID,TDes& aTitle,TDes& aUsername,TDes& aPassword,TDes& aDescription);
	void AddPassword(TDes& aTitle,TDes& aUsername,TDes& aPassword,TDes& aDescription);
	void NewLPassword();
	void CreatePassword(TFileName iDatabaseFile);
	void OpenPassword(TFileName iDatabaseFile);

private:
	TInt iLogArrary[MAXLOGREC];
	TInt iFristLogIndex;
	TInt iNumOfLog;
	CPasswordDb* iPasswordDb;
 	RArray<TInt32> aPasswordID;
 	CEikTextListBox* iDataList;
/*!
  @function ConstructL
  
  @discussion  Perform the second phase construction of a CPasswordAppView object
  @param aRect the rectangle this view will be drawn to
  */
public:
    void ConstructL(const TRect& aRect);
	TInt GetID();
	TInt GetIndex();

/*!
  @function CPasswordAppView
  
  @discussion Perform the first phase of two phase construction 
  */
public:
    CPasswordAppView();
    };


#endif // __PASSWORD_APPVIEW_H__

⌨️ 快捷键说明

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