notebook.h
Go to the documentation of this file.
1 /*
2  This file is part of the mkcal library.
3 
4  Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
5  Contact: Alvaro Manera <alvaro.manera@nokia.com>
6 
7  This library is free software; you can redistribute it and/or
8  modify it under the terms of the GNU Library General Public
9  License as published by the Free Software Foundation; either
10  version 2 of the License, or (at your option) any later version.
11 
12  This library 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 GNU
15  Library General Public License for more details.
16 
17  You should have received a copy of the GNU Library General Public License
18  along with this library; see the file COPYING.LIB. If not, write to
19  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  Boston, MA 02110-1301, USA.
21 */
30 #ifndef MKCAL_NOTEBOOK_H
31 #define MKCAL_NOTEBOOK_H
32 
33 #include "mkcal_export.h"
34 
35 #include <incidence.h>
36 
37 #include <kdatetime.h>
38 
39 #include <QtCore/QList>
40 
41 namespace mKCal {
42 
48 {
49 public:
53  typedef QSharedPointer<Notebook> Ptr;
54 
58  typedef QSharedPointer<const Notebook> ConstPtr;
59 
63  typedef QList<Ptr> List;
64 
68  explicit Notebook();
69 
70  explicit Notebook(const QString &name, const QString &description);
71 
72  explicit Notebook(const QString &uid, const QString &name,
73  const QString &description, const QString &color,
74  bool isShared, bool isMaster, bool oviSync,
75  bool isReadOnly, bool isVisible);
76 
77  explicit Notebook(const QString &uid, const QString &name,
78  const QString &description, const QString &color,
79  bool isShared, bool isMaster, bool isSynchronized,
80  bool isReadOnly, bool isVisible, const QString &pluginName,
81  const QString &account, int attachmentSize);
82 
87  explicit Notebook(const Notebook &n);
88 
92  virtual ~Notebook();
93 
98  QString uid() const;
99 
105  void setUid(const QString &uid);
106 
112  QString name() const;
113 
119  void setName(const QString &name);
120 
125  QString description() const;
126 
131  void setDescription(const QString &description);
132 
137  QString color() const;
138 
143  void setColor(const QString &color);
144 
149  bool isShared() const;
150 
156  void setIsShared(bool isShared);
157 
162  bool isMaster() const;
163 
170  void setIsMaster(bool isMaster);
171 
176  bool isSynchronized() const;
177 
183  void setIsSynchronized(bool oviSync);
184 
189  bool isReadOnly() const;
190 
198  void setIsReadOnly(bool isReadOnly);
199 
204  bool isVisible() const;
205 
212  void setIsVisible(bool isVisible);
213 
218  bool isRunTimeOnly() const;
219 
225  void setRunTimeOnly(bool isRunTime);
226 
231  KDateTime syncDate() const;
232 
239  void setSyncDate(const KDateTime &syncDate);
240 
246  QString pluginName() const;
247 
253  void setPluginName(const QString &pluginName);
254 
260  QString account() const;
261 
267  void setAccount(const QString &account);
268 
274  int attachmentSize() const;
275 
281  void setAttachmentSize(int size);
282 
287  KDateTime modifiedDate() const;
288 
295  void setModifiedDate(const KDateTime &modifiedDate);
296 
300  KDateTime creationDate() const;
301 
308  void setCreationDate(const KDateTime &date);
309 
314  bool isDefault() const;
315 
320  void setIsDefault(bool isDefault);
321 
326  bool isShareable() const;
327 
332  void setIsShareable(bool isShareable);
333 
339  QStringList sharedWith() const;
340 
346  QString sharedWithStr() const;
347 
353  void setSharedWith(const QStringList &sharedWith);
354 
360  void setSharedWithStr(const QString &sharedWith);
361 
369  QString syncProfile() const;
370 
378  void setSyncProfile(const QString &syncProfile);
379 
384  void setEventsAllowed(bool eventsAllowed);
385 
389  bool eventsAllowed() const;
390 
395  void setJournalsAllowed(bool journalsAllowed);
396 
400  bool journalsAllowed() const;
401 
406  void setTodosAllowed(bool todosAllowed);
407 
411  bool todosAllowed() const;
412 
417  bool incidenceAllowed(KCalCore::Incidence::Ptr incidence) const;
418 
428  void setFlags(int flags);
429 
437  int flags() const;
438 
445  void setCustomProperty(const QByteArray &key, const QString &value);
446 
453  QString customProperty(const QByteArray &key, const QString &defaultValue = QString()) const;
454 
458  QList<QByteArray> customPropertyKeys() const;
459 
463  Notebook &operator=(const Notebook &other);
464 
468  bool operator==(const Notebook &notebook) const;
469 
470 private:
471  //@cond PRIVATE
472  class Private;
473  Private *const d;
474  //@endcond
475 };
476 
477 }
478 
479 #endif
mkcal_export.h
mKCal::Notebook::Ptr
QSharedPointer< Notebook > Ptr
A shared pointer to a Notebook object.
Definition: notebook.h:53
mKCal
Definition: extendedstorage.h:49
mKCal::Notebook
Placeholder for Notebook parameters.
Definition: notebook.h:47
mKCal::Notebook::List
QList< Ptr > List
List of notebooks.
Definition: notebook.h:63
MKCAL_EXPORT
#define MKCAL_EXPORT
Definition: mkcal_export.h:27
mKCal::Notebook::ConstPtr
QSharedPointer< const Notebook > ConstPtr
A shared pointer to a non-mutable Notebook.
Definition: notebook.h:58

Generated on Sat Oct 17 2020 06:54:57 for libextendedkcal by doxygen 1.8.17