idlehomescreen/xmluirendering/renderingplugins/xnclockfactory/inc/xnclockcontrol.h
branchRCL_3
changeset 102 ba63c83f4716
parent 88 3321d3e205b6
equal deleted inserted replaced
93:b01126ce0bec 102:ba63c83f4716
    26 
    26 
    27 // Forward declarations
    27 // Forward declarations
    28 class CWindowGc;
    28 class CWindowGc;
    29 class CXnClockAdapter;
    29 class CXnClockAdapter;
    30 class CXnClockFace;
    30 class CXnClockFace;
    31 class CXnNodePluginIf;
       
    32 
    31 
    33 // Class declaration
    32 // Class declaration
    34 /**
    33 /**
    35 *  @ingroup group_xnclockfactory
    34 *  @ingroup group_xnclockfactory
    36 *  @lib xnclockfactory.lib
    35 *  @lib xnclockfactory.lib
    43     /**
    42     /**
    44     * Two-phased constructor.
    43     * Two-phased constructor.
    45     *
    44     *
    46     * @since S60 5.1
    45     * @since S60 5.1
    47     *
    46     *
    48     * @param aAdapter Reference to clockadapter.
    47     * @param  aContainerWindow   Container window for the clock component.
       
    48     *
    49     * @param  aFormatFromLocale  Boolean flag to indicate whether the clock
    49     * @param  aFormatFromLocale  Boolean flag to indicate whether the clock
    50     *                            format should be updated from the locale.
    50     *                            format should be updated from the locale.
    51     * @param  aFormat Boolean flag that indicates whether the
    51     *
    52     *                            clock is digital or analog.
    52     * @param  aContextPaneClock  Boolean flag that indicates whether the
       
    53     *                            clock is in the context pane.
    53     *
    54     *
    54     * @return Newly constructed object.
    55     * @return Newly constructed object.
    55     */
    56     */
    56     static CXnClockControl* NewL( CXnClockAdapter& aAdapter,
    57     static CXnClockControl* NewL( CXnClockAdapter* aAdapter,
    57                                   const TBool aFormatFromLocale,
    58                                   const TBool aFormatFromLocale,
    58                                   const TClockFormat aFormat );
    59                                   const TClockFormat aFormat );
    59                                               
    60                                               
    60 
    61 
    61     /**
    62     /**
    88         
    89         
    89     /**
    90     /**
    90     * Draws the clock
    91     * Draws the clock
    91     *
    92     *
    92     * @param aGc Context where to draw
    93     * @param aGc Context where to draw
    93     * @param aNode Node to draw
    94     * @param aRect Rect Clock rect 
    94     * @param aAmpm Possible am/pm text to draw 
       
    95     */
    95     */
    96     void Draw( CWindowGc& aGc, CXnNodePluginIf* aNode, CXnNodePluginIf* aAmpm );
    96     void Draw( CWindowGc& aGc, const TRect& aRect );
    97     
    97     
    98     /**
    98     /**
    99     * Starts the clock timer.
    99     * Starts the clock timer.
   100     * Used when the clock gains visibility.
   100     * Used when the clock gains visibility.
   101     */
   101     */
   104     /**
   104     /**
   105     * Stops the clock timer.
   105     * Stops the clock timer.
   106     * Used when the clock loses visibility.
   106     * Used when the clock loses visibility.
   107     */
   107     */
   108     void StopTimer();
   108     void StopTimer();
   109     
       
   110     /**
       
   111     * Checks if clock format has changed 
       
   112     */
       
   113     void CheckClockFormatL();
       
   114     
       
   115     /**
       
   116     * Reset font and color 
       
   117     */
       
   118     void ResetFont();
       
   119 
   109 
   120 private: // New functions
   110 private: // New functions
   121 
   111 
   122     /**
   112     /**
   123     * Timer callback for clock updates
   113     * Timer callback for clock updates
   131 private:
   121 private:
   132 
   122 
   133     /**
   123     /**
   134     * C++ default constructor.
   124     * C++ default constructor.
   135     */
   125     */
   136     CXnClockControl( CXnClockAdapter& aAdapter,
   126     CXnClockControl( CXnClockAdapter* aAdapter,
   137                      const TBool aFormatFromLocale,
   127                      const TBool aFormatFromLocale,
   138                      const TClockFormat aFormat );
   128                      const TClockFormat aFormat );
   139                         
   129                         
   140     /**
   130     /**
   141     * By default Symbian 2nd phase constructor is private.
   131     * By default Symbian 2nd phase constructor is private.
   147     // Timer, owned
   137     // Timer, owned
   148     CPeriodic*              iTimer;
   138     CPeriodic*              iTimer;
   149     // Clock face, owned
   139     // Clock face, owned
   150     CXnClockFace*           iFace;
   140     CXnClockFace*           iFace;
   151     // Clock adapter, not owned
   141     // Clock adapter, not owned
   152     CXnClockAdapter&        iAdapter;            
   142     CXnClockAdapter*        iAdapter;            
   153     // Clock format
   143     // Clock format
   154     TClockFormat            iClockFormat;
   144     TClockFormat            iClockFormat;    
   155     // Time format
   145     // Flag indicating whetger format clock from locale
   156     TTimeFormat             iTimeFormat;
   146     TBool                   iFormatFromLocale;    
   157     // Flag indicating whether format clock from locale
       
   158     TBool                   iFormatFromLocale;
       
   159     };
   147     };
   160 
   148 
   161 #endif // _XNCLOCKCONTROL_H
   149 #endif // _XNCLOCKCONTROL_H
   162 
   150 
   163 // End of File
   151 // End of File