• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

korganizer

  • sources
  • kde-4.12
  • kdepim
  • korganizer
akonadicollectionview.h
Go to the documentation of this file.
1 /*
2  This file is part of KOrganizer.
3 
4  Copyright (c) 2003,2004 Cornelius Schumacher <schumacher@kde.org>
5  Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
6  Copyright (C) 2009 Sebastian Sauer <sebsauer@kdab.net>
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 
27 #ifndef KORG_AKONADICOLLECTIONVIEW_H
28 #define KORG_AKONADICOLLECTIONVIEW_H
29 
30 #include "calendarview.h"
31 #include <Akonadi/Collection>
32 
33 class AkonadiCollectionView;
34 
35 namespace Akonadi {
36  class EntityTreeView;
37  class EntityTreeModel;
38  class StandardCalendarActionManager;
39 }
40 
41 class KAction;
42 class KJob;
43 class QAbstractProxyModel;
44 class QModelIndex;
45 
49 class AkonadiCollectionViewFactory : public CalendarViewExtension::Factory
50 {
51  public:
52  explicit AkonadiCollectionViewFactory( CalendarView *view );
53 
54  CalendarView *view() const;
55  AkonadiCollectionView *collectionView() const;
56 
57  CalendarViewExtension *create( QWidget * );
58 
59  private:
60  CalendarView *mView;
61  AkonadiCollectionView *mAkonadiCollectionView;
62 };
63 
67 class AkonadiCollectionView : public CalendarViewExtension
68 {
69  Q_OBJECT
70  public:
71  explicit AkonadiCollectionView( CalendarView *view, bool hasContextMenu = true,
72  QWidget *parent = 0 );
73  ~AkonadiCollectionView();
74 
75  Akonadi::EntityTreeView *view() const;
76 
77  KCheckableProxyModel *collectionSelectionProxyModel() const;
78  void setCollectionSelectionProxyModel( KCheckableProxyModel * );
79 
80  Akonadi::Collection selectedCollection() const;
81  Akonadi::Collection::List checkedCollections() const;
82  bool isChecked(const Akonadi::Collection &) const;
83 
84  Q_SIGNALS:
85  void resourcesChanged( bool enabled );
86  void resourcesAddedRemoved();
87  void defaultResourceChanged( const Akonadi::Collection & );
88  void colorsChanged();
89 
90  private Q_SLOTS:
91  void updateView();
92  void updateMenu();
93  void restoreTreeState();
94  void checkNewCalendar( const QModelIndex &parent, int begin, int end );
95 
96  void newCalendar();
97  void newCalendarDone( KJob * );
98 
99  void deleteCalendar();
100  void deleteCalendarDone( KJob * );
101  void rowsInserted( const QModelIndex &, int, int );
102  void assignColor();
103  void disableColor();
104  void setDefaultCalendar();
105 
106  private:
107  Akonadi::EntityTreeModel *entityTreeModel() const;
108 
109  Akonadi::StandardCalendarActionManager *mActionManager;
110  Akonadi::EntityTreeView *mCollectionView;
111  QAbstractProxyModel *mBaseModel;
112  KCheckableProxyModel *mSelectionProxyModel;
113  KAction *mAssignColor;
114  KAction *mDisableColor;
115  KAction *mDefaultCalendar;
116  bool mNotSendAddRemoveSignal;
117  bool mWasDefaultCalendar;
118  bool mHasContextMenu;
119  };
120 
121 #endif
KCheckableProxyModel
AkonadiCollectionView::collectionSelectionProxyModel
KCheckableProxyModel * collectionSelectionProxyModel() const
Definition: akonadicollectionview.cpp:423
AkonadiCollectionView::AkonadiCollectionView
AkonadiCollectionView(CalendarView *view, bool hasContextMenu=true, QWidget *parent=0)
Definition: akonadicollectionview.cpp:201
AkonadiCollectionView::colorsChanged
void colorsChanged()
QWidget
AkonadiCollectionView::view
Akonadi::EntityTreeView * view() const
Definition: akonadicollectionview.cpp:428
CalendarViewExtension::Factory
Definition: calendarview.h:82
AkonadiCollectionViewFactory::create
CalendarViewExtension * create(QWidget *)
Definition: akonadicollectionview.cpp:177
AkonadiCollectionViewFactory::collectionView
AkonadiCollectionView * collectionView() const
Definition: akonadicollectionview.cpp:196
CalendarView
This is the main calendar widget.
Definition: calendarview.h:99
AkonadiCollectionViewFactory::view
CalendarView * view() const
Definition: akonadicollectionview.cpp:191
CalendarViewExtension
Definition: calendarview.h:77
AkonadiCollectionView::checkedCollections
Akonadi::Collection::List checkedCollections() const
Definition: akonadicollectionview.cpp:587
AkonadiCollectionViewFactory::AkonadiCollectionViewFactory
AkonadiCollectionViewFactory(CalendarView *view)
Definition: akonadicollectionview.cpp:62
AkonadiCollectionView::selectedCollection
Akonadi::Collection selectedCollection() const
Definition: akonadicollectionview.cpp:573
AkonadiCollectionView::~AkonadiCollectionView
~AkonadiCollectionView()
Definition: akonadicollectionview.cpp:342
AkonadiCollectionView
This class provides a view of calendar resources.
Definition: akonadicollectionview.h:67
AkonadiCollectionView::resourcesChanged
void resourcesChanged(bool enabled)
AkonadiCollectionView::resourcesAddedRemoved
void resourcesAddedRemoved()
AkonadiCollectionView::isChecked
bool isChecked(const Akonadi::Collection &) const
Definition: akonadicollectionview.cpp:608
calendarview.h
AkonadiCollectionView::setCollectionSelectionProxyModel
void setCollectionSelectionProxyModel(KCheckableProxyModel *)
Definition: akonadicollectionview.cpp:409
KJob
AkonadiCollectionView::defaultResourceChanged
void defaultResourceChanged(const Akonadi::Collection &)
AkonadiCollectionViewFactory
The factory for AkonadiCollectionView instances.
Definition: akonadicollectionview.h:49
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:56:19 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

korganizer

Skip menu "korganizer"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal