?? clocationexamplecontainer.h
字號:
/*
* ============================================================================
* Name : clocationexamplecontainer.h
* Part of : Location Example
* Created : 21.05.2007 by Forum Nokia
* Description:
* Version : 1.0
* Copyright: Nokia Corporation
* ============================================================================
*/
#ifndef LBSREFERENCECONTAINER_H
#define LBSREFERENCECONTAINER_H
// INCLUDES
#include <aknview.h>
#include <akndef.h>
#include "clocationexamplepositionlistener.h"
#include "clocationexampleengine.h"
#include "clocationexampleview.h"
// FORWARD DECLARATIONS
class CAknDoubleStyleListBox;
class CLocationExamplePositionRequestor;
class CAknsBasicBackgroundControlContext;
// CONSTANTS
// maximum length a value string may have
const TInt KValueMaxLength = 30;
// CLASS DECLARATION
/**
* CLocationExampleContainer container control class.
*
*/
class CLocationExampleContainer : public CCoeControl,
public MPositionObserver
{
public: // Constructors and destructor
/**
* Constructor
*/
CLocationExampleContainer(CLocationExampleView* aParent);
/**
* Symbian default constructor.
* @param aRect Frame rectangle for container.
*/
void ConstructL(const TRect& aRect);
/**
* Destructor.
*/
~CLocationExampleContainer();
private:
TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
void AddItemInListL(const TDesC& aLabel, const TDesC& aValue);
/**
* Changes latitude or longitude represented as degrees to
* a string of a form +DDD'MM''SS.SSSS
* @param aDegrees Degrees to trasform
* @param aDegreesString Degrees string to be returned
*/
void GetDegreesString(
const TReal64& aDegrees,TBuf<KDegreeLength>& aDegreesString) const;
/**
* Processes position info to string representation.
* @param aPositionInfo Position information to be processed
*/
void ProcessPositionInfoL( const TPositionInfo& aPositionInfo );
void ShowContextSensiveMenuL();
void ShowFriendPositionL();
void ShowDistanceToFriendPositionL(TPositionInfo* aYourPos);
public:
// From MPositionListener
void PositionUpdatedL(TPositionInfoBase& aPosInfo);
void FriendPositionUpdatedL(const TDesC& aInfo, const TCoordinate& aCoordinate);
void ErrorL(const TDesC& aErrorString);
void MessageL(const TDesC& aMessage);
// From CCoeControl
virtual TKeyResponse OfferKeyEventL(const TKeyEvent &aKeyEvent, TEventCode aType);
void HandleResourceChange(TInt aType);
void ResetListBoxL();
private:
// From CoeControl
void SizeChanged();
TInt CountComponentControls() const;
CCoeControl* ComponentControl(TInt aIndex) const;
void Draw(const TRect& aRect) const;
private: //data
// View
CLocationExampleView* iParent;
// list box control
CAknDoubleStyleListBox* iListBox;
// listbox item array, not owned
CDesCArray* iItemArray;
// Buffer dynamicly filling in a list item
TBuf<KPositionMaxModuleName + KValueMaxLength> iListItemBuffer;
CAknsBasicBackgroundControlContext* iBgContext;
HBufC* iTextLat;
HBufC* iTextLong;
HBufC* iTextFriendLat;
HBufC* iTextFriendLong;
HBufC* iTextFriendDist;
TBool iShowFriendPosition;
TBuf<KAddressLength> iFriendPhone;
TCoordinate iFriendCoordinate;
};
#endif //LBSREFERENCECONTAINER_H
// End of File
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -