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

« back to all changes in this revision

Viewing changes to calendarviews/eventviews/list/listview.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:
 
1
/*
 
2
  This file is part of KOrganizer.
 
3
 
 
4
  Copyright (c) 1999 Preston Brown <pbrown@kde.org>
 
5
  Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
 
6
  Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
 
7
 
 
8
  This program is free software; you can redistribute it and/or modify
 
9
  it under the terms of the GNU General Public License as published by
 
10
  the Free Software Foundation; either version 2 of the License, or
 
11
  (at your option) any later version.
 
12
 
 
13
  This program is distributed in the hope that it will be useful,
 
14
  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 
16
  GNU General Public License for more details.
 
17
 
 
18
  You should have received a copy of the GNU General Public License along
 
19
  with this program; if not, write to the Free Software Foundation, Inc.,
 
20
  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
21
 
 
22
  As a special exception, permission is given to link this program
 
23
  with any edition of Qt, and distribute the resulting executable,
 
24
  without including the source code for Qt in the source distribution.
 
25
*/
 
26
#ifndef CALENDARVIEWS_LISTVIEW_H
 
27
#define CALENDARVIEWS_LISTVIEW_H
 
28
 
 
29
#include "eventview.h"
 
30
#include "customlistviewitem.h"
 
31
 
 
32
#include <KCalCore/Incidence>
 
33
 
 
34
#include <KConfig>
 
35
 
 
36
#include <QHash>
 
37
#include <QList>
 
38
 
 
39
namespace CalendarSupport {
 
40
  class Calendar;
 
41
}
 
42
 
 
43
typedef CustomListViewItem<Akonadi::Item::Id> ListViewItem;
 
44
 
 
45
 
 
46
/**
 
47
  This class provides a multi-column list view of events.  It can
 
48
  display events from one particular day or several days, it doesn't
 
49
  matter.  To use a view that only handles one day at a time, use
 
50
  KODayListView.
 
51
 
 
52
  @short multi-column list view of various events.
 
53
  @author Preston Brown <pbrown@kde.org>
 
54
  @see KOBaseView, KODayListView
 
55
*/
 
56
 
 
57
namespace EventViews {
 
58
 
 
59
class ListView;
 
60
 
 
61
class EVENTVIEWS_EXPORT ListView : public EventView
 
62
{
 
63
  Q_OBJECT
 
64
  public:
 
65
    explicit ListView( CalendarSupport::Calendar *calendar,
 
66
                       QWidget *parent = 0,  bool nonInteractive = false );
 
67
    ~ListView();
 
68
 
 
69
    virtual int currentDateCount() const;
 
70
    virtual Akonadi::Item::List selectedIncidences() const;
 
71
    virtual KCalCore::DateList selectedIncidenceDates() const;
 
72
 
 
73
    void showDates( bool show );
 
74
 
 
75
    // Shows all incidences of the calendar
 
76
    void showAll();
 
77
 
 
78
    void readSettings( KConfig *config );
 
79
    void writeSettings( KConfig *config );
 
80
 
 
81
    void clear();
 
82
    QSize sizeHint() const;
 
83
 
 
84
  public slots:
 
85
    virtual void updateView();
 
86
    virtual void showDates( const QDate &start, const QDate &end, const QDate &preferredMonth = QDate() );
 
87
    virtual void showIncidences( const Akonadi::Item::List &incidenceList, const QDate &date );
 
88
 
 
89
    void clearSelection();
 
90
 
 
91
    void showDates();
 
92
    void hideDates();
 
93
 
 
94
    void changeIncidenceDisplay( const Akonadi::Item &, int );
 
95
 
 
96
    void defaultItemAction( const QModelIndex & );
 
97
    void defaultItemAction( const Akonadi::Item::Id id );
 
98
 
 
99
    void popupMenu( const QPoint & );
 
100
 
 
101
  Q_SIGNALS:
 
102
    void showNewEventPopupSignal();
 
103
    void showIncidencePopupSignal( const Akonadi::Item &, const QDate & );
 
104
 
 
105
  protected slots:
 
106
    void processSelectionChange();
 
107
 
 
108
  private:
 
109
    class Private;
 
110
    Private *const d;
 
111
};
 
112
 
 
113
}
 
114
 
 
115
#endif