summaryrefslogtreecommitdiffabout
path: root/libkcal/sharpformat.h
Unidiff
Diffstat (limited to 'libkcal/sharpformat.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/sharpformat.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/libkcal/sharpformat.h b/libkcal/sharpformat.h
new file mode 100644
index 0000000..0b13862
--- a/dev/null
+++ b/libkcal/sharpformat.h
@@ -0,0 +1,61 @@
1/*
2 This file is part of libkcal.
3
4 Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org>
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
15
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA.
20*/
21#ifndef SHARPFORMAT_H
22#define SHARPAFORMAT_H
23
24#include <qstring.h>
25
26#include "scheduler.h"
27
28#include "calformat.h"
29
30namespace KCal {
31
32/**
33 This class implements the calendar format used by Sharp.
34*/
35class SharpFormat : public QObject {
36 public:
37 /** Create new iCalendar format. */
38 SharpFormat();
39 virtual ~SharpFormat();
40
41 bool load( Calendar * ,Calendar *);
42 bool save( Calendar * );
43 void setCategoriesList ( QStringList * cat ){ mCategories = cat; }
44 bool fromString2Cal( Calendar *, Calendar *, const QString & , const QString & );
45 bool fromString( Calendar *, const QString & );
46 QString toString( Calendar * );
47 static ulong getCsum( const QStringList & );
48
49 private:
50 QString getEventString( Event* );
51 QString getTodoString( Todo* );
52 QString dtToString( const QDateTime& dt, bool useTZ = true );
53
54 QStringList *mCategories;
55 int getNumFromRecord( QString answer,Incidence* inc ) ;
56 QString getPart( const QString & text, bool &ok, int &start );
57};
58
59}
60
61#endif