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 <KCalendarCore/Incidence>
36 
37 #include <QtCore/QList>
38 
39 namespace mKCal {
40 
46 {
47 public:
51  typedef QSharedPointer<Notebook> Ptr;
52 
56  typedef QSharedPointer<const Notebook> ConstPtr;
57 
61  typedef QList<Ptr> List;
62 
66  explicit Notebook();
67 
68  explicit Notebook(const QString &name, const QString &description);
69 
70  explicit Notebook(const QString &uid, const QString &name,
71  const QString &description, const QString &color,
72  bool isShared, bool isMaster, bool oviSync,
73  bool isReadOnly, bool isVisible);
74 
75  explicit Notebook(const QString &uid, const QString &name,
76  const QString &description, const QString &color,
77  bool isShared, bool isMaster, bool isSynchronized,
78  bool isReadOnly, bool isVisible, const QString &pluginName,
79  const QString &account, int attachmentSize);
80 
85  explicit Notebook(const Notebook &n);
86 
90  virtual ~Notebook();
91 
96  QString uid() const;
97 
103  void setUid(const QString &uid);
104 
110  QString name() const;
111 
117  void setName(const QString &name);
118 
123  QString description() const;
124 
129  void setDescription(const QString &description);
130 
135  QString color() const;
136 
141  void setColor(const QString &color);
142 
147  bool isShared() const;
148 
154  void setIsShared(bool isShared);
155 
160  bool isMaster() const;
161 
168  void setIsMaster(bool isMaster);
169 
174  bool isSynchronized() const;
175 
181  void setIsSynchronized(bool oviSync);
182 
187  bool isReadOnly() const;
188 
196  void setIsReadOnly(bool isReadOnly);
197 
202  bool isVisible() const;
203 
210  void setIsVisible(bool isVisible);
211 
216  bool isRunTimeOnly() const;
217 
223  void setRunTimeOnly(bool isRunTime);
224 
229  QDateTime syncDate() const;
230 
237  void setSyncDate(const QDateTime &syncDate);
238 
244  QString pluginName() const;
245 
251  void setPluginName(const QString &pluginName);
252 
258  QString account() const;
259 
265  void setAccount(const QString &account);
266 
272  int attachmentSize() const;
273 
279  void setAttachmentSize(int size);
280 
285  QDateTime modifiedDate() const;
286 
293  void setModifiedDate(const QDateTime &modifiedDate);
294 
298  QDateTime creationDate() const;
299 
306  void setCreationDate(const QDateTime &date);
307 
312  bool isDefault() const;
313 
318  void setIsDefault(bool isDefault);
319 
324  bool isShareable() const;
325 
330  void setIsShareable(bool isShareable);
331 
337  QStringList sharedWith() const;
338 
344  QString sharedWithStr() const;
345 
351  void setSharedWith(const QStringList &sharedWith);
352 
358  void setSharedWithStr(const QString &sharedWith);
359 
367  QString syncProfile() const;
368 
376  void setSyncProfile(const QString &syncProfile);
377 
382  void setEventsAllowed(bool eventsAllowed);
383 
387  bool eventsAllowed() const;
388 
393  void setJournalsAllowed(bool journalsAllowed);
394 
398  bool journalsAllowed() const;
399 
404  void setTodosAllowed(bool todosAllowed);
405 
409  bool todosAllowed() const;
410 
415  bool incidenceAllowed(KCalendarCore::Incidence::Ptr incidence) const;
416 
426  void setFlags(int flags);
427 
435  int flags() const;
436 
443  void setCustomProperty(const QByteArray &key, const QString &value);
444 
451  QString customProperty(const QByteArray &key, const QString &defaultValue = QString()) const;
452 
456  QList<QByteArray> customPropertyKeys() const;
457 
461  Notebook &operator=(const Notebook &other);
462 
466  bool operator==(const Notebook &notebook) const;
467 
468 private:
469  //@cond PRIVATE
470  class Private;
471  Private *const d;
472  //@endcond
473 };
474 
475 }
476 
477 #endif
Placeholder for Notebook parameters.
Definition: notebook.h:46
QSharedPointer< const Notebook > ConstPtr
A shared pointer to a non-mutable Notebook.
Definition: notebook.h:56
QSharedPointer< Notebook > Ptr
A shared pointer to a Notebook object.
Definition: notebook.h:51
QList< Ptr > List
List of notebooks.
Definition: notebook.h:61
#define MKCAL_EXPORT
Definition: mkcal_export.h:27
Definition: extendedstorage.h:47

Generated on Wed Jun 9 2021 14:20:48 for libextendedkcal by doxygen 1.9.1