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
39namespace mKCal {
40
46{
47public:
51 typedef QSharedPointer<Notebook> Ptr;
52
56 typedef QSharedPointer<const Notebook> ConstPtr;
57
61 typedef QList<Ptr> List;
62
66 Notebook();
67
68 Notebook(const QString &name, const QString &description,
69 const QString &color = {});
70
71 Notebook(const QString &uid, const QString &name,
72 const QString &description, const QString &color,
73 bool isShared, bool isMaster, bool oviSync,
74 bool isReadOnly, bool isVisible);
75
76 Notebook(const QString &uid, const QString &name,
77 const QString &description, const QString &color,
78 bool isShared, bool isMaster, bool isSynchronized,
79 bool isReadOnly, bool isVisible, const QString &pluginName,
80 const QString &account, int attachmentSize);
81
86 Notebook(const Notebook &n);
87
91 virtual ~Notebook();
92
97 QString uid() const;
98
104 void setUid(const QString &uid);
105
111 QString name() const;
112
118 void setName(const QString &name);
119
124 QString description() const;
125
130 void setDescription(const QString &description);
131
136 QString color() const;
137
142 void setColor(const QString &color);
143
148 bool isShared() const;
149
155 void setIsShared(bool isShared);
156
161 bool isMaster() const;
162
169 void setIsMaster(bool isMaster);
170
175 bool isSynchronized() const;
176
182 void setIsSynchronized(bool oviSync);
183
188 bool isReadOnly() const;
189
197 void setIsReadOnly(bool isReadOnly);
198
203 bool isVisible() const;
204
211 void setIsVisible(bool isVisible);
212
217 bool isRunTimeOnly() const;
218
224 void setRunTimeOnly(bool isRunTime);
225
230 QDateTime syncDate() const;
231
238 void setSyncDate(const QDateTime &syncDate);
239
245 QString pluginName() const;
246
252 void setPluginName(const QString &pluginName);
253
259 QString account() const;
260
266 void setAccount(const QString &account);
267
273 int attachmentSize() const;
274
280 void setAttachmentSize(int size);
281
286 QDateTime modifiedDate() const;
287
294 void setModifiedDate(const QDateTime &modifiedDate);
295
299 QDateTime creationDate() const;
300
307 void setCreationDate(const QDateTime &date);
308
313 bool isShareable() const;
314
319 void setIsShareable(bool isShareable);
320
326 QStringList sharedWith() const;
327
333 QString sharedWithStr() const;
334
340 void setSharedWith(const QStringList &sharedWith);
341
347 void setSharedWithStr(const QString &sharedWith);
348
356 QString syncProfile() const;
357
365 void setSyncProfile(const QString &syncProfile);
366
371 void setEventsAllowed(bool eventsAllowed);
372
376 bool eventsAllowed() const;
377
382 void setJournalsAllowed(bool journalsAllowed);
383
387 bool journalsAllowed() const;
388
393 void setTodosAllowed(bool todosAllowed);
394
398 bool todosAllowed() const;
399
404 bool incidenceAllowed(KCalendarCore::Incidence::Ptr incidence) const;
405
412 void setCustomProperty(const QByteArray &key, const QString &value);
413
420 QString customProperty(const QByteArray &key, const QString &defaultValue = QString()) const;
421
425 QList<QByteArray> customPropertyKeys() const;
426
430 Notebook &operator=(const Notebook &other);
431
435 bool operator==(const Notebook &notebook) const;
436
437private:
438 //@cond PRIVATE
439 class Private;
440 Private *const d;
441 //@endcond
442};
443
444}
445
446#endif
Placeholder for Notebook parameters.
Definition notebook.h:46
QSharedPointer< Notebook > Ptr
A shared pointer to a Notebook object.
Definition notebook.h:51
QList< Ptr > List
List of notebooks.
Definition notebook.h:61
QSharedPointer< const Notebook > ConstPtr
A shared pointer to a non-mutable Notebook.
Definition notebook.h:56
#define MKCAL_EXPORT
Definition mkcal_export.h:29
Definition extendedstorage.h:49

Generated on Thu Nov 28 2024 09:02:24 for libextendedkcal by doxygen 1.12.0