📄 logexamplecontainer2.h
字号:
/*
* ============================================================================
* Name : CLogExampleContainer2 from LogExampleContainer2.h
* Part of : LogExample
* Created : 26.05.2005 by Forum Nokia
* Description:
* Declares container control for application.
* Version : 1.0
* Copyright: Nokia Corporation
* ============================================================================
*/
#ifndef __LOGEXAMPLECONTAINER2_H__
#define __LOGEXAMPLECONTAINER2_H__
// INCLUDE FILES
#include <coecntrl.h>
#include <eiklbo.h> // MEikListBoxObserver
#include <badesca.h> // CDescArray
#include <logwrap.h>
#include "EventsObserver.h" // MEventsObserver
// FORWARD DECLARATIONS
class CAknColumnListBox;
// CLASS DECLARATION
/**
* CLogExampleContainer2 container control class.
*
*/
class CLogExampleContainer2 : public CCoeControl,
MCoeControlObserver,
public MEventsObserver,
MEikListBoxObserver
{
public: // Constructors and destructor
/**
* Symbian default constructor.
* @param aRect Frame rectangle for container.
*/
void ConstructL(const TRect& aRect);
/**
* Destructor.
*/
~CLogExampleContainer2();
public: // New functions
/**
* Resets events
*/
void ResetEventList();
/**
* Shows event's details
*/
void ShowEventDetailsL();
/**
* Gets selected id
* @param aSelectedId
*/
void GetSelectedId(TLogId& aSelectedId);
/**
* Returns items count
* @return count of items in list box
*/
TInt ListBoxItemCount();
public: // Functions from base classes
/**
* Reads a notify
* @param aEvent event to be read
*/
void NotifyEventReadL(const CLogEvent& aEvent);
/**
* Reads a notify
* @param aEvent event to be read
*/
void NotifyEventAddedL(const CLogEvent& aEvent);
/**
* Notifies an event is deleted
*/
void NotifyEventDeletedL();
private: // Functions from base classes
/**
* From CoeControl,SizeChanged.
*/
void SizeChanged();
/**
* From CoeControl,CountComponentControls.
*/
TInt CountComponentControls() const;
/**
* From CCoeControl,ComponentControl.
* @param aIndex
*/
CCoeControl* ComponentControl(TInt aIndex) const;
/**
* From CCoeControl,Draw.
* @param aRect
*/
void Draw(const TRect& aRect) const;
/**
* From MCoeControlObserver
* Acts upon changes in the hosted control's state.
*
* @param aControl The control changing its state
* @param aEventType The type of control event
*/
void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);
/**
* From MEikListBoxObserver
*/
void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aListBoxEvent);
private: // New functions
/**
* GetListBoxModel()
* @return Pointer to array of listbox model
*/
CDesCArray* GetListBoxModel();
/**
* Framework calls this method when a key event occurs.
*/
TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
private: //Data members
CAknColumnListBox* iEventsListBox; // events list
CArrayPtrFlat<CLogEvent>* iLogEvents;
TInt iDeleteIndex;
};
#endif
// End of File
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -