~ubuntu-branches/ubuntu/precise/kdepim/precise-proposed

« back to all changes in this revision

Viewing changes to calendarviews/eventviews/timeline/timelineitem.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2011-12-15 14:17:51 UTC
  • mfrom: (0.2.20)
  • Revision ID: package-import@ubuntu.com-20111215141751-yg890pa7vnlo34e0
Tags: 4:4.7.90-0ubuntu1
new upstream beta release

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
19
*/
20
20
 
21
 
#ifndef CALENDARVIEWS_TIMELINEITEM_H
22
 
#define CALENDARVIEWS_TIMELINEITEM_H
 
21
#ifndef EVENTVIEWS_TIMELINEITEM_H
 
22
#define EVENTVIEWS_TIMELINEITEM_H
23
23
 
24
24
#include <KCalCore/Incidence>
25
25
 
31
31
#include <QList>
32
32
#include <QStandardItemModel>
33
33
 
34
 
 
35
34
namespace CalendarSupport {
36
35
  class Calendar;
37
36
}
44
43
{
45
44
  Q_OBJECT
46
45
  public:
47
 
    TimelineItem( CalendarSupport::Calendar *calendar, uint index, QStandardItemModel* model,
 
46
    TimelineItem( CalendarSupport::Calendar *calendar, uint index, QStandardItemModel *model,
48
47
                  QObject *parent );
49
48
 
50
49
    void insertIncidence( const Akonadi::Item &incidence,
54
53
 
55
54
    void moveItems( const Akonadi::Item &incidence, int delta, int duration );
56
55
 
57
 
    void setColor( const QColor& color );
 
56
    void setColor( const QColor &color );
58
57
 
59
58
  private:
60
59
    CalendarSupport::Calendar *mCalendar;
67
66
class TimelineSubItem : public QStandardItem
68
67
{
69
68
  public:
70
 
    TimelineSubItem( const Akonadi::Item &incidence, TimelineItem* parent );
 
69
    TimelineSubItem( const Akonadi::Item &incidence, TimelineItem *parent );
71
70
    ~TimelineSubItem();
72
71
 
73
 
    Akonadi::Item  incidence() const { return mIncidence; }
74
 
 
75
 
    KDateTime originalStart() const { return mStart; }
76
 
    void setOriginalStart( const KDateTime &dt ) { mStart = dt; }
77
 
 
78
 
    void setStartTime( const QDateTime& dt );
 
72
    Akonadi::Item  incidence() const
 
73
    {
 
74
      return mIncidence;
 
75
    }
 
76
 
 
77
    KDateTime originalStart() const
 
78
    {
 
79
      return mStart;
 
80
    }
 
81
 
 
82
    void setOriginalStart( const KDateTime &dt )
 
83
    {
 
84
      mStart = dt;
 
85
    }
 
86
 
 
87
    void setStartTime( const QDateTime &dt );
79
88
    QDateTime startTime() const;
80
89
 
81
 
    void setEndTime( const QDateTime& dt );
 
90
    void setEndTime( const QDateTime &dt );
82
91
    QDateTime endTime() const;
83
92
 
84
 
    TimelineItem *parent() { return mParent; }
 
93
    TimelineItem *parent()
 
94
    {
 
95
      return mParent;
 
96
    }
85
97
 
86
98
    void updateToolTip();
87
99