homescreenapp/widgetplugins/hsclockwidgetplugin/src/hsanalogclockwidget.cpp
changeset 61 2b1b11a301d2
parent 60 30f14686fb04
child 77 4b195f3bea29
equal deleted inserted replaced
60:30f14686fb04 61:2b1b11a301d2
    75 
    75 
    76     return false;
    76     return false;
    77 }
    77 }
    78 
    78 
    79 /*!
    79 /*!
       
    80     Return bounding rect
       
    81 */
       
    82 QRectF HsAnalogClockWidget::boundingRect() const
       
    83 {   
       
    84     QRectF currRect = rect();
       
    85     currRect.setHeight(mBackground->iconItemSize().height());
       
    86     currRect.setWidth(mBackground->iconItemSize().width());
       
    87     return currRect;
       
    88 }
       
    89 
       
    90 /*!
       
    91     Return shape
       
    92 */
       
    93 QPainterPath HsAnalogClockWidget::shape() const
       
    94 {   
       
    95     QPainterPath path;
       
    96     path.addEllipse(boundingRect());
       
    97     return path;
       
    98 }
       
    99 
       
   100 /*!
    80     Updates clock visualization according to current time
   101     Updates clock visualization according to current time
    81  */
   102  */
    82 void HsAnalogClockWidget::tick()
   103 void HsAnalogClockWidget::tick()
    83 {
   104 {
    84     updatePrimitives();
   105     updatePrimitives();