CelestialSphereAppView.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. /*
  2. ============================================================================
  3. Name : CelestialSphereAppView.h
  4. Author : Den Grigorenko
  5. Copyright : Copyright (c) 2008 Den123
  6. Description : Declares view class for application.
  7. ============================================================================
  8. */
  9. #ifndef __CELESTIALSPHEREAPPVIEW_h__
  10. #define __CELESTIALSPHEREAPPVIEW_h__
  11. // INCLUDES
  12. #include <coecntrl.h>
  13. #include <lbssatellite.h>
  14. #include "Magnetic.h"
  15. class CSputnikDrawer;
  16. class CSputnikBarDrawer;
  17. class SFontData;
  18. class CSensorFinder;
  19. // CLASS DECLARATION
  20. class CCelestialSphereAppView : public CCoeControl, public MMagneticReader
  21. {
  22. public:
  23. // New methods
  24. /**
  25. * NewL.
  26. * Two-phased constructor.
  27. * Create a CCelestialSphereAppView object, which will draw itself to aRect.
  28. * @param aRect The rectangle this view will be drawn to.
  29. * @return a pointer to the created instance of CCelestialSphereAppView.
  30. */
  31. static CCelestialSphereAppView* NewL(const TRect& aRect);
  32. /**
  33. * NewLC.
  34. * Two-phased constructor.
  35. * Create a CCelestialSphereAppView object, which will draw itself
  36. * to aRect.
  37. * @param aRect Rectangle this view will be drawn to.
  38. * @return A pointer to the created instance of CCelestialSphereAppView.
  39. */
  40. static CCelestialSphereAppView* NewLC(const TRect& aRect);
  41. /**
  42. * ~CCelestialSphereAppView
  43. * Virtual Destructor.
  44. */
  45. virtual ~CCelestialSphereAppView();
  46. void Update( TPositionSatelliteInfo& aData );
  47. void UpdateError( TInt aError );
  48. public:
  49. // Functions from base classes
  50. /**
  51. * From CCoeControl, Draw
  52. * Draw this CCelestialSphereAppView to the screen.
  53. * @param aRect the rectangle of this view that needs updating
  54. */
  55. void Draw(const TRect& aRect) const;
  56. /**
  57. * From CoeControl, SizeChanged.
  58. * Called by framework when the view size is changed.
  59. */
  60. virtual void SizeChanged();
  61. protected: // MMagneticReader
  62. void DataReceivedL(TInt aAngle, TInt aAccuracyLevel);
  63. private:
  64. // Constructors
  65. /**
  66. * ConstructL
  67. * 2nd phase constructor.
  68. * Perform the second phase construction of a
  69. * CCelestialSphereAppView object.
  70. * @param aRect The rectangle this view will be drawn to.
  71. */
  72. void ConstructL(const TRect& aRect);
  73. /**
  74. * CCelestialSphereAppView.
  75. * C++ default constructor.
  76. */
  77. CCelestialSphereAppView();
  78. private:
  79. CSensorFinder* iFinder;
  80. TPositionSatelliteInfo iSatData;
  81. HBufC* iWaitStr;
  82. SFontData* iFontData;
  83. CSputnikDrawer* iSputnikDrawer;
  84. CSputnikBarDrawer* iSputnikBarDrawer;
  85. };
  86. #endif // __CELESTIALSPHEREAPPVIEW_h__
  87. // End of File