~ubuntu-branches/ubuntu/oneiric/kdepim/oneiric-updates

« back to all changes in this revision

Viewing changes to korganizer/views/timelineview/kotimelineview.h

  • Committer: Package Import Robot
  • Author(s): Philip Muškovac
  • Date: 2011-06-28 19:33:24 UTC
  • mfrom: (0.2.13) (0.1.13 sid)
  • Revision ID: package-import@ubuntu.com-20110628193324-8yvjs8sdv9rdoo6c
Tags: 4:4.7.0-0ubuntu1
* New upstream release
  - update install files
  - add missing kdepim-doc package to control file
  - Fix Vcs lines
  - kontact breaks/replaces korganizer << 4:4.6.80
  - tighten the dependency of kdepim-dev on libkdepim4 to fix lintian error

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 
4
4
  Copyright (c) 2007 Till Adam <adam@kde.org>
5
5
 
 
6
  Copyright (c) 2010 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com
 
7
  Copyright (c) 2010 Andras Mantia <andras@kdab.com>
 
8
  Copyright (c) 2010 Sérgio Martins <sergio.martins@kdab.com>
 
9
 
6
10
  This program is free software; you can redistribute it and/or modify
7
11
  it under the terms of the GNU General Public License as published by
8
12
  the Free Software Foundation; either version 2 of the License, or
26
30
 
27
31
#include <koeventview.h>
28
32
 
29
 
#include <kdgantt1/KDGanttView.h>
 
33
#include <Akonadi/Collection>
 
34
#include <Akonadi/Item>
30
35
 
31
36
#include <QMap>
32
37
 
33
 
class KDGanttViewItem;
34
 
 
35
 
namespace KCal {
36
 
  class ResourceCalendar;
37
 
}
38
 
 
39
 
namespace KOrg {
40
 
  class TimelineItem;
41
 
}
 
38
class QStandardItem;
 
39
class QTreeWidget;
 
40
 
 
41
 
 
42
namespace CalendarSupport {
 
43
  class Calendar;
 
44
}
 
45
 
42
46
 
43
47
/**
44
48
  This class provides a view ....
47
51
{
48
52
    Q_OBJECT
49
53
  public:
50
 
    explicit KOTimelineView( Calendar *calendar, QWidget *parent = 0 );
 
54
    explicit KOTimelineView( QWidget *parent = 0 );
51
55
    ~KOTimelineView();
52
56
 
53
 
    virtual KCal::Incidence::List selectedIncidences();
54
 
    virtual KCal::DateList selectedIncidenceDates();
55
 
    virtual int currentDateCount();
56
 
    virtual void showDates( const QDate &, const QDate & );
57
 
    virtual void showIncidences( const KCal::Incidence::List &incidenceList, const QDate &date );
 
57
    virtual Akonadi::Item::List selectedIncidences();
 
58
    virtual KCalCore::DateList selectedIncidenceDates();
 
59
    virtual int currentDateCount() const;
 
60
    virtual void showDates( const QDate &, const QDate &, const QDate &preferredMonth = QDate() );
 
61
    virtual void showIncidences( const Akonadi::Item::List &incidenceList, const QDate &date );
58
62
    virtual void updateView();
59
 
    virtual void changeIncidenceDisplay( KCal::Incidence *incidence, int mode );
60
 
    virtual int maxDatesHint() { return 0; }
61
 
 
 
63
    virtual void changeIncidenceDisplay( const Akonadi::Item &incidence, int mode );
 
64
    virtual int maxDatesHint() const { return 0; }
62
65
    virtual bool eventDurationHint( QDateTime &startDt, QDateTime &endDt, bool &allDay );
63
 
    virtual KOrg::CalPrinterBase::PrintType printType();
64
 
 
65
 
  private:
66
 
    KOrg::TimelineItem *calendarItemForIncidence( KCal::Incidence *incidence );
67
 
    void insertIncidence( KCal::Incidence *incidence );
68
 
    void insertIncidence( KCal::Incidence *incidence, const QDate &day );
69
 
    void removeIncidence( KCal::Incidence *incidence );
70
 
 
71
 
  private slots:
72
 
    void itemSelected( KDGanttViewItem *item );
73
 
    void itemDoubleClicked( KDGanttViewItem *item );
74
 
    void itemRightClicked( KDGanttViewItem *item );
75
 
    void itemMoved( KDGanttViewItem *item );
76
 
    void overscale( KDGanttView::Scale scale );
77
 
    void newEventWithHint( const QDateTime & );
78
 
 
79
 
  private:
80
 
    KCal::Incidence::List mSelectedItemList;
81
 
    KDGanttView *mGantt;
82
 
    QMap<KCal::ResourceCalendar*, QMap<QString, KOrg::TimelineItem*> > mCalendarItemMap;
83
 
    KOEventPopupMenu *mEventPopup;
84
 
    QDate mStartDate, mEndDate;
85
 
    QDateTime mHintDate;
86
 
 
 
66
    virtual void setCalendar( CalendarSupport::Calendar *cal );
 
67
    virtual void setIncidenceChanger( CalendarSupport::IncidenceChanger *changer );
 
68
 
 
69
    // Specific for korg, not in eventviews
 
70
    virtual KOrg::CalPrinterBase::PrintType printType() const;
 
71
 
 
72
  private:
 
73
    class Private;
 
74
    Private * const d;
87
75
};
88
76
 
89
77
#endif