📄 dbmsexampleform.h
字号:
/*
* ============================================================================
* Name : CDBMSexampleForm.h
* Part of : DBMSexample
* Created : 02/28/2003 by Forum Nokia
* Implementation notes:
* Version :
* Copyright: Nokia Corporation, 2003
* ============================================================================
*/
#ifndef __DBMS_EXAMPLE_FORM_H__
#define __DBMS_EXAMPLE_FORM_H__
// INCLUDES
#include <aknform.h>
#include "DBMSexample.hrh"
#include <aknnotewrappers.h>
#include <aknqueryvaluetext.h>
#include "DBMSengine.h"
// Class forward declaration
class CDBMSengine;
class MDBMSobserver;
class CEikButtonGroupContainer;
// CLASS DECLARATION
class CDBMSexampleForm : public CAknForm
{
public: // Public functions
/**
* Function NewL
* Create a new Form Object
*/
static CDBMSexampleForm* NewL( TInt aType, CDBMSengine *aEngine,
MDBMSobserver* aObserver = NULL );
/**
* Destructor.
*/
virtual ~CDBMSexampleForm();
// Getter and setter functions
void SetName( TDes& aName );
void GetName( TDes& aName ) const;
void SetBirthday( TTime aBirthday);
TTime& GetBirthday( );
void SetPersonalId( TInt aPersonalId );
TInt GetPersonalId() const;
void SetSex( TInt aSex );
TInt GetSex() const;
public: // Public functions inherited from base clase
TInt ExecuteLD( TInt aResourceId );
void PrepareLC( TInt aResourceId );
virtual TBool OkToExitL( TInt aButtonId );
virtual void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
virtual void ProcessCommandL ( TInt aCommandId );
private: // Functions from base class
/**
* From CEikDialog
* Set default field value to member data.
*/
void PostLayoutDynInitL();
/**
* From CAknForm
* Show save query. If user answers "No" to this query.
* return field value to the value which is before editing.
*/
TBool QuerySaveChangesL();
/**
* From CAknForm
* Save the contents of the form.
*/
TBool SaveFormDataL();
/**
* From CAknForm
* Does not save the contents of the form.
*/
void DoNotSaveFormDataL();
/**
* Process key events
*/
TKeyResponse OfferKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType);
private: // Private functions
/**
* Default constructor.
*/
CDBMSexampleForm(TInt aType, CDBMSengine* aEngine, MDBMSobserver *aObserver);
/**
* Second-phase constructor.
*/
void ConstructL();
/**
* Create a record.
*/
void CreateRecordL( );
/**
* Update a record.
*/
void UpdateRecordL( );
/**
* Delete a record.
*/
void DeleteRecordL( );
void DiscardArrays();
void ConfigurePopfieldValueL();
private: // Private data members
TInt iCurrentId;
TBuf<KDbNameLen> iEdwinName;
TBuf<KDbBirthday> iEdwinSex;
TTime iDateBirth;
TInt iNumberId;
TInt iSex;
TInt iType;
CDBMSengine *iEngine;
MDBMSobserver *iObserver;
// Define for the popup field
CDesCArray* iTextArray;
CAknQueryValueTextArray* iValueTextArray;
CAknQueryValueText* iTextValues[ 1 ];
};
#endif // __DBMS_EXAMPLE_FORM__
// End of File
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -