~ubuntu-branches/ubuntu/raring/kdepim/raring-proposed

« back to all changes in this revision

Viewing changes to korganizer/views/timespentview/kotimespentview.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2012-06-07 07:56:38 UTC
  • mfrom: (0.2.27)
  • Revision ID: package-import@ubuntu.com-20120607075638-0luhdq11z7sgvs4m
Tags: 4:4.8.80-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
*/
24
24
 
25
25
#include "kotimespentview.h"
26
 
#include "koglobals.h"
27
 
#include "koprefs.h"
28
26
 
29
27
#include <calendarsupport/calendar.h>
30
 
#include <calendarsupport/incidencechanger.h>
31
28
#include <calendarsupport/kcalprefs.h>
32
29
#include <calendarsupport/utils.h>
33
30
 
34
 
#include <kcalcore/event.h>
 
31
#include <KCalCore/Event>
35
32
 
36
 
#include <QDate>
37
 
#include <QMap>
38
33
#include <QBoxLayout>
39
34
#include <QPainter>
40
 
#include <QPainterPath>
41
35
#include <QPaintEvent>
42
36
 
43
 
using namespace KCalCore;
44
 
 
45
37
class TimeSpentWidget : public QWidget
46
38
{
47
39
  public:
88
80
      int total = 0;
89
81
 
90
82
      foreach ( const Akonadi::Item &item, mEventList ) {
91
 
        const Event::Ptr e = CalendarSupport::event( item );
 
83
        const KCalCore::Event::Ptr e = CalendarSupport::event( item );
92
84
        Q_ASSERT( e );
93
85
        KDateTime selectedStart( mTimeSpentView->mStartDate,
94
86
                                 QTime( 0, 0 ),
109
101
 
110
102
          // timesInInterval only return events that have their start inside the interval
111
103
          // so we resize the interval by -eventDuration
112
 
          DateTimeList times = e->recurrence()->timesInInterval(
 
104
          KCalCore::DateTimeList times = e->recurrence()->timesInInterval(
113
105
            selectedStart.addSecs( -eventDuration ), selectedEnd );
114
106
 
115
107
          foreach ( const KDateTime &kdt, times ) {