summaryrefslogtreecommitdiffabout
path: root/libkdepim
Unidiff
Diffstat (limited to 'libkdepim') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/categoryeditdialog.cpp19
-rw-r--r--libkdepim/categoryeditdialog.h18
-rw-r--r--libkdepim/categoryeditdialog_base.cpp20
-rw-r--r--libkdepim/categoryeditdialog_base.h26
-rw-r--r--libkdepim/categoryselectdialog.cpp43
-rw-r--r--libkdepim/categoryselectdialog.h10
-rw-r--r--libkdepim/categoryselectdialog_base.cpp19
-rw-r--r--libkdepim/categoryselectdialog_base.h26
-rw-r--r--libkdepim/externalapphandler.cpp30
-rw-r--r--libkdepim/externalapphandler.h15
-rw-r--r--libkdepim/kcmconfigs/kcmkdepimconfig.cpp4
-rw-r--r--libkdepim/kcmconfigs/kdepimconfigwidget.cpp53
-rw-r--r--libkdepim/kcmconfigs/kdepimconfigwidget.h6
-rw-r--r--libkdepim/kdateedit.cpp40
-rw-r--r--libkdepim/kdateedit.h11
-rw-r--r--libkdepim/kdatepicker.cpp8
-rw-r--r--libkdepim/kdatepicker.h7
-rw-r--r--libkdepim/kpimglobalprefs.cpp10
-rw-r--r--libkdepim/kpimglobalprefs.h4
-rw-r--r--libkdepim/kprefsdialog.cpp19
-rw-r--r--libkdepim/kprefsdialog.h12
-rw-r--r--libkdepim/kprefswidget.cpp19
-rw-r--r--libkdepim/kprefswidget.h12
-rw-r--r--libkdepim/ksyncmanager.cpp97
-rw-r--r--libkdepim/ksyncmanager.h26
-rw-r--r--libkdepim/ksyncprefsdialog.cpp130
-rw-r--r--libkdepim/ksyncprefsdialog.h30
-rw-r--r--libkdepim/ksyncprofile.h2
-rw-r--r--libkdepim/libkdepim.pro4
-rw-r--r--libkdepim/libkdepimE.pro6
-rwxr-xr-xlibkdepim/ol_access.cpp52
-rwxr-xr-xlibkdepim/ol_access.h4
-rw-r--r--libkdepim/phoneaccess.cpp15
33 files changed, 432 insertions, 365 deletions
diff --git a/libkdepim/categoryeditdialog.cpp b/libkdepim/categoryeditdialog.cpp
index e2325d2..92a1737 100644
--- a/libkdepim/categoryeditdialog.cpp
+++ b/libkdepim/categoryeditdialog.cpp
@@ -22,12 +22,13 @@
22*/ 22*/
23 23
24#include <qstringlist.h> 24#include <qstringlist.h>
25#include <qlineedit.h> 25#include <qlineedit.h>
26#include <qlistview.h> 26#include <q3listview.h>
27#include <qheader.h> 27#include <q3header.h>
28#include <qpushbutton.h> 28#include <qpushbutton.h>
29#include <qapplication.h> 29#include <qapplication.h>
30#include <QDesktopWidget>
30 31
31#include "kpimprefs.h" 32#include "kpimprefs.h"
32 33
33#include "categoryeditdialog.h" 34#include "categoryeditdialog.h"
@@ -35,9 +36,9 @@
35using namespace KPIM; 36using namespace KPIM;
36 37
37CategoryEditDialog::CategoryEditDialog( KPimPrefs *prefs, QWidget* parent, 38CategoryEditDialog::CategoryEditDialog( KPimPrefs *prefs, QWidget* parent,
38 const char* name, bool modal, 39 const char* name, bool modal,
39 WFlags fl ) 40 Qt::WFlags fl )
40 : CategoryEditDialog_base( parent, name, modal, fl ), 41 : CategoryEditDialog_base( parent, name, modal, fl ),
41 mPrefs( prefs ) 42 mPrefs( prefs )
42{ 43{
43 mCategories->header()->hide(); 44 mCategories->header()->hide();
@@ -45,14 +46,14 @@ CategoryEditDialog::CategoryEditDialog( KPimPrefs *prefs, QWidget* parent,
45 QStringList::Iterator it; 46 QStringList::Iterator it;
46 bool categoriesExist=false; 47 bool categoriesExist=false;
47 for (it = mPrefs->mCustomCategories.begin(); 48 for (it = mPrefs->mCustomCategories.begin();
48 it != mPrefs->mCustomCategories.end(); ++it ) { 49 it != mPrefs->mCustomCategories.end(); ++it ) {
49 new QListViewItem(mCategories,*it); 50 new Q3ListViewItem(mCategories,*it);
50 categoriesExist=true; 51 categoriesExist=true;
51 } 52 }
52 53
53 connect(mCategories,SIGNAL(selectionChanged(QListViewItem *)), 54 connect(mCategories,SIGNAL(selectionChanged(Q3ListViewItem *)),
54 SLOT(editItem(QListViewItem *))); 55 SLOT(editItem(Q3ListViewItem *)));
55 connect(mEdit,SIGNAL(textChanged ( const QString & )),this,SLOT(slotTextChanged(const QString &))); 56 connect(mEdit,SIGNAL(textChanged ( const QString & )),this,SLOT(slotTextChanged(const QString &)));
56 mButtonRemove->setEnabled(categoriesExist); 57 mButtonRemove->setEnabled(categoriesExist);
57 mButtonModify->setEnabled(categoriesExist); 58 mButtonModify->setEnabled(categoriesExist);
58#ifndef DESKTOP_VERSION 59#ifndef DESKTOP_VERSION
@@ -81,9 +82,9 @@ void CategoryEditDialog::slotTextChanged(const QString &text)
81 82
82void CategoryEditDialog::add() 83void CategoryEditDialog::add()
83{ 84{
84 if (!mEdit->text().isEmpty()) { 85 if (!mEdit->text().isEmpty()) {
85 new QListViewItem(mCategories,mEdit->text()); 86 new Q3ListViewItem(mCategories,mEdit->text());
86 mEdit->setText(""); 87 mEdit->setText("");
87 mButtonRemove->setEnabled(mCategories->childCount()>0); 88 mButtonRemove->setEnabled(mCategories->childCount()>0);
88 mButtonModify->setEnabled(mCategories->childCount()>0); 89 mButtonModify->setEnabled(mCategories->childCount()>0);
89 } 90 }
@@ -120,9 +121,9 @@ void CategoryEditDialog::slotOk()
120void CategoryEditDialog::slotApply() 121void CategoryEditDialog::slotApply()
121{ 122{
122 mPrefs->mCustomCategories.clear(); 123 mPrefs->mCustomCategories.clear();
123 124
124 QListViewItem *item = mCategories->firstChild(); 125 Q3ListViewItem *item = mCategories->firstChild();
125 while(item) { 126 while(item) {
126 mPrefs->mCustomCategories.append(item->text(0)); 127 mPrefs->mCustomCategories.append(item->text(0));
127 item = item->nextSibling(); 128 item = item->nextSibling();
128 } 129 }
@@ -130,9 +131,9 @@ void CategoryEditDialog::slotApply()
130 131
131 emit categoryConfigChanged(); 132 emit categoryConfigChanged();
132} 133}
133 134
134void CategoryEditDialog::editItem(QListViewItem *item) 135void CategoryEditDialog::editItem(Q3ListViewItem *item)
135{ 136{
136 mEdit->setText(item->text(0)); 137 mEdit->setText(item->text(0));
137 mButtonRemove->setEnabled(true); 138 mButtonRemove->setEnabled(true);
138 mButtonModify->setEnabled(true); 139 mButtonModify->setEnabled(true);
diff --git a/libkdepim/categoryeditdialog.h b/libkdepim/categoryeditdialog.h
index 9bb3201..828894f 100644
--- a/libkdepim/categoryeditdialog.h
+++ b/libkdepim/categoryeditdialog.h
@@ -23,32 +23,32 @@
23#ifndef KPIM_CATEGORYEDITDIALOG_H 23#ifndef KPIM_CATEGORYEDITDIALOG_H
24#define KPIM_CATEGORYEDITDIALOG_H 24#define KPIM_CATEGORYEDITDIALOG_H
25 25
26#include <categoryeditdialog_base.h> 26#include <categoryeditdialog_base.h>
27#include <qlistview.h> 27#include <q3listview.h>
28 28
29class KPimPrefs; 29class KPimPrefs;
30 30
31namespace KPIM { 31namespace KPIM {
32 32
33 class CategorySelectItem :public QObject, public QCheckListItem 33 class CategorySelectItem :public QObject, public Q3CheckListItem
34{ 34{
35 35
36 Q_OBJECT 36 Q_OBJECT
37 public: 37 public:
38 38
39 CategorySelectItem(QListView * parent, const QString & text, Type tt) : QObject( parent ), 39 CategorySelectItem(Q3ListView * parent, const QString & text, Type tt) : QObject( parent ),
40 QCheckListItem (parent, text, tt ) 40 Q3CheckListItem (parent, text, tt )
41 {;} 41 {;}
42 42
43 signals: 43 signals:
44 void stateChanged( QListViewItem*); 44 void stateChanged( Q3ListViewItem*);
45 45
46 protected: 46 protected:
47 47
48 virtual void stateChange(bool b) 48 virtual void stateChange(bool b)
49 { 49 {
50 QCheckListItem::stateChange(b); 50 Q3CheckListItem::stateChange(b);
51 emit stateChanged( this ); 51 emit stateChanged( this );
52 } 52 }
53}; 53};
54 54
@@ -58,9 +58,9 @@ class CategoryEditDialog : public CategoryEditDialog_base
58 Q_OBJECT 58 Q_OBJECT
59 public: 59 public:
60 CategoryEditDialog( KPimPrefs *prefs, QWidget* parent = 0, 60 CategoryEditDialog( KPimPrefs *prefs, QWidget* parent = 0,
61 const char* name = 0, 61 const char* name = 0,
62 bool modal = FALSE, WFlags fl = 0 ); 62 bool modal = FALSE, Qt::WFlags fl = 0 );
63 ~CategoryEditDialog(); 63 ~CategoryEditDialog();
64 64
65 public slots: 65 public slots:
66 void add(); 66 void add();
@@ -74,11 +74,11 @@ class CategoryEditDialog : public CategoryEditDialog_base
74 signals: 74 signals:
75 void categoryConfigChanged(); 75 void categoryConfigChanged();
76 76
77 private slots: 77 private slots:
78 void editItem(QListViewItem *item); 78 void editItem(Q3ListViewItem *item);
79 void slotTextChanged(const QString &text); 79 void slotTextChanged(const QString &text);
80 80 private:
81 KPimPrefs *mPrefs; 81 KPimPrefs *mPrefs;
82}; 82};
83 83
84} 84}
diff --git a/libkdepim/categoryeditdialog_base.cpp b/libkdepim/categoryeditdialog_base.cpp
index 1908576..c85f6e5 100644
--- a/libkdepim/categoryeditdialog_base.cpp
+++ b/libkdepim/categoryeditdialog_base.cpp
@@ -10,36 +10,40 @@
10 10
11#include "categoryeditdialog_base.h" 11#include "categoryeditdialog_base.h"
12 12
13#include <qvariant.h> 13#include <qvariant.h>
14#include <qheader.h> 14#include <q3header.h>
15#include <qlineedit.h> 15#include <qlineedit.h>
16#include <qlistview.h> 16#include <q3listview.h>
17#include <qpushbutton.h> 17#include <qpushbutton.h>
18#include <qlayout.h> 18#include <qlayout.h>
19#include <qtooltip.h> 19#include <qtooltip.h>
20#include <qwhatsthis.h> 20#include <q3whatsthis.h>
21//Added by qt3to4:
22#include <Q3GridLayout>
23#include <Q3HBoxLayout>
24#include <Q3VBoxLayout>
21 25
22/* 26/*
23 * Constructs a CategoryEditDialog_base as a child of 'parent', with the 27 * Constructs a CategoryEditDialog_base as a child of 'parent', with the
24 * name 'name' and widget flags set to 'f'. 28 * name 'name' and widget flags set to 'f'.
25 * 29 *
26 * The dialog will by default be modeless, unless you set 'modal' to 30 * The dialog will by default be modeless, unless you set 'modal' to
27 * TRUE to construct a modal dialog. 31 * TRUE to construct a modal dialog.
28 */ 32 */
29CategoryEditDialog_base::CategoryEditDialog_base( QWidget* parent, const char* name, bool modal, WFlags fl ) 33CategoryEditDialog_base::CategoryEditDialog_base( QWidget* parent, const char* name, bool modal, Qt::WFlags fl )
30 : QDialog( parent, name, true, fl ) 34 : QDialog( parent, name, true, fl )
31 35
32{ 36{
33 if ( !name ) 37 if ( !name )
34 setName( "CategoryEditDialog_base" ); 38 setName( "CategoryEditDialog_base" );
35 CategoryEditDialog_baseLayout = new QGridLayout( this, 1, 1, 11, 6, "CategoryEditDialog_baseLayout"); 39 CategoryEditDialog_baseLayout = new Q3GridLayout( this, 1, 1, 11, 6, "CategoryEditDialog_baseLayout");
36 40
37 mEdit = new QLineEdit( this, "mEdit" ); 41 mEdit = new QLineEdit( this, "mEdit" );
38 42
39 CategoryEditDialog_baseLayout->addMultiCellWidget( mEdit, 1, 1, 0, 0 ); 43 CategoryEditDialog_baseLayout->addMultiCellWidget( mEdit, 1, 1, 0, 0 );
40 44
41 Layout13 = new QHBoxLayout( 0, 0, 6, "Layout13"); 45 Layout13 = new Q3HBoxLayout( 0, 0, 6, "Layout13");
42 46
43 // mButtonHelp = new QPushButton( this, "mButtonHelp" ); 47 // mButtonHelp = new QPushButton( this, "mButtonHelp" );
44 //mButtonHelp->setAutoDefault( TRUE ); 48 //mButtonHelp->setAutoDefault( TRUE );
45 //Layout13->addWidget( mButtonHelp ); 49 //Layout13->addWidget( mButtonHelp );
@@ -59,14 +63,14 @@ CategoryEditDialog_base::CategoryEditDialog_base( QWidget* parent, const char* n
59 Layout13->addWidget( mButtonCancel ); 63 Layout13->addWidget( mButtonCancel );
60 64
61 CategoryEditDialog_baseLayout->addMultiCellLayout( Layout13, 2, 2, 0, 1 ); 65 CategoryEditDialog_baseLayout->addMultiCellLayout( Layout13, 2, 2, 0, 1 );
62 66
63 mCategories = new QListView( this, "mCategories" ); 67 mCategories = new Q3ListView( this, "mCategories" );
64 mCategories->addColumn( tr2i18n( "Category" ) ); 68 mCategories->addColumn( tr2i18n( "Category" ) );
65 69
66 CategoryEditDialog_baseLayout->addWidget( mCategories, 0, 0 ); 70 CategoryEditDialog_baseLayout->addWidget( mCategories, 0, 0 );
67 71
68 layout103 = new QVBoxLayout( 0, 0, 6, "layout103"); 72 layout103 = new Q3VBoxLayout( 0, 0, 6, "layout103");
69 73
70 mButtonAdd = new QPushButton( this, "mButtonAdd" ); 74 mButtonAdd = new QPushButton( this, "mButtonAdd" );
71 CategoryEditDialog_baseLayout->addMultiCellWidget(mButtonAdd , 1, 1, 1, 1 ); 75 CategoryEditDialog_baseLayout->addMultiCellWidget(mButtonAdd , 1, 1, 1, 1 );
72 //layout103->addWidget( mButtonAdd ); 76 //layout103->addWidget( mButtonAdd );
diff --git a/libkdepim/categoryeditdialog_base.h b/libkdepim/categoryeditdialog_base.h
index 5557ad0..cd577b0 100644
--- a/libkdepim/categoryeditdialog_base.h
+++ b/libkdepim/categoryeditdialog_base.h
@@ -11,31 +11,35 @@
11#define CATEGORYEDITDIALOG_BASE_H 11#define CATEGORYEDITDIALOG_BASE_H
12 12
13#include <qvariant.h> 13#include <qvariant.h>
14#include <qdialog.h> 14#include <qdialog.h>
15 15//Added by qt3to4:
16class QVBoxLayout; 16#include <Q3VBoxLayout>
17class QHBoxLayout; 17#include <Q3GridLayout>
18class QGridLayout; 18#include <Q3HBoxLayout>
19
20class Q3VBoxLayout;
21class Q3HBoxLayout;
22class Q3GridLayout;
19class QLineEdit; 23class QLineEdit;
20class QListView; 24class Q3ListView;
21class QListViewItem; 25class Q3ListViewItem;
22class QPushButton; 26class QPushButton;
23 27
24class CategoryEditDialog_base : public QDialog 28class CategoryEditDialog_base : public QDialog
25{ 29{
26 Q_OBJECT 30 Q_OBJECT
27 31
28public: 32public:
29 CategoryEditDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); 33 CategoryEditDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
30 ~CategoryEditDialog_base(); 34 ~CategoryEditDialog_base();
31 35
32 QLineEdit* mEdit; 36 QLineEdit* mEdit;
33 QPushButton* mButtonHelp; 37 QPushButton* mButtonHelp;
34 QPushButton* mApply; 38 QPushButton* mApply;
35 QPushButton* mButtonOk; 39 QPushButton* mButtonOk;
36 QPushButton* mButtonCancel; 40 QPushButton* mButtonCancel;
37 QListView* mCategories; 41 Q3ListView* mCategories;
38 QPushButton* mButtonAdd; 42 QPushButton* mButtonAdd;
39 QPushButton* mButtonModify; 43 QPushButton* mButtonModify;
40 QPushButton* mButtonRemove; 44 QPushButton* mButtonRemove;
41 45
@@ -46,11 +50,11 @@ public slots:
46 virtual void remove(); 50 virtual void remove();
47 virtual void slotOk(); 51 virtual void slotOk();
48 52
49protected: 53protected:
50 QGridLayout* CategoryEditDialog_baseLayout; 54 Q3GridLayout* CategoryEditDialog_baseLayout;
51 QHBoxLayout* Layout13; 55 Q3HBoxLayout* Layout13;
52 QVBoxLayout* layout103; 56 Q3VBoxLayout* layout103;
53 57
54protected slots: 58protected slots:
55 virtual void languageChange(); 59 virtual void languageChange();
56}; 60};
diff --git a/libkdepim/categoryselectdialog.cpp b/libkdepim/categoryselectdialog.cpp
index 2a9b43e..4f72880 100644
--- a/libkdepim/categoryselectdialog.cpp
+++ b/libkdepim/categoryselectdialog.cpp
@@ -20,13 +20,16 @@
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <qlistview.h> 24#include <q3listview.h>
25#include <qpushbutton.h> 25#include <qpushbutton.h>
26#include <qheader.h> 26#include <q3header.h>
27#include <qapp.h> 27#include <qapplication.h>
28#include <qmessagebox.h> 28#include <qmessagebox.h>
29//Added by qt3to4:
30#include <QPixmap>
31#include <QDesktopWidget>
29#include <kmessagebox.h> 32#include <kmessagebox.h>
30 33
31 34
32#include "categoryeditdialog.h" 35#include "categoryeditdialog.h"
@@ -37,9 +40,9 @@
37using namespace KPIM; 40using namespace KPIM;
38 41
39CategorySelectDialog::CategorySelectDialog( KPimPrefs *prefs, QWidget* parent, 42CategorySelectDialog::CategorySelectDialog( KPimPrefs *prefs, QWidget* parent,
40 const char* name, 43 const char* name,
41 bool modal, WFlags fl ) 44 bool modal, Qt::WFlags fl )
42 : CategorySelectDialog_base( parent, name, true, fl ), 45 : CategorySelectDialog_base( parent, name, true, fl ),
43 mPrefs( prefs ) 46 mPrefs( prefs )
44{ 47{
45 Q_UNUSED( modal ); 48 Q_UNUSED( modal );
@@ -80,10 +83,10 @@ void CategorySelectDialog::setCategories()
80 83
81 QStringList::Iterator it; 84 QStringList::Iterator it;
82 for (it = mPrefs->mCustomCategories.begin(); 85 for (it = mPrefs->mCustomCategories.begin();
83 it != mPrefs->mCustomCategories.end(); ++it ) { 86 it != mPrefs->mCustomCategories.end(); ++it ) {
84 CategorySelectItem * item = new CategorySelectItem(mCategories,*it,QCheckListItem::CheckBox); 87 CategorySelectItem * item = new CategorySelectItem(mCategories,*it,Q3CheckListItem::CheckBox);
85 QObject::connect( item, SIGNAL( stateChanged(QListViewItem *) ), this, SLOT( clicked(QListViewItem *) ) ); 88 QObject::connect( item, SIGNAL( stateChanged(Q3ListViewItem *) ), this, SLOT( clicked(Q3ListViewItem *) ) );
86 89
87 } 90 }
88} 91}
89 92
@@ -99,18 +102,18 @@ void CategorySelectDialog::setSelected(const QStringList &selList)
99 QStringList notFound; 102 QStringList notFound;
100 bool found = false; 103 bool found = false;
101 for (it=selList.begin();it!=selList.end();++it) { 104 for (it=selList.begin();it!=selList.end();++it) {
102 //qDebug(" CategorySelectDialog::setSelected("); 105 //qDebug(" CategorySelectDialog::setSelected(");
103 QCheckListItem *item = (QCheckListItem *)mCategories->firstChild(); 106 Q3CheckListItem *item = (Q3CheckListItem *)mCategories->firstChild();
104 while (item) { 107 while (item) {
105 if (item->text() == *it) { 108 if (item->text() == *it) {
106 item->setOn(true); 109 item->setOn(true);
107 if ( ! found ) 110 if ( ! found )
108 setColorItem( item ); 111 setColorItem( item );
109 found = true; 112 found = true;
110 break; 113 break;
111 } 114 }
112 item = (QCheckListItem *)item->nextSibling(); 115 item = (Q3CheckListItem *)item->nextSibling();
113 } 116 }
114// if ( ! found ) { 117// if ( ! found ) {
115 118
116//emit updateCategoriesGlobal(); 119//emit updateCategoriesGlobal();
@@ -136,9 +139,9 @@ void CategorySelectDialog::setColorEnabled()
136 mSetColorCat->show(); 139 mSetColorCat->show();
137} 140}
138void CategorySelectDialog::setColorCat() 141void CategorySelectDialog::setColorCat()
139{ 142{
140 QCheckListItem * newColorItem = (QCheckListItem * )mCategories->currentItem (); 143 Q3CheckListItem * newColorItem = (Q3CheckListItem * )mCategories->currentItem ();
141 if ( !newColorItem ) { 144 if ( !newColorItem ) {
142 KMessageBox::error(this,i18n("There is no current item.")); 145 KMessageBox::error(this,i18n("There is no current item."));
143 return; 146 return;
144 } 147 }
@@ -146,28 +149,28 @@ void CategorySelectDialog::setColorCat()
146 newColorItem->setOn( true ); 149 newColorItem->setOn( true );
147 setColorItem( newColorItem ); 150 setColorItem( newColorItem );
148 151
149} 152}
150void CategorySelectDialog::clicked ( QListViewItem * it ) 153void CategorySelectDialog::clicked ( Q3ListViewItem * it )
151{ 154{
152 if ( ! it ) 155 if ( ! it )
153 return; 156 return;
154 QCheckListItem *i = (QCheckListItem *) it; 157 Q3CheckListItem *i = (Q3CheckListItem *) it;
155 if ( !i->isOn() && i==mColorItem) { 158 if ( !i->isOn() && i==mColorItem) {
156 setColorItem( 0); 159 setColorItem( 0);
157 QCheckListItem *item = (QCheckListItem *)mCategories->firstChild(); 160 Q3CheckListItem *item = (Q3CheckListItem *)mCategories->firstChild();
158 while (item) { 161 while (item) {
159 if (item->isOn()) { 162 if (item->isOn()) {
160 setColorItem( item ); 163 setColorItem( item );
161 break; 164 break;
162 } 165 }
163 item = (QCheckListItem *)item->nextSibling(); 166 item = (Q3CheckListItem *)item->nextSibling();
164 } 167 }
165 } else if ( i->isOn() && !mColorItem) { 168 } else if ( i->isOn() && !mColorItem) {
166 setColorItem( i); 169 setColorItem( i);
167 } 170 }
168} 171}
169void CategorySelectDialog::setColorItem( QCheckListItem * newColorItem ) 172void CategorySelectDialog::setColorItem( Q3CheckListItem * newColorItem )
170{ 173{
171 if ( !mColorEnabled ) 174 if ( !mColorEnabled )
172 return; 175 return;
173 if ( mColorItem == newColorItem) 176 if ( mColorItem == newColorItem)
@@ -185,18 +188,18 @@ void CategorySelectDialog::setColorItem( QCheckListItem * newColorItem )
185} 188}
186void CategorySelectDialog::slotApply() 189void CategorySelectDialog::slotApply()
187{ 190{
188 QStringList categories; 191 QStringList categories;
189 QCheckListItem *item = (QCheckListItem *)mCategories->firstChild(); 192 Q3CheckListItem *item = (Q3CheckListItem *)mCategories->firstChild();
190 QString colcat; 193 QString colcat;
191 while (item) { 194 while (item) {
192 if (item->isOn()) { 195 if (item->isOn()) {
193 if ( item == mColorItem) 196 if ( item == mColorItem)
194 colcat = item->text(); 197 colcat = item->text();
195 else 198 else
196 categories.append(item->text()); 199 categories.append(item->text());
197 } 200 }
198 item = (QCheckListItem *)item->nextSibling(); 201 item = (Q3CheckListItem *)item->nextSibling();
199 } 202 }
200 categories.sort(); 203 categories.sort();
201 if ( ! colcat.isEmpty() ) 204 if ( ! colcat.isEmpty() )
202 categories.prepend( colcat ); 205 categories.prepend( colcat );
@@ -219,24 +222,24 @@ void CategorySelectDialog::slotOk()
219} 222}
220 223
221void CategorySelectDialog::clear() 224void CategorySelectDialog::clear()
222{ 225{
223 QCheckListItem *item = (QCheckListItem *)mCategories->firstChild(); 226 Q3CheckListItem *item = (Q3CheckListItem *)mCategories->firstChild();
224 while (item) { 227 while (item) {
225 item->setOn(false); 228 item->setOn(false);
226 item = (QCheckListItem *)item->nextSibling(); 229 item = (Q3CheckListItem *)item->nextSibling();
227 } 230 }
228} 231}
229 232
230void CategorySelectDialog::updateCategoryConfig() 233void CategorySelectDialog::updateCategoryConfig()
231{ 234{
232 QStringList selected; 235 QStringList selected;
233 QCheckListItem *item = (QCheckListItem *)mCategories->firstChild(); 236 Q3CheckListItem *item = (Q3CheckListItem *)mCategories->firstChild();
234 while (item) { 237 while (item) {
235 if (item->isOn()) { 238 if (item->isOn()) {
236 selected.append(item->text()); 239 selected.append(item->text());
237 } 240 }
238 item = (QCheckListItem *)item->nextSibling(); 241 item = (Q3CheckListItem *)item->nextSibling();
239 } 242 }
240 243
241 setCategories(); 244 setCategories();
242 245
diff --git a/libkdepim/categoryselectdialog.h b/libkdepim/categoryselectdialog.h
index 680a093..ff7ac58 100644
--- a/libkdepim/categoryselectdialog.h
+++ b/libkdepim/categoryselectdialog.h
@@ -25,9 +25,9 @@
25 25
26#include <categoryselectdialog_base.h> 26#include <categoryselectdialog_base.h>
27 27
28class KPimPrefs; 28class KPimPrefs;
29class QCheckListItem; 29class Q3CheckListItem;
30 30
31namespace KPIM { 31namespace KPIM {
32 32
33class CategorySelectDialog : public CategorySelectDialog_base 33class CategorySelectDialog : public CategorySelectDialog_base
@@ -35,9 +35,9 @@ class CategorySelectDialog : public CategorySelectDialog_base
35 Q_OBJECT 35 Q_OBJECT
36 public: 36 public:
37 CategorySelectDialog( KPimPrefs *prefs, QWidget* parent = 0, 37 CategorySelectDialog( KPimPrefs *prefs, QWidget* parent = 0,
38 const char* name = 0, 38 const char* name = 0,
39 bool modal = FALSE, WFlags fl = 0 ); 39 bool modal = FALSE, Qt::WFlags fl = 0 );
40 ~CategorySelectDialog(); 40 ~CategorySelectDialog();
41 41
42 void setCategories(); 42 void setCategories();
43 void setColorEnabled(); 43 void setColorEnabled();
@@ -52,9 +52,9 @@ class CategorySelectDialog : public CategorySelectDialog_base
52 void accept(); 52 void accept();
53 void editCategoriesDialog(); 53 void editCategoriesDialog();
54 void updateCategoryConfig(); 54 void updateCategoryConfig();
55 void setColorCat(); 55 void setColorCat();
56 void clicked ( QListViewItem * ); 56 void clicked ( Q3ListViewItem * );
57 signals: 57 signals:
58 void categoriesSelected(const QString &); 58 void categoriesSelected(const QString &);
59 void categoriesSelected(const QStringList &); 59 void categoriesSelected(const QStringList &);
60 void editCategories(); 60 void editCategories();
@@ -62,10 +62,10 @@ class CategorySelectDialog : public CategorySelectDialog_base
62 private: 62 private:
63 bool mColorEnabled; 63 bool mColorEnabled;
64 KPimPrefs *mPrefs; 64 KPimPrefs *mPrefs;
65 QStringList mCategoryList; 65 QStringList mCategoryList;
66 QCheckListItem *mColorItem; 66 Q3CheckListItem *mColorItem;
67 void setColorItem( QCheckListItem * ); 67 void setColorItem( Q3CheckListItem * );
68 68
69 class CategorySelectDialogPrivate; 69 class CategorySelectDialogPrivate;
70 CategorySelectDialogPrivate *d; 70 CategorySelectDialogPrivate *d;
71}; 71};
diff --git a/libkdepim/categoryselectdialog_base.cpp b/libkdepim/categoryselectdialog_base.cpp
index 4793fd7..5d53ac4 100644
--- a/libkdepim/categoryselectdialog_base.cpp
+++ b/libkdepim/categoryselectdialog_base.cpp
@@ -10,36 +10,39 @@
10 10
11#include "categoryselectdialog_base.h" 11#include "categoryselectdialog_base.h"
12 12
13#include <qvariant.h> 13#include <qvariant.h>
14#include <qheader.h> 14#include <q3header.h>
15#include <qlistview.h> 15#include <q3listview.h>
16#include <qpushbutton.h> 16#include <qpushbutton.h>
17#include <qlayout.h> 17#include <qlayout.h>
18#include <qtooltip.h> 18#include <qtooltip.h>
19#include <qwhatsthis.h> 19#include <q3whatsthis.h>
20//Added by qt3to4:
21#include <Q3VBoxLayout>
22#include <Q3HBoxLayout>
20 23
21/* 24/*
22 * Constructs a CategorySelectDialog_base as a child of 'parent', with the 25 * Constructs a CategorySelectDialog_base as a child of 'parent', with the
23 * name 'name' and widget flags set to 'f'. 26 * name 'name' and widget flags set to 'f'.
24 * 27 *
25 * The dialog will by default be modeless, unless you set 'modal' to 28 * The dialog will by default be modeless, unless you set 'modal' to
26 * TRUE to construct a modal dialog. 29 * TRUE to construct a modal dialog.
27 */ 30 */
28CategorySelectDialog_base::CategorySelectDialog_base( QWidget* parent, const char* name, bool modal, WFlags fl ) 31CategorySelectDialog_base::CategorySelectDialog_base( QWidget* parent, const char* name, bool modal, Qt::WFlags fl )
29 : QDialog( parent, name, modal, fl ) 32 : QDialog( parent, name, modal, fl )
30 33
31{ 34{
32 if ( !name ) 35 if ( !name )
33 setName( "CategorySelectDialog_base" ); 36 setName( "CategorySelectDialog_base" );
34 CategorySelectDialog_baseLayout = new QVBoxLayout( this, 11, 6, "CategorySelectDialog_baseLayout"); 37 CategorySelectDialog_baseLayout = new Q3VBoxLayout( this, 11, 6, "CategorySelectDialog_baseLayout");
35 38
36 mCategories = new QListView( this, "mCategories" ); 39 mCategories = new Q3ListView( this, "mCategories" );
37 mCategories->addColumn( i18n( "Category" ) ); 40 mCategories->addColumn( i18n( "Category" ) );
38 CategorySelectDialog_baseLayout->addWidget( mCategories ); 41 CategorySelectDialog_baseLayout->addWidget( mCategories );
39 mSetColorCat = new QPushButton( this, "msetColor" ); 42 mSetColorCat = new QPushButton( this, "msetColor" );
40 CategorySelectDialog_baseLayout->addWidget( mSetColorCat ); 43 CategorySelectDialog_baseLayout->addWidget( mSetColorCat );
41 Layout12 = new QHBoxLayout( 0, 0, 4, "Layout12"); 44 Layout12 = new Q3HBoxLayout( 0, 0, 4, "Layout12");
42 45
43 mClear = new QPushButton( this, "mClear" ); 46 mClear = new QPushButton( this, "mClear" );
44 Layout12->addWidget( mClear ); 47 Layout12->addWidget( mClear );
45 // QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); 48 // QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
@@ -48,9 +51,9 @@ CategorySelectDialog_base::CategorySelectDialog_base( QWidget* parent, const cha
48 mButtonEdit = new QPushButton( this, "mButtonEdit" ); 51 mButtonEdit = new QPushButton( this, "mButtonEdit" );
49 Layout12->addWidget( mButtonEdit ); 52 Layout12->addWidget( mButtonEdit );
50 CategorySelectDialog_baseLayout->addLayout( Layout12 ); 53 CategorySelectDialog_baseLayout->addLayout( Layout12 );
51 54
52 Layout11 = new QHBoxLayout( 0, 0, 4, "Layout11"); 55 Layout11 = new Q3HBoxLayout( 0, 0, 4, "Layout11");
53 56
54 //mButtonHelp = new QPushButton( this, "mButtonHelp" ); 57 //mButtonHelp = new QPushButton( this, "mButtonHelp" );
55 //Layout11->addWidget( mButtonHelp ); 58 //Layout11->addWidget( mButtonHelp );
56 //QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); 59 //QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
diff --git a/libkdepim/categoryselectdialog_base.h b/libkdepim/categoryselectdialog_base.h
index 59ffa22..71d4ce9 100644
--- a/libkdepim/categoryselectdialog_base.h
+++ b/libkdepim/categoryselectdialog_base.h
@@ -11,25 +11,29 @@
11#define CATEGORYSELECTDIALOG_BASE_H 11#define CATEGORYSELECTDIALOG_BASE_H
12 12
13#include <qvariant.h> 13#include <qvariant.h>
14#include <qdialog.h> 14#include <qdialog.h>
15 15//Added by qt3to4:
16class QVBoxLayout; 16#include <Q3VBoxLayout>
17class QHBoxLayout; 17#include <Q3GridLayout>
18class QGridLayout; 18#include <Q3HBoxLayout>
19class QListView; 19
20class QListViewItem; 20class Q3VBoxLayout;
21class Q3HBoxLayout;
22class Q3GridLayout;
23class Q3ListView;
24class Q3ListViewItem;
21class QPushButton; 25class QPushButton;
22 26
23class CategorySelectDialog_base : public QDialog 27class CategorySelectDialog_base : public QDialog
24{ 28{
25 Q_OBJECT 29 Q_OBJECT
26 30
27public: 31public:
28 CategorySelectDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); 32 CategorySelectDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
29 ~CategorySelectDialog_base(); 33 ~CategorySelectDialog_base();
30 34
31 QListView* mCategories; 35 Q3ListView* mCategories;
32 QPushButton* mClear; 36 QPushButton* mClear;
33 QPushButton* mButtonEdit; 37 QPushButton* mButtonEdit;
34 QPushButton* mButtonHelp; 38 QPushButton* mButtonHelp;
35 QPushButton* mApply; 39 QPushButton* mApply;
@@ -42,11 +46,11 @@ public slots:
42 virtual void slotApply(); 46 virtual void slotApply();
43 virtual void slotOk(); 47 virtual void slotOk();
44 48
45protected: 49protected:
46 QVBoxLayout* CategorySelectDialog_baseLayout; 50 Q3VBoxLayout* CategorySelectDialog_baseLayout;
47 QHBoxLayout* Layout12; 51 Q3HBoxLayout* Layout12;
48 QHBoxLayout* Layout11; 52 Q3HBoxLayout* Layout11;
49 53
50protected slots: 54protected slots:
51 virtual void languageChange(); 55 virtual void languageChange();
52}; 56};
diff --git a/libkdepim/externalapphandler.cpp b/libkdepim/externalapphandler.cpp
index f376e6c..3fc548a 100644
--- a/libkdepim/externalapphandler.cpp
+++ b/libkdepim/externalapphandler.cpp
@@ -38,9 +38,11 @@ $Id$
38#include <qpe/qpeapplication.h> 38#include <qpe/qpeapplication.h>
39#include <qtopia/qcopenvelope_qws.h> 39#include <qtopia/qcopenvelope_qws.h>
40#else 40#else
41#include <qapplication.h> 41#include <qapplication.h>
42#include <qprocess.h> 42#include <q3process.h>
43//Added by qt3to4:
44#include <Q3CString>
43#endif 45#endif
44 46
45#include <kstaticdeleter.h> 47#include <kstaticdeleter.h>
46#include <kmessagebox.h> 48#include <kmessagebox.h>
@@ -122,9 +124,9 @@ void QCopTransferItem::setSourceChannel(const QString& sourceChannel)
122} 124}
123 125
124 126
125/*********************************************************************************/ 127/*********************************************************************************/
126bool QCopTransferItem::appMessage( const QCString& cmsg, const QByteArray& data ) 128bool QCopTransferItem::appMessage( const Q3CString& cmsg, const QByteArray& data )
127{ 129{
128 130
129 // copied from old mail2 131 // copied from old mail2
130/* 132/*
@@ -145,9 +147,9 @@ bool QCopTransferItem::appMessage( const QCString& cmsg, const QByteArray& data
145 //we are in the target and get a request from the source 147 //we are in the target and get a request from the source
146 if ( (_sourceMessage + _sourceMessageParameters) == cmsg.data()) 148 if ( (_sourceMessage + _sourceMessageParameters) == cmsg.data())
147 { 149 {
148 150
149 QDataStream stream( data, IO_ReadOnly ); 151 QDataStream stream( const_cast<QByteArray*>(&data), QIODevice::ReadOnly );
150 152
151 153
152 QString sourceChannel; 154 QString sourceChannel;
153 QString uid; 155 QString uid;
@@ -225,15 +227,15 @@ bool QCopMapTransferItem::sendMessageToSource(const QString& uid, const QMap<QSt
225} 227}
226 228
227 229
228/*********************************************************************************/ 230/*********************************************************************************/
229bool QCopMapTransferItem::appMessage( const QCString& cmsg, const QByteArray& data ) 231bool QCopMapTransferItem::appMessage( const Q3CString& cmsg, const QByteArray& data )
230{ 232{
231 bool res = QCopTransferItem::appMessage( cmsg, data ); 233 bool res = QCopTransferItem::appMessage( cmsg, data );
232 234
233 if (res == false) 235 if (res == false)
234 { 236 {
235 QDataStream stream( data, IO_ReadOnly ); 237 QDataStream stream( const_cast<QByteArray*>(&data), QIODevice::ReadOnly );
236 238
237// qDebug("QCopMapTransferItem- QCOP message received: %s ", cmsg.data() ); 239// qDebug("QCopMapTransferItem- QCOP message received: %s ", cmsg.data() );
238 240
239 //we are in the source and get an answer from the target 241 //we are in the source and get an answer from the target
@@ -304,18 +306,18 @@ bool QCopListTransferItem::sendMessageToSource(const QString& uid, const QString
304} 306}
305 307
306 308
307/*********************************************************************************/ 309/*********************************************************************************/
308bool QCopListTransferItem::appMessage( const QCString& cmsg, const QByteArray& data ) 310bool QCopListTransferItem::appMessage( const Q3CString& cmsg, const QByteArray& data )
309{ 311{
310 bool res = QCopTransferItem::appMessage( cmsg, data ); 312 bool res = QCopTransferItem::appMessage( cmsg, data );
311#ifdef DEBUG_EXT_APP_HANDLER 313#ifdef DEBUG_EXT_APP_HANDLER
312 qDebug("1QCopListTransferItem- QCOP message received: %s ", cmsg.data() ); 314 qDebug("1QCopListTransferItem- QCOP message received: %s ", cmsg.data() );
313#endif 315#endif
314 316
315 if (res == false) 317 if (res == false)
316 { 318 {
317 QDataStream stream( data, IO_ReadOnly ); 319 QDataStream stream( const_cast<QByteArray*>(&data), QIODevice::ReadOnly );
318 320
319#ifdef DEBUG_EXT_APP_HANDLER 321#ifdef DEBUG_EXT_APP_HANDLER
320 qDebug("2QCopListTransferItem- QCOP message received: %s ", cmsg.data() ); 322 qDebug("2QCopListTransferItem- QCOP message received: %s ", cmsg.data() );
321#endif 323#endif
@@ -517,11 +519,11 @@ void ExternalAppHandler::addDefaultAppItem(Types type, int id, const QString& la
517 mDefaultItems.append(dai); 519 mDefaultItems.append(dai);
518} 520}
519 521
520 522
521QList<DefaultAppItem> ExternalAppHandler::getAvailableDefaultItems(Types type) 523Q3PtrList<DefaultAppItem> ExternalAppHandler::getAvailableDefaultItems(Types type)
522{ 524{
523 QList<DefaultAppItem> list; 525 Q3PtrList<DefaultAppItem> list;
524 526
525 DefaultAppItem* dai; 527 DefaultAppItem* dai;
526 528
527 for ( dai=mDefaultItems.first(); dai != 0; dai=mDefaultItems.next() ) 529 for ( dai=mDefaultItems.first(); dai != 0; dai=mDefaultItems.next() )
@@ -745,9 +747,9 @@ bool ExternalAppHandler::mailToMultipleContacts( const QString& emails, const QS
745 qDebug("passing emailadresses(%s), attachmenturls(%s) as parameters in the form %s to QCopEnvelope", emails.latin1() , urls.latin1(), parameters2.latin1()); 747 qDebug("passing emailadresses(%s), attachmenturls(%s) as parameters in the form %s to QCopEnvelope", emails.latin1() , urls.latin1(), parameters2.latin1());
746#endif 748#endif
747 qDebug("%s --- %s %s --- %s %s", channel.latin1(), message.latin1(),message2.latin1(), parameters.latin1(), parameters2.latin1() ); 749 qDebug("%s --- %s %s --- %s %s", channel.latin1(), message.latin1(),message2.latin1(), parameters.latin1(), parameters2.latin1() );
748 //KMessageBox::sorry( 0, message2 ); 750 //KMessageBox::sorry( 0, message2 );
749 QProcess * proc = new QProcess( this ); 751 Q3Process * proc = new Q3Process( this );
750 int i = 0; 752 int i = 0;
751 proc->addArgument( channel ); 753 proc->addArgument( channel );
752 754
753 if ( message.find (" " ) > 0 ) { 755 if ( message.find (" " ) > 0 ) {
@@ -771,9 +773,9 @@ bool ExternalAppHandler::mailToMultipleContacts( const QString& emails, const QS
771 773
772 //KMessageBox::sorry( 0,arg ); 774 //KMessageBox::sorry( 0,arg );
773 //qDebug("2add%sdd ",arg.latin1() ); 775 //qDebug("2add%sdd ",arg.latin1() );
774 proc->addArgument( arg); 776 proc->addArgument( arg);
775 proc->launch(""); 777 proc->launch(QString());
776#endif 778#endif
777 779
778 return true; 780 return true;
779} 781}
@@ -830,9 +832,9 @@ bool ExternalAppHandler::mailToOneContact( const QString& name, const QString& e
830 passParameters(&e, parameters, name, emailadress); 832 passParameters(&e, parameters, name, emailadress);
831#else // DESKTOP_VERSION 833#else // DESKTOP_VERSION
832 834
833 //KMessageBox::sorry( 0,channel ); 835 //KMessageBox::sorry( 0,channel );
834 QProcess * proc = new QProcess( this ); 836 Q3Process * proc = new Q3Process( this );
835 proc->addArgument( channel ); 837 proc->addArgument( channel );
836 if ( message.find (" " ) > 0 ) { 838 if ( message.find (" " ) > 0 ) {
837 QStringList list = QStringList::split( " ", message ); 839 QStringList list = QStringList::split( " ", message );
838 int i = 0; 840 int i = 0;
@@ -849,9 +851,9 @@ bool ExternalAppHandler::mailToOneContact( const QString& name, const QString& e
849 parameters = translateMessage(parameters, name, emailadress); 851 parameters = translateMessage(parameters, name, emailadress);
850 852
851 //KMessageBox::information(0,parameters); 853 //KMessageBox::information(0,parameters);
852 proc->addArgument( parameters ); 854 proc->addArgument( parameters );
853 proc->launch(""); 855 proc->launch(QString());
854#endif 856#endif
855 857
856 return true; 858 return true;
857} 859}
@@ -1231,9 +1233,9 @@ void ExternalAppHandler::passParameters(QCopEnvelope* e, const QString& paramete
1231/************************************************************************** 1233/**************************************************************************
1232 * 1234 *
1233 **************************************************************************/ 1235 **************************************************************************/
1234 1236
1235void ExternalAppHandler::appMessage( const QCString& cmsg, const QByteArray& data ) 1237void ExternalAppHandler::appMessage( const Q3CString& cmsg, const QByteArray& data )
1236{ 1238{
1237 qDebug("ExternalAppHandler::appMessage %s %x", cmsg.data(), this); 1239 qDebug("ExternalAppHandler::appMessage %s %x", cmsg.data(), this);
1238 if ( cmsg == "nextView()" ) { 1240 if ( cmsg == "nextView()" ) {
1239 qDebug("nextView()"); 1241 qDebug("nextView()");
diff --git a/libkdepim/externalapphandler.h b/libkdepim/externalapphandler.h
index b899ad7..3247fe4 100644
--- a/libkdepim/externalapphandler.h
+++ b/libkdepim/externalapphandler.h
@@ -33,8 +33,11 @@ $Id$
33 33
34#include <qobject.h> 34#include <qobject.h>
35#include <qlist.h> 35#include <qlist.h>
36#include <qmap.h> 36#include <qmap.h>
37#include <Q3PtrList>
38//Added by qt3to4:
39#include <Q3CString>
37 40
38class QCopEnvelope; 41class QCopEnvelope;
39 42
40 43
@@ -49,9 +52,9 @@ class QCopTransferItem : public QObject
49 bool sendMessageToTarget(const QString& uid, const QString& param1 = QString::null, const QString& param2 = QString::null, const QString& param3 = QString::null); 52 bool sendMessageToTarget(const QString& uid, const QString& param1 = QString::null, const QString& param2 = QString::null, const QString& param3 = QString::null);
50 53
51 void setSourceChannel(const QString& sourceChannel); 54 void setSourceChannel(const QString& sourceChannel);
52 55
53 virtual bool appMessage( const QCString& msg, const QByteArray& data ); 56 virtual bool appMessage( const Q3CString& msg, const QByteArray& data );
54 57
55 58
56 signals: 59 signals:
57 void receivedMessageFromSource(const QString& sourceChannel, const QString& uid); 60 void receivedMessageFromSource(const QString& sourceChannel, const QString& uid);
@@ -82,9 +85,9 @@ class QCopMapTransferItem : public QCopTransferItem
82 85
83 bool sendMessageToSource(const QString& uid, const QMap<QString,QString>& nameEmailMap); 86 bool sendMessageToSource(const QString& uid, const QMap<QString,QString>& nameEmailMap);
84 87
85 88
86 virtual bool appMessage( const QCString& msg, const QByteArray& data ); 89 virtual bool appMessage( const Q3CString& msg, const QByteArray& data );
87 90
88 91
89 signals: 92 signals:
90 void receivedMessageFromTarget(const QString& uid, const QMap<QString,QString>& nameEmailMap); 93 void receivedMessageFromTarget(const QString& uid, const QMap<QString,QString>& nameEmailMap);
@@ -103,9 +106,9 @@ class QCopListTransferItem : public QCopTransferItem
103 ~QCopListTransferItem(); 106 ~QCopListTransferItem();
104 bool sendMessageToSource(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3, const QStringList& list4, const QStringList& list5, const QStringList& list6); 107 bool sendMessageToSource(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3, const QStringList& list4, const QStringList& list5, const QStringList& list6);
105 108
106 109
107 virtual bool appMessage( const QCString& msg, const QByteArray& data ); 110 virtual bool appMessage( const Q3CString& msg, const QByteArray& data );
108 111
109 112
110 signals: 113 signals:
111 void receivedMessageFromTarget(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3, const QStringList& list4 , const QStringList& list5, const QStringList& list6); 114 void receivedMessageFromTarget(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3, const QStringList& list4 , const QStringList& list5, const QStringList& list6);
@@ -224,13 +227,13 @@ class ExternalAppHandler : public QObject
224 227
225 //loadConfig clears the cache and checks again if the applications are available or not 228 //loadConfig clears the cache and checks again if the applications are available or not
226 void loadConfig(); 229 void loadConfig();
227 230
228 QList<DefaultAppItem> getAvailableDefaultItems(Types); 231 Q3PtrList<DefaultAppItem> getAvailableDefaultItems(Types);
229 DefaultAppItem* getDefaultItem(Types, int); 232 DefaultAppItem* getDefaultItem(Types, int);
230 233
231 public slots: 234 public slots:
232 void appMessage( const QCString& msg, const QByteArray& data ); 235 void appMessage( const Q3CString& msg, const QByteArray& data );
233 236
234 237
235 signals: 238 signals:
236 void callContactdialog(); 239 void callContactdialog();
@@ -261,9 +264,9 @@ class ExternalAppHandler : public QObject
261 264
262 265
263 private: 266 private:
264 ExternalAppHandler(); 267 ExternalAppHandler();
265 QList<DefaultAppItem> mDefaultItems; 268 Q3PtrList<DefaultAppItem> mDefaultItems;
266 269
267 Availability mEmailAppAvailable; 270 Availability mEmailAppAvailable;
268 Availability mPhoneAppAvailable; 271 Availability mPhoneAppAvailable;
269 Availability mFaxAppAvailable; 272 Availability mFaxAppAvailable;
diff --git a/libkdepim/kcmconfigs/kcmkdepimconfig.cpp b/libkdepim/kcmconfigs/kcmkdepimconfig.cpp
index 5094830..9f47766 100644
--- a/libkdepim/kcmconfigs/kcmkdepimconfig.cpp
+++ b/libkdepim/kcmconfigs/kcmkdepimconfig.cpp
@@ -29,8 +29,10 @@ $Id$
29*/ 29*/
30 30
31 31
32#include <qlayout.h> 32#include <qlayout.h>
33//Added by qt3to4:
34#include <Q3VBoxLayout>
33 35
34#include <kdebug.h> 36#include <kdebug.h>
35//#include <klocale.h> 37//#include <klocale.h>
36//#include <stdlib.h> 38//#include <stdlib.h>
@@ -53,9 +55,9 @@ extern "C"
53KCMKdePimConfig::KCMKdePimConfig(QWidget *parent, const char *name ) 55KCMKdePimConfig::KCMKdePimConfig(QWidget *parent, const char *name )
54 : KCModule( KPimGlobalPrefs::instance(), parent, name ) 56 : KCModule( KPimGlobalPrefs::instance(), parent, name )
55{ 57{
56 //abort(); 58 //abort();
57 QVBoxLayout *layout = new QVBoxLayout( this ); 59 Q3VBoxLayout *layout = new Q3VBoxLayout( this );
58 mConfigWidget = new KDEPIMConfigWidget( (KPimGlobalPrefs*)getPreferences(), this, "KDEPIMConfigWidget" ); 60 mConfigWidget = new KDEPIMConfigWidget( (KPimGlobalPrefs*)getPreferences(), this, "KDEPIMConfigWidget" );
59 layout->addWidget( mConfigWidget ); 61 layout->addWidget( mConfigWidget );
60 layout->setSpacing( 0 ); 62 layout->setSpacing( 0 );
61 layout->setMargin( 0 ); 63 layout->setMargin( 0 );
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
index 292951b..11a2b45 100644
--- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
+++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
@@ -30,18 +30,23 @@ $Id$
30 30
31#include <qlayout.h> 31#include <qlayout.h>
32#include <qtabwidget.h> 32#include <qtabwidget.h>
33#include <qcombobox.h> 33#include <qcombobox.h>
34#include <qgroupbox.h> 34#include <q3groupbox.h>
35#include <qlabel.h> 35#include <qlabel.h>
36#include <qlineedit.h> 36#include <qlineedit.h>
37#include <qbuttongroup.h> 37#include <q3buttongroup.h>
38#include <qcheckbox.h> 38#include <qcheckbox.h>
39#include <qfile.h> 39#include <qfile.h>
40#include <qvbox.h> 40#include <q3vbox.h>
41#include <qdir.h> 41#include <qdir.h>
42#include <qregexp.h> 42#include <qregexp.h>
43#include <qspinbox.h> 43#include <qspinbox.h>
44#include <QDesktopWidget>
45//Added by qt3to4:
46#include <Q3HBoxLayout>
47#include <Q3GridLayout>
48#include <Q3VBoxLayout>
44 49
45#include <kdialog.h> 50#include <kdialog.h>
46#include <kprefsdialog.h> 51#include <kprefsdialog.h>
47#include <klocale.h> 52#include <klocale.h>
@@ -100,9 +105,9 @@ KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent,
100 mExternalAppsMap.insert(ExternalAppHandler::PAGER, i18n("Pager")); 105 mExternalAppsMap.insert(ExternalAppHandler::PAGER, i18n("Pager"));
101 mExternalAppsMap.insert(ExternalAppHandler::SIP, i18n("SIP")); 106 mExternalAppsMap.insert(ExternalAppHandler::SIP, i18n("SIP"));
102 107
103 108
104 QVBoxLayout *topLayout = new QVBoxLayout( this, 0, 109 Q3VBoxLayout *topLayout = new Q3VBoxLayout( this, 0,
105 KDialog::spacingHint() ); 110 KDialog::spacingHint() );
106 111
107 tabWidget = new QTabWidget( this ); 112 tabWidget = new QTabWidget( this );
108 topLayout->addWidget( tabWidget ); 113 topLayout->addWidget( tabWidget );
@@ -120,19 +125,19 @@ void KDEPIMConfigWidget::showTimeZoneTab()
120 tabWidget->setCurrentPage ( 3 ) ; 125 tabWidget->setCurrentPage ( 3 ) ;
121} 126}
122void KDEPIMConfigWidget::setupBackupTab() 127void KDEPIMConfigWidget::setupBackupTab()
123{ 128{
124 QVBox *colorPage = new QVBox( this ); 129 Q3VBox *colorPage = new Q3VBox( this );
125 tabWidget->addTab( colorPage, i18n( "Backup" ) ); 130 tabWidget->addTab( colorPage, i18n( "Backup" ) );
126 QWidget* topFrame = new QWidget( colorPage ); 131 QWidget* topFrame = new QWidget( colorPage );
127 QVBoxLayout *topLayout = new QVBoxLayout(topFrame); 132 Q3VBoxLayout *topLayout = new Q3VBoxLayout(topFrame);
128 KPrefsWidBool *sb = addWidBool(i18n("Backup enabled"), 133 KPrefsWidBool *sb = addWidBool(i18n("Backup enabled"),
129 &(KPimGlobalPrefs::instance()->mBackupEnabled),topFrame); 134 &(KPimGlobalPrefs::instance()->mBackupEnabled),topFrame);
130 topLayout->addWidget((QWidget*)sb->checkBox()); 135 topLayout->addWidget((QWidget*)sb->checkBox());
131 QWidget* bupFrame = new QWidget( topFrame ); 136 QWidget* bupFrame = new QWidget( topFrame );
132 topLayout->addWidget((bupFrame)); 137 topLayout->addWidget((bupFrame));
133 QObject::connect ( sb->checkBox(), SIGNAL (toggled ( bool ) ), bupFrame, SLOT ( setEnabled( bool ) ) ); 138 QObject::connect ( sb->checkBox(), SIGNAL (toggled ( bool ) ), bupFrame, SLOT ( setEnabled( bool ) ) );
134 QVBoxLayout *bupLayout = new QVBoxLayout(bupFrame); 139 Q3VBoxLayout *bupLayout = new Q3VBoxLayout(bupFrame);
135 sb = addWidBool(i18n("Use standard backup dir"), 140 sb = addWidBool(i18n("Use standard backup dir"),
136 &(KPimGlobalPrefs::instance()->mBackupUseDefaultDir),bupFrame); 141 &(KPimGlobalPrefs::instance()->mBackupUseDefaultDir),bupFrame);
137 bupLayout->addWidget((QWidget*)sb->checkBox()); 142 bupLayout->addWidget((QWidget*)sb->checkBox());
138 mBackupUrl = new KURLRequester( bupFrame ); 143 mBackupUrl = new KURLRequester( bupFrame );
@@ -142,15 +147,15 @@ void KDEPIMConfigWidget::setupBackupTab()
142 bupLayout->addWidget( mBackupUrl ); 147 bupLayout->addWidget( mBackupUrl );
143 148
144 mBackupUrl->setEnabled( !KPimGlobalPrefs::instance()->mBackupUseDefaultDir ); 149 mBackupUrl->setEnabled( !KPimGlobalPrefs::instance()->mBackupUseDefaultDir );
145 bupFrame->setEnabled( KPimGlobalPrefs::instance()->mBackupEnabled ); 150 bupFrame->setEnabled( KPimGlobalPrefs::instance()->mBackupEnabled );
146 QHBox *dummy = new QHBox(bupFrame); 151 Q3HBox *dummy = new Q3HBox(bupFrame);
147 new QLabel(i18n("Number of Backups:"),dummy); 152 new QLabel(i18n("Number of Backups:"),dummy);
148 mBackupNumbersSpin = new QSpinBox(1,21,1,dummy); 153 mBackupNumbersSpin = new QSpinBox(1,21,1,dummy);
149 new QLabel(i18n(" "),dummy); 154 new QLabel(i18n(" "),dummy);
150 bupLayout->addWidget( dummy ); 155 bupLayout->addWidget( dummy );
151 156
152 dummy = new QHBox(bupFrame); 157 dummy = new Q3HBox(bupFrame);
153 new QLabel(i18n("Make backup every "),dummy); 158 new QLabel(i18n("Make backup every "),dummy);
154 mBackupDayCountSpin = new QSpinBox(1,28,1,dummy); 159 mBackupDayCountSpin = new QSpinBox(1,28,1,dummy);
155 new QLabel(i18n(" days"),dummy); 160 new QLabel(i18n(" days"),dummy);
156 new QLabel(i18n(" "),dummy); 161 new QLabel(i18n(" "),dummy);
@@ -166,20 +171,20 @@ void KDEPIMConfigWidget::setupBackupTab()
166 171
167} 172}
168void KDEPIMConfigWidget::setupStoreTab() 173void KDEPIMConfigWidget::setupStoreTab()
169{ 174{
170 QVBox *colorPage = new QVBox( this ); 175 Q3VBox *colorPage = new Q3VBox( this );
171 tabWidget->addTab( colorPage, i18n( "Colors" ) ); 176 tabWidget->addTab( colorPage, i18n( "Colors" ) );
172 QWidget* cw = new QWidget( colorPage ); 177 QWidget* cw = new QWidget( colorPage );
173 KPrefsWidColor *holidayColor = 178 KPrefsWidColor *holidayColor =
174 addWidColor(i18n("Alternating background of list views"), 179 addWidColor(i18n("Alternating background of list views"),
175 &(KPimGlobalPrefs::instance()->mAlternateColor),cw); 180 &(KPimGlobalPrefs::instance()->mAlternateColor),cw);
176 QHBoxLayout *topLayout = new QHBoxLayout(cw); 181 Q3HBoxLayout *topLayout = new Q3HBoxLayout(cw);
177 topLayout->addWidget(holidayColor->label()); 182 topLayout->addWidget(holidayColor->label());
178 topLayout->addWidget( (QWidget* )holidayColor->button()); 183 topLayout->addWidget( (QWidget* )holidayColor->button());
179 184
180 185
181 QVBox *storePage = new QVBox( this ); 186 Q3VBox *storePage = new Q3VBox( this );
182 if ( QApplication::desktop()->height() > 240 ) 187 if ( QApplication::desktop()->height() > 240 )
183 new QLabel( i18n("Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail").arg(KGlobal::dirs()->localkdedir()), storePage ); 188 new QLabel( i18n("Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail").arg(KGlobal::dirs()->localkdedir()), storePage );
184 new QLabel( i18n("<b>New data storage dir:</b>"), storePage ); 189 new QLabel( i18n("<b>New data storage dir:</b>"), storePage );
185 mStoreUrl = new KURLRequester( storePage ); 190 mStoreUrl = new KURLRequester( storePage );
@@ -199,9 +204,9 @@ void KDEPIMConfigWidget::setupStoreTab()
199 } 204 }
200 205
201#endif 206#endif
202 new QLabel( i18n("New dirs are created automatically"), storePage ); 207 new QLabel( i18n("New dirs are created automatically"), storePage );
203 QHBox *bb = new QHBox( storePage ); 208 Q3HBox *bb = new Q3HBox( storePage );
204 QPushButton * pb; 209 QPushButton * pb;
205 if ( QApplication::desktop()->width() < 640 ) 210 if ( QApplication::desktop()->width() < 640 )
206 pb = new QPushButton ( i18n("Save"), bb ); 211 pb = new QPushButton ( i18n("Save"), bb );
207 else 212 else
@@ -269,9 +274,9 @@ void KDEPIMConfigWidget::saveStoreSettings()
269} 274}
270void KDEPIMConfigWidget::setupExternalAppTab() 275void KDEPIMConfigWidget::setupExternalAppTab()
271{ 276{
272 QWidget *externalAppsPage = new QWidget( this ); 277 QWidget *externalAppsPage = new QWidget( this );
273 QVBoxLayout* layout = new QVBoxLayout( externalAppsPage, KDialog::marginHintSmall(), 278 Q3VBoxLayout* layout = new Q3VBoxLayout( externalAppsPage, KDialog::marginHintSmall(),
274 KDialog::spacingHintSmall() ); 279 KDialog::spacingHintSmall() );
275 280
276 mExternalApps = new QComboBox( externalAppsPage ); 281 mExternalApps = new QComboBox( externalAppsPage );
277 282
@@ -284,10 +289,10 @@ void KDEPIMConfigWidget::setupExternalAppTab()
284 connect( mExternalApps, SIGNAL( activated( int ) ), 289 connect( mExternalApps, SIGNAL( activated( int ) ),
285 this, SLOT (externalapp_changed( int ) ) ); 290 this, SLOT (externalapp_changed( int ) ) );
286 291
287 292
288 mExternalAppGroupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Used Mail Client" ), externalAppsPage ); 293 mExternalAppGroupBox = new Q3GroupBox( 0, Qt::Vertical, i18n( "Used Mail Client" ), externalAppsPage );
289 QGridLayout *boxLayout = new QGridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" ); 294 Q3GridLayout *boxLayout = new Q3GridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" );
290 mExternalAppGroupBox->layout()->setMargin(4); 295 mExternalAppGroupBox->layout()->setMargin(4);
291 296
292 mClient = new QComboBox( mExternalAppGroupBox ); 297 mClient = new QComboBox( mExternalAppGroupBox );
293 boxLayout->addMultiCellWidget( mClient, 0, 0, 0, 1 ); 298 boxLayout->addMultiCellWidget( mClient, 0, 0, 0, 1 );
@@ -351,9 +356,9 @@ void KDEPIMConfigWidget::setupExternalAppTab()
351 356
352void KDEPIMConfigWidget::setupLocaleDateTab() 357void KDEPIMConfigWidget::setupLocaleDateTab()
353{ 358{
354 QWidget *topFrame = new QWidget( this ); 359 QWidget *topFrame = new QWidget( this );
355 QGridLayout *topLayout = new QGridLayout( topFrame, 3, 2); 360 Q3GridLayout *topLayout = new Q3GridLayout( topFrame, 3, 2);
356 361
357 topLayout->setSpacing(KDialog::spacingHintSmall()); 362 topLayout->setSpacing(KDialog::spacingHintSmall());
358 topLayout->setMargin(KDialog::marginHintSmall()); 363 topLayout->setMargin(KDialog::marginHintSmall());
359 int iii = 0; 364 int iii = 0;
@@ -419,9 +424,9 @@ void KDEPIMConfigWidget::setupLocaleDateTab()
419void KDEPIMConfigWidget::setupLocaleTab() 424void KDEPIMConfigWidget::setupLocaleTab()
420{ 425{
421 426
422 QWidget *topFrame = new QWidget( this ); 427 QWidget *topFrame = new QWidget( this );
423 QGridLayout *topLayout = new QGridLayout(topFrame,4,2); 428 Q3GridLayout *topLayout = new Q3GridLayout(topFrame,4,2);
424 429
425 topLayout->setSpacing(KDialog::spacingHint()); 430 topLayout->setSpacing(KDialog::spacingHint());
426 topLayout->setMargin(KDialog::marginHint()); 431 topLayout->setMargin(KDialog::marginHint());
427 int iii = 0; 432 int iii = 0;
@@ -441,9 +446,9 @@ void KDEPIMConfigWidget::setupLocaleTab()
441 446
442 447
443 tabWidget->addTab( topFrame, i18n( "Language" ) ); 448 tabWidget->addTab( topFrame, i18n( "Language" ) );
444 topFrame = new QWidget( this ); 449 topFrame = new QWidget( this );
445 topLayout = new QGridLayout(topFrame,4,2); 450 topLayout = new Q3GridLayout(topFrame,4,2);
446 451
447 topLayout->setSpacing(KDialog::spacingHint()); 452 topLayout->setSpacing(KDialog::spacingHint());
448 topLayout->setMargin(KDialog::marginHint()); 453 topLayout->setMargin(KDialog::marginHint());
449 iii = 0; 454 iii = 0;
@@ -470,21 +475,21 @@ void KDEPIMConfigWidget::setupLocaleTab()
470 475
471void KDEPIMConfigWidget::setupTimeZoneTab() 476void KDEPIMConfigWidget::setupTimeZoneTab()
472{ 477{
473 QWidget *topFrame; 478 QWidget *topFrame;
474 QGridLayout *topLayout ; 479 Q3GridLayout *topLayout ;
475 480
476 481
477 482
478 483
479 484
480 485
481 topFrame = new QWidget( this ); 486 topFrame = new QWidget( this );
482 topLayout = new QGridLayout( topFrame, 5, 2); 487 topLayout = new Q3GridLayout( topFrame, 5, 2);
483 topLayout->setSpacing(KDialog::spacingHintSmall()); 488 topLayout->setSpacing(KDialog::spacingHintSmall());
484 topLayout->setMargin(KDialog::marginHintSmall()); 489 topLayout->setMargin(KDialog::marginHintSmall());
485 490
486 QHBox *timeZoneBox = new QHBox( topFrame ); 491 Q3HBox *timeZoneBox = new Q3HBox( topFrame );
487 topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); 492 topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 );
488 493
489 new QLabel( i18n("Timezone:"), timeZoneBox ); 494 new QLabel( i18n("Timezone:"), timeZoneBox );
490 mTimeZoneCombo = new QComboBox( timeZoneBox ); 495 mTimeZoneCombo = new QComboBox( timeZoneBox );
@@ -549,9 +554,9 @@ void KDEPIMConfigWidget::setupTimeZoneTab()
549 tabWidget->addTab( topFrame, i18n( "Time Zone" ) ); 554 tabWidget->addTab( topFrame, i18n( "Time Zone" ) );
550 555
551 556
552 topFrame = new QWidget( this ); 557 topFrame = new QWidget( this );
553 topLayout = new QGridLayout( topFrame, 3, 2); 558 topLayout = new Q3GridLayout( topFrame, 3, 2);
554 topLayout->setSpacing(KDialog::spacingHintSmall()); 559 topLayout->setSpacing(KDialog::spacingHintSmall());
555 topLayout->setMargin(KDialog::marginHintSmall()); 560 topLayout->setMargin(KDialog::marginHintSmall());
556 tabWidget->addTab( topFrame, i18n( "Fonts" ) ); 561 tabWidget->addTab( topFrame, i18n( "Fonts" ) );
557 562
@@ -710,9 +715,9 @@ void KDEPIMConfigWidget::updateClientWidgets()
710 715
711 //update the entries in the client combobox 716 //update the entries in the client combobox
712 mClient->clear(); 717 mClient->clear();
713 718
714 QList<DefaultAppItem> items = ExternalAppHandler::instance()->getAvailableDefaultItems(mCurrentApp); 719 Q3PtrList<DefaultAppItem> items = ExternalAppHandler::instance()->getAvailableDefaultItems(mCurrentApp);
715 DefaultAppItem* dai; 720 DefaultAppItem* dai;
716 for ( dai=items.first(); dai != 0; dai=items.next() ) 721 for ( dai=items.first(); dai != 0; dai=items.next() )
717 { 722 {
718 mClient->insertItem( i18n(dai->_label), dai->_id ); 723 mClient->insertItem( i18n(dai->_label), dai->_id );
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.h b/libkdepim/kcmconfigs/kdepimconfigwidget.h
index 824ef79..d693015 100644
--- a/libkdepim/kcmconfigs/kdepimconfigwidget.h
+++ b/libkdepim/kcmconfigs/kdepimconfigwidget.h
@@ -33,16 +33,18 @@ $Id$
33 33
34#include <kprefswidget.h> 34#include <kprefswidget.h>
35#include <kio/kfile/kurlrequester.h> 35#include <kio/kfile/kurlrequester.h>
36#include <qmap.h> 36#include <qmap.h>
37//Added by qt3to4:
38#include <QLabel>
37 39
38#include "externalapphandler.h" 40#include "externalapphandler.h"
39 41
40 42
41class QComboBox; 43class QComboBox;
42class QLineEdit; 44class QLineEdit;
43class KPimGlobalPrefs; 45class KPimGlobalPrefs;
44class QGroupBox; 46class Q3GroupBox;
45class QTabWidget; 47class QTabWidget;
46class KDateEdit; 48class KDateEdit;
47 49
48class KDEPIMConfigWidget : public KPrefsWidget 50class KDEPIMConfigWidget : public KPrefsWidget
@@ -105,9 +107,9 @@ class KDEPIMConfigWidget : public KPrefsWidget
105// QCheckBox *mNameParsing; 107// QCheckBox *mNameParsing;
106// QCheckBox *mViewsSingleClickBox; 108// QCheckBox *mViewsSingleClickBox;
107// QPushButton *mConfigureButton; 109// QPushButton *mConfigureButton;
108 QComboBox* mExternalApps; 110 QComboBox* mExternalApps;
109 QGroupBox* mExternalAppGroupBox; 111 Q3GroupBox* mExternalAppGroupBox;
110 112
111 113
112 QComboBox* mClient; 114 QComboBox* mClient;
113 QLineEdit* mChannel; 115 QLineEdit* mChannel;
diff --git a/libkdepim/kdateedit.cpp b/libkdepim/kdateedit.cpp
index bf38479..28c88d4 100644
--- a/libkdepim/kdateedit.cpp
+++ b/libkdepim/kdateedit.cpp
@@ -26,8 +26,11 @@
26#include <qevent.h> 26#include <qevent.h>
27#include <qlineedit.h> 27#include <qlineedit.h>
28#include <qpixmap.h> 28#include <qpixmap.h>
29#include <qpushbutton.h> 29#include <qpushbutton.h>
30//Added by qt3to4:
31#include <Q3Frame>
32#include <QKeyEvent>
30 33
31#include <kdatepicker.h> 34#include <kdatepicker.h>
32#include <kdebug.h> 35#include <kdebug.h>
33#include <kglobal.h> 36#include <kglobal.h>
@@ -35,14 +38,15 @@
35#include <klocale.h> 38#include <klocale.h>
36#include <kmessagebox.h> 39#include <kmessagebox.h>
37#include <knotifyclient.h> 40#include <knotifyclient.h>
38#include <qpalette.h> 41#include <qpalette.h>
42#include <QDesktopWidget>
39 43
40#include "kdateedit.h" 44#include "kdateedit.h"
41//#include "kdateedit.moc" 45//#include "kdateedit.moc"
42 46
43KDateEdit::KDateEdit(QWidget *parent, const char *name, bool withoutDP ) 47KDateEdit::KDateEdit(QWidget *parent, const char *name, bool withoutDP )
44 : QHBox(parent, name) 48 : Q3HBox(parent, name)
45{ 49{
46 dateFormShort = true; 50 dateFormShort = true;
47 withoutDp = withoutDP; 51 withoutDp = withoutDP;
48 mDateEdit = new QLineEdit(this); 52 mDateEdit = new QLineEdit(this);
@@ -71,11 +75,11 @@ KDateEdit::KDateEdit(QWidget *parent, const char *name, bool withoutDP )
71 QPixmap pixmap2 = SmallIcon("today_small"); 75 QPixmap pixmap2 = SmallIcon("today_small");
72 QPushButton* nowButton = new QPushButton(this); 76 QPushButton* nowButton = new QPushButton(this);
73 nowButton->setPixmap(pixmap2); 77 nowButton->setPixmap(pixmap2);
74 78
75 mDateFrame = new QVBox(0,0,WType_Popup); 79 mDateFrame = new Q3VBox(0,0,Qt::WType_Popup);
76 // mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised); 80 // mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised);
77 mDateFrame->setFrameStyle( QFrame::WinPanel |QFrame::Raised ); 81 mDateFrame->setFrameStyle( Q3Frame::WinPanel |Q3Frame::Raised );
78 mDateFrame->setLineWidth(3); 82 mDateFrame->setLineWidth(3);
79 mDateFrame->hide(); 83 mDateFrame->hide();
80 84
81 mDatePicker = new KDatePicker(mDateFrame,QDate::currentDate()); 85 mDatePicker = new KDatePicker(mDateFrame,QDate::currentDate());
@@ -85,9 +89,9 @@ KDateEdit::KDateEdit(QWidget *parent, const char *name, bool withoutDP )
85 connect(mDatePicker,SIGNAL(dateSelected(QDate)),SIGNAL(dateChanged(QDate))); 89 connect(mDatePicker,SIGNAL(dateSelected(QDate)),SIGNAL(dateChanged(QDate)));
86 connect(mDatePicker,SIGNAL(dateSelected(QDate)),mDateFrame,SLOT(hide())); 90 connect(mDatePicker,SIGNAL(dateSelected(QDate)),mDateFrame,SLOT(hide()));
87 connect(mDateButton,SIGNAL(clicked()),SLOT(toggleDatePicker())); 91 connect(mDateButton,SIGNAL(clicked()),SLOT(toggleDatePicker()));
88 connect(nowButton,SIGNAL(clicked()),SLOT(goToNow())); 92 connect(nowButton,SIGNAL(clicked()),SLOT(goToNow()));
89 mDateButton->setFocusPolicy( QWidget::NoFocus ); 93 mDateButton->setFocusPolicy( Qt::NoFocus );
90 mDateButton->setAutoDefault( false ); 94 mDateButton->setAutoDefault( false );
91 //mDateFrame->resize( 400, 300 ); 95 //mDateFrame->resize( 400, 300 );
92 96
93 } 97 }
@@ -224,37 +228,37 @@ void KDateEdit::setDate( QDate date,int *cpos,const int key ,const bool dateForm
224 switch ( dateForm.at(begin + 1).latin1() ) { 228 switch ( dateForm.at(begin + 1).latin1() ) {
225 case 'd': 229 case 'd':
226 case 'a': 230 case 'a':
227 case 'A': 231 case 'A':
228 if(key == Key_Up) { 232 if(key == Qt::Key_Up) {
229 setDate( date.addDays( 1 ) ); 233 setDate( date.addDays( 1 ) );
230 } 234 }
231 else if(key == Key_Down) { 235 else if(key == Qt::Key_Down) {
232 setDate( date.addDays( -1 ) ); 236 setDate( date.addDays( -1 ) );
233 } 237 }
234 maxDay = readDate().day(); 238 maxDay = readDate().day();
235 break; 239 break;
236 case 'm': 240 case 'm':
237 case 'b': 241 case 'b':
238 case 'B': 242 case 'B':
239 if(key == Key_Up) { 243 if(key == Qt::Key_Up) {
240 int year = ((date.month()+1)>12)?date.year()+1:date.year(); 244 int year = ((date.month()+1)>12)?date.year()+1:date.year();
241 int month = ((date.month()+1)>12)?1:date.month()+1; 245 int month = ((date.month()+1)>12)?1:date.month()+1;
242 int day = (QDate(year,month,1).daysInMonth()<maxDay)?QDate(year,month,1).daysInMonth():maxDay; 246 int day = (QDate(year,month,1).daysInMonth()<maxDay)?QDate(year,month,1).daysInMonth():maxDay;
243 setDate( QDate( year, month, day ) ); 247 setDate( QDate( year, month, day ) );
244 } else if(key == Key_Down) { 248 } else if(key == Qt::Key_Down) {
245 int year = ((date.month()-1)<1)?date.year()-1:date.year(); 249 int year = ((date.month()-1)<1)?date.year()-1:date.year();
246 int month = ((date.month()-1)<1)?12:date.month()-1; 250 int month = ((date.month()-1)<1)?12:date.month()-1;
247 int day = (QDate(year,month,1).daysInMonth()<maxDay)?QDate(year,month,1).daysInMonth():maxDay; 251 int day = (QDate(year,month,1).daysInMonth()<maxDay)?QDate(year,month,1).daysInMonth():maxDay;
248 setDate( QDate( year, month, day ) ); 252 setDate( QDate( year, month, day ) );
249 } 253 }
250 break; 254 break;
251 case 'y': 255 case 'y':
252 case 'Y': 256 case 'Y':
253 if(key == Key_Up) { 257 if(key == Qt::Key_Up) {
254 setDate( QDate( date.year() + 1, date.month() , date.day()) ); 258 setDate( QDate( date.year() + 1, date.month() , date.day()) );
255 } 259 }
256 else if(key == Key_Down) { 260 else if(key == Qt::Key_Down) {
257 setDate( QDate( date.year() - 1, date.month() , date.day()) ); 261 setDate( QDate( date.year() - 1, date.month() , date.day()) );
258 } 262 }
259 break; 263 break;
260/* default: 264/* default:
@@ -343,14 +347,14 @@ void KDateEdit::keyPressEvent(QKeyEvent *e)
343 int cpos = mDateEdit->cursorPosition(); 347 int cpos = mDateEdit->cursorPosition();
344 348
345 switch(e->key()) 349 switch(e->key())
346 { 350 {
347 case Key_Escape: 351 case Qt::Key_Escape:
348 mDateEdit->deselect(); 352 mDateEdit->deselect();
349 case Key_Tab: 353 case Qt::Key_Tab:
350 QHBox::keyPressEvent(e); 354 Q3HBox::keyPressEvent(e);
351 break; 355 break;
352 case Key_Up: 356 case Qt::Key_Up:
353 // when date invalid then set to currend and return 357 // when date invalid then set to currend and return
354 if(!date.isValid()) { 358 if(!date.isValid()) {
355 date = QDate::currentDate(); 359 date = QDate::currentDate();
356 setDate(date); 360 setDate(date);
@@ -359,11 +363,11 @@ void KDateEdit::keyPressEvent(QKeyEvent *e)
359 QString text = i18n( "You entered an invalid date!\n Date changed to current date." ); 363 QString text = i18n( "You entered an invalid date!\n Date changed to current date." );
360 KMessageBox::information( 0, text ); 364 KMessageBox::information( 0, text );
361 return; 365 return;
362 } 366 }
363 setDate(date, &cpos, Key_Up, dateFormShort); 367 setDate(date, &cpos, Qt::Key_Up, dateFormShort);
364 break; 368 break;
365 case Key_Down: 369 case Qt::Key_Down:
366 // when date invalid then set to current and return 370 // when date invalid then set to current and return
367 if(!date.isValid()) { 371 if(!date.isValid()) {
368 date = QDate::currentDate(); 372 date = QDate::currentDate();
369 setDate(date); 373 setDate(date);
@@ -372,12 +376,12 @@ void KDateEdit::keyPressEvent(QKeyEvent *e)
372 QString text = i18n( "You entered an invalid date!\n Date changed to current date." ); 376 QString text = i18n( "You entered an invalid date!\n Date changed to current date." );
373 KMessageBox::information( 0, text ); 377 KMessageBox::information( 0, text );
374 return; 378 return;
375 } 379 }
376 setDate(date, &cpos, Key_Down, dateFormShort); 380 setDate(date, &cpos, Qt::Key_Down, dateFormShort);
377 break; 381 break;
378 default: 382 default:
379 QHBox::keyPressEvent(e); 383 Q3HBox::keyPressEvent(e);
380 break; 384 break;
381 } // switch 385 } // switch
382 mDateEdit->setCursorPosition(cpos); 386 mDateEdit->setCursorPosition(cpos);
383} 387}
diff --git a/libkdepim/kdateedit.h b/libkdepim/kdateedit.h
index 2d8c452..38eacde 100644
--- a/libkdepim/kdateedit.h
+++ b/libkdepim/kdateedit.h
@@ -23,12 +23,15 @@
23*/ 23*/
24#ifndef KDATEEDIT_H 24#ifndef KDATEEDIT_H
25#define KDATEEDIT_H 25#define KDATEEDIT_H
26 26
27#include <qhbox.h> 27#include <q3hbox.h>
28#include <qvbox.h> 28#include <q3vbox.h>
29#include <qdatetime.h> 29#include <qdatetime.h>
30#include <qmap.h> 30#include <qmap.h>
31//Added by qt3to4:
32#include <QKeyEvent>
33#include <QEvent>
31 34
32class QLineEdit; 35class QLineEdit;
33class QPushButton; 36class QPushButton;
34class QObject; 37class QObject;
@@ -48,9 +51,9 @@ class KDateValidator;
48* 51*
49* @author Cornelius Schumacher <schumacher@kde.org> 52* @author Cornelius Schumacher <schumacher@kde.org>
50* @author Mike Pilone <mpilone@slac.com> 53* @author Mike Pilone <mpilone@slac.com>
51*/ 54*/
52class KDateEdit : public QHBox 55class KDateEdit : public Q3HBox
53{ 56{
54 Q_OBJECT 57 Q_OBJECT
55 public: 58 public:
56 KDateEdit(QWidget *parent=0, const char *name=0, bool withoutDP = false ); 59 KDateEdit(QWidget *parent=0, const char *name=0, bool withoutDP = false );
@@ -127,9 +130,9 @@ class KDateEdit : public QHBox
127 130
128 QPushButton *mDateButton; 131 QPushButton *mDateButton;
129 QLineEdit *mDateEdit; 132 QLineEdit *mDateEdit;
130 KDatePicker *mDatePicker; 133 KDatePicker *mDatePicker;
131 QVBox *mDateFrame; 134 Q3VBox *mDateFrame;
132 int maxDay; 135 int maxDay;
133 bool withoutDp; 136 bool withoutDp;
134 137
135 protected: 138 protected:
diff --git a/libkdepim/kdatepicker.cpp b/libkdepim/kdatepicker.cpp
index 68ef943..28b65cf 100644
--- a/libkdepim/kdatepicker.cpp
+++ b/libkdepim/kdatepicker.cpp
@@ -22,16 +22,20 @@
22#include <kglobal.h> 22#include <kglobal.h>
23#include <kapplication.h> 23#include <kapplication.h>
24#include <klocale.h> 24#include <klocale.h>
25#include <kiconloader.h> 25#include <kiconloader.h>
26#include <qframe.h> 26#include <q3frame.h>
27#include <qpainter.h> 27#include <qpainter.h>
28#include <qdialog.h> 28#include <qdialog.h>
29#include <qtoolbutton.h> 29#include <qtoolbutton.h>
30#include <qfont.h> 30#include <qfont.h>
31#include <qapplication.h> 31#include <qapplication.h>
32#include <qlineedit.h> 32#include <qlineedit.h>
33#include <qvalidator.h> 33#include <qvalidator.h>
34//Added by qt3to4:
35#include <QResizeEvent>
36#include <QKeyEvent>
37#include <QDesktopWidget>
34#include <kdebug.h> 38#include <kdebug.h>
35#include <knotifyclient.h> 39#include <knotifyclient.h>
36#include <kglobalsettings.h> 40#include <kglobalsettings.h>
37#include "kdatetbl.h" 41#include "kdatetbl.h"
@@ -39,9 +43,9 @@
39//#include "kdatepicker.moc" 43//#include "kdatepicker.moc"
40 44
41 45
42KDatePicker::KDatePicker(QWidget *parent, QDate dt, const char *name) 46KDatePicker::KDatePicker(QWidget *parent, QDate dt, const char *name)
43 : QFrame(parent,name), 47 : Q3Frame(parent,name),
44 yearForward(new QToolButton(this)), 48 yearForward(new QToolButton(this)),
45 yearBackward(new QToolButton(this)), 49 yearBackward(new QToolButton(this)),
46 monthForward(new QToolButton(this)), 50 monthForward(new QToolButton(this)),
47 monthBackward(new QToolButton(this)), 51 monthBackward(new QToolButton(this)),
diff --git a/libkdepim/kdatepicker.h b/libkdepim/kdatepicker.h
index 3db9a89..4d904da 100644
--- a/libkdepim/kdatepicker.h
+++ b/libkdepim/kdatepicker.h
@@ -19,10 +19,13 @@
19*/ 19*/
20#ifndef MICROKDE_KDATEPICKER_H 20#ifndef MICROKDE_KDATEPICKER_H
21#define MICROKDE_KDATEPICKER_H 21#define MICROKDE_KDATEPICKER_H
22#include <qdatetime.h> 22#include <qdatetime.h>
23#include <qframe.h> 23#include <q3frame.h>
24#include <qevent.h> 24#include <qevent.h>
25//Added by qt3to4:
26#include <QResizeEvent>
27#include <QKeyEvent>
25 28
26class QLineEdit; 29class QLineEdit;
27class QToolButton; 30class QToolButton;
28class KDateValidator; 31class KDateValidator;
@@ -47,9 +50,9 @@ class KDateEdit;
47 * @author Tim Gilman, Mirko Boehm 50 * @author Tim Gilman, Mirko Boehm
48 * 51 *
49 * @short A date selection widget. 52 * @short A date selection widget.
50 **/ 53 **/
51class KDatePicker: public QFrame 54class KDatePicker: public Q3Frame
52{ 55{
53 Q_OBJECT 56 Q_OBJECT
54public: 57public:
55 /** The usual constructor. The given date will be displayed 58 /** The usual constructor. The given date will be displayed
diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp
index 9c28425..3677e87 100644
--- a/libkdepim/kpimglobalprefs.cpp
+++ b/libkdepim/kpimglobalprefs.cpp
@@ -37,9 +37,9 @@ $Id$
37 37
38#include <qregexp.h> 38#include <qregexp.h>
39#include <qfile.h> 39#include <qfile.h>
40#include <stdlib.h> 40#include <stdlib.h>
41#include <qtextstream.h> 41#include <q3textstream.h>
42#include <qapplication.h> 42#include <qapplication.h>
43#include "kpimglobalprefs.h" 43#include "kpimglobalprefs.h"
44 44
45KPimGlobalPrefs *KPimGlobalPrefs::sInstance = 0; 45KPimGlobalPrefs *KPimGlobalPrefs::sInstance = 0;
@@ -141,11 +141,11 @@ void KPimGlobalPrefs::setGlobalConfig()
141 fileName = fileName+"frenchtranslation.txt"; 141 fileName = fileName+"frenchtranslation.txt";
142 else if ( mPreferredLanguage == 3 ) 142 else if ( mPreferredLanguage == 3 )
143 fileName = fileName+"italiantranslation.txt"; 143 fileName = fileName+"italiantranslation.txt";
144 QFile file( fileName ); 144 QFile file( fileName );
145 if (file.open( IO_ReadOnly ) ) { 145 if (file.open( QIODevice::ReadOnly ) ) {
146 QTextStream ts( &file ); 146 Q3TextStream ts( &file );
147 ts.setEncoding( QTextStream::Latin1 ); 147 ts.setEncoding( Q3TextStream::Latin1 );
148 //ts.setCodec( QTextCodec::latin1 ); 148 //ts.setCodec( QTextCodec::latin1 );
149 QString text = ts.read(); 149 QString text = ts.read();
150 file.close(); 150 file.close();
151 text.replace( QRegExp("\\\\n"), "\n" ); 151 text.replace( QRegExp("\\\\n"), "\n" );
@@ -157,9 +157,9 @@ void KPimGlobalPrefs::setGlobalConfig()
157 nbr = text.find ( "},", br ); 157 nbr = text.find ( "},", br );
158 line = text.mid( br, nbr - br ); 158 line = text.mid( br, nbr - br );
159 br = nbr+1; 159 br = nbr+1;
160 int se, ee, st, et; 160 int se, ee, st, et;
161 mLocaleDict = new QDict<QString>; 161 mLocaleDict = new Q3Dict<QString>;
162 mLocaleDict->setAutoDelete( true ); 162 mLocaleDict->setAutoDelete( true );
163 QString end = "{ \"\",\"\" }"; 163 QString end = "{ \"\",\"\" }";
164 while ( (line != end) && (br > 1) ) { 164 while ( (line != end) && (br > 1) ) {
165 //qDebug("%d *%s* ", br, line.latin1()); 165 //qDebug("%d *%s* ", br, line.latin1());
diff --git a/libkdepim/kpimglobalprefs.h b/libkdepim/kpimglobalprefs.h
index 94ac8ae..01f5ab0 100644
--- a/libkdepim/kpimglobalprefs.h
+++ b/libkdepim/kpimglobalprefs.h
@@ -31,9 +31,9 @@ $Id$
31#ifndef KPIMGLOBALPREFS_H 31#ifndef KPIMGLOBALPREFS_H
32#define KPIMGLOBALPREFS_H 32#define KPIMGLOBALPREFS_H
33 33
34#include "kprefs.h" 34#include "kprefs.h"
35#include <qdict.h> 35#include <q3dict.h>
36 36
37class KPimGlobalPrefs : public KPrefs 37class KPimGlobalPrefs : public KPrefs
38{ 38{
39 public: 39 public:
@@ -84,9 +84,9 @@ class KPimGlobalPrefs : public KPrefs
84 private: 84 private:
85 KPimGlobalPrefs( const QString &name = QString::null ); 85 KPimGlobalPrefs( const QString &name = QString::null );
86 86
87 static KPimGlobalPrefs *sInstance; 87 static KPimGlobalPrefs *sInstance;
88 QDict<QString> *mLocaleDict; 88 Q3Dict<QString> *mLocaleDict;
89 89
90 90
91 public: 91 public:
92 //US I copied the following "locale" settings from KOPrefs 92 //US I copied the following "locale" settings from KOPrefs
diff --git a/libkdepim/kprefsdialog.cpp b/libkdepim/kprefsdialog.cpp
index 6dc741d..358acbd 100644
--- a/libkdepim/kprefsdialog.cpp
+++ b/libkdepim/kprefsdialog.cpp
@@ -24,25 +24,26 @@
24// $Id$ 24// $Id$
25 25
26#include <qlayout.h> 26#include <qlayout.h>
27#include <qlabel.h> 27#include <qlabel.h>
28#include <qgroupbox.h> 28#include <q3groupbox.h>
29#include <qbuttongroup.h> 29#include <q3buttongroup.h>
30#include <qlineedit.h> 30#include <qlineedit.h>
31#include <qfont.h> 31#include <qfont.h>
32#include <qslider.h> 32#include <qslider.h>
33#include <qfile.h> 33#include <qfile.h>
34#include <qtextstream.h> 34#include <q3textstream.h>
35#include <qvbox.h> 35#include <q3vbox.h>
36#include <qhbox.h> 36#include <q3hbox.h>
37#include <qspinbox.h> 37#include <qspinbox.h>
38#include <qdatetime.h> 38#include <qdatetime.h>
39#include <qframe.h> 39#include <q3frame.h>
40#include <qcombobox.h> 40#include <qcombobox.h>
41#include <qcheckbox.h> 41#include <qcheckbox.h>
42#include <qradiobutton.h> 42#include <qradiobutton.h>
43#include <qpushbutton.h> 43#include <qpushbutton.h>
44#include <qapplication.h> 44#include <qapplication.h>
45#include <QDesktopWidget>
45 46
46#include <kcolorbutton.h> 47#include <kcolorbutton.h>
47#include <kdebug.h> 48#include <kdebug.h>
48#include <klocale.h> 49#include <klocale.h>
@@ -127,9 +128,9 @@ KPrefsDialogWidFont::KPrefsDialogWidFont(const QString &sampleText,const QString
127 128
128 mLabel = new QLabel(labelText, parent); 129 mLabel = new QLabel(labelText, parent);
129 130
130 mPreview = new QLabel(sampleText,parent); 131 mPreview = new QLabel(sampleText,parent);
131 mPreview->setFrameStyle(QFrame::Panel|QFrame::Sunken); 132 mPreview->setFrameStyle(Q3Frame::Panel|Q3Frame::Sunken);
132 133
133 mButton = new QPushButton(i18n("Choose..."), parent); 134 mButton = new QPushButton(i18n("Choose..."), parent);
134 connect(mButton,SIGNAL(clicked()),SLOT(selectFont())); 135 connect(mButton,SIGNAL(clicked()),SLOT(selectFont()));
135 mPreview->setMaximumHeight( QApplication::desktop()->height() / 12 ); 136 mPreview->setMaximumHeight( QApplication::desktop()->height() / 12 );
@@ -211,9 +212,9 @@ KPrefsDialogWidRadios::KPrefsDialogWidRadios(const QString &text,int *reference,
211 QWidget *parent) 212 QWidget *parent)
212{ 213{
213 mReference = reference; 214 mReference = reference;
214 215
215 mBox = new QButtonGroup(1,Qt::Horizontal,text,parent); 216 mBox = new Q3ButtonGroup(1,Qt::Horizontal,text,parent);
216} 217}
217 218
218KPrefsDialogWidRadios::~KPrefsDialogWidRadios() 219KPrefsDialogWidRadios::~KPrefsDialogWidRadios()
219{ 220{
@@ -223,9 +224,9 @@ void KPrefsDialogWidRadios::addRadio(const QString &text)
223{ 224{
224 new QRadioButton(text,mBox); 225 new QRadioButton(text,mBox);
225} 226}
226 227
227QButtonGroup *KPrefsDialogWidRadios::groupBox() 228Q3ButtonGroup *KPrefsDialogWidRadios::groupBox()
228{ 229{
229 return mBox; 230 return mBox;
230} 231}
231 232
diff --git a/libkdepim/kprefsdialog.h b/libkdepim/kprefsdialog.h
index 52ec809..cc95dd4 100644
--- a/libkdepim/kprefsdialog.h
+++ b/libkdepim/kprefsdialog.h
@@ -23,10 +23,12 @@
23#ifndef _KPREFSDIALOG_H 23#ifndef _KPREFSDIALOG_H
24#define _KPREFSDIALOG_H 24#define _KPREFSDIALOG_H
25// $Id$ 25// $Id$
26 26
27#include <qptrlist.h> 27#include <q3ptrlist.h>
28#include <qlineedit.h> 28#include <qlineedit.h>
29//Added by qt3to4:
30#include <QLabel>
29 31
30#include <kdialogbase.h> 32#include <kdialogbase.h>
31 33
32class KPrefs; 34class KPrefs;
@@ -35,9 +37,9 @@ class KPrefsDialog;
35class KColorButton; 37class KColorButton;
36class QCheckBox; 38class QCheckBox;
37class QLabel; 39class QLabel;
38class QSpinBox; 40class QSpinBox;
39class QButtonGroup; 41class Q3ButtonGroup;
40 42
41/** 43/**
42 @short Base class for widgets used by @ref KPrefsDialog. 44 @short Base class for widgets used by @ref KPrefsDialog.
43 @author Cornelius Schumacher 45 @author Cornelius Schumacher
@@ -257,17 +259,17 @@ class KPrefsDialogWidRadios : public KPrefsDialogWid
257 259
258 /** 260 /**
259 Return the box widget used by this widget. 261 Return the box widget used by this widget.
260 */ 262 */
261 QButtonGroup *groupBox(); 263 Q3ButtonGroup *groupBox();
262 264
263 void readConfig(); 265 void readConfig();
264 void writeConfig(); 266 void writeConfig();
265 267
266 private: 268 private:
267 int *mReference; 269 int *mReference;
268 270
269 QButtonGroup *mBox; 271 Q3ButtonGroup *mBox;
270}; 272};
271 273
272 274
273/** 275/**
@@ -438,9 +440,9 @@ class KPrefsDialog : public KDialogBase
438 440
439 private: 441 private:
440 KPrefs *mPrefs; 442 KPrefs *mPrefs;
441 443
442 QPtrList<KPrefsDialogWid> mPrefsWids; 444 Q3PtrList<KPrefsDialogWid> mPrefsWids;
443}; 445};
444 446
445 447
446#include "kcmconfigs/kdepimconfigwidget.h" 448#include "kcmconfigs/kdepimconfigwidget.h"
diff --git a/libkdepim/kprefswidget.cpp b/libkdepim/kprefswidget.cpp
index f6a0b38..51431e2 100644
--- a/libkdepim/kprefswidget.cpp
+++ b/libkdepim/kprefswidget.cpp
@@ -24,25 +24,26 @@
24// $Id$ 24// $Id$
25 25
26#include <qlayout.h> 26#include <qlayout.h>
27#include <qlabel.h> 27#include <qlabel.h>
28#include <qgroupbox.h> 28#include <q3groupbox.h>
29#include <qbuttongroup.h> 29#include <q3buttongroup.h>
30#include <qlineedit.h> 30#include <qlineedit.h>
31#include <qfont.h> 31#include <qfont.h>
32#include <qslider.h> 32#include <qslider.h>
33#include <qfile.h> 33#include <qfile.h>
34#include <qtextstream.h> 34#include <q3textstream.h>
35#include <qvbox.h> 35#include <q3vbox.h>
36#include <qhbox.h> 36#include <q3hbox.h>
37#include <qspinbox.h> 37#include <qspinbox.h>
38#include <qdatetime.h> 38#include <qdatetime.h>
39#include <qframe.h> 39#include <q3frame.h>
40#include <qcombobox.h> 40#include <qcombobox.h>
41#include <qcheckbox.h> 41#include <qcheckbox.h>
42#include <qradiobutton.h> 42#include <qradiobutton.h>
43#include <qpushbutton.h> 43#include <qpushbutton.h>
44#include <qapplication.h> 44#include <qapplication.h>
45#include <QDesktopWidget>
45 46
46#include <kcolorbutton.h> 47#include <kcolorbutton.h>
47#include <kdebug.h> 48#include <kdebug.h>
48#include <klocale.h> 49#include <klocale.h>
@@ -130,9 +131,9 @@ KPrefsWidFont::KPrefsWidFont(const QString &sampleText,const QString &labelText,
130 131
131 mLabel = new QLabel(labelText, parent); 132 mLabel = new QLabel(labelText, parent);
132 133
133 mPreview = new QLabel(sampleText,parent); 134 mPreview = new QLabel(sampleText,parent);
134 mPreview->setFrameStyle(QFrame::Panel|QFrame::Sunken); 135 mPreview->setFrameStyle(Q3Frame::Panel|Q3Frame::Sunken);
135 136
136 mButton = new QPushButton(i18n("Choose..."), parent); 137 mButton = new QPushButton(i18n("Choose..."), parent);
137 connect(mButton,SIGNAL(clicked()),SLOT(selectFont())); 138 connect(mButton,SIGNAL(clicked()),SLOT(selectFont()));
138 mPreview->setMaximumHeight( QApplication::desktop()->height() / 12 ); 139 mPreview->setMaximumHeight( QApplication::desktop()->height() / 12 );
@@ -217,9 +218,9 @@ KPrefsWidRadios::KPrefsWidRadios(const QString &text,int *reference,
217 QWidget *parent) 218 QWidget *parent)
218{ 219{
219 mReference = reference; 220 mReference = reference;
220 221
221 mBox = new QButtonGroup(1,Qt::Horizontal,text,parent); 222 mBox = new Q3ButtonGroup(1,Qt::Horizontal,text,parent);
222 connect( mBox, SIGNAL( clicked(int)), SIGNAL( modified() ) ); 223 connect( mBox, SIGNAL( clicked(int)), SIGNAL( modified() ) );
223} 224}
224 225
225KPrefsWidRadios::~KPrefsWidRadios() 226KPrefsWidRadios::~KPrefsWidRadios()
@@ -230,9 +231,9 @@ void KPrefsWidRadios::addRadio(const QString &text)
230{ 231{
231 new QRadioButton(text,mBox); 232 new QRadioButton(text,mBox);
232} 233}
233 234
234QButtonGroup *KPrefsWidRadios::groupBox() 235Q3ButtonGroup *KPrefsWidRadios::groupBox()
235{ 236{
236 return mBox; 237 return mBox;
237} 238}
238 239
diff --git a/libkdepim/kprefswidget.h b/libkdepim/kprefswidget.h
index 8543a39..9de1be5 100644
--- a/libkdepim/kprefswidget.h
+++ b/libkdepim/kprefswidget.h
@@ -24,21 +24,23 @@
24 24
25#ifndef _KPREFSWIDGET_H 25#ifndef _KPREFSWIDGET_H
26#define _KPREFSWIDGET_H 26#define _KPREFSWIDGET_H
27 27
28#include <qptrlist.h> 28#include <q3ptrlist.h>
29#include <qlineedit.h> 29#include <qlineedit.h>
30#include <qpushbutton.h> 30#include <qpushbutton.h>
31 31
32#include <qwidget.h> 32#include <qwidget.h>
33//Added by qt3to4:
34#include <QLabel>
33 35
34class KPrefs; 36class KPrefs;
35 37
36class KColorButton; 38class KColorButton;
37class QCheckBox; 39class QCheckBox;
38class QLabel; 40class QLabel;
39class QSpinBox; 41class QSpinBox;
40class QButtonGroup; 42class Q3ButtonGroup;
41 43
42/** 44/**
43 @short Base class for widgets used by @ref KPrefsDialog. 45 @short Base class for widgets used by @ref KPrefsDialog.
44 @author Cornelius Schumacher 46 @author Cornelius Schumacher
@@ -264,17 +266,17 @@ class KPrefsWidRadios : public KPrefsWid
264 266
265 /** 267 /**
266 Return the box widget used by this widget. 268 Return the box widget used by this widget.
267 */ 269 */
268 QButtonGroup *groupBox(); 270 Q3ButtonGroup *groupBox();
269 271
270 void readConfig(); 272 void readConfig();
271 void writeConfig(); 273 void writeConfig();
272 274
273 private: 275 private:
274 int *mReference; 276 int *mReference;
275 277
276 QButtonGroup *mBox; 278 Q3ButtonGroup *mBox;
277}; 279};
278 280
279 281
280/** 282/**
@@ -448,8 +450,8 @@ class KPrefsWidget : public QWidget
448 450
449 private: 451 private:
450 KPrefs *mPrefs; 452 KPrefs *mPrefs;
451 453
452 QPtrList<KPrefsWid> mPrefsWids; 454 Q3PtrList<KPrefsWid> mPrefsWids;
453}; 455};
454 456
455#endif 457#endif
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index 5708dfc..c844627 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -34,13 +34,13 @@
34#include "kpimprefs.h" 34#include "kpimprefs.h"
35#include <kmessagebox.h> 35#include <kmessagebox.h>
36 36
37#include <qdir.h> 37#include <qdir.h>
38#include <qprogressbar.h> 38#include <q3progressbar.h>
39#include <qpopupmenu.h> 39#include <q3popupmenu.h>
40#include <qpushbutton.h> 40#include <qpushbutton.h>
41#include <qradiobutton.h> 41#include <qradiobutton.h>
42#include <qbuttongroup.h> 42#include <q3buttongroup.h>
43#include <qtimer.h> 43#include <qtimer.h>
44#include <qmessagebox.h> 44#include <qmessagebox.h>
45#include <qapplication.h> 45#include <qapplication.h>
46#include <qlineedit.h> 46#include <qlineedit.h>
@@ -49,8 +49,11 @@
49#include <qtextcodec.h> 49#include <qtextcodec.h>
50#include <qlabel.h> 50#include <qlabel.h>
51#include <qcheckbox.h> 51#include <qcheckbox.h>
52#include <qapplication.h> 52#include <qapplication.h>
53#include <QDesktopWidget>
54//Added by qt3to4:
55#include <Q3VBoxLayout>
53 56
54#include <klocale.h> 57#include <klocale.h>
55#include <kglobal.h> 58#include <kglobal.h>
56#include <kconfig.h> 59#include <kconfig.h>
@@ -58,13 +61,13 @@
58 61
59QDateTime KSyncManager::mRequestedSyncEvent; 62QDateTime KSyncManager::mRequestedSyncEvent;
60 63
61 64
62KSyncManager::KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, QPopupMenu* syncmenu) 65KSyncManager::KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, Q3PopupMenu* syncmenu)
63 : QObject(), mPrefs(prefs ), mParent(parent),mImplementation(implementation), mTargetApp(ta), mSyncMenu(syncmenu) 66 : QObject(), mPrefs(prefs ), mParent(parent),mImplementation(implementation), mTargetApp(ta), mSyncMenu(syncmenu)
64{ 67{
65 mServerSocket = 0; 68 mServerSocket = 0;
66 bar = new QProgressBar ( 1, 0 ); 69 bar = new Q3ProgressBar ( 1, 0 );
67 bar->setCaption (""); 70 bar->setCaption ("");
68 mWriteBackInPast = 2; 71 mWriteBackInPast = 2;
69 72
70 73
@@ -88,9 +91,9 @@ void KSyncManager::fillSyncMenu()
88 mSyncMenu->clear(); 91 mSyncMenu->clear();
89 92
90 mSyncMenu->insertItem( i18n("Configure..."), 0 ); 93 mSyncMenu->insertItem( i18n("Configure..."), 0 );
91 mSyncMenu->insertSeparator(); 94 mSyncMenu->insertSeparator();
92 QPopupMenu *clearMenu = new QPopupMenu ( mSyncMenu ); 95 Q3PopupMenu *clearMenu = new Q3PopupMenu ( mSyncMenu );
93 mSyncMenu->insertItem( i18n("Remove sync info"),clearMenu, 5000 ); 96 mSyncMenu->insertItem( i18n("Remove sync info"),clearMenu, 5000 );
94 clearMenu->insertItem( i18n("For all profiles"), 1 ); 97 clearMenu->insertItem( i18n("For all profiles"), 1 );
95 clearMenu->insertSeparator(); 98 clearMenu->insertSeparator();
96 connect ( clearMenu, SIGNAL( activated ( int ) ), this, SLOT (slotClearMenu( int ) ) ); 99 connect ( clearMenu, SIGNAL( activated ( int ) ), this, SLOT (slotClearMenu( int ) ) );
@@ -354,9 +357,9 @@ void KSyncManager::enableQuick( bool ask )
354 bool changed = false; 357 bool changed = false;
355 if ( ask ) { 358 if ( ask ) {
356 QDialog dia ( 0, "input-dialog", true ); 359 QDialog dia ( 0, "input-dialog", true );
357 QLineEdit lab ( &dia ); 360 QLineEdit lab ( &dia );
358 QVBoxLayout lay( &dia ); 361 Q3VBoxLayout lay( &dia );
359 lab.setText( mPrefs->mPassiveSyncPort ); 362 lab.setText( mPrefs->mPassiveSyncPort );
360 lay.setMargin(7); 363 lay.setMargin(7);
361 lay.setSpacing(7); 364 lay.setSpacing(7);
362 int po = 9197+mTargetApp; 365 int po = 9197+mTargetApp;
@@ -803,9 +806,9 @@ void KSyncManager::syncRemote( KSyncProfile* prof, bool ask)
803bool KSyncManager::edit_pisync_options() 806bool KSyncManager::edit_pisync_options()
804{ 807{
805 QDialog dia( mParent, "dia", true ); 808 QDialog dia( mParent, "dia", true );
806 dia.setCaption( i18n("Pi-Sync options for device: " ) +mCurrentSyncDevice ); 809 dia.setCaption( i18n("Pi-Sync options for device: " ) +mCurrentSyncDevice );
807 QVBoxLayout lay ( &dia ); 810 Q3VBoxLayout lay ( &dia );
808 lay.setSpacing( 5 ); 811 lay.setSpacing( 5 );
809 lay.setMargin( 3 ); 812 lay.setMargin( 3 );
810 QLabel lab1 ( i18n("Password for remote access:"), &dia); 813 QLabel lab1 ( i18n("Password for remote access:"), &dia);
811 lay.addWidget( &lab1 ); 814 lay.addWidget( &lab1 );
@@ -837,10 +840,10 @@ bool KSyncManager::edit_sync_options()
837{ 840{
838 841
839 QDialog dia( mParent, "dia", true ); 842 QDialog dia( mParent, "dia", true );
840 dia.setCaption( i18n("Device: " ) +mCurrentSyncDevice ); 843 dia.setCaption( i18n("Device: " ) +mCurrentSyncDevice );
841 QButtonGroup gr ( 1, Qt::Horizontal, i18n("Sync preferences"), &dia); 844 Q3ButtonGroup gr ( 1, Qt::Horizontal, i18n("Sync preferences"), &dia);
842 QVBoxLayout lay ( &dia ); 845 Q3VBoxLayout lay ( &dia );
843 lay.setSpacing( 2 ); 846 lay.setSpacing( 2 );
844 lay.setMargin( 3 ); 847 lay.setMargin( 3 );
845 lay.addWidget(&gr); 848 lay.addWidget(&gr);
846 QRadioButton loc ( i18n("Take local entry on conflict"), &gr ); 849 QRadioButton loc ( i18n("Take local entry on conflict"), &gr );
@@ -890,9 +893,9 @@ QString KSyncManager::getPassword( )
890 QString retfile = ""; 893 QString retfile = "";
891 QDialog dia ( mParent, "input-dialog", true ); 894 QDialog dia ( mParent, "input-dialog", true );
892 QLineEdit lab ( &dia ); 895 QLineEdit lab ( &dia );
893 lab.setEchoMode( QLineEdit::Password ); 896 lab.setEchoMode( QLineEdit::Password );
894 QVBoxLayout lay( &dia ); 897 Q3VBoxLayout lay( &dia );
895 lay.setMargin(7); 898 lay.setMargin(7);
896 lay.setSpacing(7); 899 lay.setSpacing(7);
897 lay.addWidget( &lab); 900 lay.addWidget( &lab);
898 dia.setFixedSize( 230,50 ); 901 dia.setFixedSize( 230,50 );
@@ -1333,9 +1336,9 @@ void KSyncManager::readFileFromSocket()
1333 mPisyncFinished = true; 1336 mPisyncFinished = true;
1334 } 1337 }
1335} 1338}
1336 1339
1337KServerSocket:: KServerSocket ( QString pw, Q_UINT16 port, int backlog, QObject * parent, const char * name ) : QServerSocket( port, backlog, parent, name ) 1340KServerSocket:: KServerSocket ( QString pw, Q_UINT16 port, int backlog, QObject * parent, const char * name ) : Q3ServerSocket( port, backlog, parent, name )
1338{ 1341{
1339 mPendingConnect = 0; 1342 mPendingConnect = 0;
1340 mPassWord = pw; 1343 mPassWord = pw;
1341 mSocket = 0; 1344 mSocket = 0;
@@ -1349,9 +1352,9 @@ void KServerSocket::waitForSocketFinish()
1349 //qDebug("KSS:: waiting for finish operation"); 1352 //qDebug("KSS:: waiting for finish operation");
1350 QTimer::singleShot( 250, this , SLOT ( waitForSocketFinish())); 1353 QTimer::singleShot( 250, this , SLOT ( waitForSocketFinish()));
1351 return; 1354 return;
1352 } 1355 }
1353 mSocket = new QSocket( this ); 1356 mSocket = new Q3Socket( this );
1354 connect( mSocket , SIGNAL(readyRead()), this, SLOT(readClient()) ); 1357 connect( mSocket , SIGNAL(readyRead()), this, SLOT(readClient()) );
1355 connect( mSocket , SIGNAL(delayedCloseFinished()), this, SLOT(discardClient()) ); 1358 connect( mSocket , SIGNAL(delayedCloseFinished()), this, SLOT(discardClient()) );
1356 mSocket->setSocket( mPendingConnect ); 1359 mSocket->setSocket( mPendingConnect );
1357 mPendingConnect = 0; 1360 mPendingConnect = 0;
@@ -1371,9 +1374,9 @@ void KServerSocket::newConnection ( int socket )
1371 delete mSocket; 1374 delete mSocket;
1372 mSocket = 0; 1375 mSocket = 0;
1373 } 1376 }
1374 mPendingConnect = 0; 1377 mPendingConnect = 0;
1375 mSocket = new QSocket( this ); 1378 mSocket = new Q3Socket( this );
1376 connect( mSocket , SIGNAL(readyRead()), this, SLOT(readClient()) ); 1379 connect( mSocket , SIGNAL(readyRead()), this, SLOT(readClient()) );
1377 connect( mSocket , SIGNAL(delayedCloseFinished()), this, SLOT(discardClient()) ); 1380 connect( mSocket , SIGNAL(delayedCloseFinished()), this, SLOT(discardClient()) );
1378 mSocket->setSocket( socket ); 1381 mSocket->setSocket( socket );
1379} 1382}
@@ -1461,13 +1464,13 @@ void KServerSocket::displayErrorMessage()
1461 } 1464 }
1462} 1465}
1463void KServerSocket::error_connect( QString errmess ) 1466void KServerSocket::error_connect( QString errmess )
1464{ 1467{
1465 QTextStream os( mSocket ); 1468 Q3TextStream os( mSocket );
1466 os.setEncoding( QTextStream::Latin1 ); 1469 os.setEncoding( Q3TextStream::Latin1 );
1467 os << errmess ; 1470 os << errmess ;
1468 mSocket->close(); 1471 mSocket->close();
1469 if ( mSocket->state() == QSocket::Idle ) { 1472 if ( mSocket->state() == Q3Socket::Idle ) {
1470 QTimer::singleShot( 0, this , SLOT ( discardClient())); 1473 QTimer::singleShot( 0, this , SLOT ( discardClient()));
1471 } 1474 }
1472} 1475}
1473void KServerSocket::end_connect() 1476void KServerSocket::end_connect()
@@ -1483,9 +1486,9 @@ void KServerSocket::send_file()
1483 mSyncActionDialog = new QDialog ( 0, "input-dialog", true ); 1486 mSyncActionDialog = new QDialog ( 0, "input-dialog", true );
1484 mSyncActionDialog->setCaption(i18n("Received sync request")); 1487 mSyncActionDialog->setCaption(i18n("Received sync request"));
1485 QLabel* label = new QLabel( i18n("Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog."), mSyncActionDialog ); 1488 QLabel* label = new QLabel( i18n("Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog."), mSyncActionDialog );
1486 label->setAlignment ( Qt::AlignHCenter ); 1489 label->setAlignment ( Qt::AlignHCenter );
1487 QVBoxLayout* lay = new QVBoxLayout( mSyncActionDialog ); 1490 Q3VBoxLayout* lay = new Q3VBoxLayout( mSyncActionDialog );
1488 lay->addWidget( label); 1491 lay->addWidget( label);
1489 lay->setMargin(7); 1492 lay->setMargin(7);
1490 lay->setSpacing(7); 1493 lay->setSpacing(7);
1491 if ( KSyncManager::mRequestedSyncEvent.isValid() ) { 1494 if ( KSyncManager::mRequestedSyncEvent.isValid() ) {
@@ -1535,29 +1538,29 @@ void KServerSocket::send_file()
1535 //emit request_file(); 1538 //emit request_file();
1536 qApp->processEvents(); 1539 qApp->processEvents();
1537 QString fileName = mFileName; 1540 QString fileName = mFileName;
1538 QFile file( fileName ); 1541 QFile file( fileName );
1539 if (!file.open( IO_ReadOnly ) ) { 1542 if (!file.open( QIODevice::ReadOnly ) ) {
1540 mErrorMessage = 0; 1543 mErrorMessage = 0;
1541 end_connect(); 1544 end_connect();
1542 error_connect("ERROR_FI\r\n\r\n"); 1545 error_connect("ERROR_FI\r\n\r\n");
1543 return ; 1546 return ;
1544 } 1547 }
1545 mSyncActionDialog->setCaption( i18n("Sending file...") ); 1548 mSyncActionDialog->setCaption( i18n("Sending file...") );
1546 QTextStream ts( &file ); 1549 Q3TextStream ts( &file );
1547 ts.setEncoding( QTextStream::Latin1 ); 1550 ts.setEncoding( Q3TextStream::Latin1 );
1548 1551
1549 QTextStream os( mSocket ); 1552 Q3TextStream os( mSocket );
1550 os.setEncoding( QTextStream::Latin1 ); 1553 os.setEncoding( Q3TextStream::Latin1 );
1551 while ( ! ts.atEnd() ) { 1554 while ( ! ts.atEnd() ) {
1552 os << ts.readLine() << "\r\n"; 1555 os << ts.readLine() << "\r\n";
1553 } 1556 }
1554 os << "\r\n"; 1557 os << "\r\n";
1555 //os << ts.read(); 1558 //os << ts.read();
1556 file.close(); 1559 file.close();
1557 mSyncActionDialog->setCaption( i18n("Waiting for synced file...") ); 1560 mSyncActionDialog->setCaption( i18n("Waiting for synced file...") );
1558 mSocket->close(); 1561 mSocket->close();
1559 if ( mSocket->state() == QSocket::Idle ) 1562 if ( mSocket->state() == Q3Socket::Idle )
1560 QTimer::singleShot( 10, this , SLOT ( discardClient())); 1563 QTimer::singleShot( 10, this , SLOT ( discardClient()));
1561} 1564}
1562void KServerSocket::get_file() 1565void KServerSocket::get_file()
1563{ 1566{
@@ -1587,9 +1590,9 @@ void KServerSocket::readBackFileFromSocket()
1587 return; 1590 return;
1588 } 1591 }
1589 QString fileName = mFileName; 1592 QString fileName = mFileName;
1590 QFile file ( fileName ); 1593 QFile file ( fileName );
1591 if (!file.open( IO_WriteOnly ) ) { 1594 if (!file.open( QIODevice::WriteOnly ) ) {
1592 delete mSyncActionDialog; 1595 delete mSyncActionDialog;
1593 mSyncActionDialog = 0; 1596 mSyncActionDialog = 0;
1594 qDebug("KSS:Error open read back file "); 1597 qDebug("KSS:Error open read back file ");
1595 piFileString = ""; 1598 piFileString = "";
@@ -1600,14 +1603,14 @@ void KServerSocket::readBackFileFromSocket()
1600 1603
1601 } 1604 }
1602 1605
1603 // mView->setLoadedFileVersion(QDateTime::currentDateTime().addSecs( -1)); 1606 // mView->setLoadedFileVersion(QDateTime::currentDateTime().addSecs( -1));
1604 QTextStream ts ( &file ); 1607 Q3TextStream ts ( &file );
1605 ts.setEncoding( QTextStream::Latin1 ); 1608 ts.setEncoding( Q3TextStream::Latin1 );
1606 mSyncActionDialog->setCaption( i18n("Writing file to disk...") ); 1609 mSyncActionDialog->setCaption( i18n("Writing file to disk...") );
1607 ts << piFileString; 1610 ts << piFileString;
1608 mSocket->close(); 1611 mSocket->close();
1609 if ( mSocket->state() == QSocket::Idle ) 1612 if ( mSocket->state() == Q3Socket::Idle )
1610 QTimer::singleShot( 10, this , SLOT ( discardClient())); 1613 QTimer::singleShot( 10, this , SLOT ( discardClient()));
1611 file.close(); 1614 file.close();
1612 piFileString = ""; 1615 piFileString = "";
1613 emit file_received( true, mResource ); 1616 emit file_received( true, mResource );
@@ -1647,19 +1650,19 @@ void KCommandSocket::sendFileRequest()
1647 mConnectCount = 300;mConnectMax = 300; 1650 mConnectCount = 300;mConnectMax = 300;
1648 mConnectProgress.setCaption( i18n("Pi-Sync: Connected!") ); 1651 mConnectProgress.setCaption( i18n("Pi-Sync: Connected!") );
1649 mConnectProgress.setLabelText( i18n("Waiting for remote file...") ); 1652 mConnectProgress.setLabelText( i18n("Waiting for remote file...") );
1650 mTimerSocket->start( 100, true ); 1653 mTimerSocket->start( 100, true );
1651 QTextStream os( mSocket ); 1654 Q3TextStream os( mSocket );
1652 os.setEncoding( QTextStream::Latin1 ); 1655 os.setEncoding( Q3TextStream::Latin1 );
1653 1656
1654 QString curDt = " " +KGlobal::locale()->formatDateTime(QDateTime::currentDateTime().addSecs(-1),true, true,KLocale::ISODate ); 1657 QString curDt = " " +KGlobal::locale()->formatDateTime(QDateTime::currentDateTime().addSecs(-1),true, true,KLocale::ISODate );
1655 os << "GET " << mPassWord << curDt << " " << mRemoteResource << "\r\n\r\n"; 1658 os << "GET " << mPassWord << curDt << " " << mRemoteResource << "\r\n\r\n";
1656} 1659}
1657 1660
1658void KCommandSocket::readFile( QString fn ) 1661void KCommandSocket::readFile( QString fn )
1659{ 1662{
1660 if ( !mSocket ) { 1663 if ( !mSocket ) {
1661 mSocket = new QSocket( this ); 1664 mSocket = new Q3Socket( this );
1662 //qDebug("KCS: read file - new socket"); 1665 //qDebug("KCS: read file - new socket");
1663 connect( mSocket, SIGNAL(readyRead()), this, SLOT(startReadFileFromSocket()) ); 1666 connect( mSocket, SIGNAL(readyRead()), this, SLOT(startReadFileFromSocket()) );
1664 connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) ); 1667 connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) );
1665 connect( mSocket, SIGNAL(connected ()), this, SLOT(sendFileRequest() )); 1668 connect( mSocket, SIGNAL(connected ()), this, SLOT(sendFileRequest() ));
@@ -1695,9 +1698,9 @@ void KCommandSocket::updateConnectDialog()
1695} 1698}
1696void KCommandSocket::writeFile( QString fileName ) 1699void KCommandSocket::writeFile( QString fileName )
1697{ 1700{
1698 if ( !mSocket ) { 1701 if ( !mSocket ) {
1699 mSocket = new QSocket( this ); 1702 mSocket = new Q3Socket( this );
1700 connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) ); 1703 connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) );
1701 connect( mSocket, SIGNAL(connected ()), this, SLOT(writeFileToSocket()) ); 1704 connect( mSocket, SIGNAL(connected ()), this, SLOT(writeFileToSocket()) );
1702 } 1705 }
1703 mFileName = fileName ; 1706 mFileName = fileName ;
@@ -1708,14 +1711,14 @@ void KCommandSocket::writeFile( QString fileName )
1708void KCommandSocket::writeFileToSocket() 1711void KCommandSocket::writeFileToSocket()
1709{ 1712{
1710 mTimerSocket->stop(); 1713 mTimerSocket->stop();
1711 QFile file2( mFileName ); 1714 QFile file2( mFileName );
1712 if (!file2.open( IO_ReadOnly ) ) { 1715 if (!file2.open( QIODevice::ReadOnly ) ) {
1713 mConnectProgress.hide(); 1716 mConnectProgress.hide();
1714 mConnectCount = -1; 1717 mConnectCount = -1;
1715 mRetVal= errorW; 1718 mRetVal= errorW;
1716 mSocket->close(); 1719 mSocket->close();
1717 if ( mSocket->state() == QSocket::Idle ) 1720 if ( mSocket->state() == Q3Socket::Idle )
1718 QTimer::singleShot( 10, this , SLOT ( deleteSocket())); 1721 QTimer::singleShot( 10, this , SLOT ( deleteSocket()));
1719 return ; 1722 return ;
1720 } 1723 }
1721 mConnectProgress.setTotalSteps ( file2.size() ); 1724 mConnectProgress.setTotalSteps ( file2.size() );
@@ -1723,12 +1726,12 @@ void KCommandSocket::writeFileToSocket()
1723 int count = 0; 1726 int count = 0;
1724 mConnectProgress.setLabelText( i18n("Sending back synced file...") ); 1727 mConnectProgress.setLabelText( i18n("Sending back synced file...") );
1725 mConnectProgress.setProgress( count ); 1728 mConnectProgress.setProgress( count );
1726 mConnectProgress.blockSignals( true ); 1729 mConnectProgress.blockSignals( true );
1727 QTextStream ts2( &file2 ); 1730 Q3TextStream ts2( &file2 );
1728 ts2.setEncoding( QTextStream::Latin1 ); 1731 ts2.setEncoding( Q3TextStream::Latin1 );
1729 QTextStream os2( mSocket ); 1732 Q3TextStream os2( mSocket );
1730 os2.setEncoding( QTextStream::Latin1 ); 1733 os2.setEncoding( Q3TextStream::Latin1 );
1731 os2 << "PUT " << mPassWord << " " << mRemoteResource << "\r\n\r\n";; 1734 os2 << "PUT " << mPassWord << " " << mRemoteResource << "\r\n\r\n";;
1732 int byteCount = 0; 1735 int byteCount = 0;
1733 int byteMax = file2.size()/53; 1736 int byteMax = file2.size()/53;
1734 while ( ! ts2.atEnd() ) { 1737 while ( ! ts2.atEnd() ) {
@@ -1747,24 +1750,24 @@ void KCommandSocket::writeFileToSocket()
1747 mConnectCount = -1; 1750 mConnectCount = -1;
1748 os2 << "\r\n"; 1751 os2 << "\r\n";
1749 mRetVal= successW; 1752 mRetVal= successW;
1750 mSocket->close(); 1753 mSocket->close();
1751 if ( mSocket->state() == QSocket::Idle ) 1754 if ( mSocket->state() == Q3Socket::Idle )
1752 QTimer::singleShot( 10, this , SLOT ( deleteSocket())); 1755 QTimer::singleShot( 10, this , SLOT ( deleteSocket()));
1753 mConnectProgress.blockSignals( false ); 1756 mConnectProgress.blockSignals( false );
1754} 1757}
1755void KCommandSocket::sendStop() 1758void KCommandSocket::sendStop()
1756{ 1759{
1757 if ( !mSocket ) { 1760 if ( !mSocket ) {
1758 mSocket = new QSocket( this ); 1761 mSocket = new Q3Socket( this );
1759 connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) ); 1762 connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) );
1760 } 1763 }
1761 mSocket->connectToHost( mHost, mPort ); 1764 mSocket->connectToHost( mHost, mPort );
1762 QTextStream os2( mSocket ); 1765 Q3TextStream os2( mSocket );
1763 os2.setEncoding( QTextStream::Latin1 ); 1766 os2.setEncoding( Q3TextStream::Latin1 );
1764 os2 << "STOP\r\n\r\n"; 1767 os2 << "STOP\r\n\r\n";
1765 mSocket->close(); 1768 mSocket->close();
1766 if ( mSocket->state() == QSocket::Idle ) 1769 if ( mSocket->state() == Q3Socket::Idle )
1767 QTimer::singleShot( 10, this , SLOT ( deleteSocket())); 1770 QTimer::singleShot( 10, this , SLOT ( deleteSocket()));
1768} 1771}
1769 1772
1770void KCommandSocket::startReadFileFromSocket() 1773void KCommandSocket::startReadFileFromSocket()
@@ -1828,27 +1831,27 @@ void KCommandSocket::readFileFromSocket()
1828 mConnectCount = -1; 1831 mConnectCount = -1;
1829 mConnectProgress.hide(); 1832 mConnectProgress.hide();
1830 QString fileName = mFileName; 1833 QString fileName = mFileName;
1831 QFile file ( fileName ); 1834 QFile file ( fileName );
1832 if (!file.open( IO_WriteOnly ) ) { 1835 if (!file.open( QIODevice::WriteOnly ) ) {
1833 mFileString = ""; 1836 mFileString = "";
1834 mRetVal = errorR; 1837 mRetVal = errorR;
1835 qDebug("KSS:Error open temp sync file for writing: %s",fileName.latin1() ); 1838 qDebug("KSS:Error open temp sync file for writing: %s",fileName.latin1() );
1836 deleteSocket(); 1839 deleteSocket();
1837 return ; 1840 return ;
1838 1841
1839 } 1842 }
1840 // mView->setLoadedFileVersion(QDateTime::currentDateTime().addSecs( -1)); 1843 // mView->setLoadedFileVersion(QDateTime::currentDateTime().addSecs( -1));
1841 QTextStream ts ( &file ); 1844 Q3TextStream ts ( &file );
1842 ts.setEncoding( QTextStream::Latin1 ); 1845 ts.setEncoding( Q3TextStream::Latin1 );
1843 ts << mFileString; 1846 ts << mFileString;
1844 file.close(); 1847 file.close();
1845 mFileString = ""; 1848 mFileString = "";
1846 mRetVal = successR; 1849 mRetVal = successR;
1847 mSocket->close(); 1850 mSocket->close();
1848 // if state is not idle, deleteSocket(); is called via 1851 // if state is not idle, deleteSocket(); is called via
1849 // connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) ); 1852 // connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) );
1850 if ( mSocket->state() == QSocket::Idle ) 1853 if ( mSocket->state() == Q3Socket::Idle )
1851 deleteSocket(); 1854 deleteSocket();
1852} 1855}
1853 1856
1854void KCommandSocket::deleteSocket() 1857void KCommandSocket::deleteSocket()
diff --git a/libkdepim/ksyncmanager.h b/libkdepim/ksyncmanager.h
index 71d17e9..32c6557 100644
--- a/libkdepim/ksyncmanager.h
+++ b/libkdepim/ksyncmanager.h
@@ -23,26 +23,28 @@
23#define _KSYNCMANAGER_H 23#define _KSYNCMANAGER_H
24 24
25#include <qobject.h> 25#include <qobject.h>
26#include <qstring.h> 26#include <qstring.h>
27#include <qsocket.h> 27#include <q3socket.h>
28#include <qdatetime.h> 28#include <qdatetime.h>
29#include <qserversocket.h> 29#include <q3serversocket.h>
30#include <qtextstream.h> 30#include <q3textstream.h>
31#include <qregexp.h> 31#include <qregexp.h>
32#include <qprogressdialog.h> 32#include <q3progressdialog.h>
33//Added by qt3to4:
34#include <Q3PopupMenu>
33#include <kdialog.h> 35#include <kdialog.h>
34 36
35class QPopupMenu; 37class Q3PopupMenu;
36class KSyncProfile; 38class KSyncProfile;
37class KPimPrefs; 39class KPimPrefs;
38class QWidget; 40class QWidget;
39class KSyncManager; 41class KSyncManager;
40class KSyncInterface; 42class KSyncInterface;
41class QProgressBar; 43class Q3ProgressBar;
42 44
43 45
44class KServerSocket : public QServerSocket 46class KServerSocket : public Q3ServerSocket
45{ 47{
46 Q_OBJECT 48 Q_OBJECT
47 49
48 public: 50 public:
@@ -73,9 +75,9 @@ class KServerSocket : public QServerSocket
73 void get_file(); 75 void get_file();
74 void end_connect(); 76 void end_connect();
75 void error_connect( QString ); 77 void error_connect( QString );
76 QDialog* mSyncActionDialog; 78 QDialog* mSyncActionDialog;
77 QSocket* mSocket; 79 Q3Socket* mSocket;
78 QString mPassWord; 80 QString mPassWord;
79 QString mFileName; 81 QString mFileName;
80 QTime piTime; 82 QTime piTime;
81 QString piFileString; 83 QString piFileString;
@@ -107,9 +109,9 @@ class KCommandSocket : public QObject
107 int mConnectCount; 109 int mConnectCount;
108 int mConnectMax; 110 int mConnectMax;
109 KProgressDialog mConnectProgress; 111 KProgressDialog mConnectProgress;
110 QWidget* tlw; 112 QWidget* tlw;
111 QSocket* mSocket; 113 Q3Socket* mSocket;
112 QString mPassWord; 114 QString mPassWord;
113 Q_UINT16 mPort; 115 Q_UINT16 mPort;
114 QString mHost; 116 QString mHost;
115 QString mFileName; 117 QString mFileName;
@@ -131,9 +133,9 @@ class KSyncManager : public QObject
131 KOPI = 0, 133 KOPI = 0,
132 KAPI = 1, 134 KAPI = 1,
133 PWMPI = 2 }; 135 PWMPI = 2 };
134 136
135 KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, QPopupMenu* syncmenu); 137 KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, Q3PopupMenu* syncmenu);
136 ~KSyncManager() ; 138 ~KSyncManager() ;
137 139
138 void multiSync( bool askforPrefs ); 140 void multiSync( bool askforPrefs );
139 bool blockSave() { return mBlockSaveFlag; } 141 bool blockSave() { return mBlockSaveFlag; }
@@ -218,10 +220,10 @@ class KSyncManager : public QObject
218 bool mBlockSaveFlag; 220 bool mBlockSaveFlag;
219 QWidget* mParent; 221 QWidget* mParent;
220 KSyncInterface* mImplementation; 222 KSyncInterface* mImplementation;
221 TargetApp mTargetApp; 223 TargetApp mTargetApp;
222 QPopupMenu* mSyncMenu; 224 Q3PopupMenu* mSyncMenu;
223 QProgressBar* bar; 225 Q3ProgressBar* bar;
224 bool mSyncWithDesktop; 226 bool mSyncWithDesktop;
225 227
226private slots: 228private slots:
227 void displayErrorPort(); 229 void displayErrorPort();
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp
index 2b87298..fd5bbca 100644
--- a/libkdepim/ksyncprefsdialog.cpp
+++ b/libkdepim/ksyncprefsdialog.cpp
@@ -22,30 +22,34 @@
22*/ 22*/
23 23
24#include <qlayout.h> 24#include <qlayout.h>
25#include <qlabel.h> 25#include <qlabel.h>
26#include <qgroupbox.h> 26#include <q3groupbox.h>
27#include <qbuttongroup.h> 27#include <q3buttongroup.h>
28#include <qlineedit.h> 28#include <qlineedit.h>
29#include <qfont.h> 29#include <qfont.h>
30#include <qslider.h> 30#include <qslider.h>
31#include <qfile.h> 31#include <qfile.h>
32#include <qdir.h> 32#include <qdir.h>
33#include <qtextstream.h> 33#include <q3textstream.h>
34#include <qcombobox.h> 34#include <qcombobox.h>
35#include <qvbox.h> 35#include <q3vbox.h>
36#include <qhbox.h> 36#include <q3hbox.h>
37#include <qspinbox.h> 37#include <qspinbox.h>
38#include <qdatetime.h> 38#include <qdatetime.h>
39#include <qcheckbox.h> 39#include <qcheckbox.h>
40#include <qradiobutton.h> 40#include <qradiobutton.h>
41#include <qpushbutton.h> 41#include <qpushbutton.h>
42#include <qstrlist.h> 42#include <q3strlist.h>
43#include <qapplication.h> 43#include <qapplication.h>
44#include <qlayout.h> 44#include <qlayout.h>
45#include <qscrollview.h> 45#include <q3scrollview.h>
46#include <qvgroupbox.h> 46#include <q3vgroupbox.h>
47#include <qhgroupbox.h> 47#include <q3hgroupbox.h>
48//Added by qt3to4:
49#include <Q3HBoxLayout>
50#include <Q3GridLayout>
51#include <Q3Frame>
48 52
49#include <kcolorbutton.h> 53#include <kcolorbutton.h>
50#include <kdebug.h> 54#include <kdebug.h>
51#include <klocale.h> 55#include <klocale.h>
@@ -88,25 +92,25 @@ KSyncPrefsDialog::~KSyncPrefsDialog()
88void KSyncPrefsDialog::setupSyncAlgTab() 92void KSyncPrefsDialog::setupSyncAlgTab()
89{ 93{
90 QLabel * lab; 94 QLabel * lab;
91 //QFrame *page = addPage(i18n("Sync Prefs"),0,0); 95 //QFrame *page = addPage(i18n("Sync Prefs"),0,0);
92 QVBox * mainbox = new QVBox( this ); 96 Q3VBox * mainbox = new Q3VBox( this );
93 QScrollView* sv = new QScrollView( mainbox ); 97 Q3ScrollView* sv = new Q3ScrollView( mainbox );
94 QHBoxLayout * lay = new QHBoxLayout( this ); 98 Q3HBoxLayout * lay = new Q3HBoxLayout( this );
95 lay->addWidget( mainbox ); 99 lay->addWidget( mainbox );
96 QHBox * b_box = new QHBox( mainbox ); 100 Q3HBox * b_box = new Q3HBox( mainbox );
97 101
98 QPushButton* button = new QPushButton( i18n("Ok"), b_box ); 102 QPushButton* button = new QPushButton( i18n("Ok"), b_box );
99 connect ( button, SIGNAL( clicked()), this, SLOT (slotOK() ) ); 103 connect ( button, SIGNAL( clicked()), this, SLOT (slotOK() ) );
100 button = new QPushButton( i18n("Cancel"), b_box ); 104 button = new QPushButton( i18n("Cancel"), b_box );
101 connect ( button, SIGNAL( clicked()), this, SLOT (reject() ) ); 105 connect ( button, SIGNAL( clicked()), this, SLOT (reject() ) );
102 //QBoxLayout * sl = new QVBoxLayout(this ); 106 //QBoxLayout * sl = new QVBoxLayout(this );
103 //sl->addWidget ( sv ); 107 //sl->addWidget ( sv );
104 sv->setResizePolicy ( QScrollView::AutoOneFit ); 108 sv->setResizePolicy ( Q3ScrollView::AutoOneFit );
105 QFrame *topFrame = new QFrame ( sv ); 109 Q3Frame *topFrame = new Q3Frame ( sv );
106 sv->addChild( topFrame ); 110 sv->addChild( topFrame );
107 mSetupSyncAlgTab = topFrame; 111 mSetupSyncAlgTab = topFrame;
108 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 112 Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,2);
109 topLayout->setSpacing(spacingHint()); 113 topLayout->setSpacing(spacingHint());
110 topLayout->setMargin(marginHint()); 114 topLayout->setMargin(marginHint());
111 115
112 //lab = new QLabel(i18n("Sync settings not yet implemented. DO NOT USE!"), topFrame); 116 //lab = new QLabel(i18n("Sync settings not yet implemented. DO NOT USE!"), topFrame);
@@ -119,9 +123,9 @@ void KSyncPrefsDialog::setupSyncAlgTab()
119 topLayout->addWidget(lab ,iii,0); 123 topLayout->addWidget(lab ,iii,0);
120 topLayout->addWidget(mMyMachineName,iii,1); 124 topLayout->addWidget(mMyMachineName,iii,1);
121 ++iii; 125 ++iii;
122 126
123 QHBox* buttonbox = new QHBox( topFrame); 127 Q3HBox* buttonbox = new Q3HBox( topFrame);
124 topLayout->addMultiCellWidget(buttonbox, iii,iii,0,1); 128 topLayout->addMultiCellWidget(buttonbox, iii,iii,0,1);
125 ++iii; 129 ++iii;
126 button = new QPushButton( i18n("New profile"), buttonbox ); 130 button = new QPushButton( i18n("New profile"), buttonbox );
127 connect ( button, SIGNAL( clicked()), this, SLOT (newProfile() ) ); 131 connect ( button, SIGNAL( clicked()), this, SLOT (newProfile() ) );
@@ -144,29 +148,29 @@ void KSyncPrefsDialog::setupSyncAlgTab()
144 ++iii; 148 ++iii;
145 149
146 150
147 151
148 QHGroupBox *iims = new QHGroupBox( i18n("Multiple Sync options"), topFrame); 152 Q3HGroupBox *iims = new Q3HGroupBox( i18n("Multiple Sync options"), topFrame);
149 new QLabel( i18n("Include in multiple "), iims ); 153 new QLabel( i18n("Include in multiple "), iims );
150 mIncludeInRing = new QCheckBox( i18n("calendar "), iims ); 154 mIncludeInRing = new QCheckBox( i18n("calendar "), iims );
151 mIncludeInRingAB = new QCheckBox( i18n("addressbook "), iims ); 155 mIncludeInRingAB = new QCheckBox( i18n("addressbook "), iims );
152 mIncludeInRingPWM = new QCheckBox( i18n("pwmanager"), iims ); 156 mIncludeInRingPWM = new QCheckBox( i18n("pwmanager"), iims );
153 new QLabel( i18n(" sync"), iims ); 157 new QLabel( i18n(" sync"), iims );
154 topLayout->addMultiCellWidget(iims, iii,iii,0,1); 158 topLayout->addMultiCellWidget(iims, iii,iii,0,1);
155 ++iii; 159 ++iii;
156 QVGroupBox* gb0 = new QVGroupBox( i18n("Sync algo options"), topFrame); 160 Q3VGroupBox* gb0 = new Q3VGroupBox( i18n("Sync algo options"), topFrame);
157 topLayout->addMultiCellWidget(gb0, iii,iii,0,1); 161 topLayout->addMultiCellWidget(gb0, iii,iii,0,1);
158 ++iii; 162 ++iii;
159 QButtonGroup* gr; 163 Q3ButtonGroup* gr;
160 { 164 {
161 QVGroupBox* topFrame = gb0; 165 Q3VGroupBox* topFrame = gb0;
162 166
163 167
164 168
165 mAskForPreferences = new QCheckBox( i18n("Ask for preferences before sync"), topFrame ); 169 mAskForPreferences = new QCheckBox( i18n("Ask for preferences before sync"), topFrame );
166 //topLayout->addMultiCellWidget(mAskForPreferences, iii,iii,0,1); 170 //topLayout->addMultiCellWidget(mAskForPreferences, iii,iii,0,1);
167 //++iii; 171 //++iii;
168 gr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Sync preferences"), topFrame); 172 gr = new Q3ButtonGroup ( 1, Qt::Horizontal, i18n("Sync preferences"), topFrame);
169 //topLayout->addMultiCellWidget(gr, iii,iii,0,1); 173 //topLayout->addMultiCellWidget(gr, iii,iii,0,1);
170 //++iii; 174 //++iii;
171 loc = new QRadioButton ( i18n("Take local entry on conflict"), gr ); 175 loc = new QRadioButton ( i18n("Take local entry on conflict"), gr );
172 rem = new QRadioButton ( i18n("Take remote entry on conflict"), gr ); 176 rem = new QRadioButton ( i18n("Take remote entry on conflict"), gr );
@@ -180,57 +184,57 @@ void KSyncPrefsDialog::setupSyncAlgTab()
180 //topLayout->addMultiCellWidget(mShowSummaryAfterSync, iii,iii,0,1); 184 //topLayout->addMultiCellWidget(mShowSummaryAfterSync, iii,iii,0,1);
181 //++iii; 185 //++iii;
182 186
183#if 0 187#if 0
184 QHGroupBox* gb51 = new QHGroupBox( i18n("Local resources to sync with:"), topFrame); 188 Q3HGroupBox* gb51 = new Q3HGroupBox( i18n("Local resources to sync with:"), topFrame);
185 { 189 {
186 QVBox * fibo2 = new QVBox ( gb51 ); 190 Q3VBox * fibo2 = new Q3VBox ( gb51 );
187 new QLabel ( i18n("Calendar resources:"), fibo2 ); 191 new QLabel ( i18n("Calendar resources:"), fibo2 );
188 //mFilterInCal = new QComboBox( fibo2 ); 192 //mFilterInCal = new QComboBox( fibo2 );
189 fibo2 = new QVBox ( gb51 ); 193 fibo2 = new Q3VBox ( gb51 );
190 new QLabel ( i18n("Addressbook resources:"), fibo2 ); 194 new QLabel ( i18n("Addressbook resources:"), fibo2 );
191 //mFilterInAB = new QComboBox( fibo2 ); 195 //mFilterInAB = new QComboBox( fibo2 );
192 } 196 }
193#endif 197#endif
194 QHGroupBox* gb5 = new QHGroupBox( i18n("Apply filter when adding data to local:"), topFrame); 198 Q3HGroupBox* gb5 = new Q3HGroupBox( i18n("Apply filter when adding data to local:"), topFrame);
195 QVBox * fibo2 = new QVBox ( gb5 ); 199 Q3VBox * fibo2 = new Q3VBox ( gb5 );
196 new QLabel ( i18n("Incoming calendar filter:"), fibo2 ); 200 new QLabel ( i18n("Incoming calendar filter:"), fibo2 );
197 mFilterInCal = new QComboBox( fibo2 ); 201 mFilterInCal = new QComboBox( fibo2 );
198 fibo2 = new QVBox ( gb5 ); 202 fibo2 = new Q3VBox ( gb5 );
199 new QLabel ( i18n("Incoming addressbook filter:"), fibo2 ); 203 new QLabel ( i18n("Incoming addressbook filter:"), fibo2 );
200 mFilterInAB = new QComboBox( fibo2 ); 204 mFilterInAB = new QComboBox( fibo2 );
201 205
202 mWriteBackFile = new QCheckBox( i18n("Write back synced data"), topFrame ); 206 mWriteBackFile = new QCheckBox( i18n("Write back synced data"), topFrame );
203 // topLayout->addMultiCellWidget(mWriteBackFile, iii,iii,0,1); 207 // topLayout->addMultiCellWidget(mWriteBackFile, iii,iii,0,1);
204 // ++iii; 208 // ++iii;
205 209
206 QVGroupBox* gb2 = new QVGroupBox( i18n("Write back options"), topFrame); 210 Q3VGroupBox* gb2 = new Q3VGroupBox( i18n("Write back options"), topFrame);
207 //topLayout->addMultiCellWidget(gb2, iii,iii,0,1); 211 //topLayout->addMultiCellWidget(gb2, iii,iii,0,1);
208 //++iii; 212 //++iii;
209 { 213 {
210 QVGroupBox*topFrame = gb2; 214 Q3VGroupBox*topFrame = gb2;
211 mWriteBackExisting= new QCheckBox( i18n("Write back (on remote) existing entries only"), topFrame ); 215 mWriteBackExisting= new QCheckBox( i18n("Write back (on remote) existing entries only"), topFrame );
212 QHGroupBox* gb4 = new QHGroupBox( i18n("Apply filter when adding data to remote:"), topFrame); 216 Q3HGroupBox* gb4 = new Q3HGroupBox( i18n("Apply filter when adding data to remote:"), topFrame);
213 QVBox * fibo = new QVBox ( gb4 ); 217 Q3VBox * fibo = new Q3VBox ( gb4 );
214 new QLabel ( i18n("Outgoing calendar filter:"), fibo ); 218 new QLabel ( i18n("Outgoing calendar filter:"), fibo );
215 mFilterOutCal = new QComboBox( fibo ); 219 mFilterOutCal = new QComboBox( fibo );
216 fibo = new QVBox ( gb4 ); 220 fibo = new Q3VBox ( gb4 );
217 new QLabel ( i18n("Outgoing addressbook filter:"), fibo ); 221 new QLabel ( i18n("Outgoing addressbook filter:"), fibo );
218 mFilterOutAB = new QComboBox( fibo ); 222 mFilterOutAB = new QComboBox( fibo );
219 //topLayout->addMultiCellWidget(mWriteBackExisting, iii,iii,0,1); 223 //topLayout->addMultiCellWidget(mWriteBackExisting, iii,iii,0,1);
220 //++iii; 224 //++iii;
221 mWriteBackFuture= new QCheckBox( i18n("Write back (calendar) entries for time period only"), topFrame ); 225 mWriteBackFuture= new QCheckBox( i18n("Write back (calendar) entries for time period only"), topFrame );
222 //topLayout->addMultiCellWidget(mWriteBackFuture, iii,iii,0,1); 226 //topLayout->addMultiCellWidget(mWriteBackFuture, iii,iii,0,1);
223 //++iii; 227 //++iii;
224 QVGroupBox* gb3 = new QVGroupBox( i18n("Time period"), topFrame); 228 Q3VGroupBox* gb3 = new Q3VGroupBox( i18n("Time period"), topFrame);
225 connect ( mWriteBackFuture, SIGNAL( toggled ( bool ) ), gb3, SLOT ( setEnabled ( bool ) ) ); 229 connect ( mWriteBackFuture, SIGNAL( toggled ( bool ) ), gb3, SLOT ( setEnabled ( bool ) ) );
226 230
227 new QLabel( i18n("From ") , gb3 ); 231 new QLabel( i18n("From ") , gb3 );
228 QHBox * tf1 = new QHBox ( gb3 ); 232 Q3HBox * tf1 = new Q3HBox ( gb3 );
229 mWriteBackPastWeeks= new QSpinBox(1,104, 1, tf1 ); 233 mWriteBackPastWeeks= new QSpinBox(1,104, 1, tf1 );
230 mWriteBackPastWeeks->setMaximumWidth( 100 ); 234 mWriteBackPastWeeks->setMaximumWidth( 100 );
231 new QLabel( i18n(" weeks in the past to ") ,tf1 ); 235 new QLabel( i18n(" weeks in the past to ") ,tf1 );
232 QHBox * tf2 = new QHBox ( gb3 ); 236 Q3HBox * tf2 = new Q3HBox ( gb3 );
233 mWriteBackFutureWeeks= new QSpinBox(1,104, 1, tf2); 237 mWriteBackFutureWeeks= new QSpinBox(1,104, 1, tf2);
234 mWriteBackFutureWeeks->setMaximumWidth( 100 ); 238 mWriteBackFutureWeeks->setMaximumWidth( 100 );
235 new QLabel( i18n(" weeks in the future ") , tf2 ); 239 new QLabel( i18n(" weeks in the future ") , tf2 );
236 //topLayout->addMultiCellWidget(mWriteBackFutureWeeks, iii,iii,1,1); 240 //topLayout->addMultiCellWidget(mWriteBackFutureWeeks, iii,iii,1,1);
@@ -240,9 +244,9 @@ void KSyncPrefsDialog::setupSyncAlgTab()
240 } 244 }
241 connect ( mWriteBackFile, SIGNAL( toggled ( bool ) ), gb2, SLOT ( setEnabled ( bool ) ) ); 245 connect ( mWriteBackFile, SIGNAL( toggled ( bool ) ), gb2, SLOT ( setEnabled ( bool ) ) );
242 246
243 } 247 }
244 proGr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Profile kind"), topFrame); 248 proGr = new Q3ButtonGroup ( 1, Qt::Horizontal, i18n("Profile kind"), topFrame);
245 gr = proGr; 249 gr = proGr;
246 topLayout->addMultiCellWidget(gr, iii,iii,0,1); 250 topLayout->addMultiCellWidget(gr, iii,iii,0,1);
247 ++iii; 251 ++iii;
248 mIsLocal = new QRadioButton ( i18n("Local file"), gr ); 252 mIsLocal = new QRadioButton ( i18n("Local file"), gr );
@@ -254,132 +258,132 @@ void KSyncPrefsDialog::setupSyncAlgTab()
254 connect (mIsLocal, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); 258 connect (mIsLocal, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) );
255 mIsPhone = new QRadioButton ( i18n("Mobile device (cell phone)"), gr ); 259 mIsPhone = new QRadioButton ( i18n("Mobile device (cell phone)"), gr );
256 connect (mIsPhone, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); 260 connect (mIsPhone, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) );
257 261
258 QVGroupBox* gb1 = new QVGroupBox( i18n("Profile kind specific settings"), topFrame); 262 Q3VGroupBox* gb1 = new Q3VGroupBox( i18n("Profile kind specific settings"), topFrame);
259 topLayout->addMultiCellWidget(gb1, iii,iii,0,1); 263 topLayout->addMultiCellWidget(gb1, iii,iii,0,1);
260 ++iii; 264 ++iii;
261 265
262 // ****************************************** 266 // ******************************************
263 // Profile kind specific settings 267 // Profile kind specific settings
264 { 268 {
265 // *** phone ******************************* 269 // *** phone *******************************
266 QVGroupBox* topFrame = gb1; 270 Q3VGroupBox* topFrame = gb1;
267 phoneWidget = new QVBox( topFrame); 271 phoneWidget = new Q3VBox( topFrame);
268 //topLayout->addMultiCellWidget(phoneWidget, iii,iii,0,1); 272 //topLayout->addMultiCellWidget(phoneWidget, iii,iii,0,1);
269 //++iii; 273 //++iii;
270 mWriteContactToSIM = 0;//new QCheckBox( i18n("Sync contacts with phone SIM card (If not, sync with phone memory)"), phoneWidget ); 274 mWriteContactToSIM = 0;//new QCheckBox( i18n("Sync contacts with phone SIM card (If not, sync with phone memory)"), phoneWidget );
271 QHBox* temphb = new QHBox( phoneWidget ); 275 Q3HBox* temphb = new Q3HBox( phoneWidget );
272 new QLabel( i18n("I/O device: "), temphb ); 276 new QLabel( i18n("I/O device: "), temphb );
273 mPhoneDevice = new QLineEdit( temphb); 277 mPhoneDevice = new QLineEdit( temphb);
274 button = new QPushButton( i18n("Help..."), temphb ); 278 button = new QPushButton( i18n("Help..."), temphb );
275 connect ( button, SIGNAL( clicked()), this, SLOT ( helpDevice() ) ); 279 connect ( button, SIGNAL( clicked()), this, SLOT ( helpDevice() ) );
276 280
277 281
278 temphb = new QHBox( phoneWidget ); 282 temphb = new Q3HBox( phoneWidget );
279 new QLabel( i18n("Connection: "), temphb ); 283 new QLabel( i18n("Connection: "), temphb );
280 mPhoneConnection = new QLineEdit( temphb); 284 mPhoneConnection = new QLineEdit( temphb);
281 button = new QPushButton( i18n("Help..."), temphb ); 285 button = new QPushButton( i18n("Help..."), temphb );
282 connect ( button, SIGNAL( clicked()), this, SLOT ( helpConnection() ) ); 286 connect ( button, SIGNAL( clicked()), this, SLOT ( helpConnection() ) );
283 287
284 288
285 temphb = new QHBox( phoneWidget ); 289 temphb = new Q3HBox( phoneWidget );
286 new QLabel( i18n("Model(opt.): "), temphb ); 290 new QLabel( i18n("Model(opt.): "), temphb );
287 mPhoneModel = new QLineEdit( temphb); 291 mPhoneModel = new QLineEdit( temphb);
288 button = new QPushButton( i18n("Help..."), temphb ); 292 button = new QPushButton( i18n("Help..."), temphb );
289 connect ( button, SIGNAL( clicked()), this, SLOT ( helpModel() ) ); 293 connect ( button, SIGNAL( clicked()), this, SLOT ( helpModel() ) );
290 294
291 // *** local******************************* 295 // *** local*******************************
292 localFileWidget = new QVBox( topFrame); 296 localFileWidget = new Q3VBox( topFrame);
293 //topLayout->addMultiCellWidget(localFileWidget, iii,iii,0,1); 297 //topLayout->addMultiCellWidget(localFileWidget, iii,iii,0,1);
294 //++iii; 298 //++iii;
295 temphb = new QHBox( localFileWidget ); 299 temphb = new Q3HBox( localFileWidget );
296 300
297 lab = new QLabel( i18n("Local file Cal:"), temphb ); 301 lab = new QLabel( i18n("Local file Cal:"), temphb );
298 lab = new QLabel( i18n("Local file ABook:"), temphb ); 302 lab = new QLabel( i18n("Local file ABook:"), temphb );
299 lab = new QLabel( i18n("Local file PWMgr:"), temphb ); 303 lab = new QLabel( i18n("Local file PWMgr:"), temphb );
300 temphb = new QHBox( localFileWidget ); 304 temphb = new Q3HBox( localFileWidget );
301 button = new QPushButton( i18n("Choose..."), temphb ); 305 button = new QPushButton( i18n("Choose..."), temphb );
302 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFile() ) ); 306 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFile() ) );
303 button = new QPushButton( i18n("Choose..."), temphb ); 307 button = new QPushButton( i18n("Choose..."), temphb );
304 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFileAB() ) ); 308 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFileAB() ) );
305 button = new QPushButton( i18n("Choose..."), temphb ); 309 button = new QPushButton( i18n("Choose..."), temphb );
306 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFilePWM() ) ); 310 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFilePWM() ) );
307 temphb = new QHBox( localFileWidget ); 311 temphb = new Q3HBox( localFileWidget );
308 312
309 mRemoteFile = new QLineEdit( temphb); 313 mRemoteFile = new QLineEdit( temphb);
310 mRemoteFileAB = new QLineEdit( temphb); 314 mRemoteFileAB = new QLineEdit( temphb);
311 mRemoteFilePWM = new QLineEdit( temphb); 315 mRemoteFilePWM = new QLineEdit( temphb);
312 mIsKapiFileL = new QCheckBox( i18n("Addressbook file (*.vcf) is used by KA/Pi"), localFileWidget ); 316 mIsKapiFileL = new QCheckBox( i18n("Addressbook file (*.vcf) is used by KA/Pi"), localFileWidget );
313 317
314 318
315 // *** remote******************************* 319 // *** remote*******************************
316 remoteFileWidget = new QVBox( topFrame); 320 remoteFileWidget = new Q3VBox( topFrame);
317 //topLayout->addMultiCellWidget(remoteFileWidget, iii,iii,0,1); 321 //topLayout->addMultiCellWidget(remoteFileWidget, iii,iii,0,1);
318 //++iii; 322 //++iii;
319 temphb = new QHBox( remoteFileWidget ); 323 temphb = new Q3HBox( remoteFileWidget );
320 new QLabel( i18n("Calendar:"), temphb); 324 new QLabel( i18n("Calendar:"), temphb);
321 new QLabel( i18n("AddressBook:"), temphb); 325 new QLabel( i18n("AddressBook:"), temphb);
322 new QLabel( i18n("PWManager:"), temphb); 326 new QLabel( i18n("PWManager:"), temphb);
323 327
324 lab = new QLabel( i18n("Pre sync (download) command:"), remoteFileWidget); 328 lab = new QLabel( i18n("Pre sync (download) command:"), remoteFileWidget);
325 temphb = new QHBox( remoteFileWidget ); 329 temphb = new Q3HBox( remoteFileWidget );
326 mRemotePrecommand = new QLineEdit(temphb); 330 mRemotePrecommand = new QLineEdit(temphb);
327 mRemotePrecommandAB = new QLineEdit(temphb); 331 mRemotePrecommandAB = new QLineEdit(temphb);
328 mRemotePrecommandPWM = new QLineEdit(temphb); 332 mRemotePrecommandPWM = new QLineEdit(temphb);
329 333
330 lab = new QLabel( i18n("Local temp file:"), remoteFileWidget); 334 lab = new QLabel( i18n("Local temp file:"), remoteFileWidget);
331 temphb = new QHBox( remoteFileWidget ); 335 temphb = new Q3HBox( remoteFileWidget );
332 mLocalTempFile = new QLineEdit(temphb); 336 mLocalTempFile = new QLineEdit(temphb);
333 mLocalTempFileAB = new QLineEdit(temphb); 337 mLocalTempFileAB = new QLineEdit(temphb);
334 mLocalTempFilePWM = new QLineEdit(temphb); 338 mLocalTempFilePWM = new QLineEdit(temphb);
335 339
336 lab = new QLabel( i18n("Post sync (upload) command:"), remoteFileWidget); 340 lab = new QLabel( i18n("Post sync (upload) command:"), remoteFileWidget);
337 temphb = new QHBox( remoteFileWidget ); 341 temphb = new Q3HBox( remoteFileWidget );
338 mRemotePostcommand = new QLineEdit(temphb ); 342 mRemotePostcommand = new QLineEdit(temphb );
339 mRemotePostcommandAB = new QLineEdit(temphb ); 343 mRemotePostcommandAB = new QLineEdit(temphb );
340 mRemotePostcommandPWM = new QLineEdit(temphb ); 344 mRemotePostcommandPWM = new QLineEdit(temphb );
341 mIsKapiFileR = new QCheckBox( i18n("Addressbook file is used by KA/Pi"), remoteFileWidget ); 345 mIsKapiFileR = new QCheckBox( i18n("Addressbook file is used by KA/Pi"), remoteFileWidget );
342 lab = new QLabel( i18n("Fill in default values for:"), remoteFileWidget); 346 lab = new QLabel( i18n("Fill in default values for:"), remoteFileWidget);
343 temphb = new QHBox( remoteFileWidget ); 347 temphb = new Q3HBox( remoteFileWidget );
344 button = new QPushButton( i18n("ssh/scp"), temphb ); 348 button = new QPushButton( i18n("ssh/scp"), temphb );
345 connect ( button, SIGNAL( clicked()), this, SLOT (fillSSH() ) ); 349 connect ( button, SIGNAL( clicked()), this, SLOT (fillSSH() ) );
346 button = new QPushButton( i18n("ftp"), temphb ); 350 button = new QPushButton( i18n("ftp"), temphb );
347 connect ( button, SIGNAL( clicked()), this, SLOT (fillFTP() ) ); 351 connect ( button, SIGNAL( clicked()), this, SLOT (fillFTP() ) );
348 lab = new QLabel( i18n("Hint: Use $PWD$ for placeholder of password!"), remoteFileWidget); 352 lab = new QLabel( i18n("Hint: Use $PWD$ for placeholder of password!"), remoteFileWidget);
349 353
350 // *** pi-sync******************************* 354 // *** pi-sync*******************************
351 piWidget = new QVBox( topFrame); 355 piWidget = new Q3VBox( topFrame);
352 //topLayout->addMultiCellWidget(piWidget, iii,iii,0,1); 356 //topLayout->addMultiCellWidget(piWidget, iii,iii,0,1);
353 //++iii; 357 //++iii;
354 temphb = new QHBox( piWidget ); 358 temphb = new Q3HBox( piWidget );
355 new QLabel( i18n("Calendar:"), temphb); 359 new QLabel( i18n("Calendar:"), temphb);
356 new QLabel( i18n("AddressBook:"), temphb); 360 new QLabel( i18n("AddressBook:"), temphb);
357 new QLabel( i18n("PWManager:"), temphb); 361 new QLabel( i18n("PWManager:"), temphb);
358 362
359 lab = new QLabel( i18n("Password for remote access: (could be the same for each)"), piWidget); 363 lab = new QLabel( i18n("Password for remote access: (could be the same for each)"), piWidget);
360 temphb = new QHBox( piWidget ); 364 temphb = new Q3HBox( piWidget );
361 mRemotePw = new QLineEdit(temphb); 365 mRemotePw = new QLineEdit(temphb);
362 mRemotePwAB = new QLineEdit(temphb); 366 mRemotePwAB = new QLineEdit(temphb);
363 mRemotePwPWM = new QLineEdit(temphb); 367 mRemotePwPWM = new QLineEdit(temphb);
364 368
365 lab = new QLabel( i18n("Remote IP address: (could be the same for each)"), piWidget); 369 lab = new QLabel( i18n("Remote IP address: (could be the same for each)"), piWidget);
366 temphb = new QHBox( piWidget ); 370 temphb = new Q3HBox( piWidget );
367 mRemoteIP = new QLineEdit(temphb); 371 mRemoteIP = new QLineEdit(temphb);
368 mRemoteIPAB = new QLineEdit(temphb); 372 mRemoteIPAB = new QLineEdit(temphb);
369 mRemoteIPPWM = new QLineEdit(temphb); 373 mRemoteIPPWM = new QLineEdit(temphb);
370 374
371 lab = new QLabel( i18n("Remote port number: (should be different for each)"), piWidget); 375 lab = new QLabel( i18n("Remote port number: (should be different for each)"), piWidget);
372 temphb = new QHBox( piWidget ); 376 temphb = new Q3HBox( piWidget );
373 mRemotePort = new QLineEdit(temphb); 377 mRemotePort = new QLineEdit(temphb);
374 mRemotePortAB = new QLineEdit(temphb); 378 mRemotePortAB = new QLineEdit(temphb);
375 mRemotePortPWM = new QLineEdit(temphb); 379 mRemotePortPWM = new QLineEdit(temphb);
376 380
377 lab = new QLabel( i18n("Local/remote Resource sync partners (Leave empty to not sync)"), piWidget); 381 lab = new QLabel( i18n("Local/remote Resource sync partners (Leave empty to not sync)"), piWidget);
378 mTableBox = new QHBox( piWidget ); 382 mTableBox = new Q3HBox( piWidget );
379 mResTableKopi = new QTable( 1, 1, mTableBox ); 383 mResTableKopi = new Q3Table( 1, 1, mTableBox );
380 mResTableKapi = new QTable( 1, 1, mTableBox ); 384 mResTableKapi = new Q3Table( 1, 1, mTableBox );
381 mResTablePwmpi = new QTable( 1, 1, mTableBox ); 385 mResTablePwmpi = new Q3Table( 1, 1, mTableBox );
382 mResTableKopi->horizontalHeader()->setLabel( 0, i18n("Remote") ); 386 mResTableKopi->horizontalHeader()->setLabel( 0, i18n("Remote") );
383 mResTableKapi->horizontalHeader()->setLabel( 0, i18n("Remote") ); 387 mResTableKapi->horizontalHeader()->setLabel( 0, i18n("Remote") );
384 mResTablePwmpi->horizontalHeader()->setLabel( 0, i18n("Remote") ); 388 mResTablePwmpi->horizontalHeader()->setLabel( 0, i18n("Remote") );
385 mResTableKopi->setLeftMargin( 80 ); 389 mResTableKopi->setLeftMargin( 80 );
@@ -467,9 +471,9 @@ void KSyncPrefsDialog::slotOK()
467 return; 471 return;
468 } 472 }
469 int i; 473 int i;
470 for (i = 0; i < mSyncProfileNames.count(); ++ i) { 474 for (i = 0; i < mSyncProfileNames.count(); ++ i) {
471 if ( mSyncProfileNames.contains( mSyncProfileNames[i]) > 1 ) { 475 if ( mSyncProfileNames.count( mSyncProfileNames[i]) > 1 ) {
472 KMessageBox::error(this,i18n("Multiple profiles with same name!\nPlease use unique profile names!"),i18n("KO/Pi config error")); 476 KMessageBox::error(this,i18n("Multiple profiles with same name!\nPlease use unique profile names!"),i18n("KO/Pi config error"));
473 return; 477 return;
474 } 478 }
475 } 479 }
diff --git a/libkdepim/ksyncprefsdialog.h b/libkdepim/ksyncprefsdialog.h
index d8c02de..1d7503e 100644
--- a/libkdepim/ksyncprefsdialog.h
+++ b/libkdepim/ksyncprefsdialog.h
@@ -24,11 +24,11 @@
24#define _KSYNCPREFSDIALOG_H 24#define _KSYNCPREFSDIALOG_H
25 25
26 26
27#include <kdialogbase.h> 27#include <kdialogbase.h>
28#include <qptrlist.h> 28#include <q3ptrlist.h>
29#include <qtable.h> 29#include <q3table.h>
30#include <qhbox.h> 30#include <q3hbox.h>
31 31
32//#include <libkdepim/kprefsdialog.h> 32//#include <libkdepim/kprefsdialog.h>
33 33
34class KColorButton; 34class KColorButton;
@@ -37,11 +37,11 @@ class QRadioButton;
37class QCheckBox; 37class QCheckBox;
38class QSlider; 38class QSlider;
39class KURLRequester; 39class KURLRequester;
40class QComboBox; 40class QComboBox;
41class QButtonGroup; 41class Q3ButtonGroup;
42class QLineEdit; 42class QLineEdit;
43class QVBox; 43class Q3VBox;
44class QStringList; 44class QStringList;
45class KSyncProfile; 45class KSyncProfile;
46 46
47/** Dialog to change the korganizer configuration. 47/** Dialog to change the korganizer configuration.
@@ -85,9 +85,9 @@ class KSyncPrefsDialog : public KDialog
85 void readResources(); 85 void readResources();
86 private: 86 private:
87 void updateMyCaption(); 87 void updateMyCaption();
88 int currentSelection; 88 int currentSelection;
89 QPtrList<KSyncProfile> mSyncProfiles; 89 Q3PtrList<KSyncProfile> mSyncProfiles;
90 QStringList mSyncProfileNames; 90 QStringList mSyncProfileNames;
91 QStringList mFilterKapi; 91 QStringList mFilterKapi;
92 QStringList mFilterKopi; 92 QStringList mFilterKopi;
93 QStringList mResourcesKopi; 93 QStringList mResourcesKopi;
@@ -104,13 +104,13 @@ class KSyncPrefsDialog : public KDialog
104 QCheckBox* mIncludeInRingPWM; 104 QCheckBox* mIncludeInRingPWM;
105 void addProfile ( KSyncProfile* ); 105 void addProfile ( KSyncProfile* );
106 void insertProfiles(); 106 void insertProfiles();
107 void saveProfile(); 107 void saveProfile();
108 QButtonGroup* proGr; 108 Q3ButtonGroup* proGr;
109 QHBox * mTableBox; 109 Q3HBox * mTableBox;
110 QTable* mResTableKopi; 110 Q3Table* mResTableKopi;
111 QTable* mResTableKapi; 111 Q3Table* mResTableKapi;
112 QTable* mResTablePwmpi; 112 Q3Table* mResTablePwmpi;
113 113
114 QComboBox * mFilterOutCal; 114 QComboBox * mFilterOutCal;
115 QComboBox * mFilterInCal; 115 QComboBox * mFilterInCal;
116 QComboBox * mFilterOutAB; 116 QComboBox * mFilterOutAB;
@@ -151,12 +151,12 @@ class KSyncPrefsDialog : public KDialog
151 QLineEdit * mPhoneConnection; 151 QLineEdit * mPhoneConnection;
152 QLineEdit * mPhoneModel; 152 QLineEdit * mPhoneModel;
153 153
154 QWidget* mSetupSyncAlgTab; 154 QWidget* mSetupSyncAlgTab;
155 QVBox* localFileWidget; 155 Q3VBox* localFileWidget;
156 QVBox* remoteFileWidget; 156 Q3VBox* remoteFileWidget;
157 QVBox* phoneWidget; 157 Q3VBox* phoneWidget;
158 QVBox* piWidget; 158 Q3VBox* piWidget;
159 QCheckBox* mWriteBackFile; 159 QCheckBox* mWriteBackFile;
160 QCheckBox* mWriteBackFuture; 160 QCheckBox* mWriteBackFuture;
161 QSpinBox* mWriteBackFutureWeeks; 161 QSpinBox* mWriteBackFutureWeeks;
162 QSpinBox* mWriteBackPastWeeks; 162 QSpinBox* mWriteBackPastWeeks;
diff --git a/libkdepim/ksyncprofile.h b/libkdepim/ksyncprofile.h
index 91fcfc5..1e41662 100644
--- a/libkdepim/ksyncprofile.h
+++ b/libkdepim/ksyncprofile.h
@@ -19,9 +19,9 @@
19*/ 19*/
20#ifndef _KSYNCPROFILE_H 20#ifndef _KSYNCPROFILE_H
21#define _KSYNCPROFILE_H 21#define _KSYNCPROFILE_H
22 22
23#include <qptrlist.h> 23#include <q3ptrlist.h>
24#include <qcolor.h> 24#include <qcolor.h>
25#include <qfont.h> 25#include <qfont.h>
26#include <qstringlist.h> 26#include <qstringlist.h>
27#include <qobject.h> 27#include <qobject.h>
diff --git a/libkdepim/libkdepim.pro b/libkdepim/libkdepim.pro
index 7160d0e..fb27311 100644
--- a/libkdepim/libkdepim.pro
+++ b/libkdepim/libkdepim.pro
@@ -1,8 +1,8 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2 CONFIG = qt warn_on 2 CONFIG = qt warn_on
3DEFINES +=KORG_NOKABC 3DEFINES +=KORG_NOKABC
4TARGET = microkdepim 4TARGET = xmicrokdepim
5INCLUDEPATH += ../microkde ../microkde/kdecore ../microkde/kdeui . .. 5INCLUDEPATH += ../microkde ../microkde/kdecore ../microkde/kdeui . ..
6DESTDIR=../bin 6DESTDIR=../bin
7 7
8DEFINES += DESKTOP_VERSION 8DEFINES += DESKTOP_VERSION
@@ -73,4 +73,6 @@ HEADERS += ol_access.h
73SOURCES += ol_access.cpp 73SOURCES += ol_access.cpp
74#olimport section end 74#olimport section end
75} 75}
76} 76}
77#The following line was inserted by qt3to4
78QT += xml qt3support
diff --git a/libkdepim/libkdepimE.pro b/libkdepim/libkdepimE.pro
index f3db68e..4b42184 100644
--- a/libkdepim/libkdepimE.pro
+++ b/libkdepim/libkdepimE.pro
@@ -1,10 +1,10 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2 CONFIG += qt warn_on 2 CONFIG += qt warn_on
3TARGET = microkdepim 3TARGET = xmicrokdepim
4INCLUDEPATH += . $(KDEPIMDIR) $(KDEPIMDIR)/microkde $(KDEPIMDIR)/qtcompat $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kdeui $(QPEDIR)/include 4INCLUDEPATH += . $(KDEPIMDIR) $(KDEPIMDIR)/microkde $(KDEPIMDIR)/qtcompat $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kdeui $(QPEDIR)/include
5LIBS += -lmicrokde 5LIBS += -lxmicrokde
6#LIBS += -lmicrokcal 6#LIBS += -lxmicrokcal
7LIBS += -L$(QPEDIR)/lib 7LIBS += -L$(QPEDIR)/lib
8OBJECTS_DIR = obj/$(PLATFORM) 8OBJECTS_DIR = obj/$(PLATFORM)
9MOC_DIR = moc/$(PLATFORM) 9MOC_DIR = moc/$(PLATFORM)
10DESTDIR=$(QPEDIR)/lib 10DESTDIR=$(QPEDIR)/lib
diff --git a/libkdepim/ol_access.cpp b/libkdepim/ol_access.cpp
index 1b05693..821f148 100755
--- a/libkdepim/ol_access.cpp
+++ b/libkdepim/ol_access.cpp
@@ -21,23 +21,23 @@
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <qtooltip.h> 24#include <qtooltip.h>
25#include <qframe.h> 25#include <q3frame.h>
26#include <qpixmap.h> 26#include <qpixmap.h>
27#include <qlayout.h> 27#include <qlayout.h>
28#include <qprogressbar.h> 28#include <q3progressbar.h>
29#include <qprogressdialog.h> 29#include <q3progressdialog.h>
30#include <qwidgetstack.h> 30#include <q3widgetstack.h>
31#include <qdatetime.h> 31#include <qdatetime.h>
32#include <qdir.h> 32#include <qdir.h>
33#include <qpushbutton.h> 33#include <qpushbutton.h>
34#include <qregexp.h> 34#include <qregexp.h>
35#include <qapplication.h> 35#include <qapplication.h>
36#include <qhbox.h> 36#include <q3hbox.h>
37#include <qheader.h> 37#include <q3header.h>
38#include <qdatetime.h> 38#include <qdatetime.h>
39#include <qlistview.h> 39#include <q3listview.h>
40 40
41#include <kdebug.h> 41#include <kdebug.h>
42#include <klocale.h> 42#include <klocale.h>
43#include <kstandarddirs.h> 43#include <kstandarddirs.h>
@@ -53,15 +53,15 @@
53#include <ole2.h> 53#include <ole2.h>
54#include <comutil.h> 54#include <comutil.h>
55 55
56 56
57class OLEListViewItem : public QCheckListItem 57class OLEListViewItem : public Q3CheckListItem
58{ 58{
59public: 59public:
60 OLEListViewItem( QListView *parent, QString text ) : 60 OLEListViewItem( Q3ListView *parent, QString text ) :
61 QCheckListItem( parent, text, QCheckListItem::CheckBox ) { ; }; 61 Q3CheckListItem( parent, text, Q3CheckListItem::CheckBox ) { ; };
62 OLEListViewItem( QListViewItem *after, QString text ) : 62 OLEListViewItem( Q3ListViewItem *after, QString text ) :
63 QCheckListItem( after, text, QCheckListItem::CheckBox ) { ; }; 63 Q3CheckListItem( after, text, Q3CheckListItem::CheckBox ) { ; };
64 ~OLEListViewItem() {}; 64 ~OLEListViewItem() {};
65 void setData( DWORD data ) {mData= data; }; 65 void setData( DWORD data ) {mData= data; };
66 void setDataID( QString data ){ mDataID = data ;} 66 void setDataID( QString data ){ mDataID = data ;}
67 QString dataID() { return mDataID;} 67 QString dataID() { return mDataID;}
@@ -77,17 +77,17 @@ class OLEFolderSelect : public KDialogBase
77 OLEFolderSelect() : 77 OLEFolderSelect() :
78 KDialogBase( Plain, "", Ok | Cancel, Ok, 78 KDialogBase( Plain, "", Ok | Cancel, Ok,
79 0, "", true, false, i18n("Import!") ) 79 0, "", true, false, i18n("Import!") )
80 { 80 {
81 QHBox * mw = new QHBox( this ); 81 Q3HBox * mw = new Q3HBox( this );
82 setMainWidget( mw ); 82 setMainWidget( mw );
83 mListView = new QListView( mw ); 83 mListView = new Q3ListView( mw );
84 mListView->addColumn(i18n("Select Folder")); 84 mListView->addColumn(i18n("Select Folder"));
85 mListView->addColumn(i18n("Content Type")); 85 mListView->addColumn(i18n("Content Type"));
86 } 86 }
87 QListView* listView() { return mListView;} 87 Q3ListView* listView() { return mListView;}
88private: 88private:
89 QListView* mListView; 89 Q3ListView* mListView;
90}; 90};
91 91
92OL_access *OL_access::sInstance = 0; 92OL_access *OL_access::sInstance = 0;
93static KStaticDeleter<OL_access> staticDeleterPim; 93static KStaticDeleter<OL_access> staticDeleterPim;
@@ -148,9 +148,9 @@ void OL_access::readContactData( LPDISPATCH dispItem, KABC::Addressee::List* li
148 QString cap = i18n("Importing contact data"); 148 QString cap = i18n("Importing contact data");
149 if ( syncMode ) { 149 if ( syncMode ) {
150 cap = i18n("Reading contact data..."); 150 cap = i18n("Reading contact data...");
151 } 151 }
152 QProgressDialog bar( cap,i18n("Abort"), folderItems.GetCount(), 0 ); 152 Q3ProgressDialog bar( cap,i18n("Abort"), folderItems.GetCount(), 0 );
153 bar.setCaption (i18n("Accessing OL") ); 153 bar.setCaption (i18n("Accessing OL") );
154 int h = bar.sizeHint().height() ; 154 int h = bar.sizeHint().height() ;
155 int w = 300; 155 int w = 300;
156 int dw = QApplication::desktop()->width(); 156 int dw = QApplication::desktop()->width();
@@ -172,9 +172,9 @@ void OL_access::readContactData( LPDISPATCH dispItem, KABC::Addressee::List* li
172} 172}
173QStringList OL_access::getFolderSelection( int type , QString caption ) 173QStringList OL_access::getFolderSelection( int type , QString caption )
174{ 174{
175 OLEFolderSelect folder_dialog; 175 OLEFolderSelect folder_dialog;
176 QListView * listView = folder_dialog.listView(); 176 Q3ListView * listView = folder_dialog.listView();
177 MAPIFolder mfInbox; 177 MAPIFolder mfInbox;
178 MAPIFolder mfRoot; 178 MAPIFolder mfRoot;
179 CString szName; 179 CString szName;
180 _NameSpace olNS; 180 _NameSpace olNS;
@@ -1134,15 +1134,15 @@ DATE Qdt2date( QDateTime dt )
1134 ddd = odt; 1134 ddd = odt;
1135 return ddd; 1135 return ddd;
1136} 1136}
1137 1137
1138class OLEListViewItem : public QCheckListItem 1138class OLEListViewItem : public Q3CheckListItem
1139{ 1139{
1140 public: 1140 public:
1141 OLEListViewItem( QListView *parent, QString text ) : 1141 OLEListViewItem( Q3ListView *parent, QString text ) :
1142 QCheckListItem( parent, text, QCheckListItem::CheckBox ) { ; }; 1142 Q3CheckListItem( parent, text, Q3CheckListItem::CheckBox ) { ; };
1143 OLEListViewItem( QListViewItem *after, QString text ) : 1143 OLEListViewItem( Q3ListViewItem *after, QString text ) :
1144 QCheckListItem( after, text, QCheckListItem::CheckBox ) { ; }; 1144 Q3CheckListItem( after, text, Q3CheckListItem::CheckBox ) { ; };
1145 ~OLEListViewItem() {}; 1145 ~OLEListViewItem() {};
1146 void setData( DWORD data ) {mData= data; }; 1146 void setData( DWORD data ) {mData= data; };
1147 void setDataID( QString data ){ mDataID = data ;} 1147 void setDataID( QString data ){ mDataID = data ;}
1148 QString dataID() { return mDataID;} 1148 QString dataID() { return mDataID;}
@@ -1158,11 +1158,11 @@ KAImportOLdialog::KAImportOLdialog( const QString &caption,
1158 KDialogBase( Plain, caption, User1 | Close, Ok, 1158 KDialogBase( Plain, caption, User1 | Close, Ok,
1159 parent, caption, true, false, i18n("Import!") ) 1159 parent, caption, true, false, i18n("Import!") )
1160{ 1160{
1161 mSyncMode = false; 1161 mSyncMode = false;
1162 QHBox * mw = new QHBox( this ); 1162 Q3HBox * mw = new Q3HBox( this );
1163 setMainWidget( mw ); 1163 setMainWidget( mw );
1164 mListView = new QListView( mw ); 1164 mListView = new Q3ListView( mw );
1165 mListView->addColumn(i18n("Select Folder")); 1165 mListView->addColumn(i18n("Select Folder"));
1166 mListView->addColumn(i18n("Content Type")); 1166 mListView->addColumn(i18n("Content Type"));
1167 mABook = aBook; 1167 mABook = aBook;
1168 connect( this, SIGNAL( user1Clicked() ),SLOT ( slotApply())); 1168 connect( this, SIGNAL( user1Clicked() ),SLOT ( slotApply()));
@@ -1302,9 +1302,9 @@ void KAImportOLdialog::readContactData( DWORD folder )
1302 QString cap = i18n("Importing contact data"); 1302 QString cap = i18n("Importing contact data");
1303 if ( mSyncMode ) { 1303 if ( mSyncMode ) {
1304 cap = i18n("Reading contact data..."); 1304 cap = i18n("Reading contact data...");
1305 } 1305 }
1306 QProgressDialog bar( cap,i18n("Abort"), folderItems.GetCount(),this); 1306 Q3ProgressDialog bar( cap,i18n("Abort"), folderItems.GetCount(),this);
1307 bar.setCaption (i18n("Accessing OL") ); 1307 bar.setCaption (i18n("Accessing OL") );
1308 int h = bar.sizeHint().height() ; 1308 int h = bar.sizeHint().height() ;
1309 int w = 300; 1309 int w = 300;
1310 int dw = QApplication::desktop()->width(); 1310 int dw = QApplication::desktop()->width();
diff --git a/libkdepim/ol_access.h b/libkdepim/ol_access.h
index 85dbc6c..3422f65 100755
--- a/libkdepim/ol_access.h
+++ b/libkdepim/ol_access.h
@@ -36,9 +36,9 @@
36#define OL_CONTACT_DATA 2 36#define OL_CONTACT_DATA 2
37#define OL_CALENDAR_DATA 1 //pending is this the right number 37#define OL_CALENDAR_DATA 1 //pending is this the right number
38 38
39class QDateTime; 39class QDateTime;
40class QListView; 40class Q3ListView;
41class OLEListViewItem; 41class OLEListViewItem;
42class _ContactItem; 42class _ContactItem;
43class OL_access : public QObject 43class OL_access : public QObject
44{ 44{
@@ -131,9 +131,9 @@ class KAImportOLdialog : public KDialogBase
131 void addFolder(OLEListViewItem* iParent, LPDISPATCH dispParent); 131 void addFolder(OLEListViewItem* iParent, LPDISPATCH dispParent);
132 void readContactData( DWORD folder ); 132 void readContactData( DWORD folder );
133 133
134 KABC::AddressBook * mABook; 134 KABC::AddressBook * mABook;
135 QListView * mListView; 135 Q3ListView * mListView;
136 KABC::Addressee::List mAList; 136 KABC::Addressee::List mAList;
137 bool addAddressee( KABC::Addressee a ); 137 bool addAddressee( KABC::Addressee a );
138 private: 138 private:
139 int importedItems; 139 int importedItems;
diff --git a/libkdepim/phoneaccess.cpp b/libkdepim/phoneaccess.cpp
index 89db22b..0ea73f5 100644
--- a/libkdepim/phoneaccess.cpp
+++ b/libkdepim/phoneaccess.cpp
@@ -21,13 +21,14 @@
21 21
22 22
23#include <qstring.h> 23#include <qstring.h>
24#include <qapplication.h> 24#include <qapplication.h>
25#include <qptrlist.h> 25#include <QDesktopWidget>
26#include <q3ptrlist.h>
26#include <qregexp.h> 27#include <qregexp.h>
27#include <qfile.h> 28#include <qfile.h>
28#include <qlabel.h> 29#include <qlabel.h>
29#include <qtextstream.h> 30#include <q3textstream.h>
30#include <qtextcodec.h> 31#include <qtextcodec.h>
31#include <qdir.h> 32#include <qdir.h>
32#include <kmessagebox.h> 33#include <kmessagebox.h>
33#include <stdlib.h> 34#include <stdlib.h>
@@ -45,14 +46,16 @@ void PhoneAccess::writeConfig( QString device, QString connection, QString model
45 bool write = false; 46 bool write = false;
46 bool addPort = true, addConnection = true, addModel = true; 47 bool addPort = true, addConnection = true, addModel = true;
47 QFile file( fileName ); 48 QFile file( fileName );
48 if ( QFile::exists( fileName) ) { 49 if ( QFile::exists( fileName) ) {
49 if (!file.open( IO_ReadOnly ) ) { 50 if (!file.open( QIODevice::ReadOnly ) ) {
50 qDebug("Error: cannot open %s ", fileName.latin1() ); 51 qDebug("Error: cannot open %s ", fileName.latin1() );
51 return; 52 return;
52 } 53 }
53 QString line; 54 QString line;
54 while ( file.readLine( line, 1024 ) > 0 ) { 55 char tmp[1024];
56 while ( file.readLine( tmp, 1024 ) > 0 ) {
57 line = tmp;
55 //qDebug("*%s* ", line.latin1() ); 58 //qDebug("*%s* ", line.latin1() );
56 if ( line.left(7 ) == "[gammu]" ) { 59 if ( line.left(7 ) == "[gammu]" ) {
57 ; 60 ;
58 } else 61 } else
@@ -114,14 +117,14 @@ void PhoneAccess::writeConfig( QString device, QString connection, QString model
114 content += model; 117 content += model;
115 content += "\n"; 118 content += "\n";
116 } 119 }
117 if ( write ) { 120 if ( write ) {
118 if (!file.open( IO_WriteOnly ) ) { 121 if (!file.open( QIODevice::WriteOnly ) ) {
119 qDebug("Error: cannot write file %s ", fileName.latin1() ); 122 qDebug("Error: cannot write file %s ", fileName.latin1() );
120 return; 123 return;
121 } 124 }
122 qDebug("Writing file %s ", fileName.latin1() ); 125 qDebug("Writing file %s ", fileName.latin1() );
123 QTextStream ts( &file ); 126 Q3TextStream ts( &file );
124 ts << content ; 127 ts << content ;
125 file.close(); 128 file.close();
126 } 129 }
127 130