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

knotes

  • sources
  • kde-4.12
  • kdepim
  • knotes
  • resource
resourcemanager.h
Go to the documentation of this file.
1 /*******************************************************************
2  This file is part of KNotes.
3 
4  Copyright (c) 2004, Bo Thorsen <bo@sonofthor.dk>
5  2004, Michael Brade <brade@kde.org>
6 
7  This program is free software; you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation; either version 2 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20  MA 02110-1301, USA.
21 
22  In addition, as a special exception, the copyright holders give
23  permission to link the code of this program with any edition of
24  the Qt library by Trolltech AS, Norway (or with modified versions
25  of Qt that use the same license as Qt), and distribute linked
26  combinations including the two. You must obey the GNU General
27  Public License in all respects for all of the code used other than
28  Qt. If you modify this file, you may extend this exception to
29  your version of the file, but you are not obligated to do so. If
30  you do not wish to do so, delete this exception statement from
31  your version.
32 *******************************************************************/
33 
34 #ifndef KNOTES_RESOURCEMANAGER_H
35 #define KNOTES_RESOURCEMANAGER_H
36 
37 #include "knotes_export.h"
38 #include <kcal/alarm.h>
39 #include <knotes/resource/resourcenotes.h>
40 #include <kresources/manager.h>
41 
42 class KNote;
43 
44 namespace KCal {
45 class Journal;
46 }
47 
48 
49 class KNOTES_EXPORT KNotesResourceManager
50  : public QObject, public KRES::ManagerObserver<ResourceNotes>
51 {
52  Q_OBJECT
53 public:
54  KNotesResourceManager();
55  virtual ~KNotesResourceManager();
56 
57  void load();
58  void save();
59 
60  bool addNewNote( KCal::Journal *journal );
61  void registerNote( ResourceNotes *resource, KCal::Journal *journal );
62 
63  void deleteNote( KCal::Journal *journal );
64 
65  KCal::Alarm::List alarms( const KDateTime &from, const KDateTime &to );
66 
67  // from the ManagerObserver interface
68  virtual void resourceAdded( ResourceNotes *resource );
69  virtual void resourceModified( ResourceNotes *resource );
70  virtual void resourceDeleted( ResourceNotes *resource );
71 
72 signals:
73  void sigRegisteredNote( KCal::Journal *journal );
74  void sigDeregisteredNote( KCal::Journal *journal );
75 
76 private:
77  KRES::Manager<ResourceNotes> *m_manager;
78  QMultiHash<QString,ResourceNotes*> m_resourceMap;
79 };
80 
81 
82 #endif // RESOURCEMANAGER_H
resourcenotes.h
KNote
Definition: knote.h:50
QObject
KNOTES_EXPORT
#define KNOTES_EXPORT
Definition: knotes_export.h:35
ResourceNotes
This class provides the interfaces for a KNotes resource.
Definition: resourcenotes.h:54
knotes_export.h
KNotesResourceManager
Definition: resourcemanager.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:33 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

knotes

Skip menu "knotes"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

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