-rw-r--r-- | kabc/plugins/qtopia/qtopiaconverter.cpp | 2 | ||||
-rw-r--r-- | kabc/plugins/qtopia/qtopiaconverter.h | 2 | ||||
-rw-r--r-- | kabc/plugins/qtopia/resourceqtopia.cpp | 2 | ||||
-rw-r--r-- | kabc/plugins/qtopia/resourceqtopiaconfig.cpp | 3 |
4 files changed, 0 insertions, 9 deletions
diff --git a/kabc/plugins/qtopia/qtopiaconverter.cpp b/kabc/plugins/qtopia/qtopiaconverter.cpp index 106596f..39d366b 100644 --- a/kabc/plugins/qtopia/qtopiaconverter.cpp +++ b/kabc/plugins/qtopia/qtopiaconverter.cpp | |||
@@ -8,67 +8,65 @@ | |||
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 | /* |
22 | Enhanced Version of the file for platform independent KDE tools. | 22 | Enhanced Version of the file for platform independent KDE tools. |
23 | Copyright (c) 2004 Ulf Schenk | 23 | Copyright (c) 2004 Ulf Schenk |
24 | 24 | ||
25 | $Id$ | 25 | $Id$ |
26 | */ | 26 | */ |
27 | 27 | ||
28 | //US | 28 | //US |
29 | #include "kglobal.h" | 29 | #include "kglobal.h" |
30 | #include "klocale.h" | 30 | #include "klocale.h" |
31 | 31 | ||
32 | 32 | ||
33 | #include "qtopiaconverter.h" | 33 | #include "qtopiaconverter.h" |
34 | 34 | ||
35 | #include <qfile.h> | 35 | #include <qfile.h> |
36 | #include <qdir.h> | 36 | #include <qdir.h> |
37 | #include <qtextstream.h> | 37 | #include <qtextstream.h> |
38 | //#include <.h> | 38 | //#include <.h> |
39 | 39 | ||
40 | //#include <qpe/categories.h> | ||
41 | #include <libkdepim/ksyncprofile.h> | 40 | #include <libkdepim/ksyncprofile.h> |
42 | //US #include <qpe/categoryselect.h> | ||
43 | 41 | ||
44 | 42 | ||
45 | using namespace KABC; | 43 | using namespace KABC; |
46 | 44 | ||
47 | QtopiaConverter::QtopiaConverter() | 45 | QtopiaConverter::QtopiaConverter() |
48 | { | 46 | { |
49 | m_edit = 0; | 47 | m_edit = 0; |
50 | } | 48 | } |
51 | 49 | ||
52 | QtopiaConverter::~QtopiaConverter() | 50 | QtopiaConverter::~QtopiaConverter() |
53 | { | 51 | { |
54 | deinit(); | 52 | deinit(); |
55 | } | 53 | } |
56 | 54 | ||
57 | bool QtopiaConverter::init() | 55 | bool QtopiaConverter::init() |
58 | { | 56 | { |
59 | QString fn = QDir::homeDirPath() +"/Settings/Categories.xml"; | 57 | QString fn = QDir::homeDirPath() +"/Settings/Categories.xml"; |
60 | m_edit = new CategoryEdit( fn); | 58 | m_edit = new CategoryEdit( fn); |
61 | return true; | 59 | return true; |
62 | } | 60 | } |
63 | 61 | ||
64 | void QtopiaConverter::deinit() | 62 | void QtopiaConverter::deinit() |
65 | { | 63 | { |
66 | if (m_edit) | 64 | if (m_edit) |
67 | { | 65 | { |
68 | delete m_edit; | 66 | delete m_edit; |
69 | m_edit = 0; | 67 | m_edit = 0; |
70 | } | 68 | } |
71 | } | 69 | } |
72 | QString QtopiaConverter::categoriesToNumber( const QStringList &list, const QString &app ) | 70 | QString QtopiaConverter::categoriesToNumber( const QStringList &list, const QString &app ) |
73 | { | 71 | { |
74 | startover: | 72 | startover: |
diff --git a/kabc/plugins/qtopia/qtopiaconverter.h b/kabc/plugins/qtopia/qtopiaconverter.h index d318ded..cb5b433 100644 --- a/kabc/plugins/qtopia/qtopiaconverter.h +++ b/kabc/plugins/qtopia/qtopiaconverter.h | |||
@@ -1,66 +1,64 @@ | |||
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 | /* |
22 | Enhanced Version of the file for platform independent KDE tools. | 22 | Enhanced Version of the file for platform independent KDE tools. |
23 | Copyright (c) 2004 Ulf Schenk | 23 | Copyright (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 | //#include <qpe/pim/contact.h> | ||
34 | //#include <qpe/quuid.h> | ||
35 | 33 | ||
36 | #include <xml/qdom.h> | 34 | #include <xml/qdom.h> |
37 | class Categories; | 35 | class Categories; |
38 | 36 | ||
39 | namespace KABC { | 37 | namespace KABC { |
40 | 38 | ||
41 | 39 | ||
42 | 40 | ||
43 | class OpieCategories { | 41 | class OpieCategories { |
44 | public: | 42 | public: |
45 | //friend class KSync::OpieSocket; | 43 | //friend class KSync::OpieSocket; |
46 | friend bool operator== ( const OpieCategories &a, const OpieCategories &b ); | 44 | friend bool operator== ( const OpieCategories &a, const OpieCategories &b ); |
47 | OpieCategories(); | 45 | OpieCategories(); |
48 | OpieCategories(const QString &id, const QString &name, const QString &app ); | 46 | OpieCategories(const QString &id, const QString &name, const QString &app ); |
49 | OpieCategories(const OpieCategories & ); | 47 | OpieCategories(const OpieCategories & ); |
50 | ~OpieCategories() {}; | 48 | ~OpieCategories() {}; |
51 | OpieCategories &operator=(const OpieCategories & ); | 49 | OpieCategories &operator=(const OpieCategories & ); |
52 | QString id()const; | 50 | QString id()const; |
53 | QString name()const; | 51 | QString name()const; |
54 | QString app()const; | 52 | QString app()const; |
55 | 53 | ||
56 | private: | 54 | private: |
57 | QString m_name; | 55 | QString m_name; |
58 | QString m_app; | 56 | QString m_app; |
59 | QString m_id; | 57 | QString m_id; |
60 | }; | 58 | }; |
61 | 59 | ||
62 | 60 | ||
63 | class CategoryEdit { | 61 | class CategoryEdit { |
64 | public: | 62 | public: |
65 | CategoryEdit(); | 63 | CategoryEdit(); |
66 | CategoryEdit(const QString &fileName); | 64 | CategoryEdit(const QString &fileName); |
diff --git a/kabc/plugins/qtopia/resourceqtopia.cpp b/kabc/plugins/qtopia/resourceqtopia.cpp index 4ee3c3c..95fa541 100644 --- a/kabc/plugins/qtopia/resourceqtopia.cpp +++ b/kabc/plugins/qtopia/resourceqtopia.cpp | |||
@@ -14,66 +14,64 @@ | |||
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 | /* |
22 | Enhanced Version of the file for platform independent KDE tools. | 22 | Enhanced Version of the file for platform independent KDE tools. |
23 | Copyright (c) 2004 Ulf Schenk | 23 | Copyright (c) 2004 Ulf Schenk |
24 | 24 | ||
25 | $Id$ | 25 | $Id$ |
26 | */ | 26 | */ |
27 | #include <sys/types.h> | 27 | #include <sys/types.h> |
28 | #include <sys/stat.h> | 28 | #include <sys/stat.h> |
29 | #include <unistd.h> | 29 | #include <unistd.h> |
30 | 30 | ||
31 | #include <qdir.h> | 31 | #include <qdir.h> |
32 | #include <qfile.h> | 32 | #include <qfile.h> |
33 | #include <qtextstream.h> | 33 | #include <qtextstream.h> |
34 | #include <qfileinfo.h> | 34 | #include <qfileinfo.h> |
35 | #include <qregexp.h> | 35 | #include <qregexp.h> |
36 | //US #include <qtimer.h> | 36 | //US #include <qtimer.h> |
37 | 37 | ||
38 | #include <kapplication.h> | 38 | #include <kapplication.h> |
39 | #include <kconfig.h> | 39 | #include <kconfig.h> |
40 | #include <kdebug.h> | 40 | #include <kdebug.h> |
41 | #include <klocale.h> | 41 | #include <klocale.h> |
42 | //US #include <ksavefile.h> | 42 | //US #include <ksavefile.h> |
43 | #include <kstandarddirs.h> | 43 | #include <kstandarddirs.h> |
44 | #include <kmessagebox.h> | 44 | #include <kmessagebox.h> |
45 | 45 | ||
46 | #include <qpe/pim/addressbookaccess.h> | ||
47 | |||
48 | 46 | ||
49 | #include "resourceqtopiaconfig.h" | 47 | #include "resourceqtopiaconfig.h" |
50 | #include "stdaddressbook.h" | 48 | #include "stdaddressbook.h" |
51 | 49 | ||
52 | #include "qtopiaconverter.h" | 50 | #include "qtopiaconverter.h" |
53 | 51 | ||
54 | #include "resourceqtopia.h" | 52 | #include "resourceqtopia.h" |
55 | 53 | ||
56 | using namespace KABC; | 54 | using namespace KABC; |
57 | extern "C" | 55 | extern "C" |
58 | { | 56 | { |
59 | void *init_microkabc_qtopia() | 57 | void *init_microkabc_qtopia() |
60 | { | 58 | { |
61 | return new KRES::PluginFactory<ResourceQtopia,ResourceQtopiaConfig>(); | 59 | return new KRES::PluginFactory<ResourceQtopia,ResourceQtopiaConfig>(); |
62 | } | 60 | } |
63 | } | 61 | } |
64 | 62 | ||
65 | ResourceQtopia::ResourceQtopia( const KConfig *config ) | 63 | ResourceQtopia::ResourceQtopia( const KConfig *config ) |
66 | : Resource( config ), mConverter (0) | 64 | : Resource( config ), mConverter (0) |
67 | { | 65 | { |
68 | // we can not choose the filename. Therefore use the default to display | 66 | // we can not choose the filename. Therefore use the default to display |
69 | QString fileName = QDir::homeDirPath() + "/Applications/addressbook/addressbook.xml"; | 67 | QString fileName = QDir::homeDirPath() + "/Applications/addressbook/addressbook.xml"; |
70 | init( fileName ); | 68 | init( fileName ); |
71 | } | 69 | } |
72 | 70 | ||
73 | ResourceQtopia::ResourceQtopia( const QString &fileName ) | 71 | ResourceQtopia::ResourceQtopia( const QString &fileName ) |
74 | : Resource( 0 ) | 72 | : Resource( 0 ) |
75 | { | 73 | { |
76 | init( fileName ); | 74 | init( fileName ); |
77 | } | 75 | } |
78 | 76 | ||
79 | void ResourceQtopia::init( const QString &fileName ) | 77 | void ResourceQtopia::init( const QString &fileName ) |
diff --git a/kabc/plugins/qtopia/resourceqtopiaconfig.cpp b/kabc/plugins/qtopia/resourceqtopiaconfig.cpp index b2310c4..0505d0b 100644 --- a/kabc/plugins/qtopia/resourceqtopiaconfig.cpp +++ b/kabc/plugins/qtopia/resourceqtopiaconfig.cpp | |||
@@ -9,67 +9,64 @@ | |||
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 | /* |
22 | Enhanced Version of the file for platform independent KDE tools. | 22 | Enhanced Version of the file for platform independent KDE tools. |
23 | Copyright (c) 2004 Ulf Schenk | 23 | Copyright (c) 2004 Ulf Schenk |
24 | 24 | ||
25 | $Id$ | 25 | $Id$ |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <qlabel.h> | 28 | #include <qlabel.h> |
29 | #include <qlayout.h> | 29 | #include <qlayout.h> |
30 | 30 | ||
31 | #include <kdebug.h> | 31 | #include <kdebug.h> |
32 | #include <klocale.h> | 32 | #include <klocale.h> |
33 | #include <kstandarddirs.h> | 33 | #include <kstandarddirs.h> |
34 | #include <kdialog.h> | 34 | #include <kdialog.h> |
35 | 35 | ||
36 | #include <unistd.h> | 36 | #include <unistd.h> |
37 | 37 | ||
38 | #include <qdir.h> | 38 | #include <qdir.h> |
39 | #include <qfile.h> | 39 | #include <qfile.h> |
40 | #include "resourceqtopia.h" | 40 | #include "resourceqtopia.h" |
41 | //US #include <qpe/qpeapplication.h> | ||
42 | |||
43 | //US #include "stdaddressbook.h" | ||
44 | 41 | ||
45 | #include "resourceqtopiaconfig.h" | 42 | #include "resourceqtopiaconfig.h" |
46 | 43 | ||
47 | using namespace KABC; | 44 | using namespace KABC; |
48 | 45 | ||
49 | ResourceQtopiaConfig::ResourceQtopiaConfig( QWidget* parent, const char* name ) | 46 | ResourceQtopiaConfig::ResourceQtopiaConfig( QWidget* parent, const char* name ) |
50 | : ConfigWidget( parent, name ) | 47 | : ConfigWidget( parent, name ) |
51 | { | 48 | { |
52 | QGridLayout *mainLayout = new QGridLayout( this, 1, 2, 0, | 49 | QGridLayout *mainLayout = new QGridLayout( this, 1, 2, 0, |
53 | KDialog::spacingHint() ); | 50 | KDialog::spacingHint() ); |
54 | 51 | ||
55 | QLabel *label = new QLabel( i18n( "Location:" ), this ); | 52 | QLabel *label = new QLabel( i18n( "Location:" ), this ); |
56 | mFileNameEdit = new KURLRequester( this ); | 53 | mFileNameEdit = new KURLRequester( this ); |
57 | 54 | ||
58 | connect( mFileNameEdit, SIGNAL( textChanged( const QString & ) ), | 55 | connect( mFileNameEdit, SIGNAL( textChanged( const QString & ) ), |
59 | SLOT( checkFilePermissions( const QString & ) ) ); | 56 | SLOT( checkFilePermissions( const QString & ) ) ); |
60 | 57 | ||
61 | mainLayout->addWidget( label, 0, 0 ); | 58 | mainLayout->addWidget( label, 0, 0 ); |
62 | mainLayout->addWidget( mFileNameEdit, 0, 1 ); | 59 | mainLayout->addWidget( mFileNameEdit, 0, 1 ); |
63 | 60 | ||
64 | } | 61 | } |
65 | 62 | ||
66 | void ResourceQtopiaConfig::loadSettings( KRES::Resource *res ) | 63 | void ResourceQtopiaConfig::loadSettings( KRES::Resource *res ) |
67 | { | 64 | { |
68 | //US ResourceFile *resource = dynamic_cast<ResourceFile*>( res ); | 65 | //US ResourceFile *resource = dynamic_cast<ResourceFile*>( res ); |
69 | ResourceQtopia *resource = (ResourceQtopia*)( res ); | 66 | ResourceQtopia *resource = (ResourceQtopia*)( res ); |
70 | 67 | ||
71 | if ( !resource ) { | 68 | if ( !resource ) { |
72 | kdDebug(5700) << "ResourceQtopiaConfig::loadSettings(): cast failed" << endl; | 69 | kdDebug(5700) << "ResourceQtopiaConfig::loadSettings(): cast failed" << endl; |
73 | return; | 70 | return; |
74 | } | 71 | } |
75 | 72 | ||