?? passwordappview.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 + -