📄 magictrainappview.h
字号:
/*
============================================================================
Name : TrainAppView.h
Author : Johnson Liu
Copyright : JL&NB
Description : Declares view class for application.
============================================================================
*/
#ifndef __TRAINAPPVIEW_h__
#define __TRAINAPPVIEW_h__
// INCLUDES
#include <coecntrl.h>
#include <VWSDEF.H>
#include "MagicTrain.hrh"
#include "OTResult.h"
#include "OSResult.h"
#include "TSSResult.h"
class CMagicTrainAppUi;
// CLASS DECLARATION
class CMagicTrainAppView : public CCoeControl
{
public: // New methods
/**
* NewL.
* Two-phased constructor.
* Create a CTrainAppView object, which will draw itself to aRect.
* @param aRect The rectangle this view will be drawn to.
* @return a pointer to the created instance of CTrainAppView.
*/
static CMagicTrainAppView* NewL( const TRect& aRect ,CMagicTrainAppUi* aAppUi);
/**
* NewLC.
* Two-phased constructor.
* Create a CTrainAppView object, which will draw itself
* to aRect.
* @param aRect Rectangle this view will be drawn to.
* @return A pointer to the created instance of CTrainAppView.
*/
static CMagicTrainAppView* NewLC( const TRect& aRect ,CMagicTrainAppUi* aAppUi);
/**
* ~CTrainAppView
* Virtual Destructor.
*/
virtual ~CMagicTrainAppView();
public: // Functions from base classes
/**
* From CCoeControl, Draw
* Draw this CTrainAppView to the screen.
* @param aRect the rectangle of this view that needs updating
*/
TUid Id() const;
void Draw( const TRect& aRect ) const;
/**
* From CoeControl, SizeChanged.
* Called by framework when the view size is changed.
*/
virtual void SizeChanged();
TTrainAppStatus iStatus;
void SetOTResult(const TDesC& aTrain,RPointerArray<COTResult>* aOTResult);
void SetTSSResult(const TDesC& aStation1,const TDesC& aStation2,RPointerArray<CTSSResult>* aTSSResult);
void SetOSResult(const TDesC& aStation,RPointerArray<COSResult>* aOSResult);
void TrainResultDown();
void TrainResultUp();
void StationResultDown();
void StationResultUp();
void OneStationResultUp();
void OneStationResultDown();
void ShowStationResultDetail();
void ShowTrainResultDetail();
TBuf<20> GetNowSelectTrain();
TBuf<20> GetOneStationSelectTrain();
TKeyResponse OfferKeyEventL(const TKeyEvent &aKeyEvent, TEventCode aType);
private: // Constructors
/**
* ConstructL
* 2nd phase constructor.
* Perform the second phase construction of a
* CTrainAppView object.
* @param aRect The rectangle this view will be drawn to.
*/
void ConstructL(const TRect& aRect);
/**
* CTrainAppView.
* C++ default constructor.
*/
CMagicTrainAppView(CMagicTrainAppUi* aAppUi);
void DoActivateL( const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
const TDesC8& aCustomMessage );
/**
* DoDeactivate.
* Deletes the Container class object.
*/
CMagicTrainAppUi* iAppUi;
void DoDeactivate();
CFbsBitmap* iBg1;
CFbsBitmap* iBg2;
TFileName iPath;
TInt iWidth;
TInt iTrainResultIndex;
TInt iTrainResultStart;
HBufC* iStation;
HBufC* iStation1;
HBufC* iStation2;
HBufC* iTrain;
RPointerArray<COTResult>* iOTResult;
RPointerArray<CTSSResult>* iTSSResult;
RPointerArray<COSResult>* iOSResult;
TInt iStationResultIndex;
TInt iStationResultStart;
TInt iOneStationResultIndex;
TInt iOneStationResultStart;
TBool iTSSResultDirection;
};
#endif // __TRAINAPPVIEW_h__
// End of File
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -