📄 gpstest.h
字号:
/*
============================================================================
Name : GPSTest.h
Author : Fox Jiang
Version :
Copyright : Kodak Mobile Team
Description : Application header file
============================================================================
Note! Normally you would have a separate file for each of these classes, but
here, for the sake of simplicity, they are all put in the same file. Having
the classes defined in separate files makes the source code easier to maintain.
*/
#ifndef __GPSTEST_H__
#define __GPSTEST_H__
// INCLUDES
// System includes, found under %EPOCROOT%\epoc32\include
#include <eikapp.h> // CEikApplication
#include <eikdoc.h> // CEikDocument
#include <coecntrl.h> // CCoeControl
#include <uikon.hrh> // Command codes
#include <eikenv.h> // CEikonEnv
#include <eiklabel.h> // CEikLabel
#include <aknappui.h> // CAknAppUi
#include <aknnotewrappers.h> // CAknInformationNote
#include "GPSPosition.h"
#include "GPSLib.h"
#include "GpsListener.h"
#include "GPSTest.hrh"
// FORWARD DECLARATIONS
class CGPSTest;
class CGPSTestContainer;
// CLASS DEFINITIONS
//----------------------------------------------------------------------------
// CGPSTestApplication
//----------------------------------------------------------------------------
class CGPSTestApplication : public CEikApplication
{
private: // From CEikApplication
CApaDocument* CreateDocumentL();
private: // From CApaApplication (via CEikApplication)
TUid AppDllUid() const;
};
//----------------------------------------------------------------------------
// CGPSTestDocument (Model)
//----------------------------------------------------------------------------
class CGPSTestDocument : public CEikDocument
{
public: // Constructor
CGPSTestDocument(CEikApplication& aApp);
private: // From CEikDocument
CEikAppUi* CreateAppUiL();
};
//----------------------------------------------------------------------------
// CGPSTestAppUi (Controller)
//----------------------------------------------------------------------------
class CGPSTestAppUi : public CAknAppUi
{
public: // Constructors and destructor
void ConstructL(void);
~CGPSTestAppUi();
public:
void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
private: // From CEikAppUi
void HandleCommandL(TInt aCommand);
private: // Data
CGPSTestContainer* iAppContainer;
};
//----------------------------------------------------------------------------
// CGPSTestContainer (View)
//----------------------------------------------------------------------------
class CGPSTestContainer : public CCoeControl, MCoeControlObserver, MGpsListener
{
public: // Constructors and destructor
void ConstructL(const TRect& aRect);
~CGPSTestContainer();
public: // New functions
void StartGPS( void );
void StopGPS( void );
TBool GetStatus( void );
public: // From CCoeControl
void SizeChanged();
TInt CountComponentControls() const;
CCoeControl* ComponentControl(TInt aIndex) const;
void Draw(const TRect& aRect) const;
public: // From MGpsListener
void GpsUpdate( const TGpsPosition & aNewPosition );
public: // From MCoeControlObserver
void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);
private: // Data
CEikLabel* iLabel; // example label
CEikLabel* iToDoLabel; // example label
CGPSLib* iGPS;
TBool iIsStart;
};
#endif // __GPSTEST_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -