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 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 isShareable() const;
313
318 void setIsShareable(bool isShareable);
319
325 QStringList sharedWith() const;
326
332 QString sharedWithStr() const;
333
339 void setSharedWith(const QStringList &sharedWith);
340
346 void setSharedWithStr(const QString &sharedWith);
347
355 QString syncProfile() const;
356
364 void setSyncProfile(const QString &syncProfile);
365
370 void setEventsAllowed(bool eventsAllowed);
371
375 bool eventsAllowed() const;
376
381 void setJournalsAllowed(bool journalsAllowed);
382
386 bool journalsAllowed() const;
387
392 void setTodosAllowed(bool todosAllowed);
393
397 bool todosAllowed() const;
398
403 bool incidenceAllowed(KCalendarCore::Incidence::Ptr incidence) const;
404
411 void setCustomProperty(const QByteArray &key, const QString &value);
412
419 QString customProperty(const QByteArray &key, const QString &defaultValue = QString()) const;
420
424 QList<QByteArray> customPropertyKeys() const;
425
429 Notebook &operator=(const Notebook &other);
430
434 bool operator==(const Notebook &notebook) const;
435
436private:
437 //@cond PRIVATE
438 class Private;
439 Private *const d;
440 //@endcond
441};
442
443}
444
445#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:49

Generated on Mon May 30 2022 06:54:51 for libextendedkcal by doxygen 1.9.6