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
@@ -14,53 +14,54 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
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 <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();
#endif
mButtonAdd->setEnabled(!mEdit->text().isEmpty());
if ( QApplication::desktop()->width() > 460 )
resize( 300, 360 );
else
showMaximized();
@@ -73,25 +74,25 @@ CategoryEditDialog::~CategoryEditDialog()
{
// no need to delete child widgets, Qt does it all for us
}
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);
}
}
void CategoryEditDialog::remove()
{
if (mCategories->currentItem()) {
delete mCategories->currentItem();
mButtonRemove->setEnabled(mCategories->childCount()>0);
mButtonModify->setEnabled(mCategories->childCount()>0);
@@ -112,30 +113,30 @@ void CategoryEditDialog::accept()
}
void CategoryEditDialog::slotOk()
{
slotApply();
QDialog::accept();
}
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);
}
//US #include "categoryeditdialog.moc"
diff --git a/libkdepim/categoryeditdialog.h b/libkdepim/categoryeditdialog.h
index 9bb3201..828894f 100644
--- a/libkdepim/categoryeditdialog.h
+++ b/libkdepim/categoryeditdialog.h
@@ -15,72 +15,72 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
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.
*/
#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();
void accept();
void slotOk();
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
@@ -2,79 +2,83 @@
/****************************************************************************
** Form implementation generated from reading ui file '/build/kde/cvs/korge/kdepim/libkdepim/categoryeditdialog_base.ui'
**
** Created: Sat Mar 29 21:46:09 2003
** by: The User Interface Compiler ()
**
** 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 );
//mApply = new QPushButton( this, "mApply" );
// Layout13->addWidget( mApply );
mButtonOk = new QPushButton( this, "mButtonOk" );
mButtonOk->setAutoDefault( TRUE );
mButtonOk->setDefault( TRUE );
Layout13->addWidget( mButtonOk );
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" );
layout103->addWidget( mButtonModify );
mButtonRemove = new QPushButton( this, "mButtonRemove" );
layout103->addWidget( mButtonRemove );
QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
layout103->addItem( spacer_2 );
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
@@ -3,56 +3,60 @@
**
** Created: Sat Mar 29 21:45:20 2003
** by: The User Interface Compiler ()
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#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
@@ -12,42 +12,45 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
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;
mCategories->header()->hide();
setCategories();
connect(mButtonEdit,SIGNAL(clicked()),this, SLOT(editCategoriesDialog()));
if ( QApplication::desktop()->width() > 460 )
@@ -72,53 +75,53 @@ void CategorySelectDialog::editCategoriesDialog()
setCategories();
setSelected( temp );
}
void CategorySelectDialog::setCategories()
{
mColorItem = 0;
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()
{
}
void CategorySelectDialog::setSelected(const QStringList &selList)
{
clear();
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"
// "in list of categories!\n"
// "message",
// "OK", "", 0,
// 0, 1 );
// setSelected(selList);
// return;
@@ -128,119 +131,119 @@ void CategorySelectDialog::setSelected(const QStringList &selList)
QStringList CategorySelectDialog::selectedCategories() const
{
return mCategoryList;
}
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 ) {
mColorItem->setPixmap ( 0, QPixmap() );
mColorItem = 0;
}
if ( newColorItem ) {
QPixmap pix (newColorItem->height()/2, newColorItem->height()/2 );
pix.fill(Qt::red );
newColorItem->setPixmap ( 0, pix );
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(",");
mCategoryList = categories;
}
void CategorySelectDialog::accept()
{
slotOk();
}
void CategorySelectDialog::slotOk()
{
slotApply();
emit categoriesSelected(mCategoryList);
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);
}
//#include "categoryselectdialog.moc"
diff --git a/libkdepim/categoryselectdialog.h b/libkdepim/categoryselectdialog.h
index 680a093..ff7ac58 100644
--- a/libkdepim/categoryselectdialog.h
+++ b/libkdepim/categoryselectdialog.h
@@ -17,59 +17,59 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
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.
*/
#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);
QStringList selectedCategories() const;
public slots:
void slotOk();
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;
};
}
#endif
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
@@ -2,63 +2,66 @@
/****************************************************************************
** Form implementation generated from reading ui file '/build/kde/cvs/korge/kdepim/libkdepim/categoryselectdialog_base.ui'
**
** Created: Sat Mar 29 21:46:05 2003
** by: The User Interface Compiler ()
**
** 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 );
//mApply = new QPushButton( this, "mApply" );
// Layout11->addWidget( mApply );
mButtonOk = new QPushButton( this, "mButtonOk" );
mButtonOk->setOn( FALSE );
mButtonOk->setDefault( TRUE );
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
@@ -3,52 +3,56 @@
**
** Created: Sat Mar 29 21:45:20 2003
** by: The User Interface Compiler ()
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#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;
QPushButton* mSetColorCat;
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
@@ -30,25 +30,27 @@ $Id$
#include <stdlib.h>
#include <qfile.h>
#include <qtimer.h>
#include <qmap.h>
#include <qregexp.h>
#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>
#include "externalapphandler.h"
#include "kpimglobalprefs.h"
//uncomment line to get debug output
//#define DEBUG_EXT_APP_HANDLER
@@ -114,48 +116,48 @@ bool QCopTransferItem::sendMessageToTarget(const QString& uid, const QString& pa
/*********************************************************************************/
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;
// block second call
if ( ii < 2 ) {
++ii;
if ( ii > 1 ) {
qDebug("qcop call blocked ");
return true;
}
}
*/
// 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;
QString param3;
stream >> sourceChannel >> uid;
if (_usedSourceParameters == 0)
{
@@ -217,31 +219,31 @@ bool QCopMapTransferItem::sendMessageToSource(const QString& uid, const QMap<QSt
return true;
#else
KMessageBox::sorry( 0, i18n( "This version does not support QCop." ) );
return false;
#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())
{
QMap<QString,QString> adrMap;
QString uid;
stream >> uid >> adrMap;
emit receivedMessageFromTarget(uid, adrMap);
@@ -296,34 +298,34 @@ bool QCopListTransferItem::sendMessageToSource(const QString& uid, const QString
return true;
#else
KMessageBox::sorry( 0, i18n( "This version does not support QCop." ) );
return false;
#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
if ((_targetMessage + _targetMessageParameters) == cmsg.data())
{
QStringList list1;
QStringList list2;
QStringList list3;
QStringList list4;
@@ -509,27 +511,27 @@ ExternalAppHandler *ExternalAppHandler::instance()
return sInstance;
}
void ExternalAppHandler::addDefaultAppItem(Types type, int id, const QString& label, const QString& channel, const QString& message, const QString& parameter, const QString& message2, const QString& parameter2)
{
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)
list.append(dai);
}
return list;
}
@@ -737,25 +739,25 @@ bool ExternalAppHandler::mailToMultipleContacts( const QString& emails, const QS
message = dai->_message;
parameters = dai->_parameters;
}
//first check if one of the mailers need the emails right in the message.
message2 = translateMessage(message2, emails, urls);
#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;
while ( i < list.count ( ) ) {
//qDebug("add%sdd ",list[i].latin1() );
proc->addArgument( list[i] );
//KMessageBox::sorry( 0,list[i]);
++i;
}
@@ -763,25 +765,25 @@ bool ExternalAppHandler::mailToMultipleContacts( const QString& emails, const QS
proc->addArgument(message );
//KMessageBox::sorry( 0, message );
}
parameters2 = translateMessage(parameters2, urls, "" );
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;
}
/**************************************************************************
*
**************************************************************************/
//calls the emailapplication and creates a mail with parameter emails as recipients
bool ExternalAppHandler::mailToOneContact( const QString& name, const QString& emailadress )
@@ -822,44 +824,44 @@ bool ExternalAppHandler::mailToOneContact( const QString& name, const QString& e
qDebug("5Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1());
qDebug("passing name(%s), emailadresses(%s) as parameters in the form %s to QCopEnvelope", name.latin1(), emailadress.latin1(), parameters.latin1());
#endif
#ifndef DESKTOP_VERSION
QCopEnvelope e(channel.latin1(), message.latin1());
//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() );
proc->addArgument( list[i] );
//KMessageBox::sorry( 0,list[i]);
++i;
}
} else {
proc->addArgument(message );
}
parameters = translateMessage(parameters, name, emailadress);
//KMessageBox::information(0,parameters);
proc->addArgument( parameters );
- proc->launch("");
+ proc->launch(QString());
#endif
return true;
}
/**************************************************************************
*
**************************************************************************/
//calls the emailapplication and creates a mail with parameter as recipients
// parameters format is
// NAME <EMAIL>:SUBJECT
@@ -1223,25 +1225,25 @@ void ExternalAppHandler::passParameters(QCopEnvelope* e, const QString& paramete
(*e) << valmap;
#endif
}
/**************************************************************************
*
**************************************************************************/
-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;
}
if ( cmsg == "callContactdialog()" ) {
qDebug("callContactdialog()");
QTimer::singleShot( 0, this, SIGNAL ( callContactdialog() ));
return;
}
diff --git a/libkdepim/externalapphandler.h b/libkdepim/externalapphandler.h
index b899ad7..3247fe4 100644
--- a/libkdepim/externalapphandler.h
+++ b/libkdepim/externalapphandler.h
@@ -25,41 +25,44 @@
Enhanced Version of the file for platform independent KDE tools.
Copyright (c) 2004 Ulf Schenk
$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
{
Q_OBJECT
public:
QCopTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage);
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);
void receivedMessageFromSource(const QString& sourceChannel, const QString& uid, const QString& param1, const QString& param2, const QString& param3);
public:
int _usedSourceParameters;
QString _sourceChannel;
QString _sourceMessage;
@@ -74,46 +77,46 @@ class QCopTransferItem : public QObject
*
********************************************************************************/
class QCopMapTransferItem : public QCopTransferItem
{
Q_OBJECT
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);
};
/*********************************************************************************
*
********************************************************************************/
class QCopListTransferItem : public QCopTransferItem
{
Q_OBJECT
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);
};
/*********************************************************************************
*
********************************************************************************/
@@ -216,29 +219,29 @@ class ExternalAppHandler : public QObject
bool requestBirthdayListFromKAPI(const QString& sourceChannel, const QString& sessionuid);
bool returnBirthdayListFromKAPI(const QString& sourceChannel, const QString& sessionuid,
const QStringList& birthdayList, const QStringList& anniversaryList,
const QStringList& realNameList, const QStringList& emailList,
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();
// Emmitted when the target app receives a request from the source app
void requestForNameEmailUidList(const QString& sourceChannel, const QString& uid);
// Emitted when the source app recieves a list of name/email pairs (=addresses) from another target app. Usually Ka/Pi
// The first parameter is a uniqueid. It can be used to identify the event
void receivedNameEmailUidListEvent(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList);
@@ -253,25 +256,25 @@ class ExternalAppHandler : public QObject
void requestForBirthdayList(const QString& sourceChannel, const QString& uid);
// Emitted when the source app recieves a list of name/email pairs (=addresses) from another target app. Usually Ka/Pi
// The first parameter is a uniqueid. It can be used to identify the event
void receivedBirthdayListEvent(const QString& uid, const QStringList& birthdayList,
const QStringList& anniversaryList, const QStringList& realNameList,
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;
Availability mSIPAppAvailable;
QCopListTransferItem* mNameEmailUidListFromKAPITransfer;
QCopListTransferItem* mFindByEmailFromKAPITransfer;
QCopTransferItem* mDisplayDetails;
QCopListTransferItem* mBirthdayListFromKAPITransfer;
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
@@ -21,49 +21,51 @@
without including the source code for Qt in the source distribution.
*/
/*
Enhanced Version of the file for platform independent KDE tools.
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"
#include "kcmkdepimconfig.h"
#include "kprefs.h"
#include "kpimglobalprefs.h"
#ifndef _WIN32_
extern "C"
{
KCModule *create_kdepimconfig(QWidget *parent, const char * ) {
return new KCMKdePimConfig(parent, "kcmkdepimconfig" );
}
}
#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 ) ) );
}
void KCMKdePimConfig::load()
{
mConfigWidget->readConfig();
}
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
@@ -22,34 +22,39 @@
*/
/*
Enhanced Version of the file for platform independent KDE tools.
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>
#include <kglobal.h>
#include <stdlib.h>
/*US
#include <qcheckbox.h>
#include <qframe.h>
@@ -92,124 +97,124 @@ $Id$
KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, const char *name )
: KPrefsWidget(prefs, parent, name )
{
mExternalAppsMap.insert(ExternalAppHandler::EMAIL, i18n("Email"));
mExternalAppsMap.insert(ExternalAppHandler::PHONE, i18n("Phone"));
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 );
setupLocaleTab();
setupLocaleDateTab();
setupTimeZoneTab();
setupExternalAppTab();
setupStoreTab();
setupBackupTab();
}
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;
localKdeDir = readEnvPath("LOCALMICROKDEHOME");
if ( ! localKdeDir.isEmpty() ) {
sb->checkBox()->setEnabled( false );
sb->checkBox()->setChecked( true );
mBackupUrl->setEnabled( false );
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() );
#ifdef DESKTOP_VERSION
QString confFile = qApp->applicationDirPath ()+ "/.microkdehome" ;
QFileInfo fi ( confFile );
if ( fi.exists() ) {
KConfig cfg ( confFile );
cfg.setGroup("Global");
QString localKdeDir = cfg.readEntry( "MICROKDEHOME", "x_x_x" );
if ( localKdeDir != "x_x_x" ) {
mStoreUrl->setURL( localKdeDir );
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() ) );
pb = new QPushButton ( i18n("Save standard"), bb );
connect(pb, SIGNAL( clicked() ), this, SLOT ( setStandardStore() ) );
#ifdef DESKTOP_VERSION
pb = new QPushButton ( i18n("Save using LOCAL storage"), bb );
connect(pb, SIGNAL( clicked() ), this, SLOT ( setLocalStore() ) );
#endif
@@ -261,41 +266,41 @@ void KDEPIMConfigWidget::saveStoreSettings()
cfg.writeEntry( "MICROKDEHOME", url );
qDebug("cfg.writeEntry( MICROKDEHOME, %s ", url.latin1());
cfg.sync();
mDataStoragePath->setText( i18n("Settings are stored in\n%1").arg( path+"/.microkdehome" ));
} else {
mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" );
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 )
mExternalApps->insertItem( it.data(), it.key() );
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 ) ),
this, SLOT (client_changed( int ) ) );
QLabel* lab = new QLabel( i18n("Channel:"), mExternalAppGroupBox);
boxLayout->addWidget( lab, 1, 0 );
mChannel = new QLineEdit(mExternalAppGroupBox);
mChannel->setReadOnly(true);
@@ -343,25 +348,25 @@ void KDEPIMConfigWidget::setupExternalAppTab()
connect( mParameters, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) );
layout->addWidget( mExternalAppGroupBox );
tabWidget->addTab( externalAppsPage, i18n( "External Apps." ) );
}
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;
KPrefsWidRadios *syncPrefsGroup =
addWidRadios(i18n("Date Format:"),&(KPimGlobalPrefs::instance()->mPreferredDate),topFrame);
QString format;
if ( QApplication::desktop()->width() < 480 )
format = "(%d.%m.%Y)";
else
@@ -411,47 +416,47 @@ void KDEPIMConfigWidget::setupLocaleDateTab()
connect( mUserDateFormatLong, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) );
connect( mUserDateFormatShort, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) );
tabWidget->addTab( topFrame, i18n( "Date Format" ) );
}
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);
syncPrefsGroup->addRadio(i18n("English"));
syncPrefsGroup->addRadio(i18n("German"));
syncPrefsGroup->addRadio(i18n("French"));
syncPrefsGroup->addRadio(i18n("Italian"));
syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)"));
if ( QApplication::desktop()->width() < 300 ) {
syncPrefsGroup->groupBox()->layout()->setMargin( 5 );
syncPrefsGroup->groupBox()->layout()->setSpacing( 0 );
}
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);
if ( QApplication::desktop()->width() > 300 )
syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical);
syncPrefsGroup->addRadio(i18n("24:00"));
syncPrefsGroup->addRadio(i18n("12:00am"));
syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical);
topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
@@ -462,37 +467,37 @@ void KDEPIMConfigWidget::setupLocaleTab()
topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1);
++iii;
tabWidget->addTab( topFrame, i18n( "Time Format" ) );
}
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);
}
QStringList list;
list = KGlobal::locale()->timeZoneList();
mTimeZoneCombo->insertStringList(list);
@@ -541,25 +546,25 @@ void KDEPIMConfigWidget::setupTimeZoneTab()
++iii;
QDate current ( 2001, 1,1);
mStartDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingStart-1));
mEndDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingEnd-1));
connect( mStartDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) );
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);
int i = 1;
KPrefsWidFont *timeLabelsFont =
addWidFont(i18n("Kx/Pi"),i18n("Application Font"),
&(KPimGlobalPrefs::instance()->mApplicationFont),topFrame);
topLayout->addWidget(timeLabelsFont->label(),i,0);
topLayout->addWidget(timeLabelsFont->preview(),i,1);
@@ -702,25 +707,25 @@ void KDEPIMConfigWidget::updateClientWidgets()
// at this point we assume, that mCurrentApp and mCurrentClient are set to the values that we want to display
QMap<ExternalAppHandler::Types, QString>::Iterator it = mExternalAppsMap.find ( mCurrentApp );
if (it == mExternalAppsMap.end())
return;
// 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)
{
//restore the edit fields with the data of the local membervariables if we had set it to "other".
//Otherwise take the default data from externalapphandler.
mChannel->setText(dai->_channel);
mMessage->setText(dai->_message);
mParameters->setText(dai->_parameters);
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
@@ -25,32 +25,34 @@
Enhanced Version of the file for platform independent KDE tools.
Copyright (c) 2004 Ulf Schenk
$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
public:
KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, const char *name = 0 );
public slots:
void textChanged( const QString& text );
@@ -97,25 +99,25 @@ class KDEPIMConfigWidget : public KPrefsWidget
KDateEdit* mStartDateSavingEdit;
KDateEdit* mEndDateSavingEdit;
// void restoreExtensionSettings();
// void saveExtensionSettings();
// KListView *mExtensionView;
// QCheckBox *mNameParsing;
// QCheckBox *mViewsSingleClickBox;
// QPushButton *mConfigureButton;
QComboBox* mExternalApps;
- QGroupBox* mExternalAppGroupBox;
+ Q3GroupBox* mExternalAppGroupBox;
QComboBox* mClient;
QLineEdit* mChannel;
QLineEdit* mMessage;
QLineEdit* mParameters;
QLineEdit* mMessage2;
QLineEdit* mParameters2;
ExternalAppHandler::Types mCurrentApp;
int mCurrentClient;
diff --git a/libkdepim/kdateedit.cpp b/libkdepim/kdateedit.cpp
index bf38479..28c88d4 100644
--- a/libkdepim/kdateedit.cpp
+++ b/libkdepim/kdateedit.cpp
@@ -18,39 +18,43 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
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 <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);
mDateEdit->installEventFilter(this);
// Highlight Background and Textcolor
QPalette palette = QWidget::palette();
unsigned char red, green, blue;
red = palette.color( QPalette::Normal , QColorGroup::Background ).red() - 10;
@@ -63,39 +67,39 @@ KDateEdit::KDateEdit(QWidget *parent, const char *name, bool withoutDP )
if ( withoutDP ) {
mDateFrame = 0;
mDateButton = 0;
mDatePicker = 0;
} else {
QPixmap pixmap = SmallIcon("smallcal");
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 &)),
SLOT(textChanged(const QString &)));
// Create the keyword list. This will be used to match against when the user
// enters information.
mKeywordMap[i18n("tomorrow")] = 1;
mKeywordMap[i18n("today")] = 0;
@@ -216,53 +220,53 @@ void KDateEdit::setDate( QDate date,int *cpos,const int key ,const bool dateForm
if( ( (space + allStrLength) <= *cpos && *cpos <= (space + allStrLength + strLength) ) || *cpos < begin ) {
break;
}
allStrLength += strLength;
begin = dateForm.find("%", begin +1);
}
// 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 ) );
} else if(key == Key_Down) {
setDate( date.addDays( -1 ) );
}
break;*/
}
@@ -335,57 +339,57 @@ QDate KDateEdit::date() const
KNotifyClient::beep();
return QDate::currentDate();
}
}
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 )
{
// return;
mDateEdit->setSelection( from , to );
}
void KDateEdit::toggleDatePicker()
diff --git a/libkdepim/kdateedit.h b/libkdepim/kdateedit.h
index 2d8c452..38eacde 100644
--- a/libkdepim/kdateedit.h
+++ b/libkdepim/kdateedit.h
@@ -15,50 +15,53 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
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.
*/
#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;
class KDateValidator;
/**
* A date editing widget that consists of a line edit followed by
* a small push button. The line edit contains the date in text form,
* and the push button will display a 'popup' style date picker.
*
* This widget also supports advanced features like allowing the user
* to type in the day name to get the date. The following keywords
* 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();
/** @return True if the date in the text edit is valid,
* false otherwise. This will not modify the display of the date,
* but only check for validity.
*/
bool inputIsValid();
@@ -119,25 +122,25 @@ class KDateEdit : public QHBox
QDate readDate() const;
/** Maps the text that the user can enter to the offset in days from
* today. For example, the text 'tomorrow' is mapped to +1.
*/
QMap<QString, int> mKeywordMap;
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 );
bool dateFormShort;
char lengthMonthName;
};
#endif
diff --git a/libkdepim/kdatepicker.cpp b/libkdepim/kdatepicker.cpp
index 68ef943..28b65cf 100644
--- a/libkdepim/kdatepicker.cpp
+++ b/libkdepim/kdatepicker.cpp
@@ -14,42 +14,46 @@
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#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)),
todayBut(new QToolButton(this)),
//line(new QLineEdit(this)),
val(new KDateValidator(this))
//table(new KDateTable(this)),
//fontsize(1)
{
diff --git a/libkdepim/kdatepicker.h b/libkdepim/kdatepicker.h
index 3db9a89..4d904da 100644
--- a/libkdepim/kdatepicker.h
+++ b/libkdepim/kdatepicker.h
@@ -11,26 +11,29 @@
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
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;
/**
* Provides a widget for calendar date input.
*
* Different from the
* previous versions, it now emits two types of signals, either
@@ -39,25 +42,25 @@ class KDateEdit;
*
* A line edit has been added in the newer versions to allow the user
* to select a date directly by entering numbers like 19990101
* or 990101.
*
* @image kdatepicker.png KDatePicker
*
* @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.
**/
KDatePicker(QWidget *parent=0,
QDate=QDate::currentDate(),
const char *name=0);
/**
* The destructor.
**/
diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp
index 9c28425..3677e87 100644
--- a/libkdepim/kpimglobalprefs.cpp
+++ b/libkdepim/kpimglobalprefs.cpp
@@ -29,25 +29,25 @@ $Id$
*/
#include <kglobal.h>
#include <kconfig.h>
#include <klocale.h>
#include <kdebug.h>
#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;
KPimGlobalPrefs::KPimGlobalPrefs( const QString &name )
: KPrefs("microkdeglobalrc")
{
mLocaleDict = 0;
KPrefs::setCurrentGroup("Fonts");
@@ -133,41 +133,41 @@ void KPimGlobalPrefs::setGlobalConfig()
mLocaleDict = 0;
if ( mPreferredLanguage > 0 && mPreferredLanguage < 5 ) {
if ( mPreferredLanguage == 1 )
fileName = fileName+"germantranslation.txt";
else if ( mPreferredLanguage == 4 )
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;
QString wt;
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);
ee = line.find("\",\"");
st = ee+3;
we = line.mid( se, ee-se );
if ( mPreferredLanguage == 4 )
wt = QString::fromUtf8(line.mid( st, et-st ).latin1());
else
diff --git a/libkdepim/kpimglobalprefs.h b/libkdepim/kpimglobalprefs.h
index 94ac8ae..01f5ab0 100644
--- a/libkdepim/kpimglobalprefs.h
+++ b/libkdepim/kpimglobalprefs.h
@@ -23,25 +23,25 @@
/*
Enhanced Version of the file for platform independent KDE tools.
Copyright (c) 2004 Ulf Schenk
$Id$
*/
#ifndef KPIMGLOBALPREFS_H
#define KPIMGLOBALPREFS_H
#include "kprefs.h"
-#include <qdict.h>
+#include <q3dict.h>
class KPimGlobalPrefs : public KPrefs
{
public:
void setGlobalConfig();
static KPimGlobalPrefs *instance();
virtual ~KPimGlobalPrefs();
@@ -76,25 +76,25 @@ class KPimGlobalPrefs : public KPrefs
};
enum SIPClients {
NONE_SIC = 0,
OTHER_SIC = 1,
KPPI_SIC = 2
};
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;
QString mUserDateFormatShort;
int mPreferredLanguage;
int mPreferredTime;
bool mWeekStartsOnSunday;
QString mTimeZoneId;
bool mUseDaylightsaving;
diff --git a/libkdepim/kprefsdialog.cpp b/libkdepim/kprefsdialog.cpp
index 6dc741d..358acbd 100644
--- a/libkdepim/kprefsdialog.cpp
+++ b/libkdepim/kprefsdialog.cpp
@@ -16,41 +16,42 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
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.
*/
// $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>
#include <kfontdialog.h>
#include <kmessagebox.h>
#include <kcolordialog.h>
#include <kiconloader.h>
#include "kprefs.h"
@@ -119,25 +120,25 @@ KColorButton *KPrefsDialogWidColor::button()
{
return mButton;
}
KPrefsDialogWidFont::KPrefsDialogWidFont(const QString &sampleText,const QString &labelText,
QFont *reference,QWidget *parent)
{
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 );
}
KPrefsDialogWidFont::~KPrefsDialogWidFont()
{
}
void KPrefsDialogWidFont::readConfig()
@@ -203,37 +204,37 @@ QLabel *KPrefsDialogWidTime::label()
QSpinBox *KPrefsDialogWidTime::spinBox()
{
return mSpin;
}
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()
{
mBox->setButton(*mReference);
}
void KPrefsDialogWidRadios::writeConfig()
{
*mReference = mBox->id(mBox->selected());
diff --git a/libkdepim/kprefsdialog.h b/libkdepim/kprefsdialog.h
index 52ec809..cc95dd4 100644
--- a/libkdepim/kprefsdialog.h
+++ b/libkdepim/kprefsdialog.h
@@ -15,37 +15,39 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
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.
*/
#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
This class provides the interface for the preferences widgets used by
KPrefsDialog.
*/
class KPrefsDialogWid : public QObject
{
public:
@@ -249,33 +251,33 @@ class KPrefsDialogWidRadios : public KPrefsDialogWid
virtual ~KPrefsDialogWidRadios();
/**
Add a radio button.
@param text Text of the button.
*/
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.
This class provides a widget for configuring string values. It is meant to be
used by KPrefsDialog. The user is responsible for the layout management.
*/
class KPrefsDialogWidString : public KPrefsDialogWid
{
public:
@@ -430,25 +432,25 @@ class KPrefsDialog : public KDialogBase
/** Set preferences to default values */
void slotDefault();
protected:
/** Implement this to read custom configuration widgets. */
virtual void usrReadConfig() {}
/** 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
{
Q_OBJECT
public:
KPimPrefsGlobalDialog(QWidget *parent=0,char *name=0,bool modal=true);
/**
Destructor.
*/
diff --git a/libkdepim/kprefswidget.cpp b/libkdepim/kprefswidget.cpp
index f6a0b38..51431e2 100644
--- a/libkdepim/kprefswidget.cpp
+++ b/libkdepim/kprefswidget.cpp
@@ -16,41 +16,42 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
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.
*/
// $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>
#include <kmessagebox.h>
#include <kcolordialog.h>
#include <kiconloader.h>
#include "kprefs.h"
@@ -122,25 +123,25 @@ KColorButton *KPrefsWidColor::button()
{
return mButton;
}
KPrefsWidFont::KPrefsWidFont(const QString &sampleText,const QString &labelText,
QFont *reference,QWidget *parent)
{
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 );
}
KPrefsWidFont::~KPrefsWidFont()
{
}
void KPrefsWidFont::readConfig()
@@ -209,38 +210,38 @@ QLabel *KPrefsWidTime::label()
QSpinBox *KPrefsWidTime::spinBox()
{
return mSpin;
}
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()
{
mBox->setButton(*mReference);
}
void KPrefsWidRadios::writeConfig()
{
*mReference = mBox->id(mBox->selected());
diff --git a/libkdepim/kprefswidget.h b/libkdepim/kprefswidget.h
index 8543a39..9de1be5 100644
--- a/libkdepim/kprefswidget.h
+++ b/libkdepim/kprefswidget.h
@@ -16,37 +16,39 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
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.
*/
// $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
This class provides the interface for the preferences widgets used by
KPrefsDialog.
*/
class KPrefsWid : public QObject
{
Q_OBJECT
@@ -256,33 +258,33 @@ class KPrefsWidRadios : public KPrefsWid
virtual ~KPrefsWidRadios();
/**
Add a radio button.
@param text Text of the button.
*/
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.
This class provides a widget for configuring string values. It is meant to be
used by KPrefsDialog. The user is responsible for the layout management.
*/
class KPrefsWidString : public KPrefsWid
{
public:
@@ -440,16 +442,16 @@ class KPrefsWidget : public QWidget
/** Set preferences to default values */
//US void slotDefault();
protected:
/** Implement this to read custom configuration widgets. */
virtual void usrReadConfig() {}
/** 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
@@ -26,53 +26,56 @@
#ifndef _WIN32_
#include <unistd.h>
#endif
#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;
}
KSyncManager::~KSyncManager()
{
delete bar;
}
void KSyncManager::setDefaultFileName( QString s)
@@ -80,25 +83,25 @@ void KSyncManager::setDefaultFileName( QString s)
mDefFileName = s ;
if ( mPrefs->mPassiveSyncAutoStart )
enableQuick( false );
}
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 ) {
mSyncMenu->insertItem( i18n("Enable Pi-Sync"), 2 );
} else {
mSyncMenu->insertItem( i18n("Disable Pi-Sync"), 3 );
}
mSyncMenu->insertSeparator();
mSyncMenu->insertItem( i18n("Multiple sync"), 1 );
@@ -346,25 +349,25 @@ void KSyncManager::slotSyncMenu( int action )
}
delete temp;
setBlockSave(false);
}
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);
lay.addWidget( &lab);
QLineEdit lepw ( &dia );
lepw.setText( mPrefs->mPassiveSyncPw );
QLabel label2 ( i18n("Password to enable\naccess from remote:"), &dia );
lay.addWidget( &label2);
@@ -795,25 +798,25 @@ void KSyncManager::syncRemote( KSyncProfile* prof, bool ask)
return;
} else {
mParent->topLevelWidget()->setCaption ( i18n( "Syncronization sucessfully completed" ) );
}
}
}
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 );
QLabel lab2 ( i18n("Remote IP address:"), &dia);
lay.addWidget( &lab2 );
QLineEdit le2 (&dia );
lay.addWidget( &le2 );
QLabel lab3 ( i18n("Remote port number:\n(May be: 1 - 65535)"), &dia);
lay.addWidget( &lab3 );
@@ -829,26 +832,26 @@ bool KSyncManager::edit_pisync_options()
mPassWordPiSync = le1.text();
mActiveSyncPort = le3.text();
mActiveSyncIP = le2.text();
return true;
}
return false;
}
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 );
QRadioButton ask( i18n("Ask for every entry on conflict"), &gr );
QRadioButton f_loc( i18n("Force: Take local entry always"), &gr );
QRadioButton f_rem( i18n("Force: Take remote entry always"), &gr );
//QRadioButton both( i18n("Take both on conflict"), &gr );
QPushButton pb ( "OK", &dia);
lay.addWidget( &pb );
@@ -882,25 +885,25 @@ bool KSyncManager::edit_sync_options()
mSyncAlgoPrefs = rem.isChecked()*1+newest.isChecked()*2+ ask.isChecked()*3+ f_loc.isChecked()*4+ f_rem.isChecked()*5;//+ both.isChecked()*6 ;
return true;
}
return false;
}
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);
lay.addWidget( &pb );
connect(&pb, SIGNAL( clicked() ), &dia, SLOT ( accept() ) );
dia.show();
int res = dia.exec();
if ( res )
retfile = lab.text();
@@ -1325,63 +1328,63 @@ void KSyncManager::readFileFromSocket()
if ( mWriteBackFile && syncOK ) {
mParent->topLevelWidget()->setCaption( i18n("Sending back file ...") );
commandSocket->writeFile( fileName );
}
else {
commandSocket->sendStop();
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;
mErrorMessage = 0;
}
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 )
{
// qDebug("KServerSocket:New connection %d ", socket);
if ( mPendingConnect ) {
qDebug("KSS::Error : new Connection");
return;
}
if ( mSocket ) {
mPendingConnect = socket;
QTimer::singleShot( 250, this , SLOT ( waitForSocketFinish()));
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()
{
QTimer::singleShot( 10, this , SLOT ( deleteSocket()));
}
void KServerSocket::deleteSocket()
{
//qDebug("KSS::deleteSocket");
@@ -1453,47 +1456,47 @@ void KServerSocket::displayErrorMessage()
{
if ( mErrorMessage == 1 ) {
KMessageBox::error( 0, i18n("Got send file request\nwith invalid password"), i18n("Pi-Sync Error"));
mErrorMessage = 0;
}
else if ( mErrorMessage == 2 ) {
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;
mSyncActionDialog = 0;
}
void KServerSocket::send_file()
{
//qDebug("MainWindow::sendFile(QSocket* s) ");
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;
if ( secs < 0 )
secs = secs * (-1);
if ( secs > 30 )
//if ( true )
{
QString warning = i18n("Clock skew of\nsyncing devices\nis %1 seconds!").arg( secs );
@@ -1527,45 +1530,45 @@ void KServerSocket::send_file()
} else {
mSyncActionDialog->setFixedSize( 230, 120);
}
} else
mSyncActionDialog->setFixedSize( 230, 120);
mSyncActionDialog->show();
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...") );
piTime.start();
piFileString = "";
QTimer::singleShot( 1, this , SLOT (readBackFileFromSocket( ) ));
}
@@ -1579,43 +1582,43 @@ void KServerSocket::readBackFileFromSocket()
//qDebug("readline: %s ", line.latin1());
mSyncActionDialog->setCaption( i18n("Received %1 bytes").arg( piFileString.length() ) );
}
if ( piTime.elapsed () < 3000 ) {
// wait for more
//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;
mSyncActionDialog = 0;
blockRC = false;
}
KCommandSocket::KCommandSocket ( QString remres, QString password, Q_UINT16 port, QString host, QObject * parent, QWidget * cap, const char * name ): QObject( parent, name )
@@ -1639,35 +1642,35 @@ KCommandSocket::KCommandSocket ( QString remres, QString password, Q_UINT16 port
connect( &mConnectProgress, SIGNAL ( cancelled () ), this, SLOT ( deleteSocket() ) );
mConnectCount = -1;
}
void KCommandSocket::sendFileRequest()
{
if ( tlw )
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 = "";
mFileName = fn;
mFirst = true;
if ( tlw )
tlw->setCaption( i18n("Trying to connect to remote...") );
mConnectCount = 30;mConnectMax = 30;
mTimerSocket->start( 1000, true );
@@ -1687,92 +1690,92 @@ void KCommandSocket::updateConnectDialog()
mConnectProgress.raise();
mConnectProgress.setProgress( (mConnectMax - mConnectCount)%30 );
--mConnectCount;
if ( mConnectCount > 0 )
mTimerSocket->start( 1000, true );
else
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 ) {
byteCount = 0;
mConnectProgress.setProgress( count );
}
QString temp = ts2.readLine();
count += temp.length();
byteCount += temp.length();
os2 << temp << "\r\n";
}
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 )
return;
mConnectProgress.setLabelText( i18n("Receiving file from remote...") );
mFirst = false;
mFileString = "";
mTime.start();
mFirstLine = true;
@@ -1820,43 +1823,43 @@ void KCommandSocket::readFileFromSocket()
}
if ( mTime.elapsed () < 3000 ) {
// wait for more
//qDebug("waitformore ");
QTimer::singleShot( 100, this , SLOT (readFileFromSocket( ) ));
return;
}
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() ");
mConnectProgress.hide();
if ( mConnectCount >= 0 ) {
mTimerSocket->stop();
mRetVal = errorTO;
qDebug("KCS::Connection to remote host timed out");
diff --git a/libkdepim/ksyncmanager.h b/libkdepim/ksyncmanager.h
index 71d17e9..32c6557 100644
--- a/libkdepim/ksyncmanager.h
+++ b/libkdepim/ksyncmanager.h
@@ -15,42 +15,44 @@
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
$Id$
*/
#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 );
void newConnection ( int socket ) ;
void setFileName( QString fn ) {mFileName = fn;};
signals:
void file_received( bool );
void request_file();
void file_received( bool, const QString &);
@@ -65,25 +67,25 @@ class KServerSocket : public QServerSocket
void displayErrorMessage();
void readBackFileFromSocket();
private :
int mPendingConnect;
QString mResource;
int mErrorMessage;
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;
};
class KCommandSocket : public QObject
{
Q_OBJECT
public:
enum state { successR, errorR, successW, errorW, errorTO, errorPW, errorCA, errorFI, errorUN, errorED,quiet };
KCommandSocket (QString remoteResource, QString password, Q_UINT16 port, QString host, QObject * parent=0, QWidget* cap = 0, const char * name=0 );
@@ -99,49 +101,49 @@ class KCommandSocket : public QObject
void commandFinished( KCommandSocket*, int );
private slots:
void startReadFileFromSocket();
void readFileFromSocket();
void deleteSocket();
void writeFileToSocket();
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;
QTime mTime;
QString mFileString;
bool mFirst;
bool mFirstLine;
};
class KSyncManager : public QObject
{
Q_OBJECT
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) ;
QString defaultFileName() { return mDefFileName ;}
QString syncFileName();
void enableQuick( bool ask = true);
bool syncWithDesktop () { return mSyncWithDesktop;}
QString getCurrentSyncDevice() { return mCurrentSyncDevice; }
@@ -210,26 +212,26 @@ class KSyncManager : public QObject
bool edit_sync_options();
bool edit_pisync_options();
int ringSync();
QString getPassword( );
bool mPisyncFinished;
QStringList mSpecificResources;
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();
};
class KSyncInterface
{
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp
index 2b87298..fd5bbca 100644
--- a/libkdepim/ksyncprefsdialog.cpp
+++ b/libkdepim/ksyncprefsdialog.cpp
@@ -14,46 +14,50 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
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 <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>
#include <kmessagebox.h>
#include <kcolordialog.h>
#include <kiconloader.h>
#include <kemailsettings.h>
#include <kstandarddirs.h>
#include <kfiledialog.h>
@@ -80,314 +84,314 @@ KSyncPrefsDialog::KSyncPrefsDialog(QWidget *parent, char *name, bool modal) :
setupSyncAlgTab();
}
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);
//++iii;
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 );
connect ( button, SIGNAL( clicked()), this, SLOT ( cloneProfile() ) );
button = new QPushButton( i18n("Delete profile"), buttonbox );
connect ( button, SIGNAL( clicked()), this, SLOT (deleteProfile() ) );
mProfileBox = new QComboBox(topFrame);
mProfileBox->setEditable ( true );
mProfileBox->setInsertionPolicy(QComboBox::NoInsertion);
connect ( mProfileBox, SIGNAL(activated ( int ) ), this, SLOT (profileChanged( int ) ) );
connect ( mProfileBox, SIGNAL( textChanged ( const QString & ) ), this, SLOT (textChanged( const QString & ) ) );
lab = new QLabel(mProfileBox, i18n("Profile:"), topFrame);
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 );
f_loc= new QRadioButton ( i18n("Force: Take local entry always"), gr );
f_rem = new QRadioButton ( i18n("Force: Take remote entry always"), gr );
// both = new QRadioButton ( i18n("Take both on conflict"), gr );
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) ) );
mIsPiSpecific = new QRadioButton ( i18n("Pi-Sync - selected calendars ( direct Kx/Pi to Kx/Pi sync )"), gr );
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 );
}
// ******************************************
// Profile kind specific settings END
}
void KSyncPrefsDialog::readResources()
@@ -459,25 +463,25 @@ void KSyncPrefsDialog::readFilter()
mFilterOutAB->insertStringList( temp );
mFilterInAB->insertStringList( temp );
}
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();
}
void KSyncPrefsDialog::accept()
{
slotOK();
}
void KSyncPrefsDialog::chooseFile()
diff --git a/libkdepim/ksyncprefsdialog.h b/libkdepim/ksyncprefsdialog.h
index d8c02de..1d7503e 100644
--- a/libkdepim/ksyncprefsdialog.h
+++ b/libkdepim/ksyncprefsdialog.h
@@ -16,40 +16,40 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
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.
*/
#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
{
Q_OBJECT
public:
/** Initialize dialog and pages */
KSyncPrefsDialog(QWidget *parent=0,char *name=0,bool modal=false);
~KSyncPrefsDialog();
@@ -77,48 +77,48 @@ class KSyncPrefsDialog : public KDialog
void helpDevice();
void helpModel();
void helpConnection();
protected:
void usrWriteConfig();
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;
QComboBox * mProfileBox;
QRadioButton* mIsLocal;
QRadioButton* mIsNotLocal;
QRadioButton* mIsPhone;
QRadioButton* mIsPi;
QRadioButton* mIsPiSpecific;
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;
QRadioButton* loc, *rem, *newest, *ask, *f_loc,* f_rem, *both;
QLineEdit * mRemotePostcommand;
QLineEdit * mRemotePrecommand;
QLineEdit * mRemoteFile;
@@ -143,28 +143,28 @@ class KSyncPrefsDialog : public KDialog
QLineEdit * mRemoteIPAB;
QLineEdit * mRemotePortAB;
QLineEdit * mRemotePwPWM;
QLineEdit * mRemoteIPPWM;
QLineEdit * mRemotePortPWM;
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;
QCheckBox* mShowSummaryAfterSync;
QCheckBox* mWriteContactToSIM;
QCheckBox* mIsKapiFileL;
QCheckBox* mIsKapiFileR;
};
diff --git a/libkdepim/ksyncprofile.h b/libkdepim/ksyncprofile.h
index 91fcfc5..1e41662 100644
--- a/libkdepim/ksyncprofile.h
+++ b/libkdepim/ksyncprofile.h
@@ -11,25 +11,25 @@
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
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>
#include <libkcal/syncdefines.h>
class KConfig;
diff --git a/libkdepim/libkdepim.pro b/libkdepim/libkdepim.pro
index 7160d0e..fb27311 100644
--- a/libkdepim/libkdepim.pro
+++ b/libkdepim/libkdepim.pro
@@ -1,16 +1,16 @@
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 : {
OBJECTS_DIR = obj/unix
MOC_DIR = moc/unix
}
win32: {
DEFINES += _WIN32_
OBJECTS_DIR = obj/win
@@ -65,12 +65,14 @@ importol {
debug: {
LIBS += mfc71ud.lib
}
release: {
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,18 +1,18 @@
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
INTERFACES = \
HEADERS = \
categoryeditdialog.h \
categoryeditdialog_base.h \
categoryselectdialog.h \
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
@@ -13,89 +13,89 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
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>
#include <kstaticdeleter.h>
#include <kdialogbase.h>
#include <ol_access.h>
#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:
DWORD mData;
QString mDataID;
};
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()
{
if ( !sInstance ) {
sInstance = staticDeleterPim.setObject( new OL_access() );
}
return sInstance;
}
@@ -140,49 +140,49 @@ void OL_access::readContactData( LPDISPATCH dispItem, KABC::Addressee::List* li
dispItem->AddRef();
MAPIFolder mf(dispItem);
mf.m_lpDispatch->AddRef();
_Items folderItems;
_variant_t indx((long)0);
LPDISPATCH itm;
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 );
bar.show();
for(i=1; i <= folderItems.GetCount(); ++i)
{
qApp->processEvents();
if ( ! bar.isVisible() )
return ;
bar.setProgress( i );
indx = (long)i;
itm = folderItems.Item(indx.Detach());
_ContactItem * pItem = (_ContactItem *)&itm;
list->append( ol2kapiContact( pItem, syncMode ) );
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);
mfRoot = mfInbox.GetParent();
szName = mfRoot.GetName();
long iType = mfRoot.GetDefaultItemType();
QString mes;
mes = QString::fromUcs2( szName.GetBuffer() );
OLEListViewItem * root = new OLEListViewItem( listView, mes );
@@ -1126,51 +1126,51 @@ QDateTime mDdate2Qdtr( DATE dt)
return qdt;
}
DATE Qdt2date( QDateTime dt )
{
DATE ddd;
COleDateTime odt;
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:
DWORD mData;
QString mDataID;
};
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 );
}
KAImportOLdialog::~KAImportOLdialog()
{
}
@@ -1294,25 +1294,25 @@ void KAImportOLdialog::readContactData( DWORD folder )
dispItem->AddRef();
MAPIFolder mf(dispItem);
mf.m_lpDispatch->AddRef();
_Items folderItems;
_variant_t indx((long)0);
LPDISPATCH itm;
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 );
bar.show();
for(i=1; i <= folderItems.GetCount(); ++i)
{
qApp->processEvents();
if ( ! bar.isVisible() )
return ;
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
@@ -28,25 +28,25 @@
#include <kdialogbase.h>
#include <kabc/addressee.h>
#include <kabc/addressbook.h>
#include <afxdisp.h>
#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:
static OL_access *instance();
~OL_access();
//static converter methods
static QDateTime mDdate2Qdtr( DATE dt);
static DATE Qdt2date( QDateTime dt );
static KABC::Addressee ol2kapiContact( _ContactItem * aItem , bool syncMode);
@@ -123,25 +123,25 @@ class KAImportOLdialog : public KDialogBase
prote_cted slo_ts:
void slotApply();
void slotOk();
void slotCancel();
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;
};
class KAwritebackOL : public QObject
{
Q__OBJECT
public:
KAwritebackOL( const QString &olFolderID );
diff --git a/libkdepim/phoneaccess.cpp b/libkdepim/phoneaccess.cpp
index 89db22b..0ea73f5 100644
--- a/libkdepim/phoneaccess.cpp
+++ b/libkdepim/phoneaccess.cpp
@@ -13,54 +13,57 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
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"
void PhoneAccess::writeConfig( QString device, QString connection, QString model )
{
#ifdef _WIN32_
QString fileName = qApp->applicationDirPath () +"\\gammurc";
#else
QString fileName = QDir::homeDirPath() +"/.gammurc";
#endif
//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" ) {
content += line ;
addPort = false;
//qDebug("port found" );
}
} else if ( line.left(5 ) == "model" ) {
@@ -106,30 +109,30 @@ void PhoneAccess::writeConfig( QString device, QString connection, QString model
content += "port = ";
content += device;
content += "\n";
}
if ( addModel ) {
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();
}
}
bool PhoneAccess::writeToPhone( QString fileName)
{
#ifdef DESKTOP_VERSION
#ifdef _WIN32_