summaryrefslogtreecommitdiffabout
path: root/libkdepim
Side-by-side diff
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
@@ -20,41 +20,42 @@
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#include <qstringlist.h>
#include <qlineedit.h>
-#include <qlistview.h>
-#include <qheader.h>
+#include <q3listview.h>
+#include <q3header.h>
#include <qpushbutton.h>
#include <qapplication.h>
+#include <QDesktopWidget>
#include "kpimprefs.h"
#include "categoryeditdialog.h"
using namespace KPIM;
CategoryEditDialog::CategoryEditDialog( KPimPrefs *prefs, QWidget* parent,
const char* name, bool modal,
- WFlags fl )
+ Qt::WFlags fl )
: CategoryEditDialog_base( parent, name, modal, fl ),
mPrefs( prefs )
{
mCategories->header()->hide();
QStringList::Iterator it;
bool categoriesExist=false;
for (it = mPrefs->mCustomCategories.begin();
it != mPrefs->mCustomCategories.end(); ++it ) {
- new QListViewItem(mCategories,*it);
+ new Q3ListViewItem(mCategories,*it);
categoriesExist=true;
}
- connect(mCategories,SIGNAL(selectionChanged(QListViewItem *)),
- SLOT(editItem(QListViewItem *)));
+ connect(mCategories,SIGNAL(selectionChanged(Q3ListViewItem *)),
+ SLOT(editItem(Q3ListViewItem *)));
connect(mEdit,SIGNAL(textChanged ( const QString & )),this,SLOT(slotTextChanged(const QString &)));
mButtonRemove->setEnabled(categoriesExist);
mButtonModify->setEnabled(categoriesExist);
#ifndef DESKTOP_VERSION
mButtonOk->hide();
mButtonCancel->hide();
@@ -79,13 +80,13 @@ void CategoryEditDialog::slotTextChanged(const QString &text)
mButtonAdd->setEnabled(!text.isEmpty());
}
void CategoryEditDialog::add()
{
if (!mEdit->text().isEmpty()) {
- new QListViewItem(mCategories,mEdit->text());
+ new Q3ListViewItem(mCategories,mEdit->text());
mEdit->setText("");
mButtonRemove->setEnabled(mCategories->childCount()>0);
mButtonModify->setEnabled(mCategories->childCount()>0);
}
}
@@ -118,23 +119,23 @@ void CategoryEditDialog::slotOk()
}
void CategoryEditDialog::slotApply()
{
mPrefs->mCustomCategories.clear();
- QListViewItem *item = mCategories->firstChild();
+ Q3ListViewItem *item = mCategories->firstChild();
while(item) {
mPrefs->mCustomCategories.append(item->text(0));
item = item->nextSibling();
}
mPrefs->writeConfig();
emit categoryConfigChanged();
}
-void CategoryEditDialog::editItem(QListViewItem *item)
+void CategoryEditDialog::editItem(Q3ListViewItem *item)
{
mEdit->setText(item->text(0));
mButtonRemove->setEnabled(true);
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
@@ -21,48 +21,48 @@
without including the source code for Qt in the source distribution.
*/
#ifndef KPIM_CATEGORYEDITDIALOG_H
#define KPIM_CATEGORYEDITDIALOG_H
#include <categoryeditdialog_base.h>
-#include <qlistview.h>
+#include <q3listview.h>
class KPimPrefs;
namespace KPIM {
- class CategorySelectItem :public QObject, public QCheckListItem
+ class CategorySelectItem :public QObject, public Q3CheckListItem
{
Q_OBJECT
public:
- CategorySelectItem(QListView * parent, const QString & text, Type tt) : QObject( parent ),
- QCheckListItem (parent, text, tt )
+ CategorySelectItem(Q3ListView * parent, const QString & text, Type tt) : QObject( parent ),
+ Q3CheckListItem (parent, text, tt )
{;}
signals:
- void stateChanged( QListViewItem*);
+ void stateChanged( Q3ListViewItem*);
protected:
virtual void stateChange(bool b)
{
- QCheckListItem::stateChange(b);
+ Q3CheckListItem::stateChange(b);
emit stateChanged( this );
}
};
class CategoryEditDialog : public CategoryEditDialog_base
{
Q_OBJECT
public:
CategoryEditDialog( KPimPrefs *prefs, QWidget* parent = 0,
const char* name = 0,
- bool modal = FALSE, WFlags fl = 0 );
+ bool modal = FALSE, Qt::WFlags fl = 0 );
~CategoryEditDialog();
public slots:
void add();
void remove();
void modify();
@@ -72,15 +72,15 @@ class CategoryEditDialog : public CategoryEditDialog_base
void slotApply();
signals:
void categoryConfigChanged();
private slots:
- void editItem(QListViewItem *item);
+ void editItem(Q3ListViewItem *item);
void slotTextChanged(const QString &text);
-
+ private:
KPimPrefs *mPrefs;
};
}
#endif
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
@@ -8,40 +8,44 @@
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "categoryeditdialog_base.h"
#include <qvariant.h>
-#include <qheader.h>
+#include <q3header.h>
#include <qlineedit.h>
-#include <qlistview.h>
+#include <q3listview.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <q3whatsthis.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
+#include <Q3HBoxLayout>
+#include <Q3VBoxLayout>
/*
* Constructs a CategoryEditDialog_base as a child of 'parent', with the
* name 'name' and widget flags set to 'f'.
*
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
*/
-CategoryEditDialog_base::CategoryEditDialog_base( QWidget* parent, const char* name, bool modal, WFlags fl )
+CategoryEditDialog_base::CategoryEditDialog_base( QWidget* parent, const char* name, bool modal, Qt::WFlags fl )
: QDialog( parent, name, true, fl )
{
if ( !name )
setName( "CategoryEditDialog_base" );
- CategoryEditDialog_baseLayout = new QGridLayout( this, 1, 1, 11, 6, "CategoryEditDialog_baseLayout");
+ CategoryEditDialog_baseLayout = new Q3GridLayout( this, 1, 1, 11, 6, "CategoryEditDialog_baseLayout");
mEdit = new QLineEdit( this, "mEdit" );
CategoryEditDialog_baseLayout->addMultiCellWidget( mEdit, 1, 1, 0, 0 );
- Layout13 = new QHBoxLayout( 0, 0, 6, "Layout13");
+ Layout13 = new Q3HBoxLayout( 0, 0, 6, "Layout13");
// mButtonHelp = new QPushButton( this, "mButtonHelp" );
//mButtonHelp->setAutoDefault( TRUE );
//Layout13->addWidget( mButtonHelp );
//QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
//Layout13->addItem( spacer );
@@ -57,18 +61,18 @@ CategoryEditDialog_base::CategoryEditDialog_base( QWidget* parent, const char* n
mButtonCancel = new QPushButton( this, "mButtonCancel" );
mButtonCancel->setAutoDefault( TRUE );
Layout13->addWidget( mButtonCancel );
CategoryEditDialog_baseLayout->addMultiCellLayout( Layout13, 2, 2, 0, 1 );
- mCategories = new QListView( this, "mCategories" );
+ mCategories = new Q3ListView( this, "mCategories" );
mCategories->addColumn( tr2i18n( "Category" ) );
CategoryEditDialog_baseLayout->addWidget( mCategories, 0, 0 );
- layout103 = new QVBoxLayout( 0, 0, 6, "layout103");
+ layout103 = new Q3VBoxLayout( 0, 0, 6, "layout103");
mButtonAdd = new QPushButton( this, "mButtonAdd" );
CategoryEditDialog_baseLayout->addMultiCellWidget(mButtonAdd , 1, 1, 1, 1 );
//layout103->addWidget( mButtonAdd );
mButtonModify = new QPushButton( this, "mButtonModify" );
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
@@ -9,50 +9,54 @@
#ifndef CATEGORYEDITDIALOG_BASE_H
#define CATEGORYEDITDIALOG_BASE_H
#include <qvariant.h>
#include <qdialog.h>
-
-class QVBoxLayout;
-class QHBoxLayout;
-class QGridLayout;
+//Added by qt3to4:
+#include <Q3VBoxLayout>
+#include <Q3GridLayout>
+#include <Q3HBoxLayout>
+
+class Q3VBoxLayout;
+class Q3HBoxLayout;
+class Q3GridLayout;
class QLineEdit;
-class QListView;
-class QListViewItem;
+class Q3ListView;
+class Q3ListViewItem;
class QPushButton;
class CategoryEditDialog_base : public QDialog
{
Q_OBJECT
public:
- CategoryEditDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ CategoryEditDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
~CategoryEditDialog_base();
QLineEdit* mEdit;
QPushButton* mButtonHelp;
QPushButton* mApply;
QPushButton* mButtonOk;
QPushButton* mButtonCancel;
- QListView* mCategories;
+ Q3ListView* mCategories;
QPushButton* mButtonAdd;
QPushButton* mButtonModify;
QPushButton* mButtonRemove;
public slots:
virtual void add();
virtual void modify();
virtual void slotApply();
virtual void remove();
virtual void slotOk();
protected:
- QGridLayout* CategoryEditDialog_baseLayout;
- QHBoxLayout* Layout13;
- QVBoxLayout* layout103;
+ Q3GridLayout* CategoryEditDialog_baseLayout;
+ Q3HBoxLayout* Layout13;
+ Q3VBoxLayout* layout103;
protected slots:
virtual void languageChange();
};
#endif // CATEGORYEDITDIALOG_BASE_H
diff --git a/libkdepim/categoryselectdialog.cpp b/libkdepim/categoryselectdialog.cpp
index 2a9b43e..4f72880 100644
--- a/libkdepim/categoryselectdialog.cpp
+++ b/libkdepim/categoryselectdialog.cpp
@@ -18,30 +18,33 @@
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
-#include <qlistview.h>
+#include <q3listview.h>
#include <qpushbutton.h>
-#include <qheader.h>
-#include <qapp.h>
+#include <q3header.h>
+#include <qapplication.h>
#include <qmessagebox.h>
+//Added by qt3to4:
+#include <QPixmap>
+#include <QDesktopWidget>
#include <kmessagebox.h>
#include "categoryeditdialog.h"
#include "categoryselectdialog.h"
#include "kpimprefs.h"
using namespace KPIM;
CategorySelectDialog::CategorySelectDialog( KPimPrefs *prefs, QWidget* parent,
const char* name,
- bool modal, WFlags fl )
+ bool modal, Qt::WFlags fl )
: CategorySelectDialog_base( parent, name, true, fl ),
mPrefs( prefs )
{
Q_UNUSED( modal );
mColorItem = 0;
mColorEnabled = false;
@@ -78,14 +81,14 @@ void CategorySelectDialog::setCategories()
mCategories->clear();
mCategoryList.clear();
QStringList::Iterator it;
for (it = mPrefs->mCustomCategories.begin();
it != mPrefs->mCustomCategories.end(); ++it ) {
- CategorySelectItem * item = new CategorySelectItem(mCategories,*it,QCheckListItem::CheckBox);
- QObject::connect( item, SIGNAL( stateChanged(QListViewItem *) ), this, SLOT( clicked(QListViewItem *) ) );
+ CategorySelectItem * item = new CategorySelectItem(mCategories,*it,Q3CheckListItem::CheckBox);
+ QObject::connect( item, SIGNAL( stateChanged(Q3ListViewItem *) ), this, SLOT( clicked(Q3ListViewItem *) ) );
}
}
CategorySelectDialog::~CategorySelectDialog()
{
@@ -97,22 +100,22 @@ void CategorySelectDialog::setSelected(const QStringList &selList)
QStringList::ConstIterator it;
QStringList notFound;
bool found = false;
for (it=selList.begin();it!=selList.end();++it) {
//qDebug(" CategorySelectDialog::setSelected(");
- QCheckListItem *item = (QCheckListItem *)mCategories->firstChild();
+ Q3CheckListItem *item = (Q3CheckListItem *)mCategories->firstChild();
while (item) {
if (item->text() == *it) {
item->setOn(true);
if ( ! found )
setColorItem( item );
found = true;
break;
}
- item = (QCheckListItem *)item->nextSibling();
+ item = (Q3CheckListItem *)item->nextSibling();
}
// if ( ! found ) {
//emit updateCategoriesGlobal();
// QMessageBox::information( this, "KO/E: Information!",
// "Categories found, which were not\n"
@@ -134,42 +137,42 @@ void CategorySelectDialog::setColorEnabled()
{
mColorEnabled = true;
mSetColorCat->show();
}
void CategorySelectDialog::setColorCat()
{
- QCheckListItem * newColorItem = (QCheckListItem * )mCategories->currentItem ();
+ Q3CheckListItem * newColorItem = (Q3CheckListItem * )mCategories->currentItem ();
if ( !newColorItem ) {
KMessageBox::error(this,i18n("There is no current item."));
return;
}
if ( !newColorItem->isOn() )
newColorItem->setOn( true );
setColorItem( newColorItem );
}
-void CategorySelectDialog::clicked ( QListViewItem * it )
+void CategorySelectDialog::clicked ( Q3ListViewItem * it )
{
if ( ! it )
return;
- QCheckListItem *i = (QCheckListItem *) it;
+ Q3CheckListItem *i = (Q3CheckListItem *) it;
if ( !i->isOn() && i==mColorItem) {
setColorItem( 0);
- QCheckListItem *item = (QCheckListItem *)mCategories->firstChild();
+ Q3CheckListItem *item = (Q3CheckListItem *)mCategories->firstChild();
while (item) {
if (item->isOn()) {
setColorItem( item );
break;
}
- item = (QCheckListItem *)item->nextSibling();
+ item = (Q3CheckListItem *)item->nextSibling();
}
} else if ( i->isOn() && !mColorItem) {
setColorItem( i);
}
}
-void CategorySelectDialog::setColorItem( QCheckListItem * newColorItem )
+void CategorySelectDialog::setColorItem( Q3CheckListItem * newColorItem )
{
if ( !mColorEnabled )
return;
if ( mColorItem == newColorItem)
return;
if ( mColorItem ) {
@@ -183,22 +186,22 @@ void CategorySelectDialog::setColorItem( QCheckListItem * newColorItem )
mColorItem = newColorItem;
}
}
void CategorySelectDialog::slotApply()
{
QStringList categories;
- QCheckListItem *item = (QCheckListItem *)mCategories->firstChild();
+ Q3CheckListItem *item = (Q3CheckListItem *)mCategories->firstChild();
QString colcat;
while (item) {
if (item->isOn()) {
if ( item == mColorItem)
colcat = item->text();
else
categories.append(item->text());
}
- item = (QCheckListItem *)item->nextSibling();
+ item = (Q3CheckListItem *)item->nextSibling();
}
categories.sort();
if ( ! colcat.isEmpty() )
categories.prepend( colcat );
// QString categoriesStr = categories.join(",");
@@ -217,28 +220,28 @@ void CategorySelectDialog::slotOk()
emit categoriesSelected(mCategoryList.join(","));
QDialog::accept();
}
void CategorySelectDialog::clear()
{
- QCheckListItem *item = (QCheckListItem *)mCategories->firstChild();
+ Q3CheckListItem *item = (Q3CheckListItem *)mCategories->firstChild();
while (item) {
item->setOn(false);
- item = (QCheckListItem *)item->nextSibling();
+ item = (Q3CheckListItem *)item->nextSibling();
}
}
void CategorySelectDialog::updateCategoryConfig()
{
QStringList selected;
- QCheckListItem *item = (QCheckListItem *)mCategories->firstChild();
+ Q3CheckListItem *item = (Q3CheckListItem *)mCategories->firstChild();
while (item) {
if (item->isOn()) {
selected.append(item->text());
}
- item = (QCheckListItem *)item->nextSibling();
+ item = (Q3CheckListItem *)item->nextSibling();
}
setCategories();
setSelected(selected);
}
diff --git a/libkdepim/categoryselectdialog.h b/libkdepim/categoryselectdialog.h
index 680a093..ff7ac58 100644
--- a/libkdepim/categoryselectdialog.h
+++ b/libkdepim/categoryselectdialog.h
@@ -23,23 +23,23 @@
#ifndef KPIM_CATEGORYSELECTDIALOG_H
#define KPIM_CATEGORYSELECTDIALOG_H
#include <categoryselectdialog_base.h>
class KPimPrefs;
-class QCheckListItem;
+class Q3CheckListItem;
namespace KPIM {
class CategorySelectDialog : public CategorySelectDialog_base
{
Q_OBJECT
public:
CategorySelectDialog( KPimPrefs *prefs, QWidget* parent = 0,
const char* name = 0,
- bool modal = FALSE, WFlags fl = 0 );
+ bool modal = FALSE, Qt::WFlags fl = 0 );
~CategorySelectDialog();
void setCategories();
void setColorEnabled();
void setSelected(const QStringList &selList);
@@ -50,24 +50,24 @@ class CategorySelectDialog : public CategorySelectDialog_base
void slotApply();
void clear();
void accept();
void editCategoriesDialog();
void updateCategoryConfig();
void setColorCat();
- void clicked ( QListViewItem * );
+ void clicked ( Q3ListViewItem * );
signals:
void categoriesSelected(const QString &);
void categoriesSelected(const QStringList &);
void editCategories();
private:
bool mColorEnabled;
KPimPrefs *mPrefs;
QStringList mCategoryList;
- QCheckListItem *mColorItem;
- void setColorItem( QCheckListItem * );
+ Q3CheckListItem *mColorItem;
+ void setColorItem( Q3CheckListItem * );
class CategorySelectDialogPrivate;
CategorySelectDialogPrivate *d;
};
}
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
@@ -8,51 +8,54 @@
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "categoryselectdialog_base.h"
#include <qvariant.h>
-#include <qheader.h>
-#include <qlistview.h>
+#include <q3header.h>
+#include <q3listview.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <q3whatsthis.h>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
+#include <Q3HBoxLayout>
/*
* Constructs a CategorySelectDialog_base as a child of 'parent', with the
* name 'name' and widget flags set to 'f'.
*
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
*/
-CategorySelectDialog_base::CategorySelectDialog_base( QWidget* parent, const char* name, bool modal, WFlags fl )
+CategorySelectDialog_base::CategorySelectDialog_base( QWidget* parent, const char* name, bool modal, Qt::WFlags fl )
: QDialog( parent, name, modal, fl )
{
if ( !name )
setName( "CategorySelectDialog_base" );
- CategorySelectDialog_baseLayout = new QVBoxLayout( this, 11, 6, "CategorySelectDialog_baseLayout");
+ CategorySelectDialog_baseLayout = new Q3VBoxLayout( this, 11, 6, "CategorySelectDialog_baseLayout");
- mCategories = new QListView( this, "mCategories" );
+ mCategories = new Q3ListView( this, "mCategories" );
mCategories->addColumn( i18n( "Category" ) );
CategorySelectDialog_baseLayout->addWidget( mCategories );
mSetColorCat = new QPushButton( this, "msetColor" );
CategorySelectDialog_baseLayout->addWidget( mSetColorCat );
- Layout12 = new QHBoxLayout( 0, 0, 4, "Layout12");
+ Layout12 = new Q3HBoxLayout( 0, 0, 4, "Layout12");
mClear = new QPushButton( this, "mClear" );
Layout12->addWidget( mClear );
// QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
//Layout12->addItem( spacer );
mButtonEdit = new QPushButton( this, "mButtonEdit" );
Layout12->addWidget( mButtonEdit );
CategorySelectDialog_baseLayout->addLayout( Layout12 );
- Layout11 = new QHBoxLayout( 0, 0, 4, "Layout11");
+ Layout11 = new Q3HBoxLayout( 0, 0, 4, "Layout11");
//mButtonHelp = new QPushButton( this, "mButtonHelp" );
//Layout11->addWidget( mButtonHelp );
//QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
// Layout11->addItem( spacer_2 );
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
@@ -9,29 +9,33 @@
#ifndef CATEGORYSELECTDIALOG_BASE_H
#define CATEGORYSELECTDIALOG_BASE_H
#include <qvariant.h>
#include <qdialog.h>
-
-class QVBoxLayout;
-class QHBoxLayout;
-class QGridLayout;
-class QListView;
-class QListViewItem;
+//Added by qt3to4:
+#include <Q3VBoxLayout>
+#include <Q3GridLayout>
+#include <Q3HBoxLayout>
+
+class Q3VBoxLayout;
+class Q3HBoxLayout;
+class Q3GridLayout;
+class Q3ListView;
+class Q3ListViewItem;
class QPushButton;
class CategorySelectDialog_base : public QDialog
{
Q_OBJECT
public:
- CategorySelectDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ CategorySelectDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
~CategorySelectDialog_base();
- QListView* mCategories;
+ Q3ListView* mCategories;
QPushButton* mClear;
QPushButton* mButtonEdit;
QPushButton* mButtonHelp;
QPushButton* mApply;
QPushButton* mButtonOk;
QPushButton* mButtonCancel;
@@ -40,15 +44,15 @@ public:
public slots:
virtual void clear();
virtual void slotApply();
virtual void slotOk();
protected:
- QVBoxLayout* CategorySelectDialog_baseLayout;
- QHBoxLayout* Layout12;
- QHBoxLayout* Layout11;
+ Q3VBoxLayout* CategorySelectDialog_baseLayout;
+ Q3HBoxLayout* Layout12;
+ Q3HBoxLayout* Layout11;
protected slots:
virtual void languageChange();
};
#endif // CATEGORYSELECTDIALOG_BASE_H
diff --git a/libkdepim/externalapphandler.cpp b/libkdepim/externalapphandler.cpp
index f376e6c..3fc548a 100644
--- a/libkdepim/externalapphandler.cpp
+++ b/libkdepim/externalapphandler.cpp
@@ -36,13 +36,15 @@ $Id$
#ifndef DESKTOP_VERSION
#include <qpe/qpeapplication.h>
#include <qtopia/qcopenvelope_qws.h>
#else
#include <qapplication.h>
-#include <qprocess.h>
+#include <q3process.h>
+//Added by qt3to4:
+#include <Q3CString>
#endif
#include <kstaticdeleter.h>
#include <kmessagebox.h>
@@ -120,13 +122,13 @@ void QCopTransferItem::setSourceChannel(const QString& sourceChannel)
if ( !sourceChannel.isEmpty())
_sourceChannel = sourceChannel;
}
/*********************************************************************************/
-bool QCopTransferItem::appMessage( const QCString& cmsg, const QByteArray& data )
+bool QCopTransferItem::appMessage( const Q3CString& cmsg, const QByteArray& data )
{
// copied from old mail2
/*
static int ii = 0;
@@ -143,13 +145,13 @@ bool QCopTransferItem::appMessage( const QCString& cmsg, const QByteArray& data
// qDebug("QCopTransferItem- QCOP message received: %s ", cmsg.data() );
//we are in the target and get a request from the source
if ( (_sourceMessage + _sourceMessageParameters) == cmsg.data())
{
- QDataStream stream( data, IO_ReadOnly );
+ QDataStream stream( const_cast<QByteArray*>(&data), QIODevice::ReadOnly );
QString sourceChannel;
QString uid;
QString param1;
QString param2;
@@ -223,19 +225,19 @@ bool QCopMapTransferItem::sendMessageToSource(const QString& uid, const QMap<QSt
#endif
}
/*********************************************************************************/
-bool QCopMapTransferItem::appMessage( const QCString& cmsg, const QByteArray& data )
+bool QCopMapTransferItem::appMessage( const Q3CString& cmsg, const QByteArray& data )
{
bool res = QCopTransferItem::appMessage( cmsg, data );
if (res == false)
{
- QDataStream stream( data, IO_ReadOnly );
+ QDataStream stream( const_cast<QByteArray*>(&data), QIODevice::ReadOnly );
// qDebug("QCopMapTransferItem- QCOP message received: %s ", cmsg.data() );
//we are in the source and get an answer from the target
if ((_targetMessage + _targetMessageParameters) == cmsg.data())
{
@@ -302,22 +304,22 @@ bool QCopListTransferItem::sendMessageToSource(const QString& uid, const QString
#endif
}
/*********************************************************************************/
-bool QCopListTransferItem::appMessage( const QCString& cmsg, const QByteArray& data )
+bool QCopListTransferItem::appMessage( const Q3CString& cmsg, const QByteArray& data )
{
bool res = QCopTransferItem::appMessage( cmsg, data );
#ifdef DEBUG_EXT_APP_HANDLER
qDebug("1QCopListTransferItem- QCOP message received: %s ", cmsg.data() );
#endif
if (res == false)
{
- QDataStream stream( data, IO_ReadOnly );
+ QDataStream stream( const_cast<QByteArray*>(&data), QIODevice::ReadOnly );
#ifdef DEBUG_EXT_APP_HANDLER
qDebug("2QCopListTransferItem- QCOP message received: %s ", cmsg.data() );
#endif
//we are in the source and get an answer from the target
@@ -515,15 +517,15 @@ void ExternalAppHandler::addDefaultAppItem(Types type, int id, const QString& la
DefaultAppItem* dai = new DefaultAppItem(type, id, label, channel, message, parameter, message2, parameter2);
// qDebug("%d %d %s %s ", type, id, label.latin1(), channel.latin1() );
mDefaultItems.append(dai);
}
-QList<DefaultAppItem> ExternalAppHandler::getAvailableDefaultItems(Types type)
+Q3PtrList<DefaultAppItem> ExternalAppHandler::getAvailableDefaultItems(Types type)
{
- QList<DefaultAppItem> list;
+ Q3PtrList<DefaultAppItem> list;
DefaultAppItem* dai;
for ( dai=mDefaultItems.first(); dai != 0; dai=mDefaultItems.next() )
{
if (dai->_type == type)
@@ -743,13 +745,13 @@ bool ExternalAppHandler::mailToMultipleContacts( const QString& emails, const QS
#ifdef DEBUG_EXT_APP_HANDLER
qDebug("4Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message2.latin1());
qDebug("passing emailadresses(%s), attachmenturls(%s) as parameters in the form %s to QCopEnvelope", emails.latin1() , urls.latin1(), parameters2.latin1());
#endif
qDebug("%s --- %s %s --- %s %s", channel.latin1(), message.latin1(),message2.latin1(), parameters.latin1(), parameters2.latin1() );
//KMessageBox::sorry( 0, message2 );
- QProcess * proc = new QProcess( this );
+ Q3Process * proc = new Q3Process( this );
int i = 0;
proc->addArgument( channel );
if ( message.find (" " ) > 0 ) {
QStringList list = QStringList::split( " ", message );
int i = 0;
@@ -769,13 +771,13 @@ bool ExternalAppHandler::mailToMultipleContacts( const QString& emails, const QS
QString arg = "to='%1'";
arg = arg.arg( emails ) + ","+parameters2;;
//KMessageBox::sorry( 0,arg );
//qDebug("2add%sdd ",arg.latin1() );
proc->addArgument( arg);
- proc->launch("");
+ proc->launch(QString());
#endif
return true;
}
/**************************************************************************
@@ -828,13 +830,13 @@ bool ExternalAppHandler::mailToOneContact( const QString& name, const QString& e
//US we need no names in the To field. The emailadresses are enough
passParameters(&e, parameters, name, emailadress);
#else // DESKTOP_VERSION
//KMessageBox::sorry( 0,channel );
- QProcess * proc = new QProcess( this );
+ Q3Process * proc = new Q3Process( this );
proc->addArgument( channel );
if ( message.find (" " ) > 0 ) {
QStringList list = QStringList::split( " ", message );
int i = 0;
while ( i < list.count ( ) ) {
//qDebug("add%sdd ",list[i].latin1() );
@@ -847,13 +849,13 @@ bool ExternalAppHandler::mailToOneContact( const QString& name, const QString& e
}
parameters = translateMessage(parameters, name, emailadress);
//KMessageBox::information(0,parameters);
proc->addArgument( parameters );
- proc->launch("");
+ proc->launch(QString());
#endif
return true;
}
/**************************************************************************
@@ -1229,13 +1231,13 @@ void ExternalAppHandler::passParameters(QCopEnvelope* e, const QString& paramete
/**************************************************************************
*
**************************************************************************/
-void ExternalAppHandler::appMessage( const QCString& cmsg, const QByteArray& data )
+void ExternalAppHandler::appMessage( const Q3CString& cmsg, const QByteArray& data )
{
qDebug("ExternalAppHandler::appMessage %s %x", cmsg.data(), this);
if ( cmsg == "nextView()" ) {
qDebug("nextView()");
QTimer::singleShot( 0, this, SIGNAL ( nextView() ));
return;
diff --git a/libkdepim/externalapphandler.h b/libkdepim/externalapphandler.h
index b899ad7..3247fe4 100644
--- a/libkdepim/externalapphandler.h
+++ b/libkdepim/externalapphandler.h
@@ -31,12 +31,15 @@ $Id$
#ifndef EXTERNALAPPHANDLER_H
#define EXTERNALAPPHANDLER_H
#include <qobject.h>
#include <qlist.h>
#include <qmap.h>
+#include <Q3PtrList>
+//Added by qt3to4:
+#include <Q3CString>
class QCopEnvelope;
class ExternalAppHandler;
class QCopTransferItem : public QObject
@@ -47,13 +50,13 @@ class QCopTransferItem : public QObject
QCopTransferItem();
bool sendMessageToTarget(const QString& uid, const QString& param1 = QString::null, const QString& param2 = QString::null, const QString& param3 = QString::null);
void setSourceChannel(const QString& sourceChannel);
- virtual bool appMessage( const QCString& msg, const QByteArray& data );
+ virtual bool appMessage( const Q3CString& msg, const QByteArray& data );
signals:
void receivedMessageFromSource(const QString& sourceChannel, const QString& uid);
void receivedMessageFromSource(const QString& sourceChannel, const QString& uid, const QString& param1);
void receivedMessageFromSource(const QString& sourceChannel, const QString& uid, const QString& param1, const QString& param2);
@@ -80,13 +83,13 @@ class QCopMapTransferItem : public QCopTransferItem
public:
QCopMapTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage);
bool sendMessageToSource(const QString& uid, const QMap<QString,QString>& nameEmailMap);
- virtual bool appMessage( const QCString& msg, const QByteArray& data );
+ virtual bool appMessage( const Q3CString& msg, const QByteArray& data );
signals:
void receivedMessageFromTarget(const QString& uid, const QMap<QString,QString>& nameEmailMap);
};
@@ -101,13 +104,13 @@ class QCopListTransferItem : public QCopTransferItem
public:
QCopListTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage);
~QCopListTransferItem();
bool sendMessageToSource(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3, const QStringList& list4, const QStringList& list5, const QStringList& list6);
- virtual bool appMessage( const QCString& msg, const QByteArray& data );
+ virtual bool appMessage( const Q3CString& msg, const QByteArray& data );
signals:
void receivedMessageFromTarget(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3, const QStringList& list4 , const QStringList& list5, const QStringList& list6);
};
@@ -222,17 +225,17 @@ class ExternalAppHandler : public QObject
const QStringList& assembledNameList, const QStringList& uidList);
//loadConfig clears the cache and checks again if the applications are available or not
void loadConfig();
- QList<DefaultAppItem> getAvailableDefaultItems(Types);
+ Q3PtrList<DefaultAppItem> getAvailableDefaultItems(Types);
DefaultAppItem* getDefaultItem(Types, int);
public slots:
- void appMessage( const QCString& msg, const QByteArray& data );
+ void appMessage( const Q3CString& msg, const QByteArray& data );
signals:
void callContactdialog();
void nextView();
void doRingSync();
@@ -259,13 +262,13 @@ class ExternalAppHandler : public QObject
const QStringList& emailList, const QStringList& assembledNameList,
const QStringList& uidList);
private:
ExternalAppHandler();
- QList<DefaultAppItem> mDefaultItems;
+ Q3PtrList<DefaultAppItem> mDefaultItems;
Availability mEmailAppAvailable;
Availability mPhoneAppAvailable;
Availability mFaxAppAvailable;
Availability mSMSAppAvailable;
Availability mPagerAppAvailable;
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
@@ -27,12 +27,14 @@ Copyright (c) 2004 Ulf Schenk
$Id$
*/
#include <qlayout.h>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
#include <kdebug.h>
//#include <klocale.h>
//#include <stdlib.h>
#include "kdepimconfigwidget.h"
@@ -51,13 +53,13 @@ extern "C"
#endif
KCMKdePimConfig::KCMKdePimConfig(QWidget *parent, const char *name )
: KCModule( KPimGlobalPrefs::instance(), parent, name )
{
//abort();
- QVBoxLayout *layout = new QVBoxLayout( this );
+ Q3VBoxLayout *layout = new Q3VBoxLayout( this );
mConfigWidget = new KDEPIMConfigWidget( (KPimGlobalPrefs*)getPreferences(), this, "KDEPIMConfigWidget" );
layout->addWidget( mConfigWidget );
layout->setSpacing( 0 );
layout->setMargin( 0 );
connect( mConfigWidget, SIGNAL( changed( bool ) ), SIGNAL( changed( bool ) ) );
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
@@ -28,22 +28,27 @@ Copyright (c) 2004 Ulf Schenk
$Id$
*/
#include <qlayout.h>
#include <qtabwidget.h>
#include <qcombobox.h>
-#include <qgroupbox.h>
+#include <q3groupbox.h>
#include <qlabel.h>
#include <qlineedit.h>
-#include <qbuttongroup.h>
+#include <q3buttongroup.h>
#include <qcheckbox.h>
#include <qfile.h>
-#include <qvbox.h>
+#include <q3vbox.h>
#include <qdir.h>
#include <qregexp.h>
#include <qspinbox.h>
+#include <QDesktopWidget>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
+#include <Q3GridLayout>
+#include <Q3VBoxLayout>
#include <kdialog.h>
#include <kprefsdialog.h>
#include <klocale.h>
#include <kglobalsettings.h>
#include <kdateedit.h>
@@ -98,13 +103,13 @@ KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent,
mExternalAppsMap.insert(ExternalAppHandler::SMS, i18n("SMS"));
mExternalAppsMap.insert(ExternalAppHandler::FAX, i18n("Fax"));
mExternalAppsMap.insert(ExternalAppHandler::PAGER, i18n("Pager"));
mExternalAppsMap.insert(ExternalAppHandler::SIP, i18n("SIP"));
- QVBoxLayout *topLayout = new QVBoxLayout( this, 0,
+ Q3VBoxLayout *topLayout = new Q3VBoxLayout( this, 0,
KDialog::spacingHint() );
tabWidget = new QTabWidget( this );
topLayout->addWidget( tabWidget );
@@ -118,41 +123,41 @@ KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent,
void KDEPIMConfigWidget::showTimeZoneTab()
{
tabWidget->setCurrentPage ( 3 ) ;
}
void KDEPIMConfigWidget::setupBackupTab()
{
- QVBox *colorPage = new QVBox( this );
+ Q3VBox *colorPage = new Q3VBox( this );
tabWidget->addTab( colorPage, i18n( "Backup" ) );
QWidget* topFrame = new QWidget( colorPage );
- QVBoxLayout *topLayout = new QVBoxLayout(topFrame);
+ Q3VBoxLayout *topLayout = new Q3VBoxLayout(topFrame);
KPrefsWidBool *sb = addWidBool(i18n("Backup enabled"),
&(KPimGlobalPrefs::instance()->mBackupEnabled),topFrame);
topLayout->addWidget((QWidget*)sb->checkBox());
QWidget* bupFrame = new QWidget( topFrame );
topLayout->addWidget((bupFrame));
QObject::connect ( sb->checkBox(), SIGNAL (toggled ( bool ) ), bupFrame, SLOT ( setEnabled( bool ) ) );
- QVBoxLayout *bupLayout = new QVBoxLayout(bupFrame);
+ Q3VBoxLayout *bupLayout = new Q3VBoxLayout(bupFrame);
sb = addWidBool(i18n("Use standard backup dir"),
&(KPimGlobalPrefs::instance()->mBackupUseDefaultDir),bupFrame);
bupLayout->addWidget((QWidget*)sb->checkBox());
mBackupUrl = new KURLRequester( bupFrame );
mBackupUrl->setPathIsDir();
mBackupUrl->setURL( KGlobalSettings::backupDataDir() );
QObject::connect ( sb->checkBox(), SIGNAL (toggled ( bool ) ), mBackupUrl ,SLOT ( setDisabled( bool ) ) );
bupLayout->addWidget( mBackupUrl );
mBackupUrl->setEnabled( !KPimGlobalPrefs::instance()->mBackupUseDefaultDir );
bupFrame->setEnabled( KPimGlobalPrefs::instance()->mBackupEnabled );
- QHBox *dummy = new QHBox(bupFrame);
+ Q3HBox *dummy = new Q3HBox(bupFrame);
new QLabel(i18n("Number of Backups:"),dummy);
mBackupNumbersSpin = new QSpinBox(1,21,1,dummy);
new QLabel(i18n(" "),dummy);
bupLayout->addWidget( dummy );
- dummy = new QHBox(bupFrame);
+ dummy = new Q3HBox(bupFrame);
new QLabel(i18n("Make backup every "),dummy);
mBackupDayCountSpin = new QSpinBox(1,28,1,dummy);
new QLabel(i18n(" days"),dummy);
new QLabel(i18n(" "),dummy);
bupLayout->addWidget( dummy );
QString localKdeDir;
@@ -164,24 +169,24 @@ void KDEPIMConfigWidget::setupBackupTab()
KPimGlobalPrefs::instance()->mBackupUseDefaultDir = true;
}
}
void KDEPIMConfigWidget::setupStoreTab()
{
- QVBox *colorPage = new QVBox( this );
+ Q3VBox *colorPage = new Q3VBox( this );
tabWidget->addTab( colorPage, i18n( "Colors" ) );
QWidget* cw = new QWidget( colorPage );
KPrefsWidColor *holidayColor =
addWidColor(i18n("Alternating background of list views"),
&(KPimGlobalPrefs::instance()->mAlternateColor),cw);
- QHBoxLayout *topLayout = new QHBoxLayout(cw);
+ Q3HBoxLayout *topLayout = new Q3HBoxLayout(cw);
topLayout->addWidget(holidayColor->label());
topLayout->addWidget( (QWidget* )holidayColor->button());
- QVBox *storePage = new QVBox( this );
+ Q3VBox *storePage = new Q3VBox( this );
if ( QApplication::desktop()->height() > 240 )
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 );
new QLabel( i18n("<b>New data storage dir:</b>"), storePage );
mStoreUrl = new KURLRequester( storePage );
mStoreUrl->setPathIsDir();
mStoreUrl->setURL( KGlobal::dirs()->localkdedir() );
@@ -197,13 +202,13 @@ void KDEPIMConfigWidget::setupStoreTab()
qDebug("Reading config from %s ", confFile.latin1());
}
}
#endif
new QLabel( i18n("New dirs are created automatically"), storePage );
- QHBox *bb = new QHBox( storePage );
+ Q3HBox *bb = new Q3HBox( storePage );
QPushButton * pb;
if ( QApplication::desktop()->width() < 640 )
pb = new QPushButton ( i18n("Save"), bb );
else
pb = new QPushButton ( i18n("Save settings"), bb );
connect(pb, SIGNAL( clicked() ), this, SLOT ( saveStoreSettings() ) );
@@ -267,13 +272,13 @@ void KDEPIMConfigWidget::saveStoreSettings()
saveStoreSettings();
}
}
void KDEPIMConfigWidget::setupExternalAppTab()
{
QWidget *externalAppsPage = new QWidget( this );
- QVBoxLayout* layout = new QVBoxLayout( externalAppsPage, KDialog::marginHintSmall(),
+ Q3VBoxLayout* layout = new Q3VBoxLayout( externalAppsPage, KDialog::marginHintSmall(),
KDialog::spacingHintSmall() );
mExternalApps = new QComboBox( externalAppsPage );
QMap<ExternalAppHandler::Types, QString>::Iterator it;
for( it = mExternalAppsMap.begin(); it != mExternalAppsMap.end(); ++it )
@@ -282,14 +287,14 @@ void KDEPIMConfigWidget::setupExternalAppTab()
layout->addWidget( mExternalApps );
connect( mExternalApps, SIGNAL( activated( int ) ),
this, SLOT (externalapp_changed( int ) ) );
- mExternalAppGroupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Used Mail Client" ), externalAppsPage );
- QGridLayout *boxLayout = new QGridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" );
+ mExternalAppGroupBox = new Q3GroupBox( 0, Qt::Vertical, i18n( "Used Mail Client" ), externalAppsPage );
+ Q3GridLayout *boxLayout = new Q3GridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" );
mExternalAppGroupBox->layout()->setMargin(4);
mClient = new QComboBox( mExternalAppGroupBox );
boxLayout->addMultiCellWidget( mClient, 0, 0, 0, 1 );
connect( mClient, SIGNAL( activated( int ) ),
@@ -349,13 +354,13 @@ void KDEPIMConfigWidget::setupExternalAppTab()
}
void KDEPIMConfigWidget::setupLocaleDateTab()
{
QWidget *topFrame = new QWidget( this );
- QGridLayout *topLayout = new QGridLayout( topFrame, 3, 2);
+ Q3GridLayout *topLayout = new Q3GridLayout( topFrame, 3, 2);
topLayout->setSpacing(KDialog::spacingHintSmall());
topLayout->setMargin(KDialog::marginHintSmall());
int iii = 0;
@@ -417,13 +422,13 @@ void KDEPIMConfigWidget::setupLocaleDateTab()
}
void KDEPIMConfigWidget::setupLocaleTab()
{
QWidget *topFrame = new QWidget( this );
- QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
+ Q3GridLayout *topLayout = new Q3GridLayout(topFrame,4,2);
topLayout->setSpacing(KDialog::spacingHint());
topLayout->setMargin(KDialog::marginHint());
int iii = 0;
KPrefsWidRadios *syncPrefsGroup =
addWidRadios(i18n("Language:(needs restart)"),&(KPimGlobalPrefs::instance()->mPreferredLanguage),topFrame);
@@ -439,13 +444,13 @@ void KDEPIMConfigWidget::setupLocaleTab()
topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1);
++iii;
tabWidget->addTab( topFrame, i18n( "Language" ) );
topFrame = new QWidget( this );
- topLayout = new QGridLayout(topFrame,4,2);
+ topLayout = new Q3GridLayout(topFrame,4,2);
topLayout->setSpacing(KDialog::spacingHint());
topLayout->setMargin(KDialog::marginHint());
iii = 0;
syncPrefsGroup =
addWidRadios(i18n("Time Format(nr):"),&(KPimGlobalPrefs::instance()->mPreferredTime),topFrame);
@@ -468,25 +473,25 @@ void KDEPIMConfigWidget::setupLocaleTab()
}
void KDEPIMConfigWidget::setupTimeZoneTab()
{
QWidget *topFrame;
- QGridLayout *topLayout ;
+ Q3GridLayout *topLayout ;
topFrame = new QWidget( this );
- topLayout = new QGridLayout( topFrame, 5, 2);
+ topLayout = new Q3GridLayout( topFrame, 5, 2);
topLayout->setSpacing(KDialog::spacingHintSmall());
topLayout->setMargin(KDialog::marginHintSmall());
- QHBox *timeZoneBox = new QHBox( topFrame );
+ Q3HBox *timeZoneBox = new Q3HBox( topFrame );
topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 );
new QLabel( i18n("Timezone:"), timeZoneBox );
mTimeZoneCombo = new QComboBox( timeZoneBox );
if ( QApplication::desktop()->width() < 300 ) {
mTimeZoneCombo->setMaximumWidth(150);
@@ -547,13 +552,13 @@ void KDEPIMConfigWidget::setupTimeZoneTab()
connect( mEndDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) );
connect( mTimeZoneCombo, SIGNAL( activated( int ) ), this, SLOT (modified() ) );
tabWidget->addTab( topFrame, i18n( "Time Zone" ) );
topFrame = new QWidget( this );
- topLayout = new QGridLayout( topFrame, 3, 2);
+ topLayout = new Q3GridLayout( topFrame, 3, 2);
topLayout->setSpacing(KDialog::spacingHintSmall());
topLayout->setMargin(KDialog::marginHintSmall());
tabWidget->addTab( topFrame, i18n( "Fonts" ) );
QLabel* labb = new QLabel( i18n("Global application font for all apps:"), topFrame );
topLayout->addMultiCellWidget(labb,0,0,0,2);
@@ -708,13 +713,13 @@ void KDEPIMConfigWidget::updateClientWidgets()
// update group box
mExternalAppGroupBox->setTitle(i18n( "Used %1 Client" ).arg(it.data()));
//update the entries in the client combobox
mClient->clear();
- QList<DefaultAppItem> items = ExternalAppHandler::instance()->getAvailableDefaultItems(mCurrentApp);
+ Q3PtrList<DefaultAppItem> items = ExternalAppHandler::instance()->getAvailableDefaultItems(mCurrentApp);
DefaultAppItem* dai;
for ( dai=items.first(); dai != 0; dai=items.next() )
{
mClient->insertItem( i18n(dai->_label), dai->_id );
if (dai->_id == mCurrentClient)
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
@@ -31,20 +31,22 @@ $Id$
#ifndef KDEPIMCONFIGWIDGET_H
#define KDEPIMCONFIGWIDGET_H
#include <kprefswidget.h>
#include <kio/kfile/kurlrequester.h>
#include <qmap.h>
+//Added by qt3to4:
+#include <QLabel>
#include "externalapphandler.h"
class QComboBox;
class QLineEdit;
class KPimGlobalPrefs;
-class QGroupBox;
+class Q3GroupBox;
class QTabWidget;
class KDateEdit;
class KDEPIMConfigWidget : public KPrefsWidget
{
Q_OBJECT
@@ -103,13 +105,13 @@ class KDEPIMConfigWidget : public KPrefsWidget
// KListView *mExtensionView;
// QCheckBox *mNameParsing;
// QCheckBox *mViewsSingleClickBox;
// QPushButton *mConfigureButton;
QComboBox* mExternalApps;
- QGroupBox* mExternalAppGroupBox;
+ Q3GroupBox* mExternalAppGroupBox;
QComboBox* mClient;
QLineEdit* mChannel;
QLineEdit* mMessage;
QLineEdit* mParameters;
diff --git a/libkdepim/kdateedit.cpp b/libkdepim/kdateedit.cpp
index bf38479..28c88d4 100644
--- a/libkdepim/kdateedit.cpp
+++ b/libkdepim/kdateedit.cpp
@@ -24,27 +24,31 @@
#include <qapplication.h>
#include <qevent.h>
#include <qlineedit.h>
#include <qpixmap.h>
#include <qpushbutton.h>
+//Added by qt3to4:
+#include <Q3Frame>
+#include <QKeyEvent>
#include <kdatepicker.h>
#include <kdebug.h>
#include <kglobal.h>
#include <kiconloader.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <knotifyclient.h>
#include <qpalette.h>
+#include <QDesktopWidget>
#include "kdateedit.h"
//#include "kdateedit.moc"
KDateEdit::KDateEdit(QWidget *parent, const char *name, bool withoutDP )
- : QHBox(parent, name)
+ : Q3HBox(parent, name)
{
dateFormShort = true;
withoutDp = withoutDP;
mDateEdit = new QLineEdit(this);
mDateEdit->setText(KGlobal::locale()->formatDate(QDate::currentDate(),dateFormShort));
setFocusProxy(mDateEdit);
@@ -69,27 +73,27 @@ KDateEdit::KDateEdit(QWidget *parent, const char *name, bool withoutDP )
mDateButton = new QPushButton(this);
mDateButton->setPixmap(pixmap);
QPixmap pixmap2 = SmallIcon("today_small");
QPushButton* nowButton = new QPushButton(this);
nowButton->setPixmap(pixmap2);
- mDateFrame = new QVBox(0,0,WType_Popup);
+ mDateFrame = new Q3VBox(0,0,Qt::WType_Popup);
// mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised);
- mDateFrame->setFrameStyle( QFrame::WinPanel |QFrame::Raised );
+ mDateFrame->setFrameStyle( Q3Frame::WinPanel |Q3Frame::Raised );
mDateFrame->setLineWidth(3);
mDateFrame->hide();
mDatePicker = new KDatePicker(mDateFrame,QDate::currentDate());
connect(mDatePicker,SIGNAL(dateEntered(QDate)),SLOT(setDate(QDate)));
connect(mDatePicker,SIGNAL(dateEntered(QDate)),SIGNAL(dateChanged(QDate)));
connect(mDatePicker,SIGNAL(dateSelected(QDate)),SLOT(setDate(QDate)));
connect(mDatePicker,SIGNAL(dateSelected(QDate)),SIGNAL(dateChanged(QDate)));
connect(mDatePicker,SIGNAL(dateSelected(QDate)),mDateFrame,SLOT(hide()));
connect(mDateButton,SIGNAL(clicked()),SLOT(toggleDatePicker()));
connect(nowButton,SIGNAL(clicked()),SLOT(goToNow()));
- mDateButton->setFocusPolicy( QWidget::NoFocus );
+ mDateButton->setFocusPolicy( Qt::NoFocus );
mDateButton->setAutoDefault( false );
//mDateFrame->resize( 400, 300 );
}
connect(mDateEdit,SIGNAL(returnPressed()),SLOT(lineEnterPressed()));
connect(mDateEdit,SIGNAL(textChanged(const QString &)),
@@ -222,41 +226,41 @@ void KDateEdit::setDate( QDate date,int *cpos,const int key ,const bool dateForm
// set date
switch ( dateForm.at(begin + 1).latin1() ) {
case 'd':
case 'a':
case 'A':
- if(key == Key_Up) {
+ if(key == Qt::Key_Up) {
setDate( date.addDays( 1 ) );
}
- else if(key == Key_Down) {
+ else if(key == Qt::Key_Down) {
setDate( date.addDays( -1 ) );
}
maxDay = readDate().day();
break;
case 'm':
case 'b':
case 'B':
- if(key == Key_Up) {
+ if(key == Qt::Key_Up) {
int year = ((date.month()+1)>12)?date.year()+1:date.year();
int month = ((date.month()+1)>12)?1:date.month()+1;
int day = (QDate(year,month,1).daysInMonth()<maxDay)?QDate(year,month,1).daysInMonth():maxDay;
setDate( QDate( year, month, day ) );
- } else if(key == Key_Down) {
+ } else if(key == Qt::Key_Down) {
int year = ((date.month()-1)<1)?date.year()-1:date.year();
int month = ((date.month()-1)<1)?12:date.month()-1;
int day = (QDate(year,month,1).daysInMonth()<maxDay)?QDate(year,month,1).daysInMonth():maxDay;
setDate( QDate( year, month, day ) );
}
break;
case 'y':
case 'Y':
- if(key == Key_Up) {
+ if(key == Qt::Key_Up) {
setDate( QDate( date.year() + 1, date.month() , date.day()) );
}
- else if(key == Key_Down) {
+ else if(key == Qt::Key_Down) {
setDate( QDate( date.year() - 1, date.month() , date.day()) );
}
break;
/* default:
if(key == Key_Up) {
setDate( date.addDays( 1 ) );
@@ -341,45 +345,45 @@ void KDateEdit::keyPressEvent(QKeyEvent *e)
{
QDate date = readDate();
int cpos = mDateEdit->cursorPosition();
switch(e->key())
{
- case Key_Escape:
+ case Qt::Key_Escape:
mDateEdit->deselect();
- case Key_Tab:
- QHBox::keyPressEvent(e);
+ case Qt::Key_Tab:
+ Q3HBox::keyPressEvent(e);
break;
- case Key_Up:
+ case Qt::Key_Up:
// when date invalid then set to currend and return
if(!date.isValid()) {
date = QDate::currentDate();
setDate(date);
mDateEdit->setCursorPosition(cpos);
emit(dateChanged(date));
QString text = i18n( "You entered an invalid date!\n Date changed to current date." );
KMessageBox::information( 0, text );
return;
}
- setDate(date, &cpos, Key_Up, dateFormShort);
+ setDate(date, &cpos, Qt::Key_Up, dateFormShort);
break;
- case Key_Down:
+ case Qt::Key_Down:
// when date invalid then set to current and return
if(!date.isValid()) {
date = QDate::currentDate();
setDate(date);
mDateEdit->setCursorPosition(cpos);
emit(dateChanged(date));
QString text = i18n( "You entered an invalid date!\n Date changed to current date." );
KMessageBox::information( 0, text );
return;
}
- setDate(date, &cpos, Key_Down, dateFormShort);
+ setDate(date, &cpos, Qt::Key_Down, dateFormShort);
break;
default:
- QHBox::keyPressEvent(e);
+ Q3HBox::keyPressEvent(e);
break;
} // switch
mDateEdit->setCursorPosition(cpos);
}
void KDateEdit::setSelect( int from, int to )
diff --git a/libkdepim/kdateedit.h b/libkdepim/kdateedit.h
index 2d8c452..38eacde 100644
--- a/libkdepim/kdateedit.h
+++ b/libkdepim/kdateedit.h
@@ -21,16 +21,19 @@
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#ifndef KDATEEDIT_H
#define KDATEEDIT_H
-#include <qhbox.h>
-#include <qvbox.h>
+#include <q3hbox.h>
+#include <q3vbox.h>
#include <qdatetime.h>
#include <qmap.h>
+//Added by qt3to4:
+#include <QKeyEvent>
+#include <QEvent>
class QLineEdit;
class QPushButton;
class QObject;
class QEvent;
class KDatePicker;
@@ -46,13 +49,13 @@ class KDateValidator;
* are supported (in the native language): tomorrow, yesturday, today,
* monday, tuesday, wednesday, thursday, friday, saturday, sunday.
*
* @author Cornelius Schumacher <schumacher@kde.org>
* @author Mike Pilone <mpilone@slac.com>
*/
-class KDateEdit : public QHBox
+class KDateEdit : public Q3HBox
{
Q_OBJECT
public:
KDateEdit(QWidget *parent=0, const char *name=0, bool withoutDP = false );
virtual ~KDateEdit();
@@ -125,13 +128,13 @@ class KDateEdit : public QHBox
bool mTextChanged;
bool mHandleInvalid;
QPushButton *mDateButton;
QLineEdit *mDateEdit;
KDatePicker *mDatePicker;
- QVBox *mDateFrame;
+ Q3VBox *mDateFrame;
int maxDay;
bool withoutDp;
protected:
virtual void keyPressEvent(QKeyEvent *qke);
void setSelect ( int, int );
diff --git a/libkdepim/kdatepicker.cpp b/libkdepim/kdatepicker.cpp
index 68ef943..28b65cf 100644
--- a/libkdepim/kdatepicker.cpp
+++ b/libkdepim/kdatepicker.cpp
@@ -20,30 +20,34 @@
#include "kdatepicker.h"
#include <kglobal.h>
#include <kapplication.h>
#include <klocale.h>
#include <kiconloader.h>
-#include <qframe.h>
+#include <q3frame.h>
#include <qpainter.h>
#include <qdialog.h>
#include <qtoolbutton.h>
#include <qfont.h>
#include <qapplication.h>
#include <qlineedit.h>
#include <qvalidator.h>
+//Added by qt3to4:
+#include <QResizeEvent>
+#include <QKeyEvent>
+#include <QDesktopWidget>
#include <kdebug.h>
#include <knotifyclient.h>
#include <kglobalsettings.h>
#include "kdatetbl.h"
#include "kdateedit.h"
//#include "kdatepicker.moc"
KDatePicker::KDatePicker(QWidget *parent, QDate dt, const char *name)
- : QFrame(parent,name),
+ : Q3Frame(parent,name),
yearForward(new QToolButton(this)),
yearBackward(new QToolButton(this)),
monthForward(new QToolButton(this)),
monthBackward(new QToolButton(this)),
selectMonth(new QToolButton(this)),
selectYear(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
@@ -17,14 +17,17 @@
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#ifndef MICROKDE_KDATEPICKER_H
#define MICROKDE_KDATEPICKER_H
#include <qdatetime.h>
-#include <qframe.h>
+#include <q3frame.h>
#include <qevent.h>
+//Added by qt3to4:
+#include <QResizeEvent>
+#include <QKeyEvent>
class QLineEdit;
class QToolButton;
class KDateValidator;
class KDateTable;
class KDateEdit;
@@ -45,13 +48,13 @@ class KDateEdit;
*
* @version $Id$
* @author Tim Gilman, Mirko Boehm
*
* @short A date selection widget.
**/
-class KDatePicker: public QFrame
+class KDatePicker: public Q3Frame
{
Q_OBJECT
public:
/** The usual constructor. The given date will be displayed
* initially.
**/
diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp
index 9c28425..3677e87 100644
--- a/libkdepim/kpimglobalprefs.cpp
+++ b/libkdepim/kpimglobalprefs.cpp
@@ -35,13 +35,13 @@ $Id$
#include <kglobalsettings.h>
#include <kstaticdeleter.h>
#include <qregexp.h>
#include <qfile.h>
#include <stdlib.h>
-#include <qtextstream.h>
+#include <q3textstream.h>
#include <qapplication.h>
#include "kpimglobalprefs.h"
KPimGlobalPrefs *KPimGlobalPrefs::sInstance = 0;
static KStaticDeleter<KPimGlobalPrefs> staticDeleterGP;
@@ -139,15 +139,15 @@ void KPimGlobalPrefs::setGlobalConfig()
fileName = fileName+"usertranslation.txt";
else if ( mPreferredLanguage == 2 )
fileName = fileName+"frenchtranslation.txt";
else if ( mPreferredLanguage == 3 )
fileName = fileName+"italiantranslation.txt";
QFile file( fileName );
- if (file.open( IO_ReadOnly ) ) {
- QTextStream ts( &file );
- ts.setEncoding( QTextStream::Latin1 );
+ if (file.open( QIODevice::ReadOnly ) ) {
+ Q3TextStream ts( &file );
+ ts.setEncoding( Q3TextStream::Latin1 );
//ts.setCodec( QTextCodec::latin1 );
QString text = ts.read();
file.close();
text.replace( QRegExp("\\\\n"), "\n" );
QString line;
QString we;
@@ -155,13 +155,13 @@ void KPimGlobalPrefs::setGlobalConfig()
int br = 0;
int nbr;
nbr = text.find ( "},", br );
line = text.mid( br, nbr - br );
br = nbr+1;
int se, ee, st, et;
- mLocaleDict = new QDict<QString>;
+ mLocaleDict = new Q3Dict<QString>;
mLocaleDict->setAutoDelete( true );
QString end = "{ \"\",\"\" }";
while ( (line != end) && (br > 1) ) {
//qDebug("%d *%s* ", br, line.latin1());
se = line.find("\"")+1;
et = line.findRev("\"",-1);
diff --git a/libkdepim/kpimglobalprefs.h b/libkdepim/kpimglobalprefs.h
index 94ac8ae..01f5ab0 100644
--- a/libkdepim/kpimglobalprefs.h
+++ b/libkdepim/kpimglobalprefs.h
@@ -29,13 +29,13 @@ $Id$
*/
#ifndef KPIMGLOBALPREFS_H
#define KPIMGLOBALPREFS_H
#include "kprefs.h"
-#include <qdict.h>
+#include <q3dict.h>
class KPimGlobalPrefs : public KPrefs
{
public:
void setGlobalConfig();
@@ -82,13 +82,13 @@ class KPimGlobalPrefs : public KPrefs
};
private:
KPimGlobalPrefs( const QString &name = QString::null );
static KPimGlobalPrefs *sInstance;
- QDict<QString> *mLocaleDict;
+ Q3Dict<QString> *mLocaleDict;
public:
//US I copied the following "locale" settings from KOPrefs
int mPreferredDate;
QString mUserDateFormatLong;
diff --git a/libkdepim/kprefsdialog.cpp b/libkdepim/kprefsdialog.cpp
index 6dc741d..358acbd 100644
--- a/libkdepim/kprefsdialog.cpp
+++ b/libkdepim/kprefsdialog.cpp
@@ -22,29 +22,30 @@
*/
// $Id$
#include <qlayout.h>
#include <qlabel.h>
-#include <qgroupbox.h>
-#include <qbuttongroup.h>
+#include <q3groupbox.h>
+#include <q3buttongroup.h>
#include <qlineedit.h>
#include <qfont.h>
#include <qslider.h>
#include <qfile.h>
-#include <qtextstream.h>
-#include <qvbox.h>
-#include <qhbox.h>
+#include <q3textstream.h>
+#include <q3vbox.h>
+#include <q3hbox.h>
#include <qspinbox.h>
#include <qdatetime.h>
-#include <qframe.h>
+#include <q3frame.h>
#include <qcombobox.h>
#include <qcheckbox.h>
#include <qradiobutton.h>
#include <qpushbutton.h>
#include <qapplication.h>
+#include <QDesktopWidget>
#include <kcolorbutton.h>
#include <kdebug.h>
#include <klocale.h>
#include <kglobal.h>
#include <kglobalsettings.h>
@@ -125,13 +126,13 @@ KPrefsDialogWidFont::KPrefsDialogWidFont(const QString &sampleText,const QString
{
mReference = reference;
mLabel = new QLabel(labelText, parent);
mPreview = new QLabel(sampleText,parent);
- mPreview->setFrameStyle(QFrame::Panel|QFrame::Sunken);
+ mPreview->setFrameStyle(Q3Frame::Panel|Q3Frame::Sunken);
mButton = new QPushButton(i18n("Choose..."), parent);
connect(mButton,SIGNAL(clicked()),SLOT(selectFont()));
mPreview->setMaximumHeight( QApplication::desktop()->height() / 12 );
mPreview->setMaximumWidth( (QApplication::desktop()->width() / 2)-10 );
}
@@ -209,25 +210,25 @@ QSpinBox *KPrefsDialogWidTime::spinBox()
KPrefsDialogWidRadios::KPrefsDialogWidRadios(const QString &text,int *reference,
QWidget *parent)
{
mReference = reference;
- mBox = new QButtonGroup(1,Qt::Horizontal,text,parent);
+ mBox = new Q3ButtonGroup(1,Qt::Horizontal,text,parent);
}
KPrefsDialogWidRadios::~KPrefsDialogWidRadios()
{
}
void KPrefsDialogWidRadios::addRadio(const QString &text)
{
new QRadioButton(text,mBox);
}
-QButtonGroup *KPrefsDialogWidRadios::groupBox()
+Q3ButtonGroup *KPrefsDialogWidRadios::groupBox()
{
return mBox;
}
void KPrefsDialogWidRadios::readConfig()
{
diff --git a/libkdepim/kprefsdialog.h b/libkdepim/kprefsdialog.h
index 52ec809..cc95dd4 100644
--- a/libkdepim/kprefsdialog.h
+++ b/libkdepim/kprefsdialog.h
@@ -21,25 +21,27 @@
without including the source code for Qt in the source distribution.
*/
#ifndef _KPREFSDIALOG_H
#define _KPREFSDIALOG_H
// $Id$
-#include <qptrlist.h>
+#include <q3ptrlist.h>
#include <qlineedit.h>
+//Added by qt3to4:
+#include <QLabel>
#include <kdialogbase.h>
class KPrefs;
class KPrefsDialog;
class KColorButton;
class QCheckBox;
class QLabel;
class QSpinBox;
-class QButtonGroup;
+class Q3ButtonGroup;
/**
@short Base class for widgets used by @ref KPrefsDialog.
@author Cornelius Schumacher
@see KPrefsDialog
@@ -255,21 +257,21 @@ class KPrefsDialogWidRadios : public KPrefsDialogWid
*/
void addRadio(const QString &text);
/**
Return the box widget used by this widget.
*/
- QButtonGroup *groupBox();
+ Q3ButtonGroup *groupBox();
void readConfig();
void writeConfig();
private:
int *mReference;
- QButtonGroup *mBox;
+ Q3ButtonGroup *mBox;
};
/**
@short Widget for string settings in @ref KPrefsDialog.
@@ -436,13 +438,13 @@ class KPrefsDialog : public KDialogBase
/** Implement this to write custom configuration widgets. */
virtual void usrWriteConfig() {}
private:
KPrefs *mPrefs;
- QPtrList<KPrefsDialogWid> mPrefsWids;
+ Q3PtrList<KPrefsDialogWid> mPrefsWids;
};
#include "kcmconfigs/kdepimconfigwidget.h"
class KPimPrefsGlobalDialog : public KPrefsDialog
{
diff --git a/libkdepim/kprefswidget.cpp b/libkdepim/kprefswidget.cpp
index f6a0b38..51431e2 100644
--- a/libkdepim/kprefswidget.cpp
+++ b/libkdepim/kprefswidget.cpp
@@ -22,29 +22,30 @@
*/
// $Id$
#include <qlayout.h>
#include <qlabel.h>
-#include <qgroupbox.h>
-#include <qbuttongroup.h>
+#include <q3groupbox.h>
+#include <q3buttongroup.h>
#include <qlineedit.h>
#include <qfont.h>
#include <qslider.h>
#include <qfile.h>
-#include <qtextstream.h>
-#include <qvbox.h>
-#include <qhbox.h>
+#include <q3textstream.h>
+#include <q3vbox.h>
+#include <q3hbox.h>
#include <qspinbox.h>
#include <qdatetime.h>
-#include <qframe.h>
+#include <q3frame.h>
#include <qcombobox.h>
#include <qcheckbox.h>
#include <qradiobutton.h>
#include <qpushbutton.h>
#include <qapplication.h>
+#include <QDesktopWidget>
#include <kcolorbutton.h>
#include <kdebug.h>
#include <klocale.h>
#include <kglobal.h>
#include <kfontdialog.h>
@@ -128,13 +129,13 @@ KPrefsWidFont::KPrefsWidFont(const QString &sampleText,const QString &labelText,
{
mReference = reference;
mLabel = new QLabel(labelText, parent);
mPreview = new QLabel(sampleText,parent);
- mPreview->setFrameStyle(QFrame::Panel|QFrame::Sunken);
+ mPreview->setFrameStyle(Q3Frame::Panel|Q3Frame::Sunken);
mButton = new QPushButton(i18n("Choose..."), parent);
connect(mButton,SIGNAL(clicked()),SLOT(selectFont()));
mPreview->setMaximumHeight( QApplication::desktop()->height() / 12 );
mPreview->setMaximumWidth( (QApplication::desktop()->width() / 2)-10 );
}
@@ -215,26 +216,26 @@ QSpinBox *KPrefsWidTime::spinBox()
KPrefsWidRadios::KPrefsWidRadios(const QString &text,int *reference,
QWidget *parent)
{
mReference = reference;
- mBox = new QButtonGroup(1,Qt::Horizontal,text,parent);
+ mBox = new Q3ButtonGroup(1,Qt::Horizontal,text,parent);
connect( mBox, SIGNAL( clicked(int)), SIGNAL( modified() ) );
}
KPrefsWidRadios::~KPrefsWidRadios()
{
}
void KPrefsWidRadios::addRadio(const QString &text)
{
new QRadioButton(text,mBox);
}
-QButtonGroup *KPrefsWidRadios::groupBox()
+Q3ButtonGroup *KPrefsWidRadios::groupBox()
{
return mBox;
}
void KPrefsWidRadios::readConfig()
{
diff --git a/libkdepim/kprefswidget.h b/libkdepim/kprefswidget.h
index 8543a39..9de1be5 100644
--- a/libkdepim/kprefswidget.h
+++ b/libkdepim/kprefswidget.h
@@ -22,25 +22,27 @@
*/
// $Id$
#ifndef _KPREFSWIDGET_H
#define _KPREFSWIDGET_H
-#include <qptrlist.h>
+#include <q3ptrlist.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qwidget.h>
+//Added by qt3to4:
+#include <QLabel>
class KPrefs;
class KColorButton;
class QCheckBox;
class QLabel;
class QSpinBox;
-class QButtonGroup;
+class Q3ButtonGroup;
/**
@short Base class for widgets used by @ref KPrefsDialog.
@author Cornelius Schumacher
@see KPrefsDialog
@@ -262,21 +264,21 @@ class KPrefsWidRadios : public KPrefsWid
*/
void addRadio(const QString &text);
/**
Return the box widget used by this widget.
*/
- QButtonGroup *groupBox();
+ Q3ButtonGroup *groupBox();
void readConfig();
void writeConfig();
private:
int *mReference;
- QButtonGroup *mBox;
+ Q3ButtonGroup *mBox;
};
/**
@short Widget for string settings in @ref KPrefsDialog.
@@ -446,10 +448,10 @@ class KPrefsWidget : public QWidget
/** Implement this to write custom configuration widgets. */
virtual void usrWriteConfig() {}
private:
KPrefs *mPrefs;
- QPtrList<KPrefsWid> mPrefsWids;
+ Q3PtrList<KPrefsWid> mPrefsWids;
};
#endif
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index 5708dfc..c844627 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -32,41 +32,44 @@
#include "ksyncprofile.h"
#include "ksyncprefsdialog.h"
#include "kpimprefs.h"
#include <kmessagebox.h>
#include <qdir.h>
-#include <qprogressbar.h>
-#include <qpopupmenu.h>
+#include <q3progressbar.h>
+#include <q3popupmenu.h>
#include <qpushbutton.h>
#include <qradiobutton.h>
-#include <qbuttongroup.h>
+#include <q3buttongroup.h>
#include <qtimer.h>
#include <qmessagebox.h>
#include <qapplication.h>
#include <qlineedit.h>
#include <qdialog.h>
#include <qlayout.h>
#include <qtextcodec.h>
#include <qlabel.h>
#include <qcheckbox.h>
#include <qapplication.h>
+#include <QDesktopWidget>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
#include <klocale.h>
#include <kglobal.h>
#include <kconfig.h>
#include <kfiledialog.h>
QDateTime KSyncManager::mRequestedSyncEvent;
-KSyncManager::KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, QPopupMenu* syncmenu)
+KSyncManager::KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, Q3PopupMenu* syncmenu)
: QObject(), mPrefs(prefs ), mParent(parent),mImplementation(implementation), mTargetApp(ta), mSyncMenu(syncmenu)
{
mServerSocket = 0;
- bar = new QProgressBar ( 1, 0 );
+ bar = new Q3ProgressBar ( 1, 0 );
bar->setCaption ("");
mWriteBackInPast = 2;
}
@@ -86,13 +89,13 @@ void KSyncManager::fillSyncMenu()
{
if ( mSyncMenu->count() )
mSyncMenu->clear();
mSyncMenu->insertItem( i18n("Configure..."), 0 );
mSyncMenu->insertSeparator();
- QPopupMenu *clearMenu = new QPopupMenu ( mSyncMenu );
+ Q3PopupMenu *clearMenu = new Q3PopupMenu ( mSyncMenu );
mSyncMenu->insertItem( i18n("Remove sync info"),clearMenu, 5000 );
clearMenu->insertItem( i18n("For all profiles"), 1 );
clearMenu->insertSeparator();
connect ( clearMenu, SIGNAL( activated ( int ) ), this, SLOT (slotClearMenu( int ) ) );
mSyncMenu->insertSeparator();
if ( mServerSocket == 0 ) {
@@ -352,13 +355,13 @@ void KSyncManager::enableQuick( bool ask )
{
bool autoStart;
bool changed = false;
if ( ask ) {
QDialog dia ( 0, "input-dialog", true );
QLineEdit lab ( &dia );
- QVBoxLayout lay( &dia );
+ Q3VBoxLayout lay( &dia );
lab.setText( mPrefs->mPassiveSyncPort );
lay.setMargin(7);
lay.setSpacing(7);
int po = 9197+mTargetApp;
QLabel label ( i18n("Port number (Default: %1)\nValid range from 1 to 65535").arg(po), &dia );
lay.addWidget( &label);
@@ -801,13 +804,13 @@ void KSyncManager::syncRemote( KSyncProfile* prof, bool ask)
return;
}
bool KSyncManager::edit_pisync_options()
{
QDialog dia( mParent, "dia", true );
dia.setCaption( i18n("Pi-Sync options for device: " ) +mCurrentSyncDevice );
- QVBoxLayout lay ( &dia );
+ Q3VBoxLayout lay ( &dia );
lay.setSpacing( 5 );
lay.setMargin( 3 );
QLabel lab1 ( i18n("Password for remote access:"), &dia);
lay.addWidget( &lab1 );
QLineEdit le1 (&dia );
lay.addWidget( &le1 );
@@ -835,14 +838,14 @@ bool KSyncManager::edit_pisync_options()
}
bool KSyncManager::edit_sync_options()
{
QDialog dia( mParent, "dia", true );
dia.setCaption( i18n("Device: " ) +mCurrentSyncDevice );
- QButtonGroup gr ( 1, Qt::Horizontal, i18n("Sync preferences"), &dia);
- QVBoxLayout lay ( &dia );
+ Q3ButtonGroup gr ( 1, Qt::Horizontal, i18n("Sync preferences"), &dia);
+ Q3VBoxLayout lay ( &dia );
lay.setSpacing( 2 );
lay.setMargin( 3 );
lay.addWidget(&gr);
QRadioButton loc ( i18n("Take local entry on conflict"), &gr );
QRadioButton rem ( i18n("Take remote entry on conflict"), &gr );
QRadioButton newest( i18n("Take newest entry on conflict"), &gr );
@@ -888,13 +891,13 @@ bool KSyncManager::edit_sync_options()
QString KSyncManager::getPassword( )
{
QString retfile = "";
QDialog dia ( mParent, "input-dialog", true );
QLineEdit lab ( &dia );
lab.setEchoMode( QLineEdit::Password );
- QVBoxLayout lay( &dia );
+ Q3VBoxLayout lay( &dia );
lay.setMargin(7);
lay.setSpacing(7);
lay.addWidget( &lab);
dia.setFixedSize( 230,50 );
dia.setCaption( i18n("Enter password") );
QPushButton pb ( "OK", &dia);
@@ -1331,13 +1334,13 @@ void KSyncManager::readFileFromSocket()
if ( syncOK )
mParent->topLevelWidget()->setCaption( i18n("Pi-Sync succesful!") );
mPisyncFinished = true;
}
}
-KServerSocket:: KServerSocket ( QString pw, Q_UINT16 port, int backlog, QObject * parent, const char * name ) : QServerSocket( port, backlog, parent, name )
+KServerSocket:: KServerSocket ( QString pw, Q_UINT16 port, int backlog, QObject * parent, const char * name ) : Q3ServerSocket( port, backlog, parent, name )
{
mPendingConnect = 0;
mPassWord = pw;
mSocket = 0;
mSyncActionDialog = 0;
blockRC = false;
@@ -1347,13 +1350,13 @@ void KServerSocket::waitForSocketFinish()
{
if ( mSocket ) {
//qDebug("KSS:: waiting for finish operation");
QTimer::singleShot( 250, this , SLOT ( waitForSocketFinish()));
return;
}
- mSocket = new QSocket( this );
+ mSocket = new Q3Socket( this );
connect( mSocket , SIGNAL(readyRead()), this, SLOT(readClient()) );
connect( mSocket , SIGNAL(delayedCloseFinished()), this, SLOT(discardClient()) );
mSocket->setSocket( mPendingConnect );
mPendingConnect = 0;
}
void KServerSocket::newConnection ( int socket )
@@ -1369,13 +1372,13 @@ void KServerSocket::newConnection ( int socket )
return;
qDebug("KSS::newConnection Socket deleted! ");
delete mSocket;
mSocket = 0;
}
mPendingConnect = 0;
- mSocket = new QSocket( this );
+ mSocket = new Q3Socket( this );
connect( mSocket , SIGNAL(readyRead()), this, SLOT(readClient()) );
connect( mSocket , SIGNAL(delayedCloseFinished()), this, SLOT(discardClient()) );
mSocket->setSocket( socket );
}
void KServerSocket::discardClient()
@@ -1459,17 +1462,17 @@ void KServerSocket::displayErrorMessage()
KMessageBox::error( 0, i18n("Got receive file request\nwith invalid password"), i18n("Pi-Sync Error"));
mErrorMessage = 0;
}
}
void KServerSocket::error_connect( QString errmess )
{
- QTextStream os( mSocket );
- os.setEncoding( QTextStream::Latin1 );
+ Q3TextStream os( mSocket );
+ os.setEncoding( Q3TextStream::Latin1 );
os << errmess ;
mSocket->close();
- if ( mSocket->state() == QSocket::Idle ) {
+ if ( mSocket->state() == Q3Socket::Idle ) {
QTimer::singleShot( 0, this , SLOT ( discardClient()));
}
}
void KServerSocket::end_connect()
{
delete mSyncActionDialog;
@@ -1481,13 +1484,13 @@ void KServerSocket::send_file()
if ( mSyncActionDialog )
delete mSyncActionDialog;
mSyncActionDialog = new QDialog ( 0, "input-dialog", true );
mSyncActionDialog->setCaption(i18n("Received sync request"));
QLabel* label = new QLabel( i18n("Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog."), mSyncActionDialog );
label->setAlignment ( Qt::AlignHCenter );
- QVBoxLayout* lay = new QVBoxLayout( mSyncActionDialog );
+ Q3VBoxLayout* lay = new Q3VBoxLayout( mSyncActionDialog );
lay->addWidget( label);
lay->setMargin(7);
lay->setSpacing(7);
if ( KSyncManager::mRequestedSyncEvent.isValid() ) {
int secs = QDateTime::currentDateTime().secsTo( KSyncManager::mRequestedSyncEvent );
//secs = 333;
@@ -1533,33 +1536,33 @@ void KServerSocket::send_file()
mSyncActionDialog->raise();
emit request_file(mResource);
//emit request_file();
qApp->processEvents();
QString fileName = mFileName;
QFile file( fileName );
- if (!file.open( IO_ReadOnly ) ) {
+ if (!file.open( QIODevice::ReadOnly ) ) {
mErrorMessage = 0;
end_connect();
error_connect("ERROR_FI\r\n\r\n");
return ;
}
mSyncActionDialog->setCaption( i18n("Sending file...") );
- QTextStream ts( &file );
- ts.setEncoding( QTextStream::Latin1 );
+ Q3TextStream ts( &file );
+ ts.setEncoding( Q3TextStream::Latin1 );
- QTextStream os( mSocket );
- os.setEncoding( QTextStream::Latin1 );
+ Q3TextStream os( mSocket );
+ os.setEncoding( Q3TextStream::Latin1 );
while ( ! ts.atEnd() ) {
os << ts.readLine() << "\r\n";
}
os << "\r\n";
//os << ts.read();
file.close();
mSyncActionDialog->setCaption( i18n("Waiting for synced file...") );
mSocket->close();
- if ( mSocket->state() == QSocket::Idle )
+ if ( mSocket->state() == Q3Socket::Idle )
QTimer::singleShot( 10, this , SLOT ( discardClient()));
}
void KServerSocket::get_file()
{
mSyncActionDialog->setCaption( i18n("Receiving synced file...") );
@@ -1585,31 +1588,31 @@ void KServerSocket::readBackFileFromSocket()
//qDebug("waitformore ");
QTimer::singleShot( 100, this , SLOT (readBackFileFromSocket( ) ));
return;
}
QString fileName = mFileName;
QFile file ( fileName );
- if (!file.open( IO_WriteOnly ) ) {
+ if (!file.open( QIODevice::WriteOnly ) ) {
delete mSyncActionDialog;
mSyncActionDialog = 0;
qDebug("KSS:Error open read back file ");
piFileString = "";
emit file_received( false, mResource);
emit file_received( false);
blockRC = false;
return ;
}
// mView->setLoadedFileVersion(QDateTime::currentDateTime().addSecs( -1));
- QTextStream ts ( &file );
- ts.setEncoding( QTextStream::Latin1 );
+ Q3TextStream ts ( &file );
+ ts.setEncoding( Q3TextStream::Latin1 );
mSyncActionDialog->setCaption( i18n("Writing file to disk...") );
ts << piFileString;
mSocket->close();
- if ( mSocket->state() == QSocket::Idle )
+ if ( mSocket->state() == Q3Socket::Idle )
QTimer::singleShot( 10, this , SLOT ( discardClient()));
file.close();
piFileString = "";
emit file_received( true, mResource );
emit file_received( true);
delete mSyncActionDialog;
@@ -1645,23 +1648,23 @@ void KCommandSocket::sendFileRequest()
tlw->setCaption( i18n("Connected! Sending request for remote file ...") );
mConnectProgress.hide();
mConnectCount = 300;mConnectMax = 300;
mConnectProgress.setCaption( i18n("Pi-Sync: Connected!") );
mConnectProgress.setLabelText( i18n("Waiting for remote file...") );
mTimerSocket->start( 100, true );
- QTextStream os( mSocket );
- os.setEncoding( QTextStream::Latin1 );
+ Q3TextStream os( mSocket );
+ os.setEncoding( Q3TextStream::Latin1 );
QString curDt = " " +KGlobal::locale()->formatDateTime(QDateTime::currentDateTime().addSecs(-1),true, true,KLocale::ISODate );
os << "GET " << mPassWord << curDt << " " << mRemoteResource << "\r\n\r\n";
}
void KCommandSocket::readFile( QString fn )
{
if ( !mSocket ) {
- mSocket = new QSocket( this );
+ mSocket = new Q3Socket( this );
//qDebug("KCS: read file - new socket");
connect( mSocket, SIGNAL(readyRead()), this, SLOT(startReadFileFromSocket()) );
connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) );
connect( mSocket, SIGNAL(connected ()), this, SLOT(sendFileRequest() ));
}
mFileString = "";
@@ -1693,44 +1696,44 @@ void KCommandSocket::updateConnectDialog()
deleteSocket();
}
void KCommandSocket::writeFile( QString fileName )
{
if ( !mSocket ) {
- mSocket = new QSocket( this );
+ mSocket = new Q3Socket( this );
connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) );
connect( mSocket, SIGNAL(connected ()), this, SLOT(writeFileToSocket()) );
}
mFileName = fileName ;
mConnectCount = 30;mConnectMax = 30;
mTimerSocket->start( 1000, true );
mSocket->connectToHost( mHost, mPort );
}
void KCommandSocket::writeFileToSocket()
{
mTimerSocket->stop();
QFile file2( mFileName );
- if (!file2.open( IO_ReadOnly ) ) {
+ if (!file2.open( QIODevice::ReadOnly ) ) {
mConnectProgress.hide();
mConnectCount = -1;
mRetVal= errorW;
mSocket->close();
- if ( mSocket->state() == QSocket::Idle )
+ if ( mSocket->state() == Q3Socket::Idle )
QTimer::singleShot( 10, this , SLOT ( deleteSocket()));
return ;
}
mConnectProgress.setTotalSteps ( file2.size() );
mConnectProgress.show();
int count = 0;
mConnectProgress.setLabelText( i18n("Sending back synced file...") );
mConnectProgress.setProgress( count );
mConnectProgress.blockSignals( true );
- QTextStream ts2( &file2 );
- ts2.setEncoding( QTextStream::Latin1 );
- QTextStream os2( mSocket );
- os2.setEncoding( QTextStream::Latin1 );
+ Q3TextStream ts2( &file2 );
+ ts2.setEncoding( Q3TextStream::Latin1 );
+ Q3TextStream os2( mSocket );
+ os2.setEncoding( Q3TextStream::Latin1 );
os2 << "PUT " << mPassWord << " " << mRemoteResource << "\r\n\r\n";;
int byteCount = 0;
int byteMax = file2.size()/53;
while ( ! ts2.atEnd() ) {
qApp->processEvents();
if ( byteCount > byteMax ) {
@@ -1745,28 +1748,28 @@ void KCommandSocket::writeFileToSocket()
file2.close();
mConnectProgress.hide();
mConnectCount = -1;
os2 << "\r\n";
mRetVal= successW;
mSocket->close();
- if ( mSocket->state() == QSocket::Idle )
+ if ( mSocket->state() == Q3Socket::Idle )
QTimer::singleShot( 10, this , SLOT ( deleteSocket()));
mConnectProgress.blockSignals( false );
}
void KCommandSocket::sendStop()
{
if ( !mSocket ) {
- mSocket = new QSocket( this );
+ mSocket = new Q3Socket( this );
connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) );
}
mSocket->connectToHost( mHost, mPort );
- QTextStream os2( mSocket );
- os2.setEncoding( QTextStream::Latin1 );
+ Q3TextStream os2( mSocket );
+ os2.setEncoding( Q3TextStream::Latin1 );
os2 << "STOP\r\n\r\n";
mSocket->close();
- if ( mSocket->state() == QSocket::Idle )
+ if ( mSocket->state() == Q3Socket::Idle )
QTimer::singleShot( 10, this , SLOT ( deleteSocket()));
}
void KCommandSocket::startReadFileFromSocket()
{
if ( ! mFirst )
@@ -1826,31 +1829,31 @@ void KCommandSocket::readFileFromSocket()
}
mTimerSocket->stop();
mConnectCount = -1;
mConnectProgress.hide();
QString fileName = mFileName;
QFile file ( fileName );
- if (!file.open( IO_WriteOnly ) ) {
+ if (!file.open( QIODevice::WriteOnly ) ) {
mFileString = "";
mRetVal = errorR;
qDebug("KSS:Error open temp sync file for writing: %s",fileName.latin1() );
deleteSocket();
return ;
}
// mView->setLoadedFileVersion(QDateTime::currentDateTime().addSecs( -1));
- QTextStream ts ( &file );
- ts.setEncoding( QTextStream::Latin1 );
+ Q3TextStream ts ( &file );
+ ts.setEncoding( Q3TextStream::Latin1 );
ts << mFileString;
file.close();
mFileString = "";
mRetVal = successR;
mSocket->close();
// if state is not idle, deleteSocket(); is called via
// connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) );
- if ( mSocket->state() == QSocket::Idle )
+ if ( mSocket->state() == Q3Socket::Idle )
deleteSocket();
}
void KCommandSocket::deleteSocket()
{
//qDebug("KCommandSocket::deleteSocket() ");
diff --git a/libkdepim/ksyncmanager.h b/libkdepim/ksyncmanager.h
index 71d17e9..32c6557 100644
--- a/libkdepim/ksyncmanager.h
+++ b/libkdepim/ksyncmanager.h
@@ -21,30 +21,32 @@
*/
#ifndef _KSYNCMANAGER_H
#define _KSYNCMANAGER_H
#include <qobject.h>
#include <qstring.h>
-#include <qsocket.h>
+#include <q3socket.h>
#include <qdatetime.h>
-#include <qserversocket.h>
-#include <qtextstream.h>
+#include <q3serversocket.h>
+#include <q3textstream.h>
#include <qregexp.h>
-#include <qprogressdialog.h>
+#include <q3progressdialog.h>
+//Added by qt3to4:
+#include <Q3PopupMenu>
#include <kdialog.h>
-class QPopupMenu;
+class Q3PopupMenu;
class KSyncProfile;
class KPimPrefs;
class QWidget;
class KSyncManager;
class KSyncInterface;
-class QProgressBar;
+class Q3ProgressBar;
-class KServerSocket : public QServerSocket
+class KServerSocket : public Q3ServerSocket
{
Q_OBJECT
public:
KServerSocket ( QString password, Q_UINT16 port, int backlog = 0, QObject * parent=0, const char * name=0 );
@@ -71,13 +73,13 @@ class KServerSocket : public QServerSocket
bool blockRC;
void send_file();
void get_file();
void end_connect();
void error_connect( QString );
QDialog* mSyncActionDialog;
- QSocket* mSocket;
+ Q3Socket* mSocket;
QString mPassWord;
QString mFileName;
QTime piTime;
QString piFileString;
};
@@ -105,13 +107,13 @@ class KCommandSocket : public QObject
private :
QString mRemoteResource;
int mConnectCount;
int mConnectMax;
KProgressDialog mConnectProgress;
QWidget* tlw;
- QSocket* mSocket;
+ Q3Socket* mSocket;
QString mPassWord;
Q_UINT16 mPort;
QString mHost;
QString mFileName;
QTimer* mTimerSocket;
int mRetVal;
@@ -129,13 +131,13 @@ class KSyncManager : public QObject
public:
enum TargetApp {
KOPI = 0,
KAPI = 1,
PWMPI = 2 };
- KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, QPopupMenu* syncmenu);
+ KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, Q3PopupMenu* syncmenu);
~KSyncManager() ;
void multiSync( bool askforPrefs );
bool blockSave() { return mBlockSaveFlag; }
void setBlockSave(bool sa) { mBlockSaveFlag = sa; }
void setDefaultFileName( QString s) ;
@@ -216,14 +218,14 @@ class KSyncManager : public QObject
QString mCurrentResourceLocal;
QString mCurrentResourceRemote;
bool mBlockSaveFlag;
QWidget* mParent;
KSyncInterface* mImplementation;
TargetApp mTargetApp;
- QPopupMenu* mSyncMenu;
- QProgressBar* bar;
+ Q3PopupMenu* mSyncMenu;
+ Q3ProgressBar* bar;
bool mSyncWithDesktop;
private slots:
void displayErrorPort();
void confSync();
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp
index 2b87298..fd5bbca 100644
--- a/libkdepim/ksyncprefsdialog.cpp
+++ b/libkdepim/ksyncprefsdialog.cpp
@@ -20,34 +20,38 @@
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#include <qlayout.h>
#include <qlabel.h>
-#include <qgroupbox.h>
-#include <qbuttongroup.h>
+#include <q3groupbox.h>
+#include <q3buttongroup.h>
#include <qlineedit.h>
#include <qfont.h>
#include <qslider.h>
#include <qfile.h>
#include <qdir.h>
-#include <qtextstream.h>
+#include <q3textstream.h>
#include <qcombobox.h>
-#include <qvbox.h>
-#include <qhbox.h>
+#include <q3vbox.h>
+#include <q3hbox.h>
#include <qspinbox.h>
#include <qdatetime.h>
#include <qcheckbox.h>
#include <qradiobutton.h>
#include <qpushbutton.h>
-#include <qstrlist.h>
+#include <q3strlist.h>
#include <qapplication.h>
#include <qlayout.h>
-#include <qscrollview.h>
-#include <qvgroupbox.h>
-#include <qhgroupbox.h>
+#include <q3scrollview.h>
+#include <q3vgroupbox.h>
+#include <q3hgroupbox.h>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
+#include <Q3GridLayout>
+#include <Q3Frame>
#include <kcolorbutton.h>
#include <kdebug.h>
#include <klocale.h>
#include <kglobal.h>
#include <kfontdialog.h>
@@ -86,29 +90,29 @@ KSyncPrefsDialog::~KSyncPrefsDialog()
}
void KSyncPrefsDialog::setupSyncAlgTab()
{
QLabel * lab;
//QFrame *page = addPage(i18n("Sync Prefs"),0,0);
- QVBox * mainbox = new QVBox( this );
- QScrollView* sv = new QScrollView( mainbox );
- QHBoxLayout * lay = new QHBoxLayout( this );
+ Q3VBox * mainbox = new Q3VBox( this );
+ Q3ScrollView* sv = new Q3ScrollView( mainbox );
+ Q3HBoxLayout * lay = new Q3HBoxLayout( this );
lay->addWidget( mainbox );
- QHBox * b_box = new QHBox( mainbox );
+ Q3HBox * b_box = new Q3HBox( mainbox );
QPushButton* button = new QPushButton( i18n("Ok"), b_box );
connect ( button, SIGNAL( clicked()), this, SLOT (slotOK() ) );
button = new QPushButton( i18n("Cancel"), b_box );
connect ( button, SIGNAL( clicked()), this, SLOT (reject() ) );
//QBoxLayout * sl = new QVBoxLayout(this );
//sl->addWidget ( sv );
- sv->setResizePolicy ( QScrollView::AutoOneFit );
- QFrame *topFrame = new QFrame ( sv );
+ sv->setResizePolicy ( Q3ScrollView::AutoOneFit );
+ Q3Frame *topFrame = new Q3Frame ( sv );
sv->addChild( topFrame );
mSetupSyncAlgTab = topFrame;
- QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
+ Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,2);
topLayout->setSpacing(spacingHint());
topLayout->setMargin(marginHint());
//lab = new QLabel(i18n("Sync settings not yet implemented. DO NOT USE!"), topFrame);
int iii = 0;
//topLayout->addMultiCellWidget(lab , iii,iii,0,1);
@@ -117,13 +121,13 @@ void KSyncPrefsDialog::setupSyncAlgTab()
mMyMachineName = new QLineEdit(topFrame);
lab = new QLabel(mMyMachineName, i18n("Local device name:"), topFrame);
topLayout->addWidget(lab ,iii,0);
topLayout->addWidget(mMyMachineName,iii,1);
++iii;
- QHBox* buttonbox = new QHBox( topFrame);
+ Q3HBox* buttonbox = new Q3HBox( topFrame);
topLayout->addMultiCellWidget(buttonbox, iii,iii,0,1);
++iii;
button = new QPushButton( i18n("New profile"), buttonbox );
connect ( button, SIGNAL( clicked()), this, SLOT (newProfile() ) );
button = new QPushButton( i18n("Clone profile"), buttonbox );
@@ -142,33 +146,33 @@ void KSyncPrefsDialog::setupSyncAlgTab()
topLayout->addWidget(lab ,iii,0);
topLayout->addWidget(mProfileBox, iii,1);
++iii;
- QHGroupBox *iims = new QHGroupBox( i18n("Multiple Sync options"), topFrame);
+ Q3HGroupBox *iims = new Q3HGroupBox( i18n("Multiple Sync options"), topFrame);
new QLabel( i18n("Include in multiple "), iims );
mIncludeInRing = new QCheckBox( i18n("calendar "), iims );
mIncludeInRingAB = new QCheckBox( i18n("addressbook "), iims );
mIncludeInRingPWM = new QCheckBox( i18n("pwmanager"), iims );
new QLabel( i18n(" sync"), iims );
topLayout->addMultiCellWidget(iims, iii,iii,0,1);
++iii;
- QVGroupBox* gb0 = new QVGroupBox( i18n("Sync algo options"), topFrame);
+ Q3VGroupBox* gb0 = new Q3VGroupBox( i18n("Sync algo options"), topFrame);
topLayout->addMultiCellWidget(gb0, iii,iii,0,1);
++iii;
- QButtonGroup* gr;
+ Q3ButtonGroup* gr;
{
- QVGroupBox* topFrame = gb0;
+ Q3VGroupBox* topFrame = gb0;
mAskForPreferences = new QCheckBox( i18n("Ask for preferences before sync"), topFrame );
//topLayout->addMultiCellWidget(mAskForPreferences, iii,iii,0,1);
//++iii;
- gr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Sync preferences"), topFrame);
+ gr = new Q3ButtonGroup ( 1, Qt::Horizontal, i18n("Sync preferences"), topFrame);
//topLayout->addMultiCellWidget(gr, iii,iii,0,1);
//++iii;
loc = new QRadioButton ( i18n("Take local entry on conflict"), gr );
rem = new QRadioButton ( i18n("Take remote entry on conflict"), gr );
newest = new QRadioButton ( i18n("Take newest entry on conflict"), gr );
ask = new QRadioButton ( i18n("Ask for every entry on conflict"), gr );
@@ -178,73 +182,73 @@ void KSyncPrefsDialog::setupSyncAlgTab()
mShowSummaryAfterSync = new QCheckBox( i18n("Show summary after sync"), topFrame );
//topLayout->addMultiCellWidget(mShowSummaryAfterSync, iii,iii,0,1);
//++iii;
#if 0
- QHGroupBox* gb51 = new QHGroupBox( i18n("Local resources to sync with:"), topFrame);
+ Q3HGroupBox* gb51 = new Q3HGroupBox( i18n("Local resources to sync with:"), topFrame);
{
- QVBox * fibo2 = new QVBox ( gb51 );
+ Q3VBox * fibo2 = new Q3VBox ( gb51 );
new QLabel ( i18n("Calendar resources:"), fibo2 );
//mFilterInCal = new QComboBox( fibo2 );
- fibo2 = new QVBox ( gb51 );
+ fibo2 = new Q3VBox ( gb51 );
new QLabel ( i18n("Addressbook resources:"), fibo2 );
//mFilterInAB = new QComboBox( fibo2 );
}
#endif
- QHGroupBox* gb5 = new QHGroupBox( i18n("Apply filter when adding data to local:"), topFrame);
- QVBox * fibo2 = new QVBox ( gb5 );
+ Q3HGroupBox* gb5 = new Q3HGroupBox( i18n("Apply filter when adding data to local:"), topFrame);
+ Q3VBox * fibo2 = new Q3VBox ( gb5 );
new QLabel ( i18n("Incoming calendar filter:"), fibo2 );
mFilterInCal = new QComboBox( fibo2 );
- fibo2 = new QVBox ( gb5 );
+ fibo2 = new Q3VBox ( gb5 );
new QLabel ( i18n("Incoming addressbook filter:"), fibo2 );
mFilterInAB = new QComboBox( fibo2 );
mWriteBackFile = new QCheckBox( i18n("Write back synced data"), topFrame );
// topLayout->addMultiCellWidget(mWriteBackFile, iii,iii,0,1);
// ++iii;
- QVGroupBox* gb2 = new QVGroupBox( i18n("Write back options"), topFrame);
+ Q3VGroupBox* gb2 = new Q3VGroupBox( i18n("Write back options"), topFrame);
//topLayout->addMultiCellWidget(gb2, iii,iii,0,1);
//++iii;
{
- QVGroupBox*topFrame = gb2;
+ Q3VGroupBox*topFrame = gb2;
mWriteBackExisting= new QCheckBox( i18n("Write back (on remote) existing entries only"), topFrame );
- QHGroupBox* gb4 = new QHGroupBox( i18n("Apply filter when adding data to remote:"), topFrame);
- QVBox * fibo = new QVBox ( gb4 );
+ Q3HGroupBox* gb4 = new Q3HGroupBox( i18n("Apply filter when adding data to remote:"), topFrame);
+ Q3VBox * fibo = new Q3VBox ( gb4 );
new QLabel ( i18n("Outgoing calendar filter:"), fibo );
mFilterOutCal = new QComboBox( fibo );
- fibo = new QVBox ( gb4 );
+ fibo = new Q3VBox ( gb4 );
new QLabel ( i18n("Outgoing addressbook filter:"), fibo );
mFilterOutAB = new QComboBox( fibo );
//topLayout->addMultiCellWidget(mWriteBackExisting, iii,iii,0,1);
//++iii;
mWriteBackFuture= new QCheckBox( i18n("Write back (calendar) entries for time period only"), topFrame );
//topLayout->addMultiCellWidget(mWriteBackFuture, iii,iii,0,1);
//++iii;
- QVGroupBox* gb3 = new QVGroupBox( i18n("Time period"), topFrame);
+ Q3VGroupBox* gb3 = new Q3VGroupBox( i18n("Time period"), topFrame);
connect ( mWriteBackFuture, SIGNAL( toggled ( bool ) ), gb3, SLOT ( setEnabled ( bool ) ) );
new QLabel( i18n("From ") , gb3 );
- QHBox * tf1 = new QHBox ( gb3 );
+ Q3HBox * tf1 = new Q3HBox ( gb3 );
mWriteBackPastWeeks= new QSpinBox(1,104, 1, tf1 );
mWriteBackPastWeeks->setMaximumWidth( 100 );
new QLabel( i18n(" weeks in the past to ") ,tf1 );
- QHBox * tf2 = new QHBox ( gb3 );
+ Q3HBox * tf2 = new Q3HBox ( gb3 );
mWriteBackFutureWeeks= new QSpinBox(1,104, 1, tf2);
mWriteBackFutureWeeks->setMaximumWidth( 100 );
new QLabel( i18n(" weeks in the future ") , tf2 );
//topLayout->addMultiCellWidget(mWriteBackFutureWeeks, iii,iii,1,1);
//++iii;
gb3->setEnabled( false );
connect ( mWriteBackExisting, SIGNAL( toggled ( bool ) ), gb4, SLOT ( setDisabled ( bool ) ) );
}
connect ( mWriteBackFile, SIGNAL( toggled ( bool ) ), gb2, SLOT ( setEnabled ( bool ) ) );
}
- proGr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Profile kind"), topFrame);
+ proGr = new Q3ButtonGroup ( 1, Qt::Horizontal, i18n("Profile kind"), topFrame);
gr = proGr;
topLayout->addMultiCellWidget(gr, iii,iii,0,1);
++iii;
mIsLocal = new QRadioButton ( i18n("Local file"), gr );
mIsPi = new QRadioButton ( i18n("Pi-Sync - all calendars ( direct Kx/Pi to Kx/Pi sync )"), gr );
connect (mIsPi, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) );
@@ -252,136 +256,136 @@ void KSyncPrefsDialog::setupSyncAlgTab()
connect (mIsPiSpecific, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) );
mIsNotLocal = new QRadioButton ( i18n("Remote file (w down/upload command)"), gr );
connect (mIsLocal, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) );
mIsPhone = new QRadioButton ( i18n("Mobile device (cell phone)"), gr );
connect (mIsPhone, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) );
- QVGroupBox* gb1 = new QVGroupBox( i18n("Profile kind specific settings"), topFrame);
+ Q3VGroupBox* gb1 = new Q3VGroupBox( i18n("Profile kind specific settings"), topFrame);
topLayout->addMultiCellWidget(gb1, iii,iii,0,1);
++iii;
// ******************************************
// Profile kind specific settings
{
// *** phone *******************************
- QVGroupBox* topFrame = gb1;
- phoneWidget = new QVBox( topFrame);
+ Q3VGroupBox* topFrame = gb1;
+ phoneWidget = new Q3VBox( topFrame);
//topLayout->addMultiCellWidget(phoneWidget, iii,iii,0,1);
//++iii;
mWriteContactToSIM = 0;//new QCheckBox( i18n("Sync contacts with phone SIM card (If not, sync with phone memory)"), phoneWidget );
- QHBox* temphb = new QHBox( phoneWidget );
+ Q3HBox* temphb = new Q3HBox( phoneWidget );
new QLabel( i18n("I/O device: "), temphb );
mPhoneDevice = new QLineEdit( temphb);
button = new QPushButton( i18n("Help..."), temphb );
connect ( button, SIGNAL( clicked()), this, SLOT ( helpDevice() ) );
- temphb = new QHBox( phoneWidget );
+ temphb = new Q3HBox( phoneWidget );
new QLabel( i18n("Connection: "), temphb );
mPhoneConnection = new QLineEdit( temphb);
button = new QPushButton( i18n("Help..."), temphb );
connect ( button, SIGNAL( clicked()), this, SLOT ( helpConnection() ) );
- temphb = new QHBox( phoneWidget );
+ temphb = new Q3HBox( phoneWidget );
new QLabel( i18n("Model(opt.): "), temphb );
mPhoneModel = new QLineEdit( temphb);
button = new QPushButton( i18n("Help..."), temphb );
connect ( button, SIGNAL( clicked()), this, SLOT ( helpModel() ) );
// *** local*******************************
- localFileWidget = new QVBox( topFrame);
+ localFileWidget = new Q3VBox( topFrame);
//topLayout->addMultiCellWidget(localFileWidget, iii,iii,0,1);
//++iii;
- temphb = new QHBox( localFileWidget );
+ temphb = new Q3HBox( localFileWidget );
lab = new QLabel( i18n("Local file Cal:"), temphb );
lab = new QLabel( i18n("Local file ABook:"), temphb );
lab = new QLabel( i18n("Local file PWMgr:"), temphb );
- temphb = new QHBox( localFileWidget );
+ temphb = new Q3HBox( localFileWidget );
button = new QPushButton( i18n("Choose..."), temphb );
connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFile() ) );
button = new QPushButton( i18n("Choose..."), temphb );
connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFileAB() ) );
button = new QPushButton( i18n("Choose..."), temphb );
connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFilePWM() ) );
- temphb = new QHBox( localFileWidget );
+ temphb = new Q3HBox( localFileWidget );
mRemoteFile = new QLineEdit( temphb);
mRemoteFileAB = new QLineEdit( temphb);
mRemoteFilePWM = new QLineEdit( temphb);
mIsKapiFileL = new QCheckBox( i18n("Addressbook file (*.vcf) is used by KA/Pi"), localFileWidget );
// *** remote*******************************
- remoteFileWidget = new QVBox( topFrame);
+ remoteFileWidget = new Q3VBox( topFrame);
//topLayout->addMultiCellWidget(remoteFileWidget, iii,iii,0,1);
//++iii;
- temphb = new QHBox( remoteFileWidget );
+ temphb = new Q3HBox( remoteFileWidget );
new QLabel( i18n("Calendar:"), temphb);
new QLabel( i18n("AddressBook:"), temphb);
new QLabel( i18n("PWManager:"), temphb);
lab = new QLabel( i18n("Pre sync (download) command:"), remoteFileWidget);
- temphb = new QHBox( remoteFileWidget );
+ temphb = new Q3HBox( remoteFileWidget );
mRemotePrecommand = new QLineEdit(temphb);
mRemotePrecommandAB = new QLineEdit(temphb);
mRemotePrecommandPWM = new QLineEdit(temphb);
lab = new QLabel( i18n("Local temp file:"), remoteFileWidget);
- temphb = new QHBox( remoteFileWidget );
+ temphb = new Q3HBox( remoteFileWidget );
mLocalTempFile = new QLineEdit(temphb);
mLocalTempFileAB = new QLineEdit(temphb);
mLocalTempFilePWM = new QLineEdit(temphb);
lab = new QLabel( i18n("Post sync (upload) command:"), remoteFileWidget);
- temphb = new QHBox( remoteFileWidget );
+ temphb = new Q3HBox( remoteFileWidget );
mRemotePostcommand = new QLineEdit(temphb );
mRemotePostcommandAB = new QLineEdit(temphb );
mRemotePostcommandPWM = new QLineEdit(temphb );
mIsKapiFileR = new QCheckBox( i18n("Addressbook file is used by KA/Pi"), remoteFileWidget );
lab = new QLabel( i18n("Fill in default values for:"), remoteFileWidget);
- temphb = new QHBox( remoteFileWidget );
+ temphb = new Q3HBox( remoteFileWidget );
button = new QPushButton( i18n("ssh/scp"), temphb );
connect ( button, SIGNAL( clicked()), this, SLOT (fillSSH() ) );
button = new QPushButton( i18n("ftp"), temphb );
connect ( button, SIGNAL( clicked()), this, SLOT (fillFTP() ) );
lab = new QLabel( i18n("Hint: Use $PWD$ for placeholder of password!"), remoteFileWidget);
// *** pi-sync*******************************
- piWidget = new QVBox( topFrame);
+ piWidget = new Q3VBox( topFrame);
//topLayout->addMultiCellWidget(piWidget, iii,iii,0,1);
//++iii;
- temphb = new QHBox( piWidget );
+ temphb = new Q3HBox( piWidget );
new QLabel( i18n("Calendar:"), temphb);
new QLabel( i18n("AddressBook:"), temphb);
new QLabel( i18n("PWManager:"), temphb);
lab = new QLabel( i18n("Password for remote access: (could be the same for each)"), piWidget);
- temphb = new QHBox( piWidget );
+ temphb = new Q3HBox( piWidget );
mRemotePw = new QLineEdit(temphb);
mRemotePwAB = new QLineEdit(temphb);
mRemotePwPWM = new QLineEdit(temphb);
lab = new QLabel( i18n("Remote IP address: (could be the same for each)"), piWidget);
- temphb = new QHBox( piWidget );
+ temphb = new Q3HBox( piWidget );
mRemoteIP = new QLineEdit(temphb);
mRemoteIPAB = new QLineEdit(temphb);
mRemoteIPPWM = new QLineEdit(temphb);
lab = new QLabel( i18n("Remote port number: (should be different for each)"), piWidget);
- temphb = new QHBox( piWidget );
+ temphb = new Q3HBox( piWidget );
mRemotePort = new QLineEdit(temphb);
mRemotePortAB = new QLineEdit(temphb);
mRemotePortPWM = new QLineEdit(temphb);
lab = new QLabel( i18n("Local/remote Resource sync partners (Leave empty to not sync)"), piWidget);
- mTableBox = new QHBox( piWidget );
- mResTableKopi = new QTable( 1, 1, mTableBox );
- mResTableKapi = new QTable( 1, 1, mTableBox );
- mResTablePwmpi = new QTable( 1, 1, mTableBox );
+ mTableBox = new Q3HBox( piWidget );
+ mResTableKopi = new Q3Table( 1, 1, mTableBox );
+ mResTableKapi = new Q3Table( 1, 1, mTableBox );
+ mResTablePwmpi = new Q3Table( 1, 1, mTableBox );
mResTableKopi->horizontalHeader()->setLabel( 0, i18n("Remote") );
mResTableKapi->horizontalHeader()->setLabel( 0, i18n("Remote") );
mResTablePwmpi->horizontalHeader()->setLabel( 0, i18n("Remote") );
mResTableKopi->setLeftMargin( 80 );
mResTableKapi->setLeftMargin( 80 );
}
@@ -465,13 +469,13 @@ void KSyncPrefsDialog::slotOK()
if ( mMyMachineName->text() == "undefined" ) {
KMessageBox::error(this,i18n("Local device name undefined!\nPlease define device name!"),i18n("KO/Pi config error"));
return;
}
int i;
for (i = 0; i < mSyncProfileNames.count(); ++ i) {
- if ( mSyncProfileNames.contains( mSyncProfileNames[i]) > 1 ) {
+ if ( mSyncProfileNames.count( mSyncProfileNames[i]) > 1 ) {
KMessageBox::error(this,i18n("Multiple profiles with same name!\nPlease use unique profile names!"),i18n("KO/Pi config error"));
return;
}
}
usrWriteConfig();
QDialog::accept();
diff --git a/libkdepim/ksyncprefsdialog.h b/libkdepim/ksyncprefsdialog.h
index d8c02de..1d7503e 100644
--- a/libkdepim/ksyncprefsdialog.h
+++ b/libkdepim/ksyncprefsdialog.h
@@ -22,28 +22,28 @@
*/
#ifndef _KSYNCPREFSDIALOG_H
#define _KSYNCPREFSDIALOG_H
#include <kdialogbase.h>
-#include <qptrlist.h>
-#include <qtable.h>
-#include <qhbox.h>
+#include <q3ptrlist.h>
+#include <q3table.h>
+#include <q3hbox.h>
//#include <libkdepim/kprefsdialog.h>
class KColorButton;
class QSpinBox;;
class QRadioButton;
class QCheckBox;
class QSlider;
class KURLRequester;
class QComboBox;
-class QButtonGroup;
+class Q3ButtonGroup;
class QLineEdit;
-class QVBox;
+class Q3VBox;
class QStringList;
class KSyncProfile;
/** Dialog to change the korganizer configuration.
*/
class KSyncPrefsDialog : public KDialog
@@ -83,13 +83,13 @@ class KSyncPrefsDialog : public KDialog
void setupSyncAlgTab();
void readFilter();
void readResources();
private:
void updateMyCaption();
int currentSelection;
- QPtrList<KSyncProfile> mSyncProfiles;
+ Q3PtrList<KSyncProfile> mSyncProfiles;
QStringList mSyncProfileNames;
QStringList mFilterKapi;
QStringList mFilterKopi;
QStringList mResourcesKopi;
QStringList mResourcesKapi;
QLineEdit * mMyMachineName;
@@ -102,17 +102,17 @@ class KSyncPrefsDialog : public KDialog
QCheckBox* mIncludeInRing;
QCheckBox* mIncludeInRingAB;
QCheckBox* mIncludeInRingPWM;
void addProfile ( KSyncProfile* );
void insertProfiles();
void saveProfile();
- QButtonGroup* proGr;
- QHBox * mTableBox;
- QTable* mResTableKopi;
- QTable* mResTableKapi;
- QTable* mResTablePwmpi;
+ Q3ButtonGroup* proGr;
+ Q3HBox * mTableBox;
+ Q3Table* mResTableKopi;
+ Q3Table* mResTableKapi;
+ Q3Table* mResTablePwmpi;
QComboBox * mFilterOutCal;
QComboBox * mFilterInCal;
QComboBox * mFilterOutAB;
QComboBox * mFilterInAB;
@@ -149,16 +149,16 @@ class KSyncPrefsDialog : public KDialog
QLineEdit * mPhoneDevice;
QLineEdit * mPhoneConnection;
QLineEdit * mPhoneModel;
QWidget* mSetupSyncAlgTab;
- QVBox* localFileWidget;
- QVBox* remoteFileWidget;
- QVBox* phoneWidget;
- QVBox* piWidget;
+ Q3VBox* localFileWidget;
+ Q3VBox* remoteFileWidget;
+ Q3VBox* phoneWidget;
+ Q3VBox* piWidget;
QCheckBox* mWriteBackFile;
QCheckBox* mWriteBackFuture;
QSpinBox* mWriteBackFutureWeeks;
QSpinBox* mWriteBackPastWeeks;
QCheckBox* mWriteBackExisting;
QCheckBox* mAskForPreferences;
diff --git a/libkdepim/ksyncprofile.h b/libkdepim/ksyncprofile.h
index 91fcfc5..1e41662 100644
--- a/libkdepim/ksyncprofile.h
+++ b/libkdepim/ksyncprofile.h
@@ -17,13 +17,13 @@
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#ifndef _KSYNCPROFILE_H
#define _KSYNCPROFILE_H
-#include <qptrlist.h>
+#include <q3ptrlist.h>
#include <qcolor.h>
#include <qfont.h>
#include <qstringlist.h>
#include <qobject.h>
#include <qstring.h>
diff --git a/libkdepim/libkdepim.pro b/libkdepim/libkdepim.pro
index 7160d0e..fb27311 100644
--- a/libkdepim/libkdepim.pro
+++ b/libkdepim/libkdepim.pro
@@ -1,10 +1,10 @@
TEMPLATE = lib
CONFIG = qt warn_on
DEFINES +=KORG_NOKABC
-TARGET = microkdepim
+TARGET = xmicrokdepim
INCLUDEPATH += ../microkde ../microkde/kdecore ../microkde/kdeui . ..
DESTDIR=../bin
DEFINES += DESKTOP_VERSION
include( ../variables.pri )
unix : {
@@ -71,6 +71,8 @@ LIBS += mfc71u.lib
DEFINES += _OL_IMPORT_
HEADERS += ol_access.h
SOURCES += ol_access.cpp
#olimport section end
}
}
+#The following line was inserted by qt3to4
+QT += 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,12 +1,12 @@
TEMPLATE = lib
CONFIG += qt warn_on
-TARGET = microkdepim
+TARGET = xmicrokdepim
INCLUDEPATH += . $(KDEPIMDIR) $(KDEPIMDIR)/microkde $(KDEPIMDIR)/qtcompat $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kdeui $(QPEDIR)/include
-LIBS += -lmicrokde
-#LIBS += -lmicrokcal
+LIBS += -lxmicrokde
+#LIBS += -lxmicrokcal
LIBS += -L$(QPEDIR)/lib
OBJECTS_DIR = obj/$(PLATFORM)
MOC_DIR = moc/$(PLATFORM)
DESTDIR=$(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
@@ -19,27 +19,27 @@
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#include <qtooltip.h>
-#include <qframe.h>
+#include <q3frame.h>
#include <qpixmap.h>
#include <qlayout.h>
-#include <qprogressbar.h>
-#include <qprogressdialog.h>
-#include <qwidgetstack.h>
+#include <q3progressbar.h>
+#include <q3progressdialog.h>
+#include <q3widgetstack.h>
#include <qdatetime.h>
#include <qdir.h>
#include <qpushbutton.h>
#include <qregexp.h>
#include <qapplication.h>
-#include <qhbox.h>
-#include <qheader.h>
+#include <q3hbox.h>
+#include <q3header.h>
#include <qdatetime.h>
-#include <qlistview.h>
+#include <q3listview.h>
#include <kdebug.h>
#include <klocale.h>
#include <kstandarddirs.h>
#include <kmessagebox.h>
#include <kfiledialog.h>
@@ -51,19 +51,19 @@
#include "../outport/msoutl9.h"
#include <ole2.h>
#include <comutil.h>
-class OLEListViewItem : public QCheckListItem
+class OLEListViewItem : public Q3CheckListItem
{
public:
- OLEListViewItem( QListView *parent, QString text ) :
- QCheckListItem( parent, text, QCheckListItem::CheckBox ) { ; };
- OLEListViewItem( QListViewItem *after, QString text ) :
- QCheckListItem( after, text, QCheckListItem::CheckBox ) { ; };
+ OLEListViewItem( Q3ListView *parent, QString text ) :
+ Q3CheckListItem( parent, text, Q3CheckListItem::CheckBox ) { ; };
+ OLEListViewItem( Q3ListViewItem *after, QString text ) :
+ Q3CheckListItem( after, text, Q3CheckListItem::CheckBox ) { ; };
~OLEListViewItem() {};
void setData( DWORD data ) {mData= data; };
void setDataID( QString data ){ mDataID = data ;}
QString dataID() { return mDataID;}
DWORD data() { return mData ;};
private:
@@ -75,21 +75,21 @@ class OLEFolderSelect : public KDialogBase
{
public:
OLEFolderSelect() :
KDialogBase( Plain, "", Ok | Cancel, Ok,
0, "", true, false, i18n("Import!") )
{
- QHBox * mw = new QHBox( this );
+ Q3HBox * mw = new Q3HBox( this );
setMainWidget( mw );
- mListView = new QListView( mw );
+ mListView = new Q3ListView( mw );
mListView->addColumn(i18n("Select Folder"));
mListView->addColumn(i18n("Content Type"));
}
- QListView* listView() { return mListView;}
+ Q3ListView* listView() { return mListView;}
private:
- QListView* mListView;
+ Q3ListView* mListView;
};
OL_access *OL_access::sInstance = 0;
static KStaticDeleter<OL_access> staticDeleterPim;
OL_access *OL_access::instance()
@@ -146,13 +146,13 @@ void OL_access::readContactData( LPDISPATCH dispItem, KABC::Addressee::List* li
int i;
folderItems = mf.GetItems();
QString cap = i18n("Importing contact data");
if ( syncMode ) {
cap = i18n("Reading contact data...");
}
- QProgressDialog bar( cap,i18n("Abort"), folderItems.GetCount(), 0 );
+ Q3ProgressDialog bar( cap,i18n("Abort"), folderItems.GetCount(), 0 );
bar.setCaption (i18n("Accessing OL") );
int h = bar.sizeHint().height() ;
int w = 300;
int dw = QApplication::desktop()->width();
int dh = QApplication::desktop()->height();
bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
@@ -170,13 +170,13 @@ void OL_access::readContactData( LPDISPATCH dispItem, KABC::Addressee::List* li
itm->Release();
}
}
QStringList OL_access::getFolderSelection( int type , QString caption )
{
OLEFolderSelect folder_dialog;
- QListView * listView = folder_dialog.listView();
+ Q3ListView * listView = folder_dialog.listView();
MAPIFolder mfInbox;
MAPIFolder mfRoot;
CString szName;
_NameSpace olNS;
olNS = gOlAppAB.GetNamespace(_T("MAPI"));
mfInbox = olNS.GetDefaultFolder(6);
@@ -1132,19 +1132,19 @@ DATE Qdt2date( QDateTime dt )
odt.SetDateTime(dt.date().year(), dt.date().month(),dt.date().day(),
dt.time().hour(), dt.time().minute(), dt.time().second() );
ddd = odt;
return ddd;
}
-class OLEListViewItem : public QCheckListItem
+class OLEListViewItem : public Q3CheckListItem
{
public:
- OLEListViewItem( QListView *parent, QString text ) :
- QCheckListItem( parent, text, QCheckListItem::CheckBox ) { ; };
- OLEListViewItem( QListViewItem *after, QString text ) :
- QCheckListItem( after, text, QCheckListItem::CheckBox ) { ; };
+ OLEListViewItem( Q3ListView *parent, QString text ) :
+ Q3CheckListItem( parent, text, Q3CheckListItem::CheckBox ) { ; };
+ OLEListViewItem( Q3ListViewItem *after, QString text ) :
+ Q3CheckListItem( after, text, Q3CheckListItem::CheckBox ) { ; };
~OLEListViewItem() {};
void setData( DWORD data ) {mData= data; };
void setDataID( QString data ){ mDataID = data ;}
QString dataID() { return mDataID;}
DWORD data() { return mData ;};
private:
@@ -1156,15 +1156,15 @@ bool KAImportOLdialog::sOLDispatch = false;
KAImportOLdialog::KAImportOLdialog( const QString &caption,
KABC::AddressBook * aBook, QWidget *parent ) :
KDialogBase( Plain, caption, User1 | Close, Ok,
parent, caption, true, false, i18n("Import!") )
{
mSyncMode = false;
- QHBox * mw = new QHBox( this );
+ Q3HBox * mw = new Q3HBox( this );
setMainWidget( mw );
- mListView = new QListView( mw );
+ mListView = new Q3ListView( mw );
mListView->addColumn(i18n("Select Folder"));
mListView->addColumn(i18n("Content Type"));
mABook = aBook;
connect( this, SIGNAL( user1Clicked() ),SLOT ( slotApply()));
setupFolderView();
resize( sizeHint().width()+50, sizeHint().height()+50 );
@@ -1300,13 +1300,13 @@ void KAImportOLdialog::readContactData( DWORD folder )
int i;
folderItems = mf.GetItems();
QString cap = i18n("Importing contact data");
if ( mSyncMode ) {
cap = i18n("Reading contact data...");
}
- QProgressDialog bar( cap,i18n("Abort"), folderItems.GetCount(),this);
+ Q3ProgressDialog bar( cap,i18n("Abort"), folderItems.GetCount(),this);
bar.setCaption (i18n("Accessing OL") );
int h = bar.sizeHint().height() ;
int w = 300;
int dw = QApplication::desktop()->width();
int dh = QApplication::desktop()->height();
//bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
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
@@ -34,13 +34,13 @@
#include "../outport/msoutl9.h"
#define OL_CONTACT_DATA 2
#define OL_CALENDAR_DATA 1 //pending is this the right number
class QDateTime;
-class QListView;
+class Q3ListView;
class OLEListViewItem;
class _ContactItem;
class OL_access : public QObject
{
Q_OBJECT
public:
@@ -129,13 +129,13 @@ class KAImportOLdialog : public KDialogBase
protected:
void setupFolderView();
void addFolder(OLEListViewItem* iParent, LPDISPATCH dispParent);
void readContactData( DWORD folder );
KABC::AddressBook * mABook;
- QListView * mListView;
+ Q3ListView * mListView;
KABC::Addressee::List mAList;
bool addAddressee( KABC::Addressee a );
private:
int importedItems;
bool mSyncMode;
QString mSelectedFolderID;
diff --git a/libkdepim/phoneaccess.cpp b/libkdepim/phoneaccess.cpp
index 89db22b..0ea73f5 100644
--- a/libkdepim/phoneaccess.cpp
+++ b/libkdepim/phoneaccess.cpp
@@ -19,17 +19,18 @@
Boston, MA 02111-1307, USA.
*/
#include <qstring.h>
#include <qapplication.h>
-#include <qptrlist.h>
+#include <QDesktopWidget>
+#include <q3ptrlist.h>
#include <qregexp.h>
#include <qfile.h>
#include <qlabel.h>
-#include <qtextstream.h>
+#include <q3textstream.h>
#include <qtextcodec.h>
#include <qdir.h>
#include <kmessagebox.h>
#include <stdlib.h>
#include "phoneaccess.h"
@@ -43,18 +44,20 @@ void PhoneAccess::writeConfig( QString device, QString connection, QString model
//qDebug("save %d ", load );
QString content = "[gammu]\n";;
bool write = false;
bool addPort = true, addConnection = true, addModel = true;
QFile file( fileName );
if ( QFile::exists( fileName) ) {
- if (!file.open( IO_ReadOnly ) ) {
+ if (!file.open( QIODevice::ReadOnly ) ) {
qDebug("Error: cannot open %s ", fileName.latin1() );
return;
}
QString line;
- while ( file.readLine( line, 1024 ) > 0 ) {
+ char tmp[1024];
+ while ( file.readLine( tmp, 1024 ) > 0 ) {
+ line = tmp;
//qDebug("*%s* ", line.latin1() );
if ( line.left(7 ) == "[gammu]" ) {
;
} else
if ( line.left(4 ) == "port" ) {
if ( line == "port = " + device+"\n" ) {
@@ -112,18 +115,18 @@ void PhoneAccess::writeConfig( QString device, QString connection, QString model
write = true;
content += "model = ";
content += model;
content += "\n";
}
if ( write ) {
- if (!file.open( IO_WriteOnly ) ) {
+ if (!file.open( QIODevice::WriteOnly ) ) {
qDebug("Error: cannot write file %s ", fileName.latin1() );
return;
}
qDebug("Writing file %s ", fileName.latin1() );
- QTextStream ts( &file );
+ Q3TextStream ts( &file );
ts << content ;
file.close();
}
}