calendarui/views/dayview/src/calendayutils.cpp
changeset 58 ef813d54df51
parent 50 579cc610882e
child 68 a5a1242fd2e8
equal deleted inserted replaced
50:579cc610882e 58:ef813d54df51
   129     
   129     
   130     return mMainWindow;
   130     return mMainWindow;
   131 }
   131 }
   132 
   132 
   133 /*!
   133 /*!
   134  \brief isHorizontalSwipe
       
   135  
       
   136  \return TRUE if horizontal swipe was recognized (angle in specific range)
       
   137  */
       
   138 bool CalenDayUtils::isHorizontalSwipe(qreal angle) const
       
   139 {
       
   140     bool isHSwipe = false;
       
   141     if ((angle < KCalenSwipeAngle) || 
       
   142         ((angle > 180 - KCalenSwipeAngle) && (angle < 180 + KCalenSwipeAngle)) ||
       
   143         (angle > 360 - KCalenSwipeAngle)) {
       
   144         isHSwipe = true;
       
   145     }
       
   146     
       
   147     return isHSwipe;
       
   148 }
       
   149 
       
   150 /*!
       
   151  \brief getEventValidStartEndTime
   134  \brief getEventValidStartEndTime
   152  \brief Get event's valid start/end time from agenda entry.
   135  \brief Get event's valid start/end time from agenda entry.
   153  */
   136  */
   154 void CalenDayUtils::getEventValidStartEndTime( QDateTime& start, QDateTime& end, 
   137 void CalenDayUtils::getEventValidStartEndTime( QDateTime& start, QDateTime& end, 
   155                                     AgendaEntry& entry, QDateTime& currentDate )
   138                                     const AgendaEntry& entry, QDateTime& currentDate )
   156 {
   139 {
   157     start = entry.startTime();
   140     start = entry.startTime();
   158     end = entry.endTime();
   141     end = entry.endTime();
   159     
   142     
   160     if ( !CalenDateUtils::onSameDay( start, currentDate ) ) {
   143     if ( !CalenDateUtils::onSameDay( start, currentDate ) ) {