author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (side-by-side diff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kaddressbook | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2 |
initial public commit of qt4 portp1
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 @@ -24,16 +24,23 @@ -#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> @@ -41,3 +48,3 @@ #else //KAB_EMBEDDED -#include <qmultilineedit.h> +#include <q3multilineedit.h> #endif //KAB_EMBEDDED @@ -69,5 +76,5 @@ 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 ); @@ -86,3 +93,3 @@ AddressEditWidget::AddressEditWidget( QWidget *parent, const char *name ) #ifndef KAB_EMBEDDED - mAddressTextEdit = new QTextEdit( this ); + mAddressTextEdit = new Q3TextEdit( this ); mAddressTextEdit->setReadOnly( true ); @@ -90,3 +97,3 @@ AddressEditWidget::AddressEditWidget( QWidget *parent, const char *name ) #else //KAB_EMBEDDED - mAddressTextEdit = new QMultiLineEdit( this ); + mAddressTextEdit = new Q3MultiLineEdit( this ); mAddressTextEdit->setReadOnly( true ); @@ -128,3 +135,3 @@ void AddressEditWidget::setAddresses( const KABC::Addressee &addr, - QValueList<int> defaultTypes; + Q3ValueList<int> defaultTypes; defaultTypes << KABC::Address::Home; @@ -133,4 +140,4 @@ void AddressEditWidget::setAddresses( const KABC::Addressee &addr, 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 ) @@ -183,3 +190,3 @@ void AddressEditWidget::edit() mConfig->setUid( mAddressee.uid() ); - QValueList<int> configList; + Q3ValueList<int> configList; if ( !hasHome ) { @@ -257,3 +264,3 @@ AddressEditDialog::AddressEditDialog( const KABC::Address::List &list, - QGridLayout *topLayout = new QGridLayout( page, 8, 2 ); + Q3GridLayout *topLayout = new Q3GridLayout( page, 8, 2 ); topLayout->setSpacing( spacingHintSmall() ); @@ -268,5 +275,5 @@ AddressEditDialog::AddressEditDialog( const KABC::Address::List &list, #ifndef KAB_EMBEDDED - mStreetTextEdit = new QTextEdit( page ); + mStreetTextEdit = new Q3TextEdit( page ); #else //KAB_EMBEDDED - mStreetTextEdit = new QMultiLineEdit( page ); + mStreetTextEdit = new Q3MultiLineEdit( page ); //US qDebug("AddressEditDialog::AddressEditDialog has to be changed"); @@ -313,3 +320,3 @@ AddressEditDialog::AddressEditDialog( const KABC::Address::List &list, topLayout->addWidget( mCountryCombo, 6, 1 ); - mCountryCombo->setSizeLimit( 8); + mCountryCombo->setMaxVisibleItems( 8); mPreferredCheckBox = new QCheckBox( i18n( "This is the preferred address" ), page ); @@ -320,3 +327,3 @@ AddressEditDialog::AddressEditDialog( const KABC::Address::List &list, */ - QHBox *buttonBox = new QHBox( page ); + Q3HBox *buttonBox = new Q3HBox( page ); buttonBox->setSpacing( spacingHint() ); @@ -585,5 +592,5 @@ AddressTypeDialog::AddressTypeDialog( int type, QWidget *parent ) QWidget *page = plainPage(); - QVBoxLayout *layout = new QVBoxLayout( page ); + Q3VBoxLayout *layout = new Q3VBoxLayout( page ); - mGroup = new QButtonGroup( 2, Horizontal, i18n( "Address Types" ), page ); + mGroup = new Q3ButtonGroup( 2, Qt::Horizontal, i18n( "Address Types" ), page ); layout->addWidget( mGroup ); @@ -619,4 +626,4 @@ int AddressTypeDialog::type() const -#ifndef KAB_EMBEDDED -#include "addresseditwidget.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_addresseditwidget.cpp" #endif //KAB_EMBEDDED diff --git a/kaddressbook/addresseditwidget.h b/kaddressbook/addresseditwidget.h index bc96d74..1d4e138 100644 --- a/kaddressbook/addresseditwidget.h +++ b/kaddressbook/addresseditwidget.h @@ -35,9 +35,9 @@ -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 @@ -83,5 +83,5 @@ class AddressEditWidget : public QWidget #ifndef KAB_EMBEDDED - QTextEdit *mAddressTextEdit; + Q3TextEdit *mAddressTextEdit; #else //KAB_EMBEDDED - QMultiLineEdit *mAddressTextEdit; + Q3MultiLineEdit *mAddressTextEdit; #endif //KAB_EMBEDDED @@ -122,5 +122,5 @@ class AddressEditDialog : public KDialogBase #ifndef KAB_EMBEDDED - QTextEdit *mStreetTextEdit; + Q3TextEdit *mStreetTextEdit; #else //KAB_EMBEDDED - QMultiLineEdit *mStreetTextEdit; + Q3MultiLineEdit *mStreetTextEdit; #endif //KAB_EMBEDDED @@ -153,3 +153,3 @@ class AddressTypeDialog : public KDialogBase private: - QButtonGroup *mGroup; + Q3ButtonGroup *mGroup; diff --git a/kaddressbook/addresseeconfig.cpp b/kaddressbook/addresseeconfig.cpp index ea0436f..81b1bf4 100644 --- a/kaddressbook/addresseeconfig.cpp +++ b/kaddressbook/addresseeconfig.cpp @@ -28,2 +28,4 @@ #include <qfileinfo.h> +//Added by qt3to4: +#include <Q3ValueList> @@ -79,3 +81,3 @@ void AddresseeConfig::setAutomaticNameParsing( bool value ) -void AddresseeConfig::setNoDefaultAddrTypes( const QValueList<int> &types ) +void AddresseeConfig::setNoDefaultAddrTypes( const Q3ValueList<int> &types ) { @@ -85,3 +87,3 @@ void AddresseeConfig::setNoDefaultAddrTypes( const QValueList<int> &types ) - QValueList<int> AddresseeConfig::noDefaultAddrTypes() const + Q3ValueList<int> AddresseeConfig::noDefaultAddrTypes() const { diff --git a/kaddressbook/addresseeconfig.h b/kaddressbook/addresseeconfig.h index 47fbdd6..f6bb3e9 100644 --- a/kaddressbook/addresseeconfig.h +++ b/kaddressbook/addresseeconfig.h @@ -28,2 +28,4 @@ #include <kconfig.h> +//Added by qt3to4: +#include <Q3ValueList> @@ -45,4 +47,4 @@ class AddresseeConfig - void setNoDefaultAddrTypes( const QValueList<int> &types ); - QValueList<int> noDefaultAddrTypes() const; + void setNoDefaultAddrTypes( const Q3ValueList<int> &types ); + Q3ValueList<int> noDefaultAddrTypes() const; diff --git a/kaddressbook/addresseeeditordialog.cpp b/kaddressbook/addresseeeditordialog.cpp index b5a60f2..b925a07 100644 --- a/kaddressbook/addresseeeditordialog.cpp +++ b/kaddressbook/addresseeeditordialog.cpp @@ -25,2 +25,5 @@ #include <qapplication.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <Q3VBoxLayout> @@ -45,3 +48,3 @@ AddresseeEditorDialog::AddresseeEditorDialog( KABCore *core, QWidget *parent, - QVBoxLayout *layout = new QVBoxLayout( page ); + Q3VBoxLayout *layout = new Q3VBoxLayout( page ); @@ -120,4 +123,4 @@ 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 @@ -24,6 +24,6 @@ #include <qcheckbox.h> -#include <qhbox.h> +#include <q3hbox.h> #include <qlabel.h> #include <qlayout.h> -#include <qlistbox.h> +#include <q3listbox.h> #include <qpushbutton.h> @@ -33,3 +33,7 @@ #ifndef KAB_EMBEDDED -#include <qtextedit.h> +#include <q3textedit.h> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3PopupMenu> +#include <Q3VBoxLayout> @@ -40,3 +44,3 @@ #else //KAB_EMBEDDED -#include <qmultilineedit.h> +#include <q3multilineedit.h> #endif //KAB_EMBEDDED @@ -132,3 +136,3 @@ void AddresseeEditorWidget::initGUI() { - QVBoxLayout *layout = new QVBoxLayout( this ); + Q3VBoxLayout *layout = new Q3VBoxLayout( this ); @@ -162,3 +166,3 @@ void AddresseeEditorWidget::setupTab1() } - QGridLayout *layout = new QGridLayout( tab1, 7-maxCol, maxCol ); + Q3GridLayout *layout = new Q3GridLayout( tab1, 7-maxCol, maxCol ); @@ -329,3 +333,3 @@ void AddresseeEditorWidget::setupTab1() /////////////////////////////////////// - QHBox *categoryBox = new QHBox( tab1 ,"cato"); + Q3HBox *categoryBox = new Q3HBox( tab1 ,"cato"); categoryBox->setSpacing( KDialogBase::spacingHint() ); @@ -339,3 +343,3 @@ void AddresseeEditorWidget::setupTab1() mCategoryEdit->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::Fixed ,FALSE) ); - mCatPopup = new QPopupMenu ( categoryBox ); + mCatPopup = new Q3PopupMenu ( categoryBox ); mCategoryEdit->setPopup( mCatPopup ); @@ -413,3 +417,3 @@ void AddresseeEditorWidget::setupTab1_1() //US QGridLayout *layout = new QGridLayout( tab1_1, 11, 7 ); - QGridLayout *layout = new QGridLayout( tab1_1, 7, 2 ); + Q3GridLayout *layout = new Q3GridLayout( tab1_1, 7, 2 ); layout->setMargin( KDialogBase::marginHintSmall() ); @@ -614,3 +618,3 @@ void AddresseeEditorWidget::setupTab2() - QGridLayout *layout = new QGridLayout( tab2, 8, 3 ); + Q3GridLayout *layout = new Q3GridLayout( tab2, 8, 3 ); layout->setMargin( KDialogBase::marginHintSmall() ); @@ -693,3 +697,3 @@ void AddresseeEditorWidget::setupTab2() if ( QApplication::desktop()->width() == 640 ) { - QHBox * nbox = new QHBox ( tab2 ); + Q3HBox * nbox = new Q3HBox ( tab2 ); label = new QLabel( i18n( "Nick name:" )+" ", nbox ); @@ -737,3 +741,3 @@ void AddresseeEditorWidget::setupTab2() if ( QApplication::desktop()->width() == 640 ) { - QHBox * nbox = new QHBox ( tab2 ); + Q3HBox * nbox = new Q3HBox ( tab2 ); label = new QLabel( i18n( "Birthday:" )+" ", nbox ); @@ -806,3 +810,3 @@ void AddresseeEditorWidget::setupTab2_1() - QGridLayout *layout = new QGridLayout( tab2_2, 1, 2 ); + Q3GridLayout *layout = new Q3GridLayout( tab2_2, 1, 2 ); layout->setMargin( KDialogBase::marginHintSmall() ); @@ -928,8 +932,8 @@ void AddresseeEditorWidget::setupTab2_1() #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() ); @@ -955,3 +959,3 @@ void AddresseeEditorWidget::setupTab3() - QGridLayout *layout = new QGridLayout( tab3, 1, 1 ); + Q3GridLayout *layout = new Q3GridLayout( tab3, 1, 1 ); layout->setMargin( KDialogBase::marginHintSmall() ); @@ -1007,3 +1011,3 @@ void AddresseeEditorWidget::setupTab3_1() //US QGridLayout *layout = new QGridLayout( tab3, 2, 3 ); - QGridLayout *layout = new QGridLayout( tab3, 1, 1 ); + Q3GridLayout *layout = new Q3GridLayout( tab3, 1, 1 ); layout->setMargin( KDialogBase::marginHint() ); @@ -1432,4 +1436,4 @@ QString AddresseeEditorWidget::identifier() const -#ifndef KAB_EMBEDDED -#include "addresseeeditorwidget.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_addresseeeditorwidget.cpp" #endif //KAB_EMBEDDED diff --git a/kaddressbook/addresseeeditorwidget.h b/kaddressbook/addresseeeditorwidget.h index 816bbb5..aa1207e 100644 --- a/kaddressbook/addresseeeditorwidget.h +++ b/kaddressbook/addresseeeditorwidget.h @@ -27,3 +27,3 @@ #include <qdatetime.h> -#include <qpopupmenu.h> +#include <q3popupmenu.h> #include <qcombobox.h> @@ -42,5 +42,5 @@ class QTabWidget; #ifndef KAB_EMBEDDED -class QTextEdit; +class Q3TextEdit; #else //KAB_EMBEDDED -class QMultiLineEdit; +class Q3MultiLineEdit; #endif //KAB_EMBEDDED @@ -157,3 +157,3 @@ class AddresseeEditorWidget : public ExtensionWidget QPushButton *mCategoryEdit; - QPopupMenu *mCatPopup; + Q3PopupMenu *mCatPopup; SecrecyWidget *mSecrecyWidget; @@ -174,5 +174,5 @@ class AddresseeEditorWidget : public ExtensionWidget #ifndef KAB_EMBEDDED - QTextEdit *mNoteEdit; + Q3TextEdit *mNoteEdit; #else //KAB_EMBEDDED - QMultiLineEdit *mNoteEdit; + Q3MultiLineEdit *mNoteEdit; #endif //KAB_EMBEDDED diff --git a/kaddressbook/addresseeutil.cpp b/kaddressbook/addresseeutil.cpp index 366384a..a860f6d 100644 --- a/kaddressbook/addresseeutil.cpp +++ b/kaddressbook/addresseeutil.cpp @@ -48,3 +48,3 @@ KABC::Addressee::List AddresseeUtil::clipboardToAddressees( const QString &data { - uint numVCards = data.contains( "BEGIN:VCARD", false ); + uint numVCards = data.count( "BEGIN:VCARD", Qt::CaseInsensitive ); QStringList dataList = QStringList::split( "\r\n\r\n", data ); diff --git a/kaddressbook/addviewdialog.cpp b/kaddressbook/addviewdialog.cpp index 6def26b..b52a83c 100644 --- a/kaddressbook/addviewdialog.cpp +++ b/kaddressbook/addviewdialog.cpp @@ -27,3 +27,3 @@ #include <qradiobutton.h> -#include <qbuttongroup.h> +#include <q3buttongroup.h> #include <qlabel.h> @@ -31,2 +31,4 @@ #include <qlayout.h> +//Added by qt3to4: +#include <Q3GridLayout> @@ -37,3 +39,3 @@ -AddViewDialog::AddViewDialog( QDict<ViewFactory> *viewFactoryDict, +AddViewDialog::AddViewDialog( Q3Dict<ViewFactory> *viewFactoryDict, QWidget *parent, const char *name ) @@ -50,3 +52,3 @@ AddViewDialog::AddViewDialog( QDict<ViewFactory> *viewFactoryDict, - QGridLayout *layout = new QGridLayout( page, 2, 2 ); + Q3GridLayout *layout = new Q3GridLayout( page, 2, 2 ); layout->setSpacing( spacingHint() ); @@ -63,3 +65,3 @@ AddViewDialog::AddViewDialog( QDict<ViewFactory> *viewFactoryDict, - 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 ) ) ); @@ -68,3 +70,3 @@ AddViewDialog::AddViewDialog( QDict<ViewFactory> *viewFactoryDict, // Now create the radio buttons. This needs some layout work. - QDictIterator<ViewFactory> iter( *mViewFactoryDict ); + Q3DictIterator<ViewFactory> iter( *mViewFactoryDict ); for ( iter.toFirst(); iter.current(); ++iter ) { @@ -115,4 +117,4 @@ void AddViewDialog::textChanged( const QString &text ) -#ifndef KAB_EMBEDDED -#include "addviewdialog.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_addviewdialog.cpp" #endif //KAB_EMBEDDED diff --git a/kaddressbook/addviewdialog.h b/kaddressbook/addviewdialog.h index 8cc12f5..c3e8efd 100644 --- a/kaddressbook/addviewdialog.h +++ b/kaddressbook/addviewdialog.h @@ -27,3 +27,3 @@ #include <kdialogbase.h> -#include <qdict.h> +#include <q3dict.h> #include <qstring.h> @@ -31,3 +31,3 @@ class ViewFactory; -class QButtonGroup; +class Q3ButtonGroup; class QLineEdit; @@ -45,3 +45,3 @@ class AddViewDialog : public KDialogBase public: - AddViewDialog( QDict<ViewFactory> *viewFactoryDict, QWidget *parent, + AddViewDialog( Q3Dict<ViewFactory> *viewFactoryDict, QWidget *parent, const char *name = 0 ); @@ -65,5 +65,5 @@ class AddViewDialog : public KDialogBase private: - QDict<ViewFactory> *mViewFactoryDict; + Q3Dict<ViewFactory> *mViewFactoryDict; QLineEdit *mViewNameEdit; - QButtonGroup *mTypeGroup; + Q3ButtonGroup *mTypeGroup; 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 @@ -24,6 +24,9 @@ #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> @@ -47,3 +50,3 @@ ViewContainer::ViewContainer( QWidget *parent, const char* name ) { - QBoxLayout *topLayout = new QVBoxLayout( this ); + Q3BoxLayout *topLayout = new Q3VBoxLayout( this ); //topLayout->setMargin( KDialog::marginHint() ); @@ -53,3 +56,3 @@ ViewContainer::ViewContainer( QWidget *parent, const char* name ) - QBoxLayout *styleLayout = new QHBoxLayout( topLayout ); + Q3BoxLayout *styleLayout = new Q3HBoxLayout( topLayout ); @@ -61,3 +64,3 @@ ViewContainer::ViewContainer( QWidget *parent, const char* name ) - QFrame *frameRuler = new QFrame( this ); + Q3Frame *frameRuler = new Q3Frame( this ); //US frameRuler->setFrameShape( QFrame::HLine ); @@ -66,3 +69,3 @@ ViewContainer::ViewContainer( QWidget *parent, const char* name ) - mDetailsStack = new QWidgetStack( this ); + mDetailsStack = new Q3WidgetStack( this ); topLayout->addWidget( mDetailsStack, 1 ); @@ -161,4 +164,4 @@ void ViewContainer::setReadOnly( bool state ) -#ifndef KAB_EMBEDDED -#include "detailsviewcontainer.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_detailsviewcontainer.cpp" #endif //KAB_EMBEDDED diff --git a/kaddressbook/details/detailsviewcontainer.h b/kaddressbook/details/detailsviewcontainer.h index 9684736..f310a30 100644 --- a/kaddressbook/details/detailsviewcontainer.h +++ b/kaddressbook/details/detailsviewcontainer.h @@ -26,3 +26,3 @@ -#include <qptrlist.h> +#include <q3ptrlist.h> @@ -31,3 +31,3 @@ class QComboBox; -class QWidgetStack; +class Q3WidgetStack; @@ -96,6 +96,6 @@ class ViewContainer : public QWidget KABBasicLook *mCurrentLook; - QPtrList<KABLookFactory> mLookFactories; + Q3PtrList<KABLookFactory> mLookFactories; QComboBox *mStyleCombo; - QWidgetStack *mDetailsStack; + Q3WidgetStack *mDetailsStack; }; diff --git a/kaddressbook/details/look_basic.cpp b/kaddressbook/details/look_basic.cpp index 0245686..48cc42a 100644 --- a/kaddressbook/details/look_basic.cpp +++ b/kaddressbook/details/look_basic.cpp @@ -28,3 +28,3 @@ KABBasicLook::KABBasicLook( QWidget *parent, const char *name ) - : QVBox( parent, name ), mReadOnly( false ) + : Q3VBox( parent, name ), mReadOnly( false ) { @@ -72,4 +72,4 @@ 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 @@ -27,3 +27,3 @@ #include <kabc/addressbook.h> -#include <qvbox.h> +#include <q3vbox.h> @@ -43,3 +43,3 @@ class KConfig; */ -class KABBasicLook : public QVBox +class KABBasicLook : public Q3VBox { 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 @@ -191,6 +191,6 @@ 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 ); @@ -416,4 +416,4 @@ void KABDetailedView::restoreSettings( KConfig *config ) -#ifndef KAB_EMBEDDED -#include "look_details.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_look_details.cpp" #endif //KAB_EMBEDDED diff --git a/kaddressbook/details/look_details.h b/kaddressbook/details/look_details.h index e8d50a9..b59d3a7 100644 --- a/kaddressbook/details/look_details.h +++ b/kaddressbook/details/look_details.h @@ -132,4 +132,4 @@ class KABDetailedView : public KABBasicLook - QPopupMenu *mMenuBorderedBG; - QPopupMenu *mMenuTiledBG; + Q3PopupMenu *mMenuBorderedBG; + Q3PopupMenu *mMenuTiledBG; 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 @@ -26,3 +26,3 @@ #include "look_html.h" -#include <qscrollview.h> +#include <q3scrollview.h> #include "kabprefs.h" @@ -53,4 +53,4 @@ void KABHtmlView::setAddressee( const KABC::Addressee &addr ) -#ifndef KAB_EMBEDDED -#include "look_html.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_look_html.cpp" #endif //KAB_EMBEDDED diff --git a/kaddressbook/emaileditwidget.cpp b/kaddressbook/emaileditwidget.cpp index e72face..09df47f 100644 --- a/kaddressbook/emaileditwidget.cpp +++ b/kaddressbook/emaileditwidget.cpp @@ -30,3 +30,5 @@ #include <qtooltip.h> -#include <qlistbox.h> +#include <q3listbox.h> +//Added by qt3to4: +#include <Q3GridLayout> @@ -50,3 +52,3 @@ EmailEditWidget::EmailEditWidget( QWidget *parent, const char *name ) { - QGridLayout *topLayout = new QGridLayout( this, 2, 2 ); + Q3GridLayout *topLayout = new Q3GridLayout( this, 2, 2 ); topLayout->setSpacing( KDialog::spacingHint() ); @@ -57,3 +59,3 @@ EmailEditWidget::EmailEditWidget( QWidget *parent, const char *name ) topLayout->addWidget( label, 0, 0 ); - label->setAlignment( AlignCenter ); + label->setAlignment( Qt::AlignCenter ); QPushButton *editButton = new QPushButton( i18n( "Edit Email Addresses..." ), this); @@ -139,3 +141,3 @@ EmailEditDialog::EmailEditDialog( const QStringList &list, QWidget *parent, - QGridLayout *topLayout = new QGridLayout( page, 4, 3 ); + Q3GridLayout *topLayout = new Q3GridLayout( page, 4, 3 ); @@ -156,3 +158,3 @@ EmailEditDialog::EmailEditDialog( const QStringList &list, QWidget *parent, - mEmailListBox = new QListBox( page ); + mEmailListBox = new Q3ListBox( page ); @@ -274,4 +276,4 @@ void EmailEditDialog::emailChanged() -#ifndef KAB_EMBEDDED -#include "emaileditwidget.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_emaileditwidget.cpp" #endif //KAB_EMBEDDED diff --git a/kaddressbook/emaileditwidget.h b/kaddressbook/emaileditwidget.h index acdecaf..618acee 100644 --- a/kaddressbook/emaileditwidget.h +++ b/kaddressbook/emaileditwidget.h @@ -31,7 +31,7 @@ -class QButtonGroup; +class Q3ButtonGroup; class QCheckBox; -class QListView; -class QListBox; -class QTextEdit; +class Q3ListView; +class Q3ListBox; +class Q3TextEdit; class QToolButton; @@ -91,3 +91,3 @@ class EmailEditDialog : public KDialogBase KLineEdit *mEmailEdit; - QListBox *mEmailListBox; + Q3ListBox *mEmailListBox; QPushButton *mAddButton; diff --git a/kaddressbook/extensionmanager.cpp b/kaddressbook/extensionmanager.cpp index 46defa1..5356224 100644 --- a/kaddressbook/extensionmanager.cpp +++ b/kaddressbook/extensionmanager.cpp @@ -24,2 +24,4 @@ #include <qapplication.h> +//Added by qt3to4: +#include <Q3HBoxLayout> #include <kactionclasses.h> @@ -44,3 +46,3 @@ ExtensionManager::ExtensionManager( KABCore *core, QWidget *parent, const char *name ) - : QScrollView( parent, name ), mCore( core ), mCurrentExtensionWidget( 0 ) + : Q3ScrollView( parent, name ), mCore( core ), mCurrentExtensionWidget( 0 ) { @@ -60,3 +62,3 @@ ExtensionManager::ExtensionManager( KABCore *core, QWidget *parent, mWidgetBox = new QWidget( viewport() ); - new QHBoxLayout (mWidgetBox ); + new Q3HBoxLayout (mWidgetBox ); addChild( mWidgetBox ); @@ -150,3 +152,3 @@ void ExtensionManager::createExtensionWidgets() mExtensionWidgetList.setAutoDelete( true ); - QPtrListIterator<ExtensionWidget> wdgIt( mExtensionWidgetList ); + Q3PtrListIterator<ExtensionWidget> wdgIt( mExtensionWidgetList ); ExtensionWidget *wdg = 0; @@ -161,3 +163,3 @@ void ExtensionManager::createExtensionWidgets() - QHBoxLayout *hbl = (QHBoxLayout *) mWidgetBox->layout();; + Q3HBoxLayout *hbl = (Q3HBoxLayout *) mWidgetBox->layout();; @@ -246,4 +248,4 @@ void ExtensionManager::createExtensionWidgets() -#ifndef KAB_EMBEDDED -#include "extensionmanager.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_extensionmanager.cpp" #endif //KAB_EMBEDDED diff --git a/kaddressbook/extensionmanager.h b/kaddressbook/extensionmanager.h index 611a037..84c948b 100644 --- a/kaddressbook/extensionmanager.h +++ b/kaddressbook/extensionmanager.h @@ -26,5 +26,5 @@ -#include <qhbox.h> -#include <qscrollview.h> -#include <qptrlist.h> +#include <q3hbox.h> +#include <q3scrollview.h> +#include <q3ptrlist.h> @@ -36,3 +36,3 @@ class KSelectAction; -class ExtensionManager : public QScrollView +class ExtensionManager : public Q3ScrollView { @@ -82,3 +82,3 @@ class ExtensionManager : public QScrollView ExtensionWidget *mCurrentExtensionWidget; - QPtrList<ExtensionWidget> mExtensionWidgetList; + Q3PtrList<ExtensionWidget> mExtensionWidgetList; diff --git a/kaddressbook/extensionwidget.cpp b/kaddressbook/extensionwidget.cpp index 69f4aa8..7c3b415 100644 --- a/kaddressbook/extensionwidget.cpp +++ b/kaddressbook/extensionwidget.cpp @@ -80,5 +80,4 @@ ConfigureWidget *ExtensionFactory::configureWidget( QWidget*, const char* ) -#ifndef KAB_EMBEDDED -#include "extensionwidget.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_extensionwidget.cpp" #endif //KAB_EMBEDDED - diff --git a/kaddressbook/extensionwidget.h b/kaddressbook/extensionwidget.h index fc91f21..9fcfba9 100644 --- a/kaddressbook/extensionwidget.h +++ b/kaddressbook/extensionwidget.h @@ -88,5 +88,5 @@ 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 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 @@ -23,3 +23,3 @@ -#include <qbuttongroup.h> +#include <q3buttongroup.h> #include <qcombobox.h> @@ -27,5 +27,12 @@ #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> @@ -79,3 +86,3 @@ extern "C" { -class ContactItem : public QListViewItem +class ContactItem : public Q3ListViewItem { @@ -84,3 +91,3 @@ class ContactItem : public QListViewItem const QString &email = QString::null ) : - QListViewItem( parent ), + Q3ListViewItem( parent ), mAddressee( addressee ), @@ -123,3 +130,3 @@ DistributionListWidget::DistributionListWidget( KABCore *core, QWidget *parent, { - QGridLayout *topLayout = new QGridLayout( this, 3, 4, KDialog::marginHint(), + Q3GridLayout *topLayout = new Q3GridLayout( this, 3, 4, KDialog::marginHint(), KDialog::spacingHint() ); @@ -168,4 +175,4 @@ DistributionListWidget::DistributionListWidget( KABCore *core, QWidget *parent, SLOT( selectionContactViewChanged() ) ); - connect( mContactView, SIGNAL( dropped( QDropEvent*, QListViewItem* ) ), - SLOT( dropped( QDropEvent*, QListViewItem* ) ) ); + connect( mContactView, SIGNAL( dropped( QDropEvent*, Q3ListViewItem* ) ), + SLOT( dropped( QDropEvent*, Q3ListViewItem* ) ) ); @@ -412,3 +419,3 @@ QString DistributionListWidget::identifier() const -void DistributionListWidget::dropped( QDropEvent *e, QListViewItem* ) +void DistributionListWidget::dropped( QDropEvent *e, Q3ListViewItem* ) { @@ -434,3 +441,3 @@ void DistributionListView::dragEnterEvent( QDragEnterEvent* e ) #ifndef KAB_EMBEDDED - bool canDecode = QTextDrag::canDecode( e ); + bool canDecode = Q3TextDrag::canDecode( e ); e->accept( canDecode ); @@ -442,3 +449,3 @@ void DistributionListView::viewportDragMoveEvent( QDragMoveEvent *e ) #ifndef KAB_EMBEDDED - bool canDecode = QTextDrag::canDecode( e ); + bool canDecode = Q3TextDrag::canDecode( e ); e->accept( canDecode ); @@ -463,6 +470,6 @@ EmailSelector::EmailSelector( const QStringList &emails, { - 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 ); @@ -481,3 +488,3 @@ QString EmailSelector::selected() { - QButton *button = mButtonGroup->selected(); + QAbstractButton *button = mButtonGroup->selected(); if ( button ) @@ -498,4 +505,4 @@ 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 @@ -30,7 +30,12 @@ #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; @@ -59,3 +64,3 @@ class DistributionListWidget : public ExtensionWidget void save(); - void dropped( QDropEvent*, QListViewItem* ); + void dropped( QDropEvent*, Q3ListViewItem* ); @@ -122,3 +127,3 @@ class EmailSelector : public KDialogBase private: - QButtonGroup *mButtonGroup; + Q3ButtonGroup *mButtonGroup; }; diff --git a/kaddressbook/features/mergewidget.cpp b/kaddressbook/features/mergewidget.cpp index 2476e42..1becc2f 100644 --- a/kaddressbook/features/mergewidget.cpp +++ b/kaddressbook/features/mergewidget.cpp @@ -25,2 +25,4 @@ #include <qpushbutton.h> +//Added by qt3to4: +#include <Q3GridLayout> @@ -65,3 +67,3 @@ extern "C" { -class ContactItem : public QListViewItem +class ContactItem : public Q3ListViewItem { @@ -69,3 +71,3 @@ class ContactItem : public QListViewItem ContactItem( KListView *parent, const KABC::Addressee &addressee ) - : QListViewItem( parent ), mAddressee( addressee ) + : Q3ListViewItem( parent ), mAddressee( addressee ) { @@ -96,3 +98,3 @@ MergeWidget::MergeWidget( KABCore *core, QWidget *parent, const char *name ) - QGridLayout *topLayout = new QGridLayout( this, 3, 2, KDialog::marginHint(), + Q3GridLayout *topLayout = new Q3GridLayout( this, 3, 2, KDialog::marginHint(), KDialog::spacingHint() ); @@ -216,3 +218,3 @@ void MergeWidget::mergeAndRemove() mBlockUpdate = true; - core()->deleteContacts( oldUID ); + core()->deleteContacts( QStringList(oldUID) ); core()->setContactSelected( mMasterAddressee.uid() ); @@ -371,4 +373,4 @@ void MergeWidget::doMerge( const KABC::Addressee &addr ) -#ifndef KAB_EMBEDDED -#include "mergewidget.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_mergewidget.cpp" #endif //KAB_EMBEDDED diff --git a/kaddressbook/features/mergewidget.h b/kaddressbook/features/mergewidget.h index 1063c80..bb16282 100644 --- a/kaddressbook/features/mergewidget.h +++ b/kaddressbook/features/mergewidget.h @@ -31,3 +31,3 @@ -class QListView; +class Q3ListView; diff --git a/kaddressbook/filter.cpp b/kaddressbook/filter.cpp index 12ab1e3..6462310 100644 --- a/kaddressbook/filter.cpp +++ b/kaddressbook/filter.cpp @@ -220,3 +220,3 @@ Filter::List Filter::restore( KConfig *config, QString baseGroup ) filter.mEnabled = true; - filter.mCategoryList = *it; + filter.mCategoryList = QStringList(*it); filter.mMatchRule = Matching; diff --git a/kaddressbook/filter.h b/kaddressbook/filter.h index f4ae123..508436d 100644 --- a/kaddressbook/filter.h +++ b/kaddressbook/filter.h @@ -28,3 +28,3 @@ #include <qstringlist.h> -#include <qvaluelist.h> +#include <q3valuelist.h> @@ -44,3 +44,3 @@ class Filter int criteria() const { return mCriteria;} - typedef QValueList<Filter> List; + typedef Q3ValueList<Filter> List; diff --git a/kaddressbook/filtereditdialog.cpp b/kaddressbook/filtereditdialog.cpp index ef9b979..40698a7 100644 --- a/kaddressbook/filtereditdialog.cpp +++ b/kaddressbook/filtereditdialog.cpp @@ -30,4 +30,4 @@ $Id$ -#include <qbuttongroup.h> -#include <qhbox.h> +#include <q3buttongroup.h> +#include <q3hbox.h> #include <qlabel.h> @@ -42,2 +42,4 @@ $Id$ #include <qwidget.h> +//Added by qt3to4: +#include <Q3GridLayout> @@ -66,3 +68,3 @@ FilterEditDialog::FilterEditDialog( QWidget *parent, const char *name ) 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() ); @@ -79,6 +81,6 @@ void FilterEditDialog::setFilter( const Filter &filter ) QStringList categories = filter.categories(); - QListViewItem *item = mCategoriesView->firstChild(); + Q3ListViewItem *item = mCategoriesView->firstChild(); while ( item != 0 ) { if ( categories.contains( item->text( 0 ) ) ) { - QCheckListItem *checkItem = static_cast<QCheckListItem*>( item ); + Q3CheckListItem *checkItem = static_cast<Q3CheckListItem*>( item ); checkItem->setOn( true ); @@ -107,5 +109,5 @@ Filter FilterEditDialog::filter() QStringList categories; - QListViewItem *item = mCategoriesView->firstChild(); + Q3ListViewItem *item = mCategoriesView->firstChild(); while ( item != 0 ) { - QCheckListItem *checkItem = static_cast<QCheckListItem*>( item ); + Q3CheckListItem *checkItem = static_cast<Q3CheckListItem*>( item ); if ( checkItem->isOn() ) @@ -143,3 +145,3 @@ void FilterEditDialog::initGUI() - QGridLayout *topLayout = new QGridLayout( page, 3, 2, 0, spacingHint() ); + Q3GridLayout *topLayout = new Q3GridLayout( page, 3, 2, 0, spacingHint() ); @@ -157,3 +159,3 @@ void FilterEditDialog::initGUI() - mMatchRuleGroup = new QHButtonGroup( i18n( "Category rule" ), page ); + mMatchRuleGroup = new Q3HButtonGroup( i18n( "Category rule" ), page ); mMatchRuleGroup->setExclusive( true ); @@ -166,3 +168,3 @@ void FilterEditDialog::initGUI() - 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 ); @@ -274,3 +276,3 @@ void FilterDialog::refresh() -void FilterDialog::selectionChanged( QListBoxItem *item ) +void FilterDialog::selectionChanged( Q3ListBoxItem *item ) { @@ -292,3 +294,3 @@ void FilterDialog::initGUI() - QGridLayout *topLayout = new QGridLayout( page, 1, 2, 0, spacingHint() ); + Q3GridLayout *topLayout = new Q3GridLayout( page, 1, 2, 0, spacingHint() ); @@ -296,8 +298,8 @@ void FilterDialog::initGUI() 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() ) ); @@ -312,4 +314,4 @@ void FilterDialog::initGUI() -#ifndef KAB_EMBEDDED -#include "filtereditdialog.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_filtereditdialog.cpp" #endif //KAB_EMBEDDED diff --git a/kaddressbook/filtereditdialog.h b/kaddressbook/filtereditdialog.h index 5a8bad1..64d2976 100644 --- a/kaddressbook/filtereditdialog.h +++ b/kaddressbook/filtereditdialog.h @@ -33,3 +33,3 @@ $Id$ -class QButtonGroup; +#include <Q3HButtonGroup> class QString; @@ -37,3 +37,3 @@ class QToolButton; class QWidget; -class QListBoxItem; +class Q3ListBoxItem; class QCheckBox; @@ -45,3 +45,2 @@ class KListView; #include <kdialogbase.h> -#include <qhbuttongroup.h> @@ -64,3 +63,3 @@ class FilterDialog : public KDialogBase void remove(); - void selectionChanged( QListBoxItem* ); + void selectionChanged( Q3ListBoxItem* ); @@ -100,3 +99,3 @@ class FilterEditDialog : public KDialogBase KListView *mCategoriesView; - QHButtonGroup *mMatchRuleGroup; + Q3HButtonGroup *mMatchRuleGroup; QCheckBox *mPrivate; diff --git a/kaddressbook/geowidget.cpp b/kaddressbook/geowidget.cpp index 13cd084..caff3b2 100644 --- a/kaddressbook/geowidget.cpp +++ b/kaddressbook/geowidget.cpp @@ -29,3 +29,8 @@ -#include <qtextstream.h> +#include <q3textstream.h> +//Added by qt3to4: +#include <QPaintEvent> +#include <Q3GridLayout> +#include <Q3Frame> +#include <QMouseEvent> #include <kglobal.h> @@ -33,2 +38,4 @@ +#include <QDesktopWidget> + #include <knuminput.h> @@ -43,6 +50,6 @@ #include <qapplication.h> -#include <qgroupbox.h> +#include <q3groupbox.h> #include <qlabel.h> #include <qlayout.h> -#include <qlistbox.h> +#include <q3listbox.h> #include <qpainter.h> @@ -61,3 +68,3 @@ GeoWidget::GeoWidget( QWidget *parent, const char *name ) - QGridLayout *topLayout = new QGridLayout( this, 4, 3 ); + Q3GridLayout *topLayout = new Q3GridLayout( this, 4, 3 ); topLayout->setMargin( KDialog::marginHint() ); @@ -71,3 +78,3 @@ GeoWidget::GeoWidget( QWidget *parent, const char *name ) topLayout->addMultiCellWidget( label, 0, 3, 0, 0 ); - label->setAlignment( AlignCenter ); + label->setAlignment( Qt::AlignCenter ); mGeoIsValid = new QCheckBox( i18n( "Use geo data" ), this ); @@ -169,5 +176,5 @@ GeoDialog::GeoDialog( QWidget *parent, const char *name ) { - QFrame *page = plainPage(); + Q3Frame *page = plainPage(); - QGridLayout *topLayout = new QGridLayout( page, 1, 1, marginHintSmall(), + Q3GridLayout *topLayout = new Q3GridLayout( page, 1, 1, marginHintSmall(), spacingHint() ); @@ -177,4 +184,4 @@ GeoDialog::GeoDialog( QWidget *parent, const char *name ) 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() ); @@ -431,4 +438,4 @@ void GeoDialog::loadCityList() - if ( file.open( IO_ReadOnly ) ) { - QTextStream s( &file ); + if ( file.open( QIODevice::ReadOnly ) ) { + Q3TextStream s( &file ); @@ -554,3 +561,3 @@ GeoMapWidget::GeoMapWidget( QWidget *parent, const char *name ) { - setBackgroundMode( NoBackground ); + setBackgroundMode( Qt::NoBackground ); @@ -626,4 +633,4 @@ void GeoMapWidget::paintEvent( QPaintEvent* ) -#ifndef KAB_EMBEDDED -#include "geowidget.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_geowidget.cpp" #endif //KAB_EMBEDDED diff --git a/kaddressbook/geowidget.h b/kaddressbook/geowidget.h index 3d39691..5b64370 100644 --- a/kaddressbook/geowidget.h +++ b/kaddressbook/geowidget.h @@ -29,2 +29,6 @@ #include <qwidget.h> +//Added by qt3to4: +#include <QLabel> +#include <QMouseEvent> +#include <QPaintEvent> #include <kdialogbase.h> diff --git a/kaddressbook/imagewidget.cpp b/kaddressbook/imagewidget.cpp index eec5e08..6ecf66d 100644 --- a/kaddressbook/imagewidget.cpp +++ b/kaddressbook/imagewidget.cpp @@ -39,3 +39,3 @@ #include <qcheckbox.h> -#include <qgroupbox.h> +#include <q3groupbox.h> #include <qlabel.h> @@ -45,2 +45,6 @@ #include <qapplication.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3Frame> @@ -51,7 +55,7 @@ ImageWidget::ImageWidget( QWidget *parent, const char *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() ); @@ -65,3 +69,3 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name ) mPhotoLabel->setScaledContents( true ); - mPhotoLabel->setFrameStyle( QFrame::Panel | QFrame::Sunken ); + mPhotoLabel->setFrameStyle( Q3Frame::Panel | Q3Frame::Sunken ); boxLayout->addMultiCellWidget( mPhotoLabel, 0, 3, 0, 0 ); @@ -77,3 +81,3 @@ 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 ); @@ -88,4 +92,4 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name ) - 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 ); @@ -95,3 +99,3 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name ) mLogoLabel->setScaledContents( true ); - mLogoLabel->setFrameStyle( QFrame::Panel | QFrame::Sunken ); + mLogoLabel->setFrameStyle( Q3Frame::Panel | Q3Frame::Sunken ); boxLayout->addMultiCellWidget( mLogoLabel, 0, 3, 0, 0 ); @@ -106,3 +110,3 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name ) - QHBox *hb2 = new QHBox ( logoBox ); + Q3HBox *hb2 = new Q3HBox ( logoBox ); mUseLogoUrl = new QCheckBox( i18n( "Store as URL" ), hb2 ); @@ -182,3 +186,3 @@ KABC::Picture ImageWidget::photo() const else { - QPixmap *px = mPhotoLabel->pixmap(); + const QPixmap *px = mPhotoLabel->pixmap(); if ( px ) { @@ -234,3 +238,3 @@ KABC::Picture ImageWidget::logo() const else { - QPixmap *px = mLogoLabel->pixmap(); + const QPixmap *px = mLogoLabel->pixmap(); if ( px ) { @@ -294,4 +298,4 @@ QPixmap ImageWidget::loadPixmap( const QString &url ) -#ifndef KAB_EMBEDDED -#include "imagewidget.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_imagewidget.cpp" #endif //KAB_EMBEDDED diff --git a/kaddressbook/imagewidget.h b/kaddressbook/imagewidget.h index bbfba58..9320a6b 100644 --- a/kaddressbook/imagewidget.h +++ b/kaddressbook/imagewidget.h @@ -27,2 +27,5 @@ #include <qwidget.h> +//Added by qt3to4: +#include <QPixmap> +#include <QLabel> diff --git a/kaddressbook/incsearchwidget.cpp b/kaddressbook/incsearchwidget.cpp index 5f8b83d..a54d1cd 100644 --- a/kaddressbook/incsearchwidget.cpp +++ b/kaddressbook/incsearchwidget.cpp @@ -27,3 +27,6 @@ #include <qapplication.h> +#include <QDesktopWidget> #include <qcombobox.h> +//Added by qt3to4: +#include <Q3HBoxLayout> @@ -39,4 +42,5 @@ IncSearchWidget::IncSearchWidget( QWidget *parent, const char *name ) - : QWidget( parent, name ) { + setObjectName(name); + setParent(parent); #ifndef KAB_EMBEDDED @@ -45,3 +49,3 @@ IncSearchWidget::IncSearchWidget( QWidget *parent, const char *name ) - QHBoxLayout *layout = new QHBoxLayout( this, 2, KDialog::spacingHint() ); + Q3HBoxLayout *layout = new Q3HBoxLayout( this, 2, KDialog::spacingHint() ); @@ -49,3 +53,3 @@ IncSearchWidget::IncSearchWidget( QWidget *parent, const char *name ) QLabel *label = new QLabel( i18n( "Search:" ), this ); - label->setAlignment( QLabel::AlignVCenter | QLabel::AlignRight ); + label->setAlignment( Qt::AlignVCenter | Qt::AlignRight ); layout->addWidget( label ); @@ -178,4 +182,4 @@ int IncSearchWidget::currentItem() const } -#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 @@ -27,4 +27,7 @@ #include <qstring.h> -#include <qtl.h> +#include <q3tl.h> #include <qapplication.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <Q3GridLayout> @@ -75,5 +78,5 @@ JumpButtonBar::JumpButtonBar( KABCore *core, QWidget *parent, const char *name ) - 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 ); @@ -254,4 +257,4 @@ 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 @@ -28,7 +28,10 @@ #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; @@ -78,5 +81,5 @@ class JumpButtonBar : public QWidget - QGridLayout *mButtonLayout; + Q3GridLayout *mButtonLayout; QStringList mCharacters; - QPtrList<JumpButton> mButtons; + Q3PtrList<JumpButton> mButtons; }; diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index ab2824c..03b44d1 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -41,3 +41,13 @@ $Id$ #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> @@ -49,6 +59,6 @@ $Id$ #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> @@ -90,3 +100,3 @@ $Id$ -#include <qapp.h> +#include <qapplication.h> #include <qmenubar.h> @@ -131,8 +141,8 @@ $Id$ #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> @@ -177,3 +187,3 @@ class KABCatPrefs : public QDialog setCaption( i18n("Manage new Categories") ); - QVBoxLayout* lay = new QVBoxLayout( this ); + Q3VBoxLayout* lay = new Q3VBoxLayout( this ); lay->setSpacing( 3 ); @@ -182,3 +192,3 @@ class KABCatPrefs : public QDialog 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 ); @@ -209,3 +219,3 @@ class KABFormatPrefs : public QDialog setCaption( i18n("Set formatted name") ); - QVBoxLayout* lay = new QVBoxLayout( this ); + Q3VBoxLayout* lay = new Q3VBoxLayout( this ); lay->setSpacing( 3 ); @@ -214,3 +224,3 @@ class KABFormatPrefs : public QDialog 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 ); @@ -247,3 +257,3 @@ class KAex2phonePrefs : public QDialog setCaption( i18n("Export to phone options") ); - QVBoxLayout* lay = new QVBoxLayout( this ); + Q3VBoxLayout* lay = new Q3VBoxLayout( this ); lay->setSpacing( 3 ); @@ -252,5 +262,5 @@ class KAex2phonePrefs : public QDialog 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 ); @@ -258,3 +268,3 @@ class KAex2phonePrefs : public QDialog lay->addWidget( temphb ); - temphb = new QHBox( this ); + temphb = new Q3HBox( this ); new QLabel( i18n("Connection: "), temphb ); @@ -262,3 +272,3 @@ class KAex2phonePrefs : public QDialog lay->addWidget( temphb ); - temphb = new QHBox( this ); + temphb = new Q3HBox( this ); new QLabel( i18n("Model(opt.): "), temphb ); @@ -269,3 +279,3 @@ class KAex2phonePrefs : public QDialog 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 ); @@ -409,3 +419,3 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const } -void KABCore::receiveStart( const QCString& cmsg, const QByteArray& data ) +void KABCore::receiveStart( const Q3CString& cmsg, const QByteArray& data ) { @@ -423,5 +433,5 @@ void KABCore::loadDataAfterStart() #ifndef DESKTOP_VERSION - disconnect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT (receiveStart ( const QCString &, const QByteArray & ))); + disconnect(qApp, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )), this, SLOT (receiveStart ( const Q3CString &, const QByteArray & ))); - QObject::connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); + QObject::connect(qApp, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const Q3CString &, const QByteArray & ))); if ( !mCStringMess.isEmpty() ) @@ -455,3 +465,3 @@ KABCore::~KABCore() } -void KABCore::receive( const QCString& cmsg, const QByteArray& data ) +void KABCore::receive( const Q3CString& cmsg, const QByteArray& data ) { @@ -459,3 +469,3 @@ void KABCore::receive( const QCString& cmsg, const QByteArray& data ) if ( cmsg == "setDocument(QString)" ) { - QDataStream stream( data, IO_ReadOnly ); + QDataStream stream( const_cast<QByteArray*>(&data), QIODevice::ReadOnly ); QString fileName; @@ -482,3 +492,3 @@ void KABCore::toggleBeamReceive( ) infrared = new QCopChannel("QPE/Application/addressbook",this, "channelAB" ) ; - QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(receive( const QCString&, const QByteArray& ))); + QObject::connect( infrared, SIGNAL (received ( const Q3CString &, const QByteArray & )),this, SLOT(receive( const Q3CString&, const QByteArray& ))); #endif @@ -562,3 +572,3 @@ void KABCore::restoreSettings() #endif - QValueList<int> splitterSize;// = KABPrefs::instance()->mDetailsSplitter; + Q3ValueList<int> splitterSize;// = KABPrefs::instance()->mDetailsSplitter; if ( true /*splitterSize.count() == 0*/ ) { @@ -652,6 +662,6 @@ 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; @@ -797,3 +807,3 @@ void KABCore::mailVCard( const QStringList& uids ) - if ( outFile.open(IO_WriteOnly) ) { // file opened successfully + if ( outFile.open(QIODevice::WriteOnly) ) { // file opened successfully KABC::VCardConverter converter; @@ -803,4 +813,4 @@ void KABCore::mailVCard( const QStringList& uids ) - QTextStream t( &outFile ); // use a text stream - t.setEncoding( QTextStream::UnicodeUTF8 ); + Q3TextStream t( &outFile ); // use a text stream + t.setEncoding( Q3TextStream::UnicodeUTF8 ); t << vcard; @@ -1018,7 +1028,7 @@ void KABCore::beamVCard(const QStringList& uids) 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(); @@ -1299,6 +1309,6 @@ 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; @@ -1858,3 +1868,3 @@ void KABCore::initGUI() #ifndef KAB_EMBEDDED - QHBoxLayout *topLayout = new QHBoxLayout( this ); + Q3HBoxLayout *topLayout = new Q3HBoxLayout( this ); topLayout->setSpacing( KDialogBase::spacingHint() ); @@ -1866,3 +1876,3 @@ void KABCore::initGUI() - QVBox *viewSpace = new QVBox( mDetailsSplitter ); + Q3VBox *viewSpace = new Q3VBox( mDetailsSplitter ); mIncSearchWidget = new IncSearchWidget( viewSpace ); @@ -1890,10 +1900,10 @@ void KABCore::initGUI() // 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 ); @@ -1902,3 +1912,3 @@ void KABCore::initGUI() - QBoxLayout *topLayout; + Q3BoxLayout *topLayout; @@ -1911,3 +1921,3 @@ void KABCore::initGUI() #ifdef DESKTOP_VERSION - topLayout = new QHBoxLayout( this ); + topLayout = new Q3HBoxLayout( this ); @@ -1926,3 +1936,3 @@ void KABCore::initGUI() if ( QApplication::desktop()->width() > 480 ) { - topLayout = new QHBoxLayout( this ); + topLayout = new Q3HBoxLayout( this ); mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); @@ -1931,3 +1941,3 @@ void KABCore::initGUI() - topLayout = new QHBoxLayout( this ); + topLayout = new Q3HBoxLayout( this ); mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Vertical, this); @@ -2036,3 +2046,3 @@ void KABCore::initActions() //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" ); @@ -2043,6 +2053,6 @@ void KABCore::initActions() - 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" ); @@ -2085,18 +2095,18 @@ void KABCore::initActions() 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(), @@ -2113,3 +2123,3 @@ void KABCore::initActions() mActionDelete = new KAction( i18n( "&Delete Contact" ), "editdelete", - Key_Delete, this, SLOT( deleteContacts() ), + Qt::Key_Delete, this, SLOT( deleteContacts() ), actionCollection(), "edit_delete" ); @@ -2248,5 +2258,5 @@ void KABCore::addActionsManually() #ifdef KAB_EMBEDDED - QPopupMenu *fileMenu = new QPopupMenu( this ); - QPopupMenu *editMenu = new QPopupMenu( this ); - QPopupMenu *helpMenu = new QPopupMenu( this ); + Q3PopupMenu *fileMenu = new Q3PopupMenu( this ); + Q3PopupMenu *editMenu = new Q3PopupMenu( this ); + Q3PopupMenu *helpMenu = new Q3PopupMenu( this ); @@ -2278,3 +2288,3 @@ void KABCore::addActionsManually() QPEMenuBar *menuBarTB = new QPEMenuBar( tb ); - QPopupMenu *popupBarTB = new QPopupMenu( this ); + Q3PopupMenu *popupBarTB = new Q3PopupMenu( this ); menuBarTB->insertItem( SmallIcon( "z_menu" ) , popupBarTB); @@ -2633,3 +2643,3 @@ void KABCore::configureResources() { - KRES::KCMKResources dlg( this, "" , 0 ); + KRES::KCMKResources dlg( this, "" , QStringList() ); @@ -2729,3 +2739,3 @@ void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString } - QProgressBar bar(count,0 ); + Q3ProgressBar bar(count,0 ); int w = 300; @@ -2910,3 +2920,3 @@ KABC::Addressee KABCore::getLastSyncAddressee() lse.setRevision( mLastAddressbookSync ); - lse.setCategories( i18n("SyncEvent") ); + lse.setCategories( QStringList(i18n("SyncEvent")) ); mAddressBook->insertAddressee( lse ); @@ -3101,3 +3111,3 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo addresseeRSync.setRevision( mLastAddressbookSync ); - addresseeRSync.setCategories( i18n("SyncAddressee") ); + addresseeRSync.setCategories( QStringList(i18n("SyncAddressee")) ); } diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h index ec6a9ec..4351720 100644 --- a/kaddressbook/kabcore.h +++ b/kaddressbook/kabcore.h @@ -30,3 +30,3 @@ #endif //KAB_EMBEDDED -#include <qdict.h> +#include <q3dict.h> #include <qtimer.h> @@ -34,3 +34,7 @@ #include <qwidget.h> -#include <qpopupmenu.h> +#include <q3popupmenu.h> +//Added by qt3to4: +#include <Q3CString> +#include <QPixmap> +#include <QResizeEvent> #include <ksyncmanager.h> @@ -87,5 +91,5 @@ class KABCore : public QWidget, public KSyncInterface //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(); @@ -137,4 +141,4 @@ class KABCore : public QWidget, public KSyncInterface #ifdef KAB_EMBEDDED - inline QPopupMenu* getImportMenu() { return ImportMenu;} - inline QPopupMenu* getExportMenu() { return ExportMenu;} + inline Q3PopupMenu* getImportMenu() { return ImportMenu;} + inline Q3PopupMenu* getExportMenu() { return ExportMenu;} #endif //KAB_EMBEDDED @@ -368,4 +372,4 @@ class KABCore : public QWidget, public KSyncInterface 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( ); @@ -396,3 +400,3 @@ class KABCore : public QWidget, public KSyncInterface private: - QCString mCStringMess; + Q3CString mCStringMess; QByteArray mByteData; @@ -488,10 +492,10 @@ class KABCore : public QWidget, public KSyncInterface - 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 @@ -526,3 +530,3 @@ class KABCore : public QWidget, public KSyncInterface QString sentSyncFile(); - QPopupMenu *syncMenu; + Q3PopupMenu *syncMenu; KSyncManager* syncManager; diff --git a/kaddressbook/kabprefs.cpp b/kaddressbook/kabprefs.cpp index 42d541b..6f9c995 100644 --- a/kaddressbook/kabprefs.cpp +++ b/kaddressbook/kabprefs.cpp @@ -27,3 +27,3 @@ -#include <qtextstream.h> +#include <q3textstream.h> #include <qfile.h> @@ -93,3 +93,3 @@ KABPrefs::KABPrefs() addItemString( "CurrentView", &mCurrentView, defaultView ); - addItemStringList( "ViewNames", &mViewNames, defaultView ); + addItemStringList( "ViewNames", &mViewNames, QStringList(defaultView) ); diff --git a/kaddressbook/kabprefs.h b/kaddressbook/kabprefs.h index ddbc0c0..aff725e 100644 --- a/kaddressbook/kabprefs.h +++ b/kaddressbook/kabprefs.h @@ -27,3 +27,5 @@ #include <qstringlist.h> -#include <qdict.h> +#include <q3dict.h> +//Added by qt3to4: +#include <Q3ValueList> @@ -75,4 +77,4 @@ class KABPrefs : public KPimPrefs bool mAskForDelete; - QValueList<int> mExtensionsSplitter; - QValueList<int> mDetailsSplitter; + Q3ValueList<int> mExtensionsSplitter; + Q3ValueList<int> mDetailsSplitter; diff --git a/kaddressbook/kaddressbook.pro b/kaddressbook/kaddressbook.pro index cd38e5f..4eb1f7f 100644 --- a/kaddressbook/kaddressbook.pro +++ b/kaddressbook/kaddressbook.pro @@ -15,16 +15,16 @@ 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 @@ -33,6 +33,6 @@ 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 @@ -45,6 +45,6 @@ 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 @@ -206 +206,3 @@ xxport/sharpdtm_xxport.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 @@ -14,6 +14,6 @@ DEFINES += KAB_EMBEDDED KAB_NOSPLITTER #DEFINES += KORG_NOLVALTERNATION -LIBS += -lmicrokdepim -LIBS += -lmicrokde +LIBS += -lxmicrokdepim +LIBS += -lxmicrokde LIBS += -lmicroqtcompat -LIBS += -lmicrokabc +LIBS += -lxmicrokabc LIBS += -lqpe diff --git a/kaddressbook/kaddressbookmain.cpp b/kaddressbook/kaddressbookmain.cpp index c417226..b317974 100644 --- a/kaddressbook/kaddressbookmain.cpp +++ b/kaddressbook/kaddressbookmain.cpp @@ -27,4 +27,7 @@ #include <qmessagebox.h> -#include <qtoolbar.h> +#include <q3toolbar.h> #include <qapplication.h> +//Added by qt3to4: +#include <Q3CString> +#include <QCloseEvent> #else //KAB_EMBEDDED @@ -44,5 +47,5 @@ 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 @@ -53,5 +56,5 @@ KAddressBookMain::KAddressBookMain() : DCOPObject( "KAddressBookIface" ), KMainW // 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 ); @@ -87,3 +90,3 @@ KAddressBookMain::KAddressBookMain() : DCOPObject( "KAddressBookIface" ), KMainW #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 @@ -237,5 +240,4 @@ void KAddressBookMain::closeEvent( QCloseEvent* ce ) -#ifndef KAB_EMBEDDED -#include "kaddressbookmain.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_kaddressbookmain.cpp" #endif //KAB_EMBEDDED - diff --git a/kaddressbook/kaddressbookmain.h b/kaddressbook/kaddressbookmain.h index b6d9b4b..d3f5cc7 100644 --- a/kaddressbook/kaddressbookmain.h +++ b/kaddressbook/kaddressbookmain.h @@ -26,6 +26,8 @@ -#include <qptrlist.h> +#include <q3ptrlist.h> +//Added by qt3to4: +#include <QCloseEvent> #ifdef KAB_EMBEDDED -class QToolBar; +class Q3ToolBar; #include <qaction.h> @@ -54,5 +56,5 @@ 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 @@ -75,5 +77,5 @@ class KAddressBookMain : public KMainWindow, virtual public KAddressBookIface #ifndef KAB_EMBEDDED -//MOC_SKIP_BEGIN +#ifndef Q_MOC_RUN virtual ASYNC showContactEditor( QString uid ); -//MOC_SKIP_END +#endif #endif //KAB_EMBEDDED diff --git a/kaddressbook/kaddressbookview.cpp b/kaddressbook/kaddressbookview.cpp index 86898e2..4823b37 100644 --- a/kaddressbook/kaddressbookview.cpp +++ b/kaddressbook/kaddressbookview.cpp @@ -34,2 +34,4 @@ #include <qlayout.h> +//Added by qt3to4: +#include <Q3VBoxLayout> @@ -135,3 +137,3 @@ void KAddressBookView::initGUI() // Create the layout - QVBoxLayout *layout = new QVBoxLayout( this ); + Q3VBoxLayout *layout = new Q3VBoxLayout( this ); @@ -185,4 +187,4 @@ 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 +1,3 @@ +//Added by qt3to4: +#include <QDropEvent> /* @@ -42,3 +44,3 @@ class QDropEvent; #ifdef DESKTOP_VERSION -#include <qpaintdevicemetrics.h> +#include <q3paintdevicemetrics.h> #include <qprinter.h> @@ -177,5 +179,5 @@ class KAddressBookView : public QWidget #ifndef KAB_EMBEDDED -//MOC_SKIP_BEGIN +#ifndef Q_MOC_RUN virtual void setSelected( QString uid = QString::null, bool selected = true ) = 0; -//MOC_SKIP_END +#endif #else //KAB_EMBEDDED @@ -264,5 +266,5 @@ 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 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 @@ -23,8 +23,12 @@ -#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> @@ -47,3 +51,3 @@ NamePartWidget::NamePartWidget( const QString &title, QWidget *parent, { - QGridLayout* layout = new QGridLayout( this, 1, 1, KDialog::marginHintSmall(), + Q3GridLayout* layout = new Q3GridLayout( this, 1, 1, KDialog::marginHintSmall(), KDialog::spacingHintSmall() ); @@ -53,3 +57,3 @@ NamePartWidget::NamePartWidget( const QString &title, QWidget *parent, - mBox = new QListBox( this ); + mBox = new Q3ListBox( this ); mBox->setMaximumSize(70, 70); @@ -72,9 +76,9 @@ NamePartWidget::NamePartWidget( const QString &title, QWidget *parent, { - 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 ); @@ -99,4 +103,4 @@ NamePartWidget::NamePartWidget( const QString &title, QWidget *parent, - connect( mBox, SIGNAL( selectionChanged( QListBoxItem* ) ), - SLOT( selectionChanged( QListBoxItem* ) ) ); + connect( mBox, SIGNAL( selectionChanged( Q3ListBoxItem* ) ), + SLOT( selectionChanged( Q3ListBoxItem* ) ) ); connect( mEdit, SIGNAL( textChanged( const QString& ) ), @@ -145,3 +149,3 @@ void NamePartWidget::remove() -void NamePartWidget::selectionChanged( QListBoxItem *item ) +void NamePartWidget::selectionChanged( Q3ListBoxItem *item ) { @@ -159,3 +163,3 @@ AddresseeWidget::AddresseeWidget( QWidget *parent, const char *name ) { - QGridLayout *layout; + Q3GridLayout *layout; @@ -180,3 +184,3 @@ AddresseeWidget::AddresseeWidget( QWidget *parent, const char *name ) { - layout = new QGridLayout( this, 4, 2, KDialog::marginHintSmall(), + layout = new Q3GridLayout( this, 4, 2, KDialog::marginHintSmall(), KDialog::spacingHintSmall() ); @@ -192,3 +196,3 @@ AddresseeWidget::AddresseeWidget( QWidget *parent, const char *name ) { - layout = new QGridLayout( this, 2, 3, KDialog::marginHint(), + layout = new Q3GridLayout( this, 2, 3, KDialog::marginHint(), KDialog::spacingHint() ); @@ -235,4 +239,4 @@ void AddresseeWidget::saveSettings() -#ifndef KAB_EMBEDDED -#include "addresseewidget.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_addresseewidget.cpp" #endif //KAB_EMBEDDED diff --git a/kaddressbook/kcmconfigs/addresseewidget.h b/kaddressbook/kcmconfigs/addresseewidget.h index 09330c8..f2a95a8 100644 --- a/kaddressbook/kcmconfigs/addresseewidget.h +++ b/kaddressbook/kcmconfigs/addresseewidget.h @@ -31,4 +31,4 @@ class KLineEdit; -class QListBox; -class QListBoxItem; +class Q3ListBox; +class Q3ListBoxItem; class QPushButton; @@ -54,3 +54,3 @@ class NamePartWidget : public QWidget - void selectionChanged( QListBoxItem* ); + void selectionChanged( Q3ListBoxItem* ); void textChanged( const QString& ); @@ -60,3 +60,3 @@ class NamePartWidget : public QWidget - QListBox *mBox; + Q3ListBox *mBox; QPushButton *mAddButton; 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 @@ -24,2 +24,5 @@ #include <qlayout.h> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3Frame> @@ -36,4 +39,4 @@ ExtensionConfigDialog::ExtensionConfigDialog( ExtensionFactory *factory, KConfig { - QFrame *page = plainPage(); - QGridLayout *layout = new QGridLayout( page, 1, 1, marginHint(), spacingHint() ); + Q3Frame *page = plainPage(); + Q3GridLayout *layout = new Q3GridLayout( page, 1, 1, marginHint(), spacingHint() ); @@ -56,4 +59,4 @@ void ExtensionConfigDialog::slotOk() -#ifndef KAB_EMBEDDED -#include "extensionconfigdialog.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_extensionconfigdialog.cpp" #endif //KAB_EMBEDDED diff --git a/kaddressbook/kcmconfigs/kabconfigwidget.cpp b/kaddressbook/kcmconfigs/kabconfigwidget.cpp index 9e4db74..d2b7ef1 100644 --- a/kaddressbook/kcmconfigs/kabconfigwidget.cpp +++ b/kaddressbook/kcmconfigs/kabconfigwidget.cpp @@ -24,4 +24,4 @@ #include <qcheckbox.h> -#include <qframe.h> -#include <qgroupbox.h> +#include <q3frame.h> +#include <q3groupbox.h> #include <qlayout.h> @@ -33,3 +33,7 @@ #include <qfile.h> -#include <qvbox.h> +#include <q3vbox.h> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <Q3PtrList> +#include <Q3VBoxLayout> @@ -59,3 +63,3 @@ -class ExtensionItem : public QCheckListItem +class ExtensionItem : public Q3CheckListItem { @@ -64,6 +68,6 @@ class ExtensionItem : public QCheckListItem #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 ); @@ -92,3 +96,3 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * - QVBoxLayout *topLayout = new QVBoxLayout( this, 0, + Q3VBoxLayout *topLayout = new Q3VBoxLayout( this, 0, KDialog::spacingHintSmall() ); @@ -100,3 +104,3 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * QWidget *generalPage = new QWidget( this ); - QVBoxLayout *layout = new QVBoxLayout( generalPage, KDialog::marginHintSmall(), + Q3VBoxLayout *layout = new Q3VBoxLayout( generalPage, KDialog::marginHintSmall(), KDialog::spacingHintSmall() ); @@ -105,3 +109,3 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * QWidget *hBox = new QWidget( generalPage, "qhbox" ); - QHBoxLayout *hboxLayout = new QHBoxLayout( hBox); + Q3HBoxLayout *hboxLayout = new Q3HBoxLayout( hBox); KPrefsWidFont *detailsFont = @@ -119,3 +123,3 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * QWidget *vBox = new QWidget( generalPage, "qvbox" ); - QVBoxLayout *boxLayout = new QVBoxLayout( vBox ); + Q3VBoxLayout *boxLayout = new Q3VBoxLayout( vBox ); boxLayout->setAlignment( Qt::AlignTop ); @@ -156,3 +160,3 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * QWidget *extensionPage = new QWidget( this ); - QVBoxLayout *extensionLayout = new QVBoxLayout( extensionPage, KDialog::marginHintSmall(), + Q3VBoxLayout *extensionLayout = new Q3VBoxLayout( extensionPage, KDialog::marginHintSmall(), KDialog::spacingHintSmall() ); @@ -161,4 +165,4 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * - 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 ); @@ -191,6 +195,6 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * 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() ), @@ -297,4 +301,4 @@ void KABConfigWidget::saveExtensionSettings() - QPtrList<QListViewItem> list; - QListViewItemIterator it( mExtensionView ); + Q3PtrList<Q3ListViewItem> list; + Q3ListViewItemIterator it( mExtensionView ); while ( it.current() ) { @@ -330,3 +334,3 @@ void KABConfigWidget::configureExtension() -void KABConfigWidget::selectionChanged( QListViewItem *i ) +void KABConfigWidget::selectionChanged( Q3ListViewItem *i ) { @@ -339,3 +343,3 @@ void KABConfigWidget::selectionChanged( QListViewItem *i ) -void KABConfigWidget::itemClicked( QListViewItem *item ) +void KABConfigWidget::itemClicked( Q3ListViewItem *item ) { @@ -346,4 +350,4 @@ void KABConfigWidget::itemClicked( QListViewItem *item ) #ifndef KAB_EMBEDDED -ExtensionItem::ExtensionItem( QListView *parent, const QString &text ) - : QCheckListItem( parent, text, CheckBox ) +ExtensionItem::ExtensionItem( Q3ListView *parent, const QString &text ) + : Q3CheckListItem( parent, text, CheckBox ) { @@ -356,4 +360,4 @@ void ExtensionItem::setService( const KService::Ptr &ptr ) #else //KAB_EMBEDDED -ExtensionItem::ExtensionItem( QListView *parent, const QString &text, const QString &name, const QString &comment ) - : QCheckListItem( parent, text, CheckBox ) +ExtensionItem::ExtensionItem( Q3ListView *parent, const QString &text, const QString &name, const QString &comment ) + : Q3CheckListItem( parent, text, CheckBox ) { @@ -420,5 +424,4 @@ QString ExtensionItem::text( int column ) const -#ifndef KAB_EMBEDDED -#include "kabconfigwidget.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_kabconfigwidget.cpp" #endif //KAB_EMBEDDED - diff --git a/kaddressbook/kcmconfigs/kabconfigwidget.h b/kaddressbook/kcmconfigs/kabconfigwidget.h index f2a6b1b..4b6e58c 100644 --- a/kaddressbook/kcmconfigs/kabconfigwidget.h +++ b/kaddressbook/kcmconfigs/kabconfigwidget.h @@ -29,3 +29,3 @@ class QCheckBox; -class QListViewItem; +class Q3ListViewItem; class QPushButton; @@ -55,4 +55,4 @@ class KABConfigWidget : public KPrefsWidget void configureExtension(); - void selectionChanged( QListViewItem* ); - void itemClicked( QListViewItem* ); + void selectionChanged( Q3ListViewItem* ); + void itemClicked( Q3ListViewItem* ); 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 @@ -24,2 +24,4 @@ #include <qlayout.h> +//Added by qt3to4: +#include <Q3VBoxLayout> @@ -50,3 +52,3 @@ KCMKabConfig::KCMKabConfig( QWidget *parent, const char *name ) //abort(); - QVBoxLayout *layout = new QVBoxLayout( this ); + Q3VBoxLayout *layout = new Q3VBoxLayout( this ); mConfigWidget = new KABConfigWidget( (KABPrefs*)getPreferences(), this, "KABConfigWidget" ); @@ -89,4 +91,4 @@ const KAboutData* KCMKabConfig::aboutData() const -#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 @@ -30,2 +30,4 @@ #include <qpushbutton.h> +//Added by qt3to4: +#include <Q3GridLayout> @@ -38,3 +40,3 @@ #include <qmessagebox.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <kurl.h> @@ -54,3 +56,3 @@ KeyWidget::KeyWidget( QWidget *parent, const char *name ) { - QGridLayout *layout = new QGridLayout( this, 2, 2, KDialog::marginHint(), + Q3GridLayout *layout = new Q3GridLayout( this, 2, 2, KDialog::marginHint(), KDialog::spacingHint() ); @@ -138,3 +140,3 @@ void KeyWidget::addKey() 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>" ) ); @@ -154,3 +156,3 @@ 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>" ) ); @@ -165,6 +167,6 @@ void KeyWidget::addKey() - QTextStream s( &file ); + Q3TextStream s( &file ); QString data; - s.setEncoding( QTextStream::UnicodeUTF8 ); + s.setEncoding( Q3TextStream::UnicodeUTF8 ); s >> data; @@ -223,4 +225,4 @@ void KeyWidget::exportKey() KTempFile tempFile; - QTextStream *s = tempFile.textStream(); - s->setEncoding( QTextStream::UnicodeUTF8 ); + Q3TextStream *s = tempFile.textStream(); + s->setEncoding( Q3TextStream::UnicodeUTF8 ); (*s) << key.textData(); @@ -237,3 +239,3 @@ void KeyWidget::exportKey() QFile file( keyfile ); - if ( !file.open( IO_ReadWrite ) ) { + if ( !file.open( QIODevice::ReadWrite ) ) { QString text( i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ) ); @@ -244,4 +246,4 @@ void KeyWidget::exportKey() - QTextStream s( &file ); - s.setEncoding( QTextStream::UnicodeUTF8 ); + Q3TextStream s( &file ); + s.setEncoding( Q3TextStream::UnicodeUTF8 ); s << key.textData(); @@ -274,4 +276,4 @@ void KeyWidget::updateKeyCombo() -#ifndef KAB_EMBEDDED -#include "keywidget.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_keywidget.cpp" #endif //KAB_EMBEDDED diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp index 2f3531d..e373105 100644 --- a/kaddressbook/mainembedded.cpp +++ b/kaddressbook/mainembedded.cpp @@ -7,4 +7,3 @@ #include <qwindowsstyle.h> -#include <qplatinumstyle.h> -#include <qmainwindow.h> +#include <q3mainwindow.h> #include <qmessagebox.h> @@ -26,2 +25,3 @@ int main( int argc, char **argv ) { + if(!getenv("QPEDIR")) putenv("QPEDIR=/usr/lib/kdepimpi"); #ifndef DESKTOP_VERSION @@ -31,3 +31,2 @@ int main( int argc, char **argv ) QApplication a( argc, argv ); - QApplication::setStyle( new QPlatinumStyle ()); #ifdef _WIN32_ diff --git a/kaddressbook/nameeditdialog.cpp b/kaddressbook/nameeditdialog.cpp index 199f3d6..96822d8 100644 --- a/kaddressbook/nameeditdialog.cpp +++ b/kaddressbook/nameeditdialog.cpp @@ -25,4 +25,4 @@ #include <qlabel.h> -#include <qlistbox.h> -#include <qlistview.h> +#include <q3listbox.h> +#include <q3listview.h> #include <qtooltip.h> @@ -31,2 +31,4 @@ #include <qstring.h> +//Added by qt3to4: +#include <Q3GridLayout> @@ -59,3 +61,3 @@ 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() ); @@ -297,4 +299,4 @@ qDebug("NameEditDialog::slotHelp Help is not supported yet"); -#ifndef KAB_EMBEDDED -#include "nameeditdialog.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_nameeditdialog.cpp" #endif //KAB_EMBEDDED diff --git a/kaddressbook/old_mainwindow.cpp b/kaddressbook/old_mainwindow.cpp index 0e886d9..7a445c7 100644 --- a/kaddressbook/old_mainwindow.cpp +++ b/kaddressbook/old_mainwindow.cpp @@ -318,9 +318,9 @@ void MainWindow::initActions() 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 ); diff --git a/kaddressbook/phoneeditwidget.cpp b/kaddressbook/phoneeditwidget.cpp index df3b551..3661677 100644 --- a/kaddressbook/phoneeditwidget.cpp +++ b/kaddressbook/phoneeditwidget.cpp @@ -29,6 +29,6 @@ #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> @@ -36,2 +36,8 @@ #include <qapplication.h> +//Added by qt3to4: +#include <Q3ValueList> +#include <Q3GridLayout> +#include <Q3Frame> +#include <Q3PopupMenu> +#include <Q3VBoxLayout> @@ -59,3 +65,3 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name ) { - QGridLayout* gridLayout = new QGridLayout ( this, 2,2 ); + Q3GridLayout* gridLayout = new Q3GridLayout ( this, 2,2 ); @@ -69,4 +75,4 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name ) - sv = new QScrollView( this ); - sv->setFrameStyle ( QFrame::Plain ); + sv = new Q3ScrollView( this ); + sv->setFrameStyle ( Q3Frame::Plain ); sv->setLineWidth ( 0 ); @@ -75,4 +81,4 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name ) sv->addChild(mw); - sv->setResizePolicy( QScrollView::AutoOneFit ); - mainLayout = new QVBoxLayout ( mw ); + sv->setResizePolicy( Q3ScrollView::AutoOneFit ); + mainLayout = new Q3VBoxLayout ( mw ); mainLayout->setMargin( 0 ); @@ -92,3 +98,3 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name ) mTypeNumberEditList.setAutoDelete( true ); - mPopup = new QPopupMenu( this ); + mPopup = new Q3PopupMenu( this ); QStringList list = PhoneNumber::supportedTypeListNames(); @@ -228,3 +234,3 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name ) { - QGridLayout *layout = new QGridLayout( this, 4, 1 ); + Q3GridLayout *layout = new Q3GridLayout( this, 4, 1 ); //US layout->setSpacing( KDialog::spacingHint() ); @@ -238,3 +244,3 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name ) label->setPixmap( KGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Desktop, 0 ) ); - label->setAlignment( AlignCenter ); + label->setAlignment( Qt::AlignCenter ); //US layout->addMultiCellWidget( label, 0, 1, 3, 3 ); @@ -329,3 +335,3 @@ void PhoneEditWidget::setPhoneNumbers( const KABC::PhoneNumber::List &list ) - QValueList<int> defaultTypes; + Q3ValueList<int> defaultTypes; defaultTypes << KABC::PhoneNumber::Home; @@ -339,3 +345,3 @@ void PhoneEditWidget::setPhoneNumbers( const KABC::PhoneNumber::List &list ) // combos. - QValueList<int>::ConstIterator it; + Q3ValueList<int>::ConstIterator it; for( it = defaultTypes.begin(); it != defaultTypes.end(); ++it ) { @@ -489,6 +495,6 @@ void PhoneEditWidget::updateOtherEdit( PhoneTypeCombo *combo, PhoneTypeCombo *ot -class PhoneViewItem : public QListViewItem +class PhoneViewItem : public Q3ListViewItem { public: - PhoneViewItem( QListView *parent, const KABC::PhoneNumber &number ); + PhoneViewItem( Q3ListView *parent, const KABC::PhoneNumber &number ); @@ -513,4 +519,4 @@ private: -PhoneViewItem::PhoneViewItem( QListView *parent, const KABC::PhoneNumber &number ) - : QListViewItem( parent ), mPhoneNumber( number ) +PhoneViewItem::PhoneViewItem( Q3ListView *parent, const KABC::PhoneNumber &number ) + : Q3ListViewItem( parent ), mPhoneNumber( number ) { @@ -546,3 +552,3 @@ PhoneEditDialog::PhoneEditDialog( const KABC::PhoneNumber::List &list, QWidget * - QGridLayout *layout = new QGridLayout( page, 1, 2 ); + Q3GridLayout *layout = new Q3GridLayout( page, 1, 2 ); layout->setSpacing( spacingHint() ); @@ -554,3 +560,3 @@ PhoneEditDialog::PhoneEditDialog( const KABC::PhoneNumber::List &list, QWidget * - KButtonBox *buttonBox = new KButtonBox( page, Vertical ); + KButtonBox *buttonBox = new KButtonBox( page, Qt::Vertical ); @@ -567,3 +573,3 @@ PhoneEditDialog::PhoneEditDialog( const KABC::PhoneNumber::List &list, QWidget * connect( mListView, SIGNAL(selectionChanged()), SLOT(slotSelectionChanged()) ); - connect( mListView, SIGNAL(doubleClicked( QListViewItem *, const QPoint &, int )), this, SLOT( slotEditPhoneNumber())); + connect( mListView, SIGNAL(doubleClicked( Q3ListViewItem *, const QPoint &, int )), this, SLOT( slotEditPhoneNumber())); @@ -590,3 +596,3 @@ void PhoneEditDialog::slotAddPhoneNumber() if ( dlg.exec() ) { - QListViewItem* i = mListView->firstChild(); + Q3ListViewItem* i = mListView->firstChild(); KABC::PhoneNumber phoneNumber = dlg.phoneNumber(); @@ -622,3 +628,3 @@ void PhoneEditDialog::slotRemovePhoneNumber() mPhoneNumberList.remove( item->phoneNumber() ); - QListViewItem *currItem = mListView->currentItem(); + Q3ListViewItem *currItem = mListView->currentItem(); mListView->takeItem( currItem ); @@ -675,3 +681,3 @@ PhoneTypeDialog::PhoneTypeDialog( const KABC::PhoneNumber &phoneNumber, QLabel *label = 0; - QGridLayout *layout = new QGridLayout( page, 3, 2, marginHint(), spacingHint() ); + Q3GridLayout *layout = new Q3GridLayout( page, 3, 2, marginHint(), spacingHint() ); @@ -685,3 +691,3 @@ PhoneTypeDialog::PhoneTypeDialog( const KABC::PhoneNumber &phoneNumber, - mGroup = new QButtonGroup( 2, Horizontal, i18n( "Types" ), page ); + mGroup = new Q3ButtonGroup( 2, Qt::Horizontal, i18n( "Types" ), page ); layout->addMultiCellWidget( mGroup, 2, 2, 0, 1 ); @@ -728,4 +734,4 @@ KABC::PhoneNumber PhoneTypeDialog::phoneNumber() #endif -#ifndef KAB_EMBEDDED -#include "phoneeditwidget.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_phoneeditwidget.cpp" #endif //KAB_EMBEDDED diff --git a/kaddressbook/phoneeditwidget.h b/kaddressbook/phoneeditwidget.h index 5bb4226..2be3e2b 100644 --- a/kaddressbook/phoneeditwidget.h +++ b/kaddressbook/phoneeditwidget.h @@ -29,7 +29,11 @@ #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> @@ -38,3 +42,3 @@ -class QButtonGroup; +class Q3ButtonGroup; class QCheckBox; @@ -78,4 +82,4 @@ class PhoneEditWidget : public QWidget private: - QScrollView* sv; - QPopupMenu *mPopup; + Q3ScrollView* sv; + Q3PopupMenu *mPopup; int mPopupCount; @@ -85,4 +89,4 @@ class PhoneEditWidget : public QWidget QWidget* mw; - QVBoxLayout* mainLayout; - QPtrList <PhoneTypeNumberEdit> mTypeNumberEditList; + Q3VBoxLayout* mainLayout; + Q3PtrList <PhoneTypeNumberEdit> mTypeNumberEditList; @@ -97,3 +101,3 @@ public: { - QHBoxLayout * lay = new QHBoxLayout( this ); + Q3HBoxLayout * lay = new Q3HBoxLayout( this ); lay->setSpacing( 2 ); @@ -104,3 +108,3 @@ public: if ( QApplication::desktop()->width() <= 640 ) - mCombo->setSizeLimit ( 6 ); + mCombo->setMaxVisibleItems ( 6 ); mNumber = new KLineEdit( this ); diff --git a/kaddressbook/secrecywidget.cpp b/kaddressbook/secrecywidget.cpp index 4a2acc8..1c237c0 100644 --- a/kaddressbook/secrecywidget.cpp +++ b/kaddressbook/secrecywidget.cpp @@ -24,2 +24,4 @@ #include <qlayout.h> +//Added by qt3to4: +#include <Q3VBoxLayout> @@ -34,3 +36,3 @@ SecrecyWidget::SecrecyWidget( QWidget *parent, const char *name ) { - QVBoxLayout *layout = new QVBoxLayout( this, KDialog::marginHint(), + Q3VBoxLayout *layout = new Q3VBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); @@ -67,4 +69,4 @@ KABC::Secrecy SecrecyWidget::secrecy() const -#ifndef KAB_EMBEDDED -#include "secrecywidget.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_secrecywidget.cpp" #endif //KAB_EMBEDDED diff --git a/kaddressbook/undo.cpp b/kaddressbook/undo.cpp index 4442087..a6c1580 100644 --- a/kaddressbook/undo.cpp +++ b/kaddressbook/undo.cpp @@ -116,4 +116,4 @@ void RedoStack::redo() -#ifndef KAB_EMBEDDED -#include "undo.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_undo.cpp" #endif //KAB_EMBEDDED diff --git a/kaddressbook/undo.h b/kaddressbook/undo.h index 843bc26..a8ba2ee 100644 --- a/kaddressbook/undo.h +++ b/kaddressbook/undo.h @@ -27,3 +27,3 @@ #include <qobject.h> -#include <qptrstack.h> +#include <q3ptrstack.h> #include <qstring.h> @@ -69,3 +69,3 @@ class StackBase : public QObject - QPtrStack<Command> mCommandStack; + Q3PtrStack<Command> mCommandStack; }; diff --git a/kaddressbook/undocmds.cpp b/kaddressbook/undocmds.cpp index 5807dc0..e900b00 100644 --- a/kaddressbook/undocmds.cpp +++ b/kaddressbook/undocmds.cpp @@ -23,3 +23,3 @@ -#include <qtextstream.h> +#include <q3textstream.h> diff --git a/kaddressbook/viewconfigurefieldspage.cpp b/kaddressbook/viewconfigurefieldspage.cpp index 5daae1a..7366a0b 100644 --- a/kaddressbook/viewconfigurefieldspage.cpp +++ b/kaddressbook/viewconfigurefieldspage.cpp @@ -38,5 +38,9 @@ #include <qapplication.h> +#include <QDesktopWidget> #include <qlabel.h> -#include <qlistbox.h> +#include <q3listbox.h> #include <qlayout.h> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3BoxLayout> @@ -44,10 +48,10 @@ -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 ) {} @@ -108,3 +112,3 @@ void ViewConfigureFieldsPage::slotShowFields( int index ) for ( it = allFields.begin(); it != allFields.end(); ++it ) { - QListBoxItem *item = mSelectedBox->firstItem(); + Q3ListBoxItem *item = mSelectedBox->firstItem(); while( item ) { @@ -191,3 +195,3 @@ void ViewConfigureFieldsPage::slotMoveUp() if ( i > 0 ) { - QListBoxItem *item = mSelectedBox->item( i ); + Q3ListBoxItem *item = mSelectedBox->item( i ); mSelectedBox->takeItem( item ); @@ -203,3 +207,3 @@ void ViewConfigureFieldsPage::slotMoveDown() if ( i > -1 && i < (int)mSelectedBox->count() - 1 ) { - QListBoxItem *item = mSelectedBox->item( i ); + Q3ListBoxItem *item = mSelectedBox->item( i ); mSelectedBox->takeItem( item ); @@ -221,7 +225,7 @@ void ViewConfigureFieldsPage::initGUI() - 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() ); @@ -251,4 +255,4 @@ void ViewConfigureFieldsPage::initGUI() - mUnSelectedBox = new QListBox( this ); - mUnSelectedBox->setSelectionMode( QListBox::Extended ); + mUnSelectedBox = new Q3ListBox( this ); + mUnSelectedBox->setSelectionMode( Q3ListBox::Extended ); mUnSelectedBox->setMinimumHeight( 80 ); @@ -259,3 +263,3 @@ void ViewConfigureFieldsPage::initGUI() - mSelectedBox = new QListBox( this ); + mSelectedBox = new Q3ListBox( this ); //if ( QApplication::desktop()->width() < 320 ) { @@ -264,3 +268,3 @@ void ViewConfigureFieldsPage::initGUI() //} - mSelectedBox->setSelectionMode( QListBox::Extended ); + mSelectedBox->setSelectionMode( Q3ListBox::Extended ); mSelectedBox->setMinimumHeight( 80 ); @@ -272,7 +276,7 @@ void ViewConfigureFieldsPage::initGUI() - 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() ); @@ -303,7 +307,7 @@ void ViewConfigureFieldsPage::initGUI() - 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() ); @@ -342,3 +346,3 @@ void ViewConfigureFieldsPage::initGUI() connect( mSelectedBox, SIGNAL( selectionChanged() ), SLOT( slotButtonsEnabled() ) ); - connect( mSelectedBox, SIGNAL( currentChanged( QListBoxItem * ) ), SLOT( slotButtonsEnabled() ) ); + connect( mSelectedBox, SIGNAL( currentChanged( Q3ListBoxItem * ) ), SLOT( slotButtonsEnabled() ) ); @@ -348,4 +352,4 @@ void ViewConfigureFieldsPage::initGUI() -#ifndef KAB_EMBEDDED -#include "viewconfigurefieldspage.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_viewconfigurefieldspage.cpp" #endif //KAB_EMBEDDED diff --git a/kaddressbook/viewconfigurefieldspage.h b/kaddressbook/viewconfigurefieldspage.h index b27668c..42d132f 100644 --- a/kaddressbook/viewconfigurefieldspage.h +++ b/kaddressbook/viewconfigurefieldspage.h @@ -37,4 +37,4 @@ class QComboBox; -class QListBox; -class QListBoxItem; +class Q3ListBox; +class Q3ListBoxItem; class QPushButton; @@ -70,4 +70,4 @@ class ViewConfigureFieldsPage : public QWidget #endif //KAB_EMBEDDED - QListBox *mSelectedBox; - QListBox *mUnSelectedBox; + Q3ListBox *mSelectedBox; + Q3ListBox *mUnSelectedBox; QToolButton *mAddButton; diff --git a/kaddressbook/viewconfigurefilterpage.cpp b/kaddressbook/viewconfigurefilterpage.cpp index b085a5e..cdb778b 100644 --- a/kaddressbook/viewconfigurefilterpage.cpp +++ b/kaddressbook/viewconfigurefilterpage.cpp @@ -29,3 +29,3 @@ -#include <qbuttongroup.h> +#include <q3buttongroup.h> #include <qlabel.h> @@ -33,2 +33,5 @@ #include <qradiobutton.h> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <Q3VBoxLayout> @@ -46,5 +49,5 @@ ViewConfigureFilterPage::ViewConfigureFilterPage( QWidget *parent, { - 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 ) ) ); @@ -70,3 +73,3 @@ ViewConfigureFilterPage::ViewConfigureFilterPage( QWidget *parent, - QBoxLayout *comboLayout = new QHBoxLayout(); + Q3BoxLayout *comboLayout = new Q3HBoxLayout(); topLayout->addLayout( comboLayout ); @@ -134,4 +137,4 @@ void ViewConfigureFilterPage::buttonClicked( int id ) -#ifndef KAB_EMBEDDED -#include "viewconfigurefilterpage.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_viewconfigurefilterpage.cpp" #endif //KAB_EMBEDDED diff --git a/kaddressbook/viewconfigurefilterpage.h b/kaddressbook/viewconfigurefilterpage.h index 3be9564..fb39a61 100644 --- a/kaddressbook/viewconfigurefilterpage.h +++ b/kaddressbook/viewconfigurefilterpage.h @@ -28,3 +28,3 @@ -class QButtonGroup; +class Q3ButtonGroup; @@ -59,3 +59,3 @@ class ViewConfigureFilterPage : public QWidget - QButtonGroup *mFilterGroup; + Q3ButtonGroup *mFilterGroup; }; diff --git a/kaddressbook/viewconfigurewidget.cpp b/kaddressbook/viewconfigurewidget.cpp index 666e188..047df8c 100644 --- a/kaddressbook/viewconfigurewidget.cpp +++ b/kaddressbook/viewconfigurewidget.cpp @@ -26,3 +26,3 @@ -#include <qvbox.h> +#include <q3vbox.h> @@ -39,2 +39,5 @@ #include <qlayout.h> +//Added by qt3to4: +#include <Q3VBoxLayout> +#include <QPixmap> @@ -52,3 +55,3 @@ ViewConfigureWidget::ViewConfigureWidget( KABC::AddressBook *ab, QWidget *parent { - QVBoxLayout *topLayout = new QVBoxLayout( this ); + Q3VBoxLayout *topLayout = new Q3VBoxLayout( this ); @@ -59,3 +62,3 @@ ViewConfigureWidget::ViewConfigureWidget( KABC::AddressBook *ab, QWidget *parent // Add the first page, the attributes - QVBox *page = addPage( i18n( "Fields" ), QString::null, + Q3VBox *page = addPage( i18n( "Fields" ), QString::null, KGlobal::iconLoader()->loadIcon( "view_detailed", @@ -95,3 +98,3 @@ void ViewConfigureWidget::saveSettings( KConfig *config ) -QVBox *ViewConfigureWidget::addPage( const QString &item, const QString &header, +Q3VBox *ViewConfigureWidget::addPage( const QString &item, const QString &header, const QPixmap &pixmap ) @@ -101,3 +104,3 @@ QVBox *ViewConfigureWidget::addPage( const QString &item, const QString &header, -#include <qframe.h> +#include <q3frame.h> #include <qlabel.h> @@ -154,6 +157,4 @@ void ViewConfigureDialog::slotHelp() -#ifndef KAB_EMBEDDED -#include "viewconfigurewidget.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_viewconfigurewidget.cpp" #endif //KAB_EMBEDDED - - diff --git a/kaddressbook/viewconfigurewidget.h b/kaddressbook/viewconfigurewidget.h index 0c2b77c..e3b9b12 100644 --- a/kaddressbook/viewconfigurewidget.h +++ b/kaddressbook/viewconfigurewidget.h @@ -30,3 +30,3 @@ -class QVBox; +class Q3VBox; @@ -76,3 +76,3 @@ class ViewConfigureWidget : public ConfigureWidget */ - QVBox *addPage( const QString &item, const QString &header = QString::null, + Q3VBox *addPage( const QString &item, const QString &header = QString::null, const QPixmap &pixmap = QPixmap() ); diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp index b5d9419..5cfe3ad 100644 --- a/kaddressbook/viewmanager.cpp +++ b/kaddressbook/viewmanager.cpp @@ -52,3 +52,6 @@ $Id$ #include <qmessagebox.h> -#include <qpopupmenu.h> +#include <q3popupmenu.h> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <QDropEvent> #include <kconfigbase.h> @@ -63,3 +66,4 @@ $Id$ #include <qapplication.h> -#include <qwidgetstack.h> +#include <QDesktopWidget> +#include <q3widgetstack.h> @@ -119,3 +123,3 @@ void ViewManager::restoreSettings() - QDictIterator<KAddressBookView> it( mViewDict ); + Q3DictIterator<KAddressBookView> it( mViewDict ); for ( it.toFirst(); it.current(); ++it ) { @@ -133,3 +137,3 @@ void ViewManager::saveSettings() - QDictIterator<KAddressBookView> it( mViewDict ); + Q3DictIterator<KAddressBookView> it( mViewDict ); for ( it.toFirst(); it.current(); ++it ) { @@ -163,3 +167,3 @@ QStringList ViewManager::selectedEmails() const if ( mActiveView ) - return mActiveView->selectedEmails(); + return QStringList(mActiveView->selectedEmails()); else @@ -558,3 +562,3 @@ void ViewManager::startDrag() KMultipleDrag *drag = new KMultipleDrag( this ); - drag->addDragObject( new QTextDrag( AddresseeUtil::addresseesToClipboard(addrList), this ) ); + drag->addDragObject( new Q3TextDrag( AddresseeUtil::addresseesToClipboard(addrList), this ) ); KABC::Addressee::List::Iterator it; @@ -661,5 +665,5 @@ void ViewManager::initActions() #ifdef KAB_EMBEDDED - QPopupMenu *viewmenu = (QPopupMenu*)mCore->getViewMenu(); - QPopupMenu *settingsmenu = (QPopupMenu*)mCore->getSettingsMenu(); - QPopupMenu *filtermenu = (QPopupMenu*)mCore->getFilterMenu(); + Q3PopupMenu *viewmenu = (Q3PopupMenu*)mCore->getViewMenu(); + Q3PopupMenu *settingsmenu = (Q3PopupMenu*)mCore->getSettingsMenu(); + Q3PopupMenu *filtermenu = (Q3PopupMenu*)mCore->getFilterMenu(); #endif //KAB_EMBEDDED @@ -740,4 +744,4 @@ 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 ); @@ -745,4 +749,4 @@ void ViewManager::initGUI() -#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 @@ -28,4 +28,6 @@ #include <qstringlist.h> +//Added by qt3to4: +#include <QDropEvent> #include <kaddressbookview.h> -#include <qdict.h> +#include <q3dict.h> #include "filter.h" @@ -36,3 +38,3 @@ class KSelectAction; class KABCore; -class QWidgetStack; +class Q3WidgetStack; class QDropEvent; @@ -147,7 +149,7 @@ class ViewManager : public QWidget - QDict<KAddressBookView> mViewDict; - QDict<ViewFactory> mViewFactoryDict; + Q3Dict<KAddressBookView> mViewDict; + Q3Dict<ViewFactory> mViewFactoryDict; QStringList mViewNameList; - QWidgetStack *mViewWidgetStack; + Q3WidgetStack *mViewWidgetStack; KAddressBookView *mActiveView; diff --git a/kaddressbook/views/cardview.cpp b/kaddressbook/views/cardview.cpp index b6e053f..1a29f41 100644 --- a/kaddressbook/views/cardview.cpp +++ b/kaddressbook/views/cardview.cpp @@ -36,2 +36,10 @@ #include <qapplication.h> +//Added by qt3to4: +#include <QKeyEvent> +#include <Q3PtrList> +#include <QResizeEvent> +#include <QFocusEvent> +#include <QMouseEvent> +#include <QEvent> +#include <QWheelEvent> @@ -73,7 +81,7 @@ class CardViewTip : public QLabel { // -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) { @@ -163,3 +171,3 @@ class CardViewPrivate CardViewItemList mItemList; - QPtrList<CardViewSeparator> mSeparatorList; + Q3PtrList<CardViewSeparator> mSeparatorList; QFontMetrics *mFm; @@ -210,3 +218,3 @@ class CardViewItemPrivate QString mCaption; - QPtrList< CardViewItem::Field > mFieldList; + Q3PtrList< CardViewItem::Field > mFieldList; bool mSelected; @@ -315,3 +323,3 @@ void CardViewItem::paintCard(QPainter *p, QColorGroup &cg) // Go through the fields and draw them - QPtrListIterator< CardViewItem::Field > iter(d->mFieldList); + Q3PtrListIterator< CardViewItem::Field > iter(d->mFieldList); QString label, value; @@ -410,3 +418,3 @@ int CardViewItem::height( bool allowCache ) const int maxLines( mView->maxFieldLines() ); - QPtrListIterator< CardViewItem::Field > iter(d->mFieldList); + Q3PtrListIterator< CardViewItem::Field > iter(d->mFieldList); for (iter.toFirst(); iter.current(); ++iter) @@ -415,3 +423,3 @@ int CardViewItem::height( bool allowCache ) const continue; - lines = QMIN( (*iter)->second.contains('\n') + 1, maxLines ); + lines = QMIN( (*iter)->second.count('\n') + 1, maxLines ); fieldHeight += ( lines * fh ) + 2;//sp; @@ -452,3 +460,3 @@ void CardViewItem::removeField(const QString &label) - QPtrListIterator< CardViewItem::Field > iter(d->mFieldList); + Q3PtrListIterator< CardViewItem::Field > iter(d->mFieldList); for (iter.toFirst(); iter.current(); ++iter) @@ -525,3 +533,3 @@ QString CardViewItem::fieldValue(const QString &label) { - QPtrListIterator< CardViewItem::Field > iter(d->mFieldList); + Q3PtrListIterator< CardViewItem::Field > iter(d->mFieldList); for (iter.toFirst(); iter.current(); ++iter) @@ -571,3 +579,3 @@ void CardViewItem::showFullString( const QPoint &itempos, CardViewTip *tip ) 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; // } @@ -588,3 +596,3 @@ void CardViewItem::showFullString( const QPoint &itempos, CardViewTip *tip ) 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); } @@ -628,3 +636,3 @@ CardViewItem::Field *CardViewItem::fieldAt( const QPoint & itempos ) const if ( showEmpty || !f->second.isEmpty() ) - ypos += ( QMIN( f->second.contains('\n')+1, maxLines ) *fh)+2; + ypos += ( QMIN( f->second.count('\n')+1, maxLines ) *fh)+2; if ( iy <= ypos ) @@ -639,3 +647,3 @@ CardViewItem::Field *CardViewItem::fieldAt( const QPoint & itempos ) const CardView::CardView(QWidget *parent, const char *name) - : QScrollView(parent, name), + : Q3ScrollView(parent, name), d(new CardViewPrivate()) @@ -658,4 +666,4 @@ CardView::CardView(QWidget *parent, const char *name) viewport()->setFocusProxy(this); - viewport()->setFocusPolicy(WheelFocus); - viewport()->setBackgroundMode(PaletteBase); + viewport()->setFocusPolicy(Qt::WheelFocus); + viewport()->setBackgroundMode(Qt::PaletteBase); @@ -664,3 +672,3 @@ CardView::CardView(QWidget *parent, const char *name) //US setBackgroundMode(PaletteBackground, PaletteBase); - setBackgroundMode(PaletteBackground); + setBackgroundMode(Qt::PaletteBackground); @@ -741,3 +749,3 @@ CardViewItem *CardView::itemAt(const QPoint &viewPos) CardViewItem *item = 0; - QPtrListIterator<CardViewItem> iter(d->mItemList); + Q3PtrListIterator<CardViewItem> iter(d->mItemList); bool found = false; @@ -789,3 +797,3 @@ void CardView::selectAll(bool state) { - QPtrListIterator<CardViewItem> iter(d->mItemList); + Q3PtrListIterator<CardViewItem> iter(d->mItemList); if (!state) @@ -880,3 +888,3 @@ 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) @@ -957,3 +965,3 @@ void CardView::drawContents(QPainter *p, int clipx, int clipy, // Now tell the cards to draw, if they are in the clip region - QPtrListIterator<CardViewItem> iter(d->mItemList); + Q3PtrListIterator<CardViewItem> iter(d->mItemList); for (iter.toFirst(); iter.current(); ++iter) @@ -977,3 +985,3 @@ 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) @@ -995,3 +1003,3 @@ void CardView::resizeEvent(QResizeEvent *e) { - QScrollView::resizeEvent(e); + Q3ScrollView::resizeEvent(e); @@ -1015,3 +1023,3 @@ void CardView::calcLayout() - QPtrListIterator<CardViewItem> iter(d->mItemList); + Q3PtrListIterator<CardViewItem> iter(d->mItemList); CardViewItem *item = 0; @@ -1058,3 +1066,3 @@ void CardView::calcLayout() // max height of a column - QPtrListIterator<CardViewSeparator> sepIter(d->mSeparatorList); + Q3PtrListIterator<CardViewSeparator> sepIter(d->mSeparatorList); for (sepIter.toFirst(); sepIter.current(); ++sepIter) @@ -1103,3 +1111,3 @@ void CardView::contentsMousePressEvent(QMouseEvent *e) { - QScrollView::contentsMousePressEvent(e); + Q3ScrollView::contentsMousePressEvent(e); @@ -1173,3 +1181,3 @@ void CardView::contentsMousePressEvent(QMouseEvent *e) - if ( s && ! (e->state() & ControlButton) ) + if ( s && ! (e->state() & Qt::ControlButton) ) { @@ -1221,3 +1229,3 @@ void CardView::contentsMouseReleaseEvent(QMouseEvent *e) { - QScrollView::contentsMouseReleaseEvent(e); + Q3ScrollView::contentsMouseReleaseEvent(e); @@ -1259,3 +1267,3 @@ void CardView::contentsMouseDoubleClickEvent(QMouseEvent *e) { - QScrollView::contentsMouseDoubleClickEvent(e); + Q3ScrollView::contentsMouseDoubleClickEvent(e); @@ -1304,3 +1312,3 @@ void CardView::contentsMouseMoveEvent( QMouseEvent *e ) { - setCursor( SplitVCursor ); // Why does this fail sometimes? + setCursor( Qt::SplitVCursor ); // Why does this fail sometimes? d->mOnSeparator = true; @@ -1309,3 +1317,3 @@ void CardView::contentsMouseMoveEvent( QMouseEvent *e ) { - setCursor( ArrowCursor ); + setCursor( Qt::ArrowCursor ); d->mOnSeparator = false; @@ -1326,3 +1334,3 @@ void CardView::leaveEvent( QEvent * ) d->mOnSeparator = false; - setCursor( ArrowCursor ); + setCursor( Qt::ArrowCursor ); } @@ -1370,3 +1378,3 @@ void CardView::keyPressEvent( QKeyEvent *e ) { - case Key_Up: + case Qt::Key_Up: if ( pos > 0 ) @@ -1377,3 +1385,3 @@ void CardView::keyPressEvent( QKeyEvent *e ) break; - case Key_Down: + case Qt::Key_Down: if ( pos < d->mItemList.count() - 1 ) @@ -1384,3 +1392,3 @@ void CardView::keyPressEvent( QKeyEvent *e ) break; - case Key_Left: + case Qt::Key_Left: { @@ -1402,3 +1410,3 @@ void CardView::keyPressEvent( QKeyEvent *e ) break; - case Key_Right: + case Qt::Key_Right: { @@ -1417,3 +1425,3 @@ void CardView::keyPressEvent( QKeyEvent *e ) break; - case Key_Home: + case Qt::Key_Home: aItem = d->mItemList.first(); @@ -1421,3 +1429,3 @@ void CardView::keyPressEvent( QKeyEvent *e ) break; - case Key_End: + case Qt::Key_End: aItem = d->mItemList.last(); @@ -1425,3 +1433,3 @@ void CardView::keyPressEvent( QKeyEvent *e ) break; - case Key_Prior: // PageUp + case Qt::Key_Prior: // PageUp { @@ -1438,3 +1446,3 @@ void CardView::keyPressEvent( QKeyEvent *e ) break; - case Key_Next: // PageDown + case Qt::Key_Next: // PageDown { @@ -1460,3 +1468,3 @@ void CardView::keyPressEvent( QKeyEvent *e ) break; - case Key_Space: + case Qt::Key_Space: setSelected( d->mCurrentItem, !d->mCurrentItem->isSelected() ); @@ -1464,4 +1472,4 @@ void CardView::keyPressEvent( QKeyEvent *e ) break; - case Key_Return: - case Key_Enter: + case Qt::Key_Return: + case Qt::Key_Enter: { @@ -1472,3 +1480,3 @@ void CardView::keyPressEvent( QKeyEvent *e ) default: - if ( (e->state() & ControlButton) && e->key() == Key_A ) + if ( (e->state() & Qt::ControlButton) && e->key() == Qt::Key_A ) { @@ -1490,3 +1498,3 @@ void CardView::keyPressEvent( QKeyEvent *e ) { - if ( (e->state() & ShiftButton) ) + if ( (e->state() & Qt::ShiftButton) ) { @@ -1521,3 +1529,3 @@ void CardView::keyPressEvent( QKeyEvent *e ) } - else if ( (e->state() & ControlButton) ) + else if ( (e->state() & Qt::ControlButton) ) { @@ -1640,5 +1648,5 @@ void CardView::drawRubberBands( int pos ) QPainter p( viewport() ); - p.setRasterOp( XorROP ); - p.setPen( gray ); - p.setBrush( gray ); + p.setCompositionMode( QPainter::CompositionMode_Xor ); + p.setPen( Qt::gray ); + p.setBrush( Qt::gray ); uint n = d->first; @@ -1701,3 +1709,3 @@ void CardView::setFont( const QFont &fnt ) { - QScrollView::setFont( fnt ); + Q3ScrollView::setFont( fnt ); delete d->mFm; @@ -1738,3 +1746,3 @@ void CardView::keyReleaseEvent ( QKeyEvent * e ) } - QScrollView::keyReleaseEvent ( e ); + Q3ScrollView::keyReleaseEvent ( e ); } @@ -1747,4 +1755,4 @@ void CardView::keyReleaseEvent ( QKeyEvent * e ) -#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 @@ -3,4 +3,4 @@ -#include <qscrollview.h> -#include <qptrlist.h> +#include <q3scrollview.h> +#include <q3ptrlist.h> #include <qstring.h> @@ -9,2 +9,10 @@ #include <qpoint.h> +//Added by qt3to4: +#include <QWheelEvent> +#include <QResizeEvent> +#include <QFocusEvent> +#include <QLabel> +#include <QMouseEvent> +#include <QKeyEvent> +#include <QEvent> @@ -150,3 +158,3 @@ class CardViewItem */ -class CardView : public QScrollView +class CardView : public Q3ScrollView { 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 @@ -21,2 +21,7 @@ #include <qpainter.h> +//Added by qt3to4: +#include <QDragEnterEvent> +#include <QDropEvent> +#include <QDragMoveEvent> +#include <QDragLeaveEvent> @@ -33,3 +38,3 @@ -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) @@ -37,3 +42,3 @@ ColorListBox::ColorListBox( QWidget *parent, const char *name, WFlags f ) 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); @@ -49,3 +54,3 @@ void ColorListBox::setEnabled( bool state ) - QListBox::setEnabled( state ); + Q3ListBox::setEnabled( state ); for( uint i=0; i<count(); i++ ) @@ -77,6 +82,6 @@ QColor ColorListBox::color( uint index ) const { - return( black ); + return( Qt::black ); } } -void ColorListBox::slotNewColor(QListBoxItem * i) +void ColorListBox::slotNewColor(Q3ListBoxItem * i) { @@ -200,3 +205,3 @@ 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 ) { @@ -231,3 +236,3 @@ void ColorListItem::paint( QPainter *p ) -int ColorListItem::height(const QListBox *lb ) const +int ColorListItem::height(const Q3ListBox *lb ) const { @@ -237,3 +242,3 @@ int ColorListItem::height(const QListBox *lb ) const -int ColorListItem::width(const QListBox *lb ) const +int ColorListItem::width(const Q3ListBox *lb ) const { @@ -242,4 +247,4 @@ int ColorListItem::width(const QListBox *lb ) const -#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 @@ -24,2 +24,7 @@ #include <klistbox.h> +//Added by qt3to4: +#include <QDragMoveEvent> +#include <QDragLeaveEvent> +#include <QDropEvent> +#include <QDragEnterEvent> @@ -35,3 +40,3 @@ class ColorListBox : public KListBox public: - ColorListBox( QWidget *parent=0, const char * name=0, WFlags f=0 ); + ColorListBox( QWidget *parent=0, const char * name=0, Qt::WFlags f=0 ); void setColor( uint index, const QColor &color ); @@ -50,3 +55,3 @@ class ColorListBox : public KListBox void newColor( int index ); - void slotNewColor(QListBoxItem * i); + void slotNewColor(Q3ListBoxItem * i); @@ -58,3 +63,3 @@ class ColorListBox : public KListBox -class ColorListItem : public QListBoxItem +class ColorListItem : public Q3ListBoxItem { @@ -67,4 +72,4 @@ class ColorListItem : public QListBoxItem 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; 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 @@ -27,7 +27,10 @@ #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> @@ -91,3 +94,3 @@ void ConfigureCardViewWidget::saveSettings( KConfig *config ) CardViewLookNFeelPage::CardViewLookNFeelPage( QWidget *parent, const char *name ) - : QVBox( parent, name ) + : Q3VBox( parent, name ) { @@ -236,3 +239,3 @@ void CardViewLookNFeelPage::initGUI() // Layout - QVBox *loTab = new QVBox( this, "layouttab" ); + Q3VBox *loTab = new Q3VBox( this, "layouttab" ); @@ -241,3 +244,3 @@ void CardViewLookNFeelPage::initGUI() - QGroupBox *gbGeneral = new QGroupBox( 1, Qt::Horizontal, i18n("General"), loTab ); + Q3GroupBox *gbGeneral = new Q3GroupBox( 1, Qt::Horizontal, i18n("General"), loTab ); @@ -245,3 +248,3 @@ void CardViewLookNFeelPage::initGUI() - QHBox *hbSW = new QHBox( gbGeneral ); + Q3HBox *hbSW = new Q3HBox( gbGeneral ); QLabel *lSW = new QLabel( i18n("Separator &width:"), hbSW ); @@ -250,3 +253,3 @@ void CardViewLookNFeelPage::initGUI() - QHBox *hbPadding = new QHBox( gbGeneral ); + Q3HBox *hbPadding = new Q3HBox( gbGeneral ); QLabel *lSpacing = new QLabel( i18n("&Padding:"), hbPadding ); @@ -255,5 +258,5 @@ void CardViewLookNFeelPage::initGUI() - 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 ); @@ -266,3 +269,3 @@ void CardViewLookNFeelPage::initGUI() - 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, " @@ -270,4 +273,4 @@ void CardViewLookNFeelPage::initGUI() ) ); - 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 " @@ -275,5 +278,5 @@ void CardViewLookNFeelPage::initGUI() ) ); - 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 ) ); */ @@ -282,3 +285,3 @@ void CardViewLookNFeelPage::initGUI() // Colors - QVBox *colorTab = new QVBox( this, "colortab" ); + Q3VBox *colorTab = new Q3VBox( this, "colortab" ); colorTab->setSpacing( spacing ); @@ -290,3 +293,3 @@ void CardViewLookNFeelPage::initGUI() - QWhatsThis::add( cbEnableCustomColors, i18n( + Q3WhatsThis::add( cbEnableCustomColors, i18n( "If custom colors are enabled, you may choose the colors for the view below. " @@ -294,3 +297,3 @@ void CardViewLookNFeelPage::initGUI() ) ); - 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." @@ -299,3 +302,3 @@ void CardViewLookNFeelPage::initGUI() // Fonts - QVBox *fntTab = new QVBox( this, "fonttab" ); + Q3VBox *fntTab = new Q3VBox( this, "fonttab" ); @@ -308,3 +311,3 @@ void CardViewLookNFeelPage::initGUI() vbFonts = new QWidget( fntTab ); - QGridLayout *gFnts = new QGridLayout( vbFonts, 2, 3 ); + Q3GridLayout *gFnts = new Q3GridLayout( vbFonts, 2, 3 ); gFnts->setSpacing( spacing ); @@ -314,3 +317,3 @@ void CardViewLookNFeelPage::initGUI() lTextFont = new QLabel( vbFonts ); - lTextFont->setFrameStyle( QFrame::Panel|QFrame::Sunken ); + lTextFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken ); #ifndef KAB_EMBEDDED @@ -327,3 +330,3 @@ void CardViewLookNFeelPage::initGUI() lHeaderFont = new QLabel( vbFonts ); - lHeaderFont->setFrameStyle( QFrame::Panel|QFrame::Sunken ); + lHeaderFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken ); #ifndef KAB_EMBEDDED @@ -338,3 +341,3 @@ void CardViewLookNFeelPage::initGUI() - QWhatsThis::add( cbEnableCustomFonts, i18n( + Q3WhatsThis::add( cbEnableCustomFonts, i18n( "If custom fonts are enabled, you may choose which fonts to use for this view below. " @@ -347,3 +350,3 @@ void CardViewLookNFeelPage::initGUI() // Behaviour - QVBox *behaviourTab = new QVBox( this ); + Q3VBox *behaviourTab = new Q3VBox( this ); behaviourTab->setMargin( margin ); @@ -366,4 +369,4 @@ void CardViewLookNFeelPage::updateFontLabel( QFont fnt, QLabel *l ) -#ifndef KAB_EMBEDDED -#include "configurecardviewdialog.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_configurecardviewdialog.cpp" #endif //KAB_EMBEDDED diff --git a/kaddressbook/views/configurecardviewdialog.h b/kaddressbook/views/configurecardviewdialog.h index 7a62226..4af475d 100644 --- a/kaddressbook/views/configurecardviewdialog.h +++ b/kaddressbook/views/configurecardviewdialog.h @@ -28,5 +28,7 @@ -#include <qvbox.h> +#include <q3vbox.h> #include <qwidget.h> #include <qfont.h> +//Added by qt3to4: +#include <QLabel> @@ -79,3 +81,3 @@ class ConfigureCardViewWidget : public ViewConfigureWidget -class CardViewLookNFeelPage : public QVBox { +class CardViewLookNFeelPage : public Q3VBox { 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 @@ -29,7 +29,10 @@ #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> @@ -86,3 +89,3 @@ void ConfigureTableViewWidget::saveSettings( KConfig *config ) LookAndFeelPage::LookAndFeelPage(QWidget *parent, const char *name) - : QVBox(parent, name) + : Q3VBox(parent, name) { @@ -231,3 +234,3 @@ void LookAndFeelPage::initGUI() // General - QVBox *generalTab = new QVBox( this, "generaltab" ); + Q3VBox *generalTab = new Q3VBox( this, "generaltab" ); @@ -236,3 +239,3 @@ void LookAndFeelPage::initGUI() - QButtonGroup *group = new QButtonGroup(1, Qt::Horizontal, + Q3ButtonGroup *group = new Q3ButtonGroup(1, Qt::Horizontal, i18n("Row Separator"), generalTab); @@ -264,3 +267,3 @@ void LookAndFeelPage::initGUI() // Colors - QVBox *colorTab = new QVBox( this, "colortab" ); + Q3VBox *colorTab = new Q3VBox( this, "colortab" ); colorTab->setSpacing( spacing ); @@ -272,3 +275,3 @@ void LookAndFeelPage::initGUI() - QWhatsThis::add( cbEnableCustomColors, i18n( + Q3WhatsThis::add( cbEnableCustomColors, i18n( "If custom colors are enabled, you may choose the colors for the view below. " @@ -276,3 +279,3 @@ void LookAndFeelPage::initGUI() ) ); - 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." @@ -281,3 +284,3 @@ void LookAndFeelPage::initGUI() // Fonts - QVBox *fntTab = new QVBox( this, "fonttab" ); + Q3VBox *fntTab = new Q3VBox( this, "fonttab" ); @@ -290,3 +293,3 @@ void LookAndFeelPage::initGUI() vbFonts = new QWidget( fntTab ); - QGridLayout *gFnts = new QGridLayout( vbFonts, 2, 3 ); + Q3GridLayout *gFnts = new Q3GridLayout( vbFonts, 2, 3 ); gFnts->setSpacing( spacing ); @@ -296,3 +299,3 @@ void LookAndFeelPage::initGUI() lTextFont = new QLabel( vbFonts ); - lTextFont->setFrameStyle( QFrame::Panel|QFrame::Sunken ); + lTextFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken ); #ifndef KAB_EMBEDDED @@ -309,3 +312,3 @@ void LookAndFeelPage::initGUI() lHeaderFont = new QLabel( vbFonts ); - lHeaderFont->setFrameStyle( QFrame::Panel|QFrame::Sunken ); + lHeaderFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken ); #ifndef KAB_EMBEDDED @@ -320,3 +323,3 @@ void LookAndFeelPage::initGUI() - QWhatsThis::add( cbEnableCustomFonts, i18n( + Q3WhatsThis::add( cbEnableCustomFonts, i18n( "If custom fonts are enabled, you may choose which fonts to use for this view below. " @@ -342,4 +345,4 @@ void LookAndFeelPage::updateFontLabel( QFont fnt, QLabel *l ) -#ifndef KAB_EMBEDDED -#include "configuretableviewdialog.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_configuretableviewdialog.cpp" #endif //KAB_EMBEDDED diff --git a/kaddressbook/views/configuretableviewdialog.h b/kaddressbook/views/configuretableviewdialog.h index 003ccf8..8125fc9 100644 --- a/kaddressbook/views/configuretableviewdialog.h +++ b/kaddressbook/views/configuretableviewdialog.h @@ -28,3 +28,5 @@ -#include <qvbox.h> +#include <q3vbox.h> +//Added by qt3to4: +#include <QLabel> @@ -65,3 +67,3 @@ class ConfigureTableViewWidget : public ViewConfigureWidget */ -class LookAndFeelPage : public QVBox +class LookAndFeelPage : public Q3VBox { 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 @@ -23,6 +23,6 @@ -#include <qheader.h> -#include <qiconset.h> +#include <q3header.h> +#include <qicon.h> #include <qimage.h> -#include <qdragobject.h> +#include <q3dragobject.h> #include <qcombobox.h> @@ -32,2 +32,7 @@ #include <qapplication.h> +//Added by qt3to4: +#include <QDropEvent> +#include <QPixmap> +#include <QMouseEvent> +#include <QKeyEvent> @@ -49,3 +54,3 @@ DynamicTip::DynamicTip( ContactListView *parent) - : QToolTip( parent ) + /* TODO:hacker:: QToolTip( parent ) */ { @@ -55,2 +60,3 @@ void DynamicTip::maybeTip( const QPoint &pos ) { + /* TODO:hacker: static bool ishidden = true; @@ -65,3 +71,3 @@ void DynamicTip::maybeTip( const QPoint &pos ) - QListViewItem *lvi = plv->itemAt( pos - posVp ); + Q3ListViewItem *lvi = plv->itemAt( pos - posVp ); if (!lvi) @@ -153,3 +159,3 @@ void DynamicTip::maybeTip( const QPoint &pos ) ishidden = !ishidden; - + */ } @@ -175,3 +181,3 @@ QString ContactListViewItem::key(int column, bool ascending) const if ( lan == 1 ) { //GERMAN - QString ret = QListViewItem::key(column, ascending).lower().utf8(); + QString ret = Q3ListViewItem::key(column, ascending).lower().utf8(); int start = -1; @@ -199,3 +205,3 @@ QString ContactListViewItem::key(int column, bool ascending) const #endif - return QListViewItem::key(column, ascending).lower(); + return Q3ListViewItem::key(column, ascending).lower(); } @@ -290,3 +296,3 @@ void ContactListView::printMe() p.begin ( &printer ); - QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); + Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer ); float dx, dy; @@ -345,3 +351,3 @@ 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(); @@ -355,3 +361,3 @@ bool ContactListView::acceptDrag(QDropEvent *e) const #ifndef KAB_EMBEDDED - return QTextDrag::canDecode(e); + return Q3TextDrag::canDecode(e); #else //KAB_EMBEDDED @@ -426,4 +432,4 @@ void ContactListView::keyReleaseEvent ( QKeyEvent * 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 @@ -7,2 +7,6 @@ #include <qstring.h> +//Added by qt3to4: +#include <QDropEvent> +#include <QMouseEvent> +#include <QKeyEvent> @@ -22,3 +26,3 @@ class ContactListView; */ -class DynamicTip : public QToolTip +class DynamicTip /* TODO:hacker: : public QToolTip */ { 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 @@ -23,5 +23,5 @@ -#include <qdragobject.h> +#include <q3dragobject.h> #include <qevent.h> -#include <qiconview.h> +#include <q3iconview.h> #include <qlayout.h> @@ -30,2 +30,7 @@ #include <qapplication.h> +//Added by qt3to4: +#include <QDropEvent> +#include <QKeyEvent> +#include <Q3VBoxLayout> +#include <QDragEnterEvent> @@ -127,3 +132,3 @@ void AddresseeCardView::printMe() p.begin ( &printer ); - QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); + Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer ); float dx, dy; @@ -150,3 +155,3 @@ void AddresseeCardView::dragEnterEvent(QDragEnterEvent *e) #ifndef KAB_EMBEDDED - if (QTextDrag::canDecode(e)) + if (Q3TextDrag::canDecode(e)) e->accept(); @@ -178,3 +183,3 @@ KAddressBookCardView::KAddressBookCardView( KABC::AddressBook *ab, // Init the GUI - QVBoxLayout *layout = new QVBoxLayout(viewWidget()); + Q3VBoxLayout *layout = new Q3VBoxLayout(viewWidget()); @@ -522,4 +527,4 @@ void KAddressBookCardView::addresseeSelected() } -#ifndef KAB_EMBEDDED -#include "kaddressbookcardview.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_kaddressbookcardview.cpp" #endif //KAB_EMBEDDED diff --git a/kaddressbook/views/kaddressbookcardview.h b/kaddressbook/views/kaddressbookcardview.h index 2a71f7e..8f8e48b 100644 --- a/kaddressbook/views/kaddressbookcardview.h +++ b/kaddressbook/views/kaddressbookcardview.h @@ -27,2 +27,5 @@ #include <qstring.h> +//Added by qt3to4: +#include <QDragEnterEvent> +#include <QDropEvent> #ifndef 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 @@ -24,3 +24,3 @@ #ifndef KAB_EMBEDDED -#include <qiconview.h> +#include <q3iconview.h> #include <qstringlist.h> @@ -37,2 +37,10 @@ +//Added by qt3to4: +#include <QDropEvent> +#include <Q3ValueList> +#include <QPixmap> +#include <QKeyEvent> +#include <QEvent> +#include <Q3VBoxLayout> + #include <kabc/addressbook.h> @@ -75,3 +83,3 @@ AddresseeIconView::AddresseeIconView(QWidget *parent, const char *name) AddresseeIconView::AddresseeIconView(QWidget *parent, const char *name) - : QIconView(parent, name) + : Q3IconView(parent, name) #endif //KAB_EMBEDDED @@ -79,4 +87,4 @@ AddresseeIconView::AddresseeIconView(QWidget *parent, const char *name) { - setSelectionMode( QIconView::Extended ); - setResizeMode( QIconView::Adjust ); + setSelectionMode( Q3IconView::Extended ); + setResizeMode( Q3IconView::Adjust ); setWordWrapIconText( true ); @@ -91,4 +99,4 @@ AddresseeIconView::AddresseeIconView(QWidget *parent, const char *name) - 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 @@ -102,3 +110,3 @@ AddresseeIconView::~AddresseeIconView() void AddresseeIconView::itemDropped(QDropEvent *e, - const QValueList<QIconDragItem> &) + const Q3ValueList<Q3IconDragItem> &) { @@ -107,3 +115,3 @@ void AddresseeIconView::itemDropped(QDropEvent *e, -QDragObject *AddresseeIconView::dragObject() +Q3DragObject *AddresseeIconView::dragObject() { @@ -119,3 +127,3 @@ class AddresseeIconViewItem : public KIconViewItem #else //KAB_EMBEDDED -class AddresseeIconViewItem : public QIconViewItem +class AddresseeIconViewItem : public Q3IconViewItem #endif //KAB_EMBEDDED @@ -126,3 +134,3 @@ class AddresseeIconViewItem : public QIconViewItem KABC::AddressBook *doc, const KABC::Addressee &a, - QIconView *parent) + Q3IconView *parent) : KIconViewItem(parent), mFields( fields ), mDocument(doc), mAddressee(a) @@ -131,4 +139,4 @@ class AddresseeIconViewItem : public QIconViewItem 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 @@ -202,3 +210,3 @@ KAddressBookIconView::KAddressBookIconView( KABC::AddressBook *ab, // Init the GUI - QVBoxLayout *layout = new QVBoxLayout(viewWidget()); + Q3VBoxLayout *layout = new Q3VBoxLayout(viewWidget()); @@ -212,4 +220,4 @@ KAddressBookIconView::KAddressBookIconView( KABC::AddressBook *ab, //US this, SLOT(addresseeExecuted(QIconViewItem *))); - connect(mIconView, SIGNAL(selectionChanged(QIconViewItem *)), - this, SLOT(addresseeExecuted(QIconViewItem *))); + connect(mIconView, SIGNAL(selectionChanged(Q3IconViewItem *)), + this, SLOT(addresseeExecuted(Q3IconViewItem *))); @@ -250,4 +258,4 @@ void KAddressBookIconView::readConfig(KConfig *config) //US this, SLOT(addresseeExecuted(QIconViewItem *))); - disconnect(mIconView, SIGNAL(selectionChanged(QIconViewItem *)), - this, SLOT(addresseeExecuted(QIconViewItem *))); + disconnect(mIconView, SIGNAL(selectionChanged(Q3IconViewItem *)), + this, SLOT(addresseeExecuted(Q3IconViewItem *))); @@ -262,4 +270,4 @@ void KAddressBookIconView::readConfig(KConfig *config) */ - connect(mIconView, SIGNAL(selectionChanged(QIconViewItem *)), - this, SLOT(addresseeExecuted(QIconViewItem *))); + connect(mIconView, SIGNAL(selectionChanged(Q3IconViewItem *)), + this, SLOT(addresseeExecuted(Q3IconViewItem *))); @@ -338,3 +346,3 @@ QStringList KAddressBookIconView::selectedUids() QStringList uidList; - QIconViewItem *item; + Q3IconViewItem *item; AddresseeIconViewItem *aItem; @@ -360,3 +368,3 @@ void KAddressBookIconView::refresh(QString uid) { - QIconViewItem *item; + Q3IconViewItem *item; AddresseeIconViewItem *aItem; @@ -408,3 +416,3 @@ void KAddressBookIconView::setSelected(QString uid, bool selected) { - QIconViewItem *item; + Q3IconViewItem *item; AddresseeIconViewItem *aItem; @@ -437,3 +445,3 @@ void KAddressBookIconView::setSelected(QString uid, bool selected) -void KAddressBookIconView::addresseeExecuted(QIconViewItem *item) +void KAddressBookIconView::addresseeExecuted(Q3IconViewItem *item) { @@ -452,3 +460,3 @@ void KAddressBookIconView::addresseeSelected() { - QIconViewItem *item; + Q3IconViewItem *item; AddresseeIconViewItem *aItem; @@ -478,4 +486,4 @@ void KAddressBookIconView::addresseeSelected() -#ifndef KAB_EMBEDDED -#include "kaddressbookiconview.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_kaddressbookiconview.cpp" #endif //KAB_EMBEDDED diff --git a/kaddressbook/views/kaddressbookiconview.h b/kaddressbook/views/kaddressbookiconview.h index b0b9fea..6fad4c6 100644 --- a/kaddressbook/views/kaddressbookiconview.h +++ b/kaddressbook/views/kaddressbookiconview.h @@ -27,2 +27,5 @@ #include <qstring.h> +//Added by qt3to4: +#include <Q3ValueList> +#include <QDropEvent> #ifndef KAB_EMBEDDED @@ -30,4 +33,4 @@ #else //KAB_EMBEDDED -#include <qiconview.h> -#include <qptrlist.h> +#include <q3iconview.h> +#include <q3ptrlist.h> #include <klocale.h> @@ -36,3 +39,3 @@ -class QIconViewItem; +class Q3IconViewItem; class KConfig; @@ -40,3 +43,3 @@ class AddresseeIconView; class AddresseeIconViewItem; -class QIconDragItem; +class Q3IconDragItem; class KAddressBookIconView; @@ -70,5 +73,5 @@ class KAddressBookIconView : public KAddressBookView #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 @@ -79,3 +82,3 @@ class KAddressBookIconView : public KAddressBookView protected slots: - void addresseeExecuted(QIconViewItem *item); + void addresseeExecuted(Q3IconViewItem *item); void addresseeSelected(); @@ -84,3 +87,3 @@ class KAddressBookIconView : public KAddressBookView AddresseeIconView *mIconView; - QPtrList<AddresseeIconViewItem> mIconList; + Q3PtrList<AddresseeIconViewItem> mIconList; }; @@ -89,7 +92,7 @@ class KAddressBookIconView : public KAddressBookView #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 @@ -107,6 +110,6 @@ class AddresseeIconView : public QIconView protected: - virtual QDragObject *dragObject(); + virtual Q3DragObject *dragObject(); protected slots: - void itemDropped(QDropEvent *, const QValueList<QIconDragItem> &); + void itemDropped(QDropEvent *, const Q3ValueList<Q3IconDragItem> &); }; diff --git a/kaddressbook/views/kaddressbooktableview.cpp b/kaddressbook/views/kaddressbooktableview.cpp index 272f2eb..7efaaa9 100644 --- a/kaddressbook/views/kaddressbooktableview.cpp +++ b/kaddressbook/views/kaddressbooktableview.cpp @@ -2,4 +2,4 @@ -#include <qvbox.h> -#include <qlistbox.h> +#include <q3vbox.h> +#include <q3listbox.h> #include <qwidget.h> @@ -9,6 +9,10 @@ #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> @@ -34,3 +38,3 @@ #include <qlayout.h> -#include <qheader.h> +#include <q3header.h> #include <qregexp.h> @@ -44,3 +48,3 @@ KAddressBookTableView::KAddressBookTableView( KABC::AddressBook *ab, { - mainLayout = new QVBoxLayout( viewWidget(), 2 ); + mainLayout = new Q3VBoxLayout( viewWidget(), 2 ); @@ -79,10 +83,10 @@ void KAddressBookTableView::reconstructListView() 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*))); @@ -107,3 +111,3 @@ void KAddressBookTableView::reconstructListView() mListView->addColumn( (*it)->label() ); - mListView->setColumnWidthMode(c++, QListView::Manual); + mListView->setColumnWidthMode(c++, Q3ListView::Manual); //US @@ -121,11 +125,11 @@ void KAddressBookTableView::reconstructListView() // 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()), @@ -346,3 +350,3 @@ void KAddressBookTableView::refresh(QString uid) ContactListViewItem *ceItem; - QListViewItemIterator it( mListView ); + Q3ListViewItemIterator it( mListView ); while ( it.current() ) { @@ -368,3 +372,3 @@ QStringList KAddressBookTableView::selectedUids() QStringList uidList; - QListViewItem *item; + Q3ListViewItem *item; ContactListViewItem *ceItem; @@ -396,3 +400,3 @@ void KAddressBookTableView::setSelected(QString uid, bool selected) { - QListViewItem *item; + Q3ListViewItem *item; ContactListViewItem *ceItem; @@ -431,3 +435,3 @@ void KAddressBookTableView::addresseeSelected() // selected last. - QListViewItem *item; + Q3ListViewItem *item; bool found =false; @@ -455,3 +459,3 @@ void KAddressBookTableView::addresseeSelected() -void KAddressBookTableView::addresseeExecuted(QListViewItem *item) +void KAddressBookTableView::addresseeExecuted(Q3ListViewItem *item) { @@ -489,4 +493,4 @@ 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 @@ -12,8 +12,8 @@ #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> @@ -27,6 +27,8 @@ #include "kaddressbookview.h" +//Added by qt3to4: +#include <Q3VBoxLayout> -class QListViewItem; -class QListBox; -class QVBoxLayout; +class Q3ListViewItem; +class Q3ListBox; +class Q3VBoxLayout; class KConfig; @@ -81,6 +83,6 @@ friend class ContactListView; */ - 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 @@ -32,3 +32,3 @@ $Id$ #include <qregexp.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qtextcodec.h> @@ -106,3 +106,3 @@ bool CSVXXPort::exportContacts( const KABC::AddresseeList &list, const QString& 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>" ); @@ -126,3 +126,3 @@ bool CSVXXPort::exportContacts( const KABC::AddresseeList &list, const QString& QFile file( fileName ); - if ( !file.open( IO_WriteOnly ) ) { + if ( !file.open( QIODevice::WriteOnly ) ) { QString txt = i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ); @@ -153,3 +153,3 @@ void CSVXXPort::doExport( QFile *fp, const KABC::AddresseeList &list ) { - QTextStream t( fp ); + Q3TextStream t( fp ); t.setCodec( QTextCodec::codecForName("utf8") ); @@ -189,6 +189,4 @@ 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 @@ -29,3 +29,3 @@ $Id$ -#include <qbuttongroup.h> +#include <q3buttongroup.h> #include <qcheckbox.h> @@ -41,6 +41,10 @@ $Id$ #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> @@ -58,3 +62,3 @@ $Id$ #ifdef DESKTOP_VERSION -#include "qtable.h" +#include "q3table.h" #else @@ -163,3 +167,3 @@ CSVImportDialog::CSVImportDialog( KABC::AddressBook *ab, QWidget *parent, // if ( QApplication::desktop()->width() < 321 ) - QIconSet icon = SmallIcon("filesave"); + QIcon icon = SmallIcon("filesave"); @@ -188,3 +192,3 @@ KABC::AddresseeList CSVImportDialog::contacts() const - QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0, col ) ); + Q3ComboTableItem *item = static_cast<Q3ComboTableItem*>( mTable->item( 0, col ) ); @@ -231,3 +235,3 @@ KABC::AddresseeList CSVImportDialog::contacts() const QDate dt = KGlobal::locale()->readDate( value, "%Y-%m-%d"); // = Qt::ISODate - a.setBirthday(dt); + a.setBirthday(QDateTime(dt)); } @@ -384,5 +388,5 @@ void CSVImportDialog::initGUI() - 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() ); @@ -399,3 +403,3 @@ void CSVImportDialog::initGUI() // Delimiter: comma, semicolon, tab, space, other - mDelimiterBox = new QButtonGroup( i18n( "Delimiter" ), page ); + mDelimiterBox = new Q3ButtonGroup( i18n( "Delimiter" ), page ); mDelimiterBox->setColumnLayout( 0, Qt::Vertical ); @@ -403,3 +407,3 @@ void CSVImportDialog::initGUI() mDelimiterBox->layout()->setMargin( marginHint() ); - QGridLayout *delimiterLayout = new QGridLayout( mDelimiterBox->layout() ); + Q3GridLayout *delimiterLayout = new Q3GridLayout( mDelimiterBox->layout() ); delimiterLayout->setAlignment( Qt::AlignTop ); @@ -452,4 +456,4 @@ void CSVImportDialog::initGUI() - mTable = new QTable( 0, 0, page ); - mTable->setSelectionMode( QTable::NoSelection ); + mTable = new Q3Table( 0, 0, page ); + mTable->setSelectionMode( Q3Table::NoSelection ); //mTable->horizontalHeader()->hide(); @@ -485,3 +489,3 @@ void CSVImportDialog::fillTable() // store previous assignment - QValueList<int> mTypeOld = mTypeStore; + Q3ValueList<int> mTypeOld = mTypeStore; @@ -489,3 +493,3 @@ void CSVImportDialog::fillTable() 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 ) ); @@ -508,10 +512,10 @@ void CSVImportDialog::fillTable() - QTextStream inputStream( mData, IO_ReadOnly ); + Q3TextStream inputStream( mData, QIODevice::ReadOnly ); if ( mComboCodec->currentItem () == 0 ) { - inputStream.setEncoding( QTextStream::UnicodeUTF8 ); + inputStream.setEncoding( Q3TextStream::UnicodeUTF8 ); } else if ( mComboCodec->currentItem () == 1 ) { - inputStream.setEncoding( QTextStream::Latin1 ); + inputStream.setEncoding( Q3TextStream::Latin1 ); } else { - inputStream.setEncoding( QTextStream::Locale ); + inputStream.setEncoding( Q3TextStream::Locale ); } @@ -528,3 +532,3 @@ void CSVImportDialog::fillTable() state = S_QUOTED_FIELD; - } else if ( x == mDelimiter ) { + } else if ( QString(x) == mDelimiter ) { if ( ( ignoreDups == false ) || ( lastCharDelimiter == false ) ) @@ -563,3 +567,3 @@ void CSVImportDialog::fillTable() state = S_QUOTED_FIELD; - } else if ( x == mDelimiter || x == '\n' ) { + } else if ( QString(x) == mDelimiter || x == '\n' ) { setText( row - mStartLine + 1, column, field ); @@ -580,3 +584,3 @@ void CSVImportDialog::fillTable() case S_END_OF_QUOTED_FIELD : - if ( x == mDelimiter || x == '\n' ) { + if ( QString(x) == mDelimiter || x == '\n' ) { setText( row - mStartLine + 1, column, field ); @@ -603,3 +607,3 @@ void CSVImportDialog::fillTable() case S_NORMAL_FIELD : - if ( x == mDelimiter || x == '\n' ) { + if ( QString(x) == mDelimiter || x == '\n' ) { setText( row - mStartLine + 1, column, field ); @@ -619,3 +623,3 @@ void CSVImportDialog::fillTable() } - if ( x != mDelimiter ) + if ( QString(x) != mDelimiter ) lastCharDelimiter = false; @@ -651,3 +655,3 @@ void CSVImportDialog::fillTable() //US QComboTableItem *item = new QComboTableItem( mTable, mTypeMap.keys() ); - QComboTableItem *item = new QComboTableItem( mTable, keys ); + Q3ComboTableItem *item = new Q3ComboTableItem( mTable, keys ); mTable->setItem( 0, column, item ); @@ -766,3 +770,3 @@ void CSVImportDialog::slotOk() for ( int column = 0; column < mTable->numCols(); ++column ) { - QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0, + Q3ComboTableItem *item = static_cast<Q3ComboTableItem*>( mTable->item( 0, column ) ); @@ -838,3 +842,3 @@ void CSVImportDialog::applyTemplate() int type = columnMap[ column ]; - QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0, + Q3ComboTableItem *item = static_cast<Q3ComboTableItem*>( mTable->item( 0, column ) ); @@ -880,3 +884,3 @@ void CSVImportDialog::saveTemplate() for ( uint column = 0; column < mTable->numCols(); ++column ) { - QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0, + Q3ComboTableItem *item = static_cast<Q3ComboTableItem*>( mTable->item( 0, column ) ); @@ -936,3 +940,3 @@ void CSVImportDialog::setFile( const QString &fileName ) QFile file( fileName ); - if ( !file.open( IO_ReadOnly ) ) { + if ( !file.open( QIODevice::ReadOnly ) ) { KMessageBox::sorry( this, i18n( "Cannot open input file!" ) ); @@ -966,4 +970,4 @@ 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 @@ -35,3 +35,3 @@ $Id$ -#include <qvaluelist.h> +#include <q3valuelist.h> @@ -39,3 +39,3 @@ class KURLRequester; -class QButtonGroup; +class Q3ButtonGroup; class QComboBox; @@ -45,3 +45,3 @@ class QPushButton; class QRadioButton; -class QTable; +class Q3Table; @@ -87,4 +87,4 @@ class CSVImportDialog : public KDialogBase - QTable* mTable; - QButtonGroup* mDelimiterBox; + Q3Table* mTable; + Q3ButtonGroup* mDelimiterBox; QRadioButton* mRadioComma; @@ -121,3 +121,3 @@ class CSVImportDialog : public KDialogBase 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 @@ -118,4 +118,4 @@ KABC::AddresseeList KDE2XXPort::importContacts( const QString& ) const -#ifndef KAB_EMBEDDED -#include "kde2_xxport.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_kde2_xxport.cpp" #endif //KAB_EMBEDDED diff --git a/kaddressbook/xxport/vcard_xxport.cpp b/kaddressbook/xxport/vcard_xxport.cpp index 9a8fa68..64b9071 100644 --- a/kaddressbook/xxport/vcard_xxport.cpp +++ b/kaddressbook/xxport/vcard_xxport.cpp @@ -31,4 +31,6 @@ #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qfileinfo.h> +//Added by qt3to4: +#include <Q3CString> @@ -104,3 +106,3 @@ bool VCardXXPort::exportContacts( const KABC::AddresseeList &list, const QString QFile outFile( fileName ); - if ( !outFile.open( IO_WriteOnly ) ) { + if ( !outFile.open( QIODevice::WriteOnly ) ) { QString text = i18n( "<qt>Unable to open file <b>%1</b> for export.</qt>" ); @@ -110,4 +112,4 @@ bool VCardXXPort::exportContacts( const KABC::AddresseeList &list, const QString - QTextStream t( &outFile ); - t.setEncoding( QTextStream::UnicodeUTF8 ); + Q3TextStream t( &outFile ); + t.setEncoding( Q3TextStream::UnicodeUTF8 ); @@ -155,3 +157,3 @@ KABC::AddresseeList VCardXXPort::importContacts( const QString& ) const - file.open( IO_ReadOnly ); + file.open( QIODevice::ReadOnly ); QByteArray rawData = file.readAll(); @@ -198,4 +200,4 @@ 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(); @@ -269,4 +271,4 @@ 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 @@ -32,2 +32,4 @@ $Id$ #include <qlist.h> +//Added by qt3to4: +#include <Q3VBoxLayout> @@ -219,3 +221,3 @@ void XXPortManager::loadPlugins() #else //KAB_EMBEDDED - QList<XXPortFactory> factorylist; + QList<XXPortFactory*> factorylist; factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_csv_xxport())); @@ -227,6 +229,4 @@ void XXPortManager::loadPlugins() - 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 @@ -252,3 +252,3 @@ PreviewDialog::PreviewDialog( const KABC::Addressee &addr, QWidget *parent, QWidget *page = plainPage(); - QVBoxLayout *layout = new QVBoxLayout( page, marginHint(), spacingHint() ); + Q3VBoxLayout *layout = new Q3VBoxLayout( page, marginHint(), spacingHint() ); connect( this, SIGNAL( user1Clicked() ), this, SLOT ( slotClose() ) ); @@ -266,5 +266,4 @@ PreviewDialog::PreviewDialog( const KABC::Addressee &addr, QWidget *parent, -#ifndef KAB_EMBEDDED -#include "xxportmanager.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_xxportmanager.cpp" #endif //KAB_EMBEDDED - diff --git a/kaddressbook/xxportmanager.h b/kaddressbook/xxportmanager.h index e801d9b..0528922 100644 --- a/kaddressbook/xxportmanager.h +++ b/kaddressbook/xxportmanager.h @@ -34,3 +34,3 @@ $Id$ -#include <qdict.h> +#include <q3dict.h> #include <qobject.h> @@ -73,3 +73,3 @@ class XXPortManager : public QObject - QDict<XXPortObject> mXXPortObjects; + Q3Dict<XXPortObject> mXXPortObjects; diff --git a/kaddressbook/xxportobject.cpp b/kaddressbook/xxportobject.cpp index bd9d986..2d8d0ff 100644 --- a/kaddressbook/xxportobject.cpp +++ b/kaddressbook/xxportobject.cpp @@ -273,4 +273,4 @@ 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 @@ -38,8 +38,9 @@ $Id$ #include <qapplication.h> -#include <qbuttongroup.h> +#include <QDesktopWidget> +#include <q3buttongroup.h> #include <qcombobox.h> -#include <qheader.h> +#include <q3header.h> #include <qlabel.h> #include <qlayout.h> -#include <qlistview.h> +#include <q3listview.h> #include <qpushbutton.h> @@ -47,3 +48,7 @@ $Id$ #include <qstringlist.h> -#include <qwhatsthis.h> +#include <q3whatsthis.h> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3Frame> +#include <Q3VBoxLayout> @@ -64,4 +69,4 @@ XXPortSelectDialog::XXPortSelectDialog( KABCore *core, bool sort, SLOT( filterChanged( int ) ) ); - connect( mCategoriesView, SIGNAL( clicked( QListViewItem* ) ), - SLOT( categoryClicked( QListViewItem* ) ) ); + connect( mCategoriesView, SIGNAL( clicked( Q3ListViewItem* ) ), + SLOT( categoryClicked( Q3ListViewItem* ) ) ); @@ -86,3 +91,3 @@ XXPortSelectDialog::XXPortSelectDialog( KABCore *core, bool sort, 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 ); @@ -212,5 +217,5 @@ QStringList XXPortSelectDialog::categories() const - 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() ) @@ -227,5 +232,5 @@ void XXPortSelectDialog::filterChanged( int ) -void XXPortSelectDialog::categoryClicked( QListViewItem *i ) +void XXPortSelectDialog::categoryClicked( Q3ListViewItem *i ) { - QCheckListItem *qcli = static_cast<QCheckListItem*>( i ); + Q3CheckListItem *qcli = static_cast<Q3CheckListItem*>( i ); if ( qcli->isOn() ) @@ -246,5 +251,5 @@ 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() ); @@ -254,3 +259,3 @@ void XXPortSelectDialog::initGUI() - mButtonGroup = new QButtonGroup( i18n( "Contact Selection" ), page ); + mButtonGroup = new Q3ButtonGroup( i18n( "Contact Selection" ), page ); mButtonGroup->setColumnLayout( 0, Qt::Vertical ); @@ -259,3 +264,3 @@ void XXPortSelectDialog::initGUI() - QGridLayout *groupLayout = new QGridLayout( mButtonGroup->layout() ); + Q3GridLayout *groupLayout = new Q3GridLayout( mButtonGroup->layout() ); groupLayout->setAlignment( Qt::AlignTop ); @@ -264,3 +269,3 @@ void XXPortSelectDialog::initGUI() 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 ); @@ -268,3 +273,3 @@ void XXPortSelectDialog::initGUI() 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." ) ); @@ -273,3 +278,3 @@ void XXPortSelectDialog::initGUI() 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" ) ); @@ -278,3 +283,3 @@ void XXPortSelectDialog::initGUI() 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." ) ); @@ -284,9 +289,9 @@ void XXPortSelectDialog::initGUI() 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 ); @@ -297,5 +302,5 @@ void XXPortSelectDialog::initGUI() - 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() ); @@ -337,6 +342,4 @@ 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 @@ -32,6 +32,6 @@ -class QButtonGroup; +class Q3ButtonGroup; class QComboBox; -class QListView; -class QListViewItem; +class Q3ListView; +class Q3ListViewItem; class QRadioButton; @@ -55,3 +55,3 @@ class XXPortSelectDialog : public KDialogBase void filterChanged( int ); - void categoryClicked( QListViewItem * i ); + void categoryClicked( Q3ListViewItem * i ); @@ -64,3 +64,3 @@ class XXPortSelectDialog : public KDialogBase - QButtonGroup* mButtonGroup; + Q3ButtonGroup* mButtonGroup; QRadioButton* mUseCategories; @@ -70,3 +70,3 @@ class XXPortSelectDialog : public KDialogBase QComboBox* mFiltersCombo; - QListView* mCategoriesView; + Q3ListView* mCategoriesView; |