summaryrefslogtreecommitdiffabout
path: root/kaddressbook
authorMichael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
committer Michael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
commita08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (side-by-side diff)
tree8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kaddressbook
parent11edc920afe4f274c0964436633aa632c8288a40 (diff)
downloadkdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2
initial public commit of qt4 portp1
Diffstat (limited to 'kaddressbook') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/addresseditwidget.cpp55
-rw-r--r--kaddressbook/addresseditwidget.h18
-rw-r--r--kaddressbook/addresseeconfig.cpp6
-rw-r--r--kaddressbook/addresseeconfig.h6
-rw-r--r--kaddressbook/addresseeeditordialog.cpp9
-rw-r--r--kaddressbook/addresseeeditorwidget.cpp46
-rw-r--r--kaddressbook/addresseeeditorwidget.h12
-rw-r--r--kaddressbook/addresseeutil.cpp2
-rw-r--r--kaddressbook/addviewdialog.cpp16
-rw-r--r--kaddressbook/addviewdialog.h10
-rw-r--r--kaddressbook/details/detailsviewcontainer.cpp19
-rw-r--r--kaddressbook/details/detailsviewcontainer.h8
-rw-r--r--kaddressbook/details/look_basic.cpp6
-rw-r--r--kaddressbook/details/look_basic.h4
-rw-r--r--kaddressbook/details/look_details.cpp12
-rw-r--r--kaddressbook/details/look_details.h4
-rw-r--r--kaddressbook/details/look_html.cpp6
-rw-r--r--kaddressbook/emaileditwidget.cpp16
-rw-r--r--kaddressbook/emaileditwidget.h10
-rw-r--r--kaddressbook/extensionmanager.cpp14
-rw-r--r--kaddressbook/extensionmanager.h10
-rw-r--r--kaddressbook/extensionwidget.cpp5
-rw-r--r--kaddressbook/extensionwidget.h4
-rw-r--r--kaddressbook/features/distributionlistwidget.cpp39
-rw-r--r--kaddressbook/features/distributionlistwidget.h13
-rw-r--r--kaddressbook/features/mergewidget.cpp14
-rw-r--r--kaddressbook/features/mergewidget.h2
-rw-r--r--kaddressbook/filter.cpp2
-rw-r--r--kaddressbook/filter.h4
-rw-r--r--kaddressbook/filtereditdialog.cpp38
-rw-r--r--kaddressbook/filtereditdialog.h9
-rw-r--r--kaddressbook/geowidget.cpp35
-rw-r--r--kaddressbook/geowidget.h4
-rw-r--r--kaddressbook/imagewidget.cpp32
-rw-r--r--kaddressbook/imagewidget.h3
-rw-r--r--kaddressbook/incsearchwidget.cpp14
-rw-r--r--kaddressbook/jumpbuttonbar.cpp13
-rw-r--r--kaddressbook/jumpbuttonbar.h11
-rw-r--r--kaddressbook/kabcore.cpp146
-rw-r--r--kaddressbook/kabcore.h40
-rw-r--r--kaddressbook/kabprefs.cpp4
-rw-r--r--kaddressbook/kabprefs.h8
-rw-r--r--kaddressbook/kaddressbook.pro46
-rw-r--r--kaddressbook/kaddressbookE.pro6
-rw-r--r--kaddressbook/kaddressbookmain.cpp22
-rw-r--r--kaddressbook/kaddressbookmain.h14
-rw-r--r--kaddressbook/kaddressbookview.cpp8
-rw-r--r--kaddressbook/kaddressbookview.h12
-rw-r--r--kaddressbook/kcmconfigs/addresseewidget.cpp36
-rw-r--r--kaddressbook/kcmconfigs/addresseewidget.h8
-rw-r--r--kaddressbook/kcmconfigs/extensionconfigdialog.cpp11
-rw-r--r--kaddressbook/kcmconfigs/kabconfigwidget.cpp59
-rw-r--r--kaddressbook/kcmconfigs/kabconfigwidget.h6
-rw-r--r--kaddressbook/kcmconfigs/kcmkabconfig.cpp8
-rw-r--r--kaddressbook/keywidget.cpp28
-rw-r--r--kaddressbook/mainembedded.cpp5
-rw-r--r--kaddressbook/nameeditdialog.cpp12
-rw-r--r--kaddressbook/old_mainwindow.cpp12
-rw-r--r--kaddressbook/phoneeditwidget.cpp60
-rw-r--r--kaddressbook/phoneeditwidget.h24
-rw-r--r--kaddressbook/secrecywidget.cpp8
-rw-r--r--kaddressbook/undo.cpp4
-rw-r--r--kaddressbook/undo.h4
-rw-r--r--kaddressbook/undocmds.cpp2
-rw-r--r--kaddressbook/viewconfigurefieldspage.cpp54
-rw-r--r--kaddressbook/viewconfigurefieldspage.h8
-rw-r--r--kaddressbook/viewconfigurefilterpage.cpp15
-rw-r--r--kaddressbook/viewconfigurefilterpage.h4
-rw-r--r--kaddressbook/viewconfigurewidget.cpp19
-rw-r--r--kaddressbook/viewconfigurewidget.h4
-rw-r--r--kaddressbook/viewmanager.cpp30
-rw-r--r--kaddressbook/viewmanager.h12
-rw-r--r--kaddressbook/views/cardview.cpp114
-rw-r--r--kaddressbook/views/cardview.h14
-rw-r--r--kaddressbook/views/colorlistbox.cpp25
-rw-r--r--kaddressbook/views/colorlistbox.h15
-rw-r--r--kaddressbook/views/configurecardviewdialog.cpp57
-rw-r--r--kaddressbook/views/configurecardviewdialog.h6
-rw-r--r--kaddressbook/views/configuretableviewdialog.cpp35
-rw-r--r--kaddressbook/views/configuretableviewdialog.h6
-rw-r--r--kaddressbook/views/contactlistview.cpp32
-rw-r--r--kaddressbook/views/contactlistview.h6
-rw-r--r--kaddressbook/views/kaddressbookcardview.cpp19
-rw-r--r--kaddressbook/views/kaddressbookcardview.h3
-rw-r--r--kaddressbook/views/kaddressbookiconview.cpp60
-rw-r--r--kaddressbook/views/kaddressbookiconview.h29
-rw-r--r--kaddressbook/views/kaddressbooktableview.cpp56
-rw-r--r--kaddressbook/views/kaddressbooktableview.h18
-rw-r--r--kaddressbook/xxport/csv_xxport.cpp14
-rw-r--r--kaddressbook/xxport/csvimportdialog.cpp66
-rw-r--r--kaddressbook/xxport/csvimportdialog.h12
-rw-r--r--kaddressbook/xxport/kde2_xxport.cpp4
-rw-r--r--kaddressbook/xxport/vcard_xxport.cpp20
-rw-r--r--kaddressbook/xxportmanager.cpp17
-rw-r--r--kaddressbook/xxportmanager.h4
-rw-r--r--kaddressbook/xxportobject.cpp4
-rw-r--r--kaddressbook/xxportselectdialog.cpp59
-rw-r--r--kaddressbook/xxportselectdialog.h12
98 files changed, 1095 insertions, 882 deletions
diff --git a/kaddressbook/addresseditwidget.cpp b/kaddressbook/addresseditwidget.cpp
index 3dcd592..83908d0 100644
--- a/kaddressbook/addresseditwidget.cpp
+++ b/kaddressbook/addresseditwidget.cpp
@@ -23,22 +23,29 @@
*/
-#include <qbuttongroup.h>
+#include <q3buttongroup.h>
#include <qcheckbox.h>
-#include <qhbox.h>
+#include <q3hbox.h>
#include <qlabel.h>
#include <qlayout.h>
-#include <qlistbox.h>
-#include <qlistview.h>
+#include <q3listbox.h>
+#include <q3listview.h>
#include <qpushbutton.h>
-#include <qsignal.h>
+#include <q3signal.h>
#include <qstring.h>
#include <qapplication.h>
+#include <QDesktopWidget>
+
+#include <Q3VBoxLayout>
+#include <Q3GridLayout>
#ifndef KAB_EMBEDDED
-#include <qtextedit.h>
+#include <q3textedit.h>
+//Added by qt3to4:
+#include <Q3ValueList>
+#include <Q3VBoxLayout>
#include <kaccelmanager.h>
#include <kbuttonbox.h>
#else //KAB_EMBEDDED
-#include <qmultilineedit.h>
+#include <q3multilineedit.h>
#endif //KAB_EMBEDDED
@@ -68,7 +75,7 @@ AddressEditWidget::AddressEditWidget( QWidget *parent, const char *name )
mConfig = AddresseeConfig::instance();
- QVBoxLayout *layout = new QVBoxLayout( this );
+ Q3VBoxLayout *layout = new Q3VBoxLayout( this );
layout->setSpacing( KDialog::spacingHintSmall() );
- QHBox *b1 = new QHBox( this);
+ Q3HBox *b1 = new Q3HBox( this);
//QLabel * label = new QLabel( b1 );
//label->setPixmap( KGlobal::iconLoader()->loadIcon( "gohome", KIcon::Desktop, 0 ) );
@@ -85,9 +92,9 @@ AddressEditWidget::AddressEditWidget( QWidget *parent, const char *name )
#ifndef KAB_EMBEDDED
- mAddressTextEdit = new QTextEdit( this );
+ mAddressTextEdit = new Q3TextEdit( this );
mAddressTextEdit->setReadOnly( true );
mAddressTextEdit->setMinimumHeight( 20 );
#else //KAB_EMBEDDED
- mAddressTextEdit = new QMultiLineEdit( this );
+ mAddressTextEdit = new Q3MultiLineEdit( this );
mAddressTextEdit->setReadOnly( true );
mAddressTextEdit->setMinimumHeight( 20 );
@@ -127,11 +134,11 @@ void AddressEditWidget::setAddresses( const KABC::Addressee &addr,
mTypeCombo->insertTypeList( list );
- QValueList<int> defaultTypes;
+ Q3ValueList<int> defaultTypes;
defaultTypes << KABC::Address::Home;
defaultTypes << KABC::Address::Work;
mConfig->setUid( mAddressee.uid() );
- QValueList<int> configList = mConfig->noDefaultAddrTypes();
- QValueList<int>::ConstIterator it;
+ Q3ValueList<int> configList = mConfig->noDefaultAddrTypes();
+ Q3ValueList<int>::ConstIterator it;
for ( it = configList.begin(); it != configList.end(); ++it )
defaultTypes.remove( *it );
@@ -182,5 +189,5 @@ void AddressEditWidget::edit()
mConfig->setUid( mAddressee.uid() );
- QValueList<int> configList;
+ Q3ValueList<int> configList;
if ( !hasHome ) {
configList << KABC::Address::Home;
@@ -256,5 +263,5 @@ AddressEditDialog::AddressEditDialog( const KABC::Address::List &list,
QWidget *page = plainPage();
- QGridLayout *topLayout = new QGridLayout( page, 8, 2 );
+ Q3GridLayout *topLayout = new Q3GridLayout( page, 8, 2 );
topLayout->setSpacing( spacingHintSmall() );
@@ -267,7 +274,7 @@ AddressEditDialog::AddressEditDialog( const KABC::Address::List &list,
#ifndef KAB_EMBEDDED
- mStreetTextEdit = new QTextEdit( page );
+ mStreetTextEdit = new Q3TextEdit( page );
#else //KAB_EMBEDDED
- mStreetTextEdit = new QMultiLineEdit( page );
+ mStreetTextEdit = new Q3MultiLineEdit( page );
//US qDebug("AddressEditDialog::AddressEditDialog has to be changed");
#endif //KAB_EMBEDDED
@@ -312,5 +319,5 @@ AddressEditDialog::AddressEditDialog( const KABC::Address::List &list,
label->setBuddy( mCountryCombo );
topLayout->addWidget( mCountryCombo, 6, 1 );
- mCountryCombo->setSizeLimit( 8);
+ mCountryCombo->setMaxVisibleItems( 8);
mPreferredCheckBox = new QCheckBox( i18n( "This is the preferred address" ), page );
topLayout->addMultiCellWidget( mPreferredCheckBox, 7, 7, 0, 1 );
@@ -319,5 +326,5 @@ AddressEditDialog::AddressEditDialog( const KABC::Address::List &list,
topLayout->addMultiCellWidget( sep, 8, 8, 0, 1 );
*/
- QHBox *buttonBox = new QHBox( page );
+ Q3HBox *buttonBox = new Q3HBox( page );
buttonBox->setSpacing( spacingHint() );
topLayout->addMultiCellWidget( buttonBox, 9, 9, 0, 1 );
@@ -584,7 +591,7 @@ AddressTypeDialog::AddressTypeDialog( int type, QWidget *parent )
{
QWidget *page = plainPage();
- QVBoxLayout *layout = new QVBoxLayout( page );
+ Q3VBoxLayout *layout = new Q3VBoxLayout( page );
- mGroup = new QButtonGroup( 2, Horizontal, i18n( "Address Types" ), page );
+ mGroup = new Q3ButtonGroup( 2, Qt::Horizontal, i18n( "Address Types" ), page );
layout->addWidget( mGroup );
@@ -618,5 +625,5 @@ int AddressTypeDialog::type() const
}
-#ifndef KAB_EMBEDDED
-#include "addresseditwidget.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_addresseditwidget.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/addresseditwidget.h b/kaddressbook/addresseditwidget.h
index bc96d74..1d4e138 100644
--- a/kaddressbook/addresseditwidget.h
+++ b/kaddressbook/addresseditwidget.h
@@ -34,11 +34,11 @@
#include "typecombo.h"
-class QButtonGroup;
+class Q3ButtonGroup;
class QCheckBox;
-class QListView;
+class Q3ListView;
#ifndef KAB_EMBEDDED
-class QTextEdit;
+class Q3TextEdit;
#else //KAB_EMBEDDED
-class QMultiLineEdit;
+class Q3MultiLineEdit;
#endif //KAB_EMBEDDED
class QToolButton;
@@ -82,7 +82,7 @@ class AddressEditWidget : public QWidget
QPushButton *mEditButton;
#ifndef KAB_EMBEDDED
- QTextEdit *mAddressTextEdit;
+ Q3TextEdit *mAddressTextEdit;
#else //KAB_EMBEDDED
- QMultiLineEdit *mAddressTextEdit;
+ Q3MultiLineEdit *mAddressTextEdit;
#endif //KAB_EMBEDDED
@@ -121,7 +121,7 @@ class AddressEditDialog : public KDialogBase
AddressTypeCombo *mTypeCombo;
#ifndef KAB_EMBEDDED
- QTextEdit *mStreetTextEdit;
+ Q3TextEdit *mStreetTextEdit;
#else //KAB_EMBEDDED
- QMultiLineEdit *mStreetTextEdit;
+ Q3MultiLineEdit *mStreetTextEdit;
#endif //KAB_EMBEDDED
KComboBox *mCountryCombo;
@@ -152,5 +152,5 @@ class AddressTypeDialog : public KDialogBase
private:
- QButtonGroup *mGroup;
+ Q3ButtonGroup *mGroup;
KABC::Address::TypeList mTypeList;
diff --git a/kaddressbook/addresseeconfig.cpp b/kaddressbook/addresseeconfig.cpp
index ea0436f..81b1bf4 100644
--- a/kaddressbook/addresseeconfig.cpp
+++ b/kaddressbook/addresseeconfig.cpp
@@ -27,4 +27,6 @@
#include <kstandarddirs.h>
#include <qfileinfo.h>
+//Added by qt3to4:
+#include <Q3ValueList>
using namespace KABC;
@@ -78,5 +80,5 @@ void AddresseeConfig::setAutomaticNameParsing( bool value )
}
-void AddresseeConfig::setNoDefaultAddrTypes( const QValueList<int> &types )
+void AddresseeConfig::setNoDefaultAddrTypes( const Q3ValueList<int> &types )
{
AddresseeConfig::config()->writeEntry( "NoDefaultAddrTypes", types );
@@ -84,5 +86,5 @@ void AddresseeConfig::setNoDefaultAddrTypes( const QValueList<int> &types )
}
- QValueList<int> AddresseeConfig::noDefaultAddrTypes() const
+ Q3ValueList<int> AddresseeConfig::noDefaultAddrTypes() const
{
return AddresseeConfig::config()->readIntListEntry( "NoDefaultAddrTypes" );
diff --git a/kaddressbook/addresseeconfig.h b/kaddressbook/addresseeconfig.h
index 47fbdd6..f6bb3e9 100644
--- a/kaddressbook/addresseeconfig.h
+++ b/kaddressbook/addresseeconfig.h
@@ -27,4 +27,6 @@
#include <kabc/addressee.h>
#include <kconfig.h>
+//Added by qt3to4:
+#include <Q3ValueList>
using namespace KABC;
@@ -44,6 +46,6 @@ class AddresseeConfig
bool automaticNameParsing();
- void setNoDefaultAddrTypes( const QValueList<int> &types );
- QValueList<int> noDefaultAddrTypes() const;
+ void setNoDefaultAddrTypes( const Q3ValueList<int> &types );
+ Q3ValueList<int> noDefaultAddrTypes() const;
void remove( const QString & uid);
diff --git a/kaddressbook/addresseeeditordialog.cpp b/kaddressbook/addresseeeditordialog.cpp
index b5a60f2..b925a07 100644
--- a/kaddressbook/addresseeeditordialog.cpp
+++ b/kaddressbook/addresseeeditordialog.cpp
@@ -24,4 +24,7 @@
#include <qlayout.h>
#include <qapplication.h>
+#include <QDesktopWidget>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
#include <kdebug.h>
@@ -44,5 +47,5 @@ AddresseeEditorDialog::AddresseeEditorDialog( KABCore *core, QWidget *parent,
QWidget *page = plainPage();
- QVBoxLayout *layout = new QVBoxLayout( page );
+ Q3VBoxLayout *layout = new Q3VBoxLayout( page );
mEditorWidget = new AddresseeEditorWidget( core, false, page );
@@ -119,5 +122,5 @@ void AddresseeEditorDialog::slotCancel()
}
-#ifndef KAB_EMBEDDED
-#include "addresseeeditordialog.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_addresseeeditordialog.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/addresseeeditorwidget.cpp b/kaddressbook/addresseeeditorwidget.cpp
index 4313998..a95db03 100644
--- a/kaddressbook/addresseeeditorwidget.cpp
+++ b/kaddressbook/addresseeeditorwidget.cpp
@@ -23,8 +23,8 @@
#include <qcheckbox.h>
-#include <qhbox.h>
+#include <q3hbox.h>
#include <qlabel.h>
#include <qlayout.h>
-#include <qlistbox.h>
+#include <q3listbox.h>
#include <qpushbutton.h>
#include <qtabwidget.h>
@@ -32,5 +32,9 @@
#ifndef KAB_EMBEDDED
-#include <qtextedit.h>
+#include <q3textedit.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
+#include <Q3PopupMenu>
+#include <Q3VBoxLayout>
#include <kaccelmanager.h>
@@ -39,5 +43,5 @@
#else //KAB_EMBEDDED
-#include <qmultilineedit.h>
+#include <q3multilineedit.h>
#endif //KAB_EMBEDDED
@@ -131,5 +135,5 @@ void AddresseeEditorWidget::textChanged( const QString& )
void AddresseeEditorWidget::initGUI()
{
- QVBoxLayout *layout = new QVBoxLayout( this );
+ Q3VBoxLayout *layout = new Q3VBoxLayout( this );
mTabWidget = new QTabWidget( this );
@@ -161,5 +165,5 @@ void AddresseeEditorWidget::setupTab1()
maxCol = 3;
}
- QGridLayout *layout = new QGridLayout( tab1, 7-maxCol, maxCol );
+ Q3GridLayout *layout = new Q3GridLayout( tab1, 7-maxCol, maxCol );
layout->setMargin( KDialogBase::marginHintSmall() );
@@ -328,5 +332,5 @@ void AddresseeEditorWidget::setupTab1()
*/
///////////////////////////////////////
- QHBox *categoryBox = new QHBox( tab1 ,"cato");
+ Q3HBox *categoryBox = new Q3HBox( tab1 ,"cato");
categoryBox->setSpacing( KDialogBase::spacingHint() );
categoryBox->setMargin( KDialogBase::marginHintSmall() );
@@ -338,5 +342,5 @@ void AddresseeEditorWidget::setupTab1()
mCategoryEdit = new QPushButton ( categoryBox );
mCategoryEdit->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::Fixed ,FALSE) );
- mCatPopup = new QPopupMenu ( categoryBox );
+ mCatPopup = new Q3PopupMenu ( categoryBox );
mCategoryEdit->setPopup( mCatPopup );
connect(mCatPopup,SIGNAL(aboutToShow () ), this ,SLOT(showCatPopup()));
@@ -412,5 +416,5 @@ void AddresseeEditorWidget::setupTab1_1()
//US QGridLayout *layout = new QGridLayout( tab1_1, 11, 7 );
- QGridLayout *layout = new QGridLayout( tab1_1, 7, 2 );
+ Q3GridLayout *layout = new Q3GridLayout( tab1_1, 7, 2 );
layout->setMargin( KDialogBase::marginHintSmall() );
layout->setSpacing( KDialogBase::spacingHintSmall() );
@@ -613,5 +617,5 @@ void AddresseeEditorWidget::setupTab2()
QWidget *tab2 = new QWidget( mTabWidget );
- QGridLayout *layout = new QGridLayout( tab2, 8, 3 );
+ Q3GridLayout *layout = new Q3GridLayout( tab2, 8, 3 );
layout->setMargin( KDialogBase::marginHintSmall() );
layout->setSpacing( KDialogBase::spacingHintSmall() );
@@ -692,5 +696,5 @@ void AddresseeEditorWidget::setupTab2()
if ( QApplication::desktop()->width() == 640 ) {
- QHBox * nbox = new QHBox ( tab2 );
+ Q3HBox * nbox = new Q3HBox ( tab2 );
label = new QLabel( i18n( "Nick name:" )+" ", nbox );
mNicknameEdit = new KLineEdit( nbox );
@@ -736,5 +740,5 @@ void AddresseeEditorWidget::setupTab2()
++iii;
if ( QApplication::desktop()->width() == 640 ) {
- QHBox * nbox = new QHBox ( tab2 );
+ Q3HBox * nbox = new Q3HBox ( tab2 );
label = new QLabel( i18n( "Birthday:" )+" ", nbox );
mBirthdayPicker = new KDateEdit( nbox );
@@ -805,5 +809,5 @@ void AddresseeEditorWidget::setupTab2_1()
QWidget *tab2_2 = new QWidget( mTabWidget );
- QGridLayout *layout = new QGridLayout( tab2_2, 1, 2 );
+ Q3GridLayout *layout = new Q3GridLayout( tab2_2, 1, 2 );
layout->setMargin( KDialogBase::marginHintSmall() );
layout->setSpacing( KDialogBase::spacingHintSmall() );
@@ -927,10 +931,10 @@ void AddresseeEditorWidget::setupTab2_1()
layout->addWidget( label, 0, 0 );
#ifndef KAB_EMBEDDED
- mNoteEdit = new QTextEdit( tab2_2 );
- mNoteEdit->setWordWrap( QTextEdit::WidgetWidth );
+ mNoteEdit = new Q3TextEdit( tab2_2 );
+ mNoteEdit->setWordWrap( Q3TextEdit::WidgetWidth );
mNoteEdit->setMinimumSize( mNoteEdit->sizeHint() );
#else //KAB_EMBEDDED
- mNoteEdit = new QMultiLineEdit( tab2_2 );
- mNoteEdit->setWordWrap( QMultiLineEdit::WidgetWidth );
+ mNoteEdit = new Q3MultiLineEdit( tab2_2 );
+ mNoteEdit->setWordWrap( Q3MultiLineEdit::WidgetWidth );
mNoteEdit->setMinimumSize( mNoteEdit->sizeHint() );
#endif //KAB_EMBEDDED
@@ -954,5 +958,5 @@ void AddresseeEditorWidget::setupTab3()
QWidget *tab3 = new QWidget( mTabWidget );
- QGridLayout *layout = new QGridLayout( tab3, 1, 1 );
+ Q3GridLayout *layout = new Q3GridLayout( tab3, 1, 1 );
layout->setMargin( KDialogBase::marginHintSmall() );
layout->setSpacing( KDialogBase::spacingHintSmall() );
@@ -1006,5 +1010,5 @@ void AddresseeEditorWidget::setupTab3_1()
//US QGridLayout *layout = new QGridLayout( tab3, 2, 3 );
- QGridLayout *layout = new QGridLayout( tab3, 1, 1 );
+ Q3GridLayout *layout = new Q3GridLayout( tab3, 1, 1 );
layout->setMargin( KDialogBase::marginHint() );
layout->setSpacing( KDialogBase::spacingHint() );
@@ -1431,5 +1435,5 @@ QString AddresseeEditorWidget::identifier() const
}
-#ifndef KAB_EMBEDDED
-#include "addresseeeditorwidget.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_addresseeeditorwidget.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/addresseeeditorwidget.h b/kaddressbook/addresseeeditorwidget.h
index 816bbb5..aa1207e 100644
--- a/kaddressbook/addresseeeditorwidget.h
+++ b/kaddressbook/addresseeeditorwidget.h
@@ -26,5 +26,5 @@
#include <qdatetime.h>
-#include <qpopupmenu.h>
+#include <q3popupmenu.h>
#include <qcombobox.h>
@@ -41,7 +41,7 @@ class QTabWidget;
#ifndef KAB_EMBEDDED
-class QTextEdit;
+class Q3TextEdit;
#else //KAB_EMBEDDED
-class QMultiLineEdit;
+class Q3MultiLineEdit;
#endif //KAB_EMBEDDED
@@ -156,5 +156,5 @@ class AddresseeEditorWidget : public ExtensionWidget
KLineEdit *mIMAddressEdit;
QPushButton *mCategoryEdit;
- QPopupMenu *mCatPopup;
+ Q3PopupMenu *mCatPopup;
SecrecyWidget *mSecrecyWidget;
KSqueezedTextLabel *mNameLabel;
@@ -173,7 +173,7 @@ class AddresseeEditorWidget : public ExtensionWidget
KDateEdit *mAnniversaryPicker;
#ifndef KAB_EMBEDDED
- QTextEdit *mNoteEdit;
+ Q3TextEdit *mNoteEdit;
#else //KAB_EMBEDDED
- QMultiLineEdit *mNoteEdit;
+ Q3MultiLineEdit *mNoteEdit;
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/addresseeutil.cpp b/kaddressbook/addresseeutil.cpp
index 366384a..a860f6d 100644
--- a/kaddressbook/addresseeutil.cpp
+++ b/kaddressbook/addresseeutil.cpp
@@ -47,5 +47,5 @@ QString AddresseeUtil::addresseesToClipboard( const KABC::Addressee::List &list
KABC::Addressee::List AddresseeUtil::clipboardToAddressees( const QString &data )
{
- uint numVCards = data.contains( "BEGIN:VCARD", false );
+ uint numVCards = data.count( "BEGIN:VCARD", Qt::CaseInsensitive );
QStringList dataList = QStringList::split( "\r\n\r\n", data );
diff --git a/kaddressbook/addviewdialog.cpp b/kaddressbook/addviewdialog.cpp
index 6def26b..b52a83c 100644
--- a/kaddressbook/addviewdialog.cpp
+++ b/kaddressbook/addviewdialog.cpp
@@ -26,8 +26,10 @@
#include <qradiobutton.h>
-#include <qbuttongroup.h>
+#include <q3buttongroup.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qlayout.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
#include <klocale.h>
@@ -36,5 +38,5 @@
#include "addviewdialog.h"
-AddViewDialog::AddViewDialog( QDict<ViewFactory> *viewFactoryDict,
+AddViewDialog::AddViewDialog( Q3Dict<ViewFactory> *viewFactoryDict,
QWidget *parent, const char *name )
: KDialogBase( KDialogBase::Plain, i18n( "Add View" ),
@@ -49,5 +51,5 @@ AddViewDialog::AddViewDialog( QDict<ViewFactory> *viewFactoryDict,
QWidget *page = plainPage();
- QGridLayout *layout = new QGridLayout( page, 2, 2 );
+ Q3GridLayout *layout = new Q3GridLayout( page, 2, 2 );
layout->setSpacing( spacingHint() );
layout->setRowStretch( 1, 1 );
@@ -62,10 +64,10 @@ AddViewDialog::AddViewDialog( QDict<ViewFactory> *viewFactoryDict,
layout->addWidget( mViewNameEdit, 0, 1 );
- mTypeGroup = new QButtonGroup( 2, Qt::Horizontal, i18n( "View Type" ), page );
+ mTypeGroup = new Q3ButtonGroup( 2, Qt::Horizontal, i18n( "View Type" ), page );
connect( mTypeGroup, SIGNAL( clicked( int ) ), this, SLOT( clicked( int ) ) );
layout->addMultiCellWidget( mTypeGroup, 1, 1, 0, 1 );
// Now create the radio buttons. This needs some layout work.
- QDictIterator<ViewFactory> iter( *mViewFactoryDict );
+ Q3DictIterator<ViewFactory> iter( *mViewFactoryDict );
for ( iter.toFirst(); iter.current(); ++iter ) {
//US i am not quit sure, why I can nopt use (*iter)-> here
@@ -114,5 +116,5 @@ void AddViewDialog::textChanged( const QString &text )
}
-#ifndef KAB_EMBEDDED
-#include "addviewdialog.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_addviewdialog.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/addviewdialog.h b/kaddressbook/addviewdialog.h
index 8cc12f5..c3e8efd 100644
--- a/kaddressbook/addviewdialog.h
+++ b/kaddressbook/addviewdialog.h
@@ -26,9 +26,9 @@
#include <kdialogbase.h>
-#include <qdict.h>
+#include <q3dict.h>
#include <qstring.h>
class ViewFactory;
-class QButtonGroup;
+class Q3ButtonGroup;
class QLineEdit;
@@ -44,5 +44,5 @@ class AddViewDialog : public KDialogBase
public:
- AddViewDialog( QDict<ViewFactory> *viewFactoryDict, QWidget *parent,
+ AddViewDialog( Q3Dict<ViewFactory> *viewFactoryDict, QWidget *parent,
const char *name = 0 );
~AddViewDialog();
@@ -64,7 +64,7 @@ class AddViewDialog : public KDialogBase
private:
- QDict<ViewFactory> *mViewFactoryDict;
+ Q3Dict<ViewFactory> *mViewFactoryDict;
QLineEdit *mViewNameEdit;
- QButtonGroup *mTypeGroup;
+ Q3ButtonGroup *mTypeGroup;
int mTypeId;
diff --git a/kaddressbook/details/detailsviewcontainer.cpp b/kaddressbook/details/detailsviewcontainer.cpp
index cee5886..4a86aca 100644
--- a/kaddressbook/details/detailsviewcontainer.cpp
+++ b/kaddressbook/details/detailsviewcontainer.cpp
@@ -23,8 +23,11 @@
#include <qcombobox.h>
-#include <qframe.h>
+#include <q3frame.h>
#include <qlabel.h>
#include <qlayout.h>
-#include <qwidgetstack.h>
+#include <q3widgetstack.h>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
+#include <Q3VBoxLayout>
#include <kapplication.h>
@@ -46,5 +49,5 @@ ViewContainer::ViewContainer( QWidget *parent, const char* name )
: QWidget( parent, name ), mCurrentLook( 0 )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ Q3BoxLayout *topLayout = new Q3VBoxLayout( this );
//topLayout->setMargin( KDialog::marginHint() );
//topLayout->setSpacing( KDialog::spacingHint() );
@@ -52,5 +55,5 @@ ViewContainer::ViewContainer( QWidget *parent, const char* name )
topLayout->setSpacing( 0 );
- QBoxLayout *styleLayout = new QHBoxLayout( topLayout );
+ Q3BoxLayout *styleLayout = new Q3HBoxLayout( topLayout );
QLabel *label = new QLabel( i18n("Style:"), this );
@@ -60,10 +63,10 @@ ViewContainer::ViewContainer( QWidget *parent, const char* name )
styleLayout->addWidget( mStyleCombo );
- QFrame *frameRuler = new QFrame( this );
+ Q3Frame *frameRuler = new Q3Frame( this );
//US frameRuler->setFrameShape( QFrame::HLine );
//US frameRuler->setFrameShadow( QFrame::Sunken );
//US topLayout->addWidget( frameRuler );
- mDetailsStack = new QWidgetStack( this );
+ mDetailsStack = new Q3WidgetStack( this );
topLayout->addWidget( mDetailsStack, 1 );
@@ -160,5 +163,5 @@ void ViewContainer::setReadOnly( bool state )
}
-#ifndef KAB_EMBEDDED
-#include "detailsviewcontainer.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_detailsviewcontainer.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/details/detailsviewcontainer.h b/kaddressbook/details/detailsviewcontainer.h
index 9684736..f310a30 100644
--- a/kaddressbook/details/detailsviewcontainer.h
+++ b/kaddressbook/details/detailsviewcontainer.h
@@ -25,10 +25,10 @@
#define DETAILSVIEWCONTAINER_H
-#include <qptrlist.h>
+#include <q3ptrlist.h>
#include "look_basic.h"
class QComboBox;
-class QWidgetStack;
+class Q3WidgetStack;
class ViewContainer : public QWidget
@@ -95,8 +95,8 @@ class ViewContainer : public QWidget
KABC::Addressee mCurrentAddressee;
KABBasicLook *mCurrentLook;
- QPtrList<KABLookFactory> mLookFactories;
+ Q3PtrList<KABLookFactory> mLookFactories;
QComboBox *mStyleCombo;
- QWidgetStack *mDetailsStack;
+ Q3WidgetStack *mDetailsStack;
};
diff --git a/kaddressbook/details/look_basic.cpp b/kaddressbook/details/look_basic.cpp
index 0245686..48cc42a 100644
--- a/kaddressbook/details/look_basic.cpp
+++ b/kaddressbook/details/look_basic.cpp
@@ -27,5 +27,5 @@
KABBasicLook::KABBasicLook( QWidget *parent, const char *name )
- : QVBox( parent, name ), mReadOnly( false )
+ : Q3VBox( parent, name ), mReadOnly( false )
{
}
@@ -71,5 +71,5 @@ KABLookFactory::~KABLookFactory()
{
}
-#ifndef KAB_EMBEDDED
-#include "look_basic.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_look_basic.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/details/look_basic.h b/kaddressbook/details/look_basic.h
index a65c99c..a70e7f7 100644
--- a/kaddressbook/details/look_basic.h
+++ b/kaddressbook/details/look_basic.h
@@ -26,5 +26,5 @@
#include <kabc/addressbook.h>
-#include <qvbox.h>
+#include <q3vbox.h>
class KConfig;
@@ -42,5 +42,5 @@ class KConfig;
calls will not delete the widgets background.
*/
-class KABBasicLook : public QVBox
+class KABBasicLook : public Q3VBox
{
Q_OBJECT
diff --git a/kaddressbook/details/look_details.cpp b/kaddressbook/details/look_details.cpp
index 11d06e9..2c3a79d 100644
--- a/kaddressbook/details/look_details.cpp
+++ b/kaddressbook/details/look_details.cpp
@@ -190,8 +190,8 @@ void KABDetailedView::mouseMoveEvent( QMouseEvent *e )
void KABDetailedView::mousePressEvent( QMouseEvent *e )
{
- QPopupMenu menu( this );
- QPopupMenu *menuBG = new QPopupMenu( &menu );
- mMenuBorderedBG = new QPopupMenu( &menu );
- mMenuTiledBG = new QPopupMenu( &menu );
+ Q3PopupMenu menu( this );
+ Q3PopupMenu *menuBG = new Q3PopupMenu( &menu );
+ mMenuBorderedBG = new Q3PopupMenu( &menu );
+ mMenuTiledBG = new Q3PopupMenu( &menu );
menu.insertItem( i18n( "Select Background" ), menuBG );
@@ -415,5 +415,5 @@ void KABDetailedView::restoreSettings( KConfig *config )
}
-#ifndef KAB_EMBEDDED
-#include "look_details.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_look_details.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/details/look_details.h b/kaddressbook/details/look_details.h
index e8d50a9..b59d3a7 100644
--- a/kaddressbook/details/look_details.h
+++ b/kaddressbook/details/look_details.h
@@ -131,6 +131,6 @@ class KABDetailedView : public KABBasicLook
QStringList mTiles;
- QPopupMenu *mMenuBorderedBG;
- QPopupMenu *mMenuTiledBG;
+ Q3PopupMenu *mMenuBorderedBG;
+ Q3PopupMenu *mMenuTiledBG;
static const QString mBorderedBGDir;
diff --git a/kaddressbook/details/look_html.cpp b/kaddressbook/details/look_html.cpp
index bb30650..4ec1c7d 100644
--- a/kaddressbook/details/look_html.cpp
+++ b/kaddressbook/details/look_html.cpp
@@ -25,5 +25,5 @@
#include "look_html.h"
-#include <qscrollview.h>
+#include <q3scrollview.h>
#include "kabprefs.h"
#include <kabc/addresseeview.h>
@@ -52,5 +52,5 @@ void KABHtmlView::setAddressee( const KABC::Addressee &addr )
}
-#ifndef KAB_EMBEDDED
-#include "look_html.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_look_html.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/emaileditwidget.cpp b/kaddressbook/emaileditwidget.cpp
index e72face..09df47f 100644
--- a/kaddressbook/emaileditwidget.cpp
+++ b/kaddressbook/emaileditwidget.cpp
@@ -29,5 +29,7 @@
#include <qtoolbutton.h>
#include <qtooltip.h>
-#include <qlistbox.h>
+#include <q3listbox.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
#ifndef KAB_EMBEDDED
@@ -49,5 +51,5 @@ EmailEditWidget::EmailEditWidget( QWidget *parent, const char *name )
: QWidget( parent, name )
{
- QGridLayout *topLayout = new QGridLayout( this, 2, 2 );
+ Q3GridLayout *topLayout = new Q3GridLayout( this, 2, 2 );
topLayout->setSpacing( KDialog::spacingHint() );
QLabel* label = new QLabel( this );
@@ -56,5 +58,5 @@ EmailEditWidget::EmailEditWidget( QWidget *parent, const char *name )
topLayout->addWidget( label, 0, 0 );
- label->setAlignment( AlignCenter );
+ label->setAlignment( Qt::AlignCenter );
QPushButton *editButton = new QPushButton( i18n( "Edit Email Addresses..." ), this);
topLayout->addWidget( editButton, 0, 1 );
@@ -138,5 +140,5 @@ EmailEditDialog::EmailEditDialog( const QStringList &list, QWidget *parent,
QWidget *page = plainPage();
- QGridLayout *topLayout = new QGridLayout( page, 4, 3 );
+ Q3GridLayout *topLayout = new Q3GridLayout( page, 4, 3 );
QLabel *label = new QLabel( i18n( "Email address:" ), page );
@@ -155,5 +157,5 @@ EmailEditDialog::EmailEditDialog( const QStringList &list, QWidget *parent,
topLayout->addWidget( mAddButton, 0, 2 );
- mEmailListBox = new QListBox( page );
+ mEmailListBox = new Q3ListBox( page );
// Make sure there is room for the scrollbar
@@ -273,5 +275,5 @@ void EmailEditDialog::emailChanged()
}
-#ifndef KAB_EMBEDDED
-#include "emaileditwidget.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_emaileditwidget.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/emaileditwidget.h b/kaddressbook/emaileditwidget.h
index acdecaf..618acee 100644
--- a/kaddressbook/emaileditwidget.h
+++ b/kaddressbook/emaileditwidget.h
@@ -30,9 +30,9 @@
#include "addresseeconfig.h"
-class QButtonGroup;
+class Q3ButtonGroup;
class QCheckBox;
-class QListView;
-class QListBox;
-class QTextEdit;
+class Q3ListView;
+class Q3ListBox;
+class Q3TextEdit;
class QToolButton;
@@ -90,5 +90,5 @@ class EmailEditDialog : public KDialogBase
private:
KLineEdit *mEmailEdit;
- QListBox *mEmailListBox;
+ Q3ListBox *mEmailListBox;
QPushButton *mAddButton;
QPushButton *mRemoveButton;
diff --git a/kaddressbook/extensionmanager.cpp b/kaddressbook/extensionmanager.cpp
index 46defa1..5356224 100644
--- a/kaddressbook/extensionmanager.cpp
+++ b/kaddressbook/extensionmanager.cpp
@@ -23,4 +23,6 @@
#include <qlayout.h>
#include <qapplication.h>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
#include <kactionclasses.h>
#include <kconfig.h>
@@ -43,5 +45,5 @@
ExtensionManager::ExtensionManager( KABCore *core, QWidget *parent,
const char *name )
- : QScrollView( parent, name ), mCore( core ), mCurrentExtensionWidget( 0 )
+ : Q3ScrollView( parent, name ), mCore( core ), mCurrentExtensionWidget( 0 )
{
#ifdef KAB_EMBEDDED
@@ -59,5 +61,5 @@ ExtensionManager::ExtensionManager( KABCore *core, QWidget *parent,
SLOT( setActiveExtension( int ) ) );
mWidgetBox = new QWidget( viewport() );
- new QHBoxLayout (mWidgetBox );
+ new Q3HBoxLayout (mWidgetBox );
addChild( mWidgetBox );
setResizePolicy(AutoOneFit);
@@ -149,5 +151,5 @@ void ExtensionManager::createExtensionWidgets()
// clear extension widget list
mExtensionWidgetList.setAutoDelete( true );
- QPtrListIterator<ExtensionWidget> wdgIt( mExtensionWidgetList );
+ Q3PtrListIterator<ExtensionWidget> wdgIt( mExtensionWidgetList );
ExtensionWidget *wdg = 0;
while ( ( wdg = wdgIt.current() ) != 0 )
@@ -160,5 +162,5 @@ void ExtensionManager::createExtensionWidgets()
// add addressee editor as default
- QHBoxLayout *hbl = (QHBoxLayout *) mWidgetBox->layout();;
+ Q3HBoxLayout *hbl = (Q3HBoxLayout *) mWidgetBox->layout();;
wdg = new AddresseeEditorWidget( mCore, true, mWidgetBox );
@@ -245,5 +247,5 @@ void ExtensionManager::createExtensionWidgets()
}
-#ifndef KAB_EMBEDDED
-#include "extensionmanager.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_extensionmanager.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/extensionmanager.h b/kaddressbook/extensionmanager.h
index 611a037..84c948b 100644
--- a/kaddressbook/extensionmanager.h
+++ b/kaddressbook/extensionmanager.h
@@ -25,7 +25,7 @@
#define EXTENSIONMANAGER_H
-#include <qhbox.h>
-#include <qscrollview.h>
-#include <qptrlist.h>
+#include <q3hbox.h>
+#include <q3scrollview.h>
+#include <q3ptrlist.h>
#include <extensionwidget.h>
@@ -35,5 +35,5 @@ class KSelectAction;
-class ExtensionManager : public QScrollView
+class ExtensionManager : public Q3ScrollView
{
Q_OBJECT
@@ -81,5 +81,5 @@ class ExtensionManager : public QScrollView
ExtensionWidget *mCurrentExtensionWidget;
- QPtrList<ExtensionWidget> mExtensionWidgetList;
+ Q3PtrList<ExtensionWidget> mExtensionWidgetList;
KSelectAction *mActionExtensions;
diff --git a/kaddressbook/extensionwidget.cpp b/kaddressbook/extensionwidget.cpp
index 69f4aa8..7c3b415 100644
--- a/kaddressbook/extensionwidget.cpp
+++ b/kaddressbook/extensionwidget.cpp
@@ -79,6 +79,5 @@ ConfigureWidget *ExtensionFactory::configureWidget( QWidget*, const char* )
}
-#ifndef KAB_EMBEDDED
-#include "extensionwidget.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_extensionwidget.cpp"
#endif //KAB_EMBEDDED
-
diff --git a/kaddressbook/extensionwidget.h b/kaddressbook/extensionwidget.h
index fc91f21..9fcfba9 100644
--- a/kaddressbook/extensionwidget.h
+++ b/kaddressbook/extensionwidget.h
@@ -87,7 +87,7 @@ class ExtensionWidget : public QWidget
#ifndef KAB_EMBEDDED
-//MOC_SKIP_BEGIN
+#ifndef Q_MOC_RUN
class ExtensionFactory : public KLibFactory
-//MOC_SKIP_END
+#endif
#else //KAB_EMBEDDED
class ExtensionFactory
diff --git a/kaddressbook/features/distributionlistwidget.cpp b/kaddressbook/features/distributionlistwidget.cpp
index bfcb121..996177b 100644
--- a/kaddressbook/features/distributionlistwidget.cpp
+++ b/kaddressbook/features/distributionlistwidget.cpp
@@ -22,11 +22,18 @@
*/
-#include <qbuttongroup.h>
+#include <q3buttongroup.h>
#include <qcombobox.h>
#include <qlabel.h>
#include <qlayout.h>
-#include <qlistview.h>
+#include <q3listview.h>
#include <qpushbutton.h>
#include <qradiobutton.h>
+//Added by qt3to4:
+#include <QDragMoveEvent>
+#include <QDropEvent>
+#include <Q3GridLayout>
+#include <Q3Frame>
+#include <Q3VBoxLayout>
+#include <QDragEnterEvent>
#ifndef KAB_EMBEDDED
@@ -78,10 +85,10 @@ extern "C" {
#endif //KAB_EMBEDDED
-class ContactItem : public QListViewItem
+class ContactItem : public Q3ListViewItem
{
public:
ContactItem( DistributionListView *parent, const KABC::Addressee &addressee,
const QString &email = QString::null ) :
- QListViewItem( parent ),
+ Q3ListViewItem( parent ),
mAddressee( addressee ),
mEmail( email )
@@ -122,5 +129,5 @@ DistributionListWidget::DistributionListWidget( KABCore *core, QWidget *parent,
: ExtensionWidget( core, parent, name ), mManager( 0 )
{
- QGridLayout *topLayout = new QGridLayout( this, 3, 4, KDialog::marginHint(),
+ Q3GridLayout *topLayout = new Q3GridLayout( this, 3, 4, KDialog::marginHint(),
KDialog::spacingHint() );
@@ -167,6 +174,6 @@ DistributionListWidget::DistributionListWidget( KABCore *core, QWidget *parent,
connect( mContactView, SIGNAL( selectionChanged() ),
SLOT( selectionContactViewChanged() ) );
- connect( mContactView, SIGNAL( dropped( QDropEvent*, QListViewItem* ) ),
- SLOT( dropped( QDropEvent*, QListViewItem* ) ) );
+ connect( mContactView, SIGNAL( dropped( QDropEvent*, Q3ListViewItem* ) ),
+ SLOT( dropped( QDropEvent*, Q3ListViewItem* ) ) );
mAddContactButton->setEnabled( false );
@@ -411,5 +418,5 @@ QString DistributionListWidget::identifier() const
}
-void DistributionListWidget::dropped( QDropEvent *e, QListViewItem* )
+void DistributionListWidget::dropped( QDropEvent *e, Q3ListViewItem* )
{
dropEvent( e );
@@ -433,5 +440,5 @@ void DistributionListView::dragEnterEvent( QDragEnterEvent* e )
{
#ifndef KAB_EMBEDDED
- bool canDecode = QTextDrag::canDecode( e );
+ bool canDecode = Q3TextDrag::canDecode( e );
e->accept( canDecode );
#endif //KAB_EMBEDDED
@@ -441,5 +448,5 @@ void DistributionListView::viewportDragMoveEvent( QDragMoveEvent *e )
{
#ifndef KAB_EMBEDDED
- bool canDecode = QTextDrag::canDecode( e );
+ bool canDecode = Q3TextDrag::canDecode( e );
e->accept( canDecode );
#endif //KAB_EMBEDDED
@@ -462,8 +469,8 @@ EmailSelector::EmailSelector( const QStringList &emails,
parent )
{
- QFrame *topFrame = plainPage();
- QBoxLayout *topLayout = new QVBoxLayout( topFrame );
+ Q3Frame *topFrame = plainPage();
+ Q3BoxLayout *topLayout = new Q3VBoxLayout( topFrame );
- mButtonGroup = new QButtonGroup( 1, Horizontal, i18n("Email Addresses"),
+ mButtonGroup = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("Email Addresses"),
topFrame );
topLayout->addWidget( mButtonGroup );
@@ -480,5 +487,5 @@ EmailSelector::EmailSelector( const QStringList &emails,
QString EmailSelector::selected()
{
- QButton *button = mButtonGroup->selected();
+ QAbstractButton *button = mButtonGroup->selected();
if ( button )
return button->text();
@@ -497,5 +504,5 @@ QString EmailSelector::getEmail( const QStringList &emails,
-#ifndef KAB_EMBEDDED
-#include "distributionlistwidget.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_distributionlistwidget.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/features/distributionlistwidget.h b/kaddressbook/features/distributionlistwidget.h
index 82bac3d..f619389 100644
--- a/kaddressbook/features/distributionlistwidget.h
+++ b/kaddressbook/features/distributionlistwidget.h
@@ -29,9 +29,14 @@
#include "extensionwidget.h"
+//Added by qt3to4:
+#include <QDragEnterEvent>
+#include <QDropEvent>
+#include <QLabel>
+#include <QDragMoveEvent>
-class QButtonGroup;
+class Q3ButtonGroup;
class QComboBox;
class QLabel;
-class QListView;
+class Q3ListView;
class DistributionListView;
@@ -58,5 +63,5 @@ class DistributionListWidget : public ExtensionWidget
public slots:
void save();
- void dropped( QDropEvent*, QListViewItem* );
+ void dropped( QDropEvent*, Q3ListViewItem* );
private slots:
@@ -121,5 +126,5 @@ class EmailSelector : public KDialogBase
private:
- QButtonGroup *mButtonGroup;
+ Q3ButtonGroup *mButtonGroup;
};
diff --git a/kaddressbook/features/mergewidget.cpp b/kaddressbook/features/mergewidget.cpp
index 2476e42..1becc2f 100644
--- a/kaddressbook/features/mergewidget.cpp
+++ b/kaddressbook/features/mergewidget.cpp
@@ -24,4 +24,6 @@
#include <qlayout.h>
#include <qpushbutton.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
#ifndef KAB_EMBEDDED
@@ -64,9 +66,9 @@ extern "C" {
#endif //KAB_EMBEDDED
-class ContactItem : public QListViewItem
+class ContactItem : public Q3ListViewItem
{
public:
ContactItem( KListView *parent, const KABC::Addressee &addressee )
- : QListViewItem( parent ), mAddressee( addressee )
+ : Q3ListViewItem( parent ), mAddressee( addressee )
{
KABC::Field::List fieldList = KABC::Field::defaultFields();
@@ -95,5 +97,5 @@ MergeWidget::MergeWidget( KABCore *core, QWidget *parent, const char *name )
#endif //KAB_EMBEDDED
- QGridLayout *topLayout = new QGridLayout( this, 3, 2, KDialog::marginHint(),
+ Q3GridLayout *topLayout = new Q3GridLayout( this, 3, 2, KDialog::marginHint(),
KDialog::spacingHint() );
@@ -215,5 +217,5 @@ void MergeWidget::mergeAndRemove()
mBlockUpdate = true;
- core()->deleteContacts( oldUID );
+ core()->deleteContacts( QStringList(oldUID) );
core()->setContactSelected( mMasterAddressee.uid() );
mBlockUpdate = false;
@@ -370,5 +372,5 @@ void MergeWidget::doMerge( const KABC::Addressee &addr )
}
-#ifndef KAB_EMBEDDED
-#include "mergewidget.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_mergewidget.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/features/mergewidget.h b/kaddressbook/features/mergewidget.h
index 1063c80..bb16282 100644
--- a/kaddressbook/features/mergewidget.h
+++ b/kaddressbook/features/mergewidget.h
@@ -30,5 +30,5 @@
#include "extensionwidget.h"
-class QListView;
+class Q3ListView;
class KABCore;
diff --git a/kaddressbook/filter.cpp b/kaddressbook/filter.cpp
index 12ab1e3..6462310 100644
--- a/kaddressbook/filter.cpp
+++ b/kaddressbook/filter.cpp
@@ -219,5 +219,5 @@ Filter::List Filter::restore( KConfig *config, QString baseGroup )
filter.mName = *it;
filter.mEnabled = true;
- filter.mCategoryList = *it;
+ filter.mCategoryList = QStringList(*it);
filter.mMatchRule = Matching;
filter.mInternal = true;
diff --git a/kaddressbook/filter.h b/kaddressbook/filter.h
index f4ae123..508436d 100644
--- a/kaddressbook/filter.h
+++ b/kaddressbook/filter.h
@@ -27,5 +27,5 @@
#include <qstring.h>
#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <q3valuelist.h>
#include <kabc/addressee.h>
@@ -43,5 +43,5 @@ class Filter
void setCriteria(int c) { mCriteria = c ;}
int criteria() const { return mCriteria;}
- typedef QValueList<Filter> List;
+ typedef Q3ValueList<Filter> List;
enum MatchRule { Matching = 0, NotMatching = 1 };
diff --git a/kaddressbook/filtereditdialog.cpp b/kaddressbook/filtereditdialog.cpp
index ef9b979..40698a7 100644
--- a/kaddressbook/filtereditdialog.cpp
+++ b/kaddressbook/filtereditdialog.cpp
@@ -29,6 +29,6 @@ $Id$
*/
-#include <qbuttongroup.h>
-#include <qhbox.h>
+#include <q3buttongroup.h>
+#include <q3hbox.h>
#include <qlabel.h>
#include <qlayout.h>
@@ -41,4 +41,6 @@ $Id$
#include <qtooltip.h>
#include <qwidget.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
#include <kapplication.h>
@@ -65,5 +67,5 @@ FilterEditDialog::FilterEditDialog( QWidget *parent, const char *name )
QStringList::Iterator iter;
for ( iter = cats.begin(); iter != cats.end(); ++iter )
- mCategoriesView->insertItem( new QCheckListItem( mCategoriesView, (*iter), QCheckListItem::CheckBox ) );
+ mCategoriesView->insertItem( new Q3CheckListItem( mCategoriesView, (*iter), Q3CheckListItem::CheckBox ) );
filterNameTextChanged( mNameEdit->text() );
}
@@ -78,8 +80,8 @@ void FilterEditDialog::setFilter( const Filter &filter )
QStringList categories = filter.categories();
- QListViewItem *item = mCategoriesView->firstChild();
+ Q3ListViewItem *item = mCategoriesView->firstChild();
while ( item != 0 ) {
if ( categories.contains( item->text( 0 ) ) ) {
- QCheckListItem *checkItem = static_cast<QCheckListItem*>( item );
+ Q3CheckListItem *checkItem = static_cast<Q3CheckListItem*>( item );
checkItem->setOn( true );
}
@@ -106,7 +108,7 @@ Filter FilterEditDialog::filter()
QStringList categories;
- QListViewItem *item = mCategoriesView->firstChild();
+ Q3ListViewItem *item = mCategoriesView->firstChild();
while ( item != 0 ) {
- QCheckListItem *checkItem = static_cast<QCheckListItem*>( item );
+ Q3CheckListItem *checkItem = static_cast<Q3CheckListItem*>( item );
if ( checkItem->isOn() )
categories.append( item->text( 0 ) );
@@ -142,5 +144,5 @@ void FilterEditDialog::initGUI()
QLabel *label;
- QGridLayout *topLayout = new QGridLayout( page, 3, 2, 0, spacingHint() );
+ Q3GridLayout *topLayout = new Q3GridLayout( page, 3, 2, 0, spacingHint() );
label = new QLabel( i18n( "Name" ), page );
@@ -156,5 +158,5 @@ void FilterEditDialog::initGUI()
topLayout->addMultiCellWidget( mCategoriesView, 1, 1, 0, 1 );
- mMatchRuleGroup = new QHButtonGroup( i18n( "Category rule" ), page );
+ mMatchRuleGroup = new Q3HButtonGroup( i18n( "Category rule" ), page );
mMatchRuleGroup->setExclusive( true );
QRadioButton *radio = new QRadioButton( i18n( "Include categories" ), mMatchRuleGroup );
@@ -165,5 +167,5 @@ void FilterEditDialog::initGUI()
topLayout->addMultiCellWidget( mMatchRuleGroup, 2, 2, 0, 1 );
- QHButtonGroup * mMatchPPCGroup = new QHButtonGroup(i18n( "Include contacts, that are:" ), page );
+ Q3HButtonGroup * mMatchPPCGroup = new Q3HButtonGroup(i18n( "Include contacts, that are:" ), page );
mPublic = new QCheckBox( i18n( "public" ), mMatchPPCGroup );
mPrivate = new QCheckBox( i18n( "private" ), mMatchPPCGroup );
@@ -273,5 +275,5 @@ void FilterDialog::refresh()
}
-void FilterDialog::selectionChanged( QListBoxItem *item )
+void FilterDialog::selectionChanged( Q3ListBoxItem *item )
{
bool state = ( item != 0 );
@@ -291,14 +293,14 @@ void FilterDialog::initGUI()
QWidget *page = plainPage();
- QGridLayout *topLayout = new QGridLayout( page, 1, 2, 0, spacingHint() );
+ Q3GridLayout *topLayout = new Q3GridLayout( page, 1, 2, 0, spacingHint() );
mFilterListBox = new KListBox( page );
topLayout->addWidget( mFilterListBox, 0, 0 );
- connect( mFilterListBox, SIGNAL( selectionChanged( QListBoxItem * ) ),
- SLOT( selectionChanged( QListBoxItem * ) ) );
- connect( mFilterListBox, SIGNAL( doubleClicked ( QListBoxItem * ) ),
+ connect( mFilterListBox, SIGNAL( selectionChanged( Q3ListBoxItem * ) ),
+ SLOT( selectionChanged( Q3ListBoxItem * ) ) );
+ connect( mFilterListBox, SIGNAL( doubleClicked ( Q3ListBoxItem * ) ),
SLOT( edit() ) );
- KButtonBox *buttonBox = new KButtonBox( page, Vertical );
+ KButtonBox *buttonBox = new KButtonBox( page, Qt::Vertical );
buttonBox->addButton( i18n( "&Add..." ), this, SLOT( add() ) );
mEditButton = buttonBox->addButton( i18n( "&Edit..." ), this, SLOT( edit() ) );
@@ -311,5 +313,5 @@ void FilterDialog::initGUI()
}
-#ifndef KAB_EMBEDDED
-#include "filtereditdialog.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_filtereditdialog.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/filtereditdialog.h b/kaddressbook/filtereditdialog.h
index 5a8bad1..64d2976 100644
--- a/kaddressbook/filtereditdialog.h
+++ b/kaddressbook/filtereditdialog.h
@@ -32,9 +32,9 @@ $Id$
#define FILTEREDITDIALOG_H
-class QButtonGroup;
+#include <Q3HButtonGroup>
class QString;
class QToolButton;
class QWidget;
-class QListBoxItem;
+class Q3ListBoxItem;
class QCheckBox;
@@ -44,5 +44,4 @@ class KListView;
#include <kdialogbase.h>
-#include <qhbuttongroup.h>
#include "filter.h"
@@ -63,5 +62,5 @@ class FilterDialog : public KDialogBase
void edit();
void remove();
- void selectionChanged( QListBoxItem* );
+ void selectionChanged( Q3ListBoxItem* );
private:
@@ -99,5 +98,5 @@ class FilterEditDialog : public KDialogBase
KLineEdit *mNameEdit;
KListView *mCategoriesView;
- QHButtonGroup *mMatchRuleGroup;
+ Q3HButtonGroup *mMatchRuleGroup;
QCheckBox *mPrivate;
QCheckBox *mPublic;
diff --git a/kaddressbook/geowidget.cpp b/kaddressbook/geowidget.cpp
index 13cd084..caff3b2 100644
--- a/kaddressbook/geowidget.cpp
+++ b/kaddressbook/geowidget.cpp
@@ -28,8 +28,15 @@
#else //KAB_EMBEDDED
-#include <qtextstream.h>
+#include <q3textstream.h>
+//Added by qt3to4:
+#include <QPaintEvent>
+#include <Q3GridLayout>
+#include <Q3Frame>
+#include <QMouseEvent>
#include <kglobal.h>
#endif //KAB_EMBEDDED
+#include <QDesktopWidget>
+
#include <knuminput.h>
#include <kcombobox.h>
@@ -42,8 +49,8 @@
#include <qfile.h>
#include <qapplication.h>
-#include <qgroupbox.h>
+#include <q3groupbox.h>
#include <qlabel.h>
#include <qlayout.h>
-#include <qlistbox.h>
+#include <q3listbox.h>
#include <qpainter.h>
#include <qpixmap.h>
@@ -60,5 +67,5 @@ GeoWidget::GeoWidget( QWidget *parent, const char *name )
QLabel *label = 0;
- QGridLayout *topLayout = new QGridLayout( this, 4, 3 );
+ Q3GridLayout *topLayout = new Q3GridLayout( this, 4, 3 );
topLayout->setMargin( KDialog::marginHint() );
topLayout->setSpacing( KDialog::spacingHint() );
@@ -70,5 +77,5 @@ GeoWidget::GeoWidget( QWidget *parent, const char *name )
label->setAlignment( Qt::AlignTop );
topLayout->addMultiCellWidget( label, 0, 3, 0, 0 );
- label->setAlignment( AlignCenter );
+ label->setAlignment( Qt::AlignCenter );
mGeoIsValid = new QCheckBox( i18n( "Use geo data" ), this );
topLayout->addMultiCellWidget( mGeoIsValid, 0, 0, 1, 2 );
@@ -168,7 +175,7 @@ GeoDialog::GeoDialog( QWidget *parent, const char *name )
mUpdateSexagesimalInput( true )
{
- QFrame *page = plainPage();
+ Q3Frame *page = plainPage();
- QGridLayout *topLayout = new QGridLayout( page, 1, 1, marginHintSmall(),
+ Q3GridLayout *topLayout = new Q3GridLayout( page, 1, 1, marginHintSmall(),
spacingHint() );
//topLayout->setRowStretch( 1, 1 );
@@ -176,6 +183,6 @@ GeoDialog::GeoDialog( QWidget *parent, const char *name )
mMapWidget = new GeoMapWidget( page );
mCityCombo = new KComboBox( page );
- QGroupBox *sexagesimalGroup = new QGroupBox( 0, Vertical, i18n( "Sexagesimal" ), page );
- QGridLayout *sexagesimalLayout = new QGridLayout( sexagesimalGroup->layout(),
+ Q3GroupBox *sexagesimalGroup = new Q3GroupBox( 0, Qt::Vertical, i18n( "Sexagesimal" ), page );
+ Q3GridLayout *sexagesimalLayout = new Q3GridLayout( sexagesimalGroup->layout(),
2, 5, spacingHint() );
QLabel *label;
@@ -430,6 +437,6 @@ void GeoDialog::loadCityList()
QFile file( fileName);
- if ( file.open( IO_ReadOnly ) ) {
- QTextStream s( &file );
+ if ( file.open( QIODevice::ReadOnly ) ) {
+ Q3TextStream s( &file );
QString line, country;
@@ -553,5 +560,5 @@ GeoMapWidget::GeoMapWidget( QWidget *parent, const char *name )
: QWidget( parent, name ), mLatitude( 0 ), mLongitude( 0 )
{
- setBackgroundMode( NoBackground );
+ setBackgroundMode( Qt::NoBackground );
setFixedSize( 240, 120 );
@@ -625,5 +632,5 @@ void GeoMapWidget::paintEvent( QPaintEvent* )
}
-#ifndef KAB_EMBEDDED
-#include "geowidget.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_geowidget.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/geowidget.h b/kaddressbook/geowidget.h
index 3d39691..5b64370 100644
--- a/kaddressbook/geowidget.h
+++ b/kaddressbook/geowidget.h
@@ -28,4 +28,8 @@
#include <qwidget.h>
+//Added by qt3to4:
+#include <QLabel>
+#include <QMouseEvent>
+#include <QPaintEvent>
#include <kdialogbase.h>
diff --git a/kaddressbook/imagewidget.cpp b/kaddressbook/imagewidget.cpp
index eec5e08..6ecf66d 100644
--- a/kaddressbook/imagewidget.cpp
+++ b/kaddressbook/imagewidget.cpp
@@ -38,5 +38,5 @@
#include <qcheckbox.h>
-#include <qgroupbox.h>
+#include <q3groupbox.h>
#include <qlabel.h>
#include <qlayout.h>
@@ -44,4 +44,8 @@
#include <qpushbutton.h>
#include <qapplication.h>
+#include <QDesktopWidget>
+//Added by qt3to4:
+#include <Q3GridLayout>
+#include <Q3Frame>
#include "imagewidget.h"
@@ -50,9 +54,9 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name )
: QWidget( parent, name )
{
- QGridLayout *topLayout = new QGridLayout( this, 2, 1, KDialog::marginHint(),
+ Q3GridLayout *topLayout = new Q3GridLayout( this, 2, 1, KDialog::marginHint(),
KDialog::spacingHint() );
- QGroupBox *photoBox = new QGroupBox( 0, Qt::Vertical, i18n( "Photo" ), this );
- QGridLayout *boxLayout = new QGridLayout( photoBox->layout(), 3, 2,
+ Q3GroupBox *photoBox = new Q3GroupBox( 0, Qt::Vertical, i18n( "Photo" ), this );
+ Q3GridLayout *boxLayout = new Q3GridLayout( photoBox->layout(), 3, 2,
KDialog::spacingHint() );
boxLayout->setRowStretch( 2, 1 );
@@ -64,5 +68,5 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name )
mPhotoLabel->setFixedSize( 50*9/fac, 70*9/fac );
mPhotoLabel->setScaledContents( true );
- mPhotoLabel->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ mPhotoLabel->setFrameStyle( Q3Frame::Panel | Q3Frame::Sunken );
boxLayout->addMultiCellWidget( mPhotoLabel, 0, 3, 0, 0 );
@@ -76,5 +80,5 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name )
boxLayout->addWidget( mPhotoUrl, 0, 1 );
- QHBox *hb1 = new QHBox ( photoBox );
+ Q3HBox *hb1 = new Q3HBox ( photoBox );
mUsePhotoUrl = new QCheckBox( i18n( "Store as URL" ), hb1 );
mUsePhotoUrl->setEnabled( false );
@@ -87,6 +91,6 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name )
topLayout->addWidget( photoBox, 0, 0 );
- QGroupBox *logoBox = new QGroupBox( 0, Qt::Vertical, i18n( "Logo" ), this );
- boxLayout = new QGridLayout( logoBox->layout(), 3, 2, KDialog::spacingHint() );
+ Q3GroupBox *logoBox = new Q3GroupBox( 0, Qt::Vertical, i18n( "Logo" ), this );
+ boxLayout = new Q3GridLayout( logoBox->layout(), 3, 2, KDialog::spacingHint() );
boxLayout->setRowStretch( 2, 1 );
@@ -94,5 +98,5 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name )
mLogoLabel->setFixedSize( 50*9/fac, 70*9/fac );
mLogoLabel->setScaledContents( true );
- mLogoLabel->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ mLogoLabel->setFrameStyle( Q3Frame::Panel | Q3Frame::Sunken );
boxLayout->addMultiCellWidget( mLogoLabel, 0, 3, 0, 0 );
@@ -105,5 +109,5 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name )
boxLayout->addWidget( mLogoUrl, 0, 1 );
- QHBox *hb2 = new QHBox ( logoBox );
+ Q3HBox *hb2 = new Q3HBox ( logoBox );
mUseLogoUrl = new QCheckBox( i18n( "Store as URL" ), hb2 );
mUseLogoUrl->setEnabled( false );
@@ -181,5 +185,5 @@ KABC::Picture ImageWidget::photo() const
photo.setUrl( mPhotoUrl->url() );
else {
- QPixmap *px = mPhotoLabel->pixmap();
+ const QPixmap *px = mPhotoLabel->pixmap();
if ( px ) {
#ifndef KAB_EMBEDDED
@@ -233,5 +237,5 @@ KABC::Picture ImageWidget::logo() const
logo.setUrl( mLogoUrl->url() );
else {
- QPixmap *px = mLogoLabel->pixmap();
+ const QPixmap *px = mLogoLabel->pixmap();
if ( px ) {
#ifndef KAB_EMBEDDED
@@ -293,5 +297,5 @@ QPixmap ImageWidget::loadPixmap( const QString &url )
}
-#ifndef KAB_EMBEDDED
-#include "imagewidget.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_imagewidget.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/imagewidget.h b/kaddressbook/imagewidget.h
index bbfba58..9320a6b 100644
--- a/kaddressbook/imagewidget.h
+++ b/kaddressbook/imagewidget.h
@@ -26,4 +26,7 @@
#include <qwidget.h>
+//Added by qt3to4:
+#include <QPixmap>
+#include <QLabel>
#include <kabc/picture.h>
diff --git a/kaddressbook/incsearchwidget.cpp b/kaddressbook/incsearchwidget.cpp
index 5f8b83d..a54d1cd 100644
--- a/kaddressbook/incsearchwidget.cpp
+++ b/kaddressbook/incsearchwidget.cpp
@@ -26,5 +26,8 @@
#include <qtooltip.h>
#include <qapplication.h>
+#include <QDesktopWidget>
#include <qcombobox.h>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
#include <kdialog.h>
@@ -38,15 +41,16 @@
IncSearchWidget::IncSearchWidget( QWidget *parent, const char *name )
- : QWidget( parent, name )
{
+ setObjectName(name);
+ setParent(parent);
#ifndef KAB_EMBEDDED
//US setCaption( i18n( "Incremental Search" ) );
#endif //KAB_EMBEDDED
- QHBoxLayout *layout = new QHBoxLayout( this, 2, KDialog::spacingHint() );
+ Q3HBoxLayout *layout = new Q3HBoxLayout( this, 2, KDialog::spacingHint() );
#ifdef DESKTOP_VERSION
QLabel *label = new QLabel( i18n( "Search:" ), this );
- label->setAlignment( QLabel::AlignVCenter | QLabel::AlignRight );
+ label->setAlignment( Qt::AlignVCenter | Qt::AlignRight );
layout->addWidget( label );
#endif //KAB_EMBEDDED
@@ -177,5 +181,5 @@ int IncSearchWidget::currentItem() const
return mFieldCombo->currentItem();
}
-#ifndef KAB_EMBEDDED
-#include "incsearchwidget.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_incsearchwidget.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/jumpbuttonbar.cpp b/kaddressbook/jumpbuttonbar.cpp
index aebf8a6..740b7db 100644
--- a/kaddressbook/jumpbuttonbar.cpp
+++ b/kaddressbook/jumpbuttonbar.cpp
@@ -26,6 +26,9 @@
#include <qpushbutton.h>
#include <qstring.h>
-#include <qtl.h>
+#include <q3tl.h>
#include <qapplication.h>
+#include <QDesktopWidget>
+//Added by qt3to4:
+#include <Q3GridLayout>
#include <kabc/addressbook.h>
@@ -74,7 +77,7 @@ JumpButtonBar::JumpButtonBar( KABCore *core, QWidget *parent, const char *name )
if ( QApplication::desktop()->width() < 480 )
- mButtonLayout = new QGridLayout( this, 1, 18 );
+ mButtonLayout = new Q3GridLayout( this, 1, 18 );
else
- mButtonLayout = new QGridLayout( this, 1, 20 );
+ mButtonLayout = new Q3GridLayout( this, 1, 20 );
mButtonLayout->setAlignment( Qt::AlignTop );
@@ -253,5 +256,5 @@ void JumpButtonBar::sortListLocaleAware( QStringList &list )
}
-#ifndef KAB_EMBEDDED
-#include "jumpbuttonbar.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_jumpbuttonbar.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/jumpbuttonbar.h b/kaddressbook/jumpbuttonbar.h
index d534f2b..0589812 100644
--- a/kaddressbook/jumpbuttonbar.h
+++ b/kaddressbook/jumpbuttonbar.h
@@ -27,9 +27,12 @@
#include <qsizepolicy.h>
#include <qwidget.h>
-#include <qptrlist.h>
+#include <q3ptrlist.h>
#include <qstringlist.h>
+//Added by qt3to4:
+#include <QResizeEvent>
+#include <Q3GridLayout>
class QChar;
-class QGridLayout;
+class Q3GridLayout;
class QResizeEvent;
class QPushButton;
@@ -77,7 +80,7 @@ class JumpButtonBar : public QWidget
KABCore *mCore;
- QGridLayout *mButtonLayout;
+ Q3GridLayout *mButtonLayout;
QStringList mCharacters;
- QPtrList<JumpButton> mButtons;
+ Q3PtrList<JumpButton> mButtons;
};
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index ab2824c..03b44d1 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -40,5 +40,15 @@ $Id$
#include <qcheckbox.h>
#include <qpushbutton.h>
-#include <qprogressbar.h>
+#include <q3progressbar.h>
+#include <QDesktopWidget>
+//Added by qt3to4:
+#include <QResizeEvent>
+#include <QPixmap>
+#include <Q3ValueList>
+#include <Q3HBoxLayout>
+#include <Q3VBoxLayout>
+#include <Q3CString>
+#include <Q3PopupMenu>
+#include <Q3PtrList>
#include <libkdepim/phoneaccess.h>
@@ -48,8 +58,8 @@ $Id$
#include <qfile.h>
#include <qapplicaton.h>
-#include <qprogressbar.h>
+#include <q3progressbar.h>
#include <qlayout.h>
#include <qregexp.h>
-#include <qvbox.h>
+#include <q3vbox.h>
#include <kabc/addresseelist.h>
#include <kabc/errorhandler.h>
@@ -89,5 +99,5 @@ $Id$
#include <addresseeview.h>
-#include <qapp.h>
+#include <qapplication.h>
#include <qmenubar.h>
//#include <qtoolbar.h>
@@ -130,10 +140,10 @@ $Id$
#include <qdir.h>
#include <qfile.h>
-#include <qvbox.h>
+#include <q3vbox.h>
#include <qlayout.h>
#include <qclipboard.h>
-#include <qtextstream.h>
+#include <q3textstream.h>
#include <qradiobutton.h>
-#include <qbuttongroup.h>
+#include <q3buttongroup.h>
#include <libkdepim/categoryselectdialog.h>
@@ -176,10 +186,10 @@ class KABCatPrefs : public QDialog
{
setCaption( i18n("Manage new Categories") );
- QVBoxLayout* lay = new QVBoxLayout( this );
+ Q3VBoxLayout* lay = new Q3VBoxLayout( this );
lay->setSpacing( 3 );
lay->setMargin( 3 );
QLabel * lab = new QLabel( i18n("After importing/loading/syncing\nthere may be new categories in\naddressees\nwhich are not in the category list.\nPlease choose what to do:\n "), this );
lay->addWidget( lab );
- QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this );
+ Q3ButtonGroup* format = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("New categories not in list:"), this );
lay->addWidget( format );
format->setExclusive ( true ) ;
@@ -208,10 +218,10 @@ class KABFormatPrefs : public QDialog
{
setCaption( i18n("Set formatted name") );
- QVBoxLayout* lay = new QVBoxLayout( this );
+ Q3VBoxLayout* lay = new Q3VBoxLayout( this );
lay->setSpacing( 3 );
lay->setMargin( 3 );
QLabel * lab = new QLabel( i18n("You can set the formatted name\nfor a list of contacts in one go."), this );
lay->addWidget( lab );
- QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("Set formatted name to:"), this );
+ Q3ButtonGroup* format = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("Set formatted name to:"), this );
lay->addWidget( format );
format->setExclusive ( true ) ;
@@ -246,20 +256,20 @@ class KAex2phonePrefs : public QDialog
{
setCaption( i18n("Export to phone options") );
- QVBoxLayout* lay = new QVBoxLayout( this );
+ Q3VBoxLayout* lay = new Q3VBoxLayout( this );
lay->setSpacing( 3 );
lay->setMargin( 3 );
QLabel *lab;
lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) );
- lab->setAlignment (AlignHCenter );
- QHBox* temphb;
- temphb = new QHBox( this );
+ lab->setAlignment (Qt::AlignHCenter );
+ Q3HBox* temphb;
+ temphb = new Q3HBox( this );
new QLabel( i18n("I/O device: "), temphb );
mPhoneDevice = new QLineEdit( temphb);
lay->addWidget( temphb );
- temphb = new QHBox( this );
+ temphb = new Q3HBox( this );
new QLabel( i18n("Connection: "), temphb );
mPhoneConnection = new QLineEdit( temphb);
lay->addWidget( temphb );
- temphb = new QHBox( this );
+ temphb = new Q3HBox( this );
new QLabel( i18n("Model(opt.): "), temphb );
mPhoneModel = new QLineEdit( temphb);
@@ -268,5 +278,5 @@ class KAex2phonePrefs : public QDialog
// lay->addWidget( mWriteToSim );
lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ncontact data on phone!"), this ) );
- lab->setAlignment (AlignHCenter);
+ lab->setAlignment (Qt::AlignHCenter);
QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this );
lay->addWidget( ok );
@@ -408,5 +418,5 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const
QTimer::singleShot( 100, this, SLOT ( loadDataAfterStart() ));
}
-void KABCore::receiveStart( const QCString& cmsg, const QByteArray& data )
+void KABCore::receiveStart( const Q3CString& cmsg, const QByteArray& data )
{
//qDebug("KO: QCOP start message received: %s ", cmsg.data() );
@@ -422,7 +432,7 @@ void KABCore::loadDataAfterStart()
#ifndef DESKTOP_VERSION
- disconnect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT (receiveStart ( const QCString &, const QByteArray & )));
+ disconnect(qApp, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )), this, SLOT (receiveStart ( const Q3CString &, const QByteArray & )));
- QObject::connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
+ QObject::connect(qApp, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const Q3CString &, const QByteArray & )));
if ( !mCStringMess.isEmpty() )
ExternalAppHandler::instance()->appMessage( mCStringMess, mByteData );
@@ -454,9 +464,9 @@ KABCore::~KABCore()
#endif
}
-void KABCore::receive( const QCString& cmsg, const QByteArray& data )
+void KABCore::receive( const Q3CString& cmsg, const QByteArray& data )
{
//qDebug("KA: QCOP message received: %s ", cmsg.data() );
if ( cmsg == "setDocument(QString)" ) {
- QDataStream stream( data, IO_ReadOnly );
+ QDataStream stream( const_cast<QByteArray*>(&data), QIODevice::ReadOnly );
QString fileName;
stream >> fileName;
@@ -481,5 +491,5 @@ void KABCore::toggleBeamReceive( )
infrared = new QCopChannel("QPE/Application/addressbook",this, "channelAB" ) ;
- QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(receive( const QCString&, const QByteArray& )));
+ QObject::connect( infrared, SIGNAL (received ( const Q3CString &, const QByteArray & )),this, SLOT(receive( const Q3CString&, const QByteArray& )));
#endif
}
@@ -561,5 +571,5 @@ void KABCore::restoreSettings()
wid = QApplication::desktop()->height();
#endif
- QValueList<int> splitterSize;// = KABPrefs::instance()->mDetailsSplitter;
+ Q3ValueList<int> splitterSize;// = KABPrefs::instance()->mDetailsSplitter;
if ( true /*splitterSize.count() == 0*/ ) {
splitterSize.append( wid / 2 );
@@ -651,8 +661,8 @@ QStringList KABCore::selectedUIDs() const
KABC::Resource *KABCore::requestResource( QWidget *parent )
{
- QPtrList<KABC::Resource> kabcResources = addressBook()->resources();
+ Q3PtrList<KABC::Resource> kabcResources = addressBook()->resources();
- QPtrList<KRES::Resource> kresResources;
- QPtrListIterator<KABC::Resource> resIt( kabcResources );
+ Q3PtrList<KRES::Resource> kresResources;
+ Q3PtrListIterator<KABC::Resource> resIt( kabcResources );
KABC::Resource *resource;
while ( ( resource = resIt.current() ) != 0 ) {
@@ -796,5 +806,5 @@ void KABCore::mailVCard( const QStringList& uids )
QFile outFile(fileName);
- if ( outFile.open(IO_WriteOnly) ) { // file opened successfully
+ if ( outFile.open(QIODevice::WriteOnly) ) { // file opened successfully
KABC::VCardConverter converter;
QString vcard;
@@ -802,6 +812,6 @@ void KABCore::mailVCard( const QStringList& uids )
converter.addresseeToVCard( a, vcard );
- QTextStream t( &outFile ); // use a text stream
- t.setEncoding( QTextStream::UnicodeUTF8 );
+ Q3TextStream t( &outFile ); // use a text stream
+ t.setEncoding( Q3TextStream::UnicodeUTF8 );
t << vcard;
@@ -1017,9 +1027,9 @@ void KABCore::beamVCard(const QStringList& uids)
#ifndef DESKTOP_VERSION
QFile outFile(fileName);
- if ( outFile.open(IO_WriteOnly) ) {
+ if ( outFile.open(QIODevice::WriteOnly) ) {
datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" );
- QTextStream t( &outFile ); // use a text stream
+ Q3TextStream t( &outFile ); // use a text stream
//t.setEncoding( QTextStream::UnicodeUTF8 );
- t.setEncoding( QTextStream::Latin1 );
+ t.setEncoding( Q3TextStream::Latin1 );
t <<datastream.latin1();
outFile.close();
@@ -1298,8 +1308,8 @@ void KABCore::newContact()
- QPtrList<KABC::Resource> kabcResources = mAddressBook->resources();
+ Q3PtrList<KABC::Resource> kabcResources = mAddressBook->resources();
- QPtrList<KRES::Resource> kresResources;
- QPtrListIterator<KABC::Resource> it( kabcResources );
+ Q3PtrList<KRES::Resource> kresResources;
+ Q3PtrListIterator<KABC::Resource> it( kabcResources );
KABC::Resource *resource;
while ( ( resource = it.current() ) != 0 ) {
@@ -1857,5 +1867,5 @@ void KABCore::initGUI()
{
#ifndef KAB_EMBEDDED
- QHBoxLayout *topLayout = new QHBoxLayout( this );
+ Q3HBoxLayout *topLayout = new Q3HBoxLayout( this );
topLayout->setSpacing( KDialogBase::spacingHint() );
@@ -1865,5 +1875,5 @@ void KABCore::initGUI()
mDetailsSplitter = new QSplitter( mExtensionBarSplitter );
- QVBox *viewSpace = new QVBox( mDetailsSplitter );
+ Q3VBox *viewSpace = new Q3VBox( mDetailsSplitter );
mIncSearchWidget = new IncSearchWidget( viewSpace );
connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ),
@@ -1889,17 +1899,17 @@ void KABCore::initGUI()
//US initialize viewMenu before settingup viewmanager.
// Viewmanager needs this menu to plugin submenues.
- viewMenu = new QPopupMenu( this );
- settingsMenu = new QPopupMenu( this );
+ viewMenu = new Q3PopupMenu( this );
+ settingsMenu = new Q3PopupMenu( this );
//filterMenu = new QPopupMenu( this );
- ImportMenu = new QPopupMenu( this );
- ExportMenu = new QPopupMenu( this );
- syncMenu = new QPopupMenu( this );
- changeMenu= new QPopupMenu( this );
- beamMenu= new QPopupMenu( this );
+ ImportMenu = new Q3PopupMenu( this );
+ ExportMenu = new Q3PopupMenu( this );
+ syncMenu = new Q3PopupMenu( this );
+ changeMenu= new Q3PopupMenu( this );
+ beamMenu= new Q3PopupMenu( this );
//US since we have no splitter for the embedded system, setup
// a layout with two frames. One left and one right.
- QBoxLayout *topLayout;
+ Q3BoxLayout *topLayout;
// = new QHBoxLayout( this );
@@ -1910,5 +1920,5 @@ void KABCore::initGUI()
#ifdef DESKTOP_VERSION
- topLayout = new QHBoxLayout( this );
+ topLayout = new Q3HBoxLayout( this );
@@ -1925,10 +1935,10 @@ void KABCore::initGUI()
#else
if ( QApplication::desktop()->width() > 480 ) {
- topLayout = new QHBoxLayout( this );
+ topLayout = new Q3HBoxLayout( this );
mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this);
mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right );
} else {
- topLayout = new QHBoxLayout( this );
+ topLayout = new Q3HBoxLayout( this );
mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Vertical, this);
mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down );
@@ -2035,5 +2045,5 @@ void KABCore::initActions()
mActionMail = KStdAction::mail( this, SLOT( sendMail() ), actionCollection() );
//mActionPrint = KStdAction::print( this, SLOT( print() ), actionCollection() );
- mActionPrint = new KAction( i18n( "&Print View" ), "fileprint", CTRL + Key_P, mViewManager,
+ mActionPrint = new KAction( i18n( "&Print View" ), "fileprint", Qt::CTRL + Qt::Key_P, mViewManager,
SLOT( printView() ), actionCollection(), "kaddressbook_print" );
@@ -2042,8 +2052,8 @@ void KABCore::initActions()
SLOT( printView() ), actionCollection(), "kaddressbook_print2" );
- mActionSave = new KAction( i18n( "&Save" ), "filesave", CTRL+Key_S, this,
+ mActionSave = new KAction( i18n( "&Save" ), "filesave", Qt::CTRL+Qt::Key_S, this,
SLOT( save() ), actionCollection(), "file_sync" );
- mActionNewContact = new KAction( i18n( "&New Contact..." ), "filenew", CTRL+Key_N, this,
+ mActionNewContact = new KAction( i18n( "&New Contact..." ), "filenew", Qt::CTRL+Qt::Key_N, this,
SLOT( newContact() ), actionCollection(), "file_new_contact" );
@@ -2084,20 +2094,20 @@ void KABCore::initActions()
// edit menu
if ( mIsPart ) {
- mActionCopy = new KAction( i18n( "&Copy" ), "editcopy", CTRL + Key_C, this,
+ mActionCopy = new KAction( i18n( "&Copy" ), "editcopy", Qt::CTRL + Qt::Key_C, this,
SLOT( copyContacts() ), actionCollection(),
"kaddressbook_copy" );
- mActionCut = new KAction( i18n( "Cu&t" ), "editcut", CTRL + Key_X, this,
+ mActionCut = new KAction( i18n( "Cu&t" ), "editcut", Qt::CTRL + Qt::Key_X, this,
SLOT( cutContacts() ), actionCollection(),
"kaddressbook_cut" );
- mActionPaste = new KAction( i18n( "&Paste" ), "editpaste", CTRL + Key_V, this,
+ mActionPaste = new KAction( i18n( "&Paste" ), "editpaste", Qt::CTRL + Qt::Key_V, this,
SLOT( pasteContacts() ), actionCollection(),
"kaddressbook_paste" );
- mActionSelectAll = new KAction( i18n( "Select &All" ), CTRL + Key_A, this,
+ mActionSelectAll = new KAction( i18n( "Select &All" ), Qt::CTRL + Qt::Key_A, this,
SLOT( selectAllContacts() ), actionCollection(),
"kaddressbook_select_all" );
- mActionUndo = new KAction( i18n( "&Undo" ), "undo", CTRL + Key_Z, this,
+ mActionUndo = new KAction( i18n( "&Undo" ), "undo", Qt::CTRL + Qt::Key_Z, this,
SLOT( undo() ), actionCollection(),
"kaddressbook_undo" );
- mActionRedo = new KAction( i18n( "Re&do" ), "redo", CTRL + SHIFT + Key_Z,
+ mActionRedo = new KAction( i18n( "Re&do" ), "redo", Qt::CTRL + Qt::SHIFT + Qt::Key_Z,
this, SLOT( redo() ), actionCollection(),
"kaddressbook_redo" );
@@ -2112,5 +2122,5 @@ void KABCore::initActions()
mActionDelete = new KAction( i18n( "&Delete Contact" ), "editdelete",
- Key_Delete, this, SLOT( deleteContacts() ),
+ Qt::Key_Delete, this, SLOT( deleteContacts() ),
actionCollection(), "edit_delete" );
@@ -2247,7 +2257,7 @@ void KABCore::addActionsManually()
#ifdef KAB_EMBEDDED
- QPopupMenu *fileMenu = new QPopupMenu( this );
- QPopupMenu *editMenu = new QPopupMenu( this );
- QPopupMenu *helpMenu = new QPopupMenu( this );
+ Q3PopupMenu *fileMenu = new Q3PopupMenu( this );
+ Q3PopupMenu *editMenu = new Q3PopupMenu( this );
+ Q3PopupMenu *helpMenu = new Q3PopupMenu( this );
KToolBar* tb = mMainWindow->toolBar();
@@ -2277,5 +2287,5 @@ void KABCore::addActionsManually()
//US setup toolbar
QPEMenuBar *menuBarTB = new QPEMenuBar( tb );
- QPopupMenu *popupBarTB = new QPopupMenu( this );
+ Q3PopupMenu *popupBarTB = new Q3PopupMenu( this );
menuBarTB->insertItem( SmallIcon( "z_menu" ) , popupBarTB);
tb->insertWidget(-1, 0, menuBarTB);
@@ -2632,5 +2642,5 @@ void KABCore::configureKeyBindings()
void KABCore::configureResources()
{
- KRES::KCMKResources dlg( this, "" , 0 );
+ KRES::KCMKResources dlg( this, "" , QStringList() );
if ( !dlg.exec() )
@@ -2728,5 +2738,5 @@ void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString
++count;
}
- QProgressBar bar(count,0 );
+ Q3ProgressBar bar(count,0 );
int w = 300;
if ( QApplication::desktop()->width() < 320 )
@@ -2909,5 +2919,5 @@ KABC::Addressee KABCore::getLastSyncAddressee()
lse.setFamilyName("!"+sum+mCurrentSyncDevice + i18n(" - sync event"));
lse.setRevision( mLastAddressbookSync );
- lse.setCategories( i18n("SyncEvent") );
+ lse.setCategories( QStringList(i18n("SyncEvent")) );
mAddressBook->insertAddressee( lse );
}
@@ -3100,5 +3110,5 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo
addresseeRSync.setUid("last-syncAddressee-"+mCurrentSyncName );
addresseeRSync.setRevision( mLastAddressbookSync );
- addresseeRSync.setCategories( i18n("SyncAddressee") );
+ addresseeRSync.setCategories( QStringList(i18n("SyncAddressee")) );
}
}
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h
index ec6a9ec..4351720 100644
--- a/kaddressbook/kabcore.h
+++ b/kaddressbook/kabcore.h
@@ -29,9 +29,13 @@
#ifndef KAB_EMBEDDED
#endif //KAB_EMBEDDED
-#include <qdict.h>
+#include <q3dict.h>
#include <qtimer.h>
#include <qwidget.h>
-#include <qpopupmenu.h>
+#include <q3popupmenu.h>
+//Added by qt3to4:
+#include <Q3CString>
+#include <QPixmap>
+#include <QResizeEvent>
#include <ksyncmanager.h>
#ifndef DESKTOP_VERSION
@@ -86,7 +90,7 @@ class KABCore : public QWidget, public KSyncInterface
#ifdef KAB_EMBEDDED
//US added functionality
- QPopupMenu* getViewMenu() {return viewMenu;}
- QPopupMenu* getFilterMenu() {return filterMenu;}
- QPopupMenu* getSettingsMenu() {return settingsMenu;}
+ Q3PopupMenu* getViewMenu() {return viewMenu;}
+ Q3PopupMenu* getFilterMenu() {return filterMenu;}
+ Q3PopupMenu* getSettingsMenu() {return settingsMenu;}
void addActionsManually();
#endif //KAB_EMBEDDED
@@ -136,6 +140,6 @@ class KABCore : public QWidget, public KSyncInterface
#ifdef KAB_EMBEDDED
- inline QPopupMenu* getImportMenu() { return ImportMenu;}
- inline QPopupMenu* getExportMenu() { return ExportMenu;}
+ inline Q3PopupMenu* getImportMenu() { return ImportMenu;}
+ inline Q3PopupMenu* getExportMenu() { return ExportMenu;}
#endif //KAB_EMBEDDED
@@ -367,6 +371,6 @@ class KABCore : public QWidget, public KSyncInterface
void updateToolBar();
void updateMainWindow();
- void receive( const QCString& cmsg, const QByteArray& data );
- void receiveStart( const QCString& cmsg, const QByteArray& data );
+ void receive( const Q3CString& cmsg, const QByteArray& data );
+ void receiveStart( const Q3CString& cmsg, const QByteArray& data );
void toggleBeamReceive( );
void disableBR(bool);
@@ -395,5 +399,5 @@ class KABCore : public QWidget, public KSyncInterface
private:
- QCString mCStringMess;
+ Q3CString mCStringMess;
QByteArray mByteData;
QString mEmailSourceChannel;
@@ -487,12 +491,12 @@ class KABCore : public QWidget, public KSyncInterface
KAction *mActionDeleteView;
- QPopupMenu *viewMenu;
- QPopupMenu *filterMenu;
- QPopupMenu *settingsMenu;
- QPopupMenu *changeMenu;
- QPopupMenu *beamMenu;
+ Q3PopupMenu *viewMenu;
+ Q3PopupMenu *filterMenu;
+ Q3PopupMenu *settingsMenu;
+ Q3PopupMenu *changeMenu;
+ Q3PopupMenu *beamMenu;
//US QAction *mActionSave;
- QPopupMenu *ImportMenu;
- QPopupMenu *ExportMenu;
+ Q3PopupMenu *ImportMenu;
+ Q3PopupMenu *ExportMenu;
//LR additional methods
KAction *mActionRemoveVoice;
@@ -525,5 +529,5 @@ class KABCore : public QWidget, public KSyncInterface
// sync stuff!
QString sentSyncFile();
- QPopupMenu *syncMenu;
+ Q3PopupMenu *syncMenu;
KSyncManager* syncManager;
int mGlobalSyncMode;
diff --git a/kaddressbook/kabprefs.cpp b/kaddressbook/kabprefs.cpp
index 42d541b..6f9c995 100644
--- a/kaddressbook/kabprefs.cpp
+++ b/kaddressbook/kabprefs.cpp
@@ -26,5 +26,5 @@
//#endif //KAB_EMBEDDED
-#include <qtextstream.h>
+#include <q3textstream.h>
#include <qfile.h>
#include <qregexp.h>
@@ -92,5 +92,5 @@ KABPrefs::KABPrefs()
QString defaultView = i18n( "Default Table View" );
addItemString( "CurrentView", &mCurrentView, defaultView );
- addItemStringList( "ViewNames", &mViewNames, defaultView );
+ addItemStringList( "ViewNames", &mViewNames, QStringList(defaultView) );
KPrefs::setCurrentGroup( "Filters" );
diff --git a/kaddressbook/kabprefs.h b/kaddressbook/kabprefs.h
index ddbc0c0..aff725e 100644
--- a/kaddressbook/kabprefs.h
+++ b/kaddressbook/kabprefs.h
@@ -26,5 +26,7 @@
#include <qstringlist.h>
-#include <qdict.h>
+#include <q3dict.h>
+//Added by qt3to4:
+#include <Q3ValueList>
#include <libkdepim/kpimprefs.h>
@@ -74,6 +76,6 @@ class KABPrefs : public KPimPrefs
bool mHideSearchOnSwitch;
bool mAskForDelete;
- QValueList<int> mExtensionsSplitter;
- QValueList<int> mDetailsSplitter;
+ Q3ValueList<int> mExtensionsSplitter;
+ Q3ValueList<int> mDetailsSplitter;
// Extensions stuff
diff --git a/kaddressbook/kaddressbook.pro b/kaddressbook/kaddressbook.pro
index cd38e5f..4eb1f7f 100644
--- a/kaddressbook/kaddressbook.pro
+++ b/kaddressbook/kaddressbook.pro
@@ -14,26 +14,26 @@ unix : {
staticlib: {
TARGET = kapi_linux
-LIBS += ../bin/libmicrokabc_qtopia.a
-LIBS += ../bin/libmicrokabc_file.a
-LIBS += ../bin/libmicrokabc_dir.a
-LIBS += ../bin/libmicrokdepim.a
-LIBS += ../bin/libmicrokcal.a
-LIBS += ../bin/libmicrokabc.a
-LIBS += ../bin/libmicrokde.a
-LIBS += ../bin/libmicrokabc_qtopia.a
-LIBS += ../bin/libmicrokabc_file.a
-LIBS += ../bin/libmicrokabc_dir.a
-LIBS += ../bin/libmicrokdepim.a
-LIBS += ../bin/libmicrokcal.a
-LIBS += ../bin/libmicrokabc.a
-LIBS += ../bin/libmicrokde.a
+LIBS += ../bin/libxmicrokabc_qtopia.a
+LIBS += ../bin/libxmicrokabc_file.a
+LIBS += ../bin/libxmicrokabc_dir.a
+LIBS += ../bin/libxmicrokdepim.a
+LIBS += ../bin/libxmicrokcal.a
+LIBS += ../bin/libxmicrokabc.a
+LIBS += ../bin/libxmicrokde.a
+LIBS += ../bin/libxmicrokabc_qtopia.a
+LIBS += ../bin/libxmicrokabc_file.a
+LIBS += ../bin/libxmicrokabc_dir.a
+LIBS += ../bin/libxmicrokdepim.a
+LIBS += ../bin/libxmicrokcal.a
+LIBS += ../bin/libxmicrokabc.a
+LIBS += ../bin/libxmicrokde.a
LIBS += ../libical/lib/libical.a
LIBS += ../libical/lib/libicalss.a
} else {
-LIBS += ../bin/libmicrokdepim.so
-LIBS += ../bin/libmicrokde.so
-LIBS += ../bin/libmicrokabc.so
-LIBS += ../bin/libmicrokcal.so
+LIBS += ../bin/libxmicrokdepim.so
+LIBS += ../bin/libxmicrokde.so
+LIBS += ../bin/libxmicrokabc.so
+LIBS += ../bin/libxmicrokcal.so
#LIBS += -lldap
}
@@ -44,8 +44,8 @@ win32: {
RC_FILE = winicons.rc
DEFINES += _WIN32_
-LIBS += ../bin/microkdepim.lib
-LIBS += ../bin/microkcal.lib
-LIBS += ../bin/microkde.lib
-LIBS += ../bin/microkabc.lib
+LIBS += ../bin/xmicrokdepim.lib
+LIBS += ../bin/xmicrokcal.lib
+LIBS += ../bin/xmicrokde.lib
+LIBS += ../bin/xmicrokabc.lib
QMAKE_LINK += /NODEFAULTLIB:LIBC
OBJECTS_DIR = obj/win
@@ -205,2 +205,4 @@ xxport/sharpdtm_xxport.cpp \
# timespanview.cpp
+#The following line was inserted by qt3to4
+QT += xml qt3support
diff --git a/kaddressbook/kaddressbookE.pro b/kaddressbook/kaddressbookE.pro
index 64e3a4a..c4b2499 100644
--- a/kaddressbook/kaddressbookE.pro
+++ b/kaddressbook/kaddressbookE.pro
@@ -13,8 +13,8 @@ DEFINES += KAB_EMBEDDED KAB_NOSPLITTER
#DEFINES += KORG_NOPRINTER KORG_NODCOP KORG_NOKALARMD KORG_NORESOURCEVIEW KORG_NOSPLITTER
#DEFINES += KORG_NOLVALTERNATION
-LIBS += -lmicrokdepim
-LIBS += -lmicrokde
+LIBS += -lxmicrokdepim
+LIBS += -lxmicrokde
LIBS += -lmicroqtcompat
-LIBS += -lmicrokabc
+LIBS += -lxmicrokabc
LIBS += -lqpe
LIBS += -ljpeg
diff --git a/kaddressbook/kaddressbookmain.cpp b/kaddressbook/kaddressbookmain.cpp
index c417226..b317974 100644
--- a/kaddressbook/kaddressbookmain.cpp
+++ b/kaddressbook/kaddressbookmain.cpp
@@ -26,6 +26,9 @@
#include <kglobal.h>
#include <qmessagebox.h>
-#include <qtoolbar.h>
+#include <q3toolbar.h>
#include <qapplication.h>
+//Added by qt3to4:
+#include <Q3CString>
+#include <QCloseEvent>
#else //KAB_EMBEDDED
#include <kedittoolbar.h>
@@ -43,7 +46,7 @@
KAddressBookMain::KAddressBookMain() : KMainWindow( 0, "abmain" )
#else //KAB_EMBEDDED
-//MOC_SKIP_BEGIN
+#ifndef Q_MOC_RUN
KAddressBookMain::KAddressBookMain() : DCOPObject( "KAddressBookIface" ), KMainWindow( 0 )
-//MOC_SKIP_END
+#endif
#endif //KAB_EMBEDDED
{
@@ -52,7 +55,7 @@ KAddressBookMain::KAddressBookMain() : DCOPObject( "KAddressBookIface" ), KMainW
//US for embedded systems, create the toolbar before we initiate KABCore.
// KABCore will fill the toolbar with menues and icons
- QMainWindow::ToolBarDock tbd;
- tbd = Top;
- iconToolBar = new QToolBar( this );
+ Qt::ToolBarDock tbd;
+ tbd = Qt::DockTop;
+ iconToolBar = new Q3ToolBar( this );
addToolBar (iconToolBar , tbd );
iconToolBar->setHorizontalStretchable(true);
@@ -86,5 +89,5 @@ KAddressBookMain::KAddressBookMain() : DCOPObject( "KAddressBookIface" ), KMainW
mCore->restoreSettings();
#ifndef DESKTOP_VERSION
- QObject::connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), mCore, SLOT (receiveStart ( const QCString &, const QByteArray & )));
+ QObject::connect(qApp, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )), mCore, SLOT (receiveStart ( const Q3CString &, const QByteArray & )));
#endif
}
@@ -236,6 +239,5 @@ void KAddressBookMain::closeEvent( QCloseEvent* ce )
}
-#ifndef KAB_EMBEDDED
-#include "kaddressbookmain.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_kaddressbookmain.cpp"
#endif //KAB_EMBEDDED
-
diff --git a/kaddressbook/kaddressbookmain.h b/kaddressbook/kaddressbookmain.h
index b6d9b4b..d3f5cc7 100644
--- a/kaddressbook/kaddressbookmain.h
+++ b/kaddressbook/kaddressbookmain.h
@@ -25,8 +25,10 @@
#define KADDRESSBOOKMAIN_H
-#include <qptrlist.h>
+#include <q3ptrlist.h>
+//Added by qt3to4:
+#include <QCloseEvent>
#ifdef KAB_EMBEDDED
-class QToolBar;
+class Q3ToolBar;
#include <qaction.h>
//#include <qmainwindow.h>
@@ -53,7 +55,7 @@ class KConfig;
class KAddressBookMain : public KMainWindow
#else //KAB_EMBEDDED
-//MOC_SKIP_BEGIN
+#ifndef Q_MOC_RUN
class KAddressBookMain : public KMainWindow, virtual public KAddressBookIface
-//MOC_SKIP_END
+#endif
#endif //KAB_EMBEDDED
{
@@ -74,7 +76,7 @@ class KAddressBookMain : public KMainWindow, virtual public KAddressBookIface
virtual void addEmail( QString addr );
#ifndef KAB_EMBEDDED
-//MOC_SKIP_BEGIN
+#ifndef Q_MOC_RUN
virtual ASYNC showContactEditor( QString uid );
-//MOC_SKIP_END
+#endif
#endif //KAB_EMBEDDED
virtual void newContact();
diff --git a/kaddressbook/kaddressbookview.cpp b/kaddressbook/kaddressbookview.cpp
index 86898e2..4823b37 100644
--- a/kaddressbook/kaddressbookview.cpp
+++ b/kaddressbook/kaddressbookview.cpp
@@ -33,4 +33,6 @@
#endif //KAB_EMBEDDED
#include <qlayout.h>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
#include <kabc/distributionlistdialog.h>
@@ -134,5 +136,5 @@ void KAddressBookView::initGUI()
{
// Create the layout
- QVBoxLayout *layout = new QVBoxLayout( this );
+ Q3VBoxLayout *layout = new Q3VBoxLayout( this );
// Add the view widget
@@ -184,5 +186,5 @@ ViewConfigureWidget *ViewFactory::configureWidget( KABC::AddressBook *ab,
-#ifndef KAB_EMBEDDED
-#include "kaddressbookview.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_kaddressbookview.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/kaddressbookview.h b/kaddressbook/kaddressbookview.h
index 3a3f71a..e423cd7 100644
--- a/kaddressbook/kaddressbookview.h
+++ b/kaddressbook/kaddressbookview.h
@@ -1,2 +1,4 @@
+//Added by qt3to4:
+#include <QDropEvent>
/*
This file is part of KAddressBook.
@@ -41,5 +43,5 @@ class QDropEvent;
#ifdef DESKTOP_VERSION
-#include <qpaintdevicemetrics.h>
+#include <q3paintdevicemetrics.h>
#include <qprinter.h>
#include <qpainter.h>
@@ -176,7 +178,7 @@ class KAddressBookView : public QWidget
*/
#ifndef KAB_EMBEDDED
-//MOC_SKIP_BEGIN
+#ifndef Q_MOC_RUN
virtual void setSelected( QString uid = QString::null, bool selected = true ) = 0;
-//MOC_SKIP_END
+#endif
#else //KAB_EMBEDDED
//US my moc can not handle the default parameters. Is this a problem ???
@@ -263,7 +265,7 @@ class KAddressBookView : public QWidget
#ifndef KAB_EMBEDDED
-//MOC_SKIP_BEGIN
+#ifndef Q_MOC_RUN
class ViewFactory : public KLibFactory
-//MOC_SKIP_END
+#endif
#else //KAB_EMBEDDED
class ViewFactory
diff --git a/kaddressbook/kcmconfigs/addresseewidget.cpp b/kaddressbook/kcmconfigs/addresseewidget.cpp
index 168d39e..8055085 100644
--- a/kaddressbook/kcmconfigs/addresseewidget.cpp
+++ b/kaddressbook/kcmconfigs/addresseewidget.cpp
@@ -22,10 +22,14 @@
*/
-#include <qgroupbox.h>
+#include <q3groupbox.h>
#include <qlabel.h>
#include <qlayout.h>
-#include <qlistbox.h>
+#include <q3listbox.h>
#include <qpushbutton.h>
#include <qapplication.h>
+#include <QDesktopWidget>
+//Added by qt3to4:
+#include <Q3GridLayout>
+#include <Q3HBoxLayout>
#include <kbuttonbox.h>
@@ -46,5 +50,5 @@ NamePartWidget::NamePartWidget( const QString &title, QWidget *parent,
if (KGlobal::getOrientation() == KGlobal::Portrait)
{
- QGridLayout* layout = new QGridLayout( this, 1, 1, KDialog::marginHintSmall(),
+ Q3GridLayout* layout = new Q3GridLayout( this, 1, 1, KDialog::marginHintSmall(),
KDialog::spacingHintSmall() );
@@ -52,5 +56,5 @@ NamePartWidget::NamePartWidget( const QString &title, QWidget *parent,
layout->addWidget( label, 0, 1 );
- mBox = new QListBox( this );
+ mBox = new Q3ListBox( this );
mBox->setMaximumSize(70, 70);
layout->addMultiCellWidget( mBox, 0, 1, 0, 0 );
@@ -71,11 +75,11 @@ NamePartWidget::NamePartWidget( const QString &title, QWidget *parent,
else
{
- QHBoxLayout *layout = new QHBoxLayout( this );
+ Q3HBoxLayout *layout = new Q3HBoxLayout( this );
- QGroupBox *group = new QGroupBox( 0, Qt::Vertical, title, this );
- QGridLayout *groupLayout = new QGridLayout( group->layout(), 2, 2,
+ Q3GroupBox *group = new Q3GroupBox( 0, Qt::Vertical, title, this );
+ Q3GridLayout *groupLayout = new Q3GridLayout( group->layout(), 2, 2,
KDialog::spacingHint() );
- mBox = new QListBox( group );
+ mBox = new Q3ListBox( group );
groupLayout->addWidget( mBox, 0, 0 );
@@ -98,6 +102,6 @@ NamePartWidget::NamePartWidget( const QString &title, QWidget *parent,
- connect( mBox, SIGNAL( selectionChanged( QListBoxItem* ) ),
- SLOT( selectionChanged( QListBoxItem* ) ) );
+ connect( mBox, SIGNAL( selectionChanged( Q3ListBoxItem* ) ),
+ SLOT( selectionChanged( Q3ListBoxItem* ) ) );
connect( mEdit, SIGNAL( textChanged( const QString& ) ),
SLOT( textChanged( const QString& ) ) );
@@ -144,5 +148,5 @@ void NamePartWidget::remove()
}
-void NamePartWidget::selectionChanged( QListBoxItem *item )
+void NamePartWidget::selectionChanged( Q3ListBoxItem *item )
{
mRemoveButton->setEnabled( item != 0 );
@@ -158,5 +162,5 @@ AddresseeWidget::AddresseeWidget( QWidget *parent, const char *name )
: QWidget( parent, name )
{
- QGridLayout *layout;
+ Q3GridLayout *layout;
mPrefix = new NamePartWidget( i18n( "Prefixes" ), this );
@@ -179,5 +183,5 @@ AddresseeWidget::AddresseeWidget( QWidget *parent, const char *name )
if (KGlobal::getOrientation() == KGlobal::Portrait)
{
- layout = new QGridLayout( this, 4, 2, KDialog::marginHintSmall(),
+ layout = new Q3GridLayout( this, 4, 2, KDialog::marginHintSmall(),
KDialog::spacingHintSmall() );
@@ -191,5 +195,5 @@ AddresseeWidget::AddresseeWidget( QWidget *parent, const char *name )
else
{
- layout = new QGridLayout( this, 2, 3, KDialog::marginHint(),
+ layout = new Q3GridLayout( this, 2, 3, KDialog::marginHint(),
KDialog::spacingHint() );
@@ -234,5 +238,5 @@ void AddresseeWidget::saveSettings()
}
-#ifndef KAB_EMBEDDED
-#include "addresseewidget.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_addresseewidget.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/kcmconfigs/addresseewidget.h b/kaddressbook/kcmconfigs/addresseewidget.h
index 09330c8..f2a95a8 100644
--- a/kaddressbook/kcmconfigs/addresseewidget.h
+++ b/kaddressbook/kcmconfigs/addresseewidget.h
@@ -30,6 +30,6 @@ class KComboBox;
class KLineEdit;
-class QListBox;
-class QListBoxItem;
+class Q3ListBox;
+class Q3ListBoxItem;
class QPushButton;
@@ -53,5 +53,5 @@ class NamePartWidget : public QWidget
void remove();
- void selectionChanged( QListBoxItem* );
+ void selectionChanged( Q3ListBoxItem* );
void textChanged( const QString& );
@@ -59,5 +59,5 @@ class NamePartWidget : public QWidget
KLineEdit *mEdit;
- QListBox *mBox;
+ Q3ListBox *mBox;
QPushButton *mAddButton;
QPushButton *mRemoveButton;
diff --git a/kaddressbook/kcmconfigs/extensionconfigdialog.cpp b/kaddressbook/kcmconfigs/extensionconfigdialog.cpp
index e87b000..33b66ad 100644
--- a/kaddressbook/kcmconfigs/extensionconfigdialog.cpp
+++ b/kaddressbook/kcmconfigs/extensionconfigdialog.cpp
@@ -23,4 +23,7 @@
#include <qlayout.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
+#include <Q3Frame>
#include <klocale.h>
@@ -35,6 +38,6 @@ ExtensionConfigDialog::ExtensionConfigDialog( ExtensionFactory *factory, KConfig
name, true, true ), mWidget( 0 ), mConfig( config )
{
- QFrame *page = plainPage();
- QGridLayout *layout = new QGridLayout( page, 1, 1, marginHint(), spacingHint() );
+ Q3Frame *page = plainPage();
+ Q3GridLayout *layout = new Q3GridLayout( page, 1, 1, marginHint(), spacingHint() );
mWidget = factory->configureWidget( page, "ExtensionConfigWidget" );
@@ -55,5 +58,5 @@ void ExtensionConfigDialog::slotOk()
}
-#ifndef KAB_EMBEDDED
-#include "extensionconfigdialog.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_extensionconfigdialog.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/kcmconfigs/kabconfigwidget.cpp b/kaddressbook/kcmconfigs/kabconfigwidget.cpp
index 9e4db74..d2b7ef1 100644
--- a/kaddressbook/kcmconfigs/kabconfigwidget.cpp
+++ b/kaddressbook/kcmconfigs/kabconfigwidget.cpp
@@ -23,6 +23,6 @@
#include <qcheckbox.h>
-#include <qframe.h>
-#include <qgroupbox.h>
+#include <q3frame.h>
+#include <q3groupbox.h>
#include <qlayout.h>
#include <qpushbutton.h>
@@ -32,5 +32,9 @@
#include <qlabel.h>
#include <qfile.h>
-#include <qvbox.h>
+#include <q3vbox.h>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
+#include <Q3PtrList>
+#include <Q3VBoxLayout>
#include <kconfig.h>
@@ -58,13 +62,13 @@
#include <kglobalsettings.h>
-class ExtensionItem : public QCheckListItem
+class ExtensionItem : public Q3CheckListItem
{
public:
#ifndef KAB_EMBEDDED
- ExtensionItem( QListView *parent, const QString &text );
+ ExtensionItem( Q3ListView *parent, const QString &text );
void setService( const KService::Ptr &ptr );
#else //KAB_EMBEDDED
- ExtensionItem( QListView *parent, const QString &text, const QString &name, const QString &comment );
+ ExtensionItem( Q3ListView *parent, const QString &text, const QString &name, const QString &comment );
void setFactory( ExtensionFactory* fac );
#endif //KAB_EMBEDDED
@@ -91,5 +95,5 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char *
{
- QVBoxLayout *topLayout = new QVBoxLayout( this, 0,
+ Q3VBoxLayout *topLayout = new Q3VBoxLayout( this, 0,
KDialog::spacingHintSmall() );
@@ -99,10 +103,10 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char *
// General page
QWidget *generalPage = new QWidget( this );
- QVBoxLayout *layout = new QVBoxLayout( generalPage, KDialog::marginHintSmall(),
+ Q3VBoxLayout *layout = new Q3VBoxLayout( generalPage, KDialog::marginHintSmall(),
KDialog::spacingHintSmall() );
QWidget *hBox = new QWidget( generalPage, "qhbox" );
- QHBoxLayout *hboxLayout = new QHBoxLayout( hBox);
+ Q3HBoxLayout *hboxLayout = new Q3HBoxLayout( hBox);
KPrefsWidFont *detailsFont =
addWidFont(i18n("phone:123"),i18n("Details view font"),
@@ -118,5 +122,5 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char *
//general groupbox
QWidget *vBox = new QWidget( generalPage, "qvbox" );
- QVBoxLayout *boxLayout = new QVBoxLayout( vBox );
+ Q3VBoxLayout *boxLayout = new Q3VBoxLayout( vBox );
boxLayout->setAlignment( Qt::AlignTop );
boxLayout->setMargin(KDialog::marginHintSmall() );
@@ -155,11 +159,11 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char *
// Extension page
QWidget *extensionPage = new QWidget( this );
- QVBoxLayout *extensionLayout = new QVBoxLayout( extensionPage, KDialog::marginHintSmall(),
+ Q3VBoxLayout *extensionLayout = new Q3VBoxLayout( extensionPage, KDialog::marginHintSmall(),
KDialog::spacingHintSmall() );
//extensions groupbox
- QGroupBox* groupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Extensions (restart)" ), extensionPage );
- boxLayout = new QVBoxLayout( groupBox->layout() );
+ Q3GroupBox* groupBox = new Q3GroupBox( 0, Qt::Vertical, i18n( "Extensions (restart)" ), extensionPage );
+ boxLayout = new Q3VBoxLayout( groupBox->layout() );
boxLayout->setAlignment( Qt::AlignTop );
boxLayout->setMargin(KDialog::marginHintSmall());
@@ -190,8 +194,8 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char *
connect( mAskForQuit, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) );
connect( mAskForDelete, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) );
- connect( mExtensionView, SIGNAL( selectionChanged( QListViewItem* ) ),
- SLOT( selectionChanged( QListViewItem* ) ) );
- connect( mExtensionView, SIGNAL( clicked( QListViewItem* ) ),
- SLOT( itemClicked( QListViewItem* ) ) );
+ connect( mExtensionView, SIGNAL( selectionChanged( Q3ListViewItem* ) ),
+ SLOT( selectionChanged( Q3ListViewItem* ) ) );
+ connect( mExtensionView, SIGNAL( clicked( Q3ListViewItem* ) ),
+ SLOT( itemClicked( Q3ListViewItem* ) ) );
connect( mConfigureButton, SIGNAL( clicked() ),
SLOT( configureExtension() ) );
@@ -296,6 +300,6 @@ void KABConfigWidget::saveExtensionSettings()
QStringList activeExtensions;
- QPtrList<QListViewItem> list;
- QListViewItemIterator it( mExtensionView );
+ Q3PtrList<Q3ListViewItem> list;
+ Q3ListViewItemIterator it( mExtensionView );
while ( it.current() ) {
ExtensionItem *item = static_cast<ExtensionItem*>( it.current() );
@@ -329,5 +333,5 @@ void KABConfigWidget::configureExtension()
}
-void KABConfigWidget::selectionChanged( QListViewItem *i )
+void KABConfigWidget::selectionChanged( Q3ListViewItem *i )
{
ExtensionItem *item = static_cast<ExtensionItem*>( i );
@@ -338,5 +342,5 @@ void KABConfigWidget::selectionChanged( QListViewItem *i )
}
-void KABConfigWidget::itemClicked( QListViewItem *item )
+void KABConfigWidget::itemClicked( Q3ListViewItem *item )
{
if ( item != 0 )
@@ -345,6 +349,6 @@ void KABConfigWidget::itemClicked( QListViewItem *item )
#ifndef KAB_EMBEDDED
-ExtensionItem::ExtensionItem( QListView *parent, const QString &text )
- : QCheckListItem( parent, text, CheckBox )
+ExtensionItem::ExtensionItem( Q3ListView *parent, const QString &text )
+ : Q3CheckListItem( parent, text, CheckBox )
{
}
@@ -355,6 +359,6 @@ void ExtensionItem::setService( const KService::Ptr &ptr )
}
#else //KAB_EMBEDDED
-ExtensionItem::ExtensionItem( QListView *parent, const QString &text, const QString &name, const QString &comment )
- : QCheckListItem( parent, text, CheckBox )
+ExtensionItem::ExtensionItem( Q3ListView *parent, const QString &text, const QString &name, const QString &comment )
+ : Q3CheckListItem( parent, text, CheckBox )
{
mName = name;
@@ -419,6 +423,5 @@ QString ExtensionItem::text( int column ) const
}
-#ifndef KAB_EMBEDDED
-#include "kabconfigwidget.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_kabconfigwidget.cpp"
#endif //KAB_EMBEDDED
-
diff --git a/kaddressbook/kcmconfigs/kabconfigwidget.h b/kaddressbook/kcmconfigs/kabconfigwidget.h
index f2a6b1b..4b6e58c 100644
--- a/kaddressbook/kcmconfigs/kabconfigwidget.h
+++ b/kaddressbook/kcmconfigs/kabconfigwidget.h
@@ -28,5 +28,5 @@
class QCheckBox;
-class QListViewItem;
+class Q3ListViewItem;
class QPushButton;
class QComboBox;
@@ -54,6 +54,6 @@ class KABConfigWidget : public KPrefsWidget
private slots:
void configureExtension();
- void selectionChanged( QListViewItem* );
- void itemClicked( QListViewItem* );
+ void selectionChanged( Q3ListViewItem* );
+ void itemClicked( Q3ListViewItem* );
private:
diff --git a/kaddressbook/kcmconfigs/kcmkabconfig.cpp b/kaddressbook/kcmconfigs/kcmkabconfig.cpp
index cbfedbd..55ffcd8 100644
--- a/kaddressbook/kcmconfigs/kcmkabconfig.cpp
+++ b/kaddressbook/kcmconfigs/kcmkabconfig.cpp
@@ -23,4 +23,6 @@
#include <qlayout.h>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
#ifndef KAB_EMBEDDED
@@ -49,5 +51,5 @@ KCMKabConfig::KCMKabConfig( QWidget *parent, const char *name )
{
//abort();
- QVBoxLayout *layout = new QVBoxLayout( this );
+ Q3VBoxLayout *layout = new Q3VBoxLayout( this );
mConfigWidget = new KABConfigWidget( (KABPrefs*)getPreferences(), this, "KABConfigWidget" );
layout->addWidget( mConfigWidget );
@@ -88,5 +90,5 @@ const KAboutData* KCMKabConfig::aboutData() const
#endif //KAB_EMBEDDED
-#ifndef KAB_EMBEDDED
-#include "kcmkabconfig.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_kcmkabconfig.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/keywidget.cpp b/kaddressbook/keywidget.cpp
index c117d34..8ebee19 100644
--- a/kaddressbook/keywidget.cpp
+++ b/kaddressbook/keywidget.cpp
@@ -29,4 +29,6 @@
#include <qlayout.h>
#include <qpushbutton.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
#ifndef KAB_EMBEDDED
@@ -37,5 +39,5 @@
#include <qmap.h>
#include <qmessagebox.h>
-#include <qtextstream.h>
+#include <q3textstream.h>
#include <kurl.h>
#endif //KAB_EMBEDDED
@@ -53,5 +55,5 @@ KeyWidget::KeyWidget( QWidget *parent, const char *name )
: QWidget( parent, name )
{
- QGridLayout *layout = new QGridLayout( this, 2, 2, KDialog::marginHint(),
+ Q3GridLayout *layout = new Q3GridLayout( this, 2, 2, KDialog::marginHint(),
KDialog::spacingHint() );
@@ -137,5 +139,5 @@ void KeyWidget::addKey()
if ( KIO::NetAccess::download( url, tmpFile ) ) {
QFile file( tmpFile );
- if ( !file.open( IO_ReadOnly ) ) {
+ if ( !file.open( QIODevice::ReadOnly ) ) {
QString text( i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ) );
KMessageBox::error( this, text.arg( url.url() ) );
@@ -153,5 +155,5 @@ void KeyWidget::addKey()
{
QFile file( keyfile );
- if ( !file.open( IO_ReadOnly ) ) {
+ if ( !file.open( QIODevice::ReadOnly ) ) {
QString text( i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ) );
QString caption( i18n( "Error" ) );
@@ -164,8 +166,8 @@ void KeyWidget::addKey()
- QTextStream s( &file );
+ Q3TextStream s( &file );
QString data;
- s.setEncoding( QTextStream::UnicodeUTF8 );
+ s.setEncoding( Q3TextStream::UnicodeUTF8 );
s >> data;
file.close();
@@ -222,6 +224,6 @@ void KeyWidget::exportKey()
KTempFile tempFile;
- QTextStream *s = tempFile.textStream();
- s->setEncoding( QTextStream::UnicodeUTF8 );
+ Q3TextStream *s = tempFile.textStream();
+ s->setEncoding( Q3TextStream::UnicodeUTF8 );
(*s) << key.textData();
tempFile.close();
@@ -236,5 +238,5 @@ void KeyWidget::exportKey()
QFile file( keyfile );
- if ( !file.open( IO_ReadWrite ) ) {
+ if ( !file.open( QIODevice::ReadWrite ) ) {
QString text( i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ) );
QString caption( i18n( "Error" ) );
@@ -243,6 +245,6 @@ void KeyWidget::exportKey()
}
- QTextStream s( &file );
- s.setEncoding( QTextStream::UnicodeUTF8 );
+ Q3TextStream s( &file );
+ s.setEncoding( Q3TextStream::UnicodeUTF8 );
s << key.textData();
file.close();
@@ -273,5 +275,5 @@ void KeyWidget::updateKeyCombo()
}
-#ifndef KAB_EMBEDDED
-#include "keywidget.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_keywidget.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp
index 2f3531d..e373105 100644
--- a/kaddressbook/mainembedded.cpp
+++ b/kaddressbook/mainembedded.cpp
@@ -6,6 +6,5 @@
#include <qapplication.h>
#include <qwindowsstyle.h>
-#include <qplatinumstyle.h>
-#include <qmainwindow.h>
+#include <q3mainwindow.h>
#include <qmessagebox.h>
#include <stdlib.h>
@@ -25,4 +24,5 @@ void dumpMissing();
int main( int argc, char **argv )
{
+ if(!getenv("QPEDIR")) putenv("QPEDIR=/usr/lib/kdepimpi");
#ifndef DESKTOP_VERSION
QPEApplication a( argc, argv );
@@ -30,5 +30,4 @@ int main( int argc, char **argv )
#else
QApplication a( argc, argv );
- QApplication::setStyle( new QPlatinumStyle ());
#ifdef _WIN32_
QString hdir ( getenv( "HOME") );
diff --git a/kaddressbook/nameeditdialog.cpp b/kaddressbook/nameeditdialog.cpp
index 199f3d6..96822d8 100644
--- a/kaddressbook/nameeditdialog.cpp
+++ b/kaddressbook/nameeditdialog.cpp
@@ -24,10 +24,12 @@
#include <qlayout.h>
#include <qlabel.h>
-#include <qlistbox.h>
-#include <qlistview.h>
+#include <q3listbox.h>
+#include <q3listview.h>
#include <qtooltip.h>
#include <qpushbutton.h>
#include <qcheckbox.h>
#include <qstring.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
#ifndef KAB_EMBEDDED
@@ -58,5 +60,5 @@ NameEditDialog::NameEditDialog( const KABC::Addressee &addr, int type,
QWidget *page = plainPage();
- QGridLayout *layout = new QGridLayout( page, 5, 3 );
+ Q3GridLayout *layout = new Q3GridLayout( page, 5, 3 );
layout->setSpacing( spacingHint() );
layout->addColSpacing( 2, 100 );
@@ -296,5 +298,5 @@ qDebug("NameEditDialog::slotHelp Help is not supported yet");
}
-#ifndef KAB_EMBEDDED
-#include "nameeditdialog.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_nameeditdialog.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/old_mainwindow.cpp b/kaddressbook/old_mainwindow.cpp
index 0e886d9..7a445c7 100644
--- a/kaddressbook/old_mainwindow.cpp
+++ b/kaddressbook/old_mainwindow.cpp
@@ -317,11 +317,11 @@ void MainWindow::initActions()
KABPrefs *p = KABPrefs::instance();
QPEMenuBar *menuBar1 = new QPEMenuBar( iconToolBar );
- QPopupMenu *menuBar = new QPopupMenu( this );
+ Q3PopupMenu *menuBar = new Q3PopupMenu( this );
menuBar1->insertItem( "ME", menuBar);
- QPopupMenu *fileMenu = new QPopupMenu( this );
- QPopupMenu *editMenu = new QPopupMenu( this );
- QPopupMenu *viewMenu = new QPopupMenu( this );
- QPopupMenu *settingsMenu = new QPopupMenu( this );
- QPopupMenu *importMenu = new QPopupMenu( this );
+ Q3PopupMenu *fileMenu = new Q3PopupMenu( this );
+ Q3PopupMenu *editMenu = new Q3PopupMenu( this );
+ Q3PopupMenu *viewMenu = new Q3PopupMenu( this );
+ Q3PopupMenu *settingsMenu = new Q3PopupMenu( this );
+ Q3PopupMenu *importMenu = new Q3PopupMenu( this );
menuBar1->setMaximumWidth( menuBar1->sizeHint().width() );
diff --git a/kaddressbook/phoneeditwidget.cpp b/kaddressbook/phoneeditwidget.cpp
index df3b551..3661677 100644
--- a/kaddressbook/phoneeditwidget.cpp
+++ b/kaddressbook/phoneeditwidget.cpp
@@ -28,11 +28,17 @@
#include <qcheckbox.h>
#include <qstring.h>
-#include <qlistbox.h>
-#include <qlistview.h>
-#include <qbuttongroup.h>
-#include <qhbox.h>
+#include <q3listbox.h>
+#include <q3listview.h>
+#include <q3buttongroup.h>
+#include <q3hbox.h>
#include <qcursor.h>
#include <qtimer.h>
#include <qapplication.h>
+//Added by qt3to4:
+#include <Q3ValueList>
+#include <Q3GridLayout>
+#include <Q3Frame>
+#include <Q3PopupMenu>
+#include <Q3VBoxLayout>
#include <kbuttonbox.h>
@@ -58,5 +64,5 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name )
: QWidget(parent,name)
{
- QGridLayout* gridLayout = new QGridLayout ( this, 2,2 );
+ Q3GridLayout* gridLayout = new Q3GridLayout ( this, 2,2 );
QLabel *temp = new QLabel( "", this );
@@ -68,12 +74,12 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name )
connect(addBut,SIGNAL(clicked ()),SLOT(addNumber()));
- sv = new QScrollView( this );
- sv->setFrameStyle ( QFrame::Plain );
+ sv = new Q3ScrollView( this );
+ sv->setFrameStyle ( Q3Frame::Plain );
sv->setLineWidth ( 0 );
sv->setMidLineWidth ( 0 );
mw = new QWidget ( sv->viewport() );
sv->addChild(mw);
- sv->setResizePolicy( QScrollView::AutoOneFit );
- mainLayout = new QVBoxLayout ( mw );
+ sv->setResizePolicy( Q3ScrollView::AutoOneFit );
+ mainLayout = new Q3VBoxLayout ( mw );
mainLayout->setMargin( 0 );
mainLayout->setSpacing( 0 );
@@ -91,5 +97,5 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name )
setDefaults();
mTypeNumberEditList.setAutoDelete( true );
- mPopup = new QPopupMenu( this );
+ mPopup = new Q3PopupMenu( this );
QStringList list = PhoneNumber::supportedTypeListNames();
mPopupCount = list.count();
@@ -227,5 +233,5 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name )
: QWidget( parent, name )
{
- QGridLayout *layout = new QGridLayout( this, 4, 1 );
+ Q3GridLayout *layout = new Q3GridLayout( this, 4, 1 );
//US layout->setSpacing( KDialog::spacingHint() );
layout->setSpacing( KDialogBase::spacingHintSmall() );
@@ -237,5 +243,5 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name )
//US label->setPixmap( KGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Desktop ) );
label->setPixmap( KGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Desktop, 0 ) );
- label->setAlignment( AlignCenter );
+ label->setAlignment( Qt::AlignCenter );
//US layout->addMultiCellWidget( label, 0, 1, 3, 3 );
layout->addWidget( label, 0, 0 );
@@ -328,5 +334,5 @@ void PhoneEditWidget::setPhoneNumbers( const KABC::PhoneNumber::List &list )
mPrefCombo->insertTypeList( list );
- QValueList<int> defaultTypes;
+ Q3ValueList<int> defaultTypes;
defaultTypes << KABC::PhoneNumber::Home;
defaultTypes << KABC::PhoneNumber::Work;
@@ -338,5 +344,5 @@ void PhoneEditWidget::setPhoneNumbers( const KABC::PhoneNumber::List &list )
// Doing this for mPrefCombo is enough because the list is shared by all
// combos.
- QValueList<int>::ConstIterator it;
+ Q3ValueList<int>::ConstIterator it;
for( it = defaultTypes.begin(); it != defaultTypes.end(); ++it ) {
if ( !mPrefCombo->hasType( *it ) )
@@ -488,8 +494,8 @@ void PhoneEditWidget::updateOtherEdit( PhoneTypeCombo *combo, PhoneTypeCombo *ot
// PhoneEditDialog
-class PhoneViewItem : public QListViewItem
+class PhoneViewItem : public Q3ListViewItem
{
public:
- PhoneViewItem( QListView *parent, const KABC::PhoneNumber &number );
+ PhoneViewItem( Q3ListView *parent, const KABC::PhoneNumber &number );
void setPhoneNumber( const KABC::PhoneNumber &number )
@@ -512,6 +518,6 @@ private:
};
-PhoneViewItem::PhoneViewItem( QListView *parent, const KABC::PhoneNumber &number )
- : QListViewItem( parent ), mPhoneNumber( number )
+PhoneViewItem::PhoneViewItem( Q3ListView *parent, const KABC::PhoneNumber &number )
+ : Q3ListViewItem( parent ), mPhoneNumber( number )
{
#ifdef DESKTOP_VERSION
@@ -545,5 +551,5 @@ PhoneEditDialog::PhoneEditDialog( const KABC::PhoneNumber::List &list, QWidget *
QWidget *page = plainPage();
- QGridLayout *layout = new QGridLayout( page, 1, 2 );
+ Q3GridLayout *layout = new Q3GridLayout( page, 1, 2 );
layout->setSpacing( spacingHint() );
@@ -553,5 +559,5 @@ PhoneEditDialog::PhoneEditDialog( const KABC::PhoneNumber::List &list, QWidget *
mListView->addColumn( i18n( "Type" ) );
- KButtonBox *buttonBox = new KButtonBox( page, Vertical );
+ KButtonBox *buttonBox = new KButtonBox( page, Qt::Vertical );
buttonBox->addButton( i18n( "&Add..." ), this, SLOT( slotAddPhoneNumber() ) );
@@ -566,5 +572,5 @@ PhoneEditDialog::PhoneEditDialog( const KABC::PhoneNumber::List &list, QWidget *
connect( mListView, SIGNAL(selectionChanged()), SLOT(slotSelectionChanged()) );
- connect( mListView, SIGNAL(doubleClicked( QListViewItem *, const QPoint &, int )), this, SLOT( slotEditPhoneNumber()));
+ connect( mListView, SIGNAL(doubleClicked( Q3ListViewItem *, const QPoint &, int )), this, SLOT( slotEditPhoneNumber()));
KABC::PhoneNumber::List::Iterator it;
@@ -589,5 +595,5 @@ void PhoneEditDialog::slotAddPhoneNumber()
if ( dlg.exec() ) {
- QListViewItem* i = mListView->firstChild();
+ Q3ListViewItem* i = mListView->firstChild();
KABC::PhoneNumber phoneNumber = dlg.phoneNumber();
bool insert = true;
@@ -621,5 +627,5 @@ void PhoneEditDialog::slotRemovePhoneNumber()
mPhoneNumberList.remove( item->phoneNumber() );
- QListViewItem *currItem = mListView->currentItem();
+ Q3ListViewItem *currItem = mListView->currentItem();
mListView->takeItem( currItem );
delete currItem;
@@ -674,5 +680,5 @@ PhoneTypeDialog::PhoneTypeDialog( const KABC::PhoneNumber &phoneNumber,
QWidget *page = plainPage();
QLabel *label = 0;
- QGridLayout *layout = new QGridLayout( page, 3, 2, marginHint(), spacingHint() );
+ Q3GridLayout *layout = new Q3GridLayout( page, 3, 2, marginHint(), spacingHint() );
label = new QLabel( i18n( "Number:" ), page );
@@ -684,5 +690,5 @@ PhoneTypeDialog::PhoneTypeDialog( const KABC::PhoneNumber &phoneNumber,
layout->addMultiCellWidget( mPreferredBox, 1, 1, 0, 1 );
- mGroup = new QButtonGroup( 2, Horizontal, i18n( "Types" ), page );
+ mGroup = new Q3ButtonGroup( 2, Qt::Horizontal, i18n( "Types" ), page );
layout->addMultiCellWidget( mGroup, 2, 2, 0, 1 );
@@ -727,5 +733,5 @@ KABC::PhoneNumber PhoneTypeDialog::phoneNumber()
}
#endif
-#ifndef KAB_EMBEDDED
-#include "phoneeditwidget.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_phoneeditwidget.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/phoneeditwidget.h b/kaddressbook/phoneeditwidget.h
index 5bb4226..2be3e2b 100644
--- a/kaddressbook/phoneeditwidget.h
+++ b/kaddressbook/phoneeditwidget.h
@@ -28,14 +28,18 @@
#include <qpushbutton.h>
#include <qlayout.h>
-#include <qpopupmenu.h>
+#include <q3popupmenu.h>
#include <qapplication.h>
+#include <QDesktopWidget>
-#include <qptrlist.h>
-#include <qscrollview.h>
+#include <q3ptrlist.h>
+#include <q3scrollview.h>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
+#include <Q3VBoxLayout>
#include "addresseeconfig.h"
#include "typecombo.h"
-class QButtonGroup;
+class Q3ButtonGroup;
class QCheckBox;
class PhoneTypeNumberEdit;
@@ -77,6 +81,6 @@ class PhoneEditWidget : public QWidget
private:
- QScrollView* sv;
- QPopupMenu *mPopup;
+ Q3ScrollView* sv;
+ Q3PopupMenu *mPopup;
int mPopupCount;
PhoneTypeNumberEdit* mPendingDelete;
@@ -84,6 +88,6 @@ class PhoneEditWidget : public QWidget
PhoneTypeNumberEdit* appendEditCombo();
QWidget* mw;
- QVBoxLayout* mainLayout;
- QPtrList <PhoneTypeNumberEdit> mTypeNumberEditList;
+ Q3VBoxLayout* mainLayout;
+ Q3PtrList <PhoneTypeNumberEdit> mTypeNumberEditList;
};
@@ -96,5 +100,5 @@ public:
PhoneTypeNumberEdit( QWidget *parent, const char *name = 0 ) :QWidget( parent )
{
- QHBoxLayout * lay = new QHBoxLayout( this );
+ Q3HBoxLayout * lay = new Q3HBoxLayout( this );
lay->setSpacing( 2 );
lay->setMargin( 0 );
@@ -103,5 +107,5 @@ public:
mCombo = new KComboBox( this );
if ( QApplication::desktop()->width() <= 640 )
- mCombo->setSizeLimit ( 6 );
+ mCombo->setMaxVisibleItems ( 6 );
mNumber = new KLineEdit( this );
mMinusButton->setMaximumHeight( mNumber->sizeHint().height() + 6);
diff --git a/kaddressbook/secrecywidget.cpp b/kaddressbook/secrecywidget.cpp
index 4a2acc8..1c237c0 100644
--- a/kaddressbook/secrecywidget.cpp
+++ b/kaddressbook/secrecywidget.cpp
@@ -23,4 +23,6 @@
#include <qlayout.h>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
#include <kabc/secrecy.h>
@@ -33,5 +35,5 @@ SecrecyWidget::SecrecyWidget( QWidget *parent, const char *name )
: QWidget( parent, name )
{
- QVBoxLayout *layout = new QVBoxLayout( this, KDialog::marginHint(),
+ Q3VBoxLayout *layout = new Q3VBoxLayout( this, KDialog::marginHint(),
KDialog::spacingHint() );
mSecrecyCombo = new KComboBox( this );
@@ -66,5 +68,5 @@ KABC::Secrecy SecrecyWidget::secrecy() const
}
-#ifndef KAB_EMBEDDED
-#include "secrecywidget.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_secrecywidget.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/undo.cpp b/kaddressbook/undo.cpp
index 4442087..a6c1580 100644
--- a/kaddressbook/undo.cpp
+++ b/kaddressbook/undo.cpp
@@ -115,5 +115,5 @@ void RedoStack::redo()
}
-#ifndef KAB_EMBEDDED
-#include "undo.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_undo.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/undo.h b/kaddressbook/undo.h
index 843bc26..a8ba2ee 100644
--- a/kaddressbook/undo.h
+++ b/kaddressbook/undo.h
@@ -26,5 +26,5 @@
#include <qobject.h>
-#include <qptrstack.h>
+#include <q3ptrstack.h>
#include <qstring.h>
@@ -68,5 +68,5 @@ class StackBase : public QObject
Command *pop();
- QPtrStack<Command> mCommandStack;
+ Q3PtrStack<Command> mCommandStack;
};
diff --git a/kaddressbook/undocmds.cpp b/kaddressbook/undocmds.cpp
index 5807dc0..e900b00 100644
--- a/kaddressbook/undocmds.cpp
+++ b/kaddressbook/undocmds.cpp
@@ -22,5 +22,5 @@
*/
-#include <qtextstream.h>
+#include <q3textstream.h>
#include <qapplication.h>
diff --git a/kaddressbook/viewconfigurefieldspage.cpp b/kaddressbook/viewconfigurefieldspage.cpp
index 5daae1a..7366a0b 100644
--- a/kaddressbook/viewconfigurefieldspage.cpp
+++ b/kaddressbook/viewconfigurefieldspage.cpp
@@ -37,18 +37,22 @@
#include <qtoolbutton.h>
#include <qapplication.h>
+#include <QDesktopWidget>
#include <qlabel.h>
-#include <qlistbox.h>
+#include <q3listbox.h>
#include <qlayout.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
+#include <Q3BoxLayout>
#include "viewconfigurefieldspage.h"
-class FieldItem : public QListBoxText
+class FieldItem : public Q3ListBoxText
{
public:
- FieldItem( QListBox *parent, KABC::Field *field )
- : QListBoxText( parent, field->label() ), mField( field ) {}
+ FieldItem( Q3ListBox *parent, KABC::Field *field )
+ : Q3ListBoxText( parent, field->label() ), mField( field ) {}
- FieldItem( QListBox *parent, KABC::Field *field, int index )
- : QListBoxText( parent, field->label(), parent->item( index ) ),
+ FieldItem( Q3ListBox *parent, KABC::Field *field, int index )
+ : Q3ListBoxText( parent, field->label(), parent->item( index ) ),
mField( field ) {}
@@ -107,5 +111,5 @@ void ViewConfigureFieldsPage::slotShowFields( int index )
KABC::Field::List::ConstIterator it;
for ( it = allFields.begin(); it != allFields.end(); ++it ) {
- QListBoxItem *item = mSelectedBox->firstItem();
+ Q3ListBoxItem *item = mSelectedBox->firstItem();
while( item ) {
FieldItem *fieldItem = static_cast<FieldItem *>( item );
@@ -190,5 +194,5 @@ void ViewConfigureFieldsPage::slotMoveUp()
int i = mSelectedBox->currentItem();
if ( i > 0 ) {
- QListBoxItem *item = mSelectedBox->item( i );
+ Q3ListBoxItem *item = mSelectedBox->item( i );
mSelectedBox->takeItem( item );
mSelectedBox->insertItem( item, i - 1 );
@@ -202,5 +206,5 @@ void ViewConfigureFieldsPage::slotMoveDown()
int i = mSelectedBox->currentItem();
if ( i > -1 && i < (int)mSelectedBox->count() - 1 ) {
- QListBoxItem *item = mSelectedBox->item( i );
+ Q3ListBoxItem *item = mSelectedBox->item( i );
mSelectedBox->takeItem( item );
mSelectedBox->insertItem( item, i + 1 );
@@ -220,9 +224,9 @@ void ViewConfigureFieldsPage::initGUI()
setCaption( i18n("Select Fields to Display") );
- QGridLayout *gl = 0;
+ Q3GridLayout *gl = 0;
if (orientation == 0)
- gl = new QGridLayout( this , 6, 4, 0, KDialog::spacingHint() );
+ gl = new Q3GridLayout( this , 6, 4, 0, KDialog::spacingHint() );
else
- gl = new QGridLayout( this , 4, 6, 0, KDialog::spacingHint() );
+ gl = new Q3GridLayout( this , 4, 6, 0, KDialog::spacingHint() );
#ifndef KAB_EMBEDDED
@@ -250,6 +254,6 @@ void ViewConfigureFieldsPage::initGUI()
- mUnSelectedBox = new QListBox( this );
- mUnSelectedBox->setSelectionMode( QListBox::Extended );
+ mUnSelectedBox = new Q3ListBox( this );
+ mUnSelectedBox->setSelectionMode( Q3ListBox::Extended );
mUnSelectedBox->setMinimumHeight( 80 );
if (orientation == 0)
@@ -258,10 +262,10 @@ void ViewConfigureFieldsPage::initGUI()
gl->addWidget( mUnSelectedBox, 0, 1 );
- mSelectedBox = new QListBox( this );
+ mSelectedBox = new Q3ListBox( this );
//if ( QApplication::desktop()->width() < 320 ) {
// mUnSelectedBox->setMaximumWidth( 134 );
// mSelectedBox->setMaximumWidth( 134 );
//}
- mSelectedBox->setSelectionMode( QListBox::Extended );
+ mSelectedBox->setSelectionMode( Q3ListBox::Extended );
mSelectedBox->setMinimumHeight( 80 );
label->setBuddy( mSelectedBox );
@@ -271,9 +275,9 @@ void ViewConfigureFieldsPage::initGUI()
gl->addWidget( mSelectedBox, 2, 1 );
- QBoxLayout *vb1 = 0;
+ Q3BoxLayout *vb1 = 0;
if (orientation == 0)
- vb1 = new QBoxLayout( QBoxLayout::TopToBottom, KDialog::spacingHint() );
+ vb1 = new Q3BoxLayout( Q3BoxLayout::TopToBottom, KDialog::spacingHint() );
else
- vb1 = new QBoxLayout( QBoxLayout::LeftToRight, KDialog::spacingHint() );
+ vb1 = new Q3BoxLayout( Q3BoxLayout::LeftToRight, KDialog::spacingHint() );
vb1->addStretch();
@@ -302,9 +306,9 @@ void ViewConfigureFieldsPage::initGUI()
gl->addLayout( vb1, 1, 1 );
- QBoxLayout *vb2 = 0;
+ Q3BoxLayout *vb2 = 0;
if (orientation == 0)
- vb2 = new QBoxLayout( QBoxLayout::TopToBottom, KDialog::spacingHint() );
+ vb2 = new Q3BoxLayout( Q3BoxLayout::TopToBottom, KDialog::spacingHint() );
else
- vb2 = new QBoxLayout( QBoxLayout::LeftToRight, KDialog::spacingHint() );
+ vb2 = new Q3BoxLayout( Q3BoxLayout::LeftToRight, KDialog::spacingHint() );
vb2->addStretch();
@@ -341,5 +345,5 @@ void ViewConfigureFieldsPage::initGUI()
connect( mUnSelectedBox, SIGNAL( selectionChanged() ), SLOT( slotButtonsEnabled() ) );
connect( mSelectedBox, SIGNAL( selectionChanged() ), SLOT( slotButtonsEnabled() ) );
- connect( mSelectedBox, SIGNAL( currentChanged( QListBoxItem * ) ), SLOT( slotButtonsEnabled() ) );
+ connect( mSelectedBox, SIGNAL( currentChanged( Q3ListBoxItem * ) ), SLOT( slotButtonsEnabled() ) );
slotButtonsEnabled();
@@ -347,5 +351,5 @@ void ViewConfigureFieldsPage::initGUI()
-#ifndef KAB_EMBEDDED
-#include "viewconfigurefieldspage.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_viewconfigurefieldspage.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/viewconfigurefieldspage.h b/kaddressbook/viewconfigurefieldspage.h
index b27668c..42d132f 100644
--- a/kaddressbook/viewconfigurefieldspage.h
+++ b/kaddressbook/viewconfigurefieldspage.h
@@ -36,6 +36,6 @@ class QComboBox;
#endif //KAB_EMBEDDED
-class QListBox;
-class QListBoxItem;
+class Q3ListBox;
+class Q3ListBoxItem;
class QPushButton;
class QToolButton;
@@ -69,6 +69,6 @@ class ViewConfigureFieldsPage : public QWidget
QComboBox *mCategoryCombo;
#endif //KAB_EMBEDDED
- QListBox *mSelectedBox;
- QListBox *mUnSelectedBox;
+ Q3ListBox *mSelectedBox;
+ Q3ListBox *mUnSelectedBox;
QToolButton *mAddButton;
QToolButton *mRemoveButton;
diff --git a/kaddressbook/viewconfigurefilterpage.cpp b/kaddressbook/viewconfigurefilterpage.cpp
index b085a5e..cdb778b 100644
--- a/kaddressbook/viewconfigurefilterpage.cpp
+++ b/kaddressbook/viewconfigurefilterpage.cpp
@@ -28,8 +28,11 @@
#endif //KAB_EMBEDDED
-#include <qbuttongroup.h>
+#include <q3buttongroup.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qradiobutton.h>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
+#include <Q3VBoxLayout>
#include <kconfig.h>
@@ -45,7 +48,7 @@ ViewConfigureFilterPage::ViewConfigureFilterPage( QWidget *parent,
: QWidget( parent, name )
{
- QBoxLayout *topLayout = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+ Q3BoxLayout *topLayout = new Q3VBoxLayout( this, 0, KDialog::spacingHint() );
- mFilterGroup = new QButtonGroup();
+ mFilterGroup = new Q3ButtonGroup();
connect( mFilterGroup, SIGNAL( clicked( int ) ), SLOT( buttonClicked( int ) ) );
@@ -69,5 +72,5 @@ ViewConfigureFilterPage::ViewConfigureFilterPage( QWidget *parent,
topLayout->addWidget( button );
- QBoxLayout *comboLayout = new QHBoxLayout();
+ Q3BoxLayout *comboLayout = new Q3HBoxLayout();
topLayout->addLayout( comboLayout );
button = new QRadioButton( i18n( "Use filter:" ), this );
@@ -133,5 +136,5 @@ void ViewConfigureFilterPage::buttonClicked( int id )
}
-#ifndef KAB_EMBEDDED
-#include "viewconfigurefilterpage.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_viewconfigurefilterpage.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/viewconfigurefilterpage.h b/kaddressbook/viewconfigurefilterpage.h
index 3be9564..fb39a61 100644
--- a/kaddressbook/viewconfigurefilterpage.h
+++ b/kaddressbook/viewconfigurefilterpage.h
@@ -27,5 +27,5 @@
#include <qwidget.h>
-class QButtonGroup;
+class Q3ButtonGroup;
#ifndef KAB_EMBEDDED
@@ -58,5 +58,5 @@ class ViewConfigureFilterPage : public QWidget
#endif //KAB_EMBEDDED
- QButtonGroup *mFilterGroup;
+ Q3ButtonGroup *mFilterGroup;
};
diff --git a/kaddressbook/viewconfigurewidget.cpp b/kaddressbook/viewconfigurewidget.cpp
index 666e188..047df8c 100644
--- a/kaddressbook/viewconfigurewidget.cpp
+++ b/kaddressbook/viewconfigurewidget.cpp
@@ -25,5 +25,5 @@
#ifndef KAB_EMBEDDED
-#include <qvbox.h>
+#include <q3vbox.h>
#include <kapplication.h>
@@ -38,4 +38,7 @@
#include <qlayout.h>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
+#include <QPixmap>
#include <kjanuswidget.h>
@@ -51,5 +54,5 @@ ViewConfigureWidget::ViewConfigureWidget( KABC::AddressBook *ab, QWidget *parent
: ConfigureWidget( ab, parent, name )
{
- QVBoxLayout *topLayout = new QVBoxLayout( this );
+ Q3VBoxLayout *topLayout = new Q3VBoxLayout( this );
mMainWidget = new KJanusWidget( this, "JanusWidget", KJanusWidget::Tabbed );
@@ -58,5 +61,5 @@ ViewConfigureWidget::ViewConfigureWidget( KABC::AddressBook *ab, QWidget *parent
// Add the first page, the attributes
- QVBox *page = addPage( i18n( "Fields" ), QString::null,
+ Q3VBox *page = addPage( i18n( "Fields" ), QString::null,
KGlobal::iconLoader()->loadIcon( "view_detailed",
KIcon::Panel, 16 ) );
@@ -94,5 +97,5 @@ void ViewConfigureWidget::saveSettings( KConfig *config )
}
-QVBox *ViewConfigureWidget::addPage( const QString &item, const QString &header,
+Q3VBox *ViewConfigureWidget::addPage( const QString &item, const QString &header,
const QPixmap &pixmap )
{
@@ -100,5 +103,5 @@ QVBox *ViewConfigureWidget::addPage( const QString &item, const QString &header,
}
-#include <qframe.h>
+#include <q3frame.h>
#include <qlabel.h>
#include <qlayout.h>
@@ -153,7 +156,5 @@ void ViewConfigureDialog::slotHelp()
}
-#ifndef KAB_EMBEDDED
-#include "viewconfigurewidget.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_viewconfigurewidget.cpp"
#endif //KAB_EMBEDDED
-
-
diff --git a/kaddressbook/viewconfigurewidget.h b/kaddressbook/viewconfigurewidget.h
index 0c2b77c..e3b9b12 100644
--- a/kaddressbook/viewconfigurewidget.h
+++ b/kaddressbook/viewconfigurewidget.h
@@ -29,5 +29,5 @@
#include "configurewidget.h"
-class QVBox;
+class Q3VBox;
#include <kdialogbase.h>
@@ -75,5 +75,5 @@ class ViewConfigureWidget : public ConfigureWidget
Use this method to add new pages to the widget.
*/
- QVBox *addPage( const QString &item, const QString &header = QString::null,
+ Q3VBox *addPage( const QString &item, const QString &header = QString::null,
const QPixmap &pixmap = QPixmap() );
diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp
index b5d9419..5cfe3ad 100644
--- a/kaddressbook/viewmanager.cpp
+++ b/kaddressbook/viewmanager.cpp
@@ -51,5 +51,8 @@ $Id$
#include <qaction.h>
#include <qmessagebox.h>
-#include <qpopupmenu.h>
+#include <q3popupmenu.h>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
+#include <QDropEvent>
#include <kconfigbase.h>
@@ -62,5 +65,6 @@ $Id$
#include <qlayout.h>
#include <qapplication.h>
-#include <qwidgetstack.h>
+#include <QDesktopWidget>
+#include <q3widgetstack.h>
#include <kabc/addressbook.h>
@@ -118,5 +122,5 @@ void ViewManager::restoreSettings()
QString _oldgroup = mCore->config()->group();
- QDictIterator<KAddressBookView> it( mViewDict );
+ Q3DictIterator<KAddressBookView> it( mViewDict );
for ( it.toFirst(); it.current(); ++it ) {
KConfigGroupSaver saver( mCore->config(), it.currentKey() );
@@ -132,5 +136,5 @@ void ViewManager::saveSettings()
QString _oldgroup = mCore->config()->group();
- QDictIterator<KAddressBookView> it( mViewDict );
+ Q3DictIterator<KAddressBookView> it( mViewDict );
for ( it.toFirst(); it.current(); ++it ) {
KConfigGroupSaver saver( mCore->config(), it.currentKey() );
@@ -162,5 +166,5 @@ QStringList ViewManager::selectedEmails() const
{
if ( mActiveView )
- return mActiveView->selectedEmails();
+ return QStringList(mActiveView->selectedEmails());
else
return QStringList();
@@ -557,5 +561,5 @@ void ViewManager::startDrag()
KMultipleDrag *drag = new KMultipleDrag( this );
- drag->addDragObject( new QTextDrag( AddresseeUtil::addresseesToClipboard(addrList), this ) );
+ drag->addDragObject( new Q3TextDrag( AddresseeUtil::addresseesToClipboard(addrList), this ) );
KABC::Addressee::List::Iterator it;
QStringList vcards;
@@ -660,7 +664,7 @@ void ViewManager::initActions()
#ifdef KAB_EMBEDDED
- QPopupMenu *viewmenu = (QPopupMenu*)mCore->getViewMenu();
- QPopupMenu *settingsmenu = (QPopupMenu*)mCore->getSettingsMenu();
- QPopupMenu *filtermenu = (QPopupMenu*)mCore->getFilterMenu();
+ Q3PopupMenu *viewmenu = (Q3PopupMenu*)mCore->getViewMenu();
+ Q3PopupMenu *settingsmenu = (Q3PopupMenu*)mCore->getSettingsMenu();
+ Q3PopupMenu *filtermenu = (Q3PopupMenu*)mCore->getFilterMenu();
#endif //KAB_EMBEDDED
@@ -739,10 +743,10 @@ void ViewManager::initActions()
void ViewManager::initGUI()
{
- QHBoxLayout *layout = new QHBoxLayout( this, 0, 0 );
- mViewWidgetStack = new QWidgetStack( this );
+ Q3HBoxLayout *layout = new Q3HBoxLayout( this, 0, 0 );
+ mViewWidgetStack = new Q3WidgetStack( this );
layout->addWidget( mViewWidgetStack );
}
-#ifndef KAB_EMBEDDED
-#include "viewmanager.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_viewmanager.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/viewmanager.h b/kaddressbook/viewmanager.h
index ab5d372..4bbdbc7 100644
--- a/kaddressbook/viewmanager.h
+++ b/kaddressbook/viewmanager.h
@@ -27,6 +27,8 @@
#include <qwidget.h>
#include <qstringlist.h>
+//Added by qt3to4:
+#include <QDropEvent>
#include <kaddressbookview.h>
-#include <qdict.h>
+#include <q3dict.h>
#include "filter.h"
@@ -35,5 +37,5 @@ class KSelectAction;
class KABCore;
-class QWidgetStack;
+class Q3WidgetStack;
class QDropEvent;
@@ -146,9 +148,9 @@ class ViewManager : public QWidget
Filter::List mFilterList;
- QDict<KAddressBookView> mViewDict;
- QDict<ViewFactory> mViewFactoryDict;
+ Q3Dict<KAddressBookView> mViewDict;
+ Q3Dict<ViewFactory> mViewFactoryDict;
QStringList mViewNameList;
- QWidgetStack *mViewWidgetStack;
+ Q3WidgetStack *mViewWidgetStack;
KAddressBookView *mActiveView;
diff --git a/kaddressbook/views/cardview.cpp b/kaddressbook/views/cardview.cpp
index b6e053f..1a29f41 100644
--- a/kaddressbook/views/cardview.cpp
+++ b/kaddressbook/views/cardview.cpp
@@ -35,4 +35,12 @@
#include <qtooltip.h>
#include <qapplication.h>
+//Added by qt3to4:
+#include <QKeyEvent>
+#include <Q3PtrList>
+#include <QResizeEvent>
+#include <QFocusEvent>
+#include <QMouseEvent>
+#include <QEvent>
+#include <QWheelEvent>
#include "kabprefs.h"
@@ -72,9 +80,9 @@ class CardViewTip : public QLabel {
// item! Only the pointer value is unique in the list.
//
-class CardViewItemList : public QPtrList<CardViewItem>
+class CardViewItemList : public Q3PtrList<CardViewItem>
{
protected:
- virtual int compareItems(QPtrCollection::Item item1,
- QPtrCollection::Item item2)
+ virtual int compareItems(Q3PtrCollection::Item item1,
+ Q3PtrCollection::Item item2)
{
CardViewItem *cItem1 = (CardViewItem*)item1;
@@ -162,5 +170,5 @@ class CardViewPrivate
CardViewItemList mItemList;
- QPtrList<CardViewSeparator> mSeparatorList;
+ Q3PtrList<CardViewSeparator> mSeparatorList;
QFontMetrics *mFm;
QFontMetrics *mBFm; // bold font
@@ -209,5 +217,5 @@ class CardViewItemPrivate
QString mCaption;
- QPtrList< CardViewItem::Field > mFieldList;
+ Q3PtrList< CardViewItem::Field > mFieldList;
bool mSelected;
int x; // horizontal position, set by the view
@@ -314,5 +322,5 @@ void CardViewItem::paintCard(QPainter *p, QColorGroup &cg)
// Go through the fields and draw them
- QPtrListIterator< CardViewItem::Field > iter(d->mFieldList);
+ Q3PtrListIterator< CardViewItem::Field > iter(d->mFieldList);
QString label, value;
int yPos = mg + 4 + bFm.height()/* + 1*/ + fm.height(); // why the + 1 ??? (anders)
@@ -409,10 +417,10 @@ int CardViewItem::height( bool allowCache ) const
int lines;
int maxLines( mView->maxFieldLines() );
- QPtrListIterator< CardViewItem::Field > iter(d->mFieldList);
+ Q3PtrListIterator< CardViewItem::Field > iter(d->mFieldList);
for (iter.toFirst(); iter.current(); ++iter)
{
if ( !sef && (*iter)->second.isEmpty() )
continue;
- lines = QMIN( (*iter)->second.contains('\n') + 1, maxLines );
+ lines = QMIN( (*iter)->second.count('\n') + 1, maxLines );
fieldHeight += ( lines * fh ) + 2;//sp;
}
@@ -451,5 +459,5 @@ void CardViewItem::removeField(const QString &label)
CardViewItem::Field *f;
- QPtrListIterator< CardViewItem::Field > iter(d->mFieldList);
+ Q3PtrListIterator< CardViewItem::Field > iter(d->mFieldList);
for (iter.toFirst(); iter.current(); ++iter)
{
@@ -524,5 +532,5 @@ void CardViewItem::setCaption(const QString &caption)
QString CardViewItem::fieldValue(const QString &label)
{
- QPtrListIterator< CardViewItem::Field > iter(d->mFieldList);
+ Q3PtrListIterator< CardViewItem::Field > iter(d->mFieldList);
for (iter.toFirst(); iter.current(); ++iter)
if ((*iter)->first == label)
@@ -570,5 +578,5 @@ void CardViewItem::showFullString( const QPoint &itempos, CardViewTip *tip )
for (_f = d->mFieldList.first(); _f != f; _f = d->mFieldList.next())
if ( se || ! _f->second.isEmpty() )
- y += ( QMIN(_f->second.contains('\n')+1, maxLines) * fh ) + 2;
+ y += ( QMIN(_f->second.count('\n')+1, maxLines) * fh ) + 2;
// }
if ( isLabel && itempos.y() > y + fh )
@@ -587,5 +595,5 @@ void CardViewItem::showFullString( const QPoint &itempos, CardViewTip *tip )
} else {
QRect r( mView->d->mFm->boundingRect( 0, 0, INT_MAX, INT_MAX, Qt::AlignTop|Qt::AlignLeft, s ) );
- trimmed = r.width() > mw || r.height()/fh > QMIN(s.contains('\n') + 1, maxLines);
+ trimmed = r.width() > mw || r.height()/fh > QMIN(s.count('\n') + 1, maxLines);
}
}
@@ -627,5 +635,5 @@ CardViewItem::Field *CardViewItem::fieldAt( const QPoint & itempos ) const
{
if ( showEmpty || !f->second.isEmpty() )
- ypos += ( QMIN( f->second.contains('\n')+1, maxLines ) *fh)+2;
+ ypos += ( QMIN( f->second.count('\n')+1, maxLines ) *fh)+2;
if ( iy <= ypos )
break;
@@ -638,5 +646,5 @@ CardViewItem::Field *CardViewItem::fieldAt( const QPoint & itempos ) const
CardView::CardView(QWidget *parent, const char *name)
- : QScrollView(parent, name),
+ : Q3ScrollView(parent, name),
d(new CardViewPrivate())
{
@@ -657,11 +665,11 @@ CardView::CardView(QWidget *parent, const char *name)
viewport()->setMouseTracking( true );
viewport()->setFocusProxy(this);
- viewport()->setFocusPolicy(WheelFocus);
- viewport()->setBackgroundMode(PaletteBase);
+ viewport()->setFocusPolicy(Qt::WheelFocus);
+ viewport()->setBackgroundMode(Qt::PaletteBase);
connect( d->mTimer, SIGNAL(timeout()), this, SLOT(tryShowFullText()) );
//US setBackgroundMode(PaletteBackground, PaletteBase);
- setBackgroundMode(PaletteBackground);
+ setBackgroundMode(Qt::PaletteBackground);
// no reason for a vertical scrollbar
@@ -740,5 +748,5 @@ CardViewItem *CardView::itemAt(const QPoint &viewPos)
{
CardViewItem *item = 0;
- QPtrListIterator<CardViewItem> iter(d->mItemList);
+ Q3PtrListIterator<CardViewItem> iter(d->mItemList);
bool found = false;
for (iter.toFirst(); iter.current() && !found; ++iter)
@@ -788,5 +796,5 @@ CardView::SelectionMode CardView::selectionMode() const
void CardView::selectAll(bool state)
{
- QPtrListIterator<CardViewItem> iter(d->mItemList);
+ Q3PtrListIterator<CardViewItem> iter(d->mItemList);
if (!state)
{
@@ -879,5 +887,5 @@ CardViewItem *CardView::selectedItem() const
{
// find the first selected item
- QPtrListIterator<CardViewItem> iter(d->mItemList);
+ Q3PtrListIterator<CardViewItem> iter(d->mItemList);
for (iter.toFirst(); iter.current(); ++iter)
{
@@ -956,5 +964,5 @@ void CardView::drawContents(QPainter *p, int clipx, int clipy,
// Now tell the cards to draw, if they are in the clip region
- QPtrListIterator<CardViewItem> iter(d->mItemList);
+ Q3PtrListIterator<CardViewItem> iter(d->mItemList);
for (iter.toFirst(); iter.current(); ++iter)
{
@@ -976,5 +984,5 @@ void CardView::drawContents(QPainter *p, int clipx, int clipy,
// Followed by the separators if they are in the clip region
- QPtrListIterator<CardViewSeparator> sepIter(d->mSeparatorList);
+ Q3PtrListIterator<CardViewSeparator> sepIter(d->mSeparatorList);
for (sepIter.toFirst(); sepIter.current(); ++sepIter)
{
@@ -994,5 +1002,5 @@ void CardView::drawContents(QPainter *p, int clipx, int clipy,
void CardView::resizeEvent(QResizeEvent *e)
{
- QScrollView::resizeEvent(e);
+ Q3ScrollView::resizeEvent(e);
setLayoutDirty(true);
@@ -1014,5 +1022,5 @@ void CardView::calcLayout()
d->mSeparatorList.clear();
- QPtrListIterator<CardViewItem> iter(d->mItemList);
+ Q3PtrListIterator<CardViewItem> iter(d->mItemList);
CardViewItem *item = 0;
CardViewSeparator *sep = 0;
@@ -1057,5 +1065,5 @@ void CardView::calcLayout()
// Update the height of all the separators now that we know the
// max height of a column
- QPtrListIterator<CardViewSeparator> sepIter(d->mSeparatorList);
+ Q3PtrListIterator<CardViewSeparator> sepIter(d->mSeparatorList);
for (sepIter.toFirst(); sepIter.current(); ++sepIter)
{
@@ -1102,5 +1110,5 @@ void CardView::setItemSpacing( uint spacing )
void CardView::contentsMousePressEvent(QMouseEvent *e)
{
- QScrollView::contentsMousePressEvent(e);
+ Q3ScrollView::contentsMousePressEvent(e);
QPoint pos = e->pos();
@@ -1172,5 +1180,5 @@ void CardView::contentsMousePressEvent(QMouseEvent *e)
bool s = ! item->isSelected();
- if ( s && ! (e->state() & ControlButton) )
+ if ( s && ! (e->state() & Qt::ControlButton) )
{
bool b = signalsBlocked();
@@ -1220,5 +1228,5 @@ void CardView::contentsMousePressEvent(QMouseEvent *e)
void CardView::contentsMouseReleaseEvent(QMouseEvent *e)
{
- QScrollView::contentsMouseReleaseEvent(e);
+ Q3ScrollView::contentsMouseReleaseEvent(e);
if ( d->mResizeAnchor )
@@ -1258,5 +1266,5 @@ void CardView::contentsMouseReleaseEvent(QMouseEvent *e)
void CardView::contentsMouseDoubleClickEvent(QMouseEvent *e)
{
- QScrollView::contentsMouseDoubleClickEvent(e);
+ Q3ScrollView::contentsMouseDoubleClickEvent(e);
CardViewItem *item = itemAt(e->pos());
@@ -1303,10 +1311,10 @@ void CardView::contentsMouseMoveEvent( QMouseEvent *e )
if ( m >= colcontentw && m > 0 )
{
- setCursor( SplitVCursor ); // Why does this fail sometimes?
+ setCursor( Qt::SplitVCursor ); // Why does this fail sometimes?
d->mOnSeparator = true;
}
else
{
- setCursor( ArrowCursor );
+ setCursor( Qt::ArrowCursor );
d->mOnSeparator = false;
}
@@ -1325,5 +1333,5 @@ void CardView::leaveEvent( QEvent * )
{
d->mOnSeparator = false;
- setCursor( ArrowCursor );
+ setCursor( Qt::ArrowCursor );
}
}
@@ -1369,5 +1377,5 @@ void CardView::keyPressEvent( QKeyEvent *e )
switch ( e->key() )
{
- case Key_Up:
+ case Qt::Key_Up:
if ( pos > 0 )
{
@@ -1376,5 +1384,5 @@ void CardView::keyPressEvent( QKeyEvent *e )
}
break;
- case Key_Down:
+ case Qt::Key_Down:
if ( pos < d->mItemList.count() - 1 )
{
@@ -1383,5 +1391,5 @@ void CardView::keyPressEvent( QKeyEvent *e )
}
break;
- case Key_Left:
+ case Qt::Key_Left:
{
// look for an item in the previous/next column, starting from
@@ -1401,5 +1409,5 @@ void CardView::keyPressEvent( QKeyEvent *e )
}
break;
- case Key_Right:
+ case Qt::Key_Right:
{
// FIXME use nice calculated measures!!!
@@ -1416,13 +1424,13 @@ void CardView::keyPressEvent( QKeyEvent *e )
}
break;
- case Key_Home:
+ case Qt::Key_Home:
aItem = d->mItemList.first();
setCurrentItem( aItem );
break;
- case Key_End:
+ case Qt::Key_End:
aItem = d->mItemList.last();
setCurrentItem( aItem );
break;
- case Key_Prior: // PageUp
+ case Qt::Key_Prior: // PageUp
{
// QListView: "Make the item above the top visible and current"
@@ -1437,5 +1445,5 @@ void CardView::keyPressEvent( QKeyEvent *e )
}
break;
- case Key_Next: // PageDown
+ case Qt::Key_Next: // PageDown
{
// QListView: "Make the item below the bottom visible and current"
@@ -1459,10 +1467,10 @@ void CardView::keyPressEvent( QKeyEvent *e )
}
break;
- case Key_Space:
+ case Qt::Key_Space:
setSelected( d->mCurrentItem, !d->mCurrentItem->isSelected() );
emit selectionChanged();
break;
- case Key_Return:
- case Key_Enter:
+ case Qt::Key_Return:
+ case Qt::Key_Enter:
{
emit returnPressed( d->mCurrentItem );
@@ -1471,5 +1479,5 @@ void CardView::keyPressEvent( QKeyEvent *e )
break;
default:
- if ( (e->state() & ControlButton) && e->key() == Key_A )
+ if ( (e->state() & Qt::ControlButton) && e->key() == Qt::Key_A )
{
// select all
@@ -1489,5 +1497,5 @@ void CardView::keyPressEvent( QKeyEvent *e )
if ( d->mSelectionMode == CardView::Extended )
{
- if ( (e->state() & ShiftButton) )
+ if ( (e->state() & Qt::ShiftButton) )
{
// shift button: toggle range
@@ -1520,5 +1528,5 @@ void CardView::keyPressEvent( QKeyEvent *e )
emit selectionChanged();
}
- else if ( (e->state() & ControlButton) )
+ else if ( (e->state() & Qt::ControlButton) )
{
// control button: do nothing
@@ -1639,7 +1647,7 @@ void CardView::drawRubberBands( int pos )
QPainter p( viewport() );
- p.setRasterOp( XorROP );
- p.setPen( gray );
- p.setBrush( gray );
+ p.setCompositionMode( QPainter::CompositionMode_Xor );
+ p.setPen( Qt::gray );
+ p.setBrush( Qt::gray );
uint n = d->first;
// erase
@@ -1700,5 +1708,5 @@ QFont CardView::headerFont() const
void CardView::setFont( const QFont &fnt )
{
- QScrollView::setFont( fnt );
+ Q3ScrollView::setFont( fnt );
delete d->mFm;
d->mFm = new QFontMetrics( fnt );
@@ -1737,5 +1745,5 @@ void CardView::keyReleaseEvent ( QKeyEvent * e )
mFlagKeyPressed = false;
}
- QScrollView::keyReleaseEvent ( e );
+ Q3ScrollView::keyReleaseEvent ( e );
}
@@ -1746,5 +1754,5 @@ void CardView::keyReleaseEvent ( QKeyEvent * e )
//END Cardview
-#ifndef KAB_EMBEDDED
-#include "cardview.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_cardview.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/views/cardview.h b/kaddressbook/views/cardview.h
index 2ea3771..9c245ea 100644
--- a/kaddressbook/views/cardview.h
+++ b/kaddressbook/views/cardview.h
@@ -2,10 +2,18 @@
#define CARDVIEW_H
-#include <qscrollview.h>
-#include <qptrlist.h>
+#include <q3scrollview.h>
+#include <q3ptrlist.h>
#include <qstring.h>
#include <qrect.h>
#include <qpair.h>
#include <qpoint.h>
+//Added by qt3to4:
+#include <QWheelEvent>
+#include <QResizeEvent>
+#include <QFocusEvent>
+#include <QLabel>
+#include <QMouseEvent>
+#include <QKeyEvent>
+#include <QEvent>
class QLabel;
@@ -149,5 +157,5 @@ class CardViewItem
* the CardView is also 100% independant of KDE.
*/
-class CardView : public QScrollView
+class CardView : public Q3ScrollView
{
friend class CardViewItem;
diff --git a/kaddressbook/views/colorlistbox.cpp b/kaddressbook/views/colorlistbox.cpp
index 2bddca6..46a59a1 100644
--- a/kaddressbook/views/colorlistbox.cpp
+++ b/kaddressbook/views/colorlistbox.cpp
@@ -20,4 +20,9 @@
#include <qpainter.h>
+//Added by qt3to4:
+#include <QDragEnterEvent>
+#include <QDropEvent>
+#include <QDragMoveEvent>
+#include <QDragLeaveEvent>
#include <kcolordialog.h>
@@ -32,9 +37,9 @@
#endif
-ColorListBox::ColorListBox( QWidget *parent, const char *name, WFlags f )
+ColorListBox::ColorListBox( QWidget *parent, const char *name, Qt::WFlags f )
:KListBox( parent, name, f ), mCurrentOnDragEnter(-1)
{
connect( this, SIGNAL(selected(int)), this, SLOT(newColor(int)) );
- connect( this, SIGNAL(clicked(QListBoxItem *)), this, SLOT(slotNewColor(QListBoxItem *)) );
+ connect( this, SIGNAL(clicked(Q3ListBoxItem *)), this, SLOT(slotNewColor(Q3ListBoxItem *)) );
setAcceptDrops( true);
}
@@ -48,5 +53,5 @@ void ColorListBox::setEnabled( bool state )
}
- QListBox::setEnabled( state );
+ Q3ListBox::setEnabled( state );
for( uint i=0; i<count(); i++ )
{
@@ -76,8 +81,8 @@ QColor ColorListBox::color( uint index ) const
else
{
- return( black );
+ return( Qt::black );
}
}
-void ColorListBox::slotNewColor(QListBoxItem * i)
+void ColorListBox::slotNewColor(Q3ListBoxItem * i)
{
if ( i )
@@ -199,5 +204,5 @@ qDebug("ColorListBox::dropEvent drag&drop currently not supported");
ColorListItem::ColorListItem( const QString &text, const QColor &color )
- : QListBoxItem(), mColor( color ), mBoxWidth( 30 )
+ : Q3ListBoxItem(), mColor( color ), mBoxWidth( 30 )
{
setText( text );
@@ -230,5 +235,5 @@ void ColorListItem::paint( QPainter *p )
-int ColorListItem::height(const QListBox *lb ) const
+int ColorListItem::height(const Q3ListBox *lb ) const
{
return( lb->fontMetrics().lineSpacing()+1 );
@@ -236,10 +241,10 @@ int ColorListItem::height(const QListBox *lb ) const
-int ColorListItem::width(const QListBox *lb ) const
+int ColorListItem::width(const Q3ListBox *lb ) const
{
return( mBoxWidth + lb->fontMetrics().width( text() ) + 6 );
}
-#ifndef KAB_EMBEDDED
-#include "colorlistbox.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_colorlistbox.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/views/colorlistbox.h b/kaddressbook/views/colorlistbox.h
index bb91484..31a8085 100644
--- a/kaddressbook/views/colorlistbox.h
+++ b/kaddressbook/views/colorlistbox.h
@@ -23,4 +23,9 @@
#include <klistbox.h>
+//Added by qt3to4:
+#include <QDragMoveEvent>
+#include <QDragLeaveEvent>
+#include <QDropEvent>
+#include <QDragEnterEvent>
class QDragEnterEvent;
@@ -34,5 +39,5 @@ class ColorListBox : public KListBox
public:
- ColorListBox( QWidget *parent=0, const char * name=0, WFlags f=0 );
+ ColorListBox( QWidget *parent=0, const char * name=0, Qt::WFlags f=0 );
void setColor( uint index, const QColor &color );
QColor color( uint index ) const;
@@ -49,5 +54,5 @@ class ColorListBox : public KListBox
private slots:
void newColor( int index );
- void slotNewColor(QListBoxItem * i);
+ void slotNewColor(Q3ListBoxItem * i);
private:
@@ -57,5 +62,5 @@ class ColorListBox : public KListBox
-class ColorListItem : public QListBoxItem
+class ColorListItem : public Q3ListBoxItem
{
public:
@@ -66,6 +71,6 @@ class ColorListItem : public QListBoxItem
protected:
virtual void paint( QPainter * );
- virtual int height( const QListBox * ) const;
- virtual int width( const QListBox * ) const;
+ virtual int height( const Q3ListBox * ) const;
+ virtual int width( const Q3ListBox * ) const;
private:
diff --git a/kaddressbook/views/configurecardviewdialog.cpp b/kaddressbook/views/configurecardviewdialog.cpp
index e0fbd21..b6327fe 100644
--- a/kaddressbook/views/configurecardviewdialog.cpp
+++ b/kaddressbook/views/configurecardviewdialog.cpp
@@ -26,9 +26,12 @@
#include <qlabel.h>
#include <qcheckbox.h>
-#include <qvbox.h>
-#include <qgroupbox.h>
+#include <q3vbox.h>
+#include <q3groupbox.h>
#include <qspinbox.h>
#include <qtabwidget.h>
-#include <qwhatsthis.h>
+#include <q3whatsthis.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
+#include <Q3Frame>
#include <kdebug.h>
@@ -90,5 +93,5 @@ void ConfigureCardViewWidget::saveSettings( KConfig *config )
// CardViewLookNFeelPage
CardViewLookNFeelPage::CardViewLookNFeelPage( QWidget *parent, const char *name )
- : QVBox( parent, name )
+ : Q3VBox( parent, name )
{
initGUI();
@@ -235,26 +238,26 @@ void CardViewLookNFeelPage::initGUI()
// Layout
- QVBox *loTab = new QVBox( this, "layouttab" );
+ Q3VBox *loTab = new Q3VBox( this, "layouttab" );
loTab->setSpacing( spacing );
loTab->setMargin( margin );
- QGroupBox *gbGeneral = new QGroupBox( 1, Qt::Horizontal, i18n("General"), loTab );
+ Q3GroupBox *gbGeneral = new Q3GroupBox( 1, Qt::Horizontal, i18n("General"), loTab );
cbDrawSeps = new QCheckBox( i18n("Draw &separators"), gbGeneral );
- QHBox *hbSW = new QHBox( gbGeneral );
+ Q3HBox *hbSW = new Q3HBox( gbGeneral );
QLabel *lSW = new QLabel( i18n("Separator &width:"), hbSW );
sbSepWidth = new QSpinBox( 1, 50, 1, hbSW );
lSW->setBuddy( sbSepWidth);
- QHBox *hbPadding = new QHBox( gbGeneral );
+ Q3HBox *hbPadding = new Q3HBox( gbGeneral );
QLabel *lSpacing = new QLabel( i18n("&Padding:"), hbPadding );
sbSpacing = new QSpinBox( 0, 100, 1, hbPadding );
lSpacing->setBuddy( sbSpacing );
- QGroupBox *gbCards = new QGroupBox( 1, Qt::Horizontal, i18n("Cards"), loTab );
+ Q3GroupBox *gbCards = new Q3GroupBox( 1, Qt::Horizontal, i18n("Cards"), loTab );
- QHBox *hbMargin = new QHBox( gbCards );
+ Q3HBox *hbMargin = new Q3HBox( gbCards );
QLabel *lMargin = new QLabel( i18n("&Margin:"), hbMargin );
sbMargin = new QSpinBox( 0, 100, 1, hbMargin );
@@ -265,21 +268,21 @@ void CardViewLookNFeelPage::initGUI()
loTab->setStretchFactor( new QWidget( loTab ), 1 );
- QWhatsThis::add( sbMargin, i18n(
+ Q3WhatsThis::add( sbMargin, i18n(
"The item margin is the distance (in pixels) between the item edge and the item data. Most noticeably, "
"incrementing the item margin will add space between the focus rectangle and the item data."
) );
- QWhatsThis::add( lMargin, QWhatsThis::textFor( sbMargin ) );
- QWhatsThis::add( sbSpacing, i18n(
+ /* TODO:hacker: Q3WhatsThis::add( lMargin, Q3WhatsThis::textFor( sbMargin ) ); */
+ Q3WhatsThis::add( sbSpacing, i18n(
"The Item Spacing decides the distance (in pixels) between the items and anything else: the view "
"borders, other items or column separators."
) );
- QWhatsThis::add( lSpacing, QWhatsThis::textFor( sbSpacing ) );
- QWhatsThis::add( sbSepWidth, i18n("Sets the width of column separators") );
- QWhatsThis::add( lSW, QWhatsThis::textFor( sbSepWidth ) );
+ /* TODO:hacker: Q3WhatsThis::add( lSpacing, Q3WhatsThis::textFor( sbSpacing ) ); */
+ Q3WhatsThis::add( sbSepWidth, i18n("Sets the width of column separators") );
+ /* TODO:hacker: Q3WhatsThis::add( lSW, Q3WhatsThis::textFor( sbSepWidth ) ); */
tabs->addTab( loTab, i18n("&Layout") );
// Colors
- QVBox *colorTab = new QVBox( this, "colortab" );
+ Q3VBox *colorTab = new Q3VBox( this, "colortab" );
colorTab->setSpacing( spacing );
colorTab->setMargin( spacing );
@@ -289,14 +292,14 @@ void CardViewLookNFeelPage::initGUI()
tabs->addTab( colorTab, i18n("&Colors") );
- QWhatsThis::add( cbEnableCustomColors, i18n(
+ Q3WhatsThis::add( cbEnableCustomColors, i18n(
"If custom colors are enabled, you may choose the colors for the view below. "
"Otherwise colors from your current KDE color scheme are used."
) );
- QWhatsThis::add( lbColors, i18n(
+ Q3WhatsThis::add( lbColors, i18n(
"Double click or press RETURN on a item to select a color for the related strings in the view."
) );
// Fonts
- QVBox *fntTab = new QVBox( this, "fonttab" );
+ Q3VBox *fntTab = new Q3VBox( this, "fonttab" );
fntTab->setSpacing( spacing );
@@ -307,5 +310,5 @@ void CardViewLookNFeelPage::initGUI()
vbFonts = new QWidget( fntTab );
- QGridLayout *gFnts = new QGridLayout( vbFonts, 2, 3 );
+ Q3GridLayout *gFnts = new Q3GridLayout( vbFonts, 2, 3 );
gFnts->setSpacing( spacing );
gFnts->setAutoAdd( true );
@@ -313,5 +316,5 @@ void CardViewLookNFeelPage::initGUI()
QLabel *lTFnt = new QLabel( i18n("&Text font:"), vbFonts );
lTextFont = new QLabel( vbFonts );
- lTextFont->setFrameStyle( QFrame::Panel|QFrame::Sunken );
+ lTextFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken );
#ifndef KAB_EMBEDDED
btnFont = new KPushButton( i18n("Choose..."), vbFonts );
@@ -326,5 +329,5 @@ void CardViewLookNFeelPage::initGUI()
QLabel *lHFnt = new QLabel( i18n("&Header font:"), vbFonts );
lHeaderFont = new QLabel( vbFonts );
- lHeaderFont->setFrameStyle( QFrame::Panel|QFrame::Sunken );
+ lHeaderFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken );
#ifndef KAB_EMBEDDED
btnHeaderFont = new KPushButton( i18n("Choose..."), vbFonts );
@@ -337,5 +340,5 @@ void CardViewLookNFeelPage::initGUI()
fntTab->setStretchFactor( new QWidget( fntTab ), 1 );
- QWhatsThis::add( cbEnableCustomFonts, i18n(
+ Q3WhatsThis::add( cbEnableCustomFonts, i18n(
"If custom fonts are enabled, you may choose which fonts to use for this view below. "
"Otherwise the default KDE font will be used, in bold style for the header and "
@@ -346,5 +349,5 @@ void CardViewLookNFeelPage::initGUI()
// Behaviour
- QVBox *behaviourTab = new QVBox( this );
+ Q3VBox *behaviourTab = new Q3VBox( this );
behaviourTab->setMargin( margin );
behaviourTab->setSpacing( spacing );
@@ -365,5 +368,5 @@ void CardViewLookNFeelPage::updateFontLabel( QFont fnt, QLabel *l )
}
-#ifndef KAB_EMBEDDED
-#include "configurecardviewdialog.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_configurecardviewdialog.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/views/configurecardviewdialog.h b/kaddressbook/views/configurecardviewdialog.h
index 7a62226..4af475d 100644
--- a/kaddressbook/views/configurecardviewdialog.h
+++ b/kaddressbook/views/configurecardviewdialog.h
@@ -27,7 +27,9 @@
#include "viewconfigurewidget.h"
-#include <qvbox.h>
+#include <q3vbox.h>
#include <qwidget.h>
#include <qfont.h>
+//Added by qt3to4:
+#include <QLabel>
class QString;
@@ -78,5 +80,5 @@ class ConfigureCardViewWidget : public ViewConfigureWidget
*/
-class CardViewLookNFeelPage : public QVBox {
+class CardViewLookNFeelPage : public Q3VBox {
Q_OBJECT
diff --git a/kaddressbook/views/configuretableviewdialog.cpp b/kaddressbook/views/configuretableviewdialog.cpp
index c329cd9..7ed897a 100644
--- a/kaddressbook/views/configuretableviewdialog.cpp
+++ b/kaddressbook/views/configuretableviewdialog.cpp
@@ -28,9 +28,12 @@
#include <qradiobutton.h>
#include <qcheckbox.h>
-#include <qvbox.h>
-#include <qbuttongroup.h>
+#include <q3vbox.h>
+#include <q3buttongroup.h>
#include <qtabwidget.h>
-#include <qwhatsthis.h>
+#include <q3whatsthis.h>
#include <qpushbutton.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
+#include <Q3Frame>
#include <kglobal.h>
@@ -85,5 +88,5 @@ void ConfigureTableViewWidget::saveSettings( KConfig *config )
LookAndFeelPage::LookAndFeelPage(QWidget *parent, const char *name)
- : QVBox(parent, name)
+ : Q3VBox(parent, name)
{
initGUI();
@@ -230,10 +233,10 @@ void LookAndFeelPage::initGUI()
// General
- QVBox *generalTab = new QVBox( this, "generaltab" );
+ Q3VBox *generalTab = new Q3VBox( this, "generaltab" );
generalTab->setSpacing( spacing );
generalTab->setMargin( margin );
- QButtonGroup *group = new QButtonGroup(1, Qt::Horizontal,
+ Q3ButtonGroup *group = new Q3ButtonGroup(1, Qt::Horizontal,
i18n("Row Separator"), generalTab);
@@ -263,5 +266,5 @@ void LookAndFeelPage::initGUI()
// Colors
- QVBox *colorTab = new QVBox( this, "colortab" );
+ Q3VBox *colorTab = new Q3VBox( this, "colortab" );
colorTab->setSpacing( spacing );
colorTab->setMargin( spacing );
@@ -271,14 +274,14 @@ void LookAndFeelPage::initGUI()
tabs->addTab( colorTab, i18n("&Colors") );
- QWhatsThis::add( cbEnableCustomColors, i18n(
+ Q3WhatsThis::add( cbEnableCustomColors, i18n(
"If custom colors are enabled, you may choose the colors for the view below. "
"Otherwise colors from your current KDE color scheme are used."
) );
- QWhatsThis::add( lbColors, i18n(
+ Q3WhatsThis::add( lbColors, i18n(
"Double click or press RETURN on a item to select a color for the related strings in the view."
) );
// Fonts
- QVBox *fntTab = new QVBox( this, "fonttab" );
+ Q3VBox *fntTab = new Q3VBox( this, "fonttab" );
fntTab->setSpacing( spacing );
@@ -289,5 +292,5 @@ void LookAndFeelPage::initGUI()
vbFonts = new QWidget( fntTab );
- QGridLayout *gFnts = new QGridLayout( vbFonts, 2, 3 );
+ Q3GridLayout *gFnts = new Q3GridLayout( vbFonts, 2, 3 );
gFnts->setSpacing( spacing );
gFnts->setAutoAdd( true );
@@ -295,5 +298,5 @@ void LookAndFeelPage::initGUI()
QLabel *lTFnt = new QLabel( i18n("&Text font:"), vbFonts );
lTextFont = new QLabel( vbFonts );
- lTextFont->setFrameStyle( QFrame::Panel|QFrame::Sunken );
+ lTextFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken );
#ifndef KAB_EMBEDDED
btnFont = new KPushButton( i18n("Choose..."), vbFonts );
@@ -308,5 +311,5 @@ void LookAndFeelPage::initGUI()
QLabel *lHFnt = new QLabel( i18n("&Header font:"), vbFonts );
lHeaderFont = new QLabel( vbFonts );
- lHeaderFont->setFrameStyle( QFrame::Panel|QFrame::Sunken );
+ lHeaderFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken );
#ifndef KAB_EMBEDDED
btnHeaderFont = new KPushButton( i18n("Choose..."), vbFonts );
@@ -319,5 +322,5 @@ void LookAndFeelPage::initGUI()
fntTab->setStretchFactor( new QWidget( fntTab ), 1 );
- QWhatsThis::add( cbEnableCustomFonts, i18n(
+ Q3WhatsThis::add( cbEnableCustomFonts, i18n(
"If custom fonts are enabled, you may choose which fonts to use for this view below. "
"Otherwise the default KDE font will be used, in bold style for the header and "
@@ -341,5 +344,5 @@ void LookAndFeelPage::updateFontLabel( QFont fnt, QLabel *l )
}
-#ifndef KAB_EMBEDDED
-#include "configuretableviewdialog.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_configuretableviewdialog.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/views/configuretableviewdialog.h b/kaddressbook/views/configuretableviewdialog.h
index 003ccf8..8125fc9 100644
--- a/kaddressbook/views/configuretableviewdialog.h
+++ b/kaddressbook/views/configuretableviewdialog.h
@@ -27,5 +27,7 @@
#include "viewconfigurewidget.h"
-#include <qvbox.h>
+#include <q3vbox.h>
+//Added by qt3to4:
+#include <QLabel>
class QString;
@@ -64,5 +66,5 @@ class ConfigureTableViewWidget : public ViewConfigureWidget
Internal class. It is only defined here for moc
*/
-class LookAndFeelPage : public QVBox
+class LookAndFeelPage : public Q3VBox
{
Q_OBJECT
diff --git a/kaddressbook/views/contactlistview.cpp b/kaddressbook/views/contactlistview.cpp
index 9accf78..227645d 100644
--- a/kaddressbook/views/contactlistview.cpp
+++ b/kaddressbook/views/contactlistview.cpp
@@ -22,8 +22,8 @@
*/
-#include <qheader.h>
-#include <qiconset.h>
+#include <q3header.h>
+#include <qicon.h>
#include <qimage.h>
-#include <qdragobject.h>
+#include <q3dragobject.h>
#include <qcombobox.h>
#include <qpainter.h>
@@ -31,4 +31,9 @@
#include <qevent.h>
#include <qapplication.h>
+//Added by qt3to4:
+#include <QDropEvent>
+#include <QPixmap>
+#include <QMouseEvent>
+#include <QKeyEvent>
#include <klocale.h>
@@ -48,5 +53,5 @@
DynamicTip::DynamicTip( ContactListView *parent)
- : QToolTip( parent )
+ /* TODO:hacker:: QToolTip( parent ) */
{
}
@@ -54,4 +59,5 @@ DynamicTip::DynamicTip( ContactListView *parent)
void DynamicTip::maybeTip( const QPoint &pos )
{
+ /* TODO:hacker:
static bool ishidden = true;
if (!parentWidget()->inherits( "ContactListView" ))
@@ -64,5 +70,5 @@ void DynamicTip::maybeTip( const QPoint &pos )
QPoint posVp = plv->viewport()->pos();
- QListViewItem *lvi = plv->itemAt( pos - posVp );
+ Q3ListViewItem *lvi = plv->itemAt( pos - posVp );
if (!lvi)
return;
@@ -152,5 +158,5 @@ void DynamicTip::maybeTip( const QPoint &pos )
hide();
ishidden = !ishidden;
-
+ */
}
@@ -174,5 +180,5 @@ QString ContactListViewItem::key(int column, bool ascending) const
//qDebug("language %d ", lan);
if ( lan == 1 ) { //GERMAN
- QString ret = QListViewItem::key(column, ascending).lower().utf8();
+ QString ret = Q3ListViewItem::key(column, ascending).lower().utf8();
int start = -1;
while ( (start = ret.find( 'ä', start+1)) > 0 ) {
@@ -198,5 +204,5 @@ QString ContactListViewItem::key(int column, bool ascending) const
else
#endif
- return QListViewItem::key(column, ascending).lower();
+ return Q3ListViewItem::key(column, ascending).lower();
}
@@ -289,5 +295,5 @@ void ContactListView::printMe()
QPainter p;
p.begin ( &printer );
- QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer );
+ Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer );
float dx, dy;
int wid = (m.width() * 9)/10;
@@ -344,5 +350,5 @@ void ContactListView::contentsMousePressEvent(QMouseEvent* e)
void ContactListView::contentsMouseMoveEvent( QMouseEvent *e )
{
- if ((e->state() & LeftButton) && (e->pos() - presspos).manhattanLength() > 4 ) {
+ if ((e->state() & Qt::LeftButton) && (e->pos() - presspos).manhattanLength() > 4 ) {
emit startAddresseeDrag();
}
@@ -354,5 +360,5 @@ bool ContactListView::acceptDrag(QDropEvent *e) const
{
#ifndef KAB_EMBEDDED
- return QTextDrag::canDecode(e);
+ return Q3TextDrag::canDecode(e);
#else //KAB_EMBEDDED
qDebug("ContactListView::acceptDrag has to be fixed");
@@ -425,5 +431,5 @@ void ContactListView::keyReleaseEvent ( QKeyEvent * e )
KListView::keyReleaseEvent ( e );
}
-#ifndef KAB_EMBEDDED
-#include "contactlistview.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_contactlistview.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/views/contactlistview.h b/kaddressbook/views/contactlistview.h
index 46477e1..c92b002 100644
--- a/kaddressbook/views/contactlistview.h
+++ b/kaddressbook/views/contactlistview.h
@@ -6,4 +6,8 @@
#include <qtooltip.h>
#include <qstring.h>
+//Added by qt3to4:
+#include <QDropEvent>
+#include <QMouseEvent>
+#include <QKeyEvent>
#include <klistview.h>
@@ -21,5 +25,5 @@ class ContactListView;
* hacked together to function.
*/
-class DynamicTip : public QToolTip
+class DynamicTip /* TODO:hacker: : public QToolTip */
{
public:
diff --git a/kaddressbook/views/kaddressbookcardview.cpp b/kaddressbook/views/kaddressbookcardview.cpp
index b503652..1e5a556 100644
--- a/kaddressbook/views/kaddressbookcardview.cpp
+++ b/kaddressbook/views/kaddressbookcardview.cpp
@@ -22,11 +22,16 @@
*/
-#include <qdragobject.h>
+#include <q3dragobject.h>
#include <qevent.h>
-#include <qiconview.h>
+#include <q3iconview.h>
#include <qlayout.h>
#include <qstringlist.h>
#include <qregexp.h>
#include <qapplication.h>
+//Added by qt3to4:
+#include <QDropEvent>
+#include <QKeyEvent>
+#include <Q3VBoxLayout>
+#include <QDragEnterEvent>
#include <kabc/addressbook.h>
@@ -126,5 +131,5 @@ void AddresseeCardView::printMe()
QPainter p;
p.begin ( &printer );
- QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer );
+ Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer );
float dx, dy;
int wid = (m.width() * 9)/10;
@@ -149,5 +154,5 @@ void AddresseeCardView::dragEnterEvent(QDragEnterEvent *e)
{
#ifndef KAB_EMBEDDED
- if (QTextDrag::canDecode(e))
+ if (Q3TextDrag::canDecode(e))
e->accept();
#else //KAB_EMBEDDED
@@ -177,5 +182,5 @@ KAddressBookCardView::KAddressBookCardView( KABC::AddressBook *ab,
// Init the GUI
- QVBoxLayout *layout = new QVBoxLayout(viewWidget());
+ Q3VBoxLayout *layout = new Q3VBoxLayout(viewWidget());
mCardView = new AddresseeCardView(viewWidget(), "mCardView");
@@ -521,5 +526,5 @@ void KAddressBookCardView::addresseeSelected()
}
-#ifndef KAB_EMBEDDED
-#include "kaddressbookcardview.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_kaddressbookcardview.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/views/kaddressbookcardview.h b/kaddressbook/views/kaddressbookcardview.h
index 2a71f7e..8f8e48b 100644
--- a/kaddressbook/views/kaddressbookcardview.h
+++ b/kaddressbook/views/kaddressbookcardview.h
@@ -26,4 +26,7 @@
#include <qstring.h>
+//Added by qt3to4:
+#include <QDragEnterEvent>
+#include <QDropEvent>
#ifndef KAB_EMBEDDED
#include <kiconview.h>
diff --git a/kaddressbook/views/kaddressbookiconview.cpp b/kaddressbook/views/kaddressbookiconview.cpp
index d6ddec3..3a41a4b 100644
--- a/kaddressbook/views/kaddressbookiconview.cpp
+++ b/kaddressbook/views/kaddressbookiconview.cpp
@@ -23,5 +23,5 @@
#ifndef KAB_EMBEDDED
-#include <qiconview.h>
+#include <q3iconview.h>
#include <qstringlist.h>
@@ -36,4 +36,12 @@
#endif //KAB_EMBEDDED
+//Added by qt3to4:
+#include <QDropEvent>
+#include <Q3ValueList>
+#include <QPixmap>
+#include <QKeyEvent>
+#include <QEvent>
+#include <Q3VBoxLayout>
+
#include <kabc/addressbook.h>
#include "kabprefs.h"
@@ -74,10 +82,10 @@ AddresseeIconView::AddresseeIconView(QWidget *parent, const char *name)
#else //KAB_EMBEDDED
AddresseeIconView::AddresseeIconView(QWidget *parent, const char *name)
- : QIconView(parent, name)
+ : Q3IconView(parent, name)
#endif //KAB_EMBEDDED
{
- setSelectionMode( QIconView::Extended );
- setResizeMode( QIconView::Adjust );
+ setSelectionMode( Q3IconView::Extended );
+ setResizeMode( Q3IconView::Adjust );
setWordWrapIconText( true );
setGridX( 100 );
@@ -90,6 +98,6 @@ AddresseeIconView::AddresseeIconView(QWidget *parent, const char *name)
#ifndef KAB_EMBEDDED
- connect(this, SIGNAL(dropped(QDropEvent*, const QValueList<QIconDragItem>&)),
- this, SLOT(itemDropped(QDropEvent*, const QValueList<QIconDragItem>&)));
+ connect(this, SIGNAL(dropped(QDropEvent*, const Q3ValueList<Q3IconDragItem>&)),
+ this, SLOT(itemDropped(QDropEvent*, const Q3ValueList<Q3IconDragItem>&)));
#endif //KAB_EMBEDDED
}
@@ -101,10 +109,10 @@ AddresseeIconView::~AddresseeIconView()
void AddresseeIconView::itemDropped(QDropEvent *e,
- const QValueList<QIconDragItem> &)
+ const Q3ValueList<Q3IconDragItem> &)
{
emit addresseeDropped(e);
}
-QDragObject *AddresseeIconView::dragObject()
+Q3DragObject *AddresseeIconView::dragObject()
{
emit startAddresseeDrag();
@@ -118,5 +126,5 @@ QDragObject *AddresseeIconView::dragObject()
class AddresseeIconViewItem : public KIconViewItem
#else //KAB_EMBEDDED
-class AddresseeIconViewItem : public QIconViewItem
+class AddresseeIconViewItem : public Q3IconViewItem
#endif //KAB_EMBEDDED
{
@@ -125,11 +133,11 @@ class AddresseeIconViewItem : public QIconViewItem
AddresseeIconViewItem(const KABC::Field::List &fields,
KABC::AddressBook *doc, const KABC::Addressee &a,
- QIconView *parent)
+ Q3IconView *parent)
: KIconViewItem(parent), mFields( fields ), mDocument(doc), mAddressee(a)
#else //KAB_EMBEDDED
AddresseeIconViewItem(const KABC::Field::List &fields,
KABC::AddressBook *doc, const KABC::Addressee &a,
- QIconView *parent)
- : QIconViewItem(parent), mFields( fields ), mDocument(doc), mAddressee(a)
+ Q3IconView *parent)
+ : Q3IconViewItem(parent), mFields( fields ), mDocument(doc), mAddressee(a)
#endif //KAB_EMBEDDED
{
@@ -201,5 +209,5 @@ KAddressBookIconView::KAddressBookIconView( KABC::AddressBook *ab,
{
// Init the GUI
- QVBoxLayout *layout = new QVBoxLayout(viewWidget());
+ Q3VBoxLayout *layout = new Q3VBoxLayout(viewWidget());
mIconView = new AddresseeIconView(viewWidget(), "mIconView");
@@ -211,6 +219,6 @@ KAddressBookIconView::KAddressBookIconView( KABC::AddressBook *ab,
//US connect(mIconView, SIGNAL(executed(QIconViewItem *)),
//US this, SLOT(addresseeExecuted(QIconViewItem *)));
- connect(mIconView, SIGNAL(selectionChanged(QIconViewItem *)),
- this, SLOT(addresseeExecuted(QIconViewItem *)));
+ connect(mIconView, SIGNAL(selectionChanged(Q3IconViewItem *)),
+ this, SLOT(addresseeExecuted(Q3IconViewItem *)));
connect(mIconView, SIGNAL(selectionChanged()),
@@ -249,6 +257,6 @@ void KAddressBookIconView::readConfig(KConfig *config)
//US disconnect(mIconView, SIGNAL(executed(QIconViewItem *)),
//US this, SLOT(addresseeExecuted(QIconViewItem *)));
- disconnect(mIconView, SIGNAL(selectionChanged(QIconViewItem *)),
- this, SLOT(addresseeExecuted(QIconViewItem *)));
+ disconnect(mIconView, SIGNAL(selectionChanged(Q3IconViewItem *)),
+ this, SLOT(addresseeExecuted(Q3IconViewItem *)));
//US method executed is part of KIconView. Use selectionChanged instead
@@ -261,6 +269,6 @@ void KAddressBookIconView::readConfig(KConfig *config)
this, SLOT(addresseeExecuted(QIconViewItem *)));
*/
- connect(mIconView, SIGNAL(selectionChanged(QIconViewItem *)),
- this, SLOT(addresseeExecuted(QIconViewItem *)));
+ connect(mIconView, SIGNAL(selectionChanged(Q3IconViewItem *)),
+ this, SLOT(addresseeExecuted(Q3IconViewItem *)));
}
@@ -337,5 +345,5 @@ QStringList KAddressBookIconView::selectedUids()
{
QStringList uidList;
- QIconViewItem *item;
+ Q3IconViewItem *item;
AddresseeIconViewItem *aItem;
@@ -359,5 +367,5 @@ QStringList KAddressBookIconView::selectedUids()
void KAddressBookIconView::refresh(QString uid)
{
- QIconViewItem *item;
+ Q3IconViewItem *item;
AddresseeIconViewItem *aItem;
@@ -407,5 +415,5 @@ void KAddressBookIconView::refresh(QString uid)
void KAddressBookIconView::setSelected(QString uid, bool selected)
{
- QIconViewItem *item;
+ Q3IconViewItem *item;
AddresseeIconViewItem *aItem;
@@ -436,5 +444,5 @@ void KAddressBookIconView::setSelected(QString uid, bool selected)
}
-void KAddressBookIconView::addresseeExecuted(QIconViewItem *item)
+void KAddressBookIconView::addresseeExecuted(Q3IconViewItem *item)
{
#ifndef KAB_EMBEDDED
@@ -451,5 +459,5 @@ void KAddressBookIconView::addresseeExecuted(QIconViewItem *item)
void KAddressBookIconView::addresseeSelected()
{
- QIconViewItem *item;
+ Q3IconViewItem *item;
AddresseeIconViewItem *aItem;
@@ -477,5 +485,5 @@ void KAddressBookIconView::addresseeSelected()
}
-#ifndef KAB_EMBEDDED
-#include "kaddressbookiconview.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_kaddressbookiconview.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/views/kaddressbookiconview.h b/kaddressbook/views/kaddressbookiconview.h
index b0b9fea..6fad4c6 100644
--- a/kaddressbook/views/kaddressbookiconview.h
+++ b/kaddressbook/views/kaddressbookiconview.h
@@ -26,18 +26,21 @@
#include <qstring.h>
+//Added by qt3to4:
+#include <Q3ValueList>
+#include <QDropEvent>
#ifndef KAB_EMBEDDED
#include <kiconview.h>
#else //KAB_EMBEDDED
-#include <qiconview.h>
-#include <qptrlist.h>
+#include <q3iconview.h>
+#include <q3ptrlist.h>
#include <klocale.h>
#endif //KAB_EMBEDDED
#include "kaddressbookview.h"
-class QIconViewItem;
+class Q3IconViewItem;
class KConfig;
class AddresseeIconView;
class AddresseeIconViewItem;
-class QIconDragItem;
+class Q3IconDragItem;
class KAddressBookIconView;
@@ -69,7 +72,7 @@ class KAddressBookIconView : public KAddressBookView
void refresh(QString uid = QString::null);
#ifndef KAB_EMBEDDED
-//MOC_SKIP_BEGIN
+#ifndef Q_MOC_RUN
void setSelected(QString uid = QString::null, bool selected = true);
-//MOC_SKIP_END
+#endif
#else //KAB_EMBEDDED
//US my MOC do not like default parameters ???
@@ -78,19 +81,19 @@ class KAddressBookIconView : public KAddressBookView
protected slots:
- void addresseeExecuted(QIconViewItem *item);
+ void addresseeExecuted(Q3IconViewItem *item);
void addresseeSelected();
private:
AddresseeIconView *mIconView;
- QPtrList<AddresseeIconViewItem> mIconList;
+ Q3PtrList<AddresseeIconViewItem> mIconList;
};
#ifndef KAB_EMBEDDED
-//MOC_SKIP_BEGIN
+#ifndef Q_MOC_RUN
class AddresseeIconView : public KIconView
-//MOC_SKIP_END
+#endif
#else //KAB_EMBEDDED
-class AddresseeIconView : public QIconView
+class AddresseeIconView : public Q3IconView
#endif //KAB_EMBEDDED
{
@@ -106,8 +109,8 @@ class AddresseeIconView : public QIconView
protected:
- virtual QDragObject *dragObject();
+ virtual Q3DragObject *dragObject();
protected slots:
- void itemDropped(QDropEvent *, const QValueList<QIconDragItem> &);
+ void itemDropped(QDropEvent *, const Q3ValueList<Q3IconDragItem> &);
};
diff --git a/kaddressbook/views/kaddressbooktableview.cpp b/kaddressbook/views/kaddressbooktableview.cpp
index 272f2eb..7efaaa9 100644
--- a/kaddressbook/views/kaddressbooktableview.cpp
+++ b/kaddressbook/views/kaddressbooktableview.cpp
@@ -1,6 +1,6 @@
// $Id$
-#include <qvbox.h>
-#include <qlistbox.h>
+#include <q3vbox.h>
+#include <q3listbox.h>
#include <qwidget.h>
#include <qfile.h>
@@ -8,8 +8,12 @@
#include <qcombobox.h>
#include <qapplication.h>
-#include <qdragobject.h>
+#include <q3dragobject.h>
#include <qevent.h>
-#include <qurl.h>
+#include <q3url.h>
#include <qpixmap.h>
+//Added by qt3to4:
+#include <QDropEvent>
+#include <QKeyEvent>
+#include <Q3VBoxLayout>
#include <kabc/addressbook.h>
@@ -33,5 +37,5 @@
#include <qlayout.h>
-#include <qheader.h>
+#include <q3header.h>
#include <qregexp.h>
@@ -43,5 +47,5 @@ KAddressBookTableView::KAddressBookTableView( KABC::AddressBook *ab,
: KAddressBookView( ab, parent, name )
{
- mainLayout = new QVBoxLayout( viewWidget(), 2 );
+ mainLayout = new Q3VBoxLayout( viewWidget(), 2 );
// The list view will be created when the config is read.
@@ -78,12 +82,12 @@ void KAddressBookTableView::reconstructListView()
disconnect(mListView, SIGNAL(selectionChanged()),
this, SLOT(addresseeSelected()));
- disconnect(mListView, SIGNAL(executed(QListViewItem*)),
- this, SLOT(addresseeExecuted(QListViewItem*)));
- disconnect(mListView, SIGNAL(doubleClicked(QListViewItem*)),
- this, SLOT(addresseeExecuted(QListViewItem*)));
+ disconnect(mListView, SIGNAL(executed(Q3ListViewItem*)),
+ this, SLOT(addresseeExecuted(Q3ListViewItem*)));
+ disconnect(mListView, SIGNAL(doubleClicked(Q3ListViewItem*)),
+ this, SLOT(addresseeExecuted(Q3ListViewItem*)));
disconnect(mListView, SIGNAL(startAddresseeDrag()), this,
SIGNAL(startDrag()));
- disconnect(mListView, SIGNAL(returnPressed(QListViewItem*)),
- this, SLOT(addresseeExecuted(QListViewItem*)));
+ disconnect(mListView, SIGNAL(returnPressed(Q3ListViewItem*)),
+ this, SLOT(addresseeExecuted(Q3ListViewItem*)));
disconnect(mListView, SIGNAL(addresseeDropped(QDropEvent*)), this,
@@ -106,5 +110,5 @@ void KAddressBookTableView::reconstructListView()
for( it = fieldList.begin(); it != fieldList.end(); ++it ) {
mListView->addColumn( (*it)->label() );
- mListView->setColumnWidthMode(c++, QListView::Manual);
+ mListView->setColumnWidthMode(c++, Q3ListView::Manual);
//US
// qDebug("KAddressBookTableView::reconstructListView: field %s", (*it)->label().latin1());
@@ -120,13 +124,13 @@ void KAddressBookTableView::reconstructListView()
if (KABPrefs::instance()->mHonorSingleClick) {
// qDebug("KAddressBookTableView::reconstructListView single");
- connect(mListView, SIGNAL(executed(QListViewItem*)),
- this, SLOT(addresseeExecuted(QListViewItem*)));
+ connect(mListView, SIGNAL(executed(Q3ListViewItem*)),
+ this, SLOT(addresseeExecuted(Q3ListViewItem*)));
} else {
// qDebug("KAddressBookTableView::reconstructListView double");
- connect(mListView, SIGNAL(doubleClicked(QListViewItem*)),
- this, SLOT(addresseeExecuted(QListViewItem*)));
+ connect(mListView, SIGNAL(doubleClicked(Q3ListViewItem*)),
+ this, SLOT(addresseeExecuted(Q3ListViewItem*)));
}
- connect(mListView, SIGNAL(returnPressed(QListViewItem*)),
- this, SLOT(addresseeExecuted(QListViewItem*)));
+ connect(mListView, SIGNAL(returnPressed(Q3ListViewItem*)),
+ this, SLOT(addresseeExecuted(Q3ListViewItem*)));
connect(mListView, SIGNAL(signalDelete()),
this, SLOT(addresseeDeleted()));
@@ -345,5 +349,5 @@ void KAddressBookTableView::refresh(QString uid)
// Only need to update on entry. Iterate through and try to find it
ContactListViewItem *ceItem;
- QListViewItemIterator it( mListView );
+ Q3ListViewItemIterator it( mListView );
while ( it.current() ) {
#ifndef KAB_EMBEDDED
@@ -367,5 +371,5 @@ QStringList KAddressBookTableView::selectedUids()
{
QStringList uidList;
- QListViewItem *item;
+ Q3ListViewItem *item;
ContactListViewItem *ceItem;
@@ -395,5 +399,5 @@ QStringList KAddressBookTableView::selectedUids()
void KAddressBookTableView::setSelected(QString uid, bool selected)
{
- QListViewItem *item;
+ Q3ListViewItem *item;
ContactListViewItem *ceItem;
@@ -430,5 +434,5 @@ void KAddressBookTableView::addresseeSelected()
// there is no way to figure out which one was
// selected last.
- QListViewItem *item;
+ Q3ListViewItem *item;
bool found =false;
for (item = mListView->firstChild(); item && !found;
@@ -454,5 +458,5 @@ void KAddressBookTableView::addresseeSelected()
}
-void KAddressBookTableView::addresseeExecuted(QListViewItem *item)
+void KAddressBookTableView::addresseeExecuted(Q3ListViewItem *item)
{
if (item)
@@ -488,5 +492,5 @@ void KAddressBookTableView::addresseeDeleted()
-#ifndef KAB_EMBEDDED
-#include "kaddressbooktableview.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_kaddressbooktableview.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/views/kaddressbooktableview.h b/kaddressbook/views/kaddressbooktableview.h
index 38db7b4..c3cb038 100644
--- a/kaddressbook/views/kaddressbooktableview.h
+++ b/kaddressbook/views/kaddressbooktableview.h
@@ -11,10 +11,10 @@
#include <qwidget.h>
-#include <qlistview.h>
+#include <q3listview.h>
#include <qstring.h>
#include <qdialog.h>
-#include <qtabdialog.h>
+#include <q3tabdialog.h>
#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <q3valuelist.h>
#include "undo.h"
@@ -26,8 +26,10 @@
#include "klocale.h"
#include "kaddressbookview.h"
+//Added by qt3to4:
+#include <Q3VBoxLayout>
-class QListViewItem;
-class QListBox;
-class QVBoxLayout;
+class Q3ListViewItem;
+class Q3ListBox;
+class Q3VBoxLayout;
class KConfig;
@@ -80,8 +82,8 @@ friend class ContactListView;
* list view, this is probably a double click
*/
- void addresseeExecuted(QListViewItem*);
+ void addresseeExecuted(Q3ListViewItem*);
private:
- QVBoxLayout *mainLayout;
+ Q3VBoxLayout *mainLayout;
ContactListView *mListView;
};
diff --git a/kaddressbook/xxport/csv_xxport.cpp b/kaddressbook/xxport/csv_xxport.cpp
index 7281003..ed5807f 100644
--- a/kaddressbook/xxport/csv_xxport.cpp
+++ b/kaddressbook/xxport/csv_xxport.cpp
@@ -31,5 +31,5 @@ $Id$
#include <qfile.h>
#include <qregexp.h>
-#include <qtextstream.h>
+#include <q3textstream.h>
#include <qtextcodec.h>
@@ -105,5 +105,5 @@ bool CSVXXPort::exportContacts( const KABC::AddresseeList &list, const QString&
} else {
QFile file( url.path() );
- if ( !file.open( IO_WriteOnly ) ) {
+ if ( !file.open( QIODevice::WriteOnly ) ) {
QString txt = i18n( "<qt>Unable to open file <b>%1</b>.</qt>" );
KMessageBox::error( parentWidget(), txt.arg( url.path() ) );
@@ -125,5 +125,5 @@ bool CSVXXPort::exportContacts( const KABC::AddresseeList &list, const QString&
QFile file( fileName );
- if ( !file.open( IO_WriteOnly ) ) {
+ if ( !file.open( QIODevice::WriteOnly ) ) {
QString txt = i18n( "<qt>Unable to open file <b>%1</b>.</qt>" );
KMessageBox::error( parentWidget(), txt.arg( fileName ) );
@@ -152,5 +152,5 @@ KABC::AddresseeList CSVXXPort::importContacts( const QString& ) const
void CSVXXPort::doExport( QFile *fp, const KABC::AddresseeList &list )
{
- QTextStream t( fp );
+ Q3TextStream t( fp );
t.setCodec( QTextCodec::codecForName("utf8") );
@@ -188,7 +188,5 @@ void CSVXXPort::doExport( QFile *fp, const KABC::AddresseeList &list )
}
-#ifndef KAB_EMBEDDED
-#include "csv_xxport.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_csv_xxport.cpp"
#endif //KAB_EMBEDDED
-
-
diff --git a/kaddressbook/xxport/csvimportdialog.cpp b/kaddressbook/xxport/csvimportdialog.cpp
index 862241e..7959cac 100644
--- a/kaddressbook/xxport/csvimportdialog.cpp
+++ b/kaddressbook/xxport/csvimportdialog.cpp
@@ -28,5 +28,5 @@ $Id$
-#include <qbuttongroup.h>
+#include <q3buttongroup.h>
#include <qcheckbox.h>
#include <qcombobox.h>
@@ -40,8 +40,12 @@ $Id$
#include <qpushbutton.h>
#include <qradiobutton.h>
-#include <qtable.h>
+#include <q3table.h>
#include <qlayout.h>
-#include <qtextstream.h>
+#include <q3textstream.h>
#include <qfile.h>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
+#include <Q3ValueList>
+#include <Q3GridLayout>
#include <kapplication.h>
@@ -57,5 +61,5 @@ $Id$
#ifdef DESKTOP_VERSION
-#include "qtable.h"
+#include "q3table.h"
#else
#include "qcombotableitem.h"
@@ -162,5 +166,5 @@ CSVImportDialog::CSVImportDialog( KABC::AddressBook *ab, QWidget *parent,
// if ( QApplication::desktop()->width() < 321 )
- QIconSet icon = SmallIcon("filesave");
+ QIcon icon = SmallIcon("filesave");
findButton( User2 )->setIconSet (icon ) ;
@@ -187,5 +191,5 @@ KABC::AddresseeList CSVImportDialog::contacts() const
for ( int col = 0; col < mTable->numCols(); ++col ) {
- QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0, col ) );
+ Q3ComboTableItem *item = static_cast<Q3ComboTableItem*>( mTable->item( 0, col ) );
if ( !item ) {
@@ -230,5 +234,5 @@ KABC::AddresseeList CSVImportDialog::contacts() const
{
QDate dt = KGlobal::locale()->readDate( value, "%Y-%m-%d"); // = Qt::ISODate
- a.setBirthday(dt);
+ a.setBirthday(QDateTime(dt));
}
break;
@@ -383,7 +387,7 @@ void CSVImportDialog::initGUI()
QWidget* page = plainPage();
- QGridLayout *layout = new QGridLayout( page, 1, 1, marginHintSmall(),
+ Q3GridLayout *layout = new Q3GridLayout( page, 1, 1, marginHintSmall(),
spacingHintSmall() );
- QHBoxLayout *hbox = new QHBoxLayout();
+ Q3HBoxLayout *hbox = new Q3HBoxLayout();
hbox->setSpacing( spacingHint() );
@@ -398,9 +402,9 @@ void CSVImportDialog::initGUI()
// Delimiter: comma, semicolon, tab, space, other
- mDelimiterBox = new QButtonGroup( i18n( "Delimiter" ), page );
+ mDelimiterBox = new Q3ButtonGroup( i18n( "Delimiter" ), page );
mDelimiterBox->setColumnLayout( 0, Qt::Vertical );
mDelimiterBox->layout()->setSpacing( spacingHint() );
mDelimiterBox->layout()->setMargin( marginHint() );
- QGridLayout *delimiterLayout = new QGridLayout( mDelimiterBox->layout() );
+ Q3GridLayout *delimiterLayout = new Q3GridLayout( mDelimiterBox->layout() );
delimiterLayout->setAlignment( Qt::AlignTop );
layout->addMultiCellWidget( mDelimiterBox, 1, 1, 0, 2 );
@@ -451,6 +455,6 @@ void CSVImportDialog::initGUI()
layout->addMultiCellWidget( mIgnoreDuplicates, 4, 4, 0, 2 );
- mTable = new QTable( 0, 0, page );
- mTable->setSelectionMode( QTable::NoSelection );
+ mTable = new Q3Table( 0, 0, page );
+ mTable->setSelectionMode( Q3Table::NoSelection );
//mTable->horizontalHeader()->hide();
layout->addMultiCellWidget( mTable, 5, 5, 0, 2 );
@@ -484,9 +488,9 @@ void CSVImportDialog::fillTable()
// store previous assignment
- QValueList<int> mTypeOld = mTypeStore;
+ Q3ValueList<int> mTypeOld = mTypeStore;
mTypeStore.clear();
for ( column = 0; column < mTable->numCols(); ++column ) {
- QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0, column ) );
+ Q3ComboTableItem *item = static_cast<Q3ComboTableItem*>( mTable->item( 0, column ) );
if ( !item || mClearTypeStore )
@@ -507,12 +511,12 @@ void CSVImportDialog::fillTable()
}
- QTextStream inputStream( mData, IO_ReadOnly );
+ Q3TextStream inputStream( mData, QIODevice::ReadOnly );
if ( mComboCodec->currentItem () == 0 ) {
- inputStream.setEncoding( QTextStream::UnicodeUTF8 );
+ inputStream.setEncoding( Q3TextStream::UnicodeUTF8 );
} else if ( mComboCodec->currentItem () == 1 ) {
- inputStream.setEncoding( QTextStream::Latin1 );
+ inputStream.setEncoding( Q3TextStream::Latin1 );
} else {
- inputStream.setEncoding( QTextStream::Locale );
+ inputStream.setEncoding( Q3TextStream::Locale );
}
@@ -527,5 +531,5 @@ void CSVImportDialog::fillTable()
if ( x == mTextQuote ) {
state = S_QUOTED_FIELD;
- } else if ( x == mDelimiter ) {
+ } else if ( QString(x) == mDelimiter ) {
if ( ( ignoreDups == false ) || ( lastCharDelimiter == false ) )
++column;
@@ -562,5 +566,5 @@ void CSVImportDialog::fillTable()
field += x;
state = S_QUOTED_FIELD;
- } else if ( x == mDelimiter || x == '\n' ) {
+ } else if ( QString(x) == mDelimiter || x == '\n' ) {
setText( row - mStartLine + 1, column, field );
field = "";
@@ -579,5 +583,5 @@ void CSVImportDialog::fillTable()
break;
case S_END_OF_QUOTED_FIELD :
- if ( x == mDelimiter || x == '\n' ) {
+ if ( QString(x) == mDelimiter || x == '\n' ) {
setText( row - mStartLine + 1, column, field );
field = "";
@@ -602,5 +606,5 @@ void CSVImportDialog::fillTable()
}
case S_NORMAL_FIELD :
- if ( x == mDelimiter || x == '\n' ) {
+ if ( QString(x) == mDelimiter || x == '\n' ) {
setText( row - mStartLine + 1, column, field );
field = "";
@@ -618,5 +622,5 @@ void CSVImportDialog::fillTable()
}
}
- if ( x != mDelimiter )
+ if ( QString(x) != mDelimiter )
lastCharDelimiter = false;
@@ -650,5 +654,5 @@ void CSVImportDialog::fillTable()
//US QComboTableItem *item = new QComboTableItem( mTable, mTypeMap.keys() );
- QComboTableItem *item = new QComboTableItem( mTable, keys );
+ Q3ComboTableItem *item = new Q3ComboTableItem( mTable, keys );
mTable->setItem( 0, column, item );
if ( column < mTypeStore.count() )
@@ -765,5 +769,5 @@ void CSVImportDialog::slotOk()
for ( int column = 0; column < mTable->numCols(); ++column ) {
- QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0,
+ Q3ComboTableItem *item = static_cast<Q3ComboTableItem*>( mTable->item( 0,
column ) );
if ( item && posToType( item->currentItem() ) != Undefined )
@@ -837,5 +841,5 @@ void CSVImportDialog::applyTemplate()
for ( uint column = 0; column < columnMap.count(); ++column ) {
int type = columnMap[ column ];
- QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0,
+ Q3ComboTableItem *item = static_cast<Q3ComboTableItem*>( mTable->item( 0,
column ) );
if ( item )
@@ -879,5 +883,5 @@ void CSVImportDialog::saveTemplate()
for ( uint column = 0; column < mTable->numCols(); ++column ) {
- QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0,
+ Q3ComboTableItem *item = static_cast<Q3ComboTableItem*>( mTable->item( 0,
column ) );
if ( item )
@@ -935,5 +939,5 @@ void CSVImportDialog::setFile( const QString &fileName )
QFile file( fileName );
- if ( !file.open( IO_ReadOnly ) ) {
+ if ( !file.open( QIODevice::ReadOnly ) ) {
KMessageBox::sorry( this, i18n( "Cannot open input file!" ) );
file.close();
@@ -965,5 +969,5 @@ void CSVImportDialog::urlChanged( const QString &file )
}
-#ifndef KAB_EMBEDDED
-#include <csvimportdialog.moc>
+#ifndef KAB_EMBEDDED_
+#include <moc_csvimportdialog.cpp>
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/xxport/csvimportdialog.h b/kaddressbook/xxport/csvimportdialog.h
index 2661420..520f3fa 100644
--- a/kaddressbook/xxport/csvimportdialog.h
+++ b/kaddressbook/xxport/csvimportdialog.h
@@ -34,9 +34,9 @@ $Id$
#include <kdialogbase.h>
-#include <qvaluelist.h>
+#include <q3valuelist.h>
class KURLRequester;
-class QButtonGroup;
+class Q3ButtonGroup;
class QComboBox;
class QCheckBox;
@@ -44,5 +44,5 @@ class QLineEdit;
class QPushButton;
class QRadioButton;
-class QTable;
+class Q3Table;
class CSVImportDialog : public KDialogBase
@@ -86,6 +86,6 @@ class CSVImportDialog : public KDialogBase
};
- QTable* mTable;
- QButtonGroup* mDelimiterBox;
+ Q3Table* mTable;
+ Q3ButtonGroup* mDelimiterBox;
QRadioButton* mRadioComma;
QRadioButton* mRadioSemicolon;
@@ -120,5 +120,5 @@ class CSVImportDialog : public KDialogBase
int mCustomCounter;
bool mClearTypeStore;
- QValueList<int> mTypeStore;
+ Q3ValueList<int> mTypeStore;
};
diff --git a/kaddressbook/xxport/kde2_xxport.cpp b/kaddressbook/xxport/kde2_xxport.cpp
index 03efc1b..72d3fc2 100644
--- a/kaddressbook/xxport/kde2_xxport.cpp
+++ b/kaddressbook/xxport/kde2_xxport.cpp
@@ -117,5 +117,5 @@ KABC::AddresseeList KDE2XXPort::importContacts( const QString& ) const
}
-#ifndef KAB_EMBEDDED
-#include "kde2_xxport.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_kde2_xxport.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/xxport/vcard_xxport.cpp b/kaddressbook/xxport/vcard_xxport.cpp
index 9a8fa68..64b9071 100644
--- a/kaddressbook/xxport/vcard_xxport.cpp
+++ b/kaddressbook/xxport/vcard_xxport.cpp
@@ -30,6 +30,8 @@
#include <qfile.h>
-#include <qtextstream.h>
+#include <q3textstream.h>
#include <qfileinfo.h>
+//Added by qt3to4:
+#include <Q3CString>
#include <kabc/vcardconverter.h>
@@ -103,5 +105,5 @@ bool VCardXXPort::exportContacts( const KABC::AddresseeList &list, const QString
QFile outFile( fileName );
- if ( !outFile.open( IO_WriteOnly ) ) {
+ if ( !outFile.open( QIODevice::WriteOnly ) ) {
QString text = i18n( "<qt>Unable to open file <b>%1</b> for export.</qt>" );
KMessageBox::error( parentWidget(), text.arg( fileName ) );
@@ -109,6 +111,6 @@ bool VCardXXPort::exportContacts( const KABC::AddresseeList &list, const QString
}
- QTextStream t( &outFile );
- t.setEncoding( QTextStream::UnicodeUTF8 );
+ Q3TextStream t( &outFile );
+ t.setEncoding( Q3TextStream::UnicodeUTF8 );
KABC::Addressee::List::ConstIterator it;
@@ -154,5 +156,5 @@ KABC::AddresseeList VCardXXPort::importContacts( const QString& ) const
QFile file( fileName );
- file.open( IO_ReadOnly );
+ file.open( QIODevice::ReadOnly );
QByteArray rawData = file.readAll();
file.close();
@@ -197,6 +199,6 @@ KABC::AddresseeList VCardXXPort::importContacts( const QString& ) const
}
QFile file( fileName );
- if ( file.open( IO_ReadOnly ) ) {
- QCString rawData ( file.readAll().data(),file.size()+1);
+ if ( file.open( QIODevice::ReadOnly ) ) {
+ Q3CString rawData ( file.readAll().data(),file.size()+1);
file.close();
int start = 0;
@@ -268,5 +270,5 @@ KABC::AddresseeList VCardXXPort::parseVCard( const QString &data ) const
-#ifndef KAB_EMBEDDED
-#include "vcard_xxport.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_vcard_xxport.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/xxportmanager.cpp b/kaddressbook/xxportmanager.cpp
index 405f7ec..95b240d 100644
--- a/kaddressbook/xxportmanager.cpp
+++ b/kaddressbook/xxportmanager.cpp
@@ -31,4 +31,6 @@ $Id$
#include <qlayout.h>
#include <qlist.h>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
#include <kabc/addressbook.h>
@@ -218,5 +220,5 @@ void XXPortManager::loadPlugins()
#else //KAB_EMBEDDED
- QList<XXPortFactory> factorylist;
+ QList<XXPortFactory*> factorylist;
factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_csv_xxport()));
factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_kde2_xxport()));
@@ -226,8 +228,6 @@ void XXPortManager::loadPlugins()
factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_sharpdtm_xxport()));
- QListIterator<XXPortFactory> it(factorylist);
- for ( ; it.current(); ++it )
- {
- XXPortFactory *xxportFactory = it.current();
+ for(QList<XXPortFactory*>::iterator it=factorylist.begin();it!=factorylist.end();++it) {
+ XXPortFactory *xxportFactory = *it;
#endif //KAB_EMBEDDED
@@ -251,5 +251,5 @@ PreviewDialog::PreviewDialog( const KABC::Addressee &addr, QWidget *parent,
{
QWidget *page = plainPage();
- QVBoxLayout *layout = new QVBoxLayout( page, marginHint(), spacingHint() );
+ Q3VBoxLayout *layout = new Q3VBoxLayout( page, marginHint(), spacingHint() );
connect( this, SIGNAL( user1Clicked() ), this, SLOT ( slotClose() ) );
connect( this, SIGNAL( user2Clicked() ), this, SLOT ( slotCancel() ) );
@@ -265,6 +265,5 @@ PreviewDialog::PreviewDialog( const KABC::Addressee &addr, QWidget *parent,
}
-#ifndef KAB_EMBEDDED
-#include "xxportmanager.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_xxportmanager.cpp"
#endif //KAB_EMBEDDED
-
diff --git a/kaddressbook/xxportmanager.h b/kaddressbook/xxportmanager.h
index e801d9b..0528922 100644
--- a/kaddressbook/xxportmanager.h
+++ b/kaddressbook/xxportmanager.h
@@ -33,5 +33,5 @@ $Id$
#define XXPORTMANAGER_H
-#include <qdict.h>
+#include <q3dict.h>
#include <qobject.h>
@@ -72,5 +72,5 @@ class XXPortManager : public QObject
void loadPlugins();
- QDict<XXPortObject> mXXPortObjects;
+ Q3Dict<XXPortObject> mXXPortObjects;
KABCore *mCore;
diff --git a/kaddressbook/xxportobject.cpp b/kaddressbook/xxportobject.cpp
index bd9d986..2d8d0ff 100644
--- a/kaddressbook/xxportobject.cpp
+++ b/kaddressbook/xxportobject.cpp
@@ -272,5 +272,5 @@ KABC::AddresseeList XXPortResourceObject::_importContacts( const QString& identi
-#ifndef KAB_EMBEDDED
-#include "xxportobject.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_xxportobject.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/xxportselectdialog.cpp b/kaddressbook/xxportselectdialog.cpp
index 278cab0..088bffa 100644
--- a/kaddressbook/xxportselectdialog.cpp
+++ b/kaddressbook/xxportselectdialog.cpp
@@ -37,14 +37,19 @@ $Id$
#include <qapplication.h>
-#include <qbuttongroup.h>
+#include <QDesktopWidget>
+#include <q3buttongroup.h>
#include <qcombobox.h>
-#include <qheader.h>
+#include <q3header.h>
#include <qlabel.h>
#include <qlayout.h>
-#include <qlistview.h>
+#include <q3listview.h>
#include <qpushbutton.h>
#include <qradiobutton.h>
#include <qstringlist.h>
-#include <qwhatsthis.h>
+#include <q3whatsthis.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
+#include <Q3Frame>
+#include <Q3VBoxLayout>
#include "kabcore.h"
@@ -63,6 +68,6 @@ XXPortSelectDialog::XXPortSelectDialog( KABCore *core, bool sort,
connect( mFiltersCombo, SIGNAL( activated( int ) ),
SLOT( filterChanged( int ) ) );
- connect( mCategoriesView, SIGNAL( clicked( QListViewItem* ) ),
- SLOT( categoryClicked( QListViewItem* ) ) );
+ connect( mCategoriesView, SIGNAL( clicked( Q3ListViewItem* ) ),
+ SLOT( categoryClicked( Q3ListViewItem* ) ) );
// setup filters
@@ -85,5 +90,5 @@ XXPortSelectDialog::XXPortSelectDialog( KABCore *core, bool sort,
QStringList::Iterator it;
for ( it = categories.begin(); it != categories.end(); ++it )
- new QCheckListItem( mCategoriesView, *it, QCheckListItem::CheckBox );
+ new Q3CheckListItem( mCategoriesView, *it, Q3CheckListItem::CheckBox );
mUseCategories->setEnabled( categories.count() > 0 );
@@ -211,7 +216,7 @@ QStringList XXPortSelectDialog::categories() const
QStringList list;
- QListViewItemIterator it( mCategoriesView );
+ Q3ListViewItemIterator it( mCategoriesView );
for ( ; it.current(); ++it ) {
- QCheckListItem* qcli = static_cast<QCheckListItem*>(it.current());
+ Q3CheckListItem* qcli = static_cast<Q3CheckListItem*>(it.current());
if ( qcli->isOn() )
list.append( it.current()->text( 0 ) );
@@ -226,7 +231,7 @@ void XXPortSelectDialog::filterChanged( int )
}
-void XXPortSelectDialog::categoryClicked( QListViewItem *i )
+void XXPortSelectDialog::categoryClicked( Q3ListViewItem *i )
{
- QCheckListItem *qcli = static_cast<QCheckListItem*>( i );
+ Q3CheckListItem *qcli = static_cast<Q3CheckListItem*>( i );
if ( qcli->isOn() )
mUseCategories->setChecked( true );
@@ -245,7 +250,7 @@ void XXPortSelectDialog::slotHelp()
void XXPortSelectDialog::initGUI()
{
- QFrame *page = plainPage();
+ Q3Frame *page = plainPage();
- QVBoxLayout *topLayout = new QVBoxLayout( page, KDialog::marginHintSmall(),
+ Q3VBoxLayout *topLayout = new Q3VBoxLayout( page, KDialog::marginHintSmall(),
KDialog::spacingHintSmall() );
@@ -253,29 +258,29 @@ void XXPortSelectDialog::initGUI()
topLayout->addWidget( label );
- mButtonGroup = new QButtonGroup( i18n( "Contact Selection" ), page );
+ mButtonGroup = new Q3ButtonGroup( i18n( "Contact Selection" ), page );
mButtonGroup->setColumnLayout( 0, Qt::Vertical );
mButtonGroup->layout()->setSpacing( KDialog::spacingHint() );
mButtonGroup->layout()->setMargin( KDialog::marginHint() );
- QGridLayout *groupLayout = new QGridLayout( mButtonGroup->layout() );
+ Q3GridLayout *groupLayout = new Q3GridLayout( mButtonGroup->layout() );
groupLayout->setAlignment( Qt::AlignTop );
mUseWholeBook = new QRadioButton( i18n( "&All" ), mButtonGroup );
mUseWholeBook->setChecked( true );
- QWhatsThis::add( mUseWholeBook, i18n( "Select the entire address book" ) );
+ Q3WhatsThis::add( mUseWholeBook, i18n( "Select the entire address book" ) );
groupLayout->addWidget( mUseWholeBook, 0, 0 );
mUseSelection = new QRadioButton( i18n( "&Selected" ), mButtonGroup );
- QWhatsThis::add( mUseSelection, i18n( "Only contacts selected in KAddressBook.\n"
+ Q3WhatsThis::add( mUseSelection, i18n( "Only contacts selected in KAddressBook.\n"
"This option is disabled if no contacts are selected." ) );
groupLayout->addWidget( mUseSelection, 1, 0 );
mUseFilters = new QRadioButton( i18n( "By matching &filter" ), mButtonGroup );
- QWhatsThis::add( mUseFilters, i18n( "Only contacts matching the selected filter.\n"
+ Q3WhatsThis::add( mUseFilters, i18n( "Only contacts matching the selected filter.\n"
"This option is disabled if you haven't defined any filters" ) );
groupLayout->addWidget( mUseFilters, 2, 0 );
mUseCategories = new QRadioButton( i18n( "By Cate&gories" ), mButtonGroup );
- QWhatsThis::add( mUseCategories, i18n( "Only contacts who are members of a category that is checked on the list to the left.\n"
+ Q3WhatsThis::add( mUseCategories, i18n( "Only contacts who are members of a category that is checked on the list to the left.\n"
"This option is disabled if you have no categories." ) );
groupLayout->addWidget( mUseCategories, 3, 0 );
@@ -283,11 +288,11 @@ void XXPortSelectDialog::initGUI()
mFiltersCombo = new QComboBox( false, mButtonGroup );
mFiltersCombo->setSizePolicy(QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- QWhatsThis::add( mFiltersCombo, i18n( "Select a filter to decide which contacts to select." ) );
+ Q3WhatsThis::add( mFiltersCombo, i18n( "Select a filter to decide which contacts to select." ) );
groupLayout->addWidget( mFiltersCombo, 2, 1 );
- mCategoriesView = new QListView( mButtonGroup );
+ mCategoriesView = new Q3ListView( mButtonGroup );
mCategoriesView->addColumn( "" );
mCategoriesView->header()->hide();
- QWhatsThis::add( mCategoriesView, i18n( "Check the categories whose members you want to select." ) );
+ Q3WhatsThis::add( mCategoriesView, i18n( "Check the categories whose members you want to select." ) );
groupLayout->addWidget( mCategoriesView, 3, 1 );
mCategoriesView->setSizePolicy(QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
@@ -296,7 +301,7 @@ void XXPortSelectDialog::initGUI()
topLayout->addWidget( mButtonGroup );
- QButtonGroup *sortingGroup = new QButtonGroup( i18n( "Sorting" ), page );
+ Q3ButtonGroup *sortingGroup = new Q3ButtonGroup( i18n( "Sorting" ), page );
sortingGroup->setColumnLayout( 0, Qt::Vertical );
- QGridLayout *sortLayout = new QGridLayout( sortingGroup->layout(), 2, 2,
+ Q3GridLayout *sortLayout = new Q3GridLayout( sortingGroup->layout(), 2, 2,
KDialog::spacingHint() );
sortLayout->setAlignment( Qt::AlignTop );
@@ -336,7 +341,5 @@ void XXPortSelectDialog::initGUI()
}
-#ifndef KAB_EMBEDDED
-#include "xxportselectdialog.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_xxportselectdialog.cpp"
#endif //KAB_EMBEDDED
-
-
diff --git a/kaddressbook/xxportselectdialog.h b/kaddressbook/xxportselectdialog.h
index 28b1fef..208f4f9 100644
--- a/kaddressbook/xxportselectdialog.h
+++ b/kaddressbook/xxportselectdialog.h
@@ -31,8 +31,8 @@
#include "filter.h"
-class QButtonGroup;
+class Q3ButtonGroup;
class QComboBox;
-class QListView;
-class QListViewItem;
+class Q3ListView;
+class Q3ListViewItem;
class QRadioButton;
@@ -54,5 +54,5 @@ class XXPortSelectDialog : public KDialogBase
private slots:
void filterChanged( int );
- void categoryClicked( QListViewItem * i );
+ void categoryClicked( Q3ListViewItem * i );
protected slots:
@@ -63,5 +63,5 @@ class XXPortSelectDialog : public KDialogBase
QStringList categories() const;
- QButtonGroup* mButtonGroup;
+ Q3ButtonGroup* mButtonGroup;
QRadioButton* mUseCategories;
QRadioButton* mUseFilters;
@@ -69,5 +69,5 @@ class XXPortSelectDialog : public KDialogBase
QRadioButton* mUseSelection;
QComboBox* mFiltersCombo;
- QListView* mCategoriesView;
+ Q3ListView* mCategoriesView;
KComboBox *mFieldCombo;