summaryrefslogtreecommitdiffabout
path: root/kabc/plugins/qtopia/qtopiaconverter.h
Unidiff
Diffstat (limited to 'kabc/plugins/qtopia/qtopiaconverter.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/plugins/qtopia/qtopiaconverter.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/kabc/plugins/qtopia/qtopiaconverter.h b/kabc/plugins/qtopia/qtopiaconverter.h
index cb5b433..744dd41 100644
--- a/kabc/plugins/qtopia/qtopiaconverter.h
+++ b/kabc/plugins/qtopia/qtopiaconverter.h
@@ -1,82 +1,85 @@
1/* 1/*
2 This file is part of libkabc. 2 This file is part of libkabc.
3 Copyright (c) 2002 Tobias Koenig <tokoe@kde.org> 3 Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version. 8 version 2 of the License, or (at your option) any later version.
9 9
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details. 13 Library General Public License for more details.
14 14
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20 20
21/* 21/*
22Enhanced Version of the file for platform independent KDE tools. 22Enhanced Version of the file for platform independent KDE tools.
23Copyright (c) 2004 Ulf Schenk 23Copyright (c) 2004 Ulf Schenk
24$Id$ 24$Id$
25*/ 25*/
26 26
27#ifndef KABC_QTOPIACONVERTER_H 27#ifndef KABC_QTOPIACONVERTER_H
28#define KABC_QTOPIACONVERTER_H 28#define KABC_QTOPIACONVERTER_H
29 29
30#include <qstring.h> 30#include <qstring.h>
31 31
32#include "addressee.h" 32#include "addressee.h"
33 33#ifdef DESKTOP_VERSION
34#include <qdom.h>
35#else
34#include <xml/qdom.h> 36#include <xml/qdom.h>
37#endif
35class Categories; 38class Categories;
36 39
37namespace KABC { 40namespace KABC {
38 41
39 42
40 43
41class OpieCategories { 44class OpieCategories {
42 public: 45 public:
43 //friend class KSync::OpieSocket; 46 //friend class KSync::OpieSocket;
44 friend bool operator== ( const OpieCategories &a, const OpieCategories &b ); 47 friend bool operator== ( const OpieCategories &a, const OpieCategories &b );
45 OpieCategories(); 48 OpieCategories();
46 OpieCategories(const QString &id, const QString &name, const QString &app ); 49 OpieCategories(const QString &id, const QString &name, const QString &app );
47 OpieCategories(const OpieCategories & ); 50 OpieCategories(const OpieCategories & );
48 ~OpieCategories() {}; 51 ~OpieCategories() {};
49 OpieCategories &operator=(const OpieCategories & ); 52 OpieCategories &operator=(const OpieCategories & );
50 QString id()const; 53 QString id()const;
51 QString name()const; 54 QString name()const;
52 QString app()const; 55 QString app()const;
53 56
54 private: 57 private:
55 QString m_name; 58 QString m_name;
56 QString m_app; 59 QString m_app;
57 QString m_id; 60 QString m_id;
58}; 61};
59 62
60 63
61 class CategoryEdit { 64 class CategoryEdit {
62 public: 65 public:
63 CategoryEdit(); 66 CategoryEdit();
64 CategoryEdit(const QString &fileName); 67 CategoryEdit(const QString &fileName);
65 ~CategoryEdit(); 68 ~CategoryEdit();
66 69
67 void save(const QString&) const; 70 void save(const QString&) const;
68 int addCategory( const QString &name, int id = 0 ); 71 int addCategory( const QString &name, int id = 0 );
69 int addCategory(const QString &appName, const QString &name, int id = 0); 72 int addCategory(const QString &appName, const QString &name, int id = 0);
70 void parse( const QString &fileName ); 73 void parse( const QString &fileName );
71 74
72 QString categoryById(const QString &id, const QString &app )const; 75 QString categoryById(const QString &id, const QString &app )const;
73 QStringList categoriesByIds( const QStringList& ids, const QString& app ); 76 QStringList categoriesByIds( const QStringList& ids, const QString& app );
74 77
75 void clear(); 78 void clear();
76 QValueList<OpieCategories> categories()const { return m_categories; }; 79 QValueList<OpieCategories> categories()const { return m_categories; };
77 private: 80 private:
78 /** 81 /**
79 * this function will be used internally to update the kde categories... 82 * this function will be used internally to update the kde categories...
80 */ 83 */
81 void updateKDE( const QString& app, const QStringList& categories ); 84 void updateKDE( const QString& app, const QStringList& categories );
82 QMap<int, bool> ids; // from tt Qtopia::UidGen 85 QMap<int, bool> ids; // from tt Qtopia::UidGen