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

« back to all changes in this revision

Viewing changes to calendarviews/eventviews/multiagenda/multiagendaview.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
  Copyright (c) 2007 Volker Krause <vkrause@kde.org>
 
3
  Copyright (C) 2010 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.net
 
4
  Author: Sergio Martins <sergio.martins@kdab.com>
 
5
 
 
6
  This program is free software; you can redistribute it and/or modify
 
7
  it under the terms of the GNU General Public License as published by
 
8
  the Free Software Foundation; either version 2 of the License, or
 
9
  (at your option) any later version.
 
10
 
 
11
  This program is distributed in the hope that it will be useful,
 
12
  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 
14
  GNU General Public License for more details.
 
15
 
 
16
  You should have received a copy of the GNU General Public License along
 
17
  with this program; if not, write to the Free Software Foundation, Inc.,
 
18
  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
19
*/
 
20
 
 
21
#ifndef EVENTVIEWS_MULTIAGENDAVIEW_H_H
 
22
#define EVENTVIEWS_MULTIAGENDAVIEW_H_H
 
23
 
 
24
#include "eventview.h"
 
25
 
 
26
#include <QDateTime>
 
27
 
 
28
namespace EventViews {
 
29
 
 
30
class ConfigDialogInterface;
 
31
 
 
32
/**
 
33
  Shows one agenda for every resource side-by-side.
 
34
*/
 
35
class EVENTVIEWS_EXPORT MultiAgendaView : public EventView
 
36
{
 
37
  Q_OBJECT
 
38
  public:
 
39
    explicit MultiAgendaView( QWidget *parent = 0 );
 
40
    ~MultiAgendaView();
 
41
 
 
42
    Akonadi::Item::List selectedIncidences() const;
 
43
    KCalCore::DateList selectedIncidenceDates() const;
 
44
    int currentDateCount() const;
 
45
    int maxDatesHint() const;
 
46
 
 
47
    bool eventDurationHint( QDateTime &startDt, QDateTime &endDt, bool &allDay ) const;
 
48
 
 
49
    /* reimp */
 
50
    void setCalendar( CalendarSupport::Calendar *cal );
 
51
 
 
52
    /* reimp */
 
53
    bool hasConfigurationDialog() const;
 
54
 
 
55
    void setChanges( Changes changes );
 
56
 
 
57
    bool customColumnSetupUsed() const;
 
58
    int customNumberOfColumns() const;
 
59
    QVector<QString> customColumnTitles() const;
 
60
    QVector<KCheckableProxyModel*>collectionSelectionModels() const;
 
61
 
 
62
    void setPreferences( const PrefsPtr &prefs );
 
63
 
 
64
  Q_SIGNALS:
 
65
    void showNewEventPopupSignal();
 
66
    void showIncidencePopupSignal( const Akonadi::Item &, const QDate & );
 
67
 
 
68
  public slots:
 
69
 
 
70
    void customCollectionsChanged( ConfigDialogInterface *dlg );
 
71
 
 
72
    void showDates( const QDate &start, const QDate &end, const QDate &preferredMonth = QDate() );
 
73
    void showIncidences( const Akonadi::Item::List &incidenceList, const QDate &date );
 
74
    void updateView();
 
75
    void updateConfig();
 
76
 
 
77
    void setIncidenceChanger( CalendarSupport::IncidenceChanger *changer );
 
78
 
 
79
  protected:
 
80
    void resizeEvent( QResizeEvent *event );
 
81
    void showEvent( QShowEvent *event );
 
82
 
 
83
    /* reimp */void doRestoreConfig( const KConfigGroup &configGroup );
 
84
    /* reimp */void doSaveConfig( KConfigGroup &configGroup );
 
85
 
 
86
  protected Q_SLOTS:
 
87
    /**
 
88
     * Reimplemented from KOrg::BaseView
 
89
     */
 
90
    void collectionSelectionChanged();
 
91
 
 
92
  private slots:
 
93
    void slotSelectionChanged();
 
94
    void slotClearTimeSpanSelection();
 
95
    void resizeSplitters();
 
96
    void setupScrollBar();
 
97
    void zoomView( const int delta, const QPoint &pos, const Qt::Orientation ori );
 
98
    void slotResizeScrollView();
 
99
    void recreateViews();
 
100
 
 
101
  private:
 
102
    class Private;
 
103
    Private *const d;
 
104
};
 
105
 
 
106
}
 
107
 
 
108
#endif