summaryrefslogtreecommitdiffabout
path: root/kaddressbook
Side-by-side diff
Diffstat (limited to 'kaddressbook') (more/less context) (ignore 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
@@ -22,24 +22,31 @@
without including the source code for Qt in the source distribution.
*/
-#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
#include <qtoolbutton.h>
@@ -67,9 +74,9 @@ 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 ) );
@@ -84,11 +91,11 @@ AddressEditWidget::AddressEditWidget( QWidget *parent, const char *name )
// layout->addWidget( mTypeCombo );
#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 );
#endif //KAB_EMBEDDED
@@ -126,13 +133,13 @@ void AddressEditWidget::setAddresses( const KABC::Addressee &addr,
// Insert types for existing numbers.
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 );
@@ -181,7 +188,7 @@ void AddressEditWidget::edit()
}
mConfig->setUid( mAddressee.uid() );
- QValueList<int> configList;
+ Q3ValueList<int> configList;
if ( !hasHome ) {
configList << KABC::Address::Home;
}
@@ -255,7 +262,7 @@ 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() );
mTypeCombo = new AddressTypeCombo( mAddressList, page );
@@ -266,9 +273,9 @@ AddressEditDialog::AddressEditDialog( const KABC::Address::List &list,
topLayout->addWidget( label, 1, 0 );
#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
@@ -311,14 +318,14 @@ AddressEditDialog::AddressEditDialog( const KABC::Address::List &list,
fillCountryCombo();
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 );
/*
KSeparator *sep = new KSeparator( KSeparator::HLine, page );
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 );
@@ -583,9 +590,9 @@ AddressTypeDialog::AddressTypeDialog( int type, QWidget *parent )
parent, "AddressTypeDialog" )
{
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 );
mTypeList = KABC::Address::typeList();
@@ -617,6 +624,6 @@ int AddressTypeDialog::type() const
return type;
}
-#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
@@ -33,13 +33,13 @@
#include "addresseeconfig.h"
#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;
@@ -81,9 +81,9 @@ class AddressEditWidget : public QWidget
QPushButton *mEditButton;
#ifndef KAB_EMBEDDED
- QTextEdit *mAddressTextEdit;
+ Q3TextEdit *mAddressTextEdit;
#else //KAB_EMBEDDED
- QMultiLineEdit *mAddressTextEdit;
+ Q3MultiLineEdit *mAddressTextEdit;
#endif //KAB_EMBEDDED
KABC::Address::List mAddressList;
@@ -120,9 +120,9 @@ 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;
KLineEdit *mRegionEdit;
@@ -151,7 +151,7 @@ class AddressTypeDialog : public KDialogBase
int type() const;
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
@@ -26,6 +26,8 @@
//US
#include <kstandarddirs.h>
#include <qfileinfo.h>
+//Added by qt3to4:
+#include <Q3ValueList>
using namespace KABC;
@@ -77,13 +79,13 @@ void AddresseeConfig::setAutomaticNameParsing( bool value )
KABPrefs::instance()->mAutomaticNameParsing );
}
-void AddresseeConfig::setNoDefaultAddrTypes( const QValueList<int> &types )
+void AddresseeConfig::setNoDefaultAddrTypes( const Q3ValueList<int> &types )
{
AddresseeConfig::config()->writeEntry( "NoDefaultAddrTypes", types );
AddresseeConfig::config()->sync();
}
- 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
@@ -26,6 +26,8 @@
#include <kabc/addressee.h>
#include <kconfig.h>
+//Added by qt3to4:
+#include <Q3ValueList>
using namespace KABC;
@@ -43,8 +45,8 @@ class AddresseeConfig
void setAutomaticNameParsing( bool value );
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
@@ -23,6 +23,9 @@
#include <qlayout.h>
#include <qapplication.h>
+#include <QDesktopWidget>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
#include <kdebug.h>
#include <klocale.h>
@@ -43,7 +46,7 @@ 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 );
connect( mEditorWidget, SIGNAL( modified( const KABC::Addressee::List& ) ),
@@ -118,6 +121,6 @@ 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
@@ -22,23 +22,27 @@
*/
#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>
#include <qapplication.h>
#ifndef KAB_EMBEDDED
-#include <qtextedit.h>
+#include <q3textedit.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
+#include <Q3PopupMenu>
+#include <Q3VBoxLayout>
#include <kaccelmanager.h>
#include "keywidget.h"
#include "soundwidget.h"
#else //KAB_EMBEDDED
-#include <qmultilineedit.h>
+#include <q3multilineedit.h>
#endif //KAB_EMBEDDED
@@ -130,7 +134,7 @@ void AddresseeEditorWidget::textChanged( const QString& )
void AddresseeEditorWidget::initGUI()
{
- QVBoxLayout *layout = new QVBoxLayout( this );
+ Q3VBoxLayout *layout = new Q3VBoxLayout( this );
mTabWidget = new QTabWidget( this );
layout->addWidget( mTabWidget );
@@ -160,7 +164,7 @@ void AddresseeEditorWidget::setupTab1()
horLayout = true;
maxCol = 3;
}
- QGridLayout *layout = new QGridLayout( tab1, 7-maxCol, maxCol );
+ Q3GridLayout *layout = new Q3GridLayout( tab1, 7-maxCol, maxCol );
layout->setMargin( KDialogBase::marginHintSmall() );
layout->setSpacing( KDialogBase::spacingHintSmall() );
@@ -327,7 +331,7 @@ void AddresseeEditorWidget::setupTab1()
layout->addMultiCellWidget( bar, 10, 10, 0, 6 );
*/
///////////////////////////////////////
- QHBox *categoryBox = new QHBox( tab1 ,"cato");
+ Q3HBox *categoryBox = new Q3HBox( tab1 ,"cato");
categoryBox->setSpacing( KDialogBase::spacingHint() );
categoryBox->setMargin( KDialogBase::marginHintSmall() );
@@ -337,7 +341,7 @@ 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()));
connect(mCatPopup,SIGNAL( activated ( int ) ), this ,SLOT(selectedCatPopup( int )));
@@ -411,7 +415,7 @@ void AddresseeEditorWidget::setupTab1_1()
QWidget *tab1_1 = new QWidget( mTabWidget );
//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() );
@@ -612,7 +616,7 @@ void AddresseeEditorWidget::setupTab2()
// This is the Details tab
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() );
@@ -691,7 +695,7 @@ void AddresseeEditorWidget::setupTab2()
int iii = 6;
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 );
connect( mNicknameEdit, SIGNAL( textChanged( const QString& ) ),
@@ -735,7 +739,7 @@ void AddresseeEditorWidget::setupTab2()
layout->addWidget( mChildEdit, iii, 2 );
++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 );
//mBirthdayPicker->toggleDateFormat();
@@ -804,7 +808,7 @@ void AddresseeEditorWidget::setupTab2_1()
// This is the Details tab
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() );
@@ -926,12 +930,12 @@ void AddresseeEditorWidget::setupTab2_1()
//US layout->addWidget( label, 7, 0 );
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
@@ -953,7 +957,7 @@ void AddresseeEditorWidget::setupTab3()
// This is the Misc tab
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() );
//US layout->setColStretch( 2, 1 );
@@ -1005,7 +1009,7 @@ void AddresseeEditorWidget::setupTab3_1()
QWidget *tab3 = new QWidget( mTabWidget );
//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() );
//US layout->setColStretch( 2, 1 );
@@ -1430,6 +1434,6 @@ QString AddresseeEditorWidget::identifier() const
return i18n( "contact_editor" );
}
-#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
@@ -25,7 +25,7 @@
#define ADDRESSEEEDITORWIDGET_H
#include <qdatetime.h>
-#include <qpopupmenu.h>
+#include <q3popupmenu.h>
#include <qcombobox.h>
#include <kabc/addressee.h>
@@ -40,9 +40,9 @@ class QSpinBox;
class QTabWidget;
#ifndef KAB_EMBEDDED
-class QTextEdit;
+class Q3TextEdit;
#else //KAB_EMBEDDED
-class QMultiLineEdit;
+class Q3MultiLineEdit;
#endif //KAB_EMBEDDED
class KComboBox;
@@ -155,7 +155,7 @@ class AddresseeEditorWidget : public ExtensionWidget
KLineEdit *mURLEdit;
KLineEdit *mIMAddressEdit;
QPushButton *mCategoryEdit;
- QPopupMenu *mCatPopup;
+ Q3PopupMenu *mCatPopup;
SecrecyWidget *mSecrecyWidget;
KSqueezedTextLabel *mNameLabel;
@@ -172,9 +172,9 @@ class AddresseeEditorWidget : public ExtensionWidget
KDateEdit *mBirthdayPicker;
KDateEdit *mAnniversaryPicker;
#ifndef KAB_EMBEDDED
- QTextEdit *mNoteEdit;
+ Q3TextEdit *mNoteEdit;
#else //KAB_EMBEDDED
- QMultiLineEdit *mNoteEdit;
+ Q3MultiLineEdit *mNoteEdit;
#endif //KAB_EMBEDDED
QSpinBox *mTimeZoneSpin;
diff --git a/kaddressbook/addresseeutil.cpp b/kaddressbook/addresseeutil.cpp
index 366384a..a860f6d 100644
--- a/kaddressbook/addresseeutil.cpp
+++ b/kaddressbook/addresseeutil.cpp
@@ -46,7 +46,7 @@ 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 );
KABC::Addressee::List addrList;
diff --git a/kaddressbook/addviewdialog.cpp b/kaddressbook/addviewdialog.cpp
index 6def26b..b52a83c 100644
--- a/kaddressbook/addviewdialog.cpp
+++ b/kaddressbook/addviewdialog.cpp
@@ -25,17 +25,19 @@
#endif //KAB_EMBEDDED
#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>
#include <kglobal.h>
#include "kaddressbookview.h"
#include "addviewdialog.h"
-AddViewDialog::AddViewDialog( QDict<ViewFactory> *viewFactoryDict,
+AddViewDialog::AddViewDialog( Q3Dict<ViewFactory> *viewFactoryDict,
QWidget *parent, const char *name )
: KDialogBase( KDialogBase::Plain, i18n( "Add View" ),
KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok,
@@ -48,7 +50,7 @@ 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 );
layout->setColStretch( 1, 1 );
@@ -61,12 +63,12 @@ AddViewDialog::AddViewDialog( QDict<ViewFactory> *viewFactoryDict,
SLOT( textChanged( const QString& ) ) );
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
//US new QRadioButton( (*iter)->type(), mTypeGroup );
@@ -113,6 +115,6 @@ void AddViewDialog::textChanged( const QString &text )
enableButton( KDialogBase::Ok, !text.isEmpty() );
}
-#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
@@ -25,11 +25,11 @@
#define ADDVIEWDIALOG_H
#include <kdialogbase.h>
-#include <qdict.h>
+#include <q3dict.h>
#include <qstring.h>
class ViewFactory;
-class QButtonGroup;
+class Q3ButtonGroup;
class QLineEdit;
@@ -43,7 +43,7 @@ class AddViewDialog : public KDialogBase
Q_OBJECT
public:
- AddViewDialog( QDict<ViewFactory> *viewFactoryDict, QWidget *parent,
+ AddViewDialog( Q3Dict<ViewFactory> *viewFactoryDict, QWidget *parent,
const char *name = 0 );
~AddViewDialog();
@@ -63,9 +63,9 @@ class AddViewDialog : public KDialogBase
void textChanged( const QString &text );
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
@@ -22,10 +22,13 @@
*/
#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>
#include <kdebug.h>
@@ -45,13 +48,13 @@
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() );
topLayout->setMargin( 0 );
topLayout->setSpacing( 0 );
- QBoxLayout *styleLayout = new QHBoxLayout( topLayout );
+ Q3BoxLayout *styleLayout = new Q3HBoxLayout( topLayout );
QLabel *label = new QLabel( i18n("Style:"), this );
styleLayout->addWidget( label );
@@ -59,12 +62,12 @@ ViewContainer::ViewContainer( QWidget *parent, const char* name )
mStyleCombo = new QComboBox( this );
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 );
registerLooks();
@@ -159,6 +162,6 @@ void ViewContainer::setReadOnly( bool state )
mCurrentLook->setReadOnly( 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
@@ -24,12 +24,12 @@
#ifndef DETAILSVIEWCONTAINER_H
#define DETAILSVIEWCONTAINER_H
-#include <qptrlist.h>
+#include <q3ptrlist.h>
#include "look_basic.h"
class QComboBox;
-class QWidgetStack;
+class Q3WidgetStack;
class ViewContainer : public QWidget
{
@@ -94,10 +94,10 @@ class ViewContainer : public QWidget
private:
KABC::Addressee mCurrentAddressee;
KABBasicLook *mCurrentLook;
- QPtrList<KABLookFactory> mLookFactories;
+ Q3PtrList<KABLookFactory> mLookFactories;
QComboBox *mStyleCombo;
- QWidgetStack *mDetailsStack;
+ Q3WidgetStack *mDetailsStack;
};
#endif
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
@@ -26,7 +26,7 @@
#include "look_basic.h"
KABBasicLook::KABBasicLook( QWidget *parent, const char *name )
- : QVBox( parent, name ), mReadOnly( false )
+ : Q3VBox( parent, name ), mReadOnly( false )
{
}
@@ -70,6 +70,6 @@ KABLookFactory::KABLookFactory( QWidget *parent, const char *name )
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
@@ -25,7 +25,7 @@
#define LOOK_KABBASIC_H
#include <kabc/addressbook.h>
-#include <qvbox.h>
+#include <q3vbox.h>
class KConfig;
@@ -41,7 +41,7 @@ class KConfig;
The paintEvent() has to paint the whole widget, since repaint()
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
@@ -189,10 +189,10 @@ 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 );
menuBG->insertItem( i18n( "Bordered Backgrounds" ), mMenuBorderedBG );
@@ -414,6 +414,6 @@ void KABDetailedView::restoreSettings( KConfig *config )
mPainter->setCommentFont( QFont( gfont, gpointsize, QFont::Normal, false ) );
}
-#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
@@ -130,8 +130,8 @@ class KABDetailedView : public KABBasicLook
QStringList mBorders;
QStringList mTiles;
- QPopupMenu *mMenuBorderedBG;
- QPopupMenu *mMenuTiledBG;
+ Q3PopupMenu *mMenuBorderedBG;
+ Q3PopupMenu *mMenuTiledBG;
static const QString mBorderedBGDir;
static const QString mTiledBGDir;
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
@@ -24,7 +24,7 @@
#include <addresseeview.h>
#include "look_html.h"
-#include <qscrollview.h>
+#include <q3scrollview.h>
#include "kabprefs.h"
#include <kabc/addresseeview.h>
KABHtmlView::KABHtmlView( QWidget *parent, const char *name )
@@ -51,6 +51,6 @@ void KABHtmlView::setAddressee( const KABC::Addressee &addr )
mView->setAddressee( 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
@@ -28,7 +28,9 @@
#include <qstring.h>
#include <qtoolbutton.h>
#include <qtooltip.h>
-#include <qlistbox.h>
+#include <q3listbox.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
#ifndef KAB_EMBEDDED
#include <kaccelmanager.h>
@@ -48,14 +50,14 @@
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 );
label->setPixmap( KGlobal::iconLoader()->loadIcon( "mail_send", KIcon::Desktop, 0) );
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 );
label = new QLabel( i18n( "Email:" ), this );
@@ -137,7 +139,7 @@ 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 );
topLayout->addWidget( label, 0, 0 );
@@ -154,7 +156,7 @@ EmailEditDialog::EmailEditDialog( const QStringList &list, QWidget *parent,
connect( mAddButton, SIGNAL( clicked() ), SLOT( add() ) );
topLayout->addWidget( mAddButton, 0, 2 );
- mEmailListBox = new QListBox( page );
+ mEmailListBox = new Q3ListBox( page );
// Make sure there is room for the scrollbar
mEmailListBox->setMinimumHeight( mEmailListBox->sizeHint().height() + 30 );
@@ -272,6 +274,6 @@ void EmailEditDialog::emailChanged()
mAddButton->setEnabled( !mEmailEdit->text().isEmpty() );
}
-#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
@@ -29,11 +29,11 @@
#include "addresseeconfig.h"
-class QButtonGroup;
+class Q3ButtonGroup;
class QCheckBox;
-class QListView;
-class QListBox;
-class QTextEdit;
+class Q3ListView;
+class Q3ListBox;
+class Q3TextEdit;
class QToolButton;
class KComboBox;
@@ -89,7 +89,7 @@ class EmailEditDialog : public KDialogBase
private:
KLineEdit *mEmailEdit;
- QListBox *mEmailListBox;
+ Q3ListBox *mEmailListBox;
QPushButton *mAddButton;
QPushButton *mRemoveButton;
QPushButton *mEditButton;
diff --git a/kaddressbook/extensionmanager.cpp b/kaddressbook/extensionmanager.cpp
index 46defa1..5356224 100644
--- a/kaddressbook/extensionmanager.cpp
+++ b/kaddressbook/extensionmanager.cpp
@@ -22,6 +22,8 @@
*/
#include <qlayout.h>
#include <qapplication.h>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
#include <kactionclasses.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -42,7 +44,7 @@
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
//US QPopupMenu *settingsmenu = (QPopupMenu*)mCore->getSettingsMenu();
@@ -58,7 +60,7 @@ ExtensionManager::ExtensionManager( KABCore *core, QWidget *parent,
connect( mActionExtensions, SIGNAL( activated( int ) ),
SLOT( setActiveExtension( int ) ) );
mWidgetBox = new QWidget( viewport() );
- new QHBoxLayout (mWidgetBox );
+ new Q3HBoxLayout (mWidgetBox );
addChild( mWidgetBox );
setResizePolicy(AutoOneFit);
createExtensionWidgets();
@@ -148,7 +150,7 @@ 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 )
mExtensionWidgetList.remove( wdg );
@@ -159,7 +161,7 @@ void ExtensionManager::createExtensionWidgets()
// add addressee editor as default
- QHBoxLayout *hbl = (QHBoxLayout *) mWidgetBox->layout();;
+ Q3HBoxLayout *hbl = (Q3HBoxLayout *) mWidgetBox->layout();;
wdg = new AddresseeEditorWidget( mCore, true, mWidgetBox );
hbl->addWidget( wdg );
@@ -244,6 +246,6 @@ void ExtensionManager::createExtensionWidgets()
mCurrentExtensionWidget = 0;
}
-#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
@@ -24,9 +24,9 @@
#ifndef EXTENSIONMANAGER_H
#define EXTENSIONMANAGER_H
-#include <qhbox.h>
-#include <qscrollview.h>
-#include <qptrlist.h>
+#include <q3hbox.h>
+#include <q3scrollview.h>
+#include <q3ptrlist.h>
#include <extensionwidget.h>
@@ -34,7 +34,7 @@ class KABCore;
class KSelectAction;
-class ExtensionManager : public QScrollView
+class ExtensionManager : public Q3ScrollView
{
Q_OBJECT
@@ -80,7 +80,7 @@ class ExtensionManager : public QScrollView
QWidget *mWidgetBox;
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
@@ -78,7 +78,6 @@ ConfigureWidget *ExtensionFactory::configureWidget( QWidget*, const char* )
return 0;
}
-#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
@@ -86,9 +86,9 @@ 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
#endif //KAB_EMBEDDED
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
@@ -21,13 +21,20 @@
without including the source code for Qt in the source distribution.
*/
-#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
#include <kaccelmanager.h>
@@ -77,12 +84,12 @@ 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 )
{
@@ -121,7 +128,7 @@ DistributionListWidget::DistributionListWidget( KABCore *core, QWidget *parent,
const char *name )
: 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() );
if (KGlobal::getOrientation() == KGlobal::Portrait)
@@ -166,8 +173,8 @@ DistributionListWidget::DistributionListWidget( KABCore *core, QWidget *parent,
topLayout->addMultiCellWidget( mContactView, 1, 1, 0, 3 );
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 );
topLayout->addWidget( mAddContactButton, 2, 0 );
@@ -410,7 +417,7 @@ QString DistributionListWidget::identifier() const
return "distribution_list_editor";
}
-void DistributionListWidget::dropped( QDropEvent *e, QListViewItem* )
+void DistributionListWidget::dropped( QDropEvent *e, Q3ListViewItem* )
{
dropEvent( e );
}
@@ -432,7 +439,7 @@ DistributionListView::DistributionListView( QWidget *parent, const char* name )
void DistributionListView::dragEnterEvent( QDragEnterEvent* e )
{
#ifndef KAB_EMBEDDED
- bool canDecode = QTextDrag::canDecode( e );
+ bool canDecode = Q3TextDrag::canDecode( e );
e->accept( canDecode );
#endif //KAB_EMBEDDED
}
@@ -440,7 +447,7 @@ void DistributionListView::dragEnterEvent( QDragEnterEvent* e )
void DistributionListView::viewportDragMoveEvent( QDragMoveEvent *e )
{
#ifndef KAB_EMBEDDED
- bool canDecode = QTextDrag::canDecode( e );
+ bool canDecode = Q3TextDrag::canDecode( e );
e->accept( canDecode );
#endif //KAB_EMBEDDED
}
@@ -461,10 +468,10 @@ EmailSelector::EmailSelector( const QStringList &emails,
: KDialogBase( KDialogBase::Plain, i18n("Select Email Address"), Ok, Ok,
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 );
@@ -479,7 +486,7 @@ EmailSelector::EmailSelector( const QStringList &emails,
QString EmailSelector::selected()
{
- QButton *button = mButtonGroup->selected();
+ QAbstractButton *button = mButtonGroup->selected();
if ( button )
return button->text();
@@ -496,6 +503,6 @@ 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
@@ -28,11 +28,16 @@
#include <klistview.h>
#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;
class KABCore;
@@ -57,7 +62,7 @@ class DistributionListWidget : public ExtensionWidget
public slots:
void save();
- void dropped( QDropEvent*, QListViewItem* );
+ void dropped( QDropEvent*, Q3ListViewItem* );
private slots:
void createList();
@@ -120,7 +125,7 @@ class EmailSelector : public KDialogBase
QWidget *parent );
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
@@ -23,6 +23,8 @@
#include <qlayout.h>
#include <qpushbutton.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
#ifndef KAB_EMBEDDED
#include <kaccelmanager.h>
@@ -63,11 +65,11 @@ 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();
KABC::Field::List::ConstIterator it;
@@ -94,7 +96,7 @@ MergeWidget::MergeWidget( KABCore *core, QWidget *parent, const char *name )
parent->setMaximumSize( KGlobal::getDesktopWidth() , 180);
#endif //KAB_EMBEDDED
- QGridLayout *topLayout = new QGridLayout( this, 3, 2, KDialog::marginHint(),
+ Q3GridLayout *topLayout = new Q3GridLayout( this, 3, 2, KDialog::marginHint(),
KDialog::spacingHint() );
mContactView = new KListView( this );
@@ -214,7 +216,7 @@ void MergeWidget::mergeAndRemove()
emit modified( retval );
mBlockUpdate = true;
- core()->deleteContacts( oldUID );
+ core()->deleteContacts( QStringList(oldUID) );
core()->setContactSelected( mMasterAddressee.uid() );
mBlockUpdate = false;
@@ -369,6 +371,6 @@ void MergeWidget::doMerge( const KABC::Addressee &addr )
mMasterAddressee.setCustoms( newCustoms );
}
-#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
@@ -29,7 +29,7 @@
#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
@@ -218,7 +218,7 @@ Filter::List Filter::restore( KConfig *config, QString baseGroup )
filter.noName = false;
filter.mName = *it;
filter.mEnabled = true;
- filter.mCategoryList = *it;
+ filter.mCategoryList = QStringList(*it);
filter.mMatchRule = Matching;
filter.mInternal = true;
list.append( filter );
diff --git a/kaddressbook/filter.h b/kaddressbook/filter.h
index f4ae123..508436d 100644
--- a/kaddressbook/filter.h
+++ b/kaddressbook/filter.h
@@ -26,7 +26,7 @@
#include <qstring.h>
#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <q3valuelist.h>
#include <kabc/addressee.h>
#include <kconfig.h>
@@ -42,7 +42,7 @@ class Filter
enum { ShowPublic = 1, ShowPrivate = 2, ShowConfidential = 4 };
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
@@ -28,8 +28,8 @@ Copyright (c) 2004 Ulf Schenk
$Id$
*/
-#include <qbuttongroup.h>
-#include <qhbox.h>
+#include <q3buttongroup.h>
+#include <q3hbox.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qpushbutton.h>
@@ -40,6 +40,8 @@ $Id$
#include <qtoolbutton.h>
#include <qtooltip.h>
#include <qwidget.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
#include <kapplication.h>
#include <kbuttonbox.h>
@@ -64,7 +66,7 @@ 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() );
}
@@ -77,10 +79,10 @@ void FilterEditDialog::setFilter( const Filter &filter )
mNameEdit->setText( filter.name() );
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 );
}
@@ -105,9 +107,9 @@ Filter FilterEditDialog::filter()
filter.setName( mNameEdit->text() );
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 ) );
@@ -141,7 +143,7 @@ void FilterEditDialog::initGUI()
QWidget *page = plainPage();
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 );
mNameEdit = new KLineEdit( page );
@@ -155,7 +157,7 @@ void FilterEditDialog::initGUI()
mCategoriesView->addColumn( i18n( "Categories" ) );
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 );
//mMatchRuleGroup->insert( radio );
@@ -164,7 +166,7 @@ void FilterEditDialog::initGUI()
//mMatchRuleGroup->insert( radio );
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 );
mConfidential = new QCheckBox( i18n( "confidential" ), mMatchPPCGroup );
@@ -272,7 +274,7 @@ void FilterDialog::refresh()
mFilterListBox->insertItem( (*iter).name() );
}
-void FilterDialog::selectionChanged( QListBoxItem *item )
+void FilterDialog::selectionChanged( Q3ListBoxItem *item )
{
bool state = ( item != 0 );
@@ -290,16 +292,16 @@ 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() ) );
mEditButton->setEnabled( false );
@@ -310,6 +312,6 @@ void FilterDialog::initGUI()
topLayout->addWidget( buttonBox, 0, 1 );
}
-#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
@@ -31,11 +31,11 @@ $Id$
#ifndef FILTEREDITDIALOG_H
#define FILTEREDITDIALOG_H
-class QButtonGroup;
+#include <Q3HButtonGroup>
class QString;
class QToolButton;
class QWidget;
-class QListBoxItem;
+class Q3ListBoxItem;
class QCheckBox;
class KLineEdit;
@@ -43,7 +43,6 @@ class KListBox;
class KListView;
#include <kdialogbase.h>
-#include <qhbuttongroup.h>
#include "filter.h"
@@ -62,7 +61,7 @@ class FilterDialog : public KDialogBase
void add();
void edit();
void remove();
- void selectionChanged( QListBoxItem* );
+ void selectionChanged( Q3ListBoxItem* );
private:
void initGUI();
@@ -98,7 +97,7 @@ class FilterEditDialog : public KDialogBase
KLineEdit *mNameEdit;
KListView *mCategoriesView;
- QHButtonGroup *mMatchRuleGroup;
+ Q3HButtonGroup *mMatchRuleGroup;
QCheckBox *mPrivate;
QCheckBox *mPublic;
QCheckBox *mConfidential;
diff --git a/kaddressbook/geowidget.cpp b/kaddressbook/geowidget.cpp
index 13cd084..caff3b2 100644
--- a/kaddressbook/geowidget.cpp
+++ b/kaddressbook/geowidget.cpp
@@ -27,10 +27,17 @@
#include <kaccelmanager.h>
#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>
#include <kdebug.h>
@@ -41,10 +48,10 @@
#include <qcheckbox.h>
#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>
#include <qpushbutton.h>
@@ -59,7 +66,7 @@ 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() );
@@ -69,7 +76,7 @@ GeoWidget::GeoWidget( QWidget *parent, const char *name )
label->setPixmap( KGlobal::iconLoader()->loadIcon( "package_network", KIcon::Desktop, 0 ) );
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 );
@@ -167,16 +174,16 @@ GeoDialog::GeoDialog( QWidget *parent, const char *name )
parent, name, true, true ),
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 );
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;
if ( QApplication::desktop()->width() < 320 ) {
@@ -429,8 +436,8 @@ 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;
QRegExp coord( "[+-]\\d+[+-]\\d+" );
@@ -552,7 +559,7 @@ int GeoDialog::nearestCity( double x, double y )
GeoMapWidget::GeoMapWidget( QWidget *parent, const char *name )
: QWidget( parent, name ), mLatitude( 0 ), mLongitude( 0 )
{
- setBackgroundMode( NoBackground );
+ setBackgroundMode( Qt::NoBackground );
setFixedSize( 240, 120 );
@@ -624,6 +631,6 @@ void GeoMapWidget::paintEvent( QPaintEvent* )
bitBlt( this, 0, 0, &world );
}
-#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
@@ -27,6 +27,10 @@
#include <qmap.h>
#include <qwidget.h>
+//Added by qt3to4:
+#include <QLabel>
+#include <QMouseEvent>
+#include <QPaintEvent>
#include <kdialogbase.h>
namespace KABC {
diff --git a/kaddressbook/imagewidget.cpp b/kaddressbook/imagewidget.cpp
index eec5e08..6ecf66d 100644
--- a/kaddressbook/imagewidget.cpp
+++ b/kaddressbook/imagewidget.cpp
@@ -37,23 +37,27 @@
#include <kurl.h>
#include <qcheckbox.h>
-#include <qgroupbox.h>
+#include <q3groupbox.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qpixmap.h>
#include <qpushbutton.h>
#include <qapplication.h>
+#include <QDesktopWidget>
+//Added by qt3to4:
+#include <Q3GridLayout>
+#include <Q3Frame>
#include "imagewidget.h"
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 );
@@ -63,7 +67,7 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name )
fac = 6;
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 );
mPhotoUrl = new KURLRequester( photoBox );
@@ -75,7 +79,7 @@ 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 );
boxLayout->addWidget( hb1, 1, 1 );
@@ -86,14 +90,14 @@ 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 );
mLogoLabel = new QLabel( logoBox );
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 );
mLogoUrl = new KURLRequester( logoBox );
@@ -104,7 +108,7 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name )
#endif //KAB_EMBEDDED
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 );
boxLayout->addWidget( hb2, 1, 1 );
@@ -180,7 +184,7 @@ KABC::Picture ImageWidget::photo() const
if ( mUsePhotoUrl->isChecked() )
photo.setUrl( mPhotoUrl->url() );
else {
- QPixmap *px = mPhotoLabel->pixmap();
+ const QPixmap *px = mPhotoLabel->pixmap();
if ( px ) {
#ifndef KAB_EMBEDDED
if ( px->height() > px->width() )
@@ -232,7 +236,7 @@ KABC::Picture ImageWidget::logo() const
if ( mUseLogoUrl->isChecked() )
logo.setUrl( mLogoUrl->url() );
else {
- QPixmap *px = mLogoLabel->pixmap();
+ const QPixmap *px = mLogoLabel->pixmap();
if ( px ) {
#ifndef KAB_EMBEDDED
if ( px->height() > px->width() )
@@ -292,6 +296,6 @@ QPixmap ImageWidget::loadPixmap( const QString &url )
return pixmap;
}
-#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
@@ -25,6 +25,9 @@
#define IMAGEWIDGET_H
#include <qwidget.h>
+//Added by qt3to4:
+#include <QPixmap>
+#include <QLabel>
#include <kabc/picture.h>
#include <kdialogbase.h>
diff --git a/kaddressbook/incsearchwidget.cpp b/kaddressbook/incsearchwidget.cpp
index 5f8b83d..a54d1cd 100644
--- a/kaddressbook/incsearchwidget.cpp
+++ b/kaddressbook/incsearchwidget.cpp
@@ -25,7 +25,10 @@
#include <qlayout.h>
#include <qtooltip.h>
#include <qapplication.h>
+#include <QDesktopWidget>
#include <qcombobox.h>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
#include <kdialog.h>
#include <klineedit.h>
@@ -37,17 +40,18 @@
#include "incsearchwidget.h"
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
@@ -176,6 +180,6 @@ 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
@@ -25,8 +25,11 @@
#include <qlayout.h>
#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>
#include <kabc/field.h>
@@ -73,9 +76,9 @@ 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 );
recreateButtons();
@@ -252,6 +255,6 @@ 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
@@ -26,11 +26,14 @@
#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;
class JumpButton;
@@ -76,9 +79,9 @@ class JumpButtonBar : public QWidget
KABCore *mCore;
- QGridLayout *mButtonLayout;
+ Q3GridLayout *mButtonLayout;
QStringList mCharacters;
- QPtrList<JumpButton> mButtons;
+ Q3PtrList<JumpButton> mButtons;
};
#endif
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index ab2824c..03b44d1 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -39,7 +39,17 @@ $Id$
#include <qlineedit.h>
#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>
#ifndef KAB_EMBEDDED
@@ -47,10 +57,10 @@ $Id$
#include <qdir.h>
#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>
#include <kabc/resource.h>
@@ -88,7 +98,7 @@ $Id$
//US
#include <addresseeview.h>
-#include <qapp.h>
+#include <qapplication.h>
#include <qmenubar.h>
//#include <qtoolbar.h>
#include <qmessagebox.h>
@@ -129,12 +139,12 @@ $Id$
#include <qmap.h>
#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>
#include <libkdepim/categoryeditdialog.h>
@@ -175,12 +185,12 @@ class KABCatPrefs : public QDialog
QDialog( parent, name, true )
{
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 ) ;
addCatBut = new QRadioButton(i18n("Add to category list"), format );
@@ -207,12 +217,12 @@ class KABFormatPrefs : public QDialog
QDialog( parent, name, true )
{
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 ) ;
simple = new QRadioButton(i18n("Simple: James Bond"), format );
@@ -245,29 +255,29 @@ class KAex2phonePrefs : public QDialog
QDialog( parent, name, true )
{
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);
lay->addWidget( temphb );
// mWriteToSim = new QCheckBox( i18n("Write Contacts to SIM card\n(if not, write to phone memory)"), this );
// 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 );
QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
@@ -407,7 +417,7 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const
//QTimer::singleShot( 10, this , SLOT ( updateToolBar()));
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() );
mCStringMess = cmsg;
@@ -421,9 +431,9 @@ void KABCore::loadDataAfterStart()
mViewManager->refreshView();
#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 );
#endif
@@ -453,11 +463,11 @@ KABCore::~KABCore()
delete infrared;
#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;
recieve( fileName );
@@ -480,7 +490,7 @@ void KABCore::toggleBeamReceive( )
mActionBR->setChecked(true);
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
}
@@ -560,7 +570,7 @@ void KABCore::restoreSettings()
if ( wid < 640 )
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 );
splitterSize.append( wid / 2 );
@@ -650,10 +660,10 @@ 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 ) {
++resIt;
@@ -795,14 +805,14 @@ 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;
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;
outFile.close();
@@ -1016,11 +1026,11 @@ 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();
Ir *ir = new Ir( this );
@@ -1297,10 +1307,10 @@ 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 ) {
++it;
@@ -1856,7 +1866,7 @@ void KABCore::slotEditorDestroyed( const QString &uid )
void KABCore::initGUI()
{
#ifndef KAB_EMBEDDED
- QHBoxLayout *topLayout = new QHBoxLayout( this );
+ Q3HBoxLayout *topLayout = new Q3HBoxLayout( this );
topLayout->setSpacing( KDialogBase::spacingHint() );
mExtensionBarSplitter = new QSplitter( this );
@@ -1864,7 +1874,7 @@ 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& ) ),
SLOT( incrementalSearch( const QString& ) ) );
@@ -1888,19 +1898,19 @@ void KABCore::initGUI()
#else //KAB_EMBEDDED
//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 );
// QBoxLayout *topLayout = (QBoxLayout*)layout();
@@ -1909,7 +1919,7 @@ void KABCore::initGUI()
// QBoxLayout * mainBoxLayout = new QHBoxLayout(mainBox);
#ifdef DESKTOP_VERSION
- topLayout = new QHBoxLayout( this );
+ topLayout = new Q3HBoxLayout( this );
mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this);
@@ -1924,12 +1934,12 @@ void KABCore::initGUI()
mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter );
#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 );
}
@@ -2034,17 +2044,17 @@ 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" );
mActionPrintDetails = new KAction( i18n( "&Print Details" ), "fileprint", 0, mDetails,
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" );
mActionMailVCard = new KAction(i18n("Mail &vCard..."), "mail_post_to", 0,
@@ -2083,22 +2093,22 @@ 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" );
} else {
@@ -2111,7 +2121,7 @@ void KABCore::initActions()
}
mActionDelete = new KAction( i18n( "&Delete Contact" ), "editdelete",
- Key_Delete, this, SLOT( deleteContacts() ),
+ Qt::Key_Delete, this, SLOT( deleteContacts() ),
actionCollection(), "edit_delete" );
mActionUndo->setEnabled( false );
@@ -2246,9 +2256,9 @@ void KABCore::addActionsManually()
//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart);
#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();
mMainWindow->setToolBarsMovable (false );
@@ -2276,7 +2286,7 @@ void KABCore::addActionsManually()
} else {
//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);
mIncSearchWidget = new IncSearchWidget( tb );
@@ -2631,7 +2641,7 @@ void KABCore::configureKeyBindings()
#ifdef KAB_EMBEDDED
void KABCore::configureResources()
{
- KRES::KCMKResources dlg( this, "" , 0 );
+ KRES::KCMKResources dlg( this, "" , QStringList() );
if ( !dlg.exec() )
return;
@@ -2727,7 +2737,7 @@ void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString
for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
++count;
}
- QProgressBar bar(count,0 );
+ Q3ProgressBar bar(count,0 );
int w = 300;
if ( QApplication::desktop()->width() < 320 )
w = 220;
@@ -2908,7 +2918,7 @@ KABC::Addressee KABCore::getLastSyncAddressee()
sum = "E: ";
lse.setFamilyName("!"+sum+mCurrentSyncDevice + i18n(" - sync event"));
lse.setRevision( mLastAddressbookSync );
- lse.setCategories( i18n("SyncEvent") );
+ lse.setCategories( QStringList(i18n("SyncEvent")) );
mAddressBook->insertAddressee( lse );
}
return lse;
@@ -3099,7 +3109,7 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo
addresseeRSync.setFamilyName(mCurrentSyncName + i18n(" - sync addressee"));
addresseeRSync.setUid("last-syncAddressee-"+mCurrentSyncName );
addresseeRSync.setRevision( mLastAddressbookSync );
- addresseeRSync.setCategories( i18n("SyncAddressee") );
+ addresseeRSync.setCategories( QStringList(i18n("SyncAddressee")) );
}
}
if ( addresseeLSync.revision() == mLastAddressbookSync ) {
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h
index ec6a9ec..4351720 100644
--- a/kaddressbook/kabcore.h
+++ b/kaddressbook/kabcore.h
@@ -28,11 +28,15 @@
#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
#include <qcopchannel_qws.h>
@@ -85,9 +89,9 @@ 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
/**
@@ -135,8 +139,8 @@ class KABCore : public QWidget, public KSyncInterface
#endif //KAB_EMBEDDED
#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
public slots:
@@ -366,8 +370,8 @@ class KABCore : public QWidget, public KSyncInterface
private slots:
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);
void setJumpButtonBarVisible( bool visible );
@@ -394,7 +398,7 @@ class KABCore : public QWidget, public KSyncInterface
void addressBookChanged();
private:
- QCString mCStringMess;
+ Q3CString mCStringMess;
QByteArray mByteData;
QString mEmailSourceChannel;
QString mEmailSourceUID;
@@ -486,14 +490,14 @@ 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;
KAction *mActionSetFormattedName;
@@ -524,7 +528,7 @@ class KABCore : public QWidget, public KSyncInterface
// LR *******************************
// sync stuff!
QString sentSyncFile();
- QPopupMenu *syncMenu;
+ Q3PopupMenu *syncMenu;
KSyncManager* syncManager;
int mGlobalSyncMode;
bool synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode);
diff --git a/kaddressbook/kabprefs.cpp b/kaddressbook/kabprefs.cpp
index 42d541b..6f9c995 100644
--- a/kaddressbook/kabprefs.cpp
+++ b/kaddressbook/kabprefs.cpp
@@ -25,7 +25,7 @@
//#include <qstring.h>
//#endif //KAB_EMBEDDED
-#include <qtextstream.h>
+#include <q3textstream.h>
#include <qfile.h>
#include <qregexp.h>
#include <stdlib.h>
@@ -91,7 +91,7 @@ KABPrefs::KABPrefs()
KPrefs::setCurrentGroup( "Views" );
QString defaultView = i18n( "Default Table View" );
addItemString( "CurrentView", &mCurrentView, defaultView );
- addItemStringList( "ViewNames", &mViewNames, defaultView );
+ addItemStringList( "ViewNames", &mViewNames, QStringList(defaultView) );
KPrefs::setCurrentGroup( "Filters" );
addItemInt( "CurrentFilter", &mCurrentFilter, 0 );
diff --git a/kaddressbook/kabprefs.h b/kaddressbook/kabprefs.h
index ddbc0c0..aff725e 100644
--- a/kaddressbook/kabprefs.h
+++ b/kaddressbook/kabprefs.h
@@ -25,7 +25,9 @@
#define KABPREFS_H
#include <qstringlist.h>
-#include <qdict.h>
+#include <q3dict.h>
+//Added by qt3to4:
+#include <Q3ValueList>
#include <libkdepim/kpimprefs.h>
@@ -73,8 +75,8 @@ class KABPrefs : public KPimPrefs
bool mAutoSearchWithWildcard;
bool mHideSearchOnSwitch;
bool mAskForDelete;
- QValueList<int> mExtensionsSplitter;
- QValueList<int> mDetailsSplitter;
+ Q3ValueList<int> mExtensionsSplitter;
+ Q3ValueList<int> mDetailsSplitter;
// Extensions stuff
int mCurrentExtension;
diff --git a/kaddressbook/kaddressbook.pro b/kaddressbook/kaddressbook.pro
index cd38e5f..4eb1f7f 100644
--- a/kaddressbook/kaddressbook.pro
+++ b/kaddressbook/kaddressbook.pro
@@ -13,28 +13,28 @@ 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
}
OBJECTS_DIR = obj/unix
@@ -43,10 +43,10 @@ MOC_DIR = moc/unix
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
MOC_DIR = moc/win
@@ -204,3 +204,5 @@ xxport/sharpdtm_xxport.cpp \
# calendarview.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
@@ -12,10 +12,10 @@ DEFINES += KAB_EMBEDDED KAB_NOSPLITTER
#DEFINES += KORG_NODND KORG_NOPLUGINS KORG_NOKABC KORG_NOARCHIVE KORG_NOMAIL
#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
LIBS += $(QTOPIALIB)
diff --git a/kaddressbook/kaddressbookmain.cpp b/kaddressbook/kaddressbookmain.cpp
index c417226..b317974 100644
--- a/kaddressbook/kaddressbookmain.cpp
+++ b/kaddressbook/kaddressbookmain.cpp
@@ -25,8 +25,11 @@
#include "kabprefs.h"
#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>
#include <kkeydialog.h>
@@ -42,18 +45,18 @@
#ifdef KAB_EMBEDDED
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
{
setIcon(SmallIcon( "ka24" ) );
#if 0
//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);
//US iconToolBar->setWidth(300);
@@ -85,7 +88,7 @@ KAddressBookMain::KAddressBookMain() : DCOPObject( "KAddressBookIface" ), KMainW
setAutoSaveSettings();
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
}
@@ -235,7 +238,6 @@ void KAddressBookMain::closeEvent( QCloseEvent* ce )
ce->accept();
}
-#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
@@ -24,10 +24,12 @@
#ifndef KADDRESSBOOKMAIN_H
#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>
#include <kmainwindow.h>
@@ -52,9 +54,9 @@ class KConfig;
#ifdef KAB_EMBEDDED
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
{
Q_OBJECT
@@ -73,9 +75,9 @@ class KAddressBookMain : public KMainWindow, virtual public KAddressBookIface
void showMinimized () ;
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();
virtual QString getNameByPhone( QString phone );
diff --git a/kaddressbook/kaddressbookview.cpp b/kaddressbook/kaddressbookview.cpp
index 86898e2..4823b37 100644
--- a/kaddressbook/kaddressbookview.cpp
+++ b/kaddressbook/kaddressbookview.cpp
@@ -32,6 +32,8 @@
#endif //KAB_EMBEDDED
#include <qlayout.h>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
#include <kabc/distributionlistdialog.h>
#include <kabc/addressbook.h>
@@ -133,7 +135,7 @@ KABC::Addressee::List KAddressBookView::addressees()
void KAddressBookView::initGUI()
{
// Create the layout
- QVBoxLayout *layout = new QVBoxLayout( this );
+ Q3VBoxLayout *layout = new Q3VBoxLayout( this );
// Add the view widget
mViewWidget = new QWidget( this );
@@ -183,6 +185,6 @@ 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,3 +1,5 @@
+//Added by qt3to4:
+#include <QDropEvent>
/*
This file is part of KAddressBook.
Copyright (c) 2002 Mike Pilone <mpilone@slac.com>
@@ -40,7 +42,7 @@ class QDropEvent;
#include "filter.h"
#ifdef DESKTOP_VERSION
-#include <qpaintdevicemetrics.h>
+#include <q3paintdevicemetrics.h>
#include <qprinter.h>
#include <qpainter.h>
#endif
@@ -175,9 +177,9 @@ class KAddressBookView : public QWidget
is equal to QString::null, then all addressees should be selected.
*/
#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 ???
virtual void setSelected( QString uid, bool selected) = 0;
@@ -262,9 +264,9 @@ 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
#endif //KAB_EMBEDDED
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
@@ -21,12 +21,16 @@
without including the source code for Qt in the source distribution.
*/
-#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>
#include <kcombobox.h>
@@ -45,13 +49,13 @@ 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() );
QLabel *label = new QLabel( i18n( title ), this );
layout->addWidget( label, 0, 1 );
- mBox = new QListBox( this );
+ mBox = new Q3ListBox( this );
mBox->setMaximumSize(70, 70);
layout->addMultiCellWidget( mBox, 0, 1, 0, 0 );
@@ -70,13 +74,13 @@ 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 );
@@ -97,8 +101,8 @@ NamePartWidget::NamePartWidget( const QString &title, QWidget *parent,
mRemoveButton->setEnabled( false );
- 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& ) ) );
connect( mEdit, SIGNAL( returnPressed() ), SLOT( add() ) );
@@ -143,7 +147,7 @@ void NamePartWidget::remove()
emit modified();
}
-void NamePartWidget::selectionChanged( QListBoxItem *item )
+void NamePartWidget::selectionChanged( Q3ListBoxItem *item )
{
mRemoveButton->setEnabled( item != 0 );
}
@@ -157,7 +161,7 @@ void NamePartWidget::textChanged( const QString& text )
AddresseeWidget::AddresseeWidget( QWidget *parent, const char *name )
: QWidget( parent, name )
{
- QGridLayout *layout;
+ Q3GridLayout *layout;
mPrefix = new NamePartWidget( i18n( "Prefixes" ), this );
mInclusion = new NamePartWidget( i18n( "Inclusions" ), this );
@@ -178,7 +182,7 @@ 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() );
layout->addMultiCellWidget( mPrefix, 0, 0, 0, 1 );
@@ -190,7 +194,7 @@ 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() );
layout->addWidget( mPrefix, 0, 0 );
@@ -233,6 +237,6 @@ void AddresseeWidget::saveSettings()
config.writeEntry( "FormattedNameType", mFormattedNameCombo->currentItem() );
}
-#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
@@ -29,8 +29,8 @@
class KComboBox;
class KLineEdit;
-class QListBox;
-class QListBoxItem;
+class Q3ListBox;
+class Q3ListBoxItem;
class QPushButton;
class NamePartWidget : public QWidget
@@ -52,13 +52,13 @@ class NamePartWidget : public QWidget
void add();
void remove();
- void selectionChanged( QListBoxItem* );
+ void selectionChanged( Q3ListBoxItem* );
void textChanged( const QString& );
private:
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
@@ -22,6 +22,9 @@
*/
#include <qlayout.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
+#include <Q3Frame>
#include <klocale.h>
@@ -34,8 +37,8 @@ ExtensionConfigDialog::ExtensionConfigDialog( ExtensionFactory *factory, KConfig
: KDialogBase( Plain, i18n( "Extension Settings" ), Ok | Cancel, Ok, parent,
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" );
layout->addWidget( mWidget, 0, 0 );
@@ -54,6 +57,6 @@ void ExtensionConfigDialog::slotOk()
KDialogBase::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
@@ -22,8 +22,8 @@
*/
#include <qcheckbox.h>
-#include <qframe.h>
-#include <qgroupbox.h>
+#include <q3frame.h>
+#include <q3groupbox.h>
#include <qlayout.h>
#include <qpushbutton.h>
#include <qtabwidget.h>
@@ -31,7 +31,11 @@
#include <qlineedit.h>
#include <qlabel.h>
#include <qfile.h>
-#include <qvbox.h>
+#include <q3vbox.h>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
+#include <Q3PtrList>
+#include <Q3VBoxLayout>
#include <kconfig.h>
#include <kdebug.h>
@@ -57,15 +61,15 @@
#include "kabconfigwidget.h"
#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
@@ -90,7 +94,7 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char *
: KPrefsWidget( prefs, parent, name )
{
- QVBoxLayout *topLayout = new QVBoxLayout( this, 0,
+ Q3VBoxLayout *topLayout = new Q3VBoxLayout( this, 0,
KDialog::spacingHintSmall() );
QTabWidget *tabWidget = new QTabWidget( this );
@@ -98,12 +102,12 @@ 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"),
&(KABPrefs::instance()->mDetailsFont),hBox);
@@ -117,7 +121,7 @@ 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() );
boxLayout->setSpacing( KDialog::spacingHintSmall() );
@@ -154,13 +158,13 @@ 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());
boxLayout->setSpacing(KDialog::spacingHintSmall());
@@ -189,10 +193,10 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char *
connect( mMultipleViewsAtOnce, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) );
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() ) );
@@ -295,8 +299,8 @@ 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() );
if ( item ) {
@@ -328,7 +332,7 @@ void KABConfigWidget::configureExtension()
config.sync();
}
-void KABConfigWidget::selectionChanged( QListViewItem *i )
+void KABConfigWidget::selectionChanged( Q3ListViewItem *i )
{
ExtensionItem *item = static_cast<ExtensionItem*>( i );
if ( !item )
@@ -337,15 +341,15 @@ void KABConfigWidget::selectionChanged( QListViewItem *i )
mConfigureButton->setEnabled( item->configWidgetAvailable() );
}
-void KABConfigWidget::itemClicked( QListViewItem *item )
+void KABConfigWidget::itemClicked( Q3ListViewItem *item )
{
if ( item != 0 )
modified();
}
#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 )
{
}
@@ -354,8 +358,8 @@ void ExtensionItem::setService( const KService::Ptr &ptr )
mPtr = 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;
mComment = comment;
@@ -418,7 +422,6 @@ QString ExtensionItem::text( int column ) const
#endif //KAB_EMBEDDED
}
-#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
@@ -27,7 +27,7 @@
#include <kprefswidget.h>
class QCheckBox;
-class QListViewItem;
+class Q3ListViewItem;
class QPushButton;
class QComboBox;
class QLineEdit;
@@ -53,8 +53,8 @@ class KABConfigWidget : public KPrefsWidget
private slots:
void configureExtension();
- void selectionChanged( QListViewItem* );
- void itemClicked( QListViewItem* );
+ void selectionChanged( Q3ListViewItem* );
+ void itemClicked( Q3ListViewItem* );
private:
void restoreExtensionSettings();
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
@@ -22,6 +22,8 @@
*/
#include <qlayout.h>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
#ifndef KAB_EMBEDDED
#include <kaboutdata.h>
@@ -48,7 +50,7 @@ KCMKabConfig::KCMKabConfig( QWidget *parent, const char *name )
: KCModule( KABPrefs::instance(), parent, name )
{
//abort();
- QVBoxLayout *layout = new QVBoxLayout( this );
+ Q3VBoxLayout *layout = new Q3VBoxLayout( this );
mConfigWidget = new KABConfigWidget( (KABPrefs*)getPreferences(), this, "KABConfigWidget" );
layout->addWidget( mConfigWidget );
layout->setSpacing( 0 );
@@ -87,6 +89,6 @@ 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
@@ -28,6 +28,8 @@
#include <qlabel.h>
#include <qlayout.h>
#include <qpushbutton.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
#ifndef KAB_EMBEDDED
#include <kaccelmanager.h>
@@ -36,7 +38,7 @@
#else //KAB_EMBEDDED
#include <qmap.h>
#include <qmessagebox.h>
-#include <qtextstream.h>
+#include <q3textstream.h>
#include <kurl.h>
#endif //KAB_EMBEDDED
@@ -52,7 +54,7 @@
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() );
QLabel *label = new QLabel( i18n( "Keys:" ), this );
@@ -136,7 +138,7 @@ void KeyWidget::addKey()
QString tmpFile;
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() ) );
return;
@@ -152,7 +154,7 @@ 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" ) );
QMessageBox::critical( this, caption, text.arg( keyfile ) );
@@ -163,10 +165,10 @@ void KeyWidget::addKey()
- QTextStream s( &file );
+ Q3TextStream s( &file );
QString data;
- s.setEncoding( QTextStream::UnicodeUTF8 );
+ s.setEncoding( Q3TextStream::UnicodeUTF8 );
s >> data;
file.close();
@@ -221,8 +223,8 @@ void KeyWidget::exportKey()
KURL url = KFileDialog::getSaveURL();
KTempFile tempFile;
- QTextStream *s = tempFile.textStream();
- s->setEncoding( QTextStream::UnicodeUTF8 );
+ Q3TextStream *s = tempFile.textStream();
+ s->setEncoding( Q3TextStream::UnicodeUTF8 );
(*s) << key.textData();
tempFile.close();
@@ -235,15 +237,15 @@ void KeyWidget::exportKey()
return;
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" ) );
QMessageBox::critical( this, caption, text.arg( keyfile ) );
return;
}
- QTextStream s( &file );
- s.setEncoding( QTextStream::UnicodeUTF8 );
+ Q3TextStream s( &file );
+ s.setEncoding( Q3TextStream::UnicodeUTF8 );
s << key.textData();
file.close();
@@ -272,6 +274,6 @@ void KeyWidget::updateKeyCombo()
mExportButton->setEnabled( state );
}
-#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
@@ -5,8 +5,7 @@
#else
#include <qapplication.h>
#include <qwindowsstyle.h>
-#include <qplatinumstyle.h>
-#include <qmainwindow.h>
+#include <q3mainwindow.h>
#include <qmessagebox.h>
#include <stdlib.h>
#endif
@@ -24,12 +23,12 @@
void dumpMissing();
int main( int argc, char **argv )
{
+ if(!getenv("QPEDIR")) putenv("QPEDIR=/usr/lib/kdepimpi");
#ifndef DESKTOP_VERSION
QPEApplication a( argc, argv );
a.setKeepRunning ();
#else
QApplication a( argc, argv );
- QApplication::setStyle( new QPlatinumStyle ());
#ifdef _WIN32_
QString hdir ( getenv( "HOME") );
if ( hdir.isEmpty() ) {
diff --git a/kaddressbook/nameeditdialog.cpp b/kaddressbook/nameeditdialog.cpp
index 199f3d6..96822d8 100644
--- a/kaddressbook/nameeditdialog.cpp
+++ b/kaddressbook/nameeditdialog.cpp
@@ -23,12 +23,14 @@
#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
#include <kaccelmanager.h>
@@ -57,7 +59,7 @@ 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 );
QLabel *label;
@@ -295,6 +297,6 @@ qDebug("NameEditDialog::slotHelp Help is not supported yet");
#endif //KAB_EMBEDDED
}
-#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
@@ -316,13 +316,13 @@ void MainWindow::initActions()
iconToolBar->clear();
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
@@ -27,13 +27,19 @@
#include <qpushbutton.h>
#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>
#include <klistview.h>
@@ -57,7 +63,7 @@
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 );
temp->setAlignment( Qt::AlignCenter );
@@ -67,14 +73,14 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name )
addBut->setMaximumSize( addBut->sizeHint().height(),addBut->sizeHint().height() );
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 );
gridLayout->setMargin( 2 );
@@ -90,7 +96,7 @@ 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();
int i = 0;
@@ -226,7 +232,7 @@ KABC::PhoneNumber::List PhoneEditWidget::phoneNumbers()
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() );
@@ -236,7 +242,7 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name )
//US loadIcon call is ambiguous. Add one more parameter
//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 );
@@ -327,7 +333,7 @@ void PhoneEditWidget::setPhoneNumbers( const KABC::PhoneNumber::List &list )
// Insert types for existing numbers.
mPrefCombo->insertTypeList( list );
- QValueList<int> defaultTypes;
+ Q3ValueList<int> defaultTypes;
defaultTypes << KABC::PhoneNumber::Home;
defaultTypes << KABC::PhoneNumber::Work;
defaultTypes << KABC::PhoneNumber::Cell;
@@ -337,7 +343,7 @@ void PhoneEditWidget::setPhoneNumbers( const KABC::PhoneNumber::List &list )
// Insert default types.
// 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 ) )
mPrefCombo->insertType( list, *it, PhoneNumber( "", *it ) );
@@ -487,10 +493,10 @@ 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 )
{
@@ -511,8 +517,8 @@ private:
KABC::PhoneNumber mPhoneNumber;
};
-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
setRenameEnabled ( 0, true );
@@ -544,7 +550,7 @@ 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() );
mListView = new KListView( page );
@@ -552,7 +558,7 @@ PhoneEditDialog::PhoneEditDialog( const KABC::PhoneNumber::List &list, QWidget *
mListView->addColumn( i18n( "Number" ) );
mListView->addColumn( i18n( "Type" ) );
- KButtonBox *buttonBox = new KButtonBox( page, Vertical );
+ KButtonBox *buttonBox = new KButtonBox( page, Qt::Vertical );
buttonBox->addButton( i18n( "&Add..." ), this, SLOT( slotAddPhoneNumber() ) );
mEditButton = buttonBox->addButton( i18n( "&Edit..." ), this, SLOT( slotEditPhoneNumber() ) );
@@ -565,7 +571,7 @@ PhoneEditDialog::PhoneEditDialog( const KABC::PhoneNumber::List &list, QWidget *
layout->addWidget( buttonBox, 0, 1 );
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;
for ( it = mPhoneNumberList.begin(); it != mPhoneNumberList.end(); ++it )
@@ -588,7 +594,7 @@ void PhoneEditDialog::slotAddPhoneNumber()
PhoneTypeDialog dlg( tmp, this );
if ( dlg.exec() ) {
- QListViewItem* i = mListView->firstChild();
+ Q3ListViewItem* i = mListView->firstChild();
KABC::PhoneNumber phoneNumber = dlg.phoneNumber();
bool insert = true;
while ( i ) {
@@ -620,7 +626,7 @@ void PhoneEditDialog::slotRemovePhoneNumber()
return;
mPhoneNumberList.remove( item->phoneNumber() );
- QListViewItem *currItem = mListView->currentItem();
+ Q3ListViewItem *currItem = mListView->currentItem();
mListView->takeItem( currItem );
delete currItem;
@@ -673,7 +679,7 @@ 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 );
layout->addWidget( label, 0, 0 );
@@ -683,7 +689,7 @@ PhoneTypeDialog::PhoneTypeDialog( const KABC::PhoneNumber &phoneNumber,
mPreferredBox = new QCheckBox( i18n( "This is the preferred phone number" ), page );
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 );
// fill widgets
@@ -726,6 +732,6 @@ KABC::PhoneNumber PhoneTypeDialog::phoneNumber()
return mPhoneNumber;
}
#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
@@ -27,16 +27,20 @@
#include <kiconloader.h>
#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;
@@ -76,15 +80,15 @@ class PhoneEditWidget : public QWidget
protected:
private:
- QScrollView* sv;
- QPopupMenu *mPopup;
+ Q3ScrollView* sv;
+ Q3PopupMenu *mPopup;
int mPopupCount;
PhoneTypeNumberEdit* mPendingDelete;
void setDefaults();
PhoneTypeNumberEdit* appendEditCombo();
QWidget* mw;
- QVBoxLayout* mainLayout;
- QPtrList <PhoneTypeNumberEdit> mTypeNumberEditList;
+ Q3VBoxLayout* mainLayout;
+ Q3PtrList <PhoneTypeNumberEdit> mTypeNumberEditList;
};
@@ -95,14 +99,14 @@ class PhoneTypeNumberEdit : public QWidget
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 );
mMinusButton = new QPushButton ( this );
mMinusButton->setPixmap ( SmallIcon("minus"));
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);
lay->addWidget( mMinusButton );
diff --git a/kaddressbook/secrecywidget.cpp b/kaddressbook/secrecywidget.cpp
index 4a2acc8..1c237c0 100644
--- a/kaddressbook/secrecywidget.cpp
+++ b/kaddressbook/secrecywidget.cpp
@@ -22,6 +22,8 @@
*/
#include <qlayout.h>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
#include <kabc/secrecy.h>
#include <kcombobox.h>
@@ -32,7 +34,7 @@
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 );
layout->addWidget( mSecrecyCombo );
@@ -65,6 +67,6 @@ KABC::Secrecy SecrecyWidget::secrecy() const
return secrecy;
}
-#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
@@ -114,6 +114,6 @@ void RedoStack::redo()
UndoStack::instance()->push( command );
}
-#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
@@ -25,7 +25,7 @@
#define UNDO_H
#include <qobject.h>
-#include <qptrstack.h>
+#include <q3ptrstack.h>
#include <qstring.h>
class Command
@@ -67,7 +67,7 @@ class StackBase : public QObject
*/
Command *pop();
- QPtrStack<Command> mCommandStack;
+ Q3PtrStack<Command> mCommandStack;
};
class UndoStack : public StackBase
diff --git a/kaddressbook/undocmds.cpp b/kaddressbook/undocmds.cpp
index 5807dc0..e900b00 100644
--- a/kaddressbook/undocmds.cpp
+++ b/kaddressbook/undocmds.cpp
@@ -21,7 +21,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qtextstream.h>
+#include <q3textstream.h>
#include <qapplication.h>
#include <qclipboard.h>
diff --git a/kaddressbook/viewconfigurefieldspage.cpp b/kaddressbook/viewconfigurefieldspage.cpp
index 5daae1a..7366a0b 100644
--- a/kaddressbook/viewconfigurefieldspage.cpp
+++ b/kaddressbook/viewconfigurefieldspage.cpp
@@ -36,20 +36,24 @@
#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 ) {}
KABC::Field *field() { return mField; }
@@ -106,7 +110,7 @@ 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 );
if ( (*it)->equals( fieldItem->field() ) )
@@ -189,7 +193,7 @@ 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 );
mSelectedBox->setCurrentItem( item );
@@ -201,7 +205,7 @@ 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 );
mSelectedBox->setCurrentItem( item );
@@ -219,11 +223,11 @@ 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
mCategoryCombo = new KComboBox( false, this );
@@ -249,20 +253,20 @@ void ViewConfigureFieldsPage::initGUI()
gl->addWidget( label, 2, 0 );
- mUnSelectedBox = new QListBox( this );
- mUnSelectedBox->setSelectionMode( QListBox::Extended );
+ mUnSelectedBox = new Q3ListBox( this );
+ mUnSelectedBox->setSelectionMode( Q3ListBox::Extended );
mUnSelectedBox->setMinimumHeight( 80 );
if (orientation == 0)
gl->addWidget( mUnSelectedBox, 1, 0 );
else
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 );
if (orientation == 0)
@@ -270,11 +274,11 @@ void ViewConfigureFieldsPage::initGUI()
else
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();
@@ -301,11 +305,11 @@ void ViewConfigureFieldsPage::initGUI()
else
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();
@@ -340,12 +344,12 @@ 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();
}
-#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
@@ -35,8 +35,8 @@ class KComboBox;
class QComboBox;
#endif //KAB_EMBEDDED
-class QListBox;
-class QListBoxItem;
+class Q3ListBox;
+class Q3ListBoxItem;
class QPushButton;
class QToolButton;
@@ -68,8 +68,8 @@ class ViewConfigureFieldsPage : public QWidget
#else //KAB_EMBEDDED
QComboBox *mCategoryCombo;
#endif //KAB_EMBEDDED
- QListBox *mSelectedBox;
- QListBox *mUnSelectedBox;
+ Q3ListBox *mSelectedBox;
+ Q3ListBox *mUnSelectedBox;
QToolButton *mAddButton;
QToolButton *mRemoveButton;
QToolButton *mUpButton;
diff --git a/kaddressbook/viewconfigurefilterpage.cpp b/kaddressbook/viewconfigurefilterpage.cpp
index b085a5e..cdb778b 100644
--- a/kaddressbook/viewconfigurefilterpage.cpp
+++ b/kaddressbook/viewconfigurefilterpage.cpp
@@ -27,10 +27,13 @@
#include <qcombobox.h>
#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>
#include <kdialog.h>
@@ -44,9 +47,9 @@ ViewConfigureFilterPage::ViewConfigureFilterPage( QWidget *parent,
const char *name )
: 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 ) ) );
QLabel *label = new QLabel( i18n( "The default filter will be activated whenever"
@@ -68,7 +71,7 @@ ViewConfigureFilterPage::ViewConfigureFilterPage( QWidget *parent,
mFilterGroup->insert( button );
topLayout->addWidget( button );
- QBoxLayout *comboLayout = new QHBoxLayout();
+ Q3BoxLayout *comboLayout = new Q3HBoxLayout();
topLayout->addLayout( comboLayout );
button = new QRadioButton( i18n( "Use filter:" ), this );
mFilterGroup->insert( button );
@@ -132,6 +135,6 @@ void ViewConfigureFilterPage::buttonClicked( int id )
mFilterCombo->setEnabled( id == 2 );
}
-#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
@@ -26,7 +26,7 @@
#include <qwidget.h>
-class QButtonGroup;
+class Q3ButtonGroup;
#ifndef KAB_EMBEDDED
class KComboBox;
@@ -57,7 +57,7 @@ class ViewConfigureFilterPage : public QWidget
QComboBox *mFilterCombo;
#endif //KAB_EMBEDDED
- QButtonGroup *mFilterGroup;
+ Q3ButtonGroup *mFilterGroup;
};
#endif
diff --git a/kaddressbook/viewconfigurewidget.cpp b/kaddressbook/viewconfigurewidget.cpp
index 666e188..047df8c 100644
--- a/kaddressbook/viewconfigurewidget.cpp
+++ b/kaddressbook/viewconfigurewidget.cpp
@@ -24,7 +24,7 @@
#ifndef KAB_EMBEDDED
-#include <qvbox.h>
+#include <q3vbox.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -37,6 +37,9 @@
#include <qlayout.h>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
+#include <QPixmap>
#include <kjanuswidget.h>
#include <kglobal.h>
@@ -50,14 +53,14 @@ ViewConfigureWidget::ViewConfigureWidget( KABC::AddressBook *ab, QWidget *parent
const char *name )
: ConfigureWidget( ab, parent, name )
{
- QVBoxLayout *topLayout = new QVBoxLayout( this );
+ Q3VBoxLayout *topLayout = new Q3VBoxLayout( this );
mMainWidget = new KJanusWidget( this, "JanusWidget", KJanusWidget::Tabbed );
topLayout->addWidget( mMainWidget );
// 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 ) );
@@ -93,13 +96,13 @@ void ViewConfigureWidget::saveSettings( KConfig *config )
mFilterPage->saveSettings( config );
}
-QVBox *ViewConfigureWidget::addPage( const QString &item, const QString &header,
+Q3VBox *ViewConfigureWidget::addPage( const QString &item, const QString &header,
const QPixmap &pixmap )
{
return mMainWidget->addVBoxPage( item, header, pixmap );
}
-#include <qframe.h>
+#include <q3frame.h>
#include <qlabel.h>
#include <qlayout.h>
#include <stdlib.h>
@@ -152,8 +155,6 @@ void ViewConfigureDialog::slotHelp()
#endif //KAB_EMBEDDED
}
-#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
@@ -28,7 +28,7 @@
#include "configurewidget.h"
-class QVBox;
+class Q3VBox;
#include <kdialogbase.h>
#include <qpixmap.h>
@@ -74,7 +74,7 @@ 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() );
private:
diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp
index b5d9419..5cfe3ad 100644
--- a/kaddressbook/viewmanager.cpp
+++ b/kaddressbook/viewmanager.cpp
@@ -50,7 +50,10 @@ $Id$
#include <qaction.h>
#include <qmessagebox.h>
-#include <qpopupmenu.h>
+#include <q3popupmenu.h>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
+#include <QDropEvent>
#include <kconfigbase.h>
#endif //KAB_EMBEDDED
@@ -61,7 +64,8 @@ $Id$
#include <qlayout.h>
#include <qapplication.h>
-#include <qwidgetstack.h>
+#include <QDesktopWidget>
+#include <q3widgetstack.h>
#include <kabc/addressbook.h>
#include "filtereditdialog.h"
@@ -117,7 +121,7 @@ void ViewManager::restoreSettings()
// been modified by global settings
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() );
it.current()->readConfig( mCore->config() );
@@ -131,7 +135,7 @@ 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() );
#ifdef DESKTOP_VERSION
@@ -161,7 +165,7 @@ QStringList ViewManager::selectedUids() const
QStringList ViewManager::selectedEmails() const
{
if ( mActiveView )
- return mActiveView->selectedEmails();
+ return QStringList(mActiveView->selectedEmails());
else
return QStringList();
}
@@ -556,7 +560,7 @@ void ViewManager::startDrag()
addrList.append( mCore->addressBook()->findByUid( *iter ) );
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;
for ( it = addrList.begin(); it != addrList.end(); ++it ) {
@@ -659,9 +663,9 @@ void ViewManager::initActions()
//US <Separator/>
#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
mActionSelectView = new KSelectAction( i18n( "Select View" ), 0, mCore->actionCollection(), "select_view" );
@@ -738,11 +742,11 @@ 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
@@ -26,15 +26,17 @@
#include <qwidget.h>
#include <qstringlist.h>
+//Added by qt3to4:
+#include <QDropEvent>
#include <kaddressbookview.h>
-#include <qdict.h>
+#include <q3dict.h>
#include "filter.h"
class KAction;
class KSelectAction;
class KABCore;
-class QWidgetStack;
+class Q3WidgetStack;
class QDropEvent;
namespace KABC { class AddressBook; }
@@ -145,11 +147,11 @@ class ViewManager : public QWidget
Filter mCurrentFilter;
Filter::List mFilterList;
- QDict<KAddressBookView> mViewDict;
- QDict<ViewFactory> mViewFactoryDict;
+ Q3Dict<KAddressBookView> mViewDict;
+ Q3Dict<ViewFactory> mViewFactoryDict;
QStringList mViewNameList;
- QWidgetStack *mViewWidgetStack;
+ Q3WidgetStack *mViewWidgetStack;
KAddressBookView *mActiveView;
KAction *mActionDeleteView;
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
@@ -34,6 +34,14 @@
#include <qcursor.h>
#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"
#include <kdebug.h>
@@ -71,11 +79,11 @@ class CardViewTip : public QLabel {
// Warning: make sure you use findRef() instead of find() to find an
// 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;
CardViewItem *cItem2 = (CardViewItem*)item2;
@@ -161,7 +169,7 @@ class CardViewPrivate
{};
CardViewItemList mItemList;
- QPtrList<CardViewSeparator> mSeparatorList;
+ Q3PtrList<CardViewSeparator> mSeparatorList;
QFontMetrics *mFm;
QFontMetrics *mBFm; // bold font
QFont mHeaderFont; // custom header font
@@ -208,7 +216,7 @@ class CardViewItemPrivate
QString mCaption;
- QPtrList< CardViewItem::Field > mFieldList;
+ Q3PtrList< CardViewItem::Field > mFieldList;
bool mSelected;
int x; // horizontal position, set by the view
int y; // vertical position, set by the view
@@ -313,7 +321,7 @@ void CardViewItem::paintCard(QPainter *p, QColorGroup &cg)
p->restore();
// 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)
p->setPen(cg.text());
@@ -408,12 +416,12 @@ int CardViewItem::height( bool allowCache ) const
int fieldHeight = 0;
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;
}
@@ -450,7 +458,7 @@ 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)
{
f = *iter;
@@ -523,7 +531,7 @@ 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)
return (*iter)->second;
@@ -569,7 +577,7 @@ void CardViewItem::showFullString( const QPoint &itempos, CardViewTip *tip )
Field *_f;
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 )
return;
@@ -586,7 +594,7 @@ void CardViewItem::showFullString( const QPoint &itempos, CardViewTip *tip )
trimmed = mView->d->mFm->width( s ) > mw - colonWidth;
} 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);
}
}
if ( trimmed )
@@ -626,7 +634,7 @@ CardViewItem::Field *CardViewItem::fieldAt( const QPoint & itempos ) const
for ( f = d->mFieldList.first(); f; f = d->mFieldList.next() )
{
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;
}
@@ -637,7 +645,7 @@ CardViewItem::Field *CardViewItem::fieldAt( const QPoint & itempos ) const
//BEGIN CardView
CardView::CardView(QWidget *parent, const char *name)
- : QScrollView(parent, name),
+ : Q3ScrollView(parent, name),
d(new CardViewPrivate())
{
mFlagKeyPressed = false;
@@ -656,13 +664,13 @@ 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
setVScrollBarMode(AlwaysOff);
@@ -739,7 +747,7 @@ void CardView::setCurrentItem( CardViewItem *item )
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)
{
@@ -787,7 +795,7 @@ CardView::SelectionMode CardView::selectionMode() const
void CardView::selectAll(bool state)
{
- QPtrListIterator<CardViewItem> iter(d->mItemList);
+ Q3PtrListIterator<CardViewItem> iter(d->mItemList);
if (!state)
{
for (iter.toFirst(); iter.current(); ++iter)
@@ -878,7 +886,7 @@ bool CardView::isSelected(CardViewItem *item) const
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)
{
if ((*iter)->isSelected())
@@ -955,7 +963,7 @@ void CardView::drawContents(QPainter *p, int clipx, int clipy,
viewport()->erase( QRect ( cX, cY , clipw, cliph ) );
// 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)
{
item = *iter;
@@ -975,7 +983,7 @@ 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)
{
sep = *sepIter;
@@ -993,7 +1001,7 @@ void CardView::drawContents(QPainter *p, int clipx, int clipy,
void CardView::resizeEvent(QResizeEvent *e)
{
- QScrollView::resizeEvent(e);
+ Q3ScrollView::resizeEvent(e);
setLayoutDirty(true);
}
@@ -1013,7 +1021,7 @@ void CardView::calcLayout()
// delete the old separators
d->mSeparatorList.clear();
- QPtrListIterator<CardViewItem> iter(d->mItemList);
+ Q3PtrListIterator<CardViewItem> iter(d->mItemList);
CardViewItem *item = 0;
CardViewSeparator *sep = 0;
xPos += cardSpacing;
@@ -1056,7 +1064,7 @@ 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)
{
(*sepIter)->mRect.setHeight(maxHeight - 2*cardSpacing - 2*d->mItemMargin);
@@ -1101,7 +1109,7 @@ void CardView::setItemSpacing( uint spacing )
void CardView::contentsMousePressEvent(QMouseEvent *e)
{
- QScrollView::contentsMousePressEvent(e);
+ Q3ScrollView::contentsMousePressEvent(e);
QPoint pos = e->pos();
d->mLastClickPos = pos;
@@ -1171,7 +1179,7 @@ void CardView::contentsMousePressEvent(QMouseEvent *e)
bool s = ! item->isSelected();
- if ( s && ! (e->state() & ControlButton) )
+ if ( s && ! (e->state() & Qt::ControlButton) )
{
bool b = signalsBlocked();
blockSignals(true);
@@ -1219,7 +1227,7 @@ void CardView::contentsMousePressEvent(QMouseEvent *e)
void CardView::contentsMouseReleaseEvent(QMouseEvent *e)
{
- QScrollView::contentsMouseReleaseEvent(e);
+ Q3ScrollView::contentsMouseReleaseEvent(e);
if ( d->mResizeAnchor )
{
@@ -1257,7 +1265,7 @@ void CardView::contentsMouseReleaseEvent(QMouseEvent *e)
void CardView::contentsMouseDoubleClickEvent(QMouseEvent *e)
{
- QScrollView::contentsMouseDoubleClickEvent(e);
+ Q3ScrollView::contentsMouseDoubleClickEvent(e);
CardViewItem *item = itemAt(e->pos());
@@ -1302,12 +1310,12 @@ void CardView::contentsMouseMoveEvent( QMouseEvent *e )
int m = e->x()%colw;
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;
}
}
@@ -1324,7 +1332,7 @@ void CardView::leaveEvent( QEvent * )
if (d->mOnSeparator)
{
d->mOnSeparator = false;
- setCursor( ArrowCursor );
+ setCursor( Qt::ArrowCursor );
}
}
@@ -1368,21 +1376,21 @@ void CardView::keyPressEvent( QKeyEvent *e )
switch ( e->key() )
{
- case Key_Up:
+ case Qt::Key_Up:
if ( pos > 0 )
{
aItem = d->mItemList.at( pos - 1 );
setCurrentItem( aItem );
}
break;
- case Key_Down:
+ case Qt::Key_Down:
if ( pos < d->mItemList.count() - 1 )
{
aItem = d->mItemList.at( pos + 1 );
setCurrentItem( aItem );
}
break;
- case Key_Left:
+ case Qt::Key_Left:
{
// look for an item in the previous/next column, starting from
// the vertical middle of the current item.
@@ -1400,7 +1408,7 @@ void CardView::keyPressEvent( QKeyEvent *e )
setCurrentItem( aItem );
}
break;
- case Key_Right:
+ case Qt::Key_Right:
{
// FIXME use nice calculated measures!!!
QPoint aPoint( d->mCurrentItem->d->x + d->mItemWidth, d->mCurrentItem->d->y );
@@ -1415,15 +1423,15 @@ void CardView::keyPressEvent( QKeyEvent *e )
setCurrentItem( aItem );
}
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"
// TODO if contentsY(), pick the top item of the leftmost visible column
@@ -1436,7 +1444,7 @@ void CardView::keyPressEvent( QKeyEvent *e )
setCurrentItem( aItem );
}
break;
- case Key_Next: // PageDown
+ case Qt::Key_Next: // PageDown
{
// QListView: "Make the item below the bottom visible and current"
// find the first not fully visible column.
@@ -1458,19 +1466,19 @@ void CardView::keyPressEvent( QKeyEvent *e )
setCurrentItem( aItem );
}
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 );
emit executed( d->mCurrentItem );
}
break;
default:
- if ( (e->state() & ControlButton) && e->key() == Key_A )
+ if ( (e->state() & Qt::ControlButton) && e->key() == Qt::Key_A )
{
// select all
selectAll( true );
@@ -1488,7 +1496,7 @@ void CardView::keyPressEvent( QKeyEvent *e )
{
if ( d->mSelectionMode == CardView::Extended )
{
- if ( (e->state() & ShiftButton) )
+ if ( (e->state() & Qt::ShiftButton) )
{
// shift button: toggle range
// if control button is pressed, leave all items
@@ -1519,7 +1527,7 @@ void CardView::keyPressEvent( QKeyEvent *e )
}
emit selectionChanged();
}
- else if ( (e->state() & ControlButton) )
+ else if ( (e->state() & Qt::ControlButton) )
{
// control button: do nothing
}
@@ -1638,9 +1646,9 @@ void CardView::drawRubberBands( int pos )
int h = visibleHeight();
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
if ( d->mRubberBandAnchor )
@@ -1699,7 +1707,7 @@ QFont CardView::headerFont() const
void CardView::setFont( const QFont &fnt )
{
- QScrollView::setFont( fnt );
+ Q3ScrollView::setFont( fnt );
delete d->mFm;
d->mFm = new QFontMetrics( fnt );
}
@@ -1736,7 +1744,7 @@ void CardView::keyReleaseEvent ( QKeyEvent * e )
mFlagBlockKeyPressed = false;
mFlagKeyPressed = false;
}
- QScrollView::keyReleaseEvent ( e );
+ Q3ScrollView::keyReleaseEvent ( e );
}
@@ -1745,6 +1753,6 @@ 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
@@ -1,12 +1,20 @@
#ifndef CARDVIEW_H
#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;
class QPainter;
@@ -148,7 +156,7 @@ class CardViewItem
* can be used elsewhere. With the exception of a few simple config checks,
* 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
@@ -19,6 +19,11 @@
*/
#include <qpainter.h>
+//Added by qt3to4:
+#include <QDragEnterEvent>
+#include <QDropEvent>
+#include <QDragMoveEvent>
+#include <QDragLeaveEvent>
#include <kcolordialog.h>
@@ -31,11 +36,11 @@
#include <qcolordialog.h>
#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);
}
@@ -47,7 +52,7 @@ void ColorListBox::setEnabled( bool state )
return;
}
- QListBox::setEnabled( state );
+ Q3ListBox::setEnabled( state );
for( uint i=0; i<count(); i++ )
{
updateItem( i );
@@ -75,10 +80,10 @@ QColor ColorListBox::color( uint index ) const
}
else
{
- return( black );
+ return( Qt::black );
}
}
-void ColorListBox::slotNewColor(QListBoxItem * i)
+void ColorListBox::slotNewColor(Q3ListBoxItem * i)
{
if ( i )
newColor( index( i ) );
@@ -198,7 +203,7 @@ 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 );
}
@@ -229,17 +234,17 @@ void ColorListItem::paint( QPainter *p )
}
-int ColorListItem::height(const QListBox *lb ) const
+int ColorListItem::height(const Q3ListBox *lb ) const
{
return( lb->fontMetrics().lineSpacing()+1 );
}
-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
@@ -22,6 +22,11 @@
#define _COLOR_LISTBOX_H_
#include <klistbox.h>
+//Added by qt3to4:
+#include <QDragMoveEvent>
+#include <QDragLeaveEvent>
+#include <QDropEvent>
+#include <QDragEnterEvent>
class QDragEnterEvent;
class QDragLeaveEvent;
@@ -33,7 +38,7 @@ class ColorListBox : public KListBox
Q_OBJECT
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;
@@ -48,7 +53,7 @@ class ColorListBox : public KListBox
private slots:
void newColor( int index );
- void slotNewColor(QListBoxItem * i);
+ void slotNewColor(Q3ListBoxItem * i);
private:
int mCurrentOnDragEnter;
@@ -56,7 +61,7 @@ class ColorListBox : public KListBox
};
-class ColorListItem : public QListBoxItem
+class ColorListItem : public Q3ListBoxItem
{
public:
ColorListItem( const QString &text, const QColor &color=Qt::black );
@@ -65,8 +70,8 @@ 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:
QColor mColor;
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
@@ -25,11 +25,14 @@
#include <qlayout.h>
#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>
#include <kglobal.h>
@@ -89,7 +92,7 @@ void ConfigureCardViewWidget::saveSettings( KConfig *config )
////////////////////////
// CardViewLookNFeelPage
CardViewLookNFeelPage::CardViewLookNFeelPage( QWidget *parent, const char *name )
- : QVBox( parent, name )
+ : Q3VBox( parent, name )
{
initGUI();
}
@@ -234,28 +237,28 @@ void CardViewLookNFeelPage::initGUI()
QTabWidget *tabs = new QTabWidget( this );
// 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 );
lMargin->setBuddy( sbMargin );
@@ -264,23 +267,23 @@ 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 );
cbEnableCustomColors = new QCheckBox( i18n("&Enable custom Colors"), colorTab );
@@ -288,16 +291,16 @@ void CardViewLookNFeelPage::initGUI()
lbColors = new ColorListBox( colorTab );
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 );
fntTab->setMargin( spacing );
@@ -306,13 +309,13 @@ void CardViewLookNFeelPage::initGUI()
connect( cbEnableCustomFonts, SIGNAL(clicked()), this, SLOT(enableFonts()) );
vbFonts = new QWidget( fntTab );
- QGridLayout *gFnts = new QGridLayout( vbFonts, 2, 3 );
+ Q3GridLayout *gFnts = new Q3GridLayout( vbFonts, 2, 3 );
gFnts->setSpacing( spacing );
gFnts->setAutoAdd( true );
gFnts->setColStretch( 1, 1 );
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 );
#else //KAB_EMBEDDED
@@ -325,7 +328,7 @@ 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 );
#else //KAB_EMBEDDED
@@ -336,7 +339,7 @@ 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 "
"normal style for the data."
@@ -345,7 +348,7 @@ void CardViewLookNFeelPage::initGUI()
tabs->addTab( fntTab, i18n("&Fonts") );
// Behaviour
- QVBox *behaviourTab = new QVBox( this );
+ Q3VBox *behaviourTab = new Q3VBox( this );
behaviourTab->setMargin( margin );
behaviourTab->setSpacing( spacing );
@@ -364,6 +367,6 @@ void CardViewLookNFeelPage::updateFontLabel( QFont fnt, QLabel *l )
l->setText( QString( fnt.family() + " %1" ).arg( fnt.pointSize() ) );
}
-#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
@@ -26,9 +26,11 @@
#include "viewconfigurewidget.h"
-#include <qvbox.h>
+#include <q3vbox.h>
#include <qwidget.h>
#include <qfont.h>
+//Added by qt3to4:
+#include <QLabel>
class QString;
class QWidget;
@@ -77,7 +79,7 @@ class ConfigureCardViewWidget : public ViewConfigureWidget
* item spacing
*/
-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
@@ -27,11 +27,14 @@
#include <qlabel.h>
#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>
#include <klocale.h>
@@ -84,7 +87,7 @@ void ConfigureTableViewWidget::saveSettings( KConfig *config )
LookAndFeelPage::LookAndFeelPage(QWidget *parent, const char *name)
- : QVBox(parent, name)
+ : Q3VBox(parent, name)
{
initGUI();
@@ -229,12 +232,12 @@ void LookAndFeelPage::initGUI()
QTabWidget *tabs = new QTabWidget( this );
// 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);
mAlternateButton = new QRadioButton(i18n("Alternating backgrounds"),
@@ -262,7 +265,7 @@ void LookAndFeelPage::initGUI()
tabs->addTab( generalTab, i18n("&General") );
// Colors
- QVBox *colorTab = new QVBox( this, "colortab" );
+ Q3VBox *colorTab = new Q3VBox( this, "colortab" );
colorTab->setSpacing( spacing );
colorTab->setMargin( spacing );
cbEnableCustomColors = new QCheckBox( i18n("&Enable custom Colors"), colorTab );
@@ -270,16 +273,16 @@ void LookAndFeelPage::initGUI()
lbColors = new ColorListBox( colorTab );
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 );
fntTab->setMargin( spacing );
@@ -288,13 +291,13 @@ void LookAndFeelPage::initGUI()
connect( cbEnableCustomFonts, SIGNAL(clicked()), this, SLOT(enableFonts()) );
vbFonts = new QWidget( fntTab );
- QGridLayout *gFnts = new QGridLayout( vbFonts, 2, 3 );
+ Q3GridLayout *gFnts = new Q3GridLayout( vbFonts, 2, 3 );
gFnts->setSpacing( spacing );
gFnts->setAutoAdd( true );
gFnts->setColStretch( 1, 1 );
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 );
#else //KAB_EMBEDDED
@@ -307,7 +310,7 @@ 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 );
#else //KAB_EMBEDDED
@@ -318,7 +321,7 @@ 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 "
"normal style for the data."
@@ -340,6 +343,6 @@ void LookAndFeelPage::updateFontLabel( QFont fnt, QLabel *l )
l->setText( QString( fnt.family() + " %1" ).arg( fnt.pointSize() ) );
}
-#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
@@ -26,7 +26,9 @@
#include "viewconfigurewidget.h"
-#include <qvbox.h>
+#include <q3vbox.h>
+//Added by qt3to4:
+#include <QLabel>
class QString;
class QWidget;
@@ -63,7 +65,7 @@ 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
@@ -21,15 +21,20 @@
without including the source code for Qt in the source distribution.
*/
-#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>
#include <qbrush.h>
#include <qevent.h>
#include <qapplication.h>
+//Added by qt3to4:
+#include <QDropEvent>
+#include <QPixmap>
+#include <QMouseEvent>
+#include <QKeyEvent>
#include <klocale.h>
#include <kglobalsettings.h>
@@ -47,12 +52,13 @@
// DynamicTip Methods
DynamicTip::DynamicTip( ContactListView *parent)
- : QToolTip( parent )
+ /* TODO:hacker:: QToolTip( parent ) */
{
}
void DynamicTip::maybeTip( const QPoint &pos )
{
+ /* TODO:hacker:
static bool ishidden = true;
if (!parentWidget()->inherits( "ContactListView" ))
return;
@@ -63,7 +69,7 @@ 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;
@@ -151,7 +157,7 @@ void DynamicTip::maybeTip( const QPoint &pos )
else
hide();
ishidden = !ishidden;
-
+ */
}
///////////////////////////
@@ -173,7 +179,7 @@ QString ContactListViewItem::key(int column, bool ascending) const
int lan = KGlobal::locale()->language();
//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 ) {
ret.at(start-1) = 'a';
@@ -197,7 +203,7 @@ QString ContactListViewItem::key(int column, bool ascending) const
}
else
#endif
- return QListViewItem::key(column, ascending).lower();
+ return Q3ListViewItem::key(column, ascending).lower();
}
void ContactListViewItem::paintCell(QPainter * p,
@@ -288,7 +294,7 @@ void ContactListView::printMe()
return;
QPainter p;
p.begin ( &printer );
- QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer );
+ Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer );
float dx, dy;
int wid = (m.width() * 9)/10;
dx = (float) wid/(float)contentsWidth ();
@@ -343,7 +349,7 @@ void ContactListView::contentsMousePressEvent(QMouseEvent* e)
// To initiate a drag operation
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();
}
else
@@ -353,7 +359,7 @@ void ContactListView::contentsMouseMoveEvent( QMouseEvent *e )
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");
return false;
@@ -424,6 +430,6 @@ 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
@@ -5,6 +5,10 @@
#include <qpixmap.h>
#include <qtooltip.h>
#include <qstring.h>
+//Added by qt3to4:
+#include <QDropEvent>
+#include <QMouseEvent>
+#include <QKeyEvent>
#include <klistview.h>
@@ -20,7 +24,7 @@ class ContactListView;
/** The whole tooltip design needs a lot of work. Currently it is
* hacked together to function.
*/
-class DynamicTip : public QToolTip
+class DynamicTip /* TODO:hacker: : public QToolTip */
{
public:
DynamicTip( ContactListView * parent );
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
@@ -21,13 +21,18 @@
without including the source code for Qt in the source distribution.
*/
-#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>
#include <kabc/addressee.h>
@@ -125,7 +130,7 @@ void AddresseeCardView::printMe()
return;
QPainter p;
p.begin ( &printer );
- QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer );
+ Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer );
float dx, dy;
int wid = (m.width() * 9)/10;
dx = (float) wid/(float)contentsWidth ();
@@ -148,7 +153,7 @@ void AddresseeCardView::printMe()
void AddresseeCardView::dragEnterEvent(QDragEnterEvent *e)
{
#ifndef KAB_EMBEDDED
- if (QTextDrag::canDecode(e))
+ if (Q3TextDrag::canDecode(e))
e->accept();
#else //KAB_EMBEDDED
qDebug("AddresseeCardView::dragEnterEvent drag&drop is not implemented");
@@ -176,7 +181,7 @@ KAddressBookCardView::KAddressBookCardView( KABC::AddressBook *ab,
mShowEmptyFields = false;
// Init the GUI
- QVBoxLayout *layout = new QVBoxLayout(viewWidget());
+ Q3VBoxLayout *layout = new Q3VBoxLayout(viewWidget());
mCardView = new AddresseeCardView(viewWidget(), "mCardView");
mCardView->setSelectionMode(CardView::Extended);
@@ -520,6 +525,6 @@ void KAddressBookCardView::addresseeSelected()
emit selected(QString::null);
}
-#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
@@ -25,6 +25,9 @@
*/
#include <qstring.h>
+//Added by qt3to4:
+#include <QDragEnterEvent>
+#include <QDropEvent>
#ifndef KAB_EMBEDDED
#include <kiconview.h>
#else //KAB_EMBEDDED
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
@@ -22,7 +22,7 @@
*/
#ifndef KAB_EMBEDDED
-#include <qiconview.h>
+#include <q3iconview.h>
#include <qstringlist.h>
#include <kabc/addressee.h>
@@ -35,6 +35,14 @@
#else //KAB_EMBEDDED
#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"
#include "viewmanager.h"
@@ -73,12 +81,12 @@ AddresseeIconView::AddresseeIconView(QWidget *parent, const char *name)
: KIconView(parent, 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 );
setItemsMovable(false);
@@ -89,8 +97,8 @@ 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
}
@@ -100,12 +108,12 @@ AddresseeIconView::~AddresseeIconView()
void AddresseeIconView::itemDropped(QDropEvent *e,
- const QValueList<QIconDragItem> &)
+ const Q3ValueList<Q3IconDragItem> &)
{
emit addresseeDropped(e);
}
-QDragObject *AddresseeIconView::dragObject()
+Q3DragObject *AddresseeIconView::dragObject()
{
emit startAddresseeDrag();
@@ -117,20 +125,20 @@ QDragObject *AddresseeIconView::dragObject()
#ifndef KAB_EMBEDDED
class AddresseeIconViewItem : public KIconViewItem
#else //KAB_EMBEDDED
-class AddresseeIconViewItem : public QIconViewItem
+class AddresseeIconViewItem : public Q3IconViewItem
#endif //KAB_EMBEDDED
{
public:
#ifndef KAB_EMBEDDED
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
{
if ( mFields.isEmpty() ) {
@@ -200,7 +208,7 @@ KAddressBookIconView::KAddressBookIconView( KABC::AddressBook *ab,
: KAddressBookView( ab, parent, name )
{
// Init the GUI
- QVBoxLayout *layout = new QVBoxLayout(viewWidget());
+ Q3VBoxLayout *layout = new Q3VBoxLayout(viewWidget());
mIconView = new AddresseeIconView(viewWidget(), "mIconView");
layout->addWidget(mIconView);
@@ -210,8 +218,8 @@ KAddressBookIconView::KAddressBookIconView( KABC::AddressBook *ab,
//US method executed is part of KIconView
//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()),
this, SLOT(addresseeSelected()));
@@ -248,8 +256,8 @@ void KAddressBookIconView::readConfig(KConfig *config)
//US method executed is part of KIconView
//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
/*US
@@ -260,8 +268,8 @@ void KAddressBookIconView::readConfig(KConfig *config)
connect(mIconView, SIGNAL(doubleClicked(QIconViewItem *)),
this, SLOT(addresseeExecuted(QIconViewItem *)));
*/
- connect(mIconView, SIGNAL(selectionChanged(QIconViewItem *)),
- this, SLOT(addresseeExecuted(QIconViewItem *)));
+ connect(mIconView, SIGNAL(selectionChanged(Q3IconViewItem *)),
+ this, SLOT(addresseeExecuted(Q3IconViewItem *)));
}
void KAddressBookIconView::doSearch( const QString& s ,KABC::Field *field )
@@ -336,7 +344,7 @@ void KAddressBookIconView::doSearch( const QString& s ,KABC::Field *field )
QStringList KAddressBookIconView::selectedUids()
{
QStringList uidList;
- QIconViewItem *item;
+ Q3IconViewItem *item;
AddresseeIconViewItem *aItem;
for (item = mIconView->firstItem(); item; item = item->nextItem())
@@ -358,7 +366,7 @@ QStringList KAddressBookIconView::selectedUids()
void KAddressBookIconView::refresh(QString uid)
{
- QIconViewItem *item;
+ Q3IconViewItem *item;
AddresseeIconViewItem *aItem;
if ( uid.isNull() ) {
@@ -406,7 +414,7 @@ void KAddressBookIconView::refresh(QString uid)
void KAddressBookIconView::setSelected(QString uid, bool selected)
{
- QIconViewItem *item;
+ Q3IconViewItem *item;
AddresseeIconViewItem *aItem;
if (uid.isNull())
@@ -435,7 +443,7 @@ void KAddressBookIconView::setSelected(QString uid, bool selected)
}
}
-void KAddressBookIconView::addresseeExecuted(QIconViewItem *item)
+void KAddressBookIconView::addresseeExecuted(Q3IconViewItem *item)
{
#ifndef KAB_EMBEDDED
AddresseeIconViewItem *aItem = dynamic_cast<AddresseeIconViewItem*>(item);
@@ -450,7 +458,7 @@ void KAddressBookIconView::addresseeExecuted(QIconViewItem *item)
void KAddressBookIconView::addresseeSelected()
{
- QIconViewItem *item;
+ Q3IconViewItem *item;
AddresseeIconViewItem *aItem;
bool found = false;
@@ -476,6 +484,6 @@ void KAddressBookIconView::addresseeSelected()
emit selected(QString::null);
}
-#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
@@ -25,20 +25,23 @@
#define KADDRESSBOOKICONVIEW_H
#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;
namespace KABC { class AddressBook; }
@@ -68,30 +71,30 @@ class KAddressBookIconView : public KAddressBookView
public slots:
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 ???
void setSelected(QString uid, bool selected);
#endif //KAB_EMBEDDED
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
{
Q_OBJECT
@@ -105,10 +108,10 @@ class AddresseeIconView : public QIconView
void startAddresseeDrag();
protected:
- virtual QDragObject *dragObject();
+ virtual Q3DragObject *dragObject();
protected slots:
- void itemDropped(QDropEvent *, const QValueList<QIconDragItem> &);
+ void itemDropped(QDropEvent *, const Q3ValueList<Q3IconDragItem> &);
};
class IconViewFactory : public ViewFactory
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,16 +1,20 @@
// $Id$
-#include <qvbox.h>
-#include <qlistbox.h>
+#include <q3vbox.h>
+#include <q3listbox.h>
#include <qwidget.h>
#include <qfile.h>
#include <qimage.h>
#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>
#include <kapplication.h>
@@ -32,7 +36,7 @@
#include "viewmanager.h"
#include <qlayout.h>
-#include <qheader.h>
+#include <q3header.h>
#include <qregexp.h>
#include "kaddressbooktableview.h"
@@ -42,7 +46,7 @@ KAddressBookTableView::KAddressBookTableView( KABC::AddressBook *ab,
QWidget *parent, const char *name )
: 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.
mListView = 0;
@@ -77,14 +81,14 @@ 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,
SIGNAL(dropped(QDropEvent*)));
@@ -105,7 +109,7 @@ void KAddressBookTableView::reconstructListView()
int c = 0;
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());
}
@@ -119,15 +123,15 @@ 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()));
@@ -344,7 +348,7 @@ void KAddressBookTableView::refresh(QString uid)
} else {
// 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
ceItem = dynamic_cast<ContactListViewItem*>( it.current() );
@@ -366,7 +370,7 @@ void KAddressBookTableView::refresh(QString uid)
QStringList KAddressBookTableView::selectedUids()
{
QStringList uidList;
- QListViewItem *item;
+ Q3ListViewItem *item;
ContactListViewItem *ceItem;
for(item = mListView->firstChild(); item; item = item->itemBelow())
@@ -394,7 +398,7 @@ QStringList KAddressBookTableView::selectedUids()
void KAddressBookTableView::setSelected(QString uid, bool selected)
{
- QListViewItem *item;
+ Q3ListViewItem *item;
ContactListViewItem *ceItem;
if (uid.isNull())
@@ -429,7 +433,7 @@ void KAddressBookTableView::addresseeSelected()
// last selected item, but when QListView is in multiselection mode,
// 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;
item = item->nextSibling())
@@ -453,7 +457,7 @@ void KAddressBookTableView::addresseeSelected()
emit selected(QString::null);
}
-void KAddressBookTableView::addresseeExecuted(QListViewItem *item)
+void KAddressBookTableView::addresseeExecuted(Q3ListViewItem *item)
{
if (item)
{
@@ -487,6 +491,6 @@ 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
@@ -10,12 +10,12 @@
#endif
#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"
@@ -25,10 +25,12 @@
#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;
class ContactListViewItem;
@@ -79,10 +81,10 @@ friend class ContactListView;
/** Called whenever the user executes an addressee. In terms of the
* 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
@@ -30,7 +30,7 @@ $Id$
#include <qfile.h>
#include <qregexp.h>
-#include <qtextstream.h>
+#include <q3textstream.h>
#include <qtextcodec.h>
#include <kfiledialog.h>
@@ -104,7 +104,7 @@ bool CSVXXPort::exportContacts( const KABC::AddresseeList &list, const QString&
return KIO::NetAccess::upload( tmpFile.name(), url, parentWidget() );
} 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() ) );
return false;
@@ -124,7 +124,7 @@ bool CSVXXPort::exportContacts( const KABC::AddresseeList &list, const QString&
return false;
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 ) );
return false;
@@ -151,7 +151,7 @@ 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") );
KABC::AddresseeList::ConstIterator iter;
@@ -187,8 +187,6 @@ 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
@@ -27,7 +27,7 @@ $Id$
*/
-#include <qbuttongroup.h>
+#include <q3buttongroup.h>
#include <qcheckbox.h>
#include <qcombobox.h>
#ifdef DESKTOP_VERSION
@@ -39,10 +39,14 @@ $Id$
#include <qlineedit.h>
#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>
#include <kdebug.h>
@@ -56,7 +60,7 @@ $Id$
#include <kurlrequester.h>
#ifdef DESKTOP_VERSION
-#include "qtable.h"
+#include "q3table.h"
#else
#include "qcombotableitem.h"
#endif
@@ -161,7 +165,7 @@ CSVImportDialog::CSVImportDialog( KABC::AddressBook *ab, QWidget *parent,
this, SLOT( saveTemplate() ) );
// if ( QApplication::desktop()->width() < 321 )
- QIconSet icon = SmallIcon("filesave");
+ QIcon icon = SmallIcon("filesave");
findButton( User2 )->setIconSet (icon ) ;
icon = SmallIcon("fileopen");
@@ -186,7 +190,7 @@ KABC::AddresseeList CSVImportDialog::contacts() const
KABC::Address addrWork( KABC::Address::Work );
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 ) {
qDebug( "ERROR: item cast failed" );
@@ -229,7 +233,7 @@ KABC::AddresseeList CSVImportDialog::contacts() const
// But Qt::IsoDate and QDate::fromString was not specified. Do I have the wrong QT version ?
{
QDate dt = KGlobal::locale()->readDate( value, "%Y-%m-%d"); // = Qt::ISODate
- a.setBirthday(dt);
+ a.setBirthday(QDateTime(dt));
}
break;
case Email:
@@ -382,9 +386,9 @@ 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() );
QLabel *label = new QLabel( i18n( "File to import:" ), page );
@@ -397,11 +401,11 @@ void CSVImportDialog::initGUI()
layout->addMultiCellLayout( hbox, 0, 0, 0, 2 );
// 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 );
@@ -450,8 +454,8 @@ void CSVImportDialog::initGUI()
mIgnoreDuplicates->setText( i18n( "Ignore duplicate delimiters" ) );
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 );
/*US
@@ -483,11 +487,11 @@ void CSVImportDialog::fillTable()
QString field = "";
// 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 )
mTypeStore.append( typeToPos( Undefined ) );
@@ -506,14 +510,14 @@ void CSVImportDialog::fillTable()
mData = QString::fromLocal8Bit( mFileArray.data() );
}
- 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 );
}
int maxColumn = 0;
@@ -526,7 +530,7 @@ void CSVImportDialog::fillTable()
case S_START :
if ( x == mTextQuote ) {
state = S_QUOTED_FIELD;
- } else if ( x == mDelimiter ) {
+ } else if ( QString(x) == mDelimiter ) {
if ( ( ignoreDups == false ) || ( lastCharDelimiter == false ) )
++column;
lastCharDelimiter = true;
@@ -561,7 +565,7 @@ void CSVImportDialog::fillTable()
if ( x == mTextQuote ) {
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 = "";
if ( x == '\n' ) {
@@ -578,7 +582,7 @@ 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 = "";
if ( x == '\n' ) {
@@ -601,7 +605,7 @@ void CSVImportDialog::fillTable()
break;
}
case S_NORMAL_FIELD :
- if ( x == mDelimiter || x == '\n' ) {
+ if ( QString(x) == mDelimiter || x == '\n' ) {
setText( row - mStartLine + 1, column, field );
field = "";
if ( x == '\n' ) {
@@ -617,7 +621,7 @@ void CSVImportDialog::fillTable()
field += x;
}
}
- if ( x != mDelimiter )
+ if ( QString(x) != mDelimiter )
lastCharDelimiter = false;
if ( column > maxColumn )
@@ -649,7 +653,7 @@ void CSVImportDialog::fillTable()
for ( column = 0; column < mTable->numCols(); ++column ) {
//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() )
item->setCurrentItem( mTypeStore[ column ] );
@@ -764,7 +768,7 @@ void CSVImportDialog::slotOk()
bool assigned = false;
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 )
assigned = true;
@@ -836,7 +840,7 @@ void CSVImportDialog::applyTemplate()
// apply the column map
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 )
item->setCurrentItem( typeToPos( type ) );
@@ -878,7 +882,7 @@ void CSVImportDialog::saveTemplate()
config.setGroup( "csv column map" );
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 )
config.writeEntry( QString::number( column ), posToType(
@@ -934,7 +938,7 @@ void CSVImportDialog::setFile( const QString &fileName )
return;
QFile file( fileName );
- if ( !file.open( IO_ReadOnly ) ) {
+ if ( !file.open( QIODevice::ReadOnly ) ) {
KMessageBox::sorry( this, i18n( "Cannot open input file!" ) );
file.close();
return;
@@ -964,6 +968,6 @@ 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
@@ -33,17 +33,17 @@ $Id$
#include <kabc/addresseelist.h>
#include <kdialogbase.h>
-#include <qvaluelist.h>
+#include <q3valuelist.h>
class KURLRequester;
-class QButtonGroup;
+class Q3ButtonGroup;
class QComboBox;
class QCheckBox;
class QLineEdit;
class QPushButton;
class QRadioButton;
-class QTable;
+class Q3Table;
class CSVImportDialog : public KDialogBase
{
@@ -85,8 +85,8 @@ class CSVImportDialog : public KDialogBase
Isdn, Pager, Email, Mailer, Title, Role, Organization, Note, URL, Categories
};
- QTable* mTable;
- QButtonGroup* mDelimiterBox;
+ Q3Table* mTable;
+ Q3ButtonGroup* mDelimiterBox;
QRadioButton* mRadioComma;
QRadioButton* mRadioSemicolon;
QRadioButton* mRadioTab;
@@ -119,7 +119,7 @@ class CSVImportDialog : public KDialogBase
KABC::AddressBook *mAddressBook;
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
@@ -116,6 +116,6 @@ KABC::AddresseeList KDE2XXPort::importContacts( const QString& ) const
return KABC::AddresseeList();
}
-#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
@@ -29,8 +29,10 @@
*/
#include <qfile.h>
-#include <qtextstream.h>
+#include <q3textstream.h>
#include <qfileinfo.h>
+//Added by qt3to4:
+#include <Q3CString>
#include <kabc/vcardconverter.h>
#include <kabc/vcardparser/vcardtool.h>
@@ -102,14 +104,14 @@ bool VCardXXPort::exportContacts( const KABC::AddresseeList &list, const QString
return false;
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 ) );
return false;
}
- QTextStream t( &outFile );
- t.setEncoding( QTextStream::UnicodeUTF8 );
+ Q3TextStream t( &outFile );
+ t.setEncoding( Q3TextStream::UnicodeUTF8 );
KABC::Addressee::List::ConstIterator it;
for ( it = list.begin(); it != list.end(); ++it ) {
@@ -153,7 +155,7 @@ KABC::AddresseeList VCardXXPort::importContacts( const QString& ) const
if ( KIO::NetAccess::download( url, fileName ) ) {
QFile file( fileName );
- file.open( IO_ReadOnly );
+ file.open( QIODevice::ReadOnly );
QByteArray rawData = file.readAll();
file.close();
@@ -196,8 +198,8 @@ 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;
#ifndef DESKTOP_VERSION
@@ -267,6 +269,6 @@ 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
@@ -30,6 +30,8 @@ $Id$
#include <qlayout.h>
#include <qlist.h>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
#include <kabc/addressbook.h>
#include <kabc/resource.h>
@@ -217,7 +219,7 @@ 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()));
factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_vcard_xxport()));
@@ -225,10 +227,8 @@ void XXPortManager::loadPlugins()
factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_qtopia_xxport()));
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
XXPortObject *obj = xxportFactory->xxportObject( mCore->addressBook(), mCore );
@@ -250,7 +250,7 @@ PreviewDialog::PreviewDialog( const KABC::Addressee &addr, QWidget *parent,
name, true, true ,i18n( "Import all!" ),i18n( "No" ) )
{
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() ) );
@@ -264,7 +264,6 @@ PreviewDialog::PreviewDialog( const KABC::Addressee &addr, QWidget *parent,
#endif
}
-#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
@@ -32,7 +32,7 @@ $Id$
#ifndef XXPORTMANAGER_H
#define XXPORTMANAGER_H
-#include <qdict.h>
+#include <q3dict.h>
#include <qobject.h>
#include <kurl.h>
@@ -71,7 +71,7 @@ class XXPortManager : public QObject
private:
void loadPlugins();
- QDict<XXPortObject> mXXPortObjects;
+ Q3Dict<XXPortObject> mXXPortObjects;
KABCore *mCore;
bool mShowPreview;
diff --git a/kaddressbook/xxportobject.cpp b/kaddressbook/xxportobject.cpp
index bd9d986..2d8d0ff 100644
--- a/kaddressbook/xxportobject.cpp
+++ b/kaddressbook/xxportobject.cpp
@@ -271,6 +271,6 @@ 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
@@ -36,16 +36,21 @@ $Id$
#include <kglobal.h>
#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"
#include "kabprefs.h"
@@ -62,8 +67,8 @@ 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
#ifndef KAB_EMBEDDED
@@ -84,7 +89,7 @@ XXPortSelectDialog::XXPortSelectDialog( KABCore *core, bool sort,
QStringList categories = KABPrefs::instance()->mCustomCategories;
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 );
int count = mCore->selectedUIDs().count();
@@ -210,9 +215,9 @@ 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 ) );
}
@@ -225,9 +230,9 @@ void XXPortSelectDialog::filterChanged( int )
mUseFilters->setChecked( true );
}
-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 );
}
@@ -244,60 +249,60 @@ 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() );
QLabel *label = new QLabel( i18n( "Which contacts do you want to select?" ), page );
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 );
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 ) );
//if (QApplication::desktop()->height() == 480 )
// mCategoriesView->setMaximumHeight( 240 );
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 );
@@ -335,8 +340,6 @@ 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
@@ -30,10 +30,10 @@
#include "filter.h"
-class QButtonGroup;
+class Q3ButtonGroup;
class QComboBox;
-class QListView;
-class QListViewItem;
+class Q3ListView;
+class Q3ListViewItem;
class QRadioButton;
class KABCore;
@@ -53,7 +53,7 @@ class XXPortSelectDialog : public KDialogBase
private slots:
void filterChanged( int );
- void categoryClicked( QListViewItem * i );
+ void categoryClicked( Q3ListViewItem * i );
protected slots:
void slotHelp();
@@ -62,13 +62,13 @@ class XXPortSelectDialog : public KDialogBase
void initGUI();
QStringList categories() const;
- QButtonGroup* mButtonGroup;
+ Q3ButtonGroup* mButtonGroup;
QRadioButton* mUseCategories;
QRadioButton* mUseFilters;
QRadioButton* mUseWholeBook;
QRadioButton* mUseSelection;
QComboBox* mFiltersCombo;
- QListView* mCategoriesView;
+ Q3ListView* mCategoriesView;
KComboBox *mFieldCombo;
KComboBox *mSortTypeCombo;