homescreenapp/widgetplugins/hsclockwidgetplugin/src/hsanalogclockwidget.cpp
changeset 62 341166945d65
parent 51 4785f57bf3d4
child 69 87476091b3f5
equal deleted inserted replaced
57:2e2dc3d30ca8 62:341166945d65
    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();
   147 {
   168 {
   148     if (!contains(event->pos())) {
   169     if (!contains(event->pos())) {
   149         return;
   170         return;
   150     }
   171     }
   151 
   172 
   152     HbInstantFeedback::play(HsConfiguration::clockWidgetTapFeedbackType());
   173     HbInstantFeedback::play(HSCONFIGURATION_GET(clockWidgetTapFeedbackEffect));
   153 
   174 
   154     emit clockTapped();
   175     emit clockTapped();
   155 }
   176 }