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 | |||
@@ -21,26 +21,33 @@ | |||
21 | with any edition of Qt, and distribute the resulting executable, | 21 | with any edition of Qt, and distribute the resulting executable, |
22 | without including the source code for Qt in the source distribution. | 22 | without including the source code for Qt in the source distribution. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <qbuttongroup.h> | 25 | #include <q3buttongroup.h> |
26 | #include <qcheckbox.h> | 26 | #include <qcheckbox.h> |
27 | #include <qhbox.h> | 27 | #include <q3hbox.h> |
28 | #include <qlabel.h> | 28 | #include <qlabel.h> |
29 | #include <qlayout.h> | 29 | #include <qlayout.h> |
30 | #include <qlistbox.h> | 30 | #include <q3listbox.h> |
31 | #include <qlistview.h> | 31 | #include <q3listview.h> |
32 | #include <qpushbutton.h> | 32 | #include <qpushbutton.h> |
33 | #include <qsignal.h> | 33 | #include <q3signal.h> |
34 | #include <qstring.h> | 34 | #include <qstring.h> |
35 | #include <qapplication.h> | 35 | #include <qapplication.h> |
36 | #include <QDesktopWidget> | ||
37 | |||
38 | #include <Q3VBoxLayout> | ||
39 | #include <Q3GridLayout> | ||
36 | 40 | ||
37 | #ifndef KAB_EMBEDDED | 41 | #ifndef KAB_EMBEDDED |
38 | #include <qtextedit.h> | 42 | #include <q3textedit.h> |
43 | //Added by qt3to4: | ||
44 | #include <Q3ValueList> | ||
45 | #include <Q3VBoxLayout> | ||
39 | #include <kaccelmanager.h> | 46 | #include <kaccelmanager.h> |
40 | #include <kbuttonbox.h> | 47 | #include <kbuttonbox.h> |
41 | #else //KAB_EMBEDDED | 48 | #else //KAB_EMBEDDED |
42 | #include <qmultilineedit.h> | 49 | #include <q3multilineedit.h> |
43 | #endif //KAB_EMBEDDED | 50 | #endif //KAB_EMBEDDED |
44 | 51 | ||
45 | #include <qtoolbutton.h> | 52 | #include <qtoolbutton.h> |
46 | #include <qtooltip.h> | 53 | #include <qtooltip.h> |
@@ -66,11 +73,11 @@ AddressEditWidget::AddressEditWidget( QWidget *parent, const char *name ) | |||
66 | : QWidget( parent, name ) | 73 | : QWidget( parent, name ) |
67 | { | 74 | { |
68 | 75 | ||
69 | mConfig = AddresseeConfig::instance(); | 76 | mConfig = AddresseeConfig::instance(); |
70 | QVBoxLayout *layout = new QVBoxLayout( this ); | 77 | Q3VBoxLayout *layout = new Q3VBoxLayout( this ); |
71 | layout->setSpacing( KDialog::spacingHintSmall() ); | 78 | layout->setSpacing( KDialog::spacingHintSmall() ); |
72 | QHBox *b1 = new QHBox( this); | 79 | Q3HBox *b1 = new Q3HBox( this); |
73 | //QLabel * label = new QLabel( b1 ); | 80 | //QLabel * label = new QLabel( b1 ); |
74 | //label->setPixmap( KGlobal::iconLoader()->loadIcon( "gohome", KIcon::Desktop, 0 ) ); | 81 | //label->setPixmap( KGlobal::iconLoader()->loadIcon( "gohome", KIcon::Desktop, 0 ) ); |
75 | 82 | ||
76 | 83 | ||
@@ -83,13 +90,13 @@ AddressEditWidget::AddressEditWidget( QWidget *parent, const char *name ) | |||
83 | SLOT( updateAddressEdit() ) ); | 90 | SLOT( updateAddressEdit() ) ); |
84 | // layout->addWidget( mTypeCombo ); | 91 | // layout->addWidget( mTypeCombo ); |
85 | 92 | ||
86 | #ifndef KAB_EMBEDDED | 93 | #ifndef KAB_EMBEDDED |
87 | mAddressTextEdit = new QTextEdit( this ); | 94 | mAddressTextEdit = new Q3TextEdit( this ); |
88 | mAddressTextEdit->setReadOnly( true ); | 95 | mAddressTextEdit->setReadOnly( true ); |
89 | mAddressTextEdit->setMinimumHeight( 20 ); | 96 | mAddressTextEdit->setMinimumHeight( 20 ); |
90 | #else //KAB_EMBEDDED | 97 | #else //KAB_EMBEDDED |
91 | mAddressTextEdit = new QMultiLineEdit( this ); | 98 | mAddressTextEdit = new Q3MultiLineEdit( this ); |
92 | mAddressTextEdit->setReadOnly( true ); | 99 | mAddressTextEdit->setReadOnly( true ); |
93 | mAddressTextEdit->setMinimumHeight( 20 ); | 100 | mAddressTextEdit->setMinimumHeight( 20 ); |
94 | #endif //KAB_EMBEDDED | 101 | #endif //KAB_EMBEDDED |
95 | 102 | ||
@@ -125,15 +132,15 @@ void AddressEditWidget::setAddresses( const KABC::Addressee &addr, | |||
125 | 132 | ||
126 | // Insert types for existing numbers. | 133 | // Insert types for existing numbers. |
127 | mTypeCombo->insertTypeList( list ); | 134 | mTypeCombo->insertTypeList( list ); |
128 | 135 | ||
129 | QValueList<int> defaultTypes; | 136 | Q3ValueList<int> defaultTypes; |
130 | defaultTypes << KABC::Address::Home; | 137 | defaultTypes << KABC::Address::Home; |
131 | defaultTypes << KABC::Address::Work; | 138 | defaultTypes << KABC::Address::Work; |
132 | 139 | ||
133 | mConfig->setUid( mAddressee.uid() ); | 140 | mConfig->setUid( mAddressee.uid() ); |
134 | QValueList<int> configList = mConfig->noDefaultAddrTypes(); | 141 | Q3ValueList<int> configList = mConfig->noDefaultAddrTypes(); |
135 | QValueList<int>::ConstIterator it; | 142 | Q3ValueList<int>::ConstIterator it; |
136 | for ( it = configList.begin(); it != configList.end(); ++it ) | 143 | for ( it = configList.begin(); it != configList.end(); ++it ) |
137 | defaultTypes.remove( *it ); | 144 | defaultTypes.remove( *it ); |
138 | 145 | ||
139 | // Insert default types. | 146 | // Insert default types. |
@@ -180,9 +187,9 @@ void AddressEditWidget::edit() | |||
180 | } | 187 | } |
181 | } | 188 | } |
182 | 189 | ||
183 | mConfig->setUid( mAddressee.uid() ); | 190 | mConfig->setUid( mAddressee.uid() ); |
184 | QValueList<int> configList; | 191 | Q3ValueList<int> configList; |
185 | if ( !hasHome ) { | 192 | if ( !hasHome ) { |
186 | configList << KABC::Address::Home; | 193 | configList << KABC::Address::Home; |
187 | } | 194 | } |
188 | if ( !hasWork ) { | 195 | if ( !hasWork ) { |
@@ -254,9 +261,9 @@ AddressEditDialog::AddressEditDialog( const KABC::Address::List &list, | |||
254 | mAddressList = list; | 261 | mAddressList = list; |
255 | 262 | ||
256 | QWidget *page = plainPage(); | 263 | QWidget *page = plainPage(); |
257 | 264 | ||
258 | QGridLayout *topLayout = new QGridLayout( page, 8, 2 ); | 265 | Q3GridLayout *topLayout = new Q3GridLayout( page, 8, 2 ); |
259 | topLayout->setSpacing( spacingHintSmall() ); | 266 | topLayout->setSpacing( spacingHintSmall() ); |
260 | 267 | ||
261 | mTypeCombo = new AddressTypeCombo( mAddressList, page ); | 268 | mTypeCombo = new AddressTypeCombo( mAddressList, page ); |
262 | topLayout->addMultiCellWidget( mTypeCombo, 0, 0, 0, 1 ); | 269 | topLayout->addMultiCellWidget( mTypeCombo, 0, 0, 0, 1 ); |
@@ -265,11 +272,11 @@ AddressEditDialog::AddressEditDialog( const KABC::Address::List &list, | |||
265 | label->setAlignment( Qt::AlignTop | Qt::AlignLeft ); | 272 | label->setAlignment( Qt::AlignTop | Qt::AlignLeft ); |
266 | topLayout->addWidget( label, 1, 0 ); | 273 | topLayout->addWidget( label, 1, 0 ); |
267 | 274 | ||
268 | #ifndef KAB_EMBEDDED | 275 | #ifndef KAB_EMBEDDED |
269 | mStreetTextEdit = new QTextEdit( page ); | 276 | mStreetTextEdit = new Q3TextEdit( page ); |
270 | #else //KAB_EMBEDDED | 277 | #else //KAB_EMBEDDED |
271 | mStreetTextEdit = new QMultiLineEdit( page ); | 278 | mStreetTextEdit = new Q3MultiLineEdit( page ); |
272 | //US qDebug("AddressEditDialog::AddressEditDialog has to be changed"); | 279 | //US qDebug("AddressEditDialog::AddressEditDialog has to be changed"); |
273 | #endif //KAB_EMBEDDED | 280 | #endif //KAB_EMBEDDED |
274 | 281 | ||
275 | label->setBuddy( mStreetTextEdit ); | 282 | label->setBuddy( mStreetTextEdit ); |
@@ -310,16 +317,16 @@ AddressEditDialog::AddressEditDialog( const KABC::Address::List &list, | |||
310 | mCountryCombo->setAutoCompletion( true ); | 317 | mCountryCombo->setAutoCompletion( true ); |
311 | fillCountryCombo(); | 318 | fillCountryCombo(); |
312 | label->setBuddy( mCountryCombo ); | 319 | label->setBuddy( mCountryCombo ); |
313 | topLayout->addWidget( mCountryCombo, 6, 1 ); | 320 | topLayout->addWidget( mCountryCombo, 6, 1 ); |
314 | mCountryCombo->setSizeLimit( 8); | 321 | mCountryCombo->setMaxVisibleItems( 8); |
315 | mPreferredCheckBox = new QCheckBox( i18n( "This is the preferred address" ), page ); | 322 | mPreferredCheckBox = new QCheckBox( i18n( "This is the preferred address" ), page ); |
316 | topLayout->addMultiCellWidget( mPreferredCheckBox, 7, 7, 0, 1 ); | 323 | topLayout->addMultiCellWidget( mPreferredCheckBox, 7, 7, 0, 1 ); |
317 | /* | 324 | /* |
318 | KSeparator *sep = new KSeparator( KSeparator::HLine, page ); | 325 | KSeparator *sep = new KSeparator( KSeparator::HLine, page ); |
319 | topLayout->addMultiCellWidget( sep, 8, 8, 0, 1 ); | 326 | topLayout->addMultiCellWidget( sep, 8, 8, 0, 1 ); |
320 | */ | 327 | */ |
321 | QHBox *buttonBox = new QHBox( page ); | 328 | Q3HBox *buttonBox = new Q3HBox( page ); |
322 | buttonBox->setSpacing( spacingHint() ); | 329 | buttonBox->setSpacing( spacingHint() ); |
323 | topLayout->addMultiCellWidget( buttonBox, 9, 9, 0, 1 ); | 330 | topLayout->addMultiCellWidget( buttonBox, 9, 9, 0, 1 ); |
324 | 331 | ||
325 | QPushButton *addButton = new QPushButton( i18n( "New..." ), buttonBox ); | 332 | QPushButton *addButton = new QPushButton( i18n( "New..." ), buttonBox ); |
@@ -582,11 +589,11 @@ AddressTypeDialog::AddressTypeDialog( int type, QWidget *parent ) | |||
582 | : KDialogBase( Plain, i18n( "Edit Address Type" ), Ok | Cancel, Ok, | 589 | : KDialogBase( Plain, i18n( "Edit Address Type" ), Ok | Cancel, Ok, |
583 | parent, "AddressTypeDialog" ) | 590 | parent, "AddressTypeDialog" ) |
584 | { | 591 | { |
585 | QWidget *page = plainPage(); | 592 | QWidget *page = plainPage(); |
586 | QVBoxLayout *layout = new QVBoxLayout( page ); | 593 | Q3VBoxLayout *layout = new Q3VBoxLayout( page ); |
587 | 594 | ||
588 | mGroup = new QButtonGroup( 2, Horizontal, i18n( "Address Types" ), page ); | 595 | mGroup = new Q3ButtonGroup( 2, Qt::Horizontal, i18n( "Address Types" ), page ); |
589 | layout->addWidget( mGroup ); | 596 | layout->addWidget( mGroup ); |
590 | 597 | ||
591 | mTypeList = KABC::Address::typeList(); | 598 | mTypeList = KABC::Address::typeList(); |
592 | mTypeList.remove( KABC::Address::Pref ); | 599 | mTypeList.remove( KABC::Address::Pref ); |
@@ -616,7 +623,7 @@ int AddressTypeDialog::type() const | |||
616 | 623 | ||
617 | return type; | 624 | return type; |
618 | } | 625 | } |
619 | 626 | ||
620 | #ifndef KAB_EMBEDDED | 627 | #ifndef KAB_EMBEDDED_ |
621 | #include "addresseditwidget.moc" | 628 | #include "moc_addresseditwidget.cpp" |
622 | #endif //KAB_EMBEDDED | 629 | #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 | |||
@@ -32,15 +32,15 @@ | |||
32 | 32 | ||
33 | #include "addresseeconfig.h" | 33 | #include "addresseeconfig.h" |
34 | #include "typecombo.h" | 34 | #include "typecombo.h" |
35 | 35 | ||
36 | class QButtonGroup; | 36 | class Q3ButtonGroup; |
37 | class QCheckBox; | 37 | class QCheckBox; |
38 | class QListView; | 38 | class Q3ListView; |
39 | #ifndef KAB_EMBEDDED | 39 | #ifndef KAB_EMBEDDED |
40 | class QTextEdit; | 40 | class Q3TextEdit; |
41 | #else //KAB_EMBEDDED | 41 | #else //KAB_EMBEDDED |
42 | class QMultiLineEdit; | 42 | class Q3MultiLineEdit; |
43 | #endif //KAB_EMBEDDED | 43 | #endif //KAB_EMBEDDED |
44 | class QToolButton; | 44 | class QToolButton; |
45 | 45 | ||
46 | class KComboBox; | 46 | class KComboBox; |
@@ -80,11 +80,11 @@ class AddressEditWidget : public QWidget | |||
80 | AddressTypeCombo *mTypeCombo; | 80 | AddressTypeCombo *mTypeCombo; |
81 | 81 | ||
82 | QPushButton *mEditButton; | 82 | QPushButton *mEditButton; |
83 | #ifndef KAB_EMBEDDED | 83 | #ifndef KAB_EMBEDDED |
84 | QTextEdit *mAddressTextEdit; | 84 | Q3TextEdit *mAddressTextEdit; |
85 | #else //KAB_EMBEDDED | 85 | #else //KAB_EMBEDDED |
86 | QMultiLineEdit *mAddressTextEdit; | 86 | Q3MultiLineEdit *mAddressTextEdit; |
87 | #endif //KAB_EMBEDDED | 87 | #endif //KAB_EMBEDDED |
88 | 88 | ||
89 | KABC::Address::List mAddressList; | 89 | KABC::Address::List mAddressList; |
90 | KABC::Addressee mAddressee; | 90 | KABC::Addressee mAddressee; |
@@ -119,11 +119,11 @@ class AddressEditDialog : public KDialogBase | |||
119 | void fillCountryCombo(); | 119 | void fillCountryCombo(); |
120 | 120 | ||
121 | AddressTypeCombo *mTypeCombo; | 121 | AddressTypeCombo *mTypeCombo; |
122 | #ifndef KAB_EMBEDDED | 122 | #ifndef KAB_EMBEDDED |
123 | QTextEdit *mStreetTextEdit; | 123 | Q3TextEdit *mStreetTextEdit; |
124 | #else //KAB_EMBEDDED | 124 | #else //KAB_EMBEDDED |
125 | QMultiLineEdit *mStreetTextEdit; | 125 | Q3MultiLineEdit *mStreetTextEdit; |
126 | #endif //KAB_EMBEDDED | 126 | #endif //KAB_EMBEDDED |
127 | KComboBox *mCountryCombo; | 127 | KComboBox *mCountryCombo; |
128 | KLineEdit *mRegionEdit; | 128 | KLineEdit *mRegionEdit; |
129 | KLineEdit *mLocalityEdit; | 129 | KLineEdit *mLocalityEdit; |
@@ -150,9 +150,9 @@ class AddressTypeDialog : public KDialogBase | |||
150 | 150 | ||
151 | int type() const; | 151 | int type() const; |
152 | 152 | ||
153 | private: | 153 | private: |
154 | QButtonGroup *mGroup; | 154 | Q3ButtonGroup *mGroup; |
155 | 155 | ||
156 | KABC::Address::TypeList mTypeList; | 156 | KABC::Address::TypeList mTypeList; |
157 | }; | 157 | }; |
158 | 158 | ||
diff --git a/kaddressbook/addresseeconfig.cpp b/kaddressbook/addresseeconfig.cpp index ea0436f..81b1bf4 100644 --- a/kaddressbook/addresseeconfig.cpp +++ b/kaddressbook/addresseeconfig.cpp | |||
@@ -25,8 +25,10 @@ | |||
25 | #include "kabprefs.h" | 25 | #include "kabprefs.h" |
26 | //US | 26 | //US |
27 | #include <kstandarddirs.h> | 27 | #include <kstandarddirs.h> |
28 | #include <qfileinfo.h> | 28 | #include <qfileinfo.h> |
29 | //Added by qt3to4: | ||
30 | #include <Q3ValueList> | ||
29 | 31 | ||
30 | using namespace KABC; | 32 | using namespace KABC; |
31 | 33 | ||
32 | static AddresseeConfig* extern_AddresseeConfig = 0; | 34 | static AddresseeConfig* extern_AddresseeConfig = 0; |
@@ -76,15 +78,15 @@ void AddresseeConfig::setAutomaticNameParsing( bool value ) | |||
76 | return AddresseeConfig::config()->readBoolEntry( "AutomaticNameParsing", | 78 | return AddresseeConfig::config()->readBoolEntry( "AutomaticNameParsing", |
77 | KABPrefs::instance()->mAutomaticNameParsing ); | 79 | KABPrefs::instance()->mAutomaticNameParsing ); |
78 | } | 80 | } |
79 | 81 | ||
80 | void AddresseeConfig::setNoDefaultAddrTypes( const QValueList<int> &types ) | 82 | void AddresseeConfig::setNoDefaultAddrTypes( const Q3ValueList<int> &types ) |
81 | { | 83 | { |
82 | AddresseeConfig::config()->writeEntry( "NoDefaultAddrTypes", types ); | 84 | AddresseeConfig::config()->writeEntry( "NoDefaultAddrTypes", types ); |
83 | AddresseeConfig::config()->sync(); | 85 | AddresseeConfig::config()->sync(); |
84 | } | 86 | } |
85 | 87 | ||
86 | QValueList<int> AddresseeConfig::noDefaultAddrTypes() const | 88 | Q3ValueList<int> AddresseeConfig::noDefaultAddrTypes() const |
87 | { | 89 | { |
88 | return AddresseeConfig::config()->readIntListEntry( "NoDefaultAddrTypes" ); | 90 | return AddresseeConfig::config()->readIntListEntry( "NoDefaultAddrTypes" ); |
89 | } | 91 | } |
90 | 92 | ||
diff --git a/kaddressbook/addresseeconfig.h b/kaddressbook/addresseeconfig.h index 47fbdd6..f6bb3e9 100644 --- a/kaddressbook/addresseeconfig.h +++ b/kaddressbook/addresseeconfig.h | |||
@@ -25,8 +25,10 @@ | |||
25 | #define ADDRESSEECONFIG_H | 25 | #define ADDRESSEECONFIG_H |
26 | 26 | ||
27 | #include <kabc/addressee.h> | 27 | #include <kabc/addressee.h> |
28 | #include <kconfig.h> | 28 | #include <kconfig.h> |
29 | //Added by qt3to4: | ||
30 | #include <Q3ValueList> | ||
29 | 31 | ||
30 | using namespace KABC; | 32 | using namespace KABC; |
31 | 33 | ||
32 | class AddresseeConfig | 34 | class AddresseeConfig |
@@ -42,10 +44,10 @@ class AddresseeConfig | |||
42 | void setUid( const QString & uid ); | 44 | void setUid( const QString & uid ); |
43 | void setAutomaticNameParsing( bool value ); | 45 | void setAutomaticNameParsing( bool value ); |
44 | bool automaticNameParsing(); | 46 | bool automaticNameParsing(); |
45 | 47 | ||
46 | void setNoDefaultAddrTypes( const QValueList<int> &types ); | 48 | void setNoDefaultAddrTypes( const Q3ValueList<int> &types ); |
47 | QValueList<int> noDefaultAddrTypes() const; | 49 | Q3ValueList<int> noDefaultAddrTypes() const; |
48 | 50 | ||
49 | void remove( const QString & uid); | 51 | void remove( const QString & uid); |
50 | 52 | ||
51 | private: | 53 | private: |
diff --git a/kaddressbook/addresseeeditordialog.cpp b/kaddressbook/addresseeeditordialog.cpp index b5a60f2..b925a07 100644 --- a/kaddressbook/addresseeeditordialog.cpp +++ b/kaddressbook/addresseeeditordialog.cpp | |||
@@ -22,8 +22,11 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <qlayout.h> | 24 | #include <qlayout.h> |
25 | #include <qapplication.h> | 25 | #include <qapplication.h> |
26 | #include <QDesktopWidget> | ||
27 | //Added by qt3to4: | ||
28 | #include <Q3VBoxLayout> | ||
26 | 29 | ||
27 | #include <kdebug.h> | 30 | #include <kdebug.h> |
28 | #include <klocale.h> | 31 | #include <klocale.h> |
29 | #include <kglobal.h> | 32 | #include <kglobal.h> |
@@ -42,9 +45,9 @@ AddresseeEditorDialog::AddresseeEditorDialog( KABCore *core, QWidget *parent, | |||
42 | 45 | ||
43 | 46 | ||
44 | QWidget *page = plainPage(); | 47 | QWidget *page = plainPage(); |
45 | 48 | ||
46 | QVBoxLayout *layout = new QVBoxLayout( page ); | 49 | Q3VBoxLayout *layout = new Q3VBoxLayout( page ); |
47 | 50 | ||
48 | mEditorWidget = new AddresseeEditorWidget( core, false, page ); | 51 | mEditorWidget = new AddresseeEditorWidget( core, false, page ); |
49 | connect( mEditorWidget, SIGNAL( modified( const KABC::Addressee::List& ) ), | 52 | connect( mEditorWidget, SIGNAL( modified( const KABC::Addressee::List& ) ), |
50 | SLOT( widgetModified() ) ); | 53 | SLOT( widgetModified() ) ); |
@@ -117,7 +120,7 @@ void AddresseeEditorDialog::slotCancel() | |||
117 | 120 | ||
118 | 121 | ||
119 | } | 122 | } |
120 | 123 | ||
121 | #ifndef KAB_EMBEDDED | 124 | #ifndef KAB_EMBEDDED_ |
122 | #include "addresseeeditordialog.moc" | 125 | #include "moc_addresseeeditordialog.cpp" |
123 | #endif //KAB_EMBEDDED | 126 | #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 | |||
@@ -21,25 +21,29 @@ | |||
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <qcheckbox.h> | 24 | #include <qcheckbox.h> |
25 | #include <qhbox.h> | 25 | #include <q3hbox.h> |
26 | #include <qlabel.h> | 26 | #include <qlabel.h> |
27 | #include <qlayout.h> | 27 | #include <qlayout.h> |
28 | #include <qlistbox.h> | 28 | #include <q3listbox.h> |
29 | #include <qpushbutton.h> | 29 | #include <qpushbutton.h> |
30 | #include <qtabwidget.h> | 30 | #include <qtabwidget.h> |
31 | #include <qapplication.h> | 31 | #include <qapplication.h> |
32 | 32 | ||
33 | #ifndef KAB_EMBEDDED | 33 | #ifndef KAB_EMBEDDED |
34 | #include <qtextedit.h> | 34 | #include <q3textedit.h> |
35 | //Added by qt3to4: | ||
36 | #include <Q3GridLayout> | ||
37 | #include <Q3PopupMenu> | ||
38 | #include <Q3VBoxLayout> | ||
35 | 39 | ||
36 | #include <kaccelmanager.h> | 40 | #include <kaccelmanager.h> |
37 | #include "keywidget.h" | 41 | #include "keywidget.h" |
38 | #include "soundwidget.h" | 42 | #include "soundwidget.h" |
39 | 43 | ||
40 | #else //KAB_EMBEDDED | 44 | #else //KAB_EMBEDDED |
41 | #include <qmultilineedit.h> | 45 | #include <q3multilineedit.h> |
42 | #endif //KAB_EMBEDDED | 46 | #endif //KAB_EMBEDDED |
43 | 47 | ||
44 | 48 | ||
45 | #include "keywidget.h" | 49 | #include "keywidget.h" |
@@ -129,9 +133,9 @@ void AddresseeEditorWidget::textChanged( const QString& ) | |||
129 | } | 133 | } |
130 | 134 | ||
131 | void AddresseeEditorWidget::initGUI() | 135 | void AddresseeEditorWidget::initGUI() |
132 | { | 136 | { |
133 | QVBoxLayout *layout = new QVBoxLayout( this ); | 137 | Q3VBoxLayout *layout = new Q3VBoxLayout( this ); |
134 | 138 | ||
135 | mTabWidget = new QTabWidget( this ); | 139 | mTabWidget = new QTabWidget( this ); |
136 | layout->addWidget( mTabWidget ); | 140 | layout->addWidget( mTabWidget ); |
137 | 141 | ||
@@ -159,9 +163,9 @@ void AddresseeEditorWidget::setupTab1() | |||
159 | if ( QApplication::desktop()->width() == 640 || QApplication::desktop()->width() == 320 ) { | 163 | if ( QApplication::desktop()->width() == 640 || QApplication::desktop()->width() == 320 ) { |
160 | horLayout = true; | 164 | horLayout = true; |
161 | maxCol = 3; | 165 | maxCol = 3; |
162 | } | 166 | } |
163 | QGridLayout *layout = new QGridLayout( tab1, 7-maxCol, maxCol ); | 167 | Q3GridLayout *layout = new Q3GridLayout( tab1, 7-maxCol, maxCol ); |
164 | 168 | ||
165 | layout->setMargin( KDialogBase::marginHintSmall() ); | 169 | layout->setMargin( KDialogBase::marginHintSmall() ); |
166 | layout->setSpacing( KDialogBase::spacingHintSmall() ); | 170 | layout->setSpacing( KDialogBase::spacingHintSmall() ); |
167 | 171 | ||
@@ -326,9 +330,9 @@ void AddresseeEditorWidget::setupTab1() | |||
326 | bar = new KSeparator( KSeparator::HLine, tab1 ); | 330 | bar = new KSeparator( KSeparator::HLine, tab1 ); |
327 | layout->addMultiCellWidget( bar, 10, 10, 0, 6 ); | 331 | layout->addMultiCellWidget( bar, 10, 10, 0, 6 ); |
328 | */ | 332 | */ |
329 | /////////////////////////////////////// | 333 | /////////////////////////////////////// |
330 | QHBox *categoryBox = new QHBox( tab1 ,"cato"); | 334 | Q3HBox *categoryBox = new Q3HBox( tab1 ,"cato"); |
331 | categoryBox->setSpacing( KDialogBase::spacingHint() ); | 335 | categoryBox->setSpacing( KDialogBase::spacingHint() ); |
332 | categoryBox->setMargin( KDialogBase::marginHintSmall() ); | 336 | categoryBox->setMargin( KDialogBase::marginHintSmall() ); |
333 | 337 | ||
334 | // Categories | 338 | // Categories |
@@ -336,9 +340,9 @@ void AddresseeEditorWidget::setupTab1() | |||
336 | connect( button, SIGNAL( clicked() ), SLOT( categoryButtonClicked() ) ); | 340 | connect( button, SIGNAL( clicked() ), SLOT( categoryButtonClicked() ) ); |
337 | 341 | ||
338 | mCategoryEdit = new QPushButton ( categoryBox ); | 342 | mCategoryEdit = new QPushButton ( categoryBox ); |
339 | mCategoryEdit->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::Fixed ,FALSE) ); | 343 | mCategoryEdit->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::Fixed ,FALSE) ); |
340 | mCatPopup = new QPopupMenu ( categoryBox ); | 344 | mCatPopup = new Q3PopupMenu ( categoryBox ); |
341 | mCategoryEdit->setPopup( mCatPopup ); | 345 | mCategoryEdit->setPopup( mCatPopup ); |
342 | connect(mCatPopup,SIGNAL(aboutToShow () ), this ,SLOT(showCatPopup())); | 346 | connect(mCatPopup,SIGNAL(aboutToShow () ), this ,SLOT(showCatPopup())); |
343 | connect(mCatPopup,SIGNAL( activated ( int ) ), this ,SLOT(selectedCatPopup( int ))); | 347 | connect(mCatPopup,SIGNAL( activated ( int ) ), this ,SLOT(selectedCatPopup( int ))); |
344 | //connect( mCategoryEdit, SIGNAL( textChanged( const QString& ) ), | 348 | //connect( mCategoryEdit, SIGNAL( textChanged( const QString& ) ), |
@@ -410,9 +414,9 @@ void AddresseeEditorWidget::setupTab1_1() | |||
410 | // This is the Address tab | 414 | // This is the Address tab |
411 | QWidget *tab1_1 = new QWidget( mTabWidget ); | 415 | QWidget *tab1_1 = new QWidget( mTabWidget ); |
412 | 416 | ||
413 | //US QGridLayout *layout = new QGridLayout( tab1_1, 11, 7 ); | 417 | //US QGridLayout *layout = new QGridLayout( tab1_1, 11, 7 ); |
414 | QGridLayout *layout = new QGridLayout( tab1_1, 7, 2 ); | 418 | Q3GridLayout *layout = new Q3GridLayout( tab1_1, 7, 2 ); |
415 | layout->setMargin( KDialogBase::marginHintSmall() ); | 419 | layout->setMargin( KDialogBase::marginHintSmall() ); |
416 | layout->setSpacing( KDialogBase::spacingHintSmall() ); | 420 | layout->setSpacing( KDialogBase::spacingHintSmall() ); |
417 | 421 | ||
418 | QLabel *label; | 422 | QLabel *label; |
@@ -611,9 +615,9 @@ void AddresseeEditorWidget::setupTab2() | |||
611 | { | 615 | { |
612 | // This is the Details tab | 616 | // This is the Details tab |
613 | QWidget *tab2 = new QWidget( mTabWidget ); | 617 | QWidget *tab2 = new QWidget( mTabWidget ); |
614 | 618 | ||
615 | QGridLayout *layout = new QGridLayout( tab2, 8, 3 ); | 619 | Q3GridLayout *layout = new Q3GridLayout( tab2, 8, 3 ); |
616 | layout->setMargin( KDialogBase::marginHintSmall() ); | 620 | layout->setMargin( KDialogBase::marginHintSmall() ); |
617 | layout->setSpacing( KDialogBase::spacingHintSmall() ); | 621 | layout->setSpacing( KDialogBase::spacingHintSmall() ); |
618 | 622 | ||
619 | QLabel *label; | 623 | QLabel *label; |
@@ -690,9 +694,9 @@ void AddresseeEditorWidget::setupTab2() | |||
690 | 694 | ||
691 | int iii = 6; | 695 | int iii = 6; |
692 | 696 | ||
693 | if ( QApplication::desktop()->width() == 640 ) { | 697 | if ( QApplication::desktop()->width() == 640 ) { |
694 | QHBox * nbox = new QHBox ( tab2 ); | 698 | Q3HBox * nbox = new Q3HBox ( tab2 ); |
695 | label = new QLabel( i18n( "Nick name:" )+" ", nbox ); | 699 | label = new QLabel( i18n( "Nick name:" )+" ", nbox ); |
696 | mNicknameEdit = new KLineEdit( nbox ); | 700 | mNicknameEdit = new KLineEdit( nbox ); |
697 | connect( mNicknameEdit, SIGNAL( textChanged( const QString& ) ), | 701 | connect( mNicknameEdit, SIGNAL( textChanged( const QString& ) ), |
698 | SLOT( textChanged( const QString& ) ) ); | 702 | SLOT( textChanged( const QString& ) ) ); |
@@ -734,9 +738,9 @@ void AddresseeEditorWidget::setupTab2() | |||
734 | label->setBuddy( mChildEdit ); | 738 | label->setBuddy( mChildEdit ); |
735 | layout->addWidget( mChildEdit, iii, 2 ); | 739 | layout->addWidget( mChildEdit, iii, 2 ); |
736 | ++iii; | 740 | ++iii; |
737 | if ( QApplication::desktop()->width() == 640 ) { | 741 | if ( QApplication::desktop()->width() == 640 ) { |
738 | QHBox * nbox = new QHBox ( tab2 ); | 742 | Q3HBox * nbox = new Q3HBox ( tab2 ); |
739 | label = new QLabel( i18n( "Birthday:" )+" ", nbox ); | 743 | label = new QLabel( i18n( "Birthday:" )+" ", nbox ); |
740 | mBirthdayPicker = new KDateEdit( nbox ); | 744 | mBirthdayPicker = new KDateEdit( nbox ); |
741 | //mBirthdayPicker->toggleDateFormat(); | 745 | //mBirthdayPicker->toggleDateFormat(); |
742 | mBirthdayPicker->setHandleInvalid( true ); | 746 | mBirthdayPicker->setHandleInvalid( true ); |
@@ -803,9 +807,9 @@ void AddresseeEditorWidget::setupTab2_1() | |||
803 | { | 807 | { |
804 | // This is the Details tab | 808 | // This is the Details tab |
805 | QWidget *tab2_2 = new QWidget( mTabWidget ); | 809 | QWidget *tab2_2 = new QWidget( mTabWidget ); |
806 | 810 | ||
807 | QGridLayout *layout = new QGridLayout( tab2_2, 1, 2 ); | 811 | Q3GridLayout *layout = new Q3GridLayout( tab2_2, 1, 2 ); |
808 | layout->setMargin( KDialogBase::marginHintSmall() ); | 812 | layout->setMargin( KDialogBase::marginHintSmall() ); |
809 | layout->setSpacing( KDialogBase::spacingHintSmall() ); | 813 | layout->setSpacing( KDialogBase::spacingHintSmall() ); |
810 | 814 | ||
811 | QLabel *label; | 815 | QLabel *label; |
@@ -925,14 +929,14 @@ void AddresseeEditorWidget::setupTab2_1() | |||
925 | label->setAlignment( Qt::AlignTop | Qt::AlignLeft ); | 929 | label->setAlignment( Qt::AlignTop | Qt::AlignLeft ); |
926 | //US layout->addWidget( label, 7, 0 ); | 930 | //US layout->addWidget( label, 7, 0 ); |
927 | layout->addWidget( label, 0, 0 ); | 931 | layout->addWidget( label, 0, 0 ); |
928 | #ifndef KAB_EMBEDDED | 932 | #ifndef KAB_EMBEDDED |
929 | mNoteEdit = new QTextEdit( tab2_2 ); | 933 | mNoteEdit = new Q3TextEdit( tab2_2 ); |
930 | mNoteEdit->setWordWrap( QTextEdit::WidgetWidth ); | 934 | mNoteEdit->setWordWrap( Q3TextEdit::WidgetWidth ); |
931 | mNoteEdit->setMinimumSize( mNoteEdit->sizeHint() ); | 935 | mNoteEdit->setMinimumSize( mNoteEdit->sizeHint() ); |
932 | #else //KAB_EMBEDDED | 936 | #else //KAB_EMBEDDED |
933 | mNoteEdit = new QMultiLineEdit( tab2_2 ); | 937 | mNoteEdit = new Q3MultiLineEdit( tab2_2 ); |
934 | mNoteEdit->setWordWrap( QMultiLineEdit::WidgetWidth ); | 938 | mNoteEdit->setWordWrap( Q3MultiLineEdit::WidgetWidth ); |
935 | mNoteEdit->setMinimumSize( mNoteEdit->sizeHint() ); | 939 | mNoteEdit->setMinimumSize( mNoteEdit->sizeHint() ); |
936 | #endif //KAB_EMBEDDED | 940 | #endif //KAB_EMBEDDED |
937 | 941 | ||
938 | connect( mNoteEdit, SIGNAL( textChanged() ), SLOT( emitModified() ) ); | 942 | connect( mNoteEdit, SIGNAL( textChanged() ), SLOT( emitModified() ) ); |
@@ -952,9 +956,9 @@ void AddresseeEditorWidget::setupTab3() | |||
952 | { | 956 | { |
953 | // This is the Misc tab | 957 | // This is the Misc tab |
954 | QWidget *tab3 = new QWidget( mTabWidget ); | 958 | QWidget *tab3 = new QWidget( mTabWidget ); |
955 | 959 | ||
956 | QGridLayout *layout = new QGridLayout( tab3, 1, 1 ); | 960 | Q3GridLayout *layout = new Q3GridLayout( tab3, 1, 1 ); |
957 | layout->setMargin( KDialogBase::marginHintSmall() ); | 961 | layout->setMargin( KDialogBase::marginHintSmall() ); |
958 | layout->setSpacing( KDialogBase::spacingHintSmall() ); | 962 | layout->setSpacing( KDialogBase::spacingHintSmall() ); |
959 | //US layout->setColStretch( 2, 1 ); | 963 | //US layout->setColStretch( 2, 1 ); |
960 | 964 | ||
@@ -1004,9 +1008,9 @@ void AddresseeEditorWidget::setupTab3_1() | |||
1004 | // This is the Misc tab | 1008 | // This is the Misc tab |
1005 | QWidget *tab3 = new QWidget( mTabWidget ); | 1009 | QWidget *tab3 = new QWidget( mTabWidget ); |
1006 | 1010 | ||
1007 | //US QGridLayout *layout = new QGridLayout( tab3, 2, 3 ); | 1011 | //US QGridLayout *layout = new QGridLayout( tab3, 2, 3 ); |
1008 | QGridLayout *layout = new QGridLayout( tab3, 1, 1 ); | 1012 | Q3GridLayout *layout = new Q3GridLayout( tab3, 1, 1 ); |
1009 | layout->setMargin( KDialogBase::marginHint() ); | 1013 | layout->setMargin( KDialogBase::marginHint() ); |
1010 | layout->setSpacing( KDialogBase::spacingHint() ); | 1014 | layout->setSpacing( KDialogBase::spacingHint() ); |
1011 | //US layout->setColStretch( 2, 1 ); | 1015 | //US layout->setColStretch( 2, 1 ); |
1012 | 1016 | ||
@@ -1429,7 +1433,7 @@ QString AddresseeEditorWidget::identifier() const | |||
1429 | { | 1433 | { |
1430 | return i18n( "contact_editor" ); | 1434 | return i18n( "contact_editor" ); |
1431 | } | 1435 | } |
1432 | 1436 | ||
1433 | #ifndef KAB_EMBEDDED | 1437 | #ifndef KAB_EMBEDDED_ |
1434 | #include "addresseeeditorwidget.moc" | 1438 | #include "moc_addresseeeditorwidget.cpp" |
1435 | #endif //KAB_EMBEDDED | 1439 | #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 | |||
@@ -24,9 +24,9 @@ | |||
24 | #ifndef ADDRESSEEEDITORWIDGET_H | 24 | #ifndef ADDRESSEEEDITORWIDGET_H |
25 | #define ADDRESSEEEDITORWIDGET_H | 25 | #define ADDRESSEEEDITORWIDGET_H |
26 | 26 | ||
27 | #include <qdatetime.h> | 27 | #include <qdatetime.h> |
28 | #include <qpopupmenu.h> | 28 | #include <q3popupmenu.h> |
29 | #include <qcombobox.h> | 29 | #include <qcombobox.h> |
30 | 30 | ||
31 | #include <kabc/addressee.h> | 31 | #include <kabc/addressee.h> |
32 | #include <kdialogbase.h> | 32 | #include <kdialogbase.h> |
@@ -39,11 +39,11 @@ class QCheckBox; | |||
39 | class QSpinBox; | 39 | class QSpinBox; |
40 | class QTabWidget; | 40 | class QTabWidget; |
41 | 41 | ||
42 | #ifndef KAB_EMBEDDED | 42 | #ifndef KAB_EMBEDDED |
43 | class QTextEdit; | 43 | class Q3TextEdit; |
44 | #else //KAB_EMBEDDED | 44 | #else //KAB_EMBEDDED |
45 | class QMultiLineEdit; | 45 | class Q3MultiLineEdit; |
46 | #endif //KAB_EMBEDDED | 46 | #endif //KAB_EMBEDDED |
47 | 47 | ||
48 | class KComboBox; | 48 | class KComboBox; |
49 | class KDateEdit; | 49 | class KDateEdit; |
@@ -154,9 +154,9 @@ class AddresseeEditorWidget : public ExtensionWidget | |||
154 | PhoneEditWidget *mPhoneEditWidget; | 154 | PhoneEditWidget *mPhoneEditWidget; |
155 | KLineEdit *mURLEdit; | 155 | KLineEdit *mURLEdit; |
156 | KLineEdit *mIMAddressEdit; | 156 | KLineEdit *mIMAddressEdit; |
157 | QPushButton *mCategoryEdit; | 157 | QPushButton *mCategoryEdit; |
158 | QPopupMenu *mCatPopup; | 158 | Q3PopupMenu *mCatPopup; |
159 | SecrecyWidget *mSecrecyWidget; | 159 | SecrecyWidget *mSecrecyWidget; |
160 | KSqueezedTextLabel *mNameLabel; | 160 | KSqueezedTextLabel *mNameLabel; |
161 | 161 | ||
162 | // Tab2 and Tab2_2 | 162 | // Tab2 and Tab2_2 |
@@ -171,11 +171,11 @@ class AddresseeEditorWidget : public ExtensionWidget | |||
171 | QComboBox *mGenderBox; | 171 | QComboBox *mGenderBox; |
172 | KDateEdit *mBirthdayPicker; | 172 | KDateEdit *mBirthdayPicker; |
173 | KDateEdit *mAnniversaryPicker; | 173 | KDateEdit *mAnniversaryPicker; |
174 | #ifndef KAB_EMBEDDED | 174 | #ifndef KAB_EMBEDDED |
175 | QTextEdit *mNoteEdit; | 175 | Q3TextEdit *mNoteEdit; |
176 | #else //KAB_EMBEDDED | 176 | #else //KAB_EMBEDDED |
177 | QMultiLineEdit *mNoteEdit; | 177 | Q3MultiLineEdit *mNoteEdit; |
178 | #endif //KAB_EMBEDDED | 178 | #endif //KAB_EMBEDDED |
179 | 179 | ||
180 | QSpinBox *mTimeZoneSpin; | 180 | QSpinBox *mTimeZoneSpin; |
181 | QSpinBox *mGeoLat; | 181 | QSpinBox *mGeoLat; |
diff --git a/kaddressbook/addresseeutil.cpp b/kaddressbook/addresseeutil.cpp index 366384a..a860f6d 100644 --- a/kaddressbook/addresseeutil.cpp +++ b/kaddressbook/addresseeutil.cpp | |||
@@ -45,9 +45,9 @@ QString AddresseeUtil::addresseesToClipboard( const KABC::Addressee::List &list | |||
45 | } | 45 | } |
46 | 46 | ||
47 | KABC::Addressee::List AddresseeUtil::clipboardToAddressees( const QString &data ) | 47 | KABC::Addressee::List AddresseeUtil::clipboardToAddressees( const QString &data ) |
48 | { | 48 | { |
49 | uint numVCards = data.contains( "BEGIN:VCARD", false ); | 49 | uint numVCards = data.count( "BEGIN:VCARD", Qt::CaseInsensitive ); |
50 | QStringList dataList = QStringList::split( "\r\n\r\n", data ); | 50 | QStringList dataList = QStringList::split( "\r\n\r\n", data ); |
51 | 51 | ||
52 | KABC::Addressee::List addrList; | 52 | KABC::Addressee::List addrList; |
53 | for ( uint i = 0; i < numVCards && i < dataList.count(); ++i ) { | 53 | for ( uint i = 0; i < numVCards && i < dataList.count(); ++i ) { |
diff --git a/kaddressbook/addviewdialog.cpp b/kaddressbook/addviewdialog.cpp index 6def26b..b52a83c 100644 --- a/kaddressbook/addviewdialog.cpp +++ b/kaddressbook/addviewdialog.cpp | |||
@@ -24,19 +24,21 @@ | |||
24 | #ifndef KAB_EMBEDDED | 24 | #ifndef KAB_EMBEDDED |
25 | #endif //KAB_EMBEDDED | 25 | #endif //KAB_EMBEDDED |
26 | 26 | ||
27 | #include <qradiobutton.h> | 27 | #include <qradiobutton.h> |
28 | #include <qbuttongroup.h> | 28 | #include <q3buttongroup.h> |
29 | #include <qlabel.h> | 29 | #include <qlabel.h> |
30 | #include <qlineedit.h> | 30 | #include <qlineedit.h> |
31 | #include <qlayout.h> | 31 | #include <qlayout.h> |
32 | //Added by qt3to4: | ||
33 | #include <Q3GridLayout> | ||
32 | 34 | ||
33 | #include <klocale.h> | 35 | #include <klocale.h> |
34 | #include <kglobal.h> | 36 | #include <kglobal.h> |
35 | #include "kaddressbookview.h" | 37 | #include "kaddressbookview.h" |
36 | #include "addviewdialog.h" | 38 | #include "addviewdialog.h" |
37 | 39 | ||
38 | AddViewDialog::AddViewDialog( QDict<ViewFactory> *viewFactoryDict, | 40 | AddViewDialog::AddViewDialog( Q3Dict<ViewFactory> *viewFactoryDict, |
39 | QWidget *parent, const char *name ) | 41 | QWidget *parent, const char *name ) |
40 | : KDialogBase( KDialogBase::Plain, i18n( "Add View" ), | 42 | : KDialogBase( KDialogBase::Plain, i18n( "Add View" ), |
41 | KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, | 43 | KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, |
42 | parent, name ), | 44 | parent, name ), |
@@ -47,9 +49,9 @@ AddViewDialog::AddViewDialog( QDict<ViewFactory> *viewFactoryDict, | |||
47 | mTypeId = 0; | 49 | mTypeId = 0; |
48 | 50 | ||
49 | QWidget *page = plainPage(); | 51 | QWidget *page = plainPage(); |
50 | 52 | ||
51 | QGridLayout *layout = new QGridLayout( page, 2, 2 ); | 53 | Q3GridLayout *layout = new Q3GridLayout( page, 2, 2 ); |
52 | layout->setSpacing( spacingHint() ); | 54 | layout->setSpacing( spacingHint() ); |
53 | layout->setRowStretch( 1, 1 ); | 55 | layout->setRowStretch( 1, 1 ); |
54 | layout->setColStretch( 1, 1 ); | 56 | layout->setColStretch( 1, 1 ); |
55 | 57 | ||
@@ -60,14 +62,14 @@ AddViewDialog::AddViewDialog( QDict<ViewFactory> *viewFactoryDict, | |||
60 | connect( mViewNameEdit, SIGNAL( textChanged( const QString& ) ), | 62 | connect( mViewNameEdit, SIGNAL( textChanged( const QString& ) ), |
61 | SLOT( textChanged( const QString& ) ) ); | 63 | SLOT( textChanged( const QString& ) ) ); |
62 | layout->addWidget( mViewNameEdit, 0, 1 ); | 64 | layout->addWidget( mViewNameEdit, 0, 1 ); |
63 | 65 | ||
64 | mTypeGroup = new QButtonGroup( 2, Qt::Horizontal, i18n( "View Type" ), page ); | 66 | mTypeGroup = new Q3ButtonGroup( 2, Qt::Horizontal, i18n( "View Type" ), page ); |
65 | connect( mTypeGroup, SIGNAL( clicked( int ) ), this, SLOT( clicked( int ) ) ); | 67 | connect( mTypeGroup, SIGNAL( clicked( int ) ), this, SLOT( clicked( int ) ) ); |
66 | layout->addMultiCellWidget( mTypeGroup, 1, 1, 0, 1 ); | 68 | layout->addMultiCellWidget( mTypeGroup, 1, 1, 0, 1 ); |
67 | 69 | ||
68 | // Now create the radio buttons. This needs some layout work. | 70 | // Now create the radio buttons. This needs some layout work. |
69 | QDictIterator<ViewFactory> iter( *mViewFactoryDict ); | 71 | Q3DictIterator<ViewFactory> iter( *mViewFactoryDict ); |
70 | for ( iter.toFirst(); iter.current(); ++iter ) { | 72 | for ( iter.toFirst(); iter.current(); ++iter ) { |
71 | //US i am not quit sure, why I can nopt use (*iter)-> here | 73 | //US i am not quit sure, why I can nopt use (*iter)-> here |
72 | //US new QRadioButton( (*iter)->type(), mTypeGroup ); | 74 | //US new QRadioButton( (*iter)->type(), mTypeGroup ); |
73 | //US label = new QLabel( (*iter)->description(), mTypeGroup ); | 75 | //US label = new QLabel( (*iter)->description(), mTypeGroup ); |
@@ -112,7 +114,7 @@ void AddViewDialog::textChanged( const QString &text ) | |||
112 | { | 114 | { |
113 | enableButton( KDialogBase::Ok, !text.isEmpty() ); | 115 | enableButton( KDialogBase::Ok, !text.isEmpty() ); |
114 | } | 116 | } |
115 | 117 | ||
116 | #ifndef KAB_EMBEDDED | 118 | #ifndef KAB_EMBEDDED_ |
117 | #include "addviewdialog.moc" | 119 | #include "moc_addviewdialog.cpp" |
118 | #endif //KAB_EMBEDDED | 120 | #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 | |||
@@ -24,13 +24,13 @@ | |||
24 | #ifndef ADDVIEWDIALOG_H | 24 | #ifndef ADDVIEWDIALOG_H |
25 | #define ADDVIEWDIALOG_H | 25 | #define ADDVIEWDIALOG_H |
26 | 26 | ||
27 | #include <kdialogbase.h> | 27 | #include <kdialogbase.h> |
28 | #include <qdict.h> | 28 | #include <q3dict.h> |
29 | #include <qstring.h> | 29 | #include <qstring.h> |
30 | 30 | ||
31 | class ViewFactory; | 31 | class ViewFactory; |
32 | class QButtonGroup; | 32 | class Q3ButtonGroup; |
33 | class QLineEdit; | 33 | class QLineEdit; |
34 | 34 | ||
35 | 35 | ||
36 | /** | 36 | /** |
@@ -42,9 +42,9 @@ class AddViewDialog : public KDialogBase | |||
42 | { | 42 | { |
43 | Q_OBJECT | 43 | Q_OBJECT |
44 | 44 | ||
45 | public: | 45 | public: |
46 | AddViewDialog( QDict<ViewFactory> *viewFactoryDict, QWidget *parent, | 46 | AddViewDialog( Q3Dict<ViewFactory> *viewFactoryDict, QWidget *parent, |
47 | const char *name = 0 ); | 47 | const char *name = 0 ); |
48 | ~AddViewDialog(); | 48 | ~AddViewDialog(); |
49 | 49 | ||
50 | QString viewName()const; | 50 | QString viewName()const; |
@@ -62,11 +62,11 @@ class AddViewDialog : public KDialogBase | |||
62 | */ | 62 | */ |
63 | void textChanged( const QString &text ); | 63 | void textChanged( const QString &text ); |
64 | 64 | ||
65 | private: | 65 | private: |
66 | QDict<ViewFactory> *mViewFactoryDict; | 66 | Q3Dict<ViewFactory> *mViewFactoryDict; |
67 | QLineEdit *mViewNameEdit; | 67 | QLineEdit *mViewNameEdit; |
68 | QButtonGroup *mTypeGroup; | 68 | Q3ButtonGroup *mTypeGroup; |
69 | 69 | ||
70 | int mTypeId; | 70 | int mTypeId; |
71 | }; | 71 | }; |
72 | 72 | ||
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 | |||
@@ -21,12 +21,15 @@ | |||
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <qcombobox.h> | 24 | #include <qcombobox.h> |
25 | #include <qframe.h> | 25 | #include <q3frame.h> |
26 | #include <qlabel.h> | 26 | #include <qlabel.h> |
27 | #include <qlayout.h> | 27 | #include <qlayout.h> |
28 | #include <qwidgetstack.h> | 28 | #include <q3widgetstack.h> |
29 | //Added by qt3to4: | ||
30 | #include <Q3HBoxLayout> | ||
31 | #include <Q3VBoxLayout> | ||
29 | 32 | ||
30 | #include <kapplication.h> | 33 | #include <kapplication.h> |
31 | #include <kdebug.h> | 34 | #include <kdebug.h> |
32 | #include <kdialog.h> | 35 | #include <kdialog.h> |
@@ -44,28 +47,28 @@ | |||
44 | 47 | ||
45 | ViewContainer::ViewContainer( QWidget *parent, const char* name ) | 48 | ViewContainer::ViewContainer( QWidget *parent, const char* name ) |
46 | : QWidget( parent, name ), mCurrentLook( 0 ) | 49 | : QWidget( parent, name ), mCurrentLook( 0 ) |
47 | { | 50 | { |
48 | QBoxLayout *topLayout = new QVBoxLayout( this ); | 51 | Q3BoxLayout *topLayout = new Q3VBoxLayout( this ); |
49 | //topLayout->setMargin( KDialog::marginHint() ); | 52 | //topLayout->setMargin( KDialog::marginHint() ); |
50 | //topLayout->setSpacing( KDialog::spacingHint() ); | 53 | //topLayout->setSpacing( KDialog::spacingHint() ); |
51 | topLayout->setMargin( 0 ); | 54 | topLayout->setMargin( 0 ); |
52 | topLayout->setSpacing( 0 ); | 55 | topLayout->setSpacing( 0 ); |
53 | 56 | ||
54 | QBoxLayout *styleLayout = new QHBoxLayout( topLayout ); | 57 | Q3BoxLayout *styleLayout = new Q3HBoxLayout( topLayout ); |
55 | 58 | ||
56 | QLabel *label = new QLabel( i18n("Style:"), this ); | 59 | QLabel *label = new QLabel( i18n("Style:"), this ); |
57 | styleLayout->addWidget( label ); | 60 | styleLayout->addWidget( label ); |
58 | 61 | ||
59 | mStyleCombo = new QComboBox( this ); | 62 | mStyleCombo = new QComboBox( this ); |
60 | styleLayout->addWidget( mStyleCombo ); | 63 | styleLayout->addWidget( mStyleCombo ); |
61 | 64 | ||
62 | QFrame *frameRuler = new QFrame( this ); | 65 | Q3Frame *frameRuler = new Q3Frame( this ); |
63 | //US frameRuler->setFrameShape( QFrame::HLine ); | 66 | //US frameRuler->setFrameShape( QFrame::HLine ); |
64 | //US frameRuler->setFrameShadow( QFrame::Sunken ); | 67 | //US frameRuler->setFrameShadow( QFrame::Sunken ); |
65 | //US topLayout->addWidget( frameRuler ); | 68 | //US topLayout->addWidget( frameRuler ); |
66 | 69 | ||
67 | mDetailsStack = new QWidgetStack( this ); | 70 | mDetailsStack = new Q3WidgetStack( this ); |
68 | topLayout->addWidget( mDetailsStack, 1 ); | 71 | topLayout->addWidget( mDetailsStack, 1 ); |
69 | 72 | ||
70 | registerLooks(); | 73 | registerLooks(); |
71 | 74 | ||
@@ -158,7 +161,7 @@ void ViewContainer::setReadOnly( bool state ) | |||
158 | if ( mCurrentLook ) | 161 | if ( mCurrentLook ) |
159 | mCurrentLook->setReadOnly( state ); | 162 | mCurrentLook->setReadOnly( state ); |
160 | } | 163 | } |
161 | 164 | ||
162 | #ifndef KAB_EMBEDDED | 165 | #ifndef KAB_EMBEDDED_ |
163 | #include "detailsviewcontainer.moc" | 166 | #include "moc_detailsviewcontainer.cpp" |
164 | #endif //KAB_EMBEDDED | 167 | #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 | |||
@@ -23,14 +23,14 @@ | |||
23 | 23 | ||
24 | #ifndef DETAILSVIEWCONTAINER_H | 24 | #ifndef DETAILSVIEWCONTAINER_H |
25 | #define DETAILSVIEWCONTAINER_H | 25 | #define DETAILSVIEWCONTAINER_H |
26 | 26 | ||
27 | #include <qptrlist.h> | 27 | #include <q3ptrlist.h> |
28 | 28 | ||
29 | #include "look_basic.h" | 29 | #include "look_basic.h" |
30 | 30 | ||
31 | class QComboBox; | 31 | class QComboBox; |
32 | class QWidgetStack; | 32 | class Q3WidgetStack; |
33 | 33 | ||
34 | class ViewContainer : public QWidget | 34 | class ViewContainer : public QWidget |
35 | { | 35 | { |
36 | Q_OBJECT | 36 | Q_OBJECT |
@@ -93,11 +93,11 @@ class ViewContainer : public QWidget | |||
93 | 93 | ||
94 | private: | 94 | private: |
95 | KABC::Addressee mCurrentAddressee; | 95 | KABC::Addressee mCurrentAddressee; |
96 | KABBasicLook *mCurrentLook; | 96 | KABBasicLook *mCurrentLook; |
97 | QPtrList<KABLookFactory> mLookFactories; | 97 | Q3PtrList<KABLookFactory> mLookFactories; |
98 | 98 | ||
99 | QComboBox *mStyleCombo; | 99 | QComboBox *mStyleCombo; |
100 | QWidgetStack *mDetailsStack; | 100 | Q3WidgetStack *mDetailsStack; |
101 | }; | 101 | }; |
102 | 102 | ||
103 | #endif | 103 | #endif |
diff --git a/kaddressbook/details/look_basic.cpp b/kaddressbook/details/look_basic.cpp index 0245686..48cc42a 100644 --- a/kaddressbook/details/look_basic.cpp +++ b/kaddressbook/details/look_basic.cpp | |||
@@ -25,9 +25,9 @@ | |||
25 | 25 | ||
26 | #include "look_basic.h" | 26 | #include "look_basic.h" |
27 | 27 | ||
28 | KABBasicLook::KABBasicLook( QWidget *parent, const char *name ) | 28 | KABBasicLook::KABBasicLook( QWidget *parent, const char *name ) |
29 | : QVBox( parent, name ), mReadOnly( false ) | 29 | : Q3VBox( parent, name ), mReadOnly( false ) |
30 | { | 30 | { |
31 | } | 31 | } |
32 | 32 | ||
33 | void KABBasicLook::setReadOnly( bool state ) | 33 | void KABBasicLook::setReadOnly( bool state ) |
@@ -69,7 +69,7 @@ KABLookFactory::KABLookFactory( QWidget *parent, const char *name ) | |||
69 | 69 | ||
70 | KABLookFactory::~KABLookFactory() | 70 | KABLookFactory::~KABLookFactory() |
71 | { | 71 | { |
72 | } | 72 | } |
73 | #ifndef KAB_EMBEDDED | 73 | #ifndef KAB_EMBEDDED_ |
74 | #include "look_basic.moc" | 74 | #include "moc_look_basic.cpp" |
75 | #endif //KAB_EMBEDDED | 75 | #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 | |||
@@ -24,9 +24,9 @@ | |||
24 | #ifndef LOOK_KABBASIC_H | 24 | #ifndef LOOK_KABBASIC_H |
25 | #define LOOK_KABBASIC_H | 25 | #define LOOK_KABBASIC_H |
26 | 26 | ||
27 | #include <kabc/addressbook.h> | 27 | #include <kabc/addressbook.h> |
28 | #include <qvbox.h> | 28 | #include <q3vbox.h> |
29 | 29 | ||
30 | class KConfig; | 30 | class KConfig; |
31 | 31 | ||
32 | /** | 32 | /** |
@@ -40,9 +40,9 @@ class KConfig; | |||
40 | 40 | ||
41 | The paintEvent() has to paint the whole widget, since repaint() | 41 | The paintEvent() has to paint the whole widget, since repaint() |
42 | calls will not delete the widgets background. | 42 | calls will not delete the widgets background. |
43 | */ | 43 | */ |
44 | class KABBasicLook : public QVBox | 44 | class KABBasicLook : public Q3VBox |
45 | { | 45 | { |
46 | Q_OBJECT | 46 | Q_OBJECT |
47 | 47 | ||
48 | public: | 48 | public: |
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 | |||
@@ -188,12 +188,12 @@ void KABDetailedView::mouseMoveEvent( QMouseEvent *e ) | |||
188 | } | 188 | } |
189 | 189 | ||
190 | void KABDetailedView::mousePressEvent( QMouseEvent *e ) | 190 | void KABDetailedView::mousePressEvent( QMouseEvent *e ) |
191 | { | 191 | { |
192 | QPopupMenu menu( this ); | 192 | Q3PopupMenu menu( this ); |
193 | QPopupMenu *menuBG = new QPopupMenu( &menu ); | 193 | Q3PopupMenu *menuBG = new Q3PopupMenu( &menu ); |
194 | mMenuBorderedBG = new QPopupMenu( &menu ); | 194 | mMenuBorderedBG = new Q3PopupMenu( &menu ); |
195 | mMenuTiledBG = new QPopupMenu( &menu ); | 195 | mMenuTiledBG = new Q3PopupMenu( &menu ); |
196 | 196 | ||
197 | menu.insertItem( i18n( "Select Background" ), menuBG ); | 197 | menu.insertItem( i18n( "Select Background" ), menuBG ); |
198 | menuBG->insertItem( i18n( "Bordered Backgrounds" ), mMenuBorderedBG ); | 198 | menuBG->insertItem( i18n( "Bordered Backgrounds" ), mMenuBorderedBG ); |
199 | menuBG->insertItem( i18n( "Tiled Backgrounds" ), mMenuTiledBG ); | 199 | menuBG->insertItem( i18n( "Tiled Backgrounds" ), mMenuTiledBG ); |
@@ -413,7 +413,7 @@ void KABDetailedView::restoreSettings( KConfig *config ) | |||
413 | mPainter->setFixedFont( QFont( ffont, fpointsize, QFont::Normal, false ) ); | 413 | mPainter->setFixedFont( QFont( ffont, fpointsize, QFont::Normal, false ) ); |
414 | mPainter->setCommentFont( QFont( gfont, gpointsize, QFont::Normal, false ) ); | 414 | mPainter->setCommentFont( QFont( gfont, gpointsize, QFont::Normal, false ) ); |
415 | } | 415 | } |
416 | 416 | ||
417 | #ifndef KAB_EMBEDDED | 417 | #ifndef KAB_EMBEDDED_ |
418 | #include "look_details.moc" | 418 | #include "moc_look_details.cpp" |
419 | #endif //KAB_EMBEDDED | 419 | #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 | |||
@@ -129,10 +129,10 @@ class KABDetailedView : public KABBasicLook | |||
129 | const int mGrid; | 129 | const int mGrid; |
130 | QStringList mBorders; | 130 | QStringList mBorders; |
131 | QStringList mTiles; | 131 | QStringList mTiles; |
132 | 132 | ||
133 | QPopupMenu *mMenuBorderedBG; | 133 | Q3PopupMenu *mMenuBorderedBG; |
134 | QPopupMenu *mMenuTiledBG; | 134 | Q3PopupMenu *mMenuTiledBG; |
135 | 135 | ||
136 | static const QString mBorderedBGDir; | 136 | static const QString mBorderedBGDir; |
137 | static const QString mTiledBGDir; | 137 | static const QString mTiledBGDir; |
138 | }; | 138 | }; |
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 | |||
@@ -23,9 +23,9 @@ | |||
23 | 23 | ||
24 | #include <addresseeview.h> | 24 | #include <addresseeview.h> |
25 | 25 | ||
26 | #include "look_html.h" | 26 | #include "look_html.h" |
27 | #include <qscrollview.h> | 27 | #include <q3scrollview.h> |
28 | #include "kabprefs.h" | 28 | #include "kabprefs.h" |
29 | #include <kabc/addresseeview.h> | 29 | #include <kabc/addresseeview.h> |
30 | KABHtmlView::KABHtmlView( QWidget *parent, const char *name ) | 30 | KABHtmlView::KABHtmlView( QWidget *parent, const char *name ) |
31 | : KABBasicLook( parent, name ) | 31 | : KABBasicLook( parent, name ) |
@@ -50,7 +50,7 @@ void KABHtmlView::setAddressee( const KABC::Addressee &addr ) | |||
50 | mView->setFont( KABPrefs::instance()->mDetailsFont ); | 50 | mView->setFont( KABPrefs::instance()->mDetailsFont ); |
51 | mView->setAddressee( addr ); | 51 | mView->setAddressee( addr ); |
52 | } | 52 | } |
53 | 53 | ||
54 | #ifndef KAB_EMBEDDED | 54 | #ifndef KAB_EMBEDDED_ |
55 | #include "look_html.moc" | 55 | #include "moc_look_html.cpp" |
56 | #endif //KAB_EMBEDDED | 56 | #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 | |||
@@ -27,9 +27,11 @@ | |||
27 | #include <qpushbutton.h> | 27 | #include <qpushbutton.h> |
28 | #include <qstring.h> | 28 | #include <qstring.h> |
29 | #include <qtoolbutton.h> | 29 | #include <qtoolbutton.h> |
30 | #include <qtooltip.h> | 30 | #include <qtooltip.h> |
31 | #include <qlistbox.h> | 31 | #include <q3listbox.h> |
32 | //Added by qt3to4: | ||
33 | #include <Q3GridLayout> | ||
32 | 34 | ||
33 | #ifndef KAB_EMBEDDED | 35 | #ifndef KAB_EMBEDDED |
34 | #include <kaccelmanager.h> | 36 | #include <kaccelmanager.h> |
35 | #endif //KAB_EMBEDDED | 37 | #endif //KAB_EMBEDDED |
@@ -47,16 +49,16 @@ | |||
47 | 49 | ||
48 | EmailEditWidget::EmailEditWidget( QWidget *parent, const char *name ) | 50 | EmailEditWidget::EmailEditWidget( QWidget *parent, const char *name ) |
49 | : QWidget( parent, name ) | 51 | : QWidget( parent, name ) |
50 | { | 52 | { |
51 | QGridLayout *topLayout = new QGridLayout( this, 2, 2 ); | 53 | Q3GridLayout *topLayout = new Q3GridLayout( this, 2, 2 ); |
52 | topLayout->setSpacing( KDialog::spacingHint() ); | 54 | topLayout->setSpacing( KDialog::spacingHint() ); |
53 | QLabel* label = new QLabel( this ); | 55 | QLabel* label = new QLabel( this ); |
54 | 56 | ||
55 | label->setPixmap( KGlobal::iconLoader()->loadIcon( "mail_send", KIcon::Desktop, 0) ); | 57 | label->setPixmap( KGlobal::iconLoader()->loadIcon( "mail_send", KIcon::Desktop, 0) ); |
56 | 58 | ||
57 | topLayout->addWidget( label, 0, 0 ); | 59 | topLayout->addWidget( label, 0, 0 ); |
58 | label->setAlignment( AlignCenter ); | 60 | label->setAlignment( Qt::AlignCenter ); |
59 | QPushButton *editButton = new QPushButton( i18n( "Edit Email Addresses..." ), this); | 61 | QPushButton *editButton = new QPushButton( i18n( "Edit Email Addresses..." ), this); |
60 | topLayout->addWidget( editButton, 0, 1 ); | 62 | topLayout->addWidget( editButton, 0, 1 ); |
61 | label = new QLabel( i18n( "Email:" ), this ); | 63 | label = new QLabel( i18n( "Email:" ), this ); |
62 | topLayout->addWidget( label, 1, 0 ); | 64 | topLayout->addWidget( label, 1, 0 ); |
@@ -136,9 +138,9 @@ EmailEditDialog::EmailEditDialog( const QStringList &list, QWidget *parent, | |||
136 | parent, name, true ) | 138 | parent, name, true ) |
137 | { | 139 | { |
138 | QWidget *page = plainPage(); | 140 | QWidget *page = plainPage(); |
139 | 141 | ||
140 | QGridLayout *topLayout = new QGridLayout( page, 4, 3 ); | 142 | Q3GridLayout *topLayout = new Q3GridLayout( page, 4, 3 ); |
141 | 143 | ||
142 | QLabel *label = new QLabel( i18n( "Email address:" ), page ); | 144 | QLabel *label = new QLabel( i18n( "Email address:" ), page ); |
143 | topLayout->addWidget( label, 0, 0 ); | 145 | topLayout->addWidget( label, 0, 0 ); |
144 | 146 | ||
@@ -153,9 +155,9 @@ EmailEditDialog::EmailEditDialog( const QStringList &list, QWidget *parent, | |||
153 | mAddButton->setEnabled( false ); | 155 | mAddButton->setEnabled( false ); |
154 | connect( mAddButton, SIGNAL( clicked() ), SLOT( add() ) ); | 156 | connect( mAddButton, SIGNAL( clicked() ), SLOT( add() ) ); |
155 | topLayout->addWidget( mAddButton, 0, 2 ); | 157 | topLayout->addWidget( mAddButton, 0, 2 ); |
156 | 158 | ||
157 | mEmailListBox = new QListBox( page ); | 159 | mEmailListBox = new Q3ListBox( page ); |
158 | 160 | ||
159 | // Make sure there is room for the scrollbar | 161 | // Make sure there is room for the scrollbar |
160 | mEmailListBox->setMinimumHeight( mEmailListBox->sizeHint().height() + 30 ); | 162 | mEmailListBox->setMinimumHeight( mEmailListBox->sizeHint().height() + 30 ); |
161 | connect( mEmailListBox, SIGNAL( highlighted( int ) ), | 163 | connect( mEmailListBox, SIGNAL( highlighted( int ) ), |
@@ -271,7 +273,7 @@ void EmailEditDialog::emailChanged() | |||
271 | { | 273 | { |
272 | mAddButton->setEnabled( !mEmailEdit->text().isEmpty() ); | 274 | mAddButton->setEnabled( !mEmailEdit->text().isEmpty() ); |
273 | } | 275 | } |
274 | 276 | ||
275 | #ifndef KAB_EMBEDDED | 277 | #ifndef KAB_EMBEDDED_ |
276 | #include "emaileditwidget.moc" | 278 | #include "moc_emaileditwidget.cpp" |
277 | #endif //KAB_EMBEDDED | 279 | #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 | |||
@@ -28,13 +28,13 @@ | |||
28 | #include <kdialogbase.h> | 28 | #include <kdialogbase.h> |
29 | 29 | ||
30 | #include "addresseeconfig.h" | 30 | #include "addresseeconfig.h" |
31 | 31 | ||
32 | class QButtonGroup; | 32 | class Q3ButtonGroup; |
33 | class QCheckBox; | 33 | class QCheckBox; |
34 | class QListView; | 34 | class Q3ListView; |
35 | class QListBox; | 35 | class Q3ListBox; |
36 | class QTextEdit; | 36 | class Q3TextEdit; |
37 | class QToolButton; | 37 | class QToolButton; |
38 | 38 | ||
39 | class KComboBox; | 39 | class KComboBox; |
40 | class KLineEdit; | 40 | class KLineEdit; |
@@ -88,9 +88,9 @@ class EmailEditDialog : public KDialogBase | |||
88 | void emailChanged(); | 88 | void emailChanged(); |
89 | 89 | ||
90 | private: | 90 | private: |
91 | KLineEdit *mEmailEdit; | 91 | KLineEdit *mEmailEdit; |
92 | QListBox *mEmailListBox; | 92 | Q3ListBox *mEmailListBox; |
93 | QPushButton *mAddButton; | 93 | QPushButton *mAddButton; |
94 | QPushButton *mRemoveButton; | 94 | QPushButton *mRemoveButton; |
95 | QPushButton *mEditButton; | 95 | QPushButton *mEditButton; |
96 | QPushButton *mStandardButton; | 96 | QPushButton *mStandardButton; |
diff --git a/kaddressbook/extensionmanager.cpp b/kaddressbook/extensionmanager.cpp index 46defa1..5356224 100644 --- a/kaddressbook/extensionmanager.cpp +++ b/kaddressbook/extensionmanager.cpp | |||
@@ -21,8 +21,10 @@ | |||
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | #include <qlayout.h> | 23 | #include <qlayout.h> |
24 | #include <qapplication.h> | 24 | #include <qapplication.h> |
25 | //Added by qt3to4: | ||
26 | #include <Q3HBoxLayout> | ||
25 | #include <kactionclasses.h> | 27 | #include <kactionclasses.h> |
26 | #include <kconfig.h> | 28 | #include <kconfig.h> |
27 | #include <kdebug.h> | 29 | #include <kdebug.h> |
28 | #include <klocale.h> | 30 | #include <klocale.h> |
@@ -41,9 +43,9 @@ | |||
41 | #include "extensionmanager.h" | 43 | #include "extensionmanager.h" |
42 | 44 | ||
43 | ExtensionManager::ExtensionManager( KABCore *core, QWidget *parent, | 45 | ExtensionManager::ExtensionManager( KABCore *core, QWidget *parent, |
44 | const char *name ) | 46 | const char *name ) |
45 | : QScrollView( parent, name ), mCore( core ), mCurrentExtensionWidget( 0 ) | 47 | : Q3ScrollView( parent, name ), mCore( core ), mCurrentExtensionWidget( 0 ) |
46 | { | 48 | { |
47 | #ifdef KAB_EMBEDDED | 49 | #ifdef KAB_EMBEDDED |
48 | //US QPopupMenu *settingsmenu = (QPopupMenu*)mCore->getSettingsMenu(); | 50 | //US QPopupMenu *settingsmenu = (QPopupMenu*)mCore->getSettingsMenu(); |
49 | QWidget *settingsmenu = (QWidget*)mCore->getViewMenu(); | 51 | QWidget *settingsmenu = (QWidget*)mCore->getViewMenu(); |
@@ -57,9 +59,9 @@ ExtensionManager::ExtensionManager( KABCore *core, QWidget *parent, | |||
57 | 59 | ||
58 | connect( mActionExtensions, SIGNAL( activated( int ) ), | 60 | connect( mActionExtensions, SIGNAL( activated( int ) ), |
59 | SLOT( setActiveExtension( int ) ) ); | 61 | SLOT( setActiveExtension( int ) ) ); |
60 | mWidgetBox = new QWidget( viewport() ); | 62 | mWidgetBox = new QWidget( viewport() ); |
61 | new QHBoxLayout (mWidgetBox ); | 63 | new Q3HBoxLayout (mWidgetBox ); |
62 | addChild( mWidgetBox ); | 64 | addChild( mWidgetBox ); |
63 | setResizePolicy(AutoOneFit); | 65 | setResizePolicy(AutoOneFit); |
64 | createExtensionWidgets(); | 66 | createExtensionWidgets(); |
65 | hide(); | 67 | hide(); |
@@ -147,9 +149,9 @@ void ExtensionManager::setActiveExtension( int id ) | |||
147 | void ExtensionManager::createExtensionWidgets() | 149 | void ExtensionManager::createExtensionWidgets() |
148 | { | 150 | { |
149 | // clear extension widget list | 151 | // clear extension widget list |
150 | mExtensionWidgetList.setAutoDelete( true ); | 152 | mExtensionWidgetList.setAutoDelete( true ); |
151 | QPtrListIterator<ExtensionWidget> wdgIt( mExtensionWidgetList ); | 153 | Q3PtrListIterator<ExtensionWidget> wdgIt( mExtensionWidgetList ); |
152 | ExtensionWidget *wdg = 0; | 154 | ExtensionWidget *wdg = 0; |
153 | while ( ( wdg = wdgIt.current() ) != 0 ) | 155 | while ( ( wdg = wdgIt.current() ) != 0 ) |
154 | mExtensionWidgetList.remove( wdg ); | 156 | mExtensionWidgetList.remove( wdg ); |
155 | 157 | ||
@@ -158,9 +160,9 @@ void ExtensionManager::createExtensionWidgets() | |||
158 | QStringList extensionNames( i18n( "None" ) ); | 160 | QStringList extensionNames( i18n( "None" ) ); |
159 | 161 | ||
160 | // add addressee editor as default | 162 | // add addressee editor as default |
161 | 163 | ||
162 | QHBoxLayout *hbl = (QHBoxLayout *) mWidgetBox->layout();; | 164 | Q3HBoxLayout *hbl = (Q3HBoxLayout *) mWidgetBox->layout();; |
163 | 165 | ||
164 | wdg = new AddresseeEditorWidget( mCore, true, mWidgetBox ); | 166 | wdg = new AddresseeEditorWidget( mCore, true, mWidgetBox ); |
165 | hbl->addWidget( wdg ); | 167 | hbl->addWidget( wdg ); |
166 | //wdg->hide(); | 168 | //wdg->hide(); |
@@ -243,7 +245,7 @@ void ExtensionManager::createExtensionWidgets() | |||
243 | mActionExtensions->setItems( extensionNames ); | 245 | mActionExtensions->setItems( extensionNames ); |
244 | mCurrentExtensionWidget = 0; | 246 | mCurrentExtensionWidget = 0; |
245 | } | 247 | } |
246 | 248 | ||
247 | #ifndef KAB_EMBEDDED | 249 | #ifndef KAB_EMBEDDED_ |
248 | #include "extensionmanager.moc" | 250 | #include "moc_extensionmanager.cpp" |
249 | #endif //KAB_EMBEDDED | 251 | #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 | |||
@@ -23,19 +23,19 @@ | |||
23 | 23 | ||
24 | #ifndef EXTENSIONMANAGER_H | 24 | #ifndef EXTENSIONMANAGER_H |
25 | #define EXTENSIONMANAGER_H | 25 | #define EXTENSIONMANAGER_H |
26 | 26 | ||
27 | #include <qhbox.h> | 27 | #include <q3hbox.h> |
28 | #include <qscrollview.h> | 28 | #include <q3scrollview.h> |
29 | #include <qptrlist.h> | 29 | #include <q3ptrlist.h> |
30 | 30 | ||
31 | #include <extensionwidget.h> | 31 | #include <extensionwidget.h> |
32 | 32 | ||
33 | class KABCore; | 33 | class KABCore; |
34 | class KSelectAction; | 34 | class KSelectAction; |
35 | 35 | ||
36 | 36 | ||
37 | class ExtensionManager : public QScrollView | 37 | class ExtensionManager : public Q3ScrollView |
38 | { | 38 | { |
39 | Q_OBJECT | 39 | Q_OBJECT |
40 | 40 | ||
41 | public: | 41 | public: |
@@ -79,9 +79,9 @@ class ExtensionManager : public QScrollView | |||
79 | KABCore *mCore; | 79 | KABCore *mCore; |
80 | QWidget *mWidgetBox; | 80 | QWidget *mWidgetBox; |
81 | 81 | ||
82 | ExtensionWidget *mCurrentExtensionWidget; | 82 | ExtensionWidget *mCurrentExtensionWidget; |
83 | QPtrList<ExtensionWidget> mExtensionWidgetList; | 83 | Q3PtrList<ExtensionWidget> mExtensionWidgetList; |
84 | 84 | ||
85 | KSelectAction *mActionExtensions; | 85 | KSelectAction *mActionExtensions; |
86 | 86 | ||
87 | }; | 87 | }; |
diff --git a/kaddressbook/extensionwidget.cpp b/kaddressbook/extensionwidget.cpp index 69f4aa8..7c3b415 100644 --- a/kaddressbook/extensionwidget.cpp +++ b/kaddressbook/extensionwidget.cpp | |||
@@ -77,8 +77,7 @@ ConfigureWidget *ExtensionFactory::configureWidget( QWidget*, const char* ) | |||
77 | { | 77 | { |
78 | return 0; | 78 | return 0; |
79 | } | 79 | } |
80 | 80 | ||
81 | #ifndef KAB_EMBEDDED | 81 | #ifndef KAB_EMBEDDED_ |
82 | #include "extensionwidget.moc" | 82 | #include "moc_extensionwidget.cpp" |
83 | #endif //KAB_EMBEDDED | 83 | #endif //KAB_EMBEDDED |
84 | |||
diff --git a/kaddressbook/extensionwidget.h b/kaddressbook/extensionwidget.h index fc91f21..9fcfba9 100644 --- a/kaddressbook/extensionwidget.h +++ b/kaddressbook/extensionwidget.h | |||
@@ -85,11 +85,11 @@ class ExtensionWidget : public QWidget | |||
85 | ExtensionWidgetPrivate *d; | 85 | ExtensionWidgetPrivate *d; |
86 | }; | 86 | }; |
87 | 87 | ||
88 | #ifndef KAB_EMBEDDED | 88 | #ifndef KAB_EMBEDDED |
89 | //MOC_SKIP_BEGIN | 89 | #ifndef Q_MOC_RUN |
90 | class ExtensionFactory : public KLibFactory | 90 | class ExtensionFactory : public KLibFactory |
91 | //MOC_SKIP_END | 91 | #endif |
92 | #else //KAB_EMBEDDED | 92 | #else //KAB_EMBEDDED |
93 | class ExtensionFactory | 93 | class ExtensionFactory |
94 | #endif //KAB_EMBEDDED | 94 | #endif //KAB_EMBEDDED |
95 | { | 95 | { |
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 | |||
@@ -20,15 +20,22 @@ | |||
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <qbuttongroup.h> | 24 | #include <q3buttongroup.h> |
25 | #include <qcombobox.h> | 25 | #include <qcombobox.h> |
26 | #include <qlabel.h> | 26 | #include <qlabel.h> |
27 | #include <qlayout.h> | 27 | #include <qlayout.h> |
28 | #include <qlistview.h> | 28 | #include <q3listview.h> |
29 | #include <qpushbutton.h> | 29 | #include <qpushbutton.h> |
30 | #include <qradiobutton.h> | 30 | #include <qradiobutton.h> |
31 | //Added by qt3to4: | ||
32 | #include <QDragMoveEvent> | ||
33 | #include <QDropEvent> | ||
34 | #include <Q3GridLayout> | ||
35 | #include <Q3Frame> | ||
36 | #include <Q3VBoxLayout> | ||
37 | #include <QDragEnterEvent> | ||
31 | 38 | ||
32 | #ifndef KAB_EMBEDDED | 39 | #ifndef KAB_EMBEDDED |
33 | #include <kaccelmanager.h> | 40 | #include <kaccelmanager.h> |
34 | #endif //KAB_EMBEDDED | 41 | #endif //KAB_EMBEDDED |
@@ -76,14 +83,14 @@ extern "C" { | |||
76 | } | 83 | } |
77 | } | 84 | } |
78 | #endif //KAB_EMBEDDED | 85 | #endif //KAB_EMBEDDED |
79 | 86 | ||
80 | class ContactItem : public QListViewItem | 87 | class ContactItem : public Q3ListViewItem |
81 | { | 88 | { |
82 | public: | 89 | public: |
83 | ContactItem( DistributionListView *parent, const KABC::Addressee &addressee, | 90 | ContactItem( DistributionListView *parent, const KABC::Addressee &addressee, |
84 | const QString &email = QString::null ) : | 91 | const QString &email = QString::null ) : |
85 | QListViewItem( parent ), | 92 | Q3ListViewItem( parent ), |
86 | mAddressee( addressee ), | 93 | mAddressee( addressee ), |
87 | mEmail( email ) | 94 | mEmail( email ) |
88 | { | 95 | { |
89 | setText( 0, addressee.realName() ); | 96 | setText( 0, addressee.realName() ); |
@@ -120,9 +127,9 @@ class ContactItem : public QListViewItem | |||
120 | DistributionListWidget::DistributionListWidget( KABCore *core, QWidget *parent, | 127 | DistributionListWidget::DistributionListWidget( KABCore *core, QWidget *parent, |
121 | const char *name ) | 128 | const char *name ) |
122 | : ExtensionWidget( core, parent, name ), mManager( 0 ) | 129 | : ExtensionWidget( core, parent, name ), mManager( 0 ) |
123 | { | 130 | { |
124 | QGridLayout *topLayout = new QGridLayout( this, 3, 4, KDialog::marginHint(), | 131 | Q3GridLayout *topLayout = new Q3GridLayout( this, 3, 4, KDialog::marginHint(), |
125 | KDialog::spacingHint() ); | 132 | KDialog::spacingHint() ); |
126 | 133 | ||
127 | if (KGlobal::getOrientation() == KGlobal::Portrait) | 134 | if (KGlobal::getOrientation() == KGlobal::Portrait) |
128 | { | 135 | { |
@@ -165,10 +172,10 @@ DistributionListWidget::DistributionListWidget( KABCore *core, QWidget *parent, | |||
165 | 172 | ||
166 | topLayout->addMultiCellWidget( mContactView, 1, 1, 0, 3 ); | 173 | topLayout->addMultiCellWidget( mContactView, 1, 1, 0, 3 ); |
167 | connect( mContactView, SIGNAL( selectionChanged() ), | 174 | connect( mContactView, SIGNAL( selectionChanged() ), |
168 | SLOT( selectionContactViewChanged() ) ); | 175 | SLOT( selectionContactViewChanged() ) ); |
169 | connect( mContactView, SIGNAL( dropped( QDropEvent*, QListViewItem* ) ), | 176 | connect( mContactView, SIGNAL( dropped( QDropEvent*, Q3ListViewItem* ) ), |
170 | SLOT( dropped( QDropEvent*, QListViewItem* ) ) ); | 177 | SLOT( dropped( QDropEvent*, Q3ListViewItem* ) ) ); |
171 | 178 | ||
172 | mAddContactButton->setEnabled( false ); | 179 | mAddContactButton->setEnabled( false ); |
173 | topLayout->addWidget( mAddContactButton, 2, 0 ); | 180 | topLayout->addWidget( mAddContactButton, 2, 0 ); |
174 | connect( mAddContactButton, SIGNAL( clicked() ), SLOT( addContact() ) ); | 181 | connect( mAddContactButton, SIGNAL( clicked() ), SLOT( addContact() ) ); |
@@ -409,9 +416,9 @@ QString DistributionListWidget::identifier() const | |||
409 | { | 416 | { |
410 | return "distribution_list_editor"; | 417 | return "distribution_list_editor"; |
411 | } | 418 | } |
412 | 419 | ||
413 | void DistributionListWidget::dropped( QDropEvent *e, QListViewItem* ) | 420 | void DistributionListWidget::dropped( QDropEvent *e, Q3ListViewItem* ) |
414 | { | 421 | { |
415 | dropEvent( e ); | 422 | dropEvent( e ); |
416 | } | 423 | } |
417 | 424 | ||
@@ -431,17 +438,17 @@ DistributionListView::DistributionListView( QWidget *parent, const char* name ) | |||
431 | 438 | ||
432 | void DistributionListView::dragEnterEvent( QDragEnterEvent* e ) | 439 | void DistributionListView::dragEnterEvent( QDragEnterEvent* e ) |
433 | { | 440 | { |
434 | #ifndef KAB_EMBEDDED | 441 | #ifndef KAB_EMBEDDED |
435 | bool canDecode = QTextDrag::canDecode( e ); | 442 | bool canDecode = Q3TextDrag::canDecode( e ); |
436 | e->accept( canDecode ); | 443 | e->accept( canDecode ); |
437 | #endif //KAB_EMBEDDED | 444 | #endif //KAB_EMBEDDED |
438 | } | 445 | } |
439 | 446 | ||
440 | void DistributionListView::viewportDragMoveEvent( QDragMoveEvent *e ) | 447 | void DistributionListView::viewportDragMoveEvent( QDragMoveEvent *e ) |
441 | { | 448 | { |
442 | #ifndef KAB_EMBEDDED | 449 | #ifndef KAB_EMBEDDED |
443 | bool canDecode = QTextDrag::canDecode( e ); | 450 | bool canDecode = Q3TextDrag::canDecode( e ); |
444 | e->accept( canDecode ); | 451 | e->accept( canDecode ); |
445 | #endif //KAB_EMBEDDED | 452 | #endif //KAB_EMBEDDED |
446 | } | 453 | } |
447 | 454 | ||
@@ -460,12 +467,12 @@ EmailSelector::EmailSelector( const QStringList &emails, | |||
460 | const QString ¤t, QWidget *parent ) | 467 | const QString ¤t, QWidget *parent ) |
461 | : KDialogBase( KDialogBase::Plain, i18n("Select Email Address"), Ok, Ok, | 468 | : KDialogBase( KDialogBase::Plain, i18n("Select Email Address"), Ok, Ok, |
462 | parent ) | 469 | parent ) |
463 | { | 470 | { |
464 | QFrame *topFrame = plainPage(); | 471 | Q3Frame *topFrame = plainPage(); |
465 | QBoxLayout *topLayout = new QVBoxLayout( topFrame ); | 472 | Q3BoxLayout *topLayout = new Q3VBoxLayout( topFrame ); |
466 | 473 | ||
467 | mButtonGroup = new QButtonGroup( 1, Horizontal, i18n("Email Addresses"), | 474 | mButtonGroup = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("Email Addresses"), |
468 | topFrame ); | 475 | topFrame ); |
469 | topLayout->addWidget( mButtonGroup ); | 476 | topLayout->addWidget( mButtonGroup ); |
470 | 477 | ||
471 | QStringList::ConstIterator it; | 478 | QStringList::ConstIterator it; |
@@ -478,9 +485,9 @@ EmailSelector::EmailSelector( const QStringList &emails, | |||
478 | } | 485 | } |
479 | 486 | ||
480 | QString EmailSelector::selected() | 487 | QString EmailSelector::selected() |
481 | { | 488 | { |
482 | QButton *button = mButtonGroup->selected(); | 489 | QAbstractButton *button = mButtonGroup->selected(); |
483 | if ( button ) | 490 | if ( button ) |
484 | return button->text(); | 491 | return button->text(); |
485 | 492 | ||
486 | return QString::null; | 493 | return QString::null; |
@@ -495,7 +502,7 @@ QString EmailSelector::getEmail( const QStringList &emails, | |||
495 | return dlg.selected(); | 502 | return dlg.selected(); |
496 | } | 503 | } |
497 | 504 | ||
498 | 505 | ||
499 | #ifndef KAB_EMBEDDED | 506 | #ifndef KAB_EMBEDDED_ |
500 | #include "distributionlistwidget.moc" | 507 | #include "moc_distributionlistwidget.cpp" |
501 | #endif //KAB_EMBEDDED | 508 | #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 | |||
@@ -27,13 +27,18 @@ | |||
27 | #include <kdialogbase.h> | 27 | #include <kdialogbase.h> |
28 | #include <klistview.h> | 28 | #include <klistview.h> |
29 | 29 | ||
30 | #include "extensionwidget.h" | 30 | #include "extensionwidget.h" |
31 | //Added by qt3to4: | ||
32 | #include <QDragEnterEvent> | ||
33 | #include <QDropEvent> | ||
34 | #include <QLabel> | ||
35 | #include <QDragMoveEvent> | ||
31 | 36 | ||
32 | class QButtonGroup; | 37 | class Q3ButtonGroup; |
33 | class QComboBox; | 38 | class QComboBox; |
34 | class QLabel; | 39 | class QLabel; |
35 | class QListView; | 40 | class Q3ListView; |
36 | 41 | ||
37 | class DistributionListView; | 42 | class DistributionListView; |
38 | class KABCore; | 43 | class KABCore; |
39 | 44 | ||
@@ -56,9 +61,9 @@ class DistributionListWidget : public ExtensionWidget | |||
56 | QString identifier() const; | 61 | QString identifier() const; |
57 | 62 | ||
58 | public slots: | 63 | public slots: |
59 | void save(); | 64 | void save(); |
60 | void dropped( QDropEvent*, QListViewItem* ); | 65 | void dropped( QDropEvent*, Q3ListViewItem* ); |
61 | 66 | ||
62 | private slots: | 67 | private slots: |
63 | void createList(); | 68 | void createList(); |
64 | void editList(); | 69 | void editList(); |
@@ -119,9 +124,9 @@ class EmailSelector : public KDialogBase | |||
119 | static QString getEmail( const QStringList &emails, const QString ¤t, | 124 | static QString getEmail( const QStringList &emails, const QString ¤t, |
120 | QWidget *parent ); | 125 | QWidget *parent ); |
121 | 126 | ||
122 | private: | 127 | private: |
123 | QButtonGroup *mButtonGroup; | 128 | Q3ButtonGroup *mButtonGroup; |
124 | }; | 129 | }; |
125 | 130 | ||
126 | 131 | ||
127 | #ifdef KAB_EMBEDDED | 132 | #ifdef KAB_EMBEDDED |
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 | |||
@@ -22,8 +22,10 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <qlayout.h> | 24 | #include <qlayout.h> |
25 | #include <qpushbutton.h> | 25 | #include <qpushbutton.h> |
26 | //Added by qt3to4: | ||
27 | #include <Q3GridLayout> | ||
26 | 28 | ||
27 | #ifndef KAB_EMBEDDED | 29 | #ifndef KAB_EMBEDDED |
28 | #include <kaccelmanager.h> | 30 | #include <kaccelmanager.h> |
29 | #endif //KAB_EMBEDDED | 31 | #endif //KAB_EMBEDDED |
@@ -62,13 +64,13 @@ extern "C" { | |||
62 | } | 64 | } |
63 | } | 65 | } |
64 | #endif //KAB_EMBEDDED | 66 | #endif //KAB_EMBEDDED |
65 | 67 | ||
66 | class ContactItem : public QListViewItem | 68 | class ContactItem : public Q3ListViewItem |
67 | { | 69 | { |
68 | public: | 70 | public: |
69 | ContactItem( KListView *parent, const KABC::Addressee &addressee ) | 71 | ContactItem( KListView *parent, const KABC::Addressee &addressee ) |
70 | : QListViewItem( parent ), mAddressee( addressee ) | 72 | : Q3ListViewItem( parent ), mAddressee( addressee ) |
71 | { | 73 | { |
72 | KABC::Field::List fieldList = KABC::Field::defaultFields(); | 74 | KABC::Field::List fieldList = KABC::Field::defaultFields(); |
73 | KABC::Field::List::ConstIterator it; | 75 | KABC::Field::List::ConstIterator it; |
74 | 76 | ||
@@ -93,9 +95,9 @@ MergeWidget::MergeWidget( KABCore *core, QWidget *parent, const char *name ) | |||
93 | if (KGlobal::getOrientation() == KGlobal::Portrait) | 95 | if (KGlobal::getOrientation() == KGlobal::Portrait) |
94 | parent->setMaximumSize( KGlobal::getDesktopWidth() , 180); | 96 | parent->setMaximumSize( KGlobal::getDesktopWidth() , 180); |
95 | #endif //KAB_EMBEDDED | 97 | #endif //KAB_EMBEDDED |
96 | 98 | ||
97 | QGridLayout *topLayout = new QGridLayout( this, 3, 2, KDialog::marginHint(), | 99 | Q3GridLayout *topLayout = new Q3GridLayout( this, 3, 2, KDialog::marginHint(), |
98 | KDialog::spacingHint() ); | 100 | KDialog::spacingHint() ); |
99 | 101 | ||
100 | mContactView = new KListView( this ); | 102 | mContactView = new KListView( this ); |
101 | KABC::Field::List fieldList = KABC::Field::defaultFields(); | 103 | KABC::Field::List fieldList = KABC::Field::defaultFields(); |
@@ -213,9 +215,9 @@ void MergeWidget::mergeAndRemove() | |||
213 | retval << mMasterAddressee; | 215 | retval << mMasterAddressee; |
214 | emit modified( retval ); | 216 | emit modified( retval ); |
215 | 217 | ||
216 | mBlockUpdate = true; | 218 | mBlockUpdate = true; |
217 | core()->deleteContacts( oldUID ); | 219 | core()->deleteContacts( QStringList(oldUID) ); |
218 | core()->setContactSelected( mMasterAddressee.uid() ); | 220 | core()->setContactSelected( mMasterAddressee.uid() ); |
219 | mBlockUpdate = false; | 221 | mBlockUpdate = false; |
220 | 222 | ||
221 | updateView(); | 223 | updateView(); |
@@ -368,7 +370,7 @@ void MergeWidget::doMerge( const KABC::Addressee &addr ) | |||
368 | newCustoms.append( *it ); | 370 | newCustoms.append( *it ); |
369 | mMasterAddressee.setCustoms( newCustoms ); | 371 | mMasterAddressee.setCustoms( newCustoms ); |
370 | } | 372 | } |
371 | 373 | ||
372 | #ifndef KAB_EMBEDDED | 374 | #ifndef KAB_EMBEDDED_ |
373 | #include "mergewidget.moc" | 375 | #include "moc_mergewidget.cpp" |
374 | #endif //KAB_EMBEDDED | 376 | #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 | |||
@@ -28,9 +28,9 @@ | |||
28 | #include <klistview.h> | 28 | #include <klistview.h> |
29 | 29 | ||
30 | #include "extensionwidget.h" | 30 | #include "extensionwidget.h" |
31 | 31 | ||
32 | class QListView; | 32 | class Q3ListView; |
33 | 33 | ||
34 | class KABCore; | 34 | class KABCore; |
35 | 35 | ||
36 | namespace KABC { | 36 | namespace KABC { |
diff --git a/kaddressbook/filter.cpp b/kaddressbook/filter.cpp index 12ab1e3..6462310 100644 --- a/kaddressbook/filter.cpp +++ b/kaddressbook/filter.cpp | |||
@@ -217,9 +217,9 @@ Filter::List Filter::restore( KConfig *config, QString baseGroup ) | |||
217 | Filter filter; | 217 | Filter filter; |
218 | filter.noName = false; | 218 | filter.noName = false; |
219 | filter.mName = *it; | 219 | filter.mName = *it; |
220 | filter.mEnabled = true; | 220 | filter.mEnabled = true; |
221 | filter.mCategoryList = *it; | 221 | filter.mCategoryList = QStringList(*it); |
222 | filter.mMatchRule = Matching; | 222 | filter.mMatchRule = Matching; |
223 | filter.mInternal = true; | 223 | filter.mInternal = true; |
224 | list.append( filter ); | 224 | list.append( filter ); |
225 | } | 225 | } |
diff --git a/kaddressbook/filter.h b/kaddressbook/filter.h index f4ae123..508436d 100644 --- a/kaddressbook/filter.h +++ b/kaddressbook/filter.h | |||
@@ -25,9 +25,9 @@ | |||
25 | #define FILTER_H | 25 | #define FILTER_H |
26 | 26 | ||
27 | #include <qstring.h> | 27 | #include <qstring.h> |
28 | #include <qstringlist.h> | 28 | #include <qstringlist.h> |
29 | #include <qvaluelist.h> | 29 | #include <q3valuelist.h> |
30 | 30 | ||
31 | #include <kabc/addressee.h> | 31 | #include <kabc/addressee.h> |
32 | #include <kconfig.h> | 32 | #include <kconfig.h> |
33 | 33 | ||
@@ -41,9 +41,9 @@ class Filter | |||
41 | public: | 41 | public: |
42 | enum { ShowPublic = 1, ShowPrivate = 2, ShowConfidential = 4 }; | 42 | enum { ShowPublic = 1, ShowPrivate = 2, ShowConfidential = 4 }; |
43 | void setCriteria(int c) { mCriteria = c ;} | 43 | void setCriteria(int c) { mCriteria = c ;} |
44 | int criteria() const { return mCriteria;} | 44 | int criteria() const { return mCriteria;} |
45 | typedef QValueList<Filter> List; | 45 | typedef Q3ValueList<Filter> List; |
46 | 46 | ||
47 | enum MatchRule { Matching = 0, NotMatching = 1 }; | 47 | enum MatchRule { Matching = 0, NotMatching = 1 }; |
48 | 48 | ||
49 | Filter(); | 49 | Filter(); |
diff --git a/kaddressbook/filtereditdialog.cpp b/kaddressbook/filtereditdialog.cpp index ef9b979..40698a7 100644 --- a/kaddressbook/filtereditdialog.cpp +++ b/kaddressbook/filtereditdialog.cpp | |||
@@ -27,10 +27,10 @@ Copyright (c) 2004 Ulf Schenk | |||
27 | 27 | ||
28 | $Id$ | 28 | $Id$ |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <qbuttongroup.h> | 31 | #include <q3buttongroup.h> |
32 | #include <qhbox.h> | 32 | #include <q3hbox.h> |
33 | #include <qlabel.h> | 33 | #include <qlabel.h> |
34 | #include <qlayout.h> | 34 | #include <qlayout.h> |
35 | #include <qpushbutton.h> | 35 | #include <qpushbutton.h> |
36 | #include <qradiobutton.h> | 36 | #include <qradiobutton.h> |
@@ -39,8 +39,10 @@ $Id$ | |||
39 | #include <qstring.h> | 39 | #include <qstring.h> |
40 | #include <qtoolbutton.h> | 40 | #include <qtoolbutton.h> |
41 | #include <qtooltip.h> | 41 | #include <qtooltip.h> |
42 | #include <qwidget.h> | 42 | #include <qwidget.h> |
43 | //Added by qt3to4: | ||
44 | #include <Q3GridLayout> | ||
43 | 45 | ||
44 | #include <kapplication.h> | 46 | #include <kapplication.h> |
45 | #include <kbuttonbox.h> | 47 | #include <kbuttonbox.h> |
46 | #include <kdebug.h> | 48 | #include <kdebug.h> |
@@ -63,9 +65,9 @@ FilterEditDialog::FilterEditDialog( QWidget *parent, const char *name ) | |||
63 | QStringList cats = KABPrefs::instance()->mCustomCategories; | 65 | QStringList cats = KABPrefs::instance()->mCustomCategories; |
64 | 66 | ||
65 | QStringList::Iterator iter; | 67 | QStringList::Iterator iter; |
66 | for ( iter = cats.begin(); iter != cats.end(); ++iter ) | 68 | for ( iter = cats.begin(); iter != cats.end(); ++iter ) |
67 | mCategoriesView->insertItem( new QCheckListItem( mCategoriesView, (*iter), QCheckListItem::CheckBox ) ); | 69 | mCategoriesView->insertItem( new Q3CheckListItem( mCategoriesView, (*iter), Q3CheckListItem::CheckBox ) ); |
68 | filterNameTextChanged( mNameEdit->text() ); | 70 | filterNameTextChanged( mNameEdit->text() ); |
69 | } | 71 | } |
70 | 72 | ||
71 | FilterEditDialog::~FilterEditDialog() | 73 | FilterEditDialog::~FilterEditDialog() |
@@ -76,12 +78,12 @@ void FilterEditDialog::setFilter( const Filter &filter ) | |||
76 | { | 78 | { |
77 | mNameEdit->setText( filter.name() ); | 79 | mNameEdit->setText( filter.name() ); |
78 | 80 | ||
79 | QStringList categories = filter.categories(); | 81 | QStringList categories = filter.categories(); |
80 | QListViewItem *item = mCategoriesView->firstChild(); | 82 | Q3ListViewItem *item = mCategoriesView->firstChild(); |
81 | while ( item != 0 ) { | 83 | while ( item != 0 ) { |
82 | if ( categories.contains( item->text( 0 ) ) ) { | 84 | if ( categories.contains( item->text( 0 ) ) ) { |
83 | QCheckListItem *checkItem = static_cast<QCheckListItem*>( item ); | 85 | Q3CheckListItem *checkItem = static_cast<Q3CheckListItem*>( item ); |
84 | checkItem->setOn( true ); | 86 | checkItem->setOn( true ); |
85 | } | 87 | } |
86 | 88 | ||
87 | item = item->nextSibling(); | 89 | item = item->nextSibling(); |
@@ -104,11 +106,11 @@ Filter FilterEditDialog::filter() | |||
104 | 106 | ||
105 | filter.setName( mNameEdit->text() ); | 107 | filter.setName( mNameEdit->text() ); |
106 | 108 | ||
107 | QStringList categories; | 109 | QStringList categories; |
108 | QListViewItem *item = mCategoriesView->firstChild(); | 110 | Q3ListViewItem *item = mCategoriesView->firstChild(); |
109 | while ( item != 0 ) { | 111 | while ( item != 0 ) { |
110 | QCheckListItem *checkItem = static_cast<QCheckListItem*>( item ); | 112 | Q3CheckListItem *checkItem = static_cast<Q3CheckListItem*>( item ); |
111 | if ( checkItem->isOn() ) | 113 | if ( checkItem->isOn() ) |
112 | categories.append( item->text( 0 ) ); | 114 | categories.append( item->text( 0 ) ); |
113 | 115 | ||
114 | item = item->nextSibling(); | 116 | item = item->nextSibling(); |
@@ -140,9 +142,9 @@ void FilterEditDialog::initGUI() | |||
140 | 142 | ||
141 | QWidget *page = plainPage(); | 143 | QWidget *page = plainPage(); |
142 | QLabel *label; | 144 | QLabel *label; |
143 | 145 | ||
144 | QGridLayout *topLayout = new QGridLayout( page, 3, 2, 0, spacingHint() ); | 146 | Q3GridLayout *topLayout = new Q3GridLayout( page, 3, 2, 0, spacingHint() ); |
145 | 147 | ||
146 | label = new QLabel( i18n( "Name" ), page ); | 148 | label = new QLabel( i18n( "Name" ), page ); |
147 | mNameEdit = new KLineEdit( page ); | 149 | mNameEdit = new KLineEdit( page ); |
148 | mNameEdit->setFocus(); | 150 | mNameEdit->setFocus(); |
@@ -154,18 +156,18 @@ void FilterEditDialog::initGUI() | |||
154 | mCategoriesView = new KListView( page ); | 156 | mCategoriesView = new KListView( page ); |
155 | mCategoriesView->addColumn( i18n( "Categories" ) ); | 157 | mCategoriesView->addColumn( i18n( "Categories" ) ); |
156 | topLayout->addMultiCellWidget( mCategoriesView, 1, 1, 0, 1 ); | 158 | topLayout->addMultiCellWidget( mCategoriesView, 1, 1, 0, 1 ); |
157 | 159 | ||
158 | mMatchRuleGroup = new QHButtonGroup( i18n( "Category rule" ), page ); | 160 | mMatchRuleGroup = new Q3HButtonGroup( i18n( "Category rule" ), page ); |
159 | mMatchRuleGroup->setExclusive( true ); | 161 | mMatchRuleGroup->setExclusive( true ); |
160 | QRadioButton *radio = new QRadioButton( i18n( "Include categories" ), mMatchRuleGroup ); | 162 | QRadioButton *radio = new QRadioButton( i18n( "Include categories" ), mMatchRuleGroup ); |
161 | //mMatchRuleGroup->insert( radio ); | 163 | //mMatchRuleGroup->insert( radio ); |
162 | radio = new QRadioButton( i18n( "Exclude categories" ), mMatchRuleGroup ); | 164 | radio = new QRadioButton( i18n( "Exclude categories" ), mMatchRuleGroup ); |
163 | radio->setChecked( true ); | 165 | radio->setChecked( true ); |
164 | //mMatchRuleGroup->insert( radio ); | 166 | //mMatchRuleGroup->insert( radio ); |
165 | topLayout->addMultiCellWidget( mMatchRuleGroup, 2, 2, 0, 1 ); | 167 | topLayout->addMultiCellWidget( mMatchRuleGroup, 2, 2, 0, 1 ); |
166 | 168 | ||
167 | QHButtonGroup * mMatchPPCGroup = new QHButtonGroup(i18n( "Include contacts, that are:" ), page ); | 169 | Q3HButtonGroup * mMatchPPCGroup = new Q3HButtonGroup(i18n( "Include contacts, that are:" ), page ); |
168 | mPublic = new QCheckBox( i18n( "public" ), mMatchPPCGroup ); | 170 | mPublic = new QCheckBox( i18n( "public" ), mMatchPPCGroup ); |
169 | mPrivate = new QCheckBox( i18n( "private" ), mMatchPPCGroup ); | 171 | mPrivate = new QCheckBox( i18n( "private" ), mMatchPPCGroup ); |
170 | mConfidential = new QCheckBox( i18n( "confidential" ), mMatchPPCGroup ); | 172 | mConfidential = new QCheckBox( i18n( "confidential" ), mMatchPPCGroup ); |
171 | mPublic->setChecked( true ); | 173 | mPublic->setChecked( true ); |
@@ -271,9 +273,9 @@ void FilterDialog::refresh() | |||
271 | for ( iter = mFilterList.begin(); iter != mFilterList.end(); ++iter ) | 273 | for ( iter = mFilterList.begin(); iter != mFilterList.end(); ++iter ) |
272 | mFilterListBox->insertItem( (*iter).name() ); | 274 | mFilterListBox->insertItem( (*iter).name() ); |
273 | } | 275 | } |
274 | 276 | ||
275 | void FilterDialog::selectionChanged( QListBoxItem *item ) | 277 | void FilterDialog::selectionChanged( Q3ListBoxItem *item ) |
276 | { | 278 | { |
277 | bool state = ( item != 0 ); | 279 | bool state = ( item != 0 ); |
278 | 280 | ||
279 | mEditButton->setEnabled( state ); | 281 | mEditButton->setEnabled( state ); |
@@ -289,18 +291,18 @@ void FilterDialog::initGUI() | |||
289 | #endif //KAB_EMBEDDED | 291 | #endif //KAB_EMBEDDED |
290 | 292 | ||
291 | QWidget *page = plainPage(); | 293 | QWidget *page = plainPage(); |
292 | 294 | ||
293 | QGridLayout *topLayout = new QGridLayout( page, 1, 2, 0, spacingHint() ); | 295 | Q3GridLayout *topLayout = new Q3GridLayout( page, 1, 2, 0, spacingHint() ); |
294 | 296 | ||
295 | mFilterListBox = new KListBox( page ); | 297 | mFilterListBox = new KListBox( page ); |
296 | topLayout->addWidget( mFilterListBox, 0, 0 ); | 298 | topLayout->addWidget( mFilterListBox, 0, 0 ); |
297 | connect( mFilterListBox, SIGNAL( selectionChanged( QListBoxItem * ) ), | 299 | connect( mFilterListBox, SIGNAL( selectionChanged( Q3ListBoxItem * ) ), |
298 | SLOT( selectionChanged( QListBoxItem * ) ) ); | 300 | SLOT( selectionChanged( Q3ListBoxItem * ) ) ); |
299 | connect( mFilterListBox, SIGNAL( doubleClicked ( QListBoxItem * ) ), | 301 | connect( mFilterListBox, SIGNAL( doubleClicked ( Q3ListBoxItem * ) ), |
300 | SLOT( edit() ) ); | 302 | SLOT( edit() ) ); |
301 | 303 | ||
302 | KButtonBox *buttonBox = new KButtonBox( page, Vertical ); | 304 | KButtonBox *buttonBox = new KButtonBox( page, Qt::Vertical ); |
303 | buttonBox->addButton( i18n( "&Add..." ), this, SLOT( add() ) ); | 305 | buttonBox->addButton( i18n( "&Add..." ), this, SLOT( add() ) ); |
304 | mEditButton = buttonBox->addButton( i18n( "&Edit..." ), this, SLOT( edit() ) ); | 306 | mEditButton = buttonBox->addButton( i18n( "&Edit..." ), this, SLOT( edit() ) ); |
305 | mEditButton->setEnabled( false ); | 307 | mEditButton->setEnabled( false ); |
306 | mRemoveButton = buttonBox->addButton( i18n( "&Remove" ), this, SLOT( remove() ) ); | 308 | mRemoveButton = buttonBox->addButton( i18n( "&Remove" ), this, SLOT( remove() ) ); |
@@ -309,7 +311,7 @@ void FilterDialog::initGUI() | |||
309 | buttonBox->layout(); | 311 | buttonBox->layout(); |
310 | topLayout->addWidget( buttonBox, 0, 1 ); | 312 | topLayout->addWidget( buttonBox, 0, 1 ); |
311 | } | 313 | } |
312 | 314 | ||
313 | #ifndef KAB_EMBEDDED | 315 | #ifndef KAB_EMBEDDED_ |
314 | #include "filtereditdialog.moc" | 316 | #include "moc_filtereditdialog.cpp" |
315 | #endif //KAB_EMBEDDED | 317 | #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 | |||
@@ -30,21 +30,20 @@ $Id$ | |||
30 | 30 | ||
31 | #ifndef FILTEREDITDIALOG_H | 31 | #ifndef FILTEREDITDIALOG_H |
32 | #define FILTEREDITDIALOG_H | 32 | #define FILTEREDITDIALOG_H |
33 | 33 | ||
34 | class QButtonGroup; | 34 | #include <Q3HButtonGroup> |
35 | class QString; | 35 | class QString; |
36 | class QToolButton; | 36 | class QToolButton; |
37 | class QWidget; | 37 | class QWidget; |
38 | class QListBoxItem; | 38 | class Q3ListBoxItem; |
39 | class QCheckBox; | 39 | class QCheckBox; |
40 | 40 | ||
41 | class KLineEdit; | 41 | class KLineEdit; |
42 | class KListBox; | 42 | class KListBox; |
43 | class KListView; | 43 | class KListView; |
44 | 44 | ||
45 | #include <kdialogbase.h> | 45 | #include <kdialogbase.h> |
46 | #include <qhbuttongroup.h> | ||
47 | 46 | ||
48 | #include "filter.h" | 47 | #include "filter.h" |
49 | 48 | ||
50 | class FilterDialog : public KDialogBase | 49 | class FilterDialog : public KDialogBase |
@@ -61,9 +60,9 @@ class FilterDialog : public KDialogBase | |||
61 | protected slots: | 60 | protected slots: |
62 | void add(); | 61 | void add(); |
63 | void edit(); | 62 | void edit(); |
64 | void remove(); | 63 | void remove(); |
65 | void selectionChanged( QListBoxItem* ); | 64 | void selectionChanged( Q3ListBoxItem* ); |
66 | 65 | ||
67 | private: | 66 | private: |
68 | void initGUI(); | 67 | void initGUI(); |
69 | void refresh(); | 68 | void refresh(); |
@@ -97,9 +96,9 @@ class FilterEditDialog : public KDialogBase | |||
97 | Filter mFilter; | 96 | Filter mFilter; |
98 | 97 | ||
99 | KLineEdit *mNameEdit; | 98 | KLineEdit *mNameEdit; |
100 | KListView *mCategoriesView; | 99 | KListView *mCategoriesView; |
101 | QHButtonGroup *mMatchRuleGroup; | 100 | Q3HButtonGroup *mMatchRuleGroup; |
102 | QCheckBox *mPrivate; | 101 | QCheckBox *mPrivate; |
103 | QCheckBox *mPublic; | 102 | QCheckBox *mPublic; |
104 | QCheckBox *mConfidential; | 103 | QCheckBox *mConfidential; |
105 | QPushButton *mEditButton; | 104 | QPushButton *mEditButton; |
diff --git a/kaddressbook/geowidget.cpp b/kaddressbook/geowidget.cpp index 13cd084..caff3b2 100644 --- a/kaddressbook/geowidget.cpp +++ b/kaddressbook/geowidget.cpp | |||
@@ -26,12 +26,19 @@ | |||
26 | #ifndef KAB_EMBEDDED | 26 | #ifndef KAB_EMBEDDED |
27 | #include <kaccelmanager.h> | 27 | #include <kaccelmanager.h> |
28 | #else //KAB_EMBEDDED | 28 | #else //KAB_EMBEDDED |
29 | 29 | ||
30 | #include <qtextstream.h> | 30 | #include <q3textstream.h> |
31 | //Added by qt3to4: | ||
32 | #include <QPaintEvent> | ||
33 | #include <Q3GridLayout> | ||
34 | #include <Q3Frame> | ||
35 | #include <QMouseEvent> | ||
31 | #include <kglobal.h> | 36 | #include <kglobal.h> |
32 | #endif //KAB_EMBEDDED | 37 | #endif //KAB_EMBEDDED |
33 | 38 | ||
39 | #include <QDesktopWidget> | ||
40 | |||
34 | #include <knuminput.h> | 41 | #include <knuminput.h> |
35 | #include <kcombobox.h> | 42 | #include <kcombobox.h> |
36 | #include <kdebug.h> | 43 | #include <kdebug.h> |
37 | #include <kiconloader.h> | 44 | #include <kiconloader.h> |
@@ -40,12 +47,12 @@ | |||
40 | 47 | ||
41 | #include <qcheckbox.h> | 48 | #include <qcheckbox.h> |
42 | #include <qfile.h> | 49 | #include <qfile.h> |
43 | #include <qapplication.h> | 50 | #include <qapplication.h> |
44 | #include <qgroupbox.h> | 51 | #include <q3groupbox.h> |
45 | #include <qlabel.h> | 52 | #include <qlabel.h> |
46 | #include <qlayout.h> | 53 | #include <qlayout.h> |
47 | #include <qlistbox.h> | 54 | #include <q3listbox.h> |
48 | #include <qpainter.h> | 55 | #include <qpainter.h> |
49 | #include <qpixmap.h> | 56 | #include <qpixmap.h> |
50 | #include <qpushbutton.h> | 57 | #include <qpushbutton.h> |
51 | #include <qregexp.h> | 58 | #include <qregexp.h> |
@@ -58,9 +65,9 @@ GeoWidget::GeoWidget( QWidget *parent, const char *name ) | |||
58 | : QWidget( parent, name ) | 65 | : QWidget( parent, name ) |
59 | { | 66 | { |
60 | QLabel *label = 0; | 67 | QLabel *label = 0; |
61 | 68 | ||
62 | QGridLayout *topLayout = new QGridLayout( this, 4, 3 ); | 69 | Q3GridLayout *topLayout = new Q3GridLayout( this, 4, 3 ); |
63 | topLayout->setMargin( KDialog::marginHint() ); | 70 | topLayout->setMargin( KDialog::marginHint() ); |
64 | topLayout->setSpacing( KDialog::spacingHint() ); | 71 | topLayout->setSpacing( KDialog::spacingHint() ); |
65 | 72 | ||
66 | label = new QLabel( this ); | 73 | label = new QLabel( this ); |
@@ -68,9 +75,9 @@ GeoWidget::GeoWidget( QWidget *parent, const char *name ) | |||
68 | //US label->setPixmap( KGlobal::iconLoader()->loadIcon( "package_network", KIcon::Desktop ) ); | 75 | //US label->setPixmap( KGlobal::iconLoader()->loadIcon( "package_network", KIcon::Desktop ) ); |
69 | label->setPixmap( KGlobal::iconLoader()->loadIcon( "package_network", KIcon::Desktop, 0 ) ); | 76 | label->setPixmap( KGlobal::iconLoader()->loadIcon( "package_network", KIcon::Desktop, 0 ) ); |
70 | label->setAlignment( Qt::AlignTop ); | 77 | label->setAlignment( Qt::AlignTop ); |
71 | topLayout->addMultiCellWidget( label, 0, 3, 0, 0 ); | 78 | topLayout->addMultiCellWidget( label, 0, 3, 0, 0 ); |
72 | label->setAlignment( AlignCenter ); | 79 | label->setAlignment( Qt::AlignCenter ); |
73 | mGeoIsValid = new QCheckBox( i18n( "Use geo data" ), this ); | 80 | mGeoIsValid = new QCheckBox( i18n( "Use geo data" ), this ); |
74 | topLayout->addMultiCellWidget( mGeoIsValid, 0, 0, 1, 2 ); | 81 | topLayout->addMultiCellWidget( mGeoIsValid, 0, 0, 1, 2 ); |
75 | 82 | ||
76 | label = new QLabel( i18n( "Latitude:" ), this ); | 83 | label = new QLabel( i18n( "Latitude:" ), this ); |
@@ -166,18 +173,18 @@ GeoDialog::GeoDialog( QWidget *parent, const char *name ) | |||
166 | : KDialogBase( Plain, i18n( "Geo Data Input" ), Ok | Cancel, Ok, | 173 | : KDialogBase( Plain, i18n( "Geo Data Input" ), Ok | Cancel, Ok, |
167 | parent, name, true, true ), | 174 | parent, name, true, true ), |
168 | mUpdateSexagesimalInput( true ) | 175 | mUpdateSexagesimalInput( true ) |
169 | { | 176 | { |
170 | QFrame *page = plainPage(); | 177 | Q3Frame *page = plainPage(); |
171 | 178 | ||
172 | QGridLayout *topLayout = new QGridLayout( page, 1, 1, marginHintSmall(), | 179 | Q3GridLayout *topLayout = new Q3GridLayout( page, 1, 1, marginHintSmall(), |
173 | spacingHint() ); | 180 | spacingHint() ); |
174 | //topLayout->setRowStretch( 1, 1 ); | 181 | //topLayout->setRowStretch( 1, 1 ); |
175 | 182 | ||
176 | mMapWidget = new GeoMapWidget( page ); | 183 | mMapWidget = new GeoMapWidget( page ); |
177 | mCityCombo = new KComboBox( page ); | 184 | mCityCombo = new KComboBox( page ); |
178 | QGroupBox *sexagesimalGroup = new QGroupBox( 0, Vertical, i18n( "Sexagesimal" ), page ); | 185 | Q3GroupBox *sexagesimalGroup = new Q3GroupBox( 0, Qt::Vertical, i18n( "Sexagesimal" ), page ); |
179 | QGridLayout *sexagesimalLayout = new QGridLayout( sexagesimalGroup->layout(), | 186 | Q3GridLayout *sexagesimalLayout = new Q3GridLayout( sexagesimalGroup->layout(), |
180 | 2, 5, spacingHint() ); | 187 | 2, 5, spacingHint() ); |
181 | QLabel *label; | 188 | QLabel *label; |
182 | if ( QApplication::desktop()->width() < 320 ) { | 189 | if ( QApplication::desktop()->width() < 320 ) { |
183 | label = new QLabel( i18n( "La." ), sexagesimalGroup ); | 190 | label = new QLabel( i18n( "La." ), sexagesimalGroup ); |
@@ -428,10 +435,10 @@ void GeoDialog::loadCityList() | |||
428 | #endif | 435 | #endif |
429 | 436 | ||
430 | QFile file( fileName); | 437 | QFile file( fileName); |
431 | 438 | ||
432 | if ( file.open( IO_ReadOnly ) ) { | 439 | if ( file.open( QIODevice::ReadOnly ) ) { |
433 | QTextStream s( &file ); | 440 | Q3TextStream s( &file ); |
434 | 441 | ||
435 | QString line, country; | 442 | QString line, country; |
436 | QRegExp coord( "[+-]\\d+[+-]\\d+" ); | 443 | QRegExp coord( "[+-]\\d+[+-]\\d+" ); |
437 | QRegExp name( "[^\\s]+/[^\\s]+" ); | 444 | QRegExp name( "[^\\s]+/[^\\s]+" ); |
@@ -551,9 +558,9 @@ int GeoDialog::nearestCity( double x, double y ) | |||
551 | 558 | ||
552 | GeoMapWidget::GeoMapWidget( QWidget *parent, const char *name ) | 559 | GeoMapWidget::GeoMapWidget( QWidget *parent, const char *name ) |
553 | : QWidget( parent, name ), mLatitude( 0 ), mLongitude( 0 ) | 560 | : QWidget( parent, name ), mLatitude( 0 ), mLongitude( 0 ) |
554 | { | 561 | { |
555 | setBackgroundMode( NoBackground ); | 562 | setBackgroundMode( Qt::NoBackground ); |
556 | 563 | ||
557 | setFixedSize( 240, 120 ); | 564 | setFixedSize( 240, 120 ); |
558 | 565 | ||
559 | update(); | 566 | update(); |
@@ -623,7 +630,7 @@ void GeoMapWidget::paintEvent( QPaintEvent* ) | |||
623 | p.end(); | 630 | p.end(); |
624 | bitBlt( this, 0, 0, &world ); | 631 | bitBlt( this, 0, 0, &world ); |
625 | } | 632 | } |
626 | 633 | ||
627 | #ifndef KAB_EMBEDDED | 634 | #ifndef KAB_EMBEDDED_ |
628 | #include "geowidget.moc" | 635 | #include "moc_geowidget.cpp" |
629 | #endif //KAB_EMBEDDED | 636 | #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 | |||
@@ -26,8 +26,12 @@ | |||
26 | 26 | ||
27 | #include <qmap.h> | 27 | #include <qmap.h> |
28 | 28 | ||
29 | #include <qwidget.h> | 29 | #include <qwidget.h> |
30 | //Added by qt3to4: | ||
31 | #include <QLabel> | ||
32 | #include <QMouseEvent> | ||
33 | #include <QPaintEvent> | ||
30 | #include <kdialogbase.h> | 34 | #include <kdialogbase.h> |
31 | 35 | ||
32 | namespace KABC { | 36 | namespace KABC { |
33 | class Geo; | 37 | class Geo; |
diff --git a/kaddressbook/imagewidget.cpp b/kaddressbook/imagewidget.cpp index eec5e08..6ecf66d 100644 --- a/kaddressbook/imagewidget.cpp +++ b/kaddressbook/imagewidget.cpp | |||
@@ -36,25 +36,29 @@ | |||
36 | #include <kurlrequester.h> | 36 | #include <kurlrequester.h> |
37 | #include <kurl.h> | 37 | #include <kurl.h> |
38 | 38 | ||
39 | #include <qcheckbox.h> | 39 | #include <qcheckbox.h> |
40 | #include <qgroupbox.h> | 40 | #include <q3groupbox.h> |
41 | #include <qlabel.h> | 41 | #include <qlabel.h> |
42 | #include <qlayout.h> | 42 | #include <qlayout.h> |
43 | #include <qpixmap.h> | 43 | #include <qpixmap.h> |
44 | #include <qpushbutton.h> | 44 | #include <qpushbutton.h> |
45 | #include <qapplication.h> | 45 | #include <qapplication.h> |
46 | #include <QDesktopWidget> | ||
47 | //Added by qt3to4: | ||
48 | #include <Q3GridLayout> | ||
49 | #include <Q3Frame> | ||
46 | 50 | ||
47 | #include "imagewidget.h" | 51 | #include "imagewidget.h" |
48 | 52 | ||
49 | ImageWidget::ImageWidget( QWidget *parent, const char *name ) | 53 | ImageWidget::ImageWidget( QWidget *parent, const char *name ) |
50 | : QWidget( parent, name ) | 54 | : QWidget( parent, name ) |
51 | { | 55 | { |
52 | QGridLayout *topLayout = new QGridLayout( this, 2, 1, KDialog::marginHint(), | 56 | Q3GridLayout *topLayout = new Q3GridLayout( this, 2, 1, KDialog::marginHint(), |
53 | KDialog::spacingHint() ); | 57 | KDialog::spacingHint() ); |
54 | 58 | ||
55 | QGroupBox *photoBox = new QGroupBox( 0, Qt::Vertical, i18n( "Photo" ), this ); | 59 | Q3GroupBox *photoBox = new Q3GroupBox( 0, Qt::Vertical, i18n( "Photo" ), this ); |
56 | QGridLayout *boxLayout = new QGridLayout( photoBox->layout(), 3, 2, | 60 | Q3GridLayout *boxLayout = new Q3GridLayout( photoBox->layout(), 3, 2, |
57 | KDialog::spacingHint() ); | 61 | KDialog::spacingHint() ); |
58 | boxLayout->setRowStretch( 2, 1 ); | 62 | boxLayout->setRowStretch( 2, 1 ); |
59 | 63 | ||
60 | mPhotoLabel = new QLabel( photoBox ); | 64 | mPhotoLabel = new QLabel( photoBox ); |
@@ -62,9 +66,9 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name ) | |||
62 | if ( QApplication::desktop()->width() > 320 ) | 66 | if ( QApplication::desktop()->width() > 320 ) |
63 | fac = 6; | 67 | fac = 6; |
64 | mPhotoLabel->setFixedSize( 50*9/fac, 70*9/fac ); | 68 | mPhotoLabel->setFixedSize( 50*9/fac, 70*9/fac ); |
65 | mPhotoLabel->setScaledContents( true ); | 69 | mPhotoLabel->setScaledContents( true ); |
66 | mPhotoLabel->setFrameStyle( QFrame::Panel | QFrame::Sunken ); | 70 | mPhotoLabel->setFrameStyle( Q3Frame::Panel | Q3Frame::Sunken ); |
67 | boxLayout->addMultiCellWidget( mPhotoLabel, 0, 3, 0, 0 ); | 71 | boxLayout->addMultiCellWidget( mPhotoLabel, 0, 3, 0, 0 ); |
68 | 72 | ||
69 | mPhotoUrl = new KURLRequester( photoBox ); | 73 | mPhotoUrl = new KURLRequester( photoBox ); |
70 | #ifndef KAB_EMBEDDED | 74 | #ifndef KAB_EMBEDDED |
@@ -74,9 +78,9 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name ) | |||
74 | #endif //KAB_EMBEDDED | 78 | #endif //KAB_EMBEDDED |
75 | 79 | ||
76 | 80 | ||
77 | boxLayout->addWidget( mPhotoUrl, 0, 1 ); | 81 | boxLayout->addWidget( mPhotoUrl, 0, 1 ); |
78 | QHBox *hb1 = new QHBox ( photoBox ); | 82 | Q3HBox *hb1 = new Q3HBox ( photoBox ); |
79 | mUsePhotoUrl = new QCheckBox( i18n( "Store as URL" ), hb1 ); | 83 | mUsePhotoUrl = new QCheckBox( i18n( "Store as URL" ), hb1 ); |
80 | mUsePhotoUrl->setEnabled( false ); | 84 | mUsePhotoUrl->setEnabled( false ); |
81 | boxLayout->addWidget( hb1, 1, 1 ); | 85 | boxLayout->addWidget( hb1, 1, 1 ); |
82 | 86 | ||
@@ -85,16 +89,16 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name ) | |||
85 | boxLayout->addWidget( new QLabel( photoBox ), 2, 1 ); | 89 | boxLayout->addWidget( new QLabel( photoBox ), 2, 1 ); |
86 | 90 | ||
87 | topLayout->addWidget( photoBox, 0, 0 ); | 91 | topLayout->addWidget( photoBox, 0, 0 ); |
88 | 92 | ||
89 | QGroupBox *logoBox = new QGroupBox( 0, Qt::Vertical, i18n( "Logo" ), this ); | 93 | Q3GroupBox *logoBox = new Q3GroupBox( 0, Qt::Vertical, i18n( "Logo" ), this ); |
90 | boxLayout = new QGridLayout( logoBox->layout(), 3, 2, KDialog::spacingHint() ); | 94 | boxLayout = new Q3GridLayout( logoBox->layout(), 3, 2, KDialog::spacingHint() ); |
91 | boxLayout->setRowStretch( 2, 1 ); | 95 | boxLayout->setRowStretch( 2, 1 ); |
92 | 96 | ||
93 | mLogoLabel = new QLabel( logoBox ); | 97 | mLogoLabel = new QLabel( logoBox ); |
94 | mLogoLabel->setFixedSize( 50*9/fac, 70*9/fac ); | 98 | mLogoLabel->setFixedSize( 50*9/fac, 70*9/fac ); |
95 | mLogoLabel->setScaledContents( true ); | 99 | mLogoLabel->setScaledContents( true ); |
96 | mLogoLabel->setFrameStyle( QFrame::Panel | QFrame::Sunken ); | 100 | mLogoLabel->setFrameStyle( Q3Frame::Panel | Q3Frame::Sunken ); |
97 | boxLayout->addMultiCellWidget( mLogoLabel, 0, 3, 0, 0 ); | 101 | boxLayout->addMultiCellWidget( mLogoLabel, 0, 3, 0, 0 ); |
98 | 102 | ||
99 | mLogoUrl = new KURLRequester( logoBox ); | 103 | mLogoUrl = new KURLRequester( logoBox ); |
100 | #ifndef KAB_EMBEDDED | 104 | #ifndef KAB_EMBEDDED |
@@ -103,9 +107,9 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name ) | |||
103 | //US qDebug("ImageWidget::ImageWidget KImageIO not defined 2"); | 107 | //US qDebug("ImageWidget::ImageWidget KImageIO not defined 2"); |
104 | #endif //KAB_EMBEDDED | 108 | #endif //KAB_EMBEDDED |
105 | boxLayout->addWidget( mLogoUrl, 0, 1 ); | 109 | boxLayout->addWidget( mLogoUrl, 0, 1 ); |
106 | 110 | ||
107 | QHBox *hb2 = new QHBox ( logoBox ); | 111 | Q3HBox *hb2 = new Q3HBox ( logoBox ); |
108 | mUseLogoUrl = new QCheckBox( i18n( "Store as URL" ), hb2 ); | 112 | mUseLogoUrl = new QCheckBox( i18n( "Store as URL" ), hb2 ); |
109 | mUseLogoUrl->setEnabled( false ); | 113 | mUseLogoUrl->setEnabled( false ); |
110 | boxLayout->addWidget( hb2, 1, 1 ); | 114 | boxLayout->addWidget( hb2, 1, 1 ); |
111 | 115 | ||
@@ -179,9 +183,9 @@ KABC::Picture ImageWidget::photo() const | |||
179 | 183 | ||
180 | if ( mUsePhotoUrl->isChecked() ) | 184 | if ( mUsePhotoUrl->isChecked() ) |
181 | photo.setUrl( mPhotoUrl->url() ); | 185 | photo.setUrl( mPhotoUrl->url() ); |
182 | else { | 186 | else { |
183 | QPixmap *px = mPhotoLabel->pixmap(); | 187 | const QPixmap *px = mPhotoLabel->pixmap(); |
184 | if ( px ) { | 188 | if ( px ) { |
185 | #ifndef KAB_EMBEDDED | 189 | #ifndef KAB_EMBEDDED |
186 | if ( px->height() > px->width() ) | 190 | if ( px->height() > px->width() ) |
187 | photo.setData( px->convertToImage().scaleHeight( 140 ) ); | 191 | photo.setData( px->convertToImage().scaleHeight( 140 ) ); |
@@ -231,9 +235,9 @@ KABC::Picture ImageWidget::logo() const | |||
231 | 235 | ||
232 | if ( mUseLogoUrl->isChecked() ) | 236 | if ( mUseLogoUrl->isChecked() ) |
233 | logo.setUrl( mLogoUrl->url() ); | 237 | logo.setUrl( mLogoUrl->url() ); |
234 | else { | 238 | else { |
235 | QPixmap *px = mLogoLabel->pixmap(); | 239 | const QPixmap *px = mLogoLabel->pixmap(); |
236 | if ( px ) { | 240 | if ( px ) { |
237 | #ifndef KAB_EMBEDDED | 241 | #ifndef KAB_EMBEDDED |
238 | if ( px->height() > px->width() ) | 242 | if ( px->height() > px->width() ) |
239 | logo.setData( px->convertToImage().scaleHeight( 140 ) ); | 243 | logo.setData( px->convertToImage().scaleHeight( 140 ) ); |
@@ -291,7 +295,7 @@ QPixmap ImageWidget::loadPixmap( const QString &url ) | |||
291 | pixmap.load( url ); | 295 | pixmap.load( url ); |
292 | return pixmap; | 296 | return pixmap; |
293 | } | 297 | } |
294 | 298 | ||
295 | #ifndef KAB_EMBEDDED | 299 | #ifndef KAB_EMBEDDED_ |
296 | #include "imagewidget.moc" | 300 | #include "moc_imagewidget.cpp" |
297 | #endif //KAB_EMBEDDED | 301 | #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 | |||
@@ -24,8 +24,11 @@ | |||
24 | #ifndef IMAGEWIDGET_H | 24 | #ifndef IMAGEWIDGET_H |
25 | #define IMAGEWIDGET_H | 25 | #define IMAGEWIDGET_H |
26 | 26 | ||
27 | #include <qwidget.h> | 27 | #include <qwidget.h> |
28 | //Added by qt3to4: | ||
29 | #include <QPixmap> | ||
30 | #include <QLabel> | ||
28 | 31 | ||
29 | #include <kabc/picture.h> | 32 | #include <kabc/picture.h> |
30 | #include <kdialogbase.h> | 33 | #include <kdialogbase.h> |
31 | 34 | ||
diff --git a/kaddressbook/incsearchwidget.cpp b/kaddressbook/incsearchwidget.cpp index 5f8b83d..a54d1cd 100644 --- a/kaddressbook/incsearchwidget.cpp +++ b/kaddressbook/incsearchwidget.cpp | |||
@@ -24,9 +24,12 @@ | |||
24 | #include <qlabel.h> | 24 | #include <qlabel.h> |
25 | #include <qlayout.h> | 25 | #include <qlayout.h> |
26 | #include <qtooltip.h> | 26 | #include <qtooltip.h> |
27 | #include <qapplication.h> | 27 | #include <qapplication.h> |
28 | #include <QDesktopWidget> | ||
28 | #include <qcombobox.h> | 29 | #include <qcombobox.h> |
30 | //Added by qt3to4: | ||
31 | #include <Q3HBoxLayout> | ||
29 | 32 | ||
30 | #include <kdialog.h> | 33 | #include <kdialog.h> |
31 | #include <klineedit.h> | 34 | #include <klineedit.h> |
32 | #include <klocale.h> | 35 | #include <klocale.h> |
@@ -36,19 +39,20 @@ | |||
36 | 39 | ||
37 | #include "incsearchwidget.h" | 40 | #include "incsearchwidget.h" |
38 | 41 | ||
39 | IncSearchWidget::IncSearchWidget( QWidget *parent, const char *name ) | 42 | IncSearchWidget::IncSearchWidget( QWidget *parent, const char *name ) |
40 | : QWidget( parent, name ) | ||
41 | { | 43 | { |
44 | setObjectName(name); | ||
45 | setParent(parent); | ||
42 | #ifndef KAB_EMBEDDED | 46 | #ifndef KAB_EMBEDDED |
43 | //US setCaption( i18n( "Incremental Search" ) ); | 47 | //US setCaption( i18n( "Incremental Search" ) ); |
44 | #endif //KAB_EMBEDDED | 48 | #endif //KAB_EMBEDDED |
45 | 49 | ||
46 | QHBoxLayout *layout = new QHBoxLayout( this, 2, KDialog::spacingHint() ); | 50 | Q3HBoxLayout *layout = new Q3HBoxLayout( this, 2, KDialog::spacingHint() ); |
47 | 51 | ||
48 | #ifdef DESKTOP_VERSION | 52 | #ifdef DESKTOP_VERSION |
49 | QLabel *label = new QLabel( i18n( "Search:" ), this ); | 53 | QLabel *label = new QLabel( i18n( "Search:" ), this ); |
50 | label->setAlignment( QLabel::AlignVCenter | QLabel::AlignRight ); | 54 | label->setAlignment( Qt::AlignVCenter | Qt::AlignRight ); |
51 | layout->addWidget( label ); | 55 | layout->addWidget( label ); |
52 | #endif //KAB_EMBEDDED | 56 | #endif //KAB_EMBEDDED |
53 | 57 | ||
54 | mSearchText = new KLineEdit( this ); | 58 | mSearchText = new KLineEdit( this ); |
@@ -175,7 +179,7 @@ int IncSearchWidget::currentItem() const | |||
175 | { | 179 | { |
176 | 180 | ||
177 | return mFieldCombo->currentItem(); | 181 | return mFieldCombo->currentItem(); |
178 | } | 182 | } |
179 | #ifndef KAB_EMBEDDED | 183 | #ifndef KAB_EMBEDDED_ |
180 | #include "incsearchwidget.moc" | 184 | #include "moc_incsearchwidget.cpp" |
181 | #endif //KAB_EMBEDDED | 185 | #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 | |||
@@ -24,10 +24,13 @@ | |||
24 | #include <qevent.h> | 24 | #include <qevent.h> |
25 | #include <qlayout.h> | 25 | #include <qlayout.h> |
26 | #include <qpushbutton.h> | 26 | #include <qpushbutton.h> |
27 | #include <qstring.h> | 27 | #include <qstring.h> |
28 | #include <qtl.h> | 28 | #include <q3tl.h> |
29 | #include <qapplication.h> | 29 | #include <qapplication.h> |
30 | #include <QDesktopWidget> | ||
31 | //Added by qt3to4: | ||
32 | #include <Q3GridLayout> | ||
30 | 33 | ||
31 | #include <kabc/addressbook.h> | 34 | #include <kabc/addressbook.h> |
32 | #include <kabc/field.h> | 35 | #include <kabc/field.h> |
33 | #include <kdebug.h> | 36 | #include <kdebug.h> |
@@ -72,11 +75,11 @@ JumpButtonBar::JumpButtonBar( KABCore *core, QWidget *parent, const char *name ) | |||
72 | : QWidget( parent, name ), mCore( core ) | 75 | : QWidget( parent, name ), mCore( core ) |
73 | { | 76 | { |
74 | if ( QApplication::desktop()->width() < 480 ) | 77 | if ( QApplication::desktop()->width() < 480 ) |
75 | 78 | ||
76 | mButtonLayout = new QGridLayout( this, 1, 18 ); | 79 | mButtonLayout = new Q3GridLayout( this, 1, 18 ); |
77 | else | 80 | else |
78 | mButtonLayout = new QGridLayout( this, 1, 20 ); | 81 | mButtonLayout = new Q3GridLayout( this, 1, 20 ); |
79 | mButtonLayout->setAlignment( Qt::AlignTop ); | 82 | mButtonLayout->setAlignment( Qt::AlignTop ); |
80 | 83 | ||
81 | recreateButtons(); | 84 | recreateButtons(); |
82 | } | 85 | } |
@@ -251,7 +254,7 @@ void JumpButtonBar::sortListLocaleAware( QStringList &list ) | |||
251 | --walkBackIt; | 254 | --walkBackIt; |
252 | } | 255 | } |
253 | } | 256 | } |
254 | 257 | ||
255 | #ifndef KAB_EMBEDDED | 258 | #ifndef KAB_EMBEDDED_ |
256 | #include "jumpbuttonbar.moc" | 259 | #include "moc_jumpbuttonbar.cpp" |
257 | #endif //KAB_EMBEDDED | 260 | #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 | |||
@@ -25,13 +25,16 @@ | |||
25 | #define JUMPBUTTONBAR_H | 25 | #define JUMPBUTTONBAR_H |
26 | 26 | ||
27 | #include <qsizepolicy.h> | 27 | #include <qsizepolicy.h> |
28 | #include <qwidget.h> | 28 | #include <qwidget.h> |
29 | #include <qptrlist.h> | 29 | #include <q3ptrlist.h> |
30 | #include <qstringlist.h> | 30 | #include <qstringlist.h> |
31 | //Added by qt3to4: | ||
32 | #include <QResizeEvent> | ||
33 | #include <Q3GridLayout> | ||
31 | 34 | ||
32 | class QChar; | 35 | class QChar; |
33 | class QGridLayout; | 36 | class Q3GridLayout; |
34 | class QResizeEvent; | 37 | class QResizeEvent; |
35 | class QPushButton; | 38 | class QPushButton; |
36 | class JumpButton; | 39 | class JumpButton; |
37 | 40 | ||
@@ -75,10 +78,10 @@ class JumpButtonBar : public QWidget | |||
75 | void sortListLocaleAware( QStringList &list ); | 78 | void sortListLocaleAware( QStringList &list ); |
76 | 79 | ||
77 | KABCore *mCore; | 80 | KABCore *mCore; |
78 | 81 | ||
79 | QGridLayout *mButtonLayout; | 82 | Q3GridLayout *mButtonLayout; |
80 | QStringList mCharacters; | 83 | QStringList mCharacters; |
81 | QPtrList<JumpButton> mButtons; | 84 | Q3PtrList<JumpButton> mButtons; |
82 | }; | 85 | }; |
83 | 86 | ||
84 | #endif | 87 | #endif |
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index ab2824c..03b44d1 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -38,20 +38,30 @@ $Id$ | |||
38 | #include <qregexp.h> | 38 | #include <qregexp.h> |
39 | #include <qlineedit.h> | 39 | #include <qlineedit.h> |
40 | #include <qcheckbox.h> | 40 | #include <qcheckbox.h> |
41 | #include <qpushbutton.h> | 41 | #include <qpushbutton.h> |
42 | #include <qprogressbar.h> | 42 | #include <q3progressbar.h> |
43 | #include <QDesktopWidget> | ||
44 | //Added by qt3to4: | ||
45 | #include <QResizeEvent> | ||
46 | #include <QPixmap> | ||
47 | #include <Q3ValueList> | ||
48 | #include <Q3HBoxLayout> | ||
49 | #include <Q3VBoxLayout> | ||
50 | #include <Q3CString> | ||
51 | #include <Q3PopupMenu> | ||
52 | #include <Q3PtrList> | ||
43 | #include <libkdepim/phoneaccess.h> | 53 | #include <libkdepim/phoneaccess.h> |
44 | 54 | ||
45 | #ifndef KAB_EMBEDDED | 55 | #ifndef KAB_EMBEDDED |
46 | #include <qclipboard.h> | 56 | #include <qclipboard.h> |
47 | #include <qdir.h> | 57 | #include <qdir.h> |
48 | #include <qfile.h> | 58 | #include <qfile.h> |
49 | #include <qapplicaton.h> | 59 | #include <qapplicaton.h> |
50 | #include <qprogressbar.h> | 60 | #include <q3progressbar.h> |
51 | #include <qlayout.h> | 61 | #include <qlayout.h> |
52 | #include <qregexp.h> | 62 | #include <qregexp.h> |
53 | #include <qvbox.h> | 63 | #include <q3vbox.h> |
54 | #include <kabc/addresseelist.h> | 64 | #include <kabc/addresseelist.h> |
55 | #include <kabc/errorhandler.h> | 65 | #include <kabc/errorhandler.h> |
56 | #include <kabc/resource.h> | 66 | #include <kabc/resource.h> |
57 | #include <kabc/vcardconverter.h> | 67 | #include <kabc/vcardconverter.h> |
@@ -87,9 +97,9 @@ $Id$ | |||
87 | #include "addresseedialog.h" | 97 | #include "addresseedialog.h" |
88 | //US | 98 | //US |
89 | #include <addresseeview.h> | 99 | #include <addresseeview.h> |
90 | 100 | ||
91 | #include <qapp.h> | 101 | #include <qapplication.h> |
92 | #include <qmenubar.h> | 102 | #include <qmenubar.h> |
93 | //#include <qtoolbar.h> | 103 | //#include <qtoolbar.h> |
94 | #include <qmessagebox.h> | 104 | #include <qmessagebox.h> |
95 | #include <kdebug.h> | 105 | #include <kdebug.h> |
@@ -128,14 +138,14 @@ $Id$ | |||
128 | //US#include <qsplitter.h> | 138 | //US#include <qsplitter.h> |
129 | #include <qmap.h> | 139 | #include <qmap.h> |
130 | #include <qdir.h> | 140 | #include <qdir.h> |
131 | #include <qfile.h> | 141 | #include <qfile.h> |
132 | #include <qvbox.h> | 142 | #include <q3vbox.h> |
133 | #include <qlayout.h> | 143 | #include <qlayout.h> |
134 | #include <qclipboard.h> | 144 | #include <qclipboard.h> |
135 | #include <qtextstream.h> | 145 | #include <q3textstream.h> |
136 | #include <qradiobutton.h> | 146 | #include <qradiobutton.h> |
137 | #include <qbuttongroup.h> | 147 | #include <q3buttongroup.h> |
138 | 148 | ||
139 | #include <libkdepim/categoryselectdialog.h> | 149 | #include <libkdepim/categoryselectdialog.h> |
140 | #include <libkdepim/categoryeditdialog.h> | 150 | #include <libkdepim/categoryeditdialog.h> |
141 | #include <kabc/vcardconverter.h> | 151 | #include <kabc/vcardconverter.h> |
@@ -174,14 +184,14 @@ class KABCatPrefs : public QDialog | |||
174 | KABCatPrefs( QWidget *parent=0, const char *name=0 ) : | 184 | KABCatPrefs( QWidget *parent=0, const char *name=0 ) : |
175 | QDialog( parent, name, true ) | 185 | QDialog( parent, name, true ) |
176 | { | 186 | { |
177 | setCaption( i18n("Manage new Categories") ); | 187 | setCaption( i18n("Manage new Categories") ); |
178 | QVBoxLayout* lay = new QVBoxLayout( this ); | 188 | Q3VBoxLayout* lay = new Q3VBoxLayout( this ); |
179 | lay->setSpacing( 3 ); | 189 | lay->setSpacing( 3 ); |
180 | lay->setMargin( 3 ); | 190 | lay->setMargin( 3 ); |
181 | QLabel * lab = new QLabel( i18n("After importing/loading/syncing\nthere may be new categories in\naddressees\nwhich are not in the category list.\nPlease choose what to do:\n "), this ); | 191 | QLabel * lab = new QLabel( i18n("After importing/loading/syncing\nthere may be new categories in\naddressees\nwhich are not in the category list.\nPlease choose what to do:\n "), this ); |
182 | lay->addWidget( lab ); | 192 | lay->addWidget( lab ); |
183 | QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this ); | 193 | Q3ButtonGroup* format = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("New categories not in list:"), this ); |
184 | lay->addWidget( format ); | 194 | lay->addWidget( format ); |
185 | format->setExclusive ( true ) ; | 195 | format->setExclusive ( true ) ; |
186 | addCatBut = new QRadioButton(i18n("Add to category list"), format ); | 196 | addCatBut = new QRadioButton(i18n("Add to category list"), format ); |
187 | new QRadioButton(i18n("Remove from addressees"), format ); | 197 | new QRadioButton(i18n("Remove from addressees"), format ); |
@@ -206,14 +216,14 @@ class KABFormatPrefs : public QDialog | |||
206 | KABFormatPrefs( QWidget *parent=0, const char *name=0 ) : | 216 | KABFormatPrefs( QWidget *parent=0, const char *name=0 ) : |
207 | QDialog( parent, name, true ) | 217 | QDialog( parent, name, true ) |
208 | { | 218 | { |
209 | setCaption( i18n("Set formatted name") ); | 219 | setCaption( i18n("Set formatted name") ); |
210 | QVBoxLayout* lay = new QVBoxLayout( this ); | 220 | Q3VBoxLayout* lay = new Q3VBoxLayout( this ); |
211 | lay->setSpacing( 3 ); | 221 | lay->setSpacing( 3 ); |
212 | lay->setMargin( 3 ); | 222 | lay->setMargin( 3 ); |
213 | QLabel * lab = new QLabel( i18n("You can set the formatted name\nfor a list of contacts in one go."), this ); | 223 | QLabel * lab = new QLabel( i18n("You can set the formatted name\nfor a list of contacts in one go."), this ); |
214 | lay->addWidget( lab ); | 224 | lay->addWidget( lab ); |
215 | QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("Set formatted name to:"), this ); | 225 | Q3ButtonGroup* format = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("Set formatted name to:"), this ); |
216 | lay->addWidget( format ); | 226 | lay->addWidget( format ); |
217 | format->setExclusive ( true ) ; | 227 | format->setExclusive ( true ) ; |
218 | simple = new QRadioButton(i18n("Simple: James Bond"), format ); | 228 | simple = new QRadioButton(i18n("Simple: James Bond"), format ); |
219 | full = new QRadioButton(i18n("Full: Mr. James 007 Bond I"), format ); | 229 | full = new QRadioButton(i18n("Full: Mr. James 007 Bond I"), format ); |
@@ -244,31 +254,31 @@ class KAex2phonePrefs : public QDialog | |||
244 | KAex2phonePrefs( QWidget *parent=0, const char *name=0 ) : | 254 | KAex2phonePrefs( QWidget *parent=0, const char *name=0 ) : |
245 | QDialog( parent, name, true ) | 255 | QDialog( parent, name, true ) |
246 | { | 256 | { |
247 | setCaption( i18n("Export to phone options") ); | 257 | setCaption( i18n("Export to phone options") ); |
248 | QVBoxLayout* lay = new QVBoxLayout( this ); | 258 | Q3VBoxLayout* lay = new Q3VBoxLayout( this ); |
249 | lay->setSpacing( 3 ); | 259 | lay->setSpacing( 3 ); |
250 | lay->setMargin( 3 ); | 260 | lay->setMargin( 3 ); |
251 | QLabel *lab; | 261 | QLabel *lab; |
252 | lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) ); | 262 | lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) ); |
253 | lab->setAlignment (AlignHCenter ); | 263 | lab->setAlignment (Qt::AlignHCenter ); |
254 | QHBox* temphb; | 264 | Q3HBox* temphb; |
255 | temphb = new QHBox( this ); | 265 | temphb = new Q3HBox( this ); |
256 | new QLabel( i18n("I/O device: "), temphb ); | 266 | new QLabel( i18n("I/O device: "), temphb ); |
257 | mPhoneDevice = new QLineEdit( temphb); | 267 | mPhoneDevice = new QLineEdit( temphb); |
258 | lay->addWidget( temphb ); | 268 | lay->addWidget( temphb ); |
259 | temphb = new QHBox( this ); | 269 | temphb = new Q3HBox( this ); |
260 | new QLabel( i18n("Connection: "), temphb ); | 270 | new QLabel( i18n("Connection: "), temphb ); |
261 | mPhoneConnection = new QLineEdit( temphb); | 271 | mPhoneConnection = new QLineEdit( temphb); |
262 | lay->addWidget( temphb ); | 272 | lay->addWidget( temphb ); |
263 | temphb = new QHBox( this ); | 273 | temphb = new Q3HBox( this ); |
264 | new QLabel( i18n("Model(opt.): "), temphb ); | 274 | new QLabel( i18n("Model(opt.): "), temphb ); |
265 | mPhoneModel = new QLineEdit( temphb); | 275 | mPhoneModel = new QLineEdit( temphb); |
266 | lay->addWidget( temphb ); | 276 | lay->addWidget( temphb ); |
267 | // mWriteToSim = new QCheckBox( i18n("Write Contacts to SIM card\n(if not, write to phone memory)"), this ); | 277 | // mWriteToSim = new QCheckBox( i18n("Write Contacts to SIM card\n(if not, write to phone memory)"), this ); |
268 | // lay->addWidget( mWriteToSim ); | 278 | // lay->addWidget( mWriteToSim ); |
269 | lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ncontact data on phone!"), this ) ); | 279 | lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ncontact data on phone!"), this ) ); |
270 | lab->setAlignment (AlignHCenter); | 280 | lab->setAlignment (Qt::AlignHCenter); |
271 | QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); | 281 | QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); |
272 | lay->addWidget( ok ); | 282 | lay->addWidget( ok ); |
273 | QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); | 283 | QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); |
274 | lay->addWidget( cancel ); | 284 | lay->addWidget( cancel ); |
@@ -406,9 +416,9 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const | |||
406 | // we have a toolbar repainting error on the Zaurus when starting KA/Pi | 416 | // we have a toolbar repainting error on the Zaurus when starting KA/Pi |
407 | //QTimer::singleShot( 10, this , SLOT ( updateToolBar())); | 417 | //QTimer::singleShot( 10, this , SLOT ( updateToolBar())); |
408 | QTimer::singleShot( 100, this, SLOT ( loadDataAfterStart() )); | 418 | QTimer::singleShot( 100, this, SLOT ( loadDataAfterStart() )); |
409 | } | 419 | } |
410 | void KABCore::receiveStart( const QCString& cmsg, const QByteArray& data ) | 420 | void KABCore::receiveStart( const Q3CString& cmsg, const QByteArray& data ) |
411 | { | 421 | { |
412 | //qDebug("KO: QCOP start message received: %s ", cmsg.data() ); | 422 | //qDebug("KO: QCOP start message received: %s ", cmsg.data() ); |
413 | mCStringMess = cmsg; | 423 | mCStringMess = cmsg; |
414 | mByteData = data; | 424 | mByteData = data; |
@@ -420,11 +430,11 @@ void KABCore::loadDataAfterStart() | |||
420 | ((StdAddressBook*)mAddressBook)->init( true ); | 430 | ((StdAddressBook*)mAddressBook)->init( true ); |
421 | mViewManager->refreshView(); | 431 | mViewManager->refreshView(); |
422 | 432 | ||
423 | #ifndef DESKTOP_VERSION | 433 | #ifndef DESKTOP_VERSION |
424 | disconnect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT (receiveStart ( const QCString &, const QByteArray & ))); | 434 | disconnect(qApp, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )), this, SLOT (receiveStart ( const Q3CString &, const QByteArray & ))); |
425 | 435 | ||
426 | QObject::connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); | 436 | QObject::connect(qApp, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const Q3CString &, const QByteArray & ))); |
427 | if ( !mCStringMess.isEmpty() ) | 437 | if ( !mCStringMess.isEmpty() ) |
428 | ExternalAppHandler::instance()->appMessage( mCStringMess, mByteData ); | 438 | ExternalAppHandler::instance()->appMessage( mCStringMess, mByteData ); |
429 | #endif | 439 | #endif |
430 | // QTimer::singleShot( 10, this , SLOT ( updateToolBar())); | 440 | // QTimer::singleShot( 10, this , SLOT ( updateToolBar())); |
@@ -452,13 +462,13 @@ KABCore::~KABCore() | |||
452 | if ( infrared ) | 462 | if ( infrared ) |
453 | delete infrared; | 463 | delete infrared; |
454 | #endif | 464 | #endif |
455 | } | 465 | } |
456 | void KABCore::receive( const QCString& cmsg, const QByteArray& data ) | 466 | void KABCore::receive( const Q3CString& cmsg, const QByteArray& data ) |
457 | { | 467 | { |
458 | //qDebug("KA: QCOP message received: %s ", cmsg.data() ); | 468 | //qDebug("KA: QCOP message received: %s ", cmsg.data() ); |
459 | if ( cmsg == "setDocument(QString)" ) { | 469 | if ( cmsg == "setDocument(QString)" ) { |
460 | QDataStream stream( data, IO_ReadOnly ); | 470 | QDataStream stream( const_cast<QByteArray*>(&data), QIODevice::ReadOnly ); |
461 | QString fileName; | 471 | QString fileName; |
462 | stream >> fileName; | 472 | stream >> fileName; |
463 | recieve( fileName ); | 473 | recieve( fileName ); |
464 | return; | 474 | return; |
@@ -479,9 +489,9 @@ void KABCore::toggleBeamReceive( ) | |||
479 | qDebug("KA: AB enable BeamReceive "); | 489 | qDebug("KA: AB enable BeamReceive "); |
480 | mActionBR->setChecked(true); | 490 | mActionBR->setChecked(true); |
481 | 491 | ||
482 | infrared = new QCopChannel("QPE/Application/addressbook",this, "channelAB" ) ; | 492 | infrared = new QCopChannel("QPE/Application/addressbook",this, "channelAB" ) ; |
483 | QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(receive( const QCString&, const QByteArray& ))); | 493 | QObject::connect( infrared, SIGNAL (received ( const Q3CString &, const QByteArray & )),this, SLOT(receive( const Q3CString&, const QByteArray& ))); |
484 | #endif | 494 | #endif |
485 | } | 495 | } |
486 | 496 | ||
487 | 497 | ||
@@ -559,9 +569,9 @@ void KABCore::restoreSettings() | |||
559 | int wid = QApplication::desktop()->width(); | 569 | int wid = QApplication::desktop()->width(); |
560 | if ( wid < 640 ) | 570 | if ( wid < 640 ) |
561 | wid = QApplication::desktop()->height(); | 571 | wid = QApplication::desktop()->height(); |
562 | #endif | 572 | #endif |
563 | QValueList<int> splitterSize;// = KABPrefs::instance()->mDetailsSplitter; | 573 | Q3ValueList<int> splitterSize;// = KABPrefs::instance()->mDetailsSplitter; |
564 | if ( true /*splitterSize.count() == 0*/ ) { | 574 | if ( true /*splitterSize.count() == 0*/ ) { |
565 | splitterSize.append( wid / 2 ); | 575 | splitterSize.append( wid / 2 ); |
566 | splitterSize.append( wid / 2 ); | 576 | splitterSize.append( wid / 2 ); |
567 | } | 577 | } |
@@ -649,12 +659,12 @@ QStringList KABCore::selectedUIDs() const | |||
649 | } | 659 | } |
650 | 660 | ||
651 | KABC::Resource *KABCore::requestResource( QWidget *parent ) | 661 | KABC::Resource *KABCore::requestResource( QWidget *parent ) |
652 | { | 662 | { |
653 | QPtrList<KABC::Resource> kabcResources = addressBook()->resources(); | 663 | Q3PtrList<KABC::Resource> kabcResources = addressBook()->resources(); |
654 | 664 | ||
655 | QPtrList<KRES::Resource> kresResources; | 665 | Q3PtrList<KRES::Resource> kresResources; |
656 | QPtrListIterator<KABC::Resource> resIt( kabcResources ); | 666 | Q3PtrListIterator<KABC::Resource> resIt( kabcResources ); |
657 | KABC::Resource *resource; | 667 | KABC::Resource *resource; |
658 | while ( ( resource = resIt.current() ) != 0 ) { | 668 | while ( ( resource = resIt.current() ) != 0 ) { |
659 | ++resIt; | 669 | ++resIt; |
660 | if ( !resource->readOnly() ) { | 670 | if ( !resource->readOnly() ) { |
@@ -794,16 +804,16 @@ void KABCore::mailVCard( const QStringList& uids ) | |||
794 | QString fileName = dirName + "/" + name; | 804 | QString fileName = dirName + "/" + name; |
795 | 805 | ||
796 | QFile outFile(fileName); | 806 | QFile outFile(fileName); |
797 | 807 | ||
798 | if ( outFile.open(IO_WriteOnly) ) { // file opened successfully | 808 | if ( outFile.open(QIODevice::WriteOnly) ) { // file opened successfully |
799 | KABC::VCardConverter converter; | 809 | KABC::VCardConverter converter; |
800 | QString vcard; | 810 | QString vcard; |
801 | 811 | ||
802 | converter.addresseeToVCard( a, vcard ); | 812 | converter.addresseeToVCard( a, vcard ); |
803 | 813 | ||
804 | QTextStream t( &outFile ); // use a text stream | 814 | Q3TextStream t( &outFile ); // use a text stream |
805 | t.setEncoding( QTextStream::UnicodeUTF8 ); | 815 | t.setEncoding( Q3TextStream::UnicodeUTF8 ); |
806 | t << vcard; | 816 | t << vcard; |
807 | 817 | ||
808 | outFile.close(); | 818 | outFile.close(); |
809 | 819 | ||
@@ -1015,13 +1025,13 @@ void KABCore::beamVCard(const QStringList& uids) | |||
1015 | datastream += vcard.mid( start,vcard.length() ); | 1025 | datastream += vcard.mid( start,vcard.length() ); |
1016 | } | 1026 | } |
1017 | #ifndef DESKTOP_VERSION | 1027 | #ifndef DESKTOP_VERSION |
1018 | QFile outFile(fileName); | 1028 | QFile outFile(fileName); |
1019 | if ( outFile.open(IO_WriteOnly) ) { | 1029 | if ( outFile.open(QIODevice::WriteOnly) ) { |
1020 | datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" ); | 1030 | datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" ); |
1021 | QTextStream t( &outFile ); // use a text stream | 1031 | Q3TextStream t( &outFile ); // use a text stream |
1022 | //t.setEncoding( QTextStream::UnicodeUTF8 ); | 1032 | //t.setEncoding( QTextStream::UnicodeUTF8 ); |
1023 | t.setEncoding( QTextStream::Latin1 ); | 1033 | t.setEncoding( Q3TextStream::Latin1 ); |
1024 | t <<datastream.latin1(); | 1034 | t <<datastream.latin1(); |
1025 | outFile.close(); | 1035 | outFile.close(); |
1026 | Ir *ir = new Ir( this ); | 1036 | Ir *ir = new Ir( this ); |
1027 | connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) ); | 1037 | connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) ); |
@@ -1296,12 +1306,12 @@ void KABCore::addrModified( const KABC::Addressee &addr ,bool updateDetails ) | |||
1296 | void KABCore::newContact() | 1306 | void KABCore::newContact() |
1297 | { | 1307 | { |
1298 | 1308 | ||
1299 | 1309 | ||
1300 | QPtrList<KABC::Resource> kabcResources = mAddressBook->resources(); | 1310 | Q3PtrList<KABC::Resource> kabcResources = mAddressBook->resources(); |
1301 | 1311 | ||
1302 | QPtrList<KRES::Resource> kresResources; | 1312 | Q3PtrList<KRES::Resource> kresResources; |
1303 | QPtrListIterator<KABC::Resource> it( kabcResources ); | 1313 | Q3PtrListIterator<KABC::Resource> it( kabcResources ); |
1304 | KABC::Resource *resource; | 1314 | KABC::Resource *resource; |
1305 | while ( ( resource = it.current() ) != 0 ) { | 1315 | while ( ( resource = it.current() ) != 0 ) { |
1306 | ++it; | 1316 | ++it; |
1307 | if ( !resource->readOnly() ) { | 1317 | if ( !resource->readOnly() ) { |
@@ -1855,17 +1865,17 @@ void KABCore::slotEditorDestroyed( const QString &uid ) | |||
1855 | 1865 | ||
1856 | void KABCore::initGUI() | 1866 | void KABCore::initGUI() |
1857 | { | 1867 | { |
1858 | #ifndef KAB_EMBEDDED | 1868 | #ifndef KAB_EMBEDDED |
1859 | QHBoxLayout *topLayout = new QHBoxLayout( this ); | 1869 | Q3HBoxLayout *topLayout = new Q3HBoxLayout( this ); |
1860 | topLayout->setSpacing( KDialogBase::spacingHint() ); | 1870 | topLayout->setSpacing( KDialogBase::spacingHint() ); |
1861 | 1871 | ||
1862 | mExtensionBarSplitter = new QSplitter( this ); | 1872 | mExtensionBarSplitter = new QSplitter( this ); |
1863 | mExtensionBarSplitter->setOrientation( Qt::Vertical ); | 1873 | mExtensionBarSplitter->setOrientation( Qt::Vertical ); |
1864 | 1874 | ||
1865 | mDetailsSplitter = new QSplitter( mExtensionBarSplitter ); | 1875 | mDetailsSplitter = new QSplitter( mExtensionBarSplitter ); |
1866 | 1876 | ||
1867 | QVBox *viewSpace = new QVBox( mDetailsSplitter ); | 1877 | Q3VBox *viewSpace = new Q3VBox( mDetailsSplitter ); |
1868 | mIncSearchWidget = new IncSearchWidget( viewSpace ); | 1878 | mIncSearchWidget = new IncSearchWidget( viewSpace ); |
1869 | connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), | 1879 | connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), |
1870 | SLOT( incrementalSearch( const QString& ) ) ); | 1880 | SLOT( incrementalSearch( const QString& ) ) ); |
1871 | 1881 | ||
@@ -1887,30 +1897,30 @@ void KABCore::initGUI() | |||
1887 | 1897 | ||
1888 | #else //KAB_EMBEDDED | 1898 | #else //KAB_EMBEDDED |
1889 | //US initialize viewMenu before settingup viewmanager. | 1899 | //US initialize viewMenu before settingup viewmanager. |
1890 | // Viewmanager needs this menu to plugin submenues. | 1900 | // Viewmanager needs this menu to plugin submenues. |
1891 | viewMenu = new QPopupMenu( this ); | 1901 | viewMenu = new Q3PopupMenu( this ); |
1892 | settingsMenu = new QPopupMenu( this ); | 1902 | settingsMenu = new Q3PopupMenu( this ); |
1893 | //filterMenu = new QPopupMenu( this ); | 1903 | //filterMenu = new QPopupMenu( this ); |
1894 | ImportMenu = new QPopupMenu( this ); | 1904 | ImportMenu = new Q3PopupMenu( this ); |
1895 | ExportMenu = new QPopupMenu( this ); | 1905 | ExportMenu = new Q3PopupMenu( this ); |
1896 | syncMenu = new QPopupMenu( this ); | 1906 | syncMenu = new Q3PopupMenu( this ); |
1897 | changeMenu= new QPopupMenu( this ); | 1907 | changeMenu= new Q3PopupMenu( this ); |
1898 | beamMenu= new QPopupMenu( this ); | 1908 | beamMenu= new Q3PopupMenu( this ); |
1899 | 1909 | ||
1900 | //US since we have no splitter for the embedded system, setup | 1910 | //US since we have no splitter for the embedded system, setup |
1901 | // a layout with two frames. One left and one right. | 1911 | // a layout with two frames. One left and one right. |
1902 | 1912 | ||
1903 | QBoxLayout *topLayout; | 1913 | Q3BoxLayout *topLayout; |
1904 | 1914 | ||
1905 | // = new QHBoxLayout( this ); | 1915 | // = new QHBoxLayout( this ); |
1906 | // QBoxLayout *topLayout = (QBoxLayout*)layout(); | 1916 | // QBoxLayout *topLayout = (QBoxLayout*)layout(); |
1907 | 1917 | ||
1908 | // QWidget *mainBox = new QWidget( this ); | 1918 | // QWidget *mainBox = new QWidget( this ); |
1909 | // QBoxLayout * mainBoxLayout = new QHBoxLayout(mainBox); | 1919 | // QBoxLayout * mainBoxLayout = new QHBoxLayout(mainBox); |
1910 | 1920 | ||
1911 | #ifdef DESKTOP_VERSION | 1921 | #ifdef DESKTOP_VERSION |
1912 | topLayout = new QHBoxLayout( this ); | 1922 | topLayout = new Q3HBoxLayout( this ); |
1913 | 1923 | ||
1914 | 1924 | ||
1915 | mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); | 1925 | mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); |
1916 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); | 1926 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); |
@@ -1923,14 +1933,14 @@ void KABCore::initGUI() | |||
1923 | mDetails = new ViewContainer( mMiniSplitter ); | 1933 | mDetails = new ViewContainer( mMiniSplitter ); |
1924 | mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter ); | 1934 | mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter ); |
1925 | #else | 1935 | #else |
1926 | if ( QApplication::desktop()->width() > 480 ) { | 1936 | if ( QApplication::desktop()->width() > 480 ) { |
1927 | topLayout = new QHBoxLayout( this ); | 1937 | topLayout = new Q3HBoxLayout( this ); |
1928 | mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); | 1938 | mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); |
1929 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); | 1939 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); |
1930 | } else { | 1940 | } else { |
1931 | 1941 | ||
1932 | topLayout = new QHBoxLayout( this ); | 1942 | topLayout = new Q3HBoxLayout( this ); |
1933 | mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Vertical, this); | 1943 | mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Vertical, this); |
1934 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); | 1944 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); |
1935 | } | 1945 | } |
1936 | 1946 | ||
@@ -2033,19 +2043,19 @@ void KABCore::initActions() | |||
2033 | // file menu | 2043 | // file menu |
2034 | 2044 | ||
2035 | mActionMail = KStdAction::mail( this, SLOT( sendMail() ), actionCollection() ); | 2045 | mActionMail = KStdAction::mail( this, SLOT( sendMail() ), actionCollection() ); |
2036 | //mActionPrint = KStdAction::print( this, SLOT( print() ), actionCollection() ); | 2046 | //mActionPrint = KStdAction::print( this, SLOT( print() ), actionCollection() ); |
2037 | mActionPrint = new KAction( i18n( "&Print View" ), "fileprint", CTRL + Key_P, mViewManager, | 2047 | mActionPrint = new KAction( i18n( "&Print View" ), "fileprint", Qt::CTRL + Qt::Key_P, mViewManager, |
2038 | SLOT( printView() ), actionCollection(), "kaddressbook_print" ); | 2048 | SLOT( printView() ), actionCollection(), "kaddressbook_print" ); |
2039 | 2049 | ||
2040 | 2050 | ||
2041 | mActionPrintDetails = new KAction( i18n( "&Print Details" ), "fileprint", 0, mDetails, | 2051 | mActionPrintDetails = new KAction( i18n( "&Print Details" ), "fileprint", 0, mDetails, |
2042 | SLOT( printView() ), actionCollection(), "kaddressbook_print2" ); | 2052 | SLOT( printView() ), actionCollection(), "kaddressbook_print2" ); |
2043 | 2053 | ||
2044 | mActionSave = new KAction( i18n( "&Save" ), "filesave", CTRL+Key_S, this, | 2054 | mActionSave = new KAction( i18n( "&Save" ), "filesave", Qt::CTRL+Qt::Key_S, this, |
2045 | SLOT( save() ), actionCollection(), "file_sync" ); | 2055 | SLOT( save() ), actionCollection(), "file_sync" ); |
2046 | 2056 | ||
2047 | mActionNewContact = new KAction( i18n( "&New Contact..." ), "filenew", CTRL+Key_N, this, | 2057 | mActionNewContact = new KAction( i18n( "&New Contact..." ), "filenew", Qt::CTRL+Qt::Key_N, this, |
2048 | SLOT( newContact() ), actionCollection(), "file_new_contact" ); | 2058 | SLOT( newContact() ), actionCollection(), "file_new_contact" ); |
2049 | 2059 | ||
2050 | mActionMailVCard = new KAction(i18n("Mail &vCard..."), "mail_post_to", 0, | 2060 | mActionMailVCard = new KAction(i18n("Mail &vCard..."), "mail_post_to", 0, |
2051 | this, SLOT( mailVCard() ), | 2061 | this, SLOT( mailVCard() ), |
@@ -2082,24 +2092,24 @@ void KABCore::initActions() | |||
2082 | #endif //KAB_EMBEDDED | 2092 | #endif //KAB_EMBEDDED |
2083 | 2093 | ||
2084 | // edit menu | 2094 | // edit menu |
2085 | if ( mIsPart ) { | 2095 | if ( mIsPart ) { |
2086 | mActionCopy = new KAction( i18n( "&Copy" ), "editcopy", CTRL + Key_C, this, | 2096 | mActionCopy = new KAction( i18n( "&Copy" ), "editcopy", Qt::CTRL + Qt::Key_C, this, |
2087 | SLOT( copyContacts() ), actionCollection(), | 2097 | SLOT( copyContacts() ), actionCollection(), |
2088 | "kaddressbook_copy" ); | 2098 | "kaddressbook_copy" ); |
2089 | mActionCut = new KAction( i18n( "Cu&t" ), "editcut", CTRL + Key_X, this, | 2099 | mActionCut = new KAction( i18n( "Cu&t" ), "editcut", Qt::CTRL + Qt::Key_X, this, |
2090 | SLOT( cutContacts() ), actionCollection(), | 2100 | SLOT( cutContacts() ), actionCollection(), |
2091 | "kaddressbook_cut" ); | 2101 | "kaddressbook_cut" ); |
2092 | mActionPaste = new KAction( i18n( "&Paste" ), "editpaste", CTRL + Key_V, this, | 2102 | mActionPaste = new KAction( i18n( "&Paste" ), "editpaste", Qt::CTRL + Qt::Key_V, this, |
2093 | SLOT( pasteContacts() ), actionCollection(), | 2103 | SLOT( pasteContacts() ), actionCollection(), |
2094 | "kaddressbook_paste" ); | 2104 | "kaddressbook_paste" ); |
2095 | mActionSelectAll = new KAction( i18n( "Select &All" ), CTRL + Key_A, this, | 2105 | mActionSelectAll = new KAction( i18n( "Select &All" ), Qt::CTRL + Qt::Key_A, this, |
2096 | SLOT( selectAllContacts() ), actionCollection(), | 2106 | SLOT( selectAllContacts() ), actionCollection(), |
2097 | "kaddressbook_select_all" ); | 2107 | "kaddressbook_select_all" ); |
2098 | mActionUndo = new KAction( i18n( "&Undo" ), "undo", CTRL + Key_Z, this, | 2108 | mActionUndo = new KAction( i18n( "&Undo" ), "undo", Qt::CTRL + Qt::Key_Z, this, |
2099 | SLOT( undo() ), actionCollection(), | 2109 | SLOT( undo() ), actionCollection(), |
2100 | "kaddressbook_undo" ); | 2110 | "kaddressbook_undo" ); |
2101 | mActionRedo = new KAction( i18n( "Re&do" ), "redo", CTRL + SHIFT + Key_Z, | 2111 | mActionRedo = new KAction( i18n( "Re&do" ), "redo", Qt::CTRL + Qt::SHIFT + Qt::Key_Z, |
2102 | this, SLOT( redo() ), actionCollection(), | 2112 | this, SLOT( redo() ), actionCollection(), |
2103 | "kaddressbook_redo" ); | 2113 | "kaddressbook_redo" ); |
2104 | } else { | 2114 | } else { |
2105 | mActionCopy = KStdAction::copy( this, SLOT( copyContacts() ), actionCollection() ); | 2115 | mActionCopy = KStdAction::copy( this, SLOT( copyContacts() ), actionCollection() ); |
@@ -2110,9 +2120,9 @@ void KABCore::initActions() | |||
2110 | mActionRedo = KStdAction::redo( this, SLOT( redo() ), actionCollection() ); | 2120 | mActionRedo = KStdAction::redo( this, SLOT( redo() ), actionCollection() ); |
2111 | } | 2121 | } |
2112 | 2122 | ||
2113 | mActionDelete = new KAction( i18n( "&Delete Contact" ), "editdelete", | 2123 | mActionDelete = new KAction( i18n( "&Delete Contact" ), "editdelete", |
2114 | Key_Delete, this, SLOT( deleteContacts() ), | 2124 | Qt::Key_Delete, this, SLOT( deleteContacts() ), |
2115 | actionCollection(), "edit_delete" ); | 2125 | actionCollection(), "edit_delete" ); |
2116 | 2126 | ||
2117 | mActionUndo->setEnabled( false ); | 2127 | mActionUndo->setEnabled( false ); |
2118 | mActionRedo->setEnabled( false ); | 2128 | mActionRedo->setEnabled( false ); |
@@ -2245,11 +2255,11 @@ void KABCore::addActionsManually() | |||
2245 | { | 2255 | { |
2246 | //US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); | 2256 | //US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); |
2247 | 2257 | ||
2248 | #ifdef KAB_EMBEDDED | 2258 | #ifdef KAB_EMBEDDED |
2249 | QPopupMenu *fileMenu = new QPopupMenu( this ); | 2259 | Q3PopupMenu *fileMenu = new Q3PopupMenu( this ); |
2250 | QPopupMenu *editMenu = new QPopupMenu( this ); | 2260 | Q3PopupMenu *editMenu = new Q3PopupMenu( this ); |
2251 | QPopupMenu *helpMenu = new QPopupMenu( this ); | 2261 | Q3PopupMenu *helpMenu = new Q3PopupMenu( this ); |
2252 | 2262 | ||
2253 | KToolBar* tb = mMainWindow->toolBar(); | 2263 | KToolBar* tb = mMainWindow->toolBar(); |
2254 | mMainWindow->setToolBarsMovable (false ); | 2264 | mMainWindow->setToolBarsMovable (false ); |
2255 | #ifndef DESKTOP_VERSION | 2265 | #ifndef DESKTOP_VERSION |
@@ -2275,9 +2285,9 @@ void KABCore::addActionsManually() | |||
2275 | #ifndef DESKTOP_VERSION | 2285 | #ifndef DESKTOP_VERSION |
2276 | } else { | 2286 | } else { |
2277 | //US setup toolbar | 2287 | //US setup toolbar |
2278 | QPEMenuBar *menuBarTB = new QPEMenuBar( tb ); | 2288 | QPEMenuBar *menuBarTB = new QPEMenuBar( tb ); |
2279 | QPopupMenu *popupBarTB = new QPopupMenu( this ); | 2289 | Q3PopupMenu *popupBarTB = new Q3PopupMenu( this ); |
2280 | menuBarTB->insertItem( SmallIcon( "z_menu" ) , popupBarTB); | 2290 | menuBarTB->insertItem( SmallIcon( "z_menu" ) , popupBarTB); |
2281 | tb->insertWidget(-1, 0, menuBarTB); | 2291 | tb->insertWidget(-1, 0, menuBarTB); |
2282 | mIncSearchWidget = new IncSearchWidget( tb ); | 2292 | mIncSearchWidget = new IncSearchWidget( tb ); |
2283 | tb->enableMoving(false); | 2293 | tb->enableMoving(false); |
@@ -2630,9 +2640,9 @@ void KABCore::configureKeyBindings() | |||
2630 | 2640 | ||
2631 | #ifdef KAB_EMBEDDED | 2641 | #ifdef KAB_EMBEDDED |
2632 | void KABCore::configureResources() | 2642 | void KABCore::configureResources() |
2633 | { | 2643 | { |
2634 | KRES::KCMKResources dlg( this, "" , 0 ); | 2644 | KRES::KCMKResources dlg( this, "" , QStringList() ); |
2635 | 2645 | ||
2636 | if ( !dlg.exec() ) | 2646 | if ( !dlg.exec() ) |
2637 | return; | 2647 | return; |
2638 | KMessageBox::information( this, i18n("Please restart to get the \nchanged resources (re)loaded!\n") ); | 2648 | KMessageBox::information( this, i18n("Please restart to get the \nchanged resources (re)loaded!\n") ); |
@@ -2726,9 +2736,9 @@ void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString | |||
2726 | int count = 0; | 2736 | int count = 0; |
2727 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { | 2737 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { |
2728 | ++count; | 2738 | ++count; |
2729 | } | 2739 | } |
2730 | QProgressBar bar(count,0 ); | 2740 | Q3ProgressBar bar(count,0 ); |
2731 | int w = 300; | 2741 | int w = 300; |
2732 | if ( QApplication::desktop()->width() < 320 ) | 2742 | if ( QApplication::desktop()->width() < 320 ) |
2733 | w = 220; | 2743 | w = 220; |
2734 | int h = bar.sizeHint().height() ; | 2744 | int h = bar.sizeHint().height() ; |
@@ -2907,9 +2917,9 @@ KABC::Addressee KABCore::getLastSyncAddressee() | |||
2907 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) | 2917 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) |
2908 | sum = "E: "; | 2918 | sum = "E: "; |
2909 | lse.setFamilyName("!"+sum+mCurrentSyncDevice + i18n(" - sync event")); | 2919 | lse.setFamilyName("!"+sum+mCurrentSyncDevice + i18n(" - sync event")); |
2910 | lse.setRevision( mLastAddressbookSync ); | 2920 | lse.setRevision( mLastAddressbookSync ); |
2911 | lse.setCategories( i18n("SyncEvent") ); | 2921 | lse.setCategories( QStringList(i18n("SyncEvent")) ); |
2912 | mAddressBook->insertAddressee( lse ); | 2922 | mAddressBook->insertAddressee( lse ); |
2913 | } | 2923 | } |
2914 | return lse; | 2924 | return lse; |
2915 | } | 2925 | } |
@@ -3098,9 +3108,9 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo | |||
3098 | addresseeRSync = newAdd; | 3108 | addresseeRSync = newAdd; |
3099 | addresseeRSync.setFamilyName(mCurrentSyncName + i18n(" - sync addressee")); | 3109 | addresseeRSync.setFamilyName(mCurrentSyncName + i18n(" - sync addressee")); |
3100 | addresseeRSync.setUid("last-syncAddressee-"+mCurrentSyncName ); | 3110 | addresseeRSync.setUid("last-syncAddressee-"+mCurrentSyncName ); |
3101 | addresseeRSync.setRevision( mLastAddressbookSync ); | 3111 | addresseeRSync.setRevision( mLastAddressbookSync ); |
3102 | addresseeRSync.setCategories( i18n("SyncAddressee") ); | 3112 | addresseeRSync.setCategories( QStringList(i18n("SyncAddressee")) ); |
3103 | } | 3113 | } |
3104 | } | 3114 | } |
3105 | if ( addresseeLSync.revision() == mLastAddressbookSync ) { | 3115 | if ( addresseeLSync.revision() == mLastAddressbookSync ) { |
3106 | // qDebug("FULLDATE 2"); | 3116 | // qDebug("FULLDATE 2"); |
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h index ec6a9ec..4351720 100644 --- a/kaddressbook/kabcore.h +++ b/kaddressbook/kabcore.h | |||
@@ -27,13 +27,17 @@ | |||
27 | #include <kabc/field.h> | 27 | #include <kabc/field.h> |
28 | 28 | ||
29 | #ifndef KAB_EMBEDDED | 29 | #ifndef KAB_EMBEDDED |
30 | #endif //KAB_EMBEDDED | 30 | #endif //KAB_EMBEDDED |
31 | #include <qdict.h> | 31 | #include <q3dict.h> |
32 | #include <qtimer.h> | 32 | #include <qtimer.h> |
33 | 33 | ||
34 | #include <qwidget.h> | 34 | #include <qwidget.h> |
35 | #include <qpopupmenu.h> | 35 | #include <q3popupmenu.h> |
36 | //Added by qt3to4: | ||
37 | #include <Q3CString> | ||
38 | #include <QPixmap> | ||
39 | #include <QResizeEvent> | ||
36 | #include <ksyncmanager.h> | 40 | #include <ksyncmanager.h> |
37 | #ifndef DESKTOP_VERSION | 41 | #ifndef DESKTOP_VERSION |
38 | #include <qcopchannel_qws.h> | 42 | #include <qcopchannel_qws.h> |
39 | #endif | 43 | #endif |
@@ -84,11 +88,11 @@ class KABCore : public QWidget, public KSyncInterface | |||
84 | 88 | ||
85 | 89 | ||
86 | #ifdef KAB_EMBEDDED | 90 | #ifdef KAB_EMBEDDED |
87 | //US added functionality | 91 | //US added functionality |
88 | QPopupMenu* getViewMenu() {return viewMenu;} | 92 | Q3PopupMenu* getViewMenu() {return viewMenu;} |
89 | QPopupMenu* getFilterMenu() {return filterMenu;} | 93 | Q3PopupMenu* getFilterMenu() {return filterMenu;} |
90 | QPopupMenu* getSettingsMenu() {return settingsMenu;} | 94 | Q3PopupMenu* getSettingsMenu() {return settingsMenu;} |
91 | void addActionsManually(); | 95 | void addActionsManually(); |
92 | #endif //KAB_EMBEDDED | 96 | #endif //KAB_EMBEDDED |
93 | /** | 97 | /** |
94 | Restores the global settings. | 98 | Restores the global settings. |
@@ -134,10 +138,10 @@ class KABCore : public QWidget, public KSyncInterface | |||
134 | static KAboutData *createAboutData(); | 138 | static KAboutData *createAboutData(); |
135 | #endif //KAB_EMBEDDED | 139 | #endif //KAB_EMBEDDED |
136 | 140 | ||
137 | #ifdef KAB_EMBEDDED | 141 | #ifdef KAB_EMBEDDED |
138 | inline QPopupMenu* getImportMenu() { return ImportMenu;} | 142 | inline Q3PopupMenu* getImportMenu() { return ImportMenu;} |
139 | inline QPopupMenu* getExportMenu() { return ExportMenu;} | 143 | inline Q3PopupMenu* getExportMenu() { return ExportMenu;} |
140 | #endif //KAB_EMBEDDED | 144 | #endif //KAB_EMBEDDED |
141 | 145 | ||
142 | public slots: | 146 | public slots: |
143 | #ifdef KAB_EMBEDDED | 147 | #ifdef KAB_EMBEDDED |
@@ -365,10 +369,10 @@ class KABCore : public QWidget, public KSyncInterface | |||
365 | 369 | ||
366 | private slots: | 370 | private slots: |
367 | void updateToolBar(); | 371 | void updateToolBar(); |
368 | void updateMainWindow(); | 372 | void updateMainWindow(); |
369 | void receive( const QCString& cmsg, const QByteArray& data ); | 373 | void receive( const Q3CString& cmsg, const QByteArray& data ); |
370 | void receiveStart( const QCString& cmsg, const QByteArray& data ); | 374 | void receiveStart( const Q3CString& cmsg, const QByteArray& data ); |
371 | void toggleBeamReceive( ); | 375 | void toggleBeamReceive( ); |
372 | void disableBR(bool); | 376 | void disableBR(bool); |
373 | void setJumpButtonBarVisible( bool visible ); | 377 | void setJumpButtonBarVisible( bool visible ); |
374 | void setJumpButtonBar( bool visible ); | 378 | void setJumpButtonBar( bool visible ); |
@@ -393,9 +397,9 @@ class KABCore : public QWidget, public KSyncInterface | |||
393 | void configurationChanged(); | 397 | void configurationChanged(); |
394 | void addressBookChanged(); | 398 | void addressBookChanged(); |
395 | 399 | ||
396 | private: | 400 | private: |
397 | QCString mCStringMess; | 401 | Q3CString mCStringMess; |
398 | QByteArray mByteData; | 402 | QByteArray mByteData; |
399 | QString mEmailSourceChannel; | 403 | QString mEmailSourceChannel; |
400 | QString mEmailSourceUID; | 404 | QString mEmailSourceUID; |
401 | void resizeEvent(QResizeEvent* e ); | 405 | void resizeEvent(QResizeEvent* e ); |
@@ -485,16 +489,16 @@ class KABCore : public QWidget, public KSyncInterface | |||
485 | KAction *mActionMultiSyncHowto; | 489 | KAction *mActionMultiSyncHowto; |
486 | 490 | ||
487 | KAction *mActionDeleteView; | 491 | KAction *mActionDeleteView; |
488 | 492 | ||
489 | QPopupMenu *viewMenu; | 493 | Q3PopupMenu *viewMenu; |
490 | QPopupMenu *filterMenu; | 494 | Q3PopupMenu *filterMenu; |
491 | QPopupMenu *settingsMenu; | 495 | Q3PopupMenu *settingsMenu; |
492 | QPopupMenu *changeMenu; | 496 | Q3PopupMenu *changeMenu; |
493 | QPopupMenu *beamMenu; | 497 | Q3PopupMenu *beamMenu; |
494 | //US QAction *mActionSave; | 498 | //US QAction *mActionSave; |
495 | QPopupMenu *ImportMenu; | 499 | Q3PopupMenu *ImportMenu; |
496 | QPopupMenu *ExportMenu; | 500 | Q3PopupMenu *ExportMenu; |
497 | //LR additional methods | 501 | //LR additional methods |
498 | KAction *mActionRemoveVoice; | 502 | KAction *mActionRemoveVoice; |
499 | KAction *mActionSetFormattedName; | 503 | KAction *mActionSetFormattedName; |
500 | KAction * mActionImportOL; | 504 | KAction * mActionImportOL; |
@@ -523,9 +527,9 @@ class KABCore : public QWidget, public KSyncInterface | |||
523 | 527 | ||
524 | // LR ******************************* | 528 | // LR ******************************* |
525 | // sync stuff! | 529 | // sync stuff! |
526 | QString sentSyncFile(); | 530 | QString sentSyncFile(); |
527 | QPopupMenu *syncMenu; | 531 | Q3PopupMenu *syncMenu; |
528 | KSyncManager* syncManager; | 532 | KSyncManager* syncManager; |
529 | int mGlobalSyncMode; | 533 | int mGlobalSyncMode; |
530 | bool synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode); | 534 | bool synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode); |
531 | KABC::Addressee getLastSyncAddressee(); | 535 | KABC::Addressee getLastSyncAddressee(); |
diff --git a/kaddressbook/kabprefs.cpp b/kaddressbook/kabprefs.cpp index 42d541b..6f9c995 100644 --- a/kaddressbook/kabprefs.cpp +++ b/kaddressbook/kabprefs.cpp | |||
@@ -24,9 +24,9 @@ | |||
24 | //US#ifdef KAB_EMBEDDED | 24 | //US#ifdef KAB_EMBEDDED |
25 | //#include <qstring.h> | 25 | //#include <qstring.h> |
26 | //#endif //KAB_EMBEDDED | 26 | //#endif //KAB_EMBEDDED |
27 | 27 | ||
28 | #include <qtextstream.h> | 28 | #include <q3textstream.h> |
29 | #include <qfile.h> | 29 | #include <qfile.h> |
30 | #include <qregexp.h> | 30 | #include <qregexp.h> |
31 | #include <stdlib.h> | 31 | #include <stdlib.h> |
32 | #include <libkdepim/kpimglobalprefs.h> | 32 | #include <libkdepim/kpimglobalprefs.h> |
@@ -90,9 +90,9 @@ KABPrefs::KABPrefs() | |||
90 | 90 | ||
91 | KPrefs::setCurrentGroup( "Views" ); | 91 | KPrefs::setCurrentGroup( "Views" ); |
92 | QString defaultView = i18n( "Default Table View" ); | 92 | QString defaultView = i18n( "Default Table View" ); |
93 | addItemString( "CurrentView", &mCurrentView, defaultView ); | 93 | addItemString( "CurrentView", &mCurrentView, defaultView ); |
94 | addItemStringList( "ViewNames", &mViewNames, defaultView ); | 94 | addItemStringList( "ViewNames", &mViewNames, QStringList(defaultView) ); |
95 | 95 | ||
96 | KPrefs::setCurrentGroup( "Filters" ); | 96 | KPrefs::setCurrentGroup( "Filters" ); |
97 | addItemInt( "CurrentFilter", &mCurrentFilter, 0 ); | 97 | addItemInt( "CurrentFilter", &mCurrentFilter, 0 ); |
98 | 98 | ||
diff --git a/kaddressbook/kabprefs.h b/kaddressbook/kabprefs.h index ddbc0c0..aff725e 100644 --- a/kaddressbook/kabprefs.h +++ b/kaddressbook/kabprefs.h | |||
@@ -24,9 +24,11 @@ | |||
24 | #ifndef KABPREFS_H | 24 | #ifndef KABPREFS_H |
25 | #define KABPREFS_H | 25 | #define KABPREFS_H |
26 | 26 | ||
27 | #include <qstringlist.h> | 27 | #include <qstringlist.h> |
28 | #include <qdict.h> | 28 | #include <q3dict.h> |
29 | //Added by qt3to4: | ||
30 | #include <Q3ValueList> | ||
29 | 31 | ||
30 | #include <libkdepim/kpimprefs.h> | 32 | #include <libkdepim/kpimprefs.h> |
31 | 33 | ||
32 | class KConfig; | 34 | class KConfig; |
@@ -72,10 +74,10 @@ class KABPrefs : public KPimPrefs | |||
72 | bool mSearchWithReturn; | 74 | bool mSearchWithReturn; |
73 | bool mAutoSearchWithWildcard; | 75 | bool mAutoSearchWithWildcard; |
74 | bool mHideSearchOnSwitch; | 76 | bool mHideSearchOnSwitch; |
75 | bool mAskForDelete; | 77 | bool mAskForDelete; |
76 | QValueList<int> mExtensionsSplitter; | 78 | Q3ValueList<int> mExtensionsSplitter; |
77 | QValueList<int> mDetailsSplitter; | 79 | Q3ValueList<int> mDetailsSplitter; |
78 | 80 | ||
79 | // Extensions stuff | 81 | // Extensions stuff |
80 | int mCurrentExtension; | 82 | int mCurrentExtension; |
81 | QStringList mActiveExtensions; | 83 | QStringList mActiveExtensions; |
diff --git a/kaddressbook/kaddressbook.pro b/kaddressbook/kaddressbook.pro index cd38e5f..4eb1f7f 100644 --- a/kaddressbook/kaddressbook.pro +++ b/kaddressbook/kaddressbook.pro | |||
@@ -12,42 +12,42 @@ DEFINES += KAB_EMBEDDED KAB_NOSPLITTER DESKTOP_VERSION | |||
12 | unix : { | 12 | unix : { |
13 | 13 | ||
14 | staticlib: { | 14 | staticlib: { |
15 | TARGET = kapi_linux | 15 | TARGET = kapi_linux |
16 | LIBS += ../bin/libmicrokabc_qtopia.a | 16 | LIBS += ../bin/libxmicrokabc_qtopia.a |
17 | LIBS += ../bin/libmicrokabc_file.a | 17 | LIBS += ../bin/libxmicrokabc_file.a |
18 | LIBS += ../bin/libmicrokabc_dir.a | 18 | LIBS += ../bin/libxmicrokabc_dir.a |
19 | LIBS += ../bin/libmicrokdepim.a | 19 | LIBS += ../bin/libxmicrokdepim.a |
20 | LIBS += ../bin/libmicrokcal.a | 20 | LIBS += ../bin/libxmicrokcal.a |
21 | LIBS += ../bin/libmicrokabc.a | 21 | LIBS += ../bin/libxmicrokabc.a |
22 | LIBS += ../bin/libmicrokde.a | 22 | LIBS += ../bin/libxmicrokde.a |
23 | LIBS += ../bin/libmicrokabc_qtopia.a | 23 | LIBS += ../bin/libxmicrokabc_qtopia.a |
24 | LIBS += ../bin/libmicrokabc_file.a | 24 | LIBS += ../bin/libxmicrokabc_file.a |
25 | LIBS += ../bin/libmicrokabc_dir.a | 25 | LIBS += ../bin/libxmicrokabc_dir.a |
26 | LIBS += ../bin/libmicrokdepim.a | 26 | LIBS += ../bin/libxmicrokdepim.a |
27 | LIBS += ../bin/libmicrokcal.a | 27 | LIBS += ../bin/libxmicrokcal.a |
28 | LIBS += ../bin/libmicrokabc.a | 28 | LIBS += ../bin/libxmicrokabc.a |
29 | LIBS += ../bin/libmicrokde.a | 29 | LIBS += ../bin/libxmicrokde.a |
30 | LIBS += ../libical/lib/libical.a | 30 | LIBS += ../libical/lib/libical.a |
31 | LIBS += ../libical/lib/libicalss.a | 31 | LIBS += ../libical/lib/libicalss.a |
32 | 32 | ||
33 | } else { | 33 | } else { |
34 | LIBS += ../bin/libmicrokdepim.so | 34 | LIBS += ../bin/libxmicrokdepim.so |
35 | LIBS += ../bin/libmicrokde.so | 35 | LIBS += ../bin/libxmicrokde.so |
36 | LIBS += ../bin/libmicrokabc.so | 36 | LIBS += ../bin/libxmicrokabc.so |
37 | LIBS += ../bin/libmicrokcal.so | 37 | LIBS += ../bin/libxmicrokcal.so |
38 | #LIBS += -lldap | 38 | #LIBS += -lldap |
39 | } | 39 | } |
40 | OBJECTS_DIR = obj/unix | 40 | OBJECTS_DIR = obj/unix |
41 | MOC_DIR = moc/unix | 41 | MOC_DIR = moc/unix |
42 | } | 42 | } |
43 | win32: { | 43 | win32: { |
44 | RC_FILE = winicons.rc | 44 | RC_FILE = winicons.rc |
45 | DEFINES += _WIN32_ | 45 | DEFINES += _WIN32_ |
46 | LIBS += ../bin/microkdepim.lib | 46 | LIBS += ../bin/xmicrokdepim.lib |
47 | LIBS += ../bin/microkcal.lib | 47 | LIBS += ../bin/xmicrokcal.lib |
48 | LIBS += ../bin/microkde.lib | 48 | LIBS += ../bin/xmicrokde.lib |
49 | LIBS += ../bin/microkabc.lib | 49 | LIBS += ../bin/xmicrokabc.lib |
50 | QMAKE_LINK += /NODEFAULTLIB:LIBC | 50 | QMAKE_LINK += /NODEFAULTLIB:LIBC |
51 | OBJECTS_DIR = obj/win | 51 | OBJECTS_DIR = obj/win |
52 | MOC_DIR = moc/win | 52 | MOC_DIR = moc/win |
53 | #olimport section | 53 | #olimport section |
@@ -203,4 +203,6 @@ xxport/sharpdtm_xxport.cpp \ | |||
203 | #mainwindow.cpp \ | 203 | #mainwindow.cpp \ |
204 | # calendarview.cpp \ | 204 | # calendarview.cpp \ |
205 | # timespanview.cpp | 205 | # timespanview.cpp |
206 | 206 | ||
207 | #The following line was inserted by qt3to4 | ||
208 | 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 | |||
@@ -11,12 +11,12 @@ INCLUDEPATH += . ./details ./features ./xxport ../libkdepim ../microkde ../micro | |||
11 | DEFINES += KAB_EMBEDDED KAB_NOSPLITTER | 11 | DEFINES += KAB_EMBEDDED KAB_NOSPLITTER |
12 | #DEFINES += KORG_NODND KORG_NOPLUGINS KORG_NOKABC KORG_NOARCHIVE KORG_NOMAIL | 12 | #DEFINES += KORG_NODND KORG_NOPLUGINS KORG_NOKABC KORG_NOARCHIVE KORG_NOMAIL |
13 | #DEFINES += KORG_NOPRINTER KORG_NODCOP KORG_NOKALARMD KORG_NORESOURCEVIEW KORG_NOSPLITTER | 13 | #DEFINES += KORG_NOPRINTER KORG_NODCOP KORG_NOKALARMD KORG_NORESOURCEVIEW KORG_NOSPLITTER |
14 | #DEFINES += KORG_NOLVALTERNATION | 14 | #DEFINES += KORG_NOLVALTERNATION |
15 | LIBS += -lmicrokdepim | 15 | LIBS += -lxmicrokdepim |
16 | LIBS += -lmicrokde | 16 | LIBS += -lxmicrokde |
17 | LIBS += -lmicroqtcompat | 17 | LIBS += -lmicroqtcompat |
18 | LIBS += -lmicrokabc | 18 | LIBS += -lxmicrokabc |
19 | LIBS += -lqpe | 19 | LIBS += -lqpe |
20 | LIBS += -ljpeg | 20 | LIBS += -ljpeg |
21 | LIBS += $(QTOPIALIB) | 21 | LIBS += $(QTOPIALIB) |
22 | LIBS += -L$(QPEDIR)/lib | 22 | LIBS += -L$(QPEDIR)/lib |
diff --git a/kaddressbook/kaddressbookmain.cpp b/kaddressbook/kaddressbookmain.cpp index c417226..b317974 100644 --- a/kaddressbook/kaddressbookmain.cpp +++ b/kaddressbook/kaddressbookmain.cpp | |||
@@ -24,10 +24,13 @@ | |||
24 | #ifdef KAB_EMBEDDED | 24 | #ifdef KAB_EMBEDDED |
25 | #include "kabprefs.h" | 25 | #include "kabprefs.h" |
26 | #include <kglobal.h> | 26 | #include <kglobal.h> |
27 | #include <qmessagebox.h> | 27 | #include <qmessagebox.h> |
28 | #include <qtoolbar.h> | 28 | #include <q3toolbar.h> |
29 | #include <qapplication.h> | 29 | #include <qapplication.h> |
30 | //Added by qt3to4: | ||
31 | #include <Q3CString> | ||
32 | #include <QCloseEvent> | ||
30 | #else //KAB_EMBEDDED | 33 | #else //KAB_EMBEDDED |
31 | #include <kedittoolbar.h> | 34 | #include <kedittoolbar.h> |
32 | #include <kkeydialog.h> | 35 | #include <kkeydialog.h> |
33 | #include <kmessagebox.h> | 36 | #include <kmessagebox.h> |
@@ -41,20 +44,20 @@ | |||
41 | 44 | ||
42 | #ifdef KAB_EMBEDDED | 45 | #ifdef KAB_EMBEDDED |
43 | KAddressBookMain::KAddressBookMain() : KMainWindow( 0, "abmain" ) | 46 | KAddressBookMain::KAddressBookMain() : KMainWindow( 0, "abmain" ) |
44 | #else //KAB_EMBEDDED | 47 | #else //KAB_EMBEDDED |
45 | //MOC_SKIP_BEGIN | 48 | #ifndef Q_MOC_RUN |
46 | KAddressBookMain::KAddressBookMain() : DCOPObject( "KAddressBookIface" ), KMainWindow( 0 ) | 49 | KAddressBookMain::KAddressBookMain() : DCOPObject( "KAddressBookIface" ), KMainWindow( 0 ) |
47 | //MOC_SKIP_END | 50 | #endif |
48 | #endif //KAB_EMBEDDED | 51 | #endif //KAB_EMBEDDED |
49 | { | 52 | { |
50 | setIcon(SmallIcon( "ka24" ) ); | 53 | setIcon(SmallIcon( "ka24" ) ); |
51 | #if 0 | 54 | #if 0 |
52 | //US for embedded systems, create the toolbar before we initiate KABCore. | 55 | //US for embedded systems, create the toolbar before we initiate KABCore. |
53 | // KABCore will fill the toolbar with menues and icons | 56 | // KABCore will fill the toolbar with menues and icons |
54 | QMainWindow::ToolBarDock tbd; | 57 | Qt::ToolBarDock tbd; |
55 | tbd = Top; | 58 | tbd = Qt::DockTop; |
56 | iconToolBar = new QToolBar( this ); | 59 | iconToolBar = new Q3ToolBar( this ); |
57 | addToolBar (iconToolBar , tbd ); | 60 | addToolBar (iconToolBar , tbd ); |
58 | iconToolBar->setHorizontalStretchable(true); | 61 | iconToolBar->setHorizontalStretchable(true); |
59 | //US iconToolBar->setWidth(300); | 62 | //US iconToolBar->setWidth(300); |
60 | #endif // 0 | 63 | #endif // 0 |
@@ -84,9 +87,9 @@ KAddressBookMain::KAddressBookMain() : DCOPObject( "KAddressBookIface" ), KMainW | |||
84 | #endif //KAB_EMBEDDED | 87 | #endif //KAB_EMBEDDED |
85 | setAutoSaveSettings(); | 88 | setAutoSaveSettings(); |
86 | mCore->restoreSettings(); | 89 | mCore->restoreSettings(); |
87 | #ifndef DESKTOP_VERSION | 90 | #ifndef DESKTOP_VERSION |
88 | QObject::connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), mCore, SLOT (receiveStart ( const QCString &, const QByteArray & ))); | 91 | QObject::connect(qApp, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )), mCore, SLOT (receiveStart ( const Q3CString &, const QByteArray & ))); |
89 | #endif | 92 | #endif |
90 | } | 93 | } |
91 | 94 | ||
92 | KAddressBookMain::~KAddressBookMain() | 95 | KAddressBookMain::~KAddressBookMain() |
@@ -234,8 +237,7 @@ void KAddressBookMain::closeEvent( QCloseEvent* ce ) | |||
234 | 237 | ||
235 | ce->accept(); | 238 | ce->accept(); |
236 | } | 239 | } |
237 | 240 | ||
238 | #ifndef KAB_EMBEDDED | 241 | #ifndef KAB_EMBEDDED_ |
239 | #include "kaddressbookmain.moc" | 242 | #include "moc_kaddressbookmain.cpp" |
240 | #endif //KAB_EMBEDDED | 243 | #endif //KAB_EMBEDDED |
241 | |||
diff --git a/kaddressbook/kaddressbookmain.h b/kaddressbook/kaddressbookmain.h index b6d9b4b..d3f5cc7 100644 --- a/kaddressbook/kaddressbookmain.h +++ b/kaddressbook/kaddressbookmain.h | |||
@@ -23,12 +23,14 @@ | |||
23 | 23 | ||
24 | #ifndef KADDRESSBOOKMAIN_H | 24 | #ifndef KADDRESSBOOKMAIN_H |
25 | #define KADDRESSBOOKMAIN_H | 25 | #define KADDRESSBOOKMAIN_H |
26 | 26 | ||
27 | #include <qptrlist.h> | 27 | #include <q3ptrlist.h> |
28 | //Added by qt3to4: | ||
29 | #include <QCloseEvent> | ||
28 | 30 | ||
29 | #ifdef KAB_EMBEDDED | 31 | #ifdef KAB_EMBEDDED |
30 | class QToolBar; | 32 | class Q3ToolBar; |
31 | #include <qaction.h> | 33 | #include <qaction.h> |
32 | //#include <qmainwindow.h> | 34 | //#include <qmainwindow.h> |
33 | #include <kmainwindow.h> | 35 | #include <kmainwindow.h> |
34 | #else //KAB_EMBEDDED | 36 | #else //KAB_EMBEDDED |
@@ -51,11 +53,11 @@ class KConfig; | |||
51 | */ | 53 | */ |
52 | #ifdef KAB_EMBEDDED | 54 | #ifdef KAB_EMBEDDED |
53 | class KAddressBookMain : public KMainWindow | 55 | class KAddressBookMain : public KMainWindow |
54 | #else //KAB_EMBEDDED | 56 | #else //KAB_EMBEDDED |
55 | //MOC_SKIP_BEGIN | 57 | #ifndef Q_MOC_RUN |
56 | class KAddressBookMain : public KMainWindow, virtual public KAddressBookIface | 58 | class KAddressBookMain : public KMainWindow, virtual public KAddressBookIface |
57 | //MOC_SKIP_END | 59 | #endif |
58 | #endif //KAB_EMBEDDED | 60 | #endif //KAB_EMBEDDED |
59 | { | 61 | { |
60 | Q_OBJECT | 62 | Q_OBJECT |
61 | 63 | ||
@@ -72,11 +74,11 @@ class KAddressBookMain : public KMainWindow, virtual public KAddressBookIface | |||
72 | public slots: | 74 | public slots: |
73 | void showMinimized () ; | 75 | void showMinimized () ; |
74 | virtual void addEmail( QString addr ); | 76 | virtual void addEmail( QString addr ); |
75 | #ifndef KAB_EMBEDDED | 77 | #ifndef KAB_EMBEDDED |
76 | //MOC_SKIP_BEGIN | 78 | #ifndef Q_MOC_RUN |
77 | virtual ASYNC showContactEditor( QString uid ); | 79 | virtual ASYNC showContactEditor( QString uid ); |
78 | //MOC_SKIP_END | 80 | #endif |
79 | #endif //KAB_EMBEDDED | 81 | #endif //KAB_EMBEDDED |
80 | virtual void newContact(); | 82 | virtual void newContact(); |
81 | virtual QString getNameByPhone( QString phone ); | 83 | virtual QString getNameByPhone( QString phone ); |
82 | virtual void save(); | 84 | virtual void save(); |
diff --git a/kaddressbook/kaddressbookview.cpp b/kaddressbook/kaddressbookview.cpp index 86898e2..4823b37 100644 --- a/kaddressbook/kaddressbookview.cpp +++ b/kaddressbook/kaddressbookview.cpp | |||
@@ -31,8 +31,10 @@ | |||
31 | #include "viewmanager.h" | 31 | #include "viewmanager.h" |
32 | 32 | ||
33 | #endif //KAB_EMBEDDED | 33 | #endif //KAB_EMBEDDED |
34 | #include <qlayout.h> | 34 | #include <qlayout.h> |
35 | //Added by qt3to4: | ||
36 | #include <Q3VBoxLayout> | ||
35 | 37 | ||
36 | #include <kabc/distributionlistdialog.h> | 38 | #include <kabc/distributionlistdialog.h> |
37 | #include <kabc/addressbook.h> | 39 | #include <kabc/addressbook.h> |
38 | #include <kdebug.h> | 40 | #include <kdebug.h> |
@@ -132,9 +134,9 @@ KABC::Addressee::List KAddressBookView::addressees() | |||
132 | 134 | ||
133 | void KAddressBookView::initGUI() | 135 | void KAddressBookView::initGUI() |
134 | { | 136 | { |
135 | // Create the layout | 137 | // Create the layout |
136 | QVBoxLayout *layout = new QVBoxLayout( this ); | 138 | Q3VBoxLayout *layout = new Q3VBoxLayout( this ); |
137 | 139 | ||
138 | // Add the view widget | 140 | // Add the view widget |
139 | mViewWidget = new QWidget( this ); | 141 | mViewWidget = new QWidget( this ); |
140 | layout->addWidget( mViewWidget ); | 142 | layout->addWidget( mViewWidget ); |
@@ -182,7 +184,7 @@ ViewConfigureWidget *ViewFactory::configureWidget( KABC::AddressBook *ab, | |||
182 | } | 184 | } |
183 | 185 | ||
184 | 186 | ||
185 | 187 | ||
186 | #ifndef KAB_EMBEDDED | 188 | #ifndef KAB_EMBEDDED_ |
187 | #include "kaddressbookview.moc" | 189 | #include "moc_kaddressbookview.cpp" |
188 | #endif //KAB_EMBEDDED | 190 | #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,4 +1,6 @@ | |||
1 | //Added by qt3to4: | ||
2 | #include <QDropEvent> | ||
1 | /* | 3 | /* |
2 | This file is part of KAddressBook. | 4 | This file is part of KAddressBook. |
3 | Copyright (c) 2002 Mike Pilone <mpilone@slac.com> | 5 | Copyright (c) 2002 Mike Pilone <mpilone@slac.com> |
4 | 6 | ||
@@ -39,9 +41,9 @@ class QDropEvent; | |||
39 | #include "viewconfigurewidget.h" | 41 | #include "viewconfigurewidget.h" |
40 | #include "filter.h" | 42 | #include "filter.h" |
41 | 43 | ||
42 | #ifdef DESKTOP_VERSION | 44 | #ifdef DESKTOP_VERSION |
43 | #include <qpaintdevicemetrics.h> | 45 | #include <q3paintdevicemetrics.h> |
44 | #include <qprinter.h> | 46 | #include <qprinter.h> |
45 | #include <qpainter.h> | 47 | #include <qpainter.h> |
46 | #endif | 48 | #endif |
47 | 49 | ||
@@ -174,11 +176,11 @@ class KAddressBookView : public QWidget | |||
174 | the addressee matching <i>uid</i>. If uid | 176 | the addressee matching <i>uid</i>. If uid |
175 | is equal to QString::null, then all addressees should be selected. | 177 | is equal to QString::null, then all addressees should be selected. |
176 | */ | 178 | */ |
177 | #ifndef KAB_EMBEDDED | 179 | #ifndef KAB_EMBEDDED |
178 | //MOC_SKIP_BEGIN | 180 | #ifndef Q_MOC_RUN |
179 | virtual void setSelected( QString uid = QString::null, bool selected = true ) = 0; | 181 | virtual void setSelected( QString uid = QString::null, bool selected = true ) = 0; |
180 | //MOC_SKIP_END | 182 | #endif |
181 | #else //KAB_EMBEDDED | 183 | #else //KAB_EMBEDDED |
182 | //US my moc can not handle the default parameters. Is this a problem ??? | 184 | //US my moc can not handle the default parameters. Is this a problem ??? |
183 | virtual void setSelected( QString uid, bool selected) = 0; | 185 | virtual void setSelected( QString uid, bool selected) = 0; |
184 | #endif //KAB_EMBEDDED | 186 | #endif //KAB_EMBEDDED |
@@ -261,11 +263,11 @@ class KAddressBookView : public QWidget | |||
261 | QWidget *mViewWidget; | 263 | QWidget *mViewWidget; |
262 | }; | 264 | }; |
263 | 265 | ||
264 | #ifndef KAB_EMBEDDED | 266 | #ifndef KAB_EMBEDDED |
265 | //MOC_SKIP_BEGIN | 267 | #ifndef Q_MOC_RUN |
266 | class ViewFactory : public KLibFactory | 268 | class ViewFactory : public KLibFactory |
267 | //MOC_SKIP_END | 269 | #endif |
268 | #else //KAB_EMBEDDED | 270 | #else //KAB_EMBEDDED |
269 | class ViewFactory | 271 | class ViewFactory |
270 | #endif //KAB_EMBEDDED | 272 | #endif //KAB_EMBEDDED |
271 | { | 273 | { |
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 | |||
@@ -20,14 +20,18 @@ | |||
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <qgroupbox.h> | 24 | #include <q3groupbox.h> |
25 | #include <qlabel.h> | 25 | #include <qlabel.h> |
26 | #include <qlayout.h> | 26 | #include <qlayout.h> |
27 | #include <qlistbox.h> | 27 | #include <q3listbox.h> |
28 | #include <qpushbutton.h> | 28 | #include <qpushbutton.h> |
29 | #include <qapplication.h> | 29 | #include <qapplication.h> |
30 | #include <QDesktopWidget> | ||
31 | //Added by qt3to4: | ||
32 | #include <Q3GridLayout> | ||
33 | #include <Q3HBoxLayout> | ||
30 | 34 | ||
31 | #include <kbuttonbox.h> | 35 | #include <kbuttonbox.h> |
32 | #include <kcombobox.h> | 36 | #include <kcombobox.h> |
33 | #include <kconfig.h> | 37 | #include <kconfig.h> |
@@ -44,15 +48,15 @@ NamePartWidget::NamePartWidget( const QString &title, QWidget *parent, | |||
44 | : QWidget( parent, name ) | 48 | : QWidget( parent, name ) |
45 | { | 49 | { |
46 | if (KGlobal::getOrientation() == KGlobal::Portrait) | 50 | if (KGlobal::getOrientation() == KGlobal::Portrait) |
47 | { | 51 | { |
48 | QGridLayout* layout = new QGridLayout( this, 1, 1, KDialog::marginHintSmall(), | 52 | Q3GridLayout* layout = new Q3GridLayout( this, 1, 1, KDialog::marginHintSmall(), |
49 | KDialog::spacingHintSmall() ); | 53 | KDialog::spacingHintSmall() ); |
50 | 54 | ||
51 | QLabel *label = new QLabel( i18n( title ), this ); | 55 | QLabel *label = new QLabel( i18n( title ), this ); |
52 | layout->addWidget( label, 0, 1 ); | 56 | layout->addWidget( label, 0, 1 ); |
53 | 57 | ||
54 | mBox = new QListBox( this ); | 58 | mBox = new Q3ListBox( this ); |
55 | mBox->setMaximumSize(70, 70); | 59 | mBox->setMaximumSize(70, 70); |
56 | layout->addMultiCellWidget( mBox, 0, 1, 0, 0 ); | 60 | layout->addMultiCellWidget( mBox, 0, 1, 0, 0 ); |
57 | 61 | ||
58 | KButtonBox *bbox = new KButtonBox( this, Qt::Vertical ); | 62 | KButtonBox *bbox = new KButtonBox( this, Qt::Vertical ); |
@@ -69,15 +73,15 @@ NamePartWidget::NamePartWidget( const QString &title, QWidget *parent, | |||
69 | 73 | ||
70 | } | 74 | } |
71 | else | 75 | else |
72 | { | 76 | { |
73 | QHBoxLayout *layout = new QHBoxLayout( this ); | 77 | Q3HBoxLayout *layout = new Q3HBoxLayout( this ); |
74 | 78 | ||
75 | QGroupBox *group = new QGroupBox( 0, Qt::Vertical, title, this ); | 79 | Q3GroupBox *group = new Q3GroupBox( 0, Qt::Vertical, title, this ); |
76 | QGridLayout *groupLayout = new QGridLayout( group->layout(), 2, 2, | 80 | Q3GridLayout *groupLayout = new Q3GridLayout( group->layout(), 2, 2, |
77 | KDialog::spacingHint() ); | 81 | KDialog::spacingHint() ); |
78 | 82 | ||
79 | mBox = new QListBox( group ); | 83 | mBox = new Q3ListBox( group ); |
80 | 84 | ||
81 | groupLayout->addWidget( mBox, 0, 0 ); | 85 | groupLayout->addWidget( mBox, 0, 0 ); |
82 | 86 | ||
83 | KButtonBox *bbox = new KButtonBox( group, Qt::Vertical ); | 87 | KButtonBox *bbox = new KButtonBox( group, Qt::Vertical ); |
@@ -96,10 +100,10 @@ NamePartWidget::NamePartWidget( const QString &title, QWidget *parent, | |||
96 | mAddButton->setEnabled( false ); | 100 | mAddButton->setEnabled( false ); |
97 | mRemoveButton->setEnabled( false ); | 101 | mRemoveButton->setEnabled( false ); |
98 | 102 | ||
99 | 103 | ||
100 | connect( mBox, SIGNAL( selectionChanged( QListBoxItem* ) ), | 104 | connect( mBox, SIGNAL( selectionChanged( Q3ListBoxItem* ) ), |
101 | SLOT( selectionChanged( QListBoxItem* ) ) ); | 105 | SLOT( selectionChanged( Q3ListBoxItem* ) ) ); |
102 | connect( mEdit, SIGNAL( textChanged( const QString& ) ), | 106 | connect( mEdit, SIGNAL( textChanged( const QString& ) ), |
103 | SLOT( textChanged( const QString& ) ) ); | 107 | SLOT( textChanged( const QString& ) ) ); |
104 | connect( mEdit, SIGNAL( returnPressed() ), SLOT( add() ) ); | 108 | connect( mEdit, SIGNAL( returnPressed() ), SLOT( add() ) ); |
105 | 109 | ||
@@ -142,9 +146,9 @@ void NamePartWidget::remove() | |||
142 | 146 | ||
143 | emit modified(); | 147 | emit modified(); |
144 | } | 148 | } |
145 | 149 | ||
146 | void NamePartWidget::selectionChanged( QListBoxItem *item ) | 150 | void NamePartWidget::selectionChanged( Q3ListBoxItem *item ) |
147 | { | 151 | { |
148 | mRemoveButton->setEnabled( item != 0 ); | 152 | mRemoveButton->setEnabled( item != 0 ); |
149 | } | 153 | } |
150 | 154 | ||
@@ -156,9 +160,9 @@ void NamePartWidget::textChanged( const QString& text ) | |||
156 | 160 | ||
157 | AddresseeWidget::AddresseeWidget( QWidget *parent, const char *name ) | 161 | AddresseeWidget::AddresseeWidget( QWidget *parent, const char *name ) |
158 | : QWidget( parent, name ) | 162 | : QWidget( parent, name ) |
159 | { | 163 | { |
160 | QGridLayout *layout; | 164 | Q3GridLayout *layout; |
161 | 165 | ||
162 | mPrefix = new NamePartWidget( i18n( "Prefixes" ), this ); | 166 | mPrefix = new NamePartWidget( i18n( "Prefixes" ), this ); |
163 | mInclusion = new NamePartWidget( i18n( "Inclusions" ), this ); | 167 | mInclusion = new NamePartWidget( i18n( "Inclusions" ), this ); |
164 | mSuffix = new NamePartWidget( i18n( "Suffixes" ), this ); | 168 | mSuffix = new NamePartWidget( i18n( "Suffixes" ), this ); |
@@ -177,9 +181,9 @@ AddresseeWidget::AddresseeWidget( QWidget *parent, const char *name ) | |||
177 | mFormattedNameCombo->insertItem( i18n( "Reverse Name" ) ); | 181 | mFormattedNameCombo->insertItem( i18n( "Reverse Name" ) ); |
178 | 182 | ||
179 | if (KGlobal::getOrientation() == KGlobal::Portrait) | 183 | if (KGlobal::getOrientation() == KGlobal::Portrait) |
180 | { | 184 | { |
181 | layout = new QGridLayout( this, 4, 2, KDialog::marginHintSmall(), | 185 | layout = new Q3GridLayout( this, 4, 2, KDialog::marginHintSmall(), |
182 | KDialog::spacingHintSmall() ); | 186 | KDialog::spacingHintSmall() ); |
183 | 187 | ||
184 | layout->addMultiCellWidget( mPrefix, 0, 0, 0, 1 ); | 188 | layout->addMultiCellWidget( mPrefix, 0, 0, 0, 1 ); |
185 | layout->addMultiCellWidget( mInclusion, 1, 1, 0, 1 ); | 189 | layout->addMultiCellWidget( mInclusion, 1, 1, 0, 1 ); |
@@ -189,9 +193,9 @@ AddresseeWidget::AddresseeWidget( QWidget *parent, const char *name ) | |||
189 | 193 | ||
190 | } | 194 | } |
191 | else | 195 | else |
192 | { | 196 | { |
193 | layout = new QGridLayout( this, 2, 3, KDialog::marginHint(), | 197 | layout = new Q3GridLayout( this, 2, 3, KDialog::marginHint(), |
194 | KDialog::spacingHint() ); | 198 | KDialog::spacingHint() ); |
195 | 199 | ||
196 | layout->addWidget( mPrefix, 0, 0 ); | 200 | layout->addWidget( mPrefix, 0, 0 ); |
197 | layout->addWidget( mInclusion, 0, 1 ); | 201 | layout->addWidget( mInclusion, 0, 1 ); |
@@ -232,7 +236,7 @@ void AddresseeWidget::saveSettings() | |||
232 | config.writeEntry( "Suffixes", mSuffix->nameParts() ); | 236 | config.writeEntry( "Suffixes", mSuffix->nameParts() ); |
233 | config.writeEntry( "FormattedNameType", mFormattedNameCombo->currentItem() ); | 237 | config.writeEntry( "FormattedNameType", mFormattedNameCombo->currentItem() ); |
234 | } | 238 | } |
235 | 239 | ||
236 | #ifndef KAB_EMBEDDED | 240 | #ifndef KAB_EMBEDDED_ |
237 | #include "addresseewidget.moc" | 241 | #include "moc_addresseewidget.cpp" |
238 | #endif //KAB_EMBEDDED | 242 | #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 | |||
@@ -28,10 +28,10 @@ | |||
28 | 28 | ||
29 | class KComboBox; | 29 | class KComboBox; |
30 | class KLineEdit; | 30 | class KLineEdit; |
31 | 31 | ||
32 | class QListBox; | 32 | class Q3ListBox; |
33 | class QListBoxItem; | 33 | class Q3ListBoxItem; |
34 | class QPushButton; | 34 | class QPushButton; |
35 | 35 | ||
36 | class NamePartWidget : public QWidget | 36 | class NamePartWidget : public QWidget |
37 | { | 37 | { |
@@ -51,15 +51,15 @@ class NamePartWidget : public QWidget | |||
51 | private slots: | 51 | private slots: |
52 | void add(); | 52 | void add(); |
53 | void remove(); | 53 | void remove(); |
54 | 54 | ||
55 | void selectionChanged( QListBoxItem* ); | 55 | void selectionChanged( Q3ListBoxItem* ); |
56 | void textChanged( const QString& ); | 56 | void textChanged( const QString& ); |
57 | 57 | ||
58 | private: | 58 | private: |
59 | KLineEdit *mEdit; | 59 | KLineEdit *mEdit; |
60 | 60 | ||
61 | QListBox *mBox; | 61 | Q3ListBox *mBox; |
62 | QPushButton *mAddButton; | 62 | QPushButton *mAddButton; |
63 | QPushButton *mRemoveButton; | 63 | QPushButton *mRemoveButton; |
64 | }; | 64 | }; |
65 | 65 | ||
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 | |||
@@ -21,8 +21,11 @@ | |||
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <qlayout.h> | 24 | #include <qlayout.h> |
25 | //Added by qt3to4: | ||
26 | #include <Q3GridLayout> | ||
27 | #include <Q3Frame> | ||
25 | 28 | ||
26 | #include <klocale.h> | 29 | #include <klocale.h> |
27 | 30 | ||
28 | #include "configurewidget.h" | 31 | #include "configurewidget.h" |
@@ -33,10 +36,10 @@ ExtensionConfigDialog::ExtensionConfigDialog( ExtensionFactory *factory, KConfig | |||
33 | QWidget *parent, const char *name ) | 36 | QWidget *parent, const char *name ) |
34 | : KDialogBase( Plain, i18n( "Extension Settings" ), Ok | Cancel, Ok, parent, | 37 | : KDialogBase( Plain, i18n( "Extension Settings" ), Ok | Cancel, Ok, parent, |
35 | name, true, true ), mWidget( 0 ), mConfig( config ) | 38 | name, true, true ), mWidget( 0 ), mConfig( config ) |
36 | { | 39 | { |
37 | QFrame *page = plainPage(); | 40 | Q3Frame *page = plainPage(); |
38 | QGridLayout *layout = new QGridLayout( page, 1, 1, marginHint(), spacingHint() ); | 41 | Q3GridLayout *layout = new Q3GridLayout( page, 1, 1, marginHint(), spacingHint() ); |
39 | 42 | ||
40 | mWidget = factory->configureWidget( page, "ExtensionConfigWidget" ); | 43 | mWidget = factory->configureWidget( page, "ExtensionConfigWidget" ); |
41 | layout->addWidget( mWidget, 0, 0 ); | 44 | layout->addWidget( mWidget, 0, 0 ); |
42 | 45 | ||
@@ -53,7 +56,7 @@ void ExtensionConfigDialog::slotOk() | |||
53 | 56 | ||
54 | KDialogBase::slotOk(); | 57 | KDialogBase::slotOk(); |
55 | } | 58 | } |
56 | 59 | ||
57 | #ifndef KAB_EMBEDDED | 60 | #ifndef KAB_EMBEDDED_ |
58 | #include "extensionconfigdialog.moc" | 61 | #include "moc_extensionconfigdialog.cpp" |
59 | #endif //KAB_EMBEDDED | 62 | #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 | |||
@@ -21,18 +21,22 @@ | |||
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <qcheckbox.h> | 24 | #include <qcheckbox.h> |
25 | #include <qframe.h> | 25 | #include <q3frame.h> |
26 | #include <qgroupbox.h> | 26 | #include <q3groupbox.h> |
27 | #include <qlayout.h> | 27 | #include <qlayout.h> |
28 | #include <qpushbutton.h> | 28 | #include <qpushbutton.h> |
29 | #include <qtabwidget.h> | 29 | #include <qtabwidget.h> |
30 | #include <qcombobox.h> | 30 | #include <qcombobox.h> |
31 | #include <qlineedit.h> | 31 | #include <qlineedit.h> |
32 | #include <qlabel.h> | 32 | #include <qlabel.h> |
33 | #include <qfile.h> | 33 | #include <qfile.h> |
34 | #include <qvbox.h> | 34 | #include <q3vbox.h> |
35 | //Added by qt3to4: | ||
36 | #include <Q3HBoxLayout> | ||
37 | #include <Q3PtrList> | ||
38 | #include <Q3VBoxLayout> | ||
35 | 39 | ||
36 | #include <kconfig.h> | 40 | #include <kconfig.h> |
37 | #include <kdebug.h> | 41 | #include <kdebug.h> |
38 | #include <kdialog.h> | 42 | #include <kdialog.h> |
@@ -56,17 +60,17 @@ | |||
56 | 60 | ||
57 | #include "kabconfigwidget.h" | 61 | #include "kabconfigwidget.h" |
58 | #include <kglobalsettings.h> | 62 | #include <kglobalsettings.h> |
59 | 63 | ||
60 | class ExtensionItem : public QCheckListItem | 64 | class ExtensionItem : public Q3CheckListItem |
61 | { | 65 | { |
62 | public: | 66 | public: |
63 | 67 | ||
64 | #ifndef KAB_EMBEDDED | 68 | #ifndef KAB_EMBEDDED |
65 | ExtensionItem( QListView *parent, const QString &text ); | 69 | ExtensionItem( Q3ListView *parent, const QString &text ); |
66 | void setService( const KService::Ptr &ptr ); | 70 | void setService( const KService::Ptr &ptr ); |
67 | #else //KAB_EMBEDDED | 71 | #else //KAB_EMBEDDED |
68 | ExtensionItem( QListView *parent, const QString &text, const QString &name, const QString &comment ); | 72 | ExtensionItem( Q3ListView *parent, const QString &text, const QString &name, const QString &comment ); |
69 | void setFactory( ExtensionFactory* fac ); | 73 | void setFactory( ExtensionFactory* fac ); |
70 | #endif //KAB_EMBEDDED | 74 | #endif //KAB_EMBEDDED |
71 | 75 | ||
72 | bool configWidgetAvailable() const; | 76 | bool configWidgetAvailable() const; |
@@ -89,22 +93,22 @@ class ExtensionItem : public QCheckListItem | |||
89 | KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char *name ) | 93 | KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char *name ) |
90 | : KPrefsWidget( prefs, parent, name ) | 94 | : KPrefsWidget( prefs, parent, name ) |
91 | { | 95 | { |
92 | 96 | ||
93 | QVBoxLayout *topLayout = new QVBoxLayout( this, 0, | 97 | Q3VBoxLayout *topLayout = new Q3VBoxLayout( this, 0, |
94 | KDialog::spacingHintSmall() ); | 98 | KDialog::spacingHintSmall() ); |
95 | 99 | ||
96 | QTabWidget *tabWidget = new QTabWidget( this ); | 100 | QTabWidget *tabWidget = new QTabWidget( this ); |
97 | topLayout->addWidget( tabWidget ); | 101 | topLayout->addWidget( tabWidget ); |
98 | 102 | ||
99 | // General page | 103 | // General page |
100 | QWidget *generalPage = new QWidget( this ); | 104 | QWidget *generalPage = new QWidget( this ); |
101 | QVBoxLayout *layout = new QVBoxLayout( generalPage, KDialog::marginHintSmall(), | 105 | Q3VBoxLayout *layout = new Q3VBoxLayout( generalPage, KDialog::marginHintSmall(), |
102 | KDialog::spacingHintSmall() ); | 106 | KDialog::spacingHintSmall() ); |
103 | 107 | ||
104 | 108 | ||
105 | QWidget *hBox = new QWidget( generalPage, "qhbox" ); | 109 | QWidget *hBox = new QWidget( generalPage, "qhbox" ); |
106 | QHBoxLayout *hboxLayout = new QHBoxLayout( hBox); | 110 | Q3HBoxLayout *hboxLayout = new Q3HBoxLayout( hBox); |
107 | KPrefsWidFont *detailsFont = | 111 | KPrefsWidFont *detailsFont = |
108 | addWidFont(i18n("phone:123"),i18n("Details view font"), | 112 | addWidFont(i18n("phone:123"),i18n("Details view font"), |
109 | &(KABPrefs::instance()->mDetailsFont),hBox); | 113 | &(KABPrefs::instance()->mDetailsFont),hBox); |
110 | hboxLayout->addWidget(detailsFont->label()); | 114 | hboxLayout->addWidget(detailsFont->label()); |
@@ -116,9 +120,9 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * | |||
116 | layout->addWidget( hBox ); | 120 | layout->addWidget( hBox ); |
117 | 121 | ||
118 | //general groupbox | 122 | //general groupbox |
119 | QWidget *vBox = new QWidget( generalPage, "qvbox" ); | 123 | QWidget *vBox = new QWidget( generalPage, "qvbox" ); |
120 | QVBoxLayout *boxLayout = new QVBoxLayout( vBox ); | 124 | Q3VBoxLayout *boxLayout = new Q3VBoxLayout( vBox ); |
121 | boxLayout->setAlignment( Qt::AlignTop ); | 125 | boxLayout->setAlignment( Qt::AlignTop ); |
122 | boxLayout->setMargin(KDialog::marginHintSmall() ); | 126 | boxLayout->setMargin(KDialog::marginHintSmall() ); |
123 | boxLayout->setSpacing( KDialog::spacingHintSmall() ); | 127 | boxLayout->setSpacing( KDialog::spacingHintSmall() ); |
124 | mMenuBarBox = new QCheckBox( i18n( "Full Menu bar (restart)" ), vBox, "mremenuturn" ); | 128 | mMenuBarBox = new QCheckBox( i18n( "Full Menu bar (restart)" ), vBox, "mremenuturn" ); |
@@ -153,15 +157,15 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * | |||
153 | tabWidget->addTab( generalPage, i18n( "General" ) ); | 157 | tabWidget->addTab( generalPage, i18n( "General" ) ); |
154 | 158 | ||
155 | // Extension page | 159 | // Extension page |
156 | QWidget *extensionPage = new QWidget( this ); | 160 | QWidget *extensionPage = new QWidget( this ); |
157 | QVBoxLayout *extensionLayout = new QVBoxLayout( extensionPage, KDialog::marginHintSmall(), | 161 | Q3VBoxLayout *extensionLayout = new Q3VBoxLayout( extensionPage, KDialog::marginHintSmall(), |
158 | KDialog::spacingHintSmall() ); | 162 | KDialog::spacingHintSmall() ); |
159 | 163 | ||
160 | //extensions groupbox | 164 | //extensions groupbox |
161 | 165 | ||
162 | QGroupBox* groupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Extensions (restart)" ), extensionPage ); | 166 | Q3GroupBox* groupBox = new Q3GroupBox( 0, Qt::Vertical, i18n( "Extensions (restart)" ), extensionPage ); |
163 | boxLayout = new QVBoxLayout( groupBox->layout() ); | 167 | boxLayout = new Q3VBoxLayout( groupBox->layout() ); |
164 | boxLayout->setAlignment( Qt::AlignTop ); | 168 | boxLayout->setAlignment( Qt::AlignTop ); |
165 | boxLayout->setMargin(KDialog::marginHintSmall()); | 169 | boxLayout->setMargin(KDialog::marginHintSmall()); |
166 | boxLayout->setSpacing(KDialog::spacingHintSmall()); | 170 | boxLayout->setSpacing(KDialog::spacingHintSmall()); |
167 | groupBox->layout()->setMargin(1) ; | 171 | groupBox->layout()->setMargin(1) ; |
@@ -188,12 +192,12 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * | |||
188 | connect( mHideSearchOnSwitchBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); | 192 | connect( mHideSearchOnSwitchBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); |
189 | connect( mMultipleViewsAtOnce, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); | 193 | connect( mMultipleViewsAtOnce, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); |
190 | connect( mAskForQuit, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); | 194 | connect( mAskForQuit, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); |
191 | connect( mAskForDelete, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); | 195 | connect( mAskForDelete, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); |
192 | connect( mExtensionView, SIGNAL( selectionChanged( QListViewItem* ) ), | 196 | connect( mExtensionView, SIGNAL( selectionChanged( Q3ListViewItem* ) ), |
193 | SLOT( selectionChanged( QListViewItem* ) ) ); | 197 | SLOT( selectionChanged( Q3ListViewItem* ) ) ); |
194 | connect( mExtensionView, SIGNAL( clicked( QListViewItem* ) ), | 198 | connect( mExtensionView, SIGNAL( clicked( Q3ListViewItem* ) ), |
195 | SLOT( itemClicked( QListViewItem* ) ) ); | 199 | SLOT( itemClicked( Q3ListViewItem* ) ) ); |
196 | connect( mConfigureButton, SIGNAL( clicked() ), | 200 | connect( mConfigureButton, SIGNAL( clicked() ), |
197 | SLOT( configureExtension() ) ); | 201 | SLOT( configureExtension() ) ); |
198 | 202 | ||
199 | tabWidget->addTab( extensionPage, i18n( "Extensions" ) ); | 203 | tabWidget->addTab( extensionPage, i18n( "Extensions" ) ); |
@@ -294,10 +298,10 @@ void KABConfigWidget::restoreExtensionSettings() | |||
294 | void KABConfigWidget::saveExtensionSettings() | 298 | void KABConfigWidget::saveExtensionSettings() |
295 | { | 299 | { |
296 | QStringList activeExtensions; | 300 | QStringList activeExtensions; |
297 | 301 | ||
298 | QPtrList<QListViewItem> list; | 302 | Q3PtrList<Q3ListViewItem> list; |
299 | QListViewItemIterator it( mExtensionView ); | 303 | Q3ListViewItemIterator it( mExtensionView ); |
300 | while ( it.current() ) { | 304 | while ( it.current() ) { |
301 | ExtensionItem *item = static_cast<ExtensionItem*>( it.current() ); | 305 | ExtensionItem *item = static_cast<ExtensionItem*>( it.current() ); |
302 | if ( item ) { | 306 | if ( item ) { |
303 | if ( item->isOn() ) | 307 | if ( item->isOn() ) |
@@ -327,36 +331,36 @@ void KABConfigWidget::configureExtension() | |||
327 | 331 | ||
328 | config.sync(); | 332 | config.sync(); |
329 | } | 333 | } |
330 | 334 | ||
331 | void KABConfigWidget::selectionChanged( QListViewItem *i ) | 335 | void KABConfigWidget::selectionChanged( Q3ListViewItem *i ) |
332 | { | 336 | { |
333 | ExtensionItem *item = static_cast<ExtensionItem*>( i ); | 337 | ExtensionItem *item = static_cast<ExtensionItem*>( i ); |
334 | if ( !item ) | 338 | if ( !item ) |
335 | return; | 339 | return; |
336 | 340 | ||
337 | mConfigureButton->setEnabled( item->configWidgetAvailable() ); | 341 | mConfigureButton->setEnabled( item->configWidgetAvailable() ); |
338 | } | 342 | } |
339 | 343 | ||
340 | void KABConfigWidget::itemClicked( QListViewItem *item ) | 344 | void KABConfigWidget::itemClicked( Q3ListViewItem *item ) |
341 | { | 345 | { |
342 | if ( item != 0 ) | 346 | if ( item != 0 ) |
343 | modified(); | 347 | modified(); |
344 | } | 348 | } |
345 | 349 | ||
346 | #ifndef KAB_EMBEDDED | 350 | #ifndef KAB_EMBEDDED |
347 | ExtensionItem::ExtensionItem( QListView *parent, const QString &text ) | 351 | ExtensionItem::ExtensionItem( Q3ListView *parent, const QString &text ) |
348 | : QCheckListItem( parent, text, CheckBox ) | 352 | : Q3CheckListItem( parent, text, CheckBox ) |
349 | { | 353 | { |
350 | } | 354 | } |
351 | 355 | ||
352 | void ExtensionItem::setService( const KService::Ptr &ptr ) | 356 | void ExtensionItem::setService( const KService::Ptr &ptr ) |
353 | { | 357 | { |
354 | mPtr = ptr; | 358 | mPtr = ptr; |
355 | } | 359 | } |
356 | #else //KAB_EMBEDDED | 360 | #else //KAB_EMBEDDED |
357 | ExtensionItem::ExtensionItem( QListView *parent, const QString &text, const QString &name, const QString &comment ) | 361 | ExtensionItem::ExtensionItem( Q3ListView *parent, const QString &text, const QString &name, const QString &comment ) |
358 | : QCheckListItem( parent, text, CheckBox ) | 362 | : Q3CheckListItem( parent, text, CheckBox ) |
359 | { | 363 | { |
360 | mName = name; | 364 | mName = name; |
361 | mComment = comment; | 365 | mComment = comment; |
362 | } | 366 | } |
@@ -417,8 +421,7 @@ QString ExtensionItem::text( int column ) const | |||
417 | return QString::null; | 421 | return QString::null; |
418 | #endif //KAB_EMBEDDED | 422 | #endif //KAB_EMBEDDED |
419 | } | 423 | } |
420 | 424 | ||
421 | #ifndef KAB_EMBEDDED | 425 | #ifndef KAB_EMBEDDED_ |
422 | #include "kabconfigwidget.moc" | 426 | #include "moc_kabconfigwidget.cpp" |
423 | #endif //KAB_EMBEDDED | 427 | #endif //KAB_EMBEDDED |
424 | |||
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 | |||
@@ -26,9 +26,9 @@ | |||
26 | 26 | ||
27 | #include <kprefswidget.h> | 27 | #include <kprefswidget.h> |
28 | 28 | ||
29 | class QCheckBox; | 29 | class QCheckBox; |
30 | class QListViewItem; | 30 | class Q3ListViewItem; |
31 | class QPushButton; | 31 | class QPushButton; |
32 | class QComboBox; | 32 | class QComboBox; |
33 | class QLineEdit; | 33 | class QLineEdit; |
34 | class KListView; | 34 | class KListView; |
@@ -52,10 +52,10 @@ class KABConfigWidget : public KPrefsWidget | |||
52 | 52 | ||
53 | 53 | ||
54 | private slots: | 54 | private slots: |
55 | void configureExtension(); | 55 | void configureExtension(); |
56 | void selectionChanged( QListViewItem* ); | 56 | void selectionChanged( Q3ListViewItem* ); |
57 | void itemClicked( QListViewItem* ); | 57 | void itemClicked( Q3ListViewItem* ); |
58 | 58 | ||
59 | private: | 59 | private: |
60 | void restoreExtensionSettings(); | 60 | void restoreExtensionSettings(); |
61 | void saveExtensionSettings(); | 61 | void saveExtensionSettings(); |
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 | |||
@@ -21,8 +21,10 @@ | |||
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <qlayout.h> | 24 | #include <qlayout.h> |
25 | //Added by qt3to4: | ||
26 | #include <Q3VBoxLayout> | ||
25 | 27 | ||
26 | #ifndef KAB_EMBEDDED | 28 | #ifndef KAB_EMBEDDED |
27 | #include <kaboutdata.h> | 29 | #include <kaboutdata.h> |
28 | #endif //KAB_EMBEDDED | 30 | #endif //KAB_EMBEDDED |
@@ -47,9 +49,9 @@ extern "C" | |||
47 | KCMKabConfig::KCMKabConfig( QWidget *parent, const char *name ) | 49 | KCMKabConfig::KCMKabConfig( QWidget *parent, const char *name ) |
48 | : KCModule( KABPrefs::instance(), parent, name ) | 50 | : KCModule( KABPrefs::instance(), parent, name ) |
49 | { | 51 | { |
50 | //abort(); | 52 | //abort(); |
51 | QVBoxLayout *layout = new QVBoxLayout( this ); | 53 | Q3VBoxLayout *layout = new Q3VBoxLayout( this ); |
52 | mConfigWidget = new KABConfigWidget( (KABPrefs*)getPreferences(), this, "KABConfigWidget" ); | 54 | mConfigWidget = new KABConfigWidget( (KABPrefs*)getPreferences(), this, "KABConfigWidget" ); |
53 | layout->addWidget( mConfigWidget ); | 55 | layout->addWidget( mConfigWidget ); |
54 | layout->setSpacing( 0 ); | 56 | layout->setSpacing( 0 ); |
55 | layout->setMargin( 0 ); | 57 | layout->setMargin( 0 ); |
@@ -86,7 +88,7 @@ const KAboutData* KCMKabConfig::aboutData() const | |||
86 | 88 | ||
87 | } | 89 | } |
88 | #endif //KAB_EMBEDDED | 90 | #endif //KAB_EMBEDDED |
89 | 91 | ||
90 | #ifndef KAB_EMBEDDED | 92 | #ifndef KAB_EMBEDDED_ |
91 | #include "kcmkabconfig.moc" | 93 | #include "moc_kcmkabconfig.cpp" |
92 | #endif //KAB_EMBEDDED | 94 | #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 | |||
@@ -27,17 +27,19 @@ | |||
27 | 27 | ||
28 | #include <qlabel.h> | 28 | #include <qlabel.h> |
29 | #include <qlayout.h> | 29 | #include <qlayout.h> |
30 | #include <qpushbutton.h> | 30 | #include <qpushbutton.h> |
31 | //Added by qt3to4: | ||
32 | #include <Q3GridLayout> | ||
31 | 33 | ||
32 | #ifndef KAB_EMBEDDED | 34 | #ifndef KAB_EMBEDDED |
33 | #include <kaccelmanager.h> | 35 | #include <kaccelmanager.h> |
34 | #include <kio/netaccess.h> | 36 | #include <kio/netaccess.h> |
35 | #include <kmessagebox.h> | 37 | #include <kmessagebox.h> |
36 | #else //KAB_EMBEDDED | 38 | #else //KAB_EMBEDDED |
37 | #include <qmap.h> | 39 | #include <qmap.h> |
38 | #include <qmessagebox.h> | 40 | #include <qmessagebox.h> |
39 | #include <qtextstream.h> | 41 | #include <q3textstream.h> |
40 | #include <kurl.h> | 42 | #include <kurl.h> |
41 | #endif //KAB_EMBEDDED | 43 | #endif //KAB_EMBEDDED |
42 | 44 | ||
43 | #include <kapplication.h> | 45 | #include <kapplication.h> |
@@ -51,9 +53,9 @@ | |||
51 | 53 | ||
52 | KeyWidget::KeyWidget( QWidget *parent, const char *name ) | 54 | KeyWidget::KeyWidget( QWidget *parent, const char *name ) |
53 | : QWidget( parent, name ) | 55 | : QWidget( parent, name ) |
54 | { | 56 | { |
55 | QGridLayout *layout = new QGridLayout( this, 2, 2, KDialog::marginHint(), | 57 | Q3GridLayout *layout = new Q3GridLayout( this, 2, 2, KDialog::marginHint(), |
56 | KDialog::spacingHint() ); | 58 | KDialog::spacingHint() ); |
57 | 59 | ||
58 | QLabel *label = new QLabel( i18n( "Keys:" ), this ); | 60 | QLabel *label = new QLabel( i18n( "Keys:" ), this ); |
59 | layout->addWidget( label, 0, 0 ); | 61 | layout->addWidget( label, 0, 0 ); |
@@ -135,9 +137,9 @@ void KeyWidget::addKey() | |||
135 | 137 | ||
136 | QString tmpFile; | 138 | QString tmpFile; |
137 | if ( KIO::NetAccess::download( url, tmpFile ) ) { | 139 | if ( KIO::NetAccess::download( url, tmpFile ) ) { |
138 | QFile file( tmpFile ); | 140 | QFile file( tmpFile ); |
139 | if ( !file.open( IO_ReadOnly ) ) { | 141 | if ( !file.open( QIODevice::ReadOnly ) ) { |
140 | QString text( i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ) ); | 142 | QString text( i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ) ); |
141 | KMessageBox::error( this, text.arg( url.url() ) ); | 143 | KMessageBox::error( this, text.arg( url.url() ) ); |
142 | return; | 144 | return; |
143 | } | 145 | } |
@@ -151,9 +153,9 @@ void KeyWidget::addKey() | |||
151 | return; | 153 | return; |
152 | 154 | ||
153 | { | 155 | { |
154 | QFile file( keyfile ); | 156 | QFile file( keyfile ); |
155 | if ( !file.open( IO_ReadOnly ) ) { | 157 | if ( !file.open( QIODevice::ReadOnly ) ) { |
156 | QString text( i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ) ); | 158 | QString text( i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ) ); |
157 | QString caption( i18n( "Error" ) ); | 159 | QString caption( i18n( "Error" ) ); |
158 | QMessageBox::critical( this, caption, text.arg( keyfile ) ); | 160 | QMessageBox::critical( this, caption, text.arg( keyfile ) ); |
159 | return; | 161 | return; |
@@ -162,12 +164,12 @@ void KeyWidget::addKey() | |||
162 | #endif //KAB_EMBEDDED | 164 | #endif //KAB_EMBEDDED |
163 | 165 | ||
164 | 166 | ||
165 | 167 | ||
166 | QTextStream s( &file ); | 168 | Q3TextStream s( &file ); |
167 | QString data; | 169 | QString data; |
168 | 170 | ||
169 | s.setEncoding( QTextStream::UnicodeUTF8 ); | 171 | s.setEncoding( Q3TextStream::UnicodeUTF8 ); |
170 | s >> data; | 172 | s >> data; |
171 | file.close(); | 173 | file.close(); |
172 | 174 | ||
173 | KABC::Key key( data, type ); | 175 | KABC::Key key( data, type ); |
@@ -220,10 +222,10 @@ void KeyWidget::exportKey() | |||
220 | #ifndef KAB_EMBEDDED | 222 | #ifndef KAB_EMBEDDED |
221 | KURL url = KFileDialog::getSaveURL(); | 223 | KURL url = KFileDialog::getSaveURL(); |
222 | 224 | ||
223 | KTempFile tempFile; | 225 | KTempFile tempFile; |
224 | QTextStream *s = tempFile.textStream(); | 226 | Q3TextStream *s = tempFile.textStream(); |
225 | s->setEncoding( QTextStream::UnicodeUTF8 ); | 227 | s->setEncoding( Q3TextStream::UnicodeUTF8 ); |
226 | (*s) << key.textData(); | 228 | (*s) << key.textData(); |
227 | tempFile.close(); | 229 | tempFile.close(); |
228 | 230 | ||
229 | KIO::NetAccess::upload( tempFile.name(), url, kapp->mainWidget() ); | 231 | KIO::NetAccess::upload( tempFile.name(), url, kapp->mainWidget() ); |
@@ -234,17 +236,17 @@ void KeyWidget::exportKey() | |||
234 | if ( keyfile.isEmpty() ) | 236 | if ( keyfile.isEmpty() ) |
235 | return; | 237 | return; |
236 | 238 | ||
237 | QFile file( keyfile ); | 239 | QFile file( keyfile ); |
238 | if ( !file.open( IO_ReadWrite ) ) { | 240 | if ( !file.open( QIODevice::ReadWrite ) ) { |
239 | QString text( i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ) ); | 241 | QString text( i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ) ); |
240 | QString caption( i18n( "Error" ) ); | 242 | QString caption( i18n( "Error" ) ); |
241 | QMessageBox::critical( this, caption, text.arg( keyfile ) ); | 243 | QMessageBox::critical( this, caption, text.arg( keyfile ) ); |
242 | return; | 244 | return; |
243 | } | 245 | } |
244 | 246 | ||
245 | QTextStream s( &file ); | 247 | Q3TextStream s( &file ); |
246 | s.setEncoding( QTextStream::UnicodeUTF8 ); | 248 | s.setEncoding( Q3TextStream::UnicodeUTF8 ); |
247 | s << key.textData(); | 249 | s << key.textData(); |
248 | file.close(); | 250 | file.close(); |
249 | 251 | ||
250 | 252 | ||
@@ -271,7 +273,7 @@ void KeyWidget::updateKeyCombo() | |||
271 | mRemoveButton->setEnabled( state ); | 273 | mRemoveButton->setEnabled( state ); |
272 | mExportButton->setEnabled( state ); | 274 | mExportButton->setEnabled( state ); |
273 | } | 275 | } |
274 | 276 | ||
275 | #ifndef KAB_EMBEDDED | 277 | #ifndef KAB_EMBEDDED_ |
276 | #include "keywidget.moc" | 278 | #include "moc_keywidget.cpp" |
277 | #endif //KAB_EMBEDDED | 279 | #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 | |||
@@ -4,10 +4,9 @@ | |||
4 | #include <stdlib.h> | 4 | #include <stdlib.h> |
5 | #else | 5 | #else |
6 | #include <qapplication.h> | 6 | #include <qapplication.h> |
7 | #include <qwindowsstyle.h> | 7 | #include <qwindowsstyle.h> |
8 | #include <qplatinumstyle.h> | 8 | #include <q3mainwindow.h> |
9 | #include <qmainwindow.h> | ||
10 | #include <qmessagebox.h> | 9 | #include <qmessagebox.h> |
11 | #include <stdlib.h> | 10 | #include <stdlib.h> |
12 | #endif | 11 | #endif |
13 | 12 | ||
@@ -23,14 +22,14 @@ | |||
23 | #include <libkdepim/kpimglobalprefs.h> | 22 | #include <libkdepim/kpimglobalprefs.h> |
24 | void dumpMissing(); | 23 | void dumpMissing(); |
25 | int main( int argc, char **argv ) | 24 | int main( int argc, char **argv ) |
26 | { | 25 | { |
26 | if(!getenv("QPEDIR")) putenv("QPEDIR=/usr/lib/kdepimpi"); | ||
27 | #ifndef DESKTOP_VERSION | 27 | #ifndef DESKTOP_VERSION |
28 | QPEApplication a( argc, argv ); | 28 | QPEApplication a( argc, argv ); |
29 | a.setKeepRunning (); | 29 | a.setKeepRunning (); |
30 | #else | 30 | #else |
31 | QApplication a( argc, argv ); | 31 | QApplication a( argc, argv ); |
32 | QApplication::setStyle( new QPlatinumStyle ()); | ||
33 | #ifdef _WIN32_ | 32 | #ifdef _WIN32_ |
34 | QString hdir ( getenv( "HOME") ); | 33 | QString hdir ( getenv( "HOME") ); |
35 | if ( hdir.isEmpty() ) { | 34 | if ( hdir.isEmpty() ) { |
36 | QString hd ("C:/" ); | 35 | QString hd ("C:/" ); |
diff --git a/kaddressbook/nameeditdialog.cpp b/kaddressbook/nameeditdialog.cpp index 199f3d6..96822d8 100644 --- a/kaddressbook/nameeditdialog.cpp +++ b/kaddressbook/nameeditdialog.cpp | |||
@@ -22,14 +22,16 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <qlayout.h> | 24 | #include <qlayout.h> |
25 | #include <qlabel.h> | 25 | #include <qlabel.h> |
26 | #include <qlistbox.h> | 26 | #include <q3listbox.h> |
27 | #include <qlistview.h> | 27 | #include <q3listview.h> |
28 | #include <qtooltip.h> | 28 | #include <qtooltip.h> |
29 | #include <qpushbutton.h> | 29 | #include <qpushbutton.h> |
30 | #include <qcheckbox.h> | 30 | #include <qcheckbox.h> |
31 | #include <qstring.h> | 31 | #include <qstring.h> |
32 | //Added by qt3to4: | ||
33 | #include <Q3GridLayout> | ||
32 | 34 | ||
33 | #ifndef KAB_EMBEDDED | 35 | #ifndef KAB_EMBEDDED |
34 | #include <kaccelmanager.h> | 36 | #include <kaccelmanager.h> |
35 | #else //KAB_EMBEDDED | 37 | #else //KAB_EMBEDDED |
@@ -56,9 +58,9 @@ NameEditDialog::NameEditDialog( const KABC::Addressee &addr, int type, | |||
56 | Ok, parent, name, true ) | 58 | Ok, parent, name, true ) |
57 | { | 59 | { |
58 | 60 | ||
59 | QWidget *page = plainPage(); | 61 | QWidget *page = plainPage(); |
60 | QGridLayout *layout = new QGridLayout( page, 5, 3 ); | 62 | Q3GridLayout *layout = new Q3GridLayout( page, 5, 3 ); |
61 | layout->setSpacing( spacingHint() ); | 63 | layout->setSpacing( spacingHint() ); |
62 | layout->addColSpacing( 2, 100 ); | 64 | layout->addColSpacing( 2, 100 ); |
63 | QLabel *label; | 65 | QLabel *label; |
64 | 66 | ||
@@ -294,7 +296,7 @@ void NameEditDialog::slotHelp() | |||
294 | qDebug("NameEditDialog::slotHelp Help is not supported yet"); | 296 | qDebug("NameEditDialog::slotHelp Help is not supported yet"); |
295 | #endif //KAB_EMBEDDED | 297 | #endif //KAB_EMBEDDED |
296 | } | 298 | } |
297 | 299 | ||
298 | #ifndef KAB_EMBEDDED | 300 | #ifndef KAB_EMBEDDED_ |
299 | #include "nameeditdialog.moc" | 301 | #include "moc_nameeditdialog.cpp" |
300 | #endif //KAB_EMBEDDED | 302 | #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 | |||
@@ -315,15 +315,15 @@ void MainWindow::initActions() | |||
315 | { | 315 | { |
316 | iconToolBar->clear(); | 316 | iconToolBar->clear(); |
317 | KABPrefs *p = KABPrefs::instance(); | 317 | KABPrefs *p = KABPrefs::instance(); |
318 | QPEMenuBar *menuBar1 = new QPEMenuBar( iconToolBar ); | 318 | QPEMenuBar *menuBar1 = new QPEMenuBar( iconToolBar ); |
319 | QPopupMenu *menuBar = new QPopupMenu( this ); | 319 | Q3PopupMenu *menuBar = new Q3PopupMenu( this ); |
320 | menuBar1->insertItem( "ME", menuBar); | 320 | menuBar1->insertItem( "ME", menuBar); |
321 | QPopupMenu *fileMenu = new QPopupMenu( this ); | 321 | Q3PopupMenu *fileMenu = new Q3PopupMenu( this ); |
322 | QPopupMenu *editMenu = new QPopupMenu( this ); | 322 | Q3PopupMenu *editMenu = new Q3PopupMenu( this ); |
323 | QPopupMenu *viewMenu = new QPopupMenu( this ); | 323 | Q3PopupMenu *viewMenu = new Q3PopupMenu( this ); |
324 | QPopupMenu *settingsMenu = new QPopupMenu( this ); | 324 | Q3PopupMenu *settingsMenu = new Q3PopupMenu( this ); |
325 | QPopupMenu *importMenu = new QPopupMenu( this ); | 325 | Q3PopupMenu *importMenu = new Q3PopupMenu( this ); |
326 | 326 | ||
327 | menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); | 327 | menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); |
328 | 328 | ||
329 | QIconSet icon; | 329 | QIconSet icon; |
diff --git a/kaddressbook/phoneeditwidget.cpp b/kaddressbook/phoneeditwidget.cpp index df3b551..3661677 100644 --- a/kaddressbook/phoneeditwidget.cpp +++ b/kaddressbook/phoneeditwidget.cpp | |||
@@ -26,15 +26,21 @@ | |||
26 | #include <qtooltip.h> | 26 | #include <qtooltip.h> |
27 | #include <qpushbutton.h> | 27 | #include <qpushbutton.h> |
28 | #include <qcheckbox.h> | 28 | #include <qcheckbox.h> |
29 | #include <qstring.h> | 29 | #include <qstring.h> |
30 | #include <qlistbox.h> | 30 | #include <q3listbox.h> |
31 | #include <qlistview.h> | 31 | #include <q3listview.h> |
32 | #include <qbuttongroup.h> | 32 | #include <q3buttongroup.h> |
33 | #include <qhbox.h> | 33 | #include <q3hbox.h> |
34 | #include <qcursor.h> | 34 | #include <qcursor.h> |
35 | #include <qtimer.h> | 35 | #include <qtimer.h> |
36 | #include <qapplication.h> | 36 | #include <qapplication.h> |
37 | //Added by qt3to4: | ||
38 | #include <Q3ValueList> | ||
39 | #include <Q3GridLayout> | ||
40 | #include <Q3Frame> | ||
41 | #include <Q3PopupMenu> | ||
42 | #include <Q3VBoxLayout> | ||
37 | 43 | ||
38 | #include <kbuttonbox.h> | 44 | #include <kbuttonbox.h> |
39 | #include <klistview.h> | 45 | #include <klistview.h> |
40 | #include <kapplication.h> | 46 | #include <kapplication.h> |
@@ -56,9 +62,9 @@ | |||
56 | 62 | ||
57 | PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name ) | 63 | PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name ) |
58 | : QWidget(parent,name) | 64 | : QWidget(parent,name) |
59 | { | 65 | { |
60 | QGridLayout* gridLayout = new QGridLayout ( this, 2,2 ); | 66 | Q3GridLayout* gridLayout = new Q3GridLayout ( this, 2,2 ); |
61 | 67 | ||
62 | QLabel *temp = new QLabel( "", this ); | 68 | QLabel *temp = new QLabel( "", this ); |
63 | temp->setAlignment( Qt::AlignCenter ); | 69 | temp->setAlignment( Qt::AlignCenter ); |
64 | temp->setPixmap( KGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Desktop, 0 ) ); | 70 | temp->setPixmap( KGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Desktop, 0 ) ); |
@@ -66,16 +72,16 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name ) | |||
66 | addBut->setPixmap ( SmallIcon("plus")); | 72 | addBut->setPixmap ( SmallIcon("plus")); |
67 | addBut->setMaximumSize( addBut->sizeHint().height(),addBut->sizeHint().height() ); | 73 | addBut->setMaximumSize( addBut->sizeHint().height(),addBut->sizeHint().height() ); |
68 | connect(addBut,SIGNAL(clicked ()),SLOT(addNumber())); | 74 | connect(addBut,SIGNAL(clicked ()),SLOT(addNumber())); |
69 | 75 | ||
70 | sv = new QScrollView( this ); | 76 | sv = new Q3ScrollView( this ); |
71 | sv->setFrameStyle ( QFrame::Plain ); | 77 | sv->setFrameStyle ( Q3Frame::Plain ); |
72 | sv->setLineWidth ( 0 ); | 78 | sv->setLineWidth ( 0 ); |
73 | sv->setMidLineWidth ( 0 ); | 79 | sv->setMidLineWidth ( 0 ); |
74 | mw = new QWidget ( sv->viewport() ); | 80 | mw = new QWidget ( sv->viewport() ); |
75 | sv->addChild(mw); | 81 | sv->addChild(mw); |
76 | sv->setResizePolicy( QScrollView::AutoOneFit ); | 82 | sv->setResizePolicy( Q3ScrollView::AutoOneFit ); |
77 | mainLayout = new QVBoxLayout ( mw ); | 83 | mainLayout = new Q3VBoxLayout ( mw ); |
78 | mainLayout->setMargin( 0 ); | 84 | mainLayout->setMargin( 0 ); |
79 | mainLayout->setSpacing( 0 ); | 85 | mainLayout->setSpacing( 0 ); |
80 | gridLayout->setMargin( 2 ); | 86 | gridLayout->setMargin( 2 ); |
81 | gridLayout->setSpacing( 4 ); | 87 | gridLayout->setSpacing( 4 ); |
@@ -89,9 +95,9 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name ) | |||
89 | gridLayout->addMultiCellWidget( sv, 0, 1, 1,1 ); | 95 | gridLayout->addMultiCellWidget( sv, 0, 1, 1,1 ); |
90 | } | 96 | } |
91 | setDefaults(); | 97 | setDefaults(); |
92 | mTypeNumberEditList.setAutoDelete( true ); | 98 | mTypeNumberEditList.setAutoDelete( true ); |
93 | mPopup = new QPopupMenu( this ); | 99 | mPopup = new Q3PopupMenu( this ); |
94 | QStringList list = PhoneNumber::supportedTypeListNames(); | 100 | QStringList list = PhoneNumber::supportedTypeListNames(); |
95 | mPopupCount = list.count(); | 101 | mPopupCount = list.count(); |
96 | int i = 0; | 102 | int i = 0; |
97 | while ( i < mPopupCount ) { | 103 | while ( i < mPopupCount ) { |
@@ -225,9 +231,9 @@ KABC::PhoneNumber::List PhoneEditWidget::phoneNumbers() | |||
225 | #if 0 | 231 | #if 0 |
226 | PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name ) | 232 | PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name ) |
227 | : QWidget( parent, name ) | 233 | : QWidget( parent, name ) |
228 | { | 234 | { |
229 | QGridLayout *layout = new QGridLayout( this, 4, 1 ); | 235 | Q3GridLayout *layout = new Q3GridLayout( this, 4, 1 ); |
230 | //US layout->setSpacing( KDialog::spacingHint() ); | 236 | //US layout->setSpacing( KDialog::spacingHint() ); |
231 | layout->setSpacing( KDialogBase::spacingHintSmall() ); | 237 | layout->setSpacing( KDialogBase::spacingHintSmall() ); |
232 | 238 | ||
233 | 239 | ||
@@ -235,9 +241,9 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name ) | |||
235 | QLabel* label = new QLabel( this ); | 241 | QLabel* label = new QLabel( this ); |
236 | //US loadIcon call is ambiguous. Add one more parameter | 242 | //US loadIcon call is ambiguous. Add one more parameter |
237 | //US label->setPixmap( KGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Desktop ) ); | 243 | //US label->setPixmap( KGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Desktop ) ); |
238 | label->setPixmap( KGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Desktop, 0 ) ); | 244 | label->setPixmap( KGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Desktop, 0 ) ); |
239 | label->setAlignment( AlignCenter ); | 245 | label->setAlignment( Qt::AlignCenter ); |
240 | //US layout->addMultiCellWidget( label, 0, 1, 3, 3 ); | 246 | //US layout->addMultiCellWidget( label, 0, 1, 3, 3 ); |
241 | layout->addWidget( label, 0, 0 ); | 247 | layout->addWidget( label, 0, 0 ); |
242 | 248 | ||
243 | QPushButton *editButton = new QPushButton( i18n( "Edit Phone Numbers..." ), | 249 | QPushButton *editButton = new QPushButton( i18n( "Edit Phone Numbers..." ), |
@@ -326,9 +332,9 @@ void PhoneEditWidget::setPhoneNumbers( const KABC::PhoneNumber::List &list ) | |||
326 | 332 | ||
327 | // Insert types for existing numbers. | 333 | // Insert types for existing numbers. |
328 | mPrefCombo->insertTypeList( list ); | 334 | mPrefCombo->insertTypeList( list ); |
329 | 335 | ||
330 | QValueList<int> defaultTypes; | 336 | Q3ValueList<int> defaultTypes; |
331 | defaultTypes << KABC::PhoneNumber::Home; | 337 | defaultTypes << KABC::PhoneNumber::Home; |
332 | defaultTypes << KABC::PhoneNumber::Work; | 338 | defaultTypes << KABC::PhoneNumber::Work; |
333 | defaultTypes << KABC::PhoneNumber::Cell; | 339 | defaultTypes << KABC::PhoneNumber::Cell; |
334 | defaultTypes << ( KABC::PhoneNumber::Work | KABC::PhoneNumber::Fax ); | 340 | defaultTypes << ( KABC::PhoneNumber::Work | KABC::PhoneNumber::Fax ); |
@@ -336,9 +342,9 @@ void PhoneEditWidget::setPhoneNumbers( const KABC::PhoneNumber::List &list ) | |||
336 | 342 | ||
337 | // Insert default types. | 343 | // Insert default types. |
338 | // Doing this for mPrefCombo is enough because the list is shared by all | 344 | // Doing this for mPrefCombo is enough because the list is shared by all |
339 | // combos. | 345 | // combos. |
340 | QValueList<int>::ConstIterator it; | 346 | Q3ValueList<int>::ConstIterator it; |
341 | for( it = defaultTypes.begin(); it != defaultTypes.end(); ++it ) { | 347 | for( it = defaultTypes.begin(); it != defaultTypes.end(); ++it ) { |
342 | if ( !mPrefCombo->hasType( *it ) ) | 348 | if ( !mPrefCombo->hasType( *it ) ) |
343 | mPrefCombo->insertType( list, *it, PhoneNumber( "", *it ) ); | 349 | mPrefCombo->insertType( list, *it, PhoneNumber( "", *it ) ); |
344 | } | 350 | } |
@@ -486,12 +492,12 @@ void PhoneEditWidget::updateOtherEdit( PhoneTypeCombo *combo, PhoneTypeCombo *ot | |||
486 | 492 | ||
487 | /////////////////////////////////////////// | 493 | /////////////////////////////////////////// |
488 | // PhoneEditDialog | 494 | // PhoneEditDialog |
489 | 495 | ||
490 | class PhoneViewItem : public QListViewItem | 496 | class PhoneViewItem : public Q3ListViewItem |
491 | { | 497 | { |
492 | public: | 498 | public: |
493 | PhoneViewItem( QListView *parent, const KABC::PhoneNumber &number ); | 499 | PhoneViewItem( Q3ListView *parent, const KABC::PhoneNumber &number ); |
494 | 500 | ||
495 | void setPhoneNumber( const KABC::PhoneNumber &number ) | 501 | void setPhoneNumber( const KABC::PhoneNumber &number ) |
496 | { | 502 | { |
497 | mPhoneNumber = number; | 503 | mPhoneNumber = number; |
@@ -510,10 +516,10 @@ private: | |||
510 | 516 | ||
511 | KABC::PhoneNumber mPhoneNumber; | 517 | KABC::PhoneNumber mPhoneNumber; |
512 | }; | 518 | }; |
513 | 519 | ||
514 | PhoneViewItem::PhoneViewItem( QListView *parent, const KABC::PhoneNumber &number ) | 520 | PhoneViewItem::PhoneViewItem( Q3ListView *parent, const KABC::PhoneNumber &number ) |
515 | : QListViewItem( parent ), mPhoneNumber( number ) | 521 | : Q3ListViewItem( parent ), mPhoneNumber( number ) |
516 | { | 522 | { |
517 | #ifdef DESKTOP_VERSION | 523 | #ifdef DESKTOP_VERSION |
518 | setRenameEnabled ( 0, true ); | 524 | setRenameEnabled ( 0, true ); |
519 | #endif | 525 | #endif |
@@ -543,17 +549,17 @@ PhoneEditDialog::PhoneEditDialog( const KABC::PhoneNumber::List &list, QWidget * | |||
543 | mPhoneNumberList = list; | 549 | mPhoneNumberList = list; |
544 | 550 | ||
545 | QWidget *page = plainPage(); | 551 | QWidget *page = plainPage(); |
546 | 552 | ||
547 | QGridLayout *layout = new QGridLayout( page, 1, 2 ); | 553 | Q3GridLayout *layout = new Q3GridLayout( page, 1, 2 ); |
548 | layout->setSpacing( spacingHint() ); | 554 | layout->setSpacing( spacingHint() ); |
549 | 555 | ||
550 | mListView = new KListView( page ); | 556 | mListView = new KListView( page ); |
551 | mListView->setAllColumnsShowFocus( true ); | 557 | mListView->setAllColumnsShowFocus( true ); |
552 | mListView->addColumn( i18n( "Number" ) ); | 558 | mListView->addColumn( i18n( "Number" ) ); |
553 | mListView->addColumn( i18n( "Type" ) ); | 559 | mListView->addColumn( i18n( "Type" ) ); |
554 | 560 | ||
555 | KButtonBox *buttonBox = new KButtonBox( page, Vertical ); | 561 | KButtonBox *buttonBox = new KButtonBox( page, Qt::Vertical ); |
556 | 562 | ||
557 | buttonBox->addButton( i18n( "&Add..." ), this, SLOT( slotAddPhoneNumber() ) ); | 563 | buttonBox->addButton( i18n( "&Add..." ), this, SLOT( slotAddPhoneNumber() ) ); |
558 | mEditButton = buttonBox->addButton( i18n( "&Edit..." ), this, SLOT( slotEditPhoneNumber() ) ); | 564 | mEditButton = buttonBox->addButton( i18n( "&Edit..." ), this, SLOT( slotEditPhoneNumber() ) ); |
559 | mEditButton->setEnabled( false ); | 565 | mEditButton->setEnabled( false ); |
@@ -564,9 +570,9 @@ PhoneEditDialog::PhoneEditDialog( const KABC::PhoneNumber::List &list, QWidget * | |||
564 | layout->addWidget( mListView, 0, 0 ); | 570 | layout->addWidget( mListView, 0, 0 ); |
565 | layout->addWidget( buttonBox, 0, 1 ); | 571 | layout->addWidget( buttonBox, 0, 1 ); |
566 | 572 | ||
567 | connect( mListView, SIGNAL(selectionChanged()), SLOT(slotSelectionChanged()) ); | 573 | connect( mListView, SIGNAL(selectionChanged()), SLOT(slotSelectionChanged()) ); |
568 | connect( mListView, SIGNAL(doubleClicked( QListViewItem *, const QPoint &, int )), this, SLOT( slotEditPhoneNumber())); | 574 | connect( mListView, SIGNAL(doubleClicked( Q3ListViewItem *, const QPoint &, int )), this, SLOT( slotEditPhoneNumber())); |
569 | 575 | ||
570 | KABC::PhoneNumber::List::Iterator it; | 576 | KABC::PhoneNumber::List::Iterator it; |
571 | for ( it = mPhoneNumberList.begin(); it != mPhoneNumberList.end(); ++it ) | 577 | for ( it = mPhoneNumberList.begin(); it != mPhoneNumberList.end(); ++it ) |
572 | new PhoneViewItem( mListView, *it ); | 578 | new PhoneViewItem( mListView, *it ); |
@@ -587,9 +593,9 @@ void PhoneEditDialog::slotAddPhoneNumber() | |||
587 | KABC::PhoneNumber tmp( "", 0 ); | 593 | KABC::PhoneNumber tmp( "", 0 ); |
588 | PhoneTypeDialog dlg( tmp, this ); | 594 | PhoneTypeDialog dlg( tmp, this ); |
589 | 595 | ||
590 | if ( dlg.exec() ) { | 596 | if ( dlg.exec() ) { |
591 | QListViewItem* i = mListView->firstChild(); | 597 | Q3ListViewItem* i = mListView->firstChild(); |
592 | KABC::PhoneNumber phoneNumber = dlg.phoneNumber(); | 598 | KABC::PhoneNumber phoneNumber = dlg.phoneNumber(); |
593 | bool insert = true; | 599 | bool insert = true; |
594 | while ( i ) { | 600 | while ( i ) { |
595 | PhoneViewItem* p = ( PhoneViewItem* ) i; | 601 | PhoneViewItem* p = ( PhoneViewItem* ) i; |
@@ -619,9 +625,9 @@ void PhoneEditDialog::slotRemovePhoneNumber() | |||
619 | if ( !item ) | 625 | if ( !item ) |
620 | return; | 626 | return; |
621 | 627 | ||
622 | mPhoneNumberList.remove( item->phoneNumber() ); | 628 | mPhoneNumberList.remove( item->phoneNumber() ); |
623 | QListViewItem *currItem = mListView->currentItem(); | 629 | Q3ListViewItem *currItem = mListView->currentItem(); |
624 | mListView->takeItem( currItem ); | 630 | mListView->takeItem( currItem ); |
625 | delete currItem; | 631 | delete currItem; |
626 | 632 | ||
627 | mChanged = true; | 633 | mChanged = true; |
@@ -672,9 +678,9 @@ PhoneTypeDialog::PhoneTypeDialog( const KABC::PhoneNumber &phoneNumber, | |||
672 | parent, name, true), mPhoneNumber( phoneNumber ) | 678 | parent, name, true), mPhoneNumber( phoneNumber ) |
673 | { | 679 | { |
674 | QWidget *page = plainPage(); | 680 | QWidget *page = plainPage(); |
675 | QLabel *label = 0; | 681 | QLabel *label = 0; |
676 | QGridLayout *layout = new QGridLayout( page, 3, 2, marginHint(), spacingHint() ); | 682 | Q3GridLayout *layout = new Q3GridLayout( page, 3, 2, marginHint(), spacingHint() ); |
677 | 683 | ||
678 | label = new QLabel( i18n( "Number:" ), page ); | 684 | label = new QLabel( i18n( "Number:" ), page ); |
679 | layout->addWidget( label, 0, 0 ); | 685 | layout->addWidget( label, 0, 0 ); |
680 | mNumber = new KLineEdit( page ); | 686 | mNumber = new KLineEdit( page ); |
@@ -682,9 +688,9 @@ PhoneTypeDialog::PhoneTypeDialog( const KABC::PhoneNumber &phoneNumber, | |||
682 | 688 | ||
683 | mPreferredBox = new QCheckBox( i18n( "This is the preferred phone number" ), page ); | 689 | mPreferredBox = new QCheckBox( i18n( "This is the preferred phone number" ), page ); |
684 | layout->addMultiCellWidget( mPreferredBox, 1, 1, 0, 1 ); | 690 | layout->addMultiCellWidget( mPreferredBox, 1, 1, 0, 1 ); |
685 | 691 | ||
686 | mGroup = new QButtonGroup( 2, Horizontal, i18n( "Types" ), page ); | 692 | mGroup = new Q3ButtonGroup( 2, Qt::Horizontal, i18n( "Types" ), page ); |
687 | layout->addMultiCellWidget( mGroup, 2, 2, 0, 1 ); | 693 | layout->addMultiCellWidget( mGroup, 2, 2, 0, 1 ); |
688 | 694 | ||
689 | // fill widgets | 695 | // fill widgets |
690 | mNumber->setText( mPhoneNumber.number() ); | 696 | mNumber->setText( mPhoneNumber.number() ); |
@@ -725,7 +731,7 @@ KABC::PhoneNumber PhoneTypeDialog::phoneNumber() | |||
725 | 731 | ||
726 | return mPhoneNumber; | 732 | return mPhoneNumber; |
727 | } | 733 | } |
728 | #endif | 734 | #endif |
729 | #ifndef KAB_EMBEDDED | 735 | #ifndef KAB_EMBEDDED_ |
730 | #include "phoneeditwidget.moc" | 736 | #include "moc_phoneeditwidget.cpp" |
731 | #endif //KAB_EMBEDDED | 737 | #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 | |||
@@ -26,18 +26,22 @@ | |||
26 | #include <kdialogbase.h> | 26 | #include <kdialogbase.h> |
27 | #include <kiconloader.h> | 27 | #include <kiconloader.h> |
28 | #include <qpushbutton.h> | 28 | #include <qpushbutton.h> |
29 | #include <qlayout.h> | 29 | #include <qlayout.h> |
30 | #include <qpopupmenu.h> | 30 | #include <q3popupmenu.h> |
31 | #include <qapplication.h> | 31 | #include <qapplication.h> |
32 | #include <QDesktopWidget> | ||
32 | 33 | ||
33 | #include <qptrlist.h> | 34 | #include <q3ptrlist.h> |
34 | #include <qscrollview.h> | 35 | #include <q3scrollview.h> |
36 | //Added by qt3to4: | ||
37 | #include <Q3HBoxLayout> | ||
38 | #include <Q3VBoxLayout> | ||
35 | 39 | ||
36 | #include "addresseeconfig.h" | 40 | #include "addresseeconfig.h" |
37 | #include "typecombo.h" | 41 | #include "typecombo.h" |
38 | 42 | ||
39 | class QButtonGroup; | 43 | class Q3ButtonGroup; |
40 | class QCheckBox; | 44 | class QCheckBox; |
41 | class PhoneTypeNumberEdit; | 45 | class PhoneTypeNumberEdit; |
42 | 46 | ||
43 | #include <klineedit.h> | 47 | #include <klineedit.h> |
@@ -75,17 +79,17 @@ class PhoneEditWidget : public QWidget | |||
75 | void pendingDelete(); | 79 | void pendingDelete(); |
76 | protected: | 80 | protected: |
77 | 81 | ||
78 | private: | 82 | private: |
79 | QScrollView* sv; | 83 | Q3ScrollView* sv; |
80 | QPopupMenu *mPopup; | 84 | Q3PopupMenu *mPopup; |
81 | int mPopupCount; | 85 | int mPopupCount; |
82 | PhoneTypeNumberEdit* mPendingDelete; | 86 | PhoneTypeNumberEdit* mPendingDelete; |
83 | void setDefaults(); | 87 | void setDefaults(); |
84 | PhoneTypeNumberEdit* appendEditCombo(); | 88 | PhoneTypeNumberEdit* appendEditCombo(); |
85 | QWidget* mw; | 89 | QWidget* mw; |
86 | QVBoxLayout* mainLayout; | 90 | Q3VBoxLayout* mainLayout; |
87 | QPtrList <PhoneTypeNumberEdit> mTypeNumberEditList; | 91 | Q3PtrList <PhoneTypeNumberEdit> mTypeNumberEditList; |
88 | 92 | ||
89 | }; | 93 | }; |
90 | 94 | ||
91 | 95 | ||
@@ -94,16 +98,16 @@ class PhoneTypeNumberEdit : public QWidget | |||
94 | Q_OBJECT | 98 | Q_OBJECT |
95 | public: | 99 | public: |
96 | PhoneTypeNumberEdit( QWidget *parent, const char *name = 0 ) :QWidget( parent ) | 100 | PhoneTypeNumberEdit( QWidget *parent, const char *name = 0 ) :QWidget( parent ) |
97 | { | 101 | { |
98 | QHBoxLayout * lay = new QHBoxLayout( this ); | 102 | Q3HBoxLayout * lay = new Q3HBoxLayout( this ); |
99 | lay->setSpacing( 2 ); | 103 | lay->setSpacing( 2 ); |
100 | lay->setMargin( 0 ); | 104 | lay->setMargin( 0 ); |
101 | mMinusButton = new QPushButton ( this ); | 105 | mMinusButton = new QPushButton ( this ); |
102 | mMinusButton->setPixmap ( SmallIcon("minus")); | 106 | mMinusButton->setPixmap ( SmallIcon("minus")); |
103 | mCombo = new KComboBox( this ); | 107 | mCombo = new KComboBox( this ); |
104 | if ( QApplication::desktop()->width() <= 640 ) | 108 | if ( QApplication::desktop()->width() <= 640 ) |
105 | mCombo->setSizeLimit ( 6 ); | 109 | mCombo->setMaxVisibleItems ( 6 ); |
106 | mNumber = new KLineEdit( this ); | 110 | mNumber = new KLineEdit( this ); |
107 | mMinusButton->setMaximumHeight( mNumber->sizeHint().height() + 6); | 111 | mMinusButton->setMaximumHeight( mNumber->sizeHint().height() + 6); |
108 | lay->addWidget( mMinusButton ); | 112 | lay->addWidget( mMinusButton ); |
109 | lay->addWidget( mCombo ); | 113 | lay->addWidget( mCombo ); |
diff --git a/kaddressbook/secrecywidget.cpp b/kaddressbook/secrecywidget.cpp index 4a2acc8..1c237c0 100644 --- a/kaddressbook/secrecywidget.cpp +++ b/kaddressbook/secrecywidget.cpp | |||
@@ -21,8 +21,10 @@ | |||
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <qlayout.h> | 24 | #include <qlayout.h> |
25 | //Added by qt3to4: | ||
26 | #include <Q3VBoxLayout> | ||
25 | 27 | ||
26 | #include <kabc/secrecy.h> | 28 | #include <kabc/secrecy.h> |
27 | #include <kcombobox.h> | 29 | #include <kcombobox.h> |
28 | #include <kdialog.h> | 30 | #include <kdialog.h> |
@@ -31,9 +33,9 @@ | |||
31 | 33 | ||
32 | SecrecyWidget::SecrecyWidget( QWidget *parent, const char *name ) | 34 | SecrecyWidget::SecrecyWidget( QWidget *parent, const char *name ) |
33 | : QWidget( parent, name ) | 35 | : QWidget( parent, name ) |
34 | { | 36 | { |
35 | QVBoxLayout *layout = new QVBoxLayout( this, KDialog::marginHint(), | 37 | Q3VBoxLayout *layout = new Q3VBoxLayout( this, KDialog::marginHint(), |
36 | KDialog::spacingHint() ); | 38 | KDialog::spacingHint() ); |
37 | mSecrecyCombo = new KComboBox( this ); | 39 | mSecrecyCombo = new KComboBox( this ); |
38 | layout->addWidget( mSecrecyCombo ); | 40 | layout->addWidget( mSecrecyCombo ); |
39 | 41 | ||
@@ -64,7 +66,7 @@ KABC::Secrecy SecrecyWidget::secrecy() const | |||
64 | 66 | ||
65 | return secrecy; | 67 | return secrecy; |
66 | } | 68 | } |
67 | 69 | ||
68 | #ifndef KAB_EMBEDDED | 70 | #ifndef KAB_EMBEDDED_ |
69 | #include "secrecywidget.moc" | 71 | #include "moc_secrecywidget.cpp" |
70 | #endif //KAB_EMBEDDED | 72 | #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 | |||
@@ -113,7 +113,7 @@ void RedoStack::redo() | |||
113 | command->redo(); | 113 | command->redo(); |
114 | UndoStack::instance()->push( command ); | 114 | UndoStack::instance()->push( command ); |
115 | } | 115 | } |
116 | 116 | ||
117 | #ifndef KAB_EMBEDDED | 117 | #ifndef KAB_EMBEDDED_ |
118 | #include "undo.moc" | 118 | #include "moc_undo.cpp" |
119 | #endif //KAB_EMBEDDED | 119 | #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 | |||
@@ -24,9 +24,9 @@ | |||
24 | #ifndef UNDO_H | 24 | #ifndef UNDO_H |
25 | #define UNDO_H | 25 | #define UNDO_H |
26 | 26 | ||
27 | #include <qobject.h> | 27 | #include <qobject.h> |
28 | #include <qptrstack.h> | 28 | #include <q3ptrstack.h> |
29 | #include <qstring.h> | 29 | #include <qstring.h> |
30 | 30 | ||
31 | class Command | 31 | class Command |
32 | { | 32 | { |
@@ -66,9 +66,9 @@ class StackBase : public QObject | |||
66 | * use the stack, however the subclasses need it to modify the stack. | 66 | * use the stack, however the subclasses need it to modify the stack. |
67 | */ | 67 | */ |
68 | Command *pop(); | 68 | Command *pop(); |
69 | 69 | ||
70 | QPtrStack<Command> mCommandStack; | 70 | Q3PtrStack<Command> mCommandStack; |
71 | }; | 71 | }; |
72 | 72 | ||
73 | class UndoStack : public StackBase | 73 | class UndoStack : public StackBase |
74 | { | 74 | { |
diff --git a/kaddressbook/undocmds.cpp b/kaddressbook/undocmds.cpp index 5807dc0..e900b00 100644 --- a/kaddressbook/undocmds.cpp +++ b/kaddressbook/undocmds.cpp | |||
@@ -20,9 +20,9 @@ | |||
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <qtextstream.h> | 24 | #include <q3textstream.h> |
25 | 25 | ||
26 | #include <qapplication.h> | 26 | #include <qapplication.h> |
27 | #include <qclipboard.h> | 27 | #include <qclipboard.h> |
28 | 28 | ||
diff --git a/kaddressbook/viewconfigurefieldspage.cpp b/kaddressbook/viewconfigurefieldspage.cpp index 5daae1a..7366a0b 100644 --- a/kaddressbook/viewconfigurefieldspage.cpp +++ b/kaddressbook/viewconfigurefieldspage.cpp | |||
@@ -35,22 +35,26 @@ | |||
35 | #include <klocale.h> | 35 | #include <klocale.h> |
36 | 36 | ||
37 | #include <qtoolbutton.h> | 37 | #include <qtoolbutton.h> |
38 | #include <qapplication.h> | 38 | #include <qapplication.h> |
39 | #include <QDesktopWidget> | ||
39 | #include <qlabel.h> | 40 | #include <qlabel.h> |
40 | #include <qlistbox.h> | 41 | #include <q3listbox.h> |
41 | #include <qlayout.h> | 42 | #include <qlayout.h> |
43 | //Added by qt3to4: | ||
44 | #include <Q3GridLayout> | ||
45 | #include <Q3BoxLayout> | ||
42 | 46 | ||
43 | #include "viewconfigurefieldspage.h" | 47 | #include "viewconfigurefieldspage.h" |
44 | 48 | ||
45 | class FieldItem : public QListBoxText | 49 | class FieldItem : public Q3ListBoxText |
46 | { | 50 | { |
47 | public: | 51 | public: |
48 | FieldItem( QListBox *parent, KABC::Field *field ) | 52 | FieldItem( Q3ListBox *parent, KABC::Field *field ) |
49 | : QListBoxText( parent, field->label() ), mField( field ) {} | 53 | : Q3ListBoxText( parent, field->label() ), mField( field ) {} |
50 | 54 | ||
51 | FieldItem( QListBox *parent, KABC::Field *field, int index ) | 55 | FieldItem( Q3ListBox *parent, KABC::Field *field, int index ) |
52 | : QListBoxText( parent, field->label(), parent->item( index ) ), | 56 | : Q3ListBoxText( parent, field->label(), parent->item( index ) ), |
53 | mField( field ) {} | 57 | mField( field ) {} |
54 | 58 | ||
55 | KABC::Field *field() { return mField; } | 59 | KABC::Field *field() { return mField; } |
56 | 60 | ||
@@ -105,9 +109,9 @@ void ViewConfigureFieldsPage::slotShowFields( int index ) | |||
105 | KABC::Field::List allFields = mAddressBook->fields( category ); | 109 | KABC::Field::List allFields = mAddressBook->fields( category ); |
106 | 110 | ||
107 | KABC::Field::List::ConstIterator it; | 111 | KABC::Field::List::ConstIterator it; |
108 | for ( it = allFields.begin(); it != allFields.end(); ++it ) { | 112 | for ( it = allFields.begin(); it != allFields.end(); ++it ) { |
109 | QListBoxItem *item = mSelectedBox->firstItem(); | 113 | Q3ListBoxItem *item = mSelectedBox->firstItem(); |
110 | while( item ) { | 114 | while( item ) { |
111 | FieldItem *fieldItem = static_cast<FieldItem *>( item ); | 115 | FieldItem *fieldItem = static_cast<FieldItem *>( item ); |
112 | if ( (*it)->equals( fieldItem->field() ) ) | 116 | if ( (*it)->equals( fieldItem->field() ) ) |
113 | break; | 117 | break; |
@@ -188,9 +192,9 @@ void ViewConfigureFieldsPage::slotButtonsEnabled() | |||
188 | void ViewConfigureFieldsPage::slotMoveUp() | 192 | void ViewConfigureFieldsPage::slotMoveUp() |
189 | { | 193 | { |
190 | int i = mSelectedBox->currentItem(); | 194 | int i = mSelectedBox->currentItem(); |
191 | if ( i > 0 ) { | 195 | if ( i > 0 ) { |
192 | QListBoxItem *item = mSelectedBox->item( i ); | 196 | Q3ListBoxItem *item = mSelectedBox->item( i ); |
193 | mSelectedBox->takeItem( item ); | 197 | mSelectedBox->takeItem( item ); |
194 | mSelectedBox->insertItem( item, i - 1 ); | 198 | mSelectedBox->insertItem( item, i - 1 ); |
195 | mSelectedBox->setCurrentItem( item ); | 199 | mSelectedBox->setCurrentItem( item ); |
196 | mSelectedBox->setSelected( i - 1, true ); | 200 | mSelectedBox->setSelected( i - 1, true ); |
@@ -200,9 +204,9 @@ void ViewConfigureFieldsPage::slotMoveUp() | |||
200 | void ViewConfigureFieldsPage::slotMoveDown() | 204 | void ViewConfigureFieldsPage::slotMoveDown() |
201 | { | 205 | { |
202 | int i = mSelectedBox->currentItem(); | 206 | int i = mSelectedBox->currentItem(); |
203 | if ( i > -1 && i < (int)mSelectedBox->count() - 1 ) { | 207 | if ( i > -1 && i < (int)mSelectedBox->count() - 1 ) { |
204 | QListBoxItem *item = mSelectedBox->item( i ); | 208 | Q3ListBoxItem *item = mSelectedBox->item( i ); |
205 | mSelectedBox->takeItem( item ); | 209 | mSelectedBox->takeItem( item ); |
206 | mSelectedBox->insertItem( item, i + 1 ); | 210 | mSelectedBox->insertItem( item, i + 1 ); |
207 | mSelectedBox->setCurrentItem( item ); | 211 | mSelectedBox->setCurrentItem( item ); |
208 | mSelectedBox->setSelected( i + 1, true ); | 212 | mSelectedBox->setSelected( i + 1, true ); |
@@ -218,13 +222,13 @@ void ViewConfigureFieldsPage::initGUI() | |||
218 | 222 | ||
219 | 223 | ||
220 | setCaption( i18n("Select Fields to Display") ); | 224 | setCaption( i18n("Select Fields to Display") ); |
221 | 225 | ||
222 | QGridLayout *gl = 0; | 226 | Q3GridLayout *gl = 0; |
223 | if (orientation == 0) | 227 | if (orientation == 0) |
224 | gl = new QGridLayout( this , 6, 4, 0, KDialog::spacingHint() ); | 228 | gl = new Q3GridLayout( this , 6, 4, 0, KDialog::spacingHint() ); |
225 | else | 229 | else |
226 | gl = new QGridLayout( this , 4, 6, 0, KDialog::spacingHint() ); | 230 | gl = new Q3GridLayout( this , 4, 6, 0, KDialog::spacingHint() ); |
227 | 231 | ||
228 | #ifndef KAB_EMBEDDED | 232 | #ifndef KAB_EMBEDDED |
229 | mCategoryCombo = new KComboBox( false, this ); | 233 | mCategoryCombo = new KComboBox( false, this ); |
230 | #else //KAB_EMBEDDED | 234 | #else //KAB_EMBEDDED |
@@ -248,34 +252,34 @@ void ViewConfigureFieldsPage::initGUI() | |||
248 | else | 252 | else |
249 | gl->addWidget( label, 2, 0 ); | 253 | gl->addWidget( label, 2, 0 ); |
250 | 254 | ||
251 | 255 | ||
252 | mUnSelectedBox = new QListBox( this ); | 256 | mUnSelectedBox = new Q3ListBox( this ); |
253 | mUnSelectedBox->setSelectionMode( QListBox::Extended ); | 257 | mUnSelectedBox->setSelectionMode( Q3ListBox::Extended ); |
254 | mUnSelectedBox->setMinimumHeight( 80 ); | 258 | mUnSelectedBox->setMinimumHeight( 80 ); |
255 | if (orientation == 0) | 259 | if (orientation == 0) |
256 | gl->addWidget( mUnSelectedBox, 1, 0 ); | 260 | gl->addWidget( mUnSelectedBox, 1, 0 ); |
257 | else | 261 | else |
258 | gl->addWidget( mUnSelectedBox, 0, 1 ); | 262 | gl->addWidget( mUnSelectedBox, 0, 1 ); |
259 | 263 | ||
260 | mSelectedBox = new QListBox( this ); | 264 | mSelectedBox = new Q3ListBox( this ); |
261 | //if ( QApplication::desktop()->width() < 320 ) { | 265 | //if ( QApplication::desktop()->width() < 320 ) { |
262 | // mUnSelectedBox->setMaximumWidth( 134 ); | 266 | // mUnSelectedBox->setMaximumWidth( 134 ); |
263 | // mSelectedBox->setMaximumWidth( 134 ); | 267 | // mSelectedBox->setMaximumWidth( 134 ); |
264 | //} | 268 | //} |
265 | mSelectedBox->setSelectionMode( QListBox::Extended ); | 269 | mSelectedBox->setSelectionMode( Q3ListBox::Extended ); |
266 | mSelectedBox->setMinimumHeight( 80 ); | 270 | mSelectedBox->setMinimumHeight( 80 ); |
267 | label->setBuddy( mSelectedBox ); | 271 | label->setBuddy( mSelectedBox ); |
268 | if (orientation == 0) | 272 | if (orientation == 0) |
269 | gl->addWidget( mSelectedBox, 1, 2 ); | 273 | gl->addWidget( mSelectedBox, 1, 2 ); |
270 | else | 274 | else |
271 | gl->addWidget( mSelectedBox, 2, 1 ); | 275 | gl->addWidget( mSelectedBox, 2, 1 ); |
272 | 276 | ||
273 | QBoxLayout *vb1 = 0; | 277 | Q3BoxLayout *vb1 = 0; |
274 | if (orientation == 0) | 278 | if (orientation == 0) |
275 | vb1 = new QBoxLayout( QBoxLayout::TopToBottom, KDialog::spacingHint() ); | 279 | vb1 = new Q3BoxLayout( Q3BoxLayout::TopToBottom, KDialog::spacingHint() ); |
276 | else | 280 | else |
277 | vb1 = new QBoxLayout( QBoxLayout::LeftToRight, KDialog::spacingHint() ); | 281 | vb1 = new Q3BoxLayout( Q3BoxLayout::LeftToRight, KDialog::spacingHint() ); |
278 | 282 | ||
279 | vb1->addStretch(); | 283 | vb1->addStretch(); |
280 | 284 | ||
281 | mAddButton = new QToolButton( this ); | 285 | mAddButton = new QToolButton( this ); |
@@ -300,13 +304,13 @@ void ViewConfigureFieldsPage::initGUI() | |||
300 | gl->addLayout( vb1, 1, 1 ); | 304 | gl->addLayout( vb1, 1, 1 ); |
301 | else | 305 | else |
302 | gl->addLayout( vb1, 1, 1 ); | 306 | gl->addLayout( vb1, 1, 1 ); |
303 | 307 | ||
304 | QBoxLayout *vb2 = 0; | 308 | Q3BoxLayout *vb2 = 0; |
305 | if (orientation == 0) | 309 | if (orientation == 0) |
306 | vb2 = new QBoxLayout( QBoxLayout::TopToBottom, KDialog::spacingHint() ); | 310 | vb2 = new Q3BoxLayout( Q3BoxLayout::TopToBottom, KDialog::spacingHint() ); |
307 | else | 311 | else |
308 | vb2 = new QBoxLayout( QBoxLayout::LeftToRight, KDialog::spacingHint() ); | 312 | vb2 = new Q3BoxLayout( Q3BoxLayout::LeftToRight, KDialog::spacingHint() ); |
309 | 313 | ||
310 | vb2->addStretch(); | 314 | vb2->addStretch(); |
311 | 315 | ||
312 | mUpButton = new QToolButton( this ); | 316 | mUpButton = new QToolButton( this ); |
@@ -339,13 +343,13 @@ void ViewConfigureFieldsPage::initGUI() | |||
339 | gl->activate(); | 343 | gl->activate(); |
340 | 344 | ||
341 | connect( mUnSelectedBox, SIGNAL( selectionChanged() ), SLOT( slotButtonsEnabled() ) ); | 345 | connect( mUnSelectedBox, SIGNAL( selectionChanged() ), SLOT( slotButtonsEnabled() ) ); |
342 | connect( mSelectedBox, SIGNAL( selectionChanged() ), SLOT( slotButtonsEnabled() ) ); | 346 | connect( mSelectedBox, SIGNAL( selectionChanged() ), SLOT( slotButtonsEnabled() ) ); |
343 | connect( mSelectedBox, SIGNAL( currentChanged( QListBoxItem * ) ), SLOT( slotButtonsEnabled() ) ); | 347 | connect( mSelectedBox, SIGNAL( currentChanged( Q3ListBoxItem * ) ), SLOT( slotButtonsEnabled() ) ); |
344 | 348 | ||
345 | slotButtonsEnabled(); | 349 | slotButtonsEnabled(); |
346 | } | 350 | } |
347 | 351 | ||
348 | 352 | ||
349 | #ifndef KAB_EMBEDDED | 353 | #ifndef KAB_EMBEDDED_ |
350 | #include "viewconfigurefieldspage.moc" | 354 | #include "moc_viewconfigurefieldspage.cpp" |
351 | #endif //KAB_EMBEDDED | 355 | #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 | |||
@@ -34,10 +34,10 @@ class KComboBox; | |||
34 | #else //KAB_EMBEDDED | 34 | #else //KAB_EMBEDDED |
35 | class QComboBox; | 35 | class QComboBox; |
36 | #endif //KAB_EMBEDDED | 36 | #endif //KAB_EMBEDDED |
37 | 37 | ||
38 | class QListBox; | 38 | class Q3ListBox; |
39 | class QListBoxItem; | 39 | class Q3ListBoxItem; |
40 | class QPushButton; | 40 | class QPushButton; |
41 | class QToolButton; | 41 | class QToolButton; |
42 | 42 | ||
43 | class ViewConfigureFieldsPage : public QWidget | 43 | class ViewConfigureFieldsPage : public QWidget |
@@ -67,10 +67,10 @@ class ViewConfigureFieldsPage : public QWidget | |||
67 | KComboBox *mCategoryCombo; | 67 | KComboBox *mCategoryCombo; |
68 | #else //KAB_EMBEDDED | 68 | #else //KAB_EMBEDDED |
69 | QComboBox *mCategoryCombo; | 69 | QComboBox *mCategoryCombo; |
70 | #endif //KAB_EMBEDDED | 70 | #endif //KAB_EMBEDDED |
71 | QListBox *mSelectedBox; | 71 | Q3ListBox *mSelectedBox; |
72 | QListBox *mUnSelectedBox; | 72 | Q3ListBox *mUnSelectedBox; |
73 | QToolButton *mAddButton; | 73 | QToolButton *mAddButton; |
74 | QToolButton *mRemoveButton; | 74 | QToolButton *mRemoveButton; |
75 | QToolButton *mUpButton; | 75 | QToolButton *mUpButton; |
76 | QToolButton *mDownButton; | 76 | QToolButton *mDownButton; |
diff --git a/kaddressbook/viewconfigurefilterpage.cpp b/kaddressbook/viewconfigurefilterpage.cpp index b085a5e..cdb778b 100644 --- a/kaddressbook/viewconfigurefilterpage.cpp +++ b/kaddressbook/viewconfigurefilterpage.cpp | |||
@@ -26,12 +26,15 @@ | |||
26 | #else //KAB_EMBEDDED | 26 | #else //KAB_EMBEDDED |
27 | #include <qcombobox.h> | 27 | #include <qcombobox.h> |
28 | #endif //KAB_EMBEDDED | 28 | #endif //KAB_EMBEDDED |
29 | 29 | ||
30 | #include <qbuttongroup.h> | 30 | #include <q3buttongroup.h> |
31 | #include <qlabel.h> | 31 | #include <qlabel.h> |
32 | #include <qlayout.h> | 32 | #include <qlayout.h> |
33 | #include <qradiobutton.h> | 33 | #include <qradiobutton.h> |
34 | //Added by qt3to4: | ||
35 | #include <Q3HBoxLayout> | ||
36 | #include <Q3VBoxLayout> | ||
34 | 37 | ||
35 | #include <kconfig.h> | 38 | #include <kconfig.h> |
36 | #include <kdialog.h> | 39 | #include <kdialog.h> |
37 | #include <klocale.h> | 40 | #include <klocale.h> |
@@ -43,11 +46,11 @@ | |||
43 | ViewConfigureFilterPage::ViewConfigureFilterPage( QWidget *parent, | 46 | ViewConfigureFilterPage::ViewConfigureFilterPage( QWidget *parent, |
44 | const char *name ) | 47 | const char *name ) |
45 | : QWidget( parent, name ) | 48 | : QWidget( parent, name ) |
46 | { | 49 | { |
47 | QBoxLayout *topLayout = new QVBoxLayout( this, 0, KDialog::spacingHint() ); | 50 | Q3BoxLayout *topLayout = new Q3VBoxLayout( this, 0, KDialog::spacingHint() ); |
48 | 51 | ||
49 | mFilterGroup = new QButtonGroup(); | 52 | mFilterGroup = new Q3ButtonGroup(); |
50 | connect( mFilterGroup, SIGNAL( clicked( int ) ), SLOT( buttonClicked( int ) ) ); | 53 | connect( mFilterGroup, SIGNAL( clicked( int ) ), SLOT( buttonClicked( int ) ) ); |
51 | 54 | ||
52 | QLabel *label = new QLabel( i18n( "The default filter will be activated whenever" | 55 | QLabel *label = new QLabel( i18n( "The default filter will be activated whenever" |
53 | " this view is displayed. This feature allows you to configure views that only" | 56 | " this view is displayed. This feature allows you to configure views that only" |
@@ -67,9 +70,9 @@ ViewConfigureFilterPage::ViewConfigureFilterPage( QWidget *parent, | |||
67 | button = new QRadioButton( i18n( "Use last active filter" ), this ); | 70 | button = new QRadioButton( i18n( "Use last active filter" ), this ); |
68 | mFilterGroup->insert( button ); | 71 | mFilterGroup->insert( button ); |
69 | topLayout->addWidget( button ); | 72 | topLayout->addWidget( button ); |
70 | 73 | ||
71 | QBoxLayout *comboLayout = new QHBoxLayout(); | 74 | Q3BoxLayout *comboLayout = new Q3HBoxLayout(); |
72 | topLayout->addLayout( comboLayout ); | 75 | topLayout->addLayout( comboLayout ); |
73 | button = new QRadioButton( i18n( "Use filter:" ), this ); | 76 | button = new QRadioButton( i18n( "Use filter:" ), this ); |
74 | mFilterGroup->insert( button ); | 77 | mFilterGroup->insert( button ); |
75 | comboLayout->addWidget( button ); | 78 | comboLayout->addWidget( button ); |
@@ -131,7 +134,7 @@ void ViewConfigureFilterPage::buttonClicked( int id ) | |||
131 | { | 134 | { |
132 | mFilterCombo->setEnabled( id == 2 ); | 135 | mFilterCombo->setEnabled( id == 2 ); |
133 | } | 136 | } |
134 | 137 | ||
135 | #ifndef KAB_EMBEDDED | 138 | #ifndef KAB_EMBEDDED_ |
136 | #include "viewconfigurefilterpage.moc" | 139 | #include "moc_viewconfigurefilterpage.cpp" |
137 | #endif //KAB_EMBEDDED | 140 | #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 | |||
@@ -25,9 +25,9 @@ | |||
25 | #define VIEWCONFIGUREFILTERPAGE | 25 | #define VIEWCONFIGUREFILTERPAGE |
26 | 26 | ||
27 | #include <qwidget.h> | 27 | #include <qwidget.h> |
28 | 28 | ||
29 | class QButtonGroup; | 29 | class Q3ButtonGroup; |
30 | 30 | ||
31 | #ifndef KAB_EMBEDDED | 31 | #ifndef KAB_EMBEDDED |
32 | class KComboBox; | 32 | class KComboBox; |
33 | #else //KAB_EMBEDDED | 33 | #else //KAB_EMBEDDED |
@@ -56,8 +56,8 @@ class ViewConfigureFilterPage : public QWidget | |||
56 | #else //KAB_EMBEDDED | 56 | #else //KAB_EMBEDDED |
57 | QComboBox *mFilterCombo; | 57 | QComboBox *mFilterCombo; |
58 | #endif //KAB_EMBEDDED | 58 | #endif //KAB_EMBEDDED |
59 | 59 | ||
60 | QButtonGroup *mFilterGroup; | 60 | Q3ButtonGroup *mFilterGroup; |
61 | }; | 61 | }; |
62 | 62 | ||
63 | #endif | 63 | #endif |
diff --git a/kaddressbook/viewconfigurewidget.cpp b/kaddressbook/viewconfigurewidget.cpp index 666e188..047df8c 100644 --- a/kaddressbook/viewconfigurewidget.cpp +++ b/kaddressbook/viewconfigurewidget.cpp | |||
@@ -23,9 +23,9 @@ | |||
23 | 23 | ||
24 | 24 | ||
25 | #ifndef KAB_EMBEDDED | 25 | #ifndef KAB_EMBEDDED |
26 | 26 | ||
27 | #include <qvbox.h> | 27 | #include <q3vbox.h> |
28 | 28 | ||
29 | #include <kapplication.h> | 29 | #include <kapplication.h> |
30 | #include <kconfig.h> | 30 | #include <kconfig.h> |
31 | #include <kdebug.h> | 31 | #include <kdebug.h> |
@@ -36,8 +36,11 @@ | |||
36 | #endif //KAB_EMBEDDED | 36 | #endif //KAB_EMBEDDED |
37 | 37 | ||
38 | 38 | ||
39 | #include <qlayout.h> | 39 | #include <qlayout.h> |
40 | //Added by qt3to4: | ||
41 | #include <Q3VBoxLayout> | ||
42 | #include <QPixmap> | ||
40 | 43 | ||
41 | #include <kjanuswidget.h> | 44 | #include <kjanuswidget.h> |
42 | #include <kglobal.h> | 45 | #include <kglobal.h> |
43 | #include <klocale.h> | 46 | #include <klocale.h> |
@@ -49,16 +52,16 @@ | |||
49 | ViewConfigureWidget::ViewConfigureWidget( KABC::AddressBook *ab, QWidget *parent, | 52 | ViewConfigureWidget::ViewConfigureWidget( KABC::AddressBook *ab, QWidget *parent, |
50 | const char *name ) | 53 | const char *name ) |
51 | : ConfigureWidget( ab, parent, name ) | 54 | : ConfigureWidget( ab, parent, name ) |
52 | { | 55 | { |
53 | QVBoxLayout *topLayout = new QVBoxLayout( this ); | 56 | Q3VBoxLayout *topLayout = new Q3VBoxLayout( this ); |
54 | 57 | ||
55 | mMainWidget = new KJanusWidget( this, "JanusWidget", KJanusWidget::Tabbed ); | 58 | mMainWidget = new KJanusWidget( this, "JanusWidget", KJanusWidget::Tabbed ); |
56 | 59 | ||
57 | topLayout->addWidget( mMainWidget ); | 60 | topLayout->addWidget( mMainWidget ); |
58 | 61 | ||
59 | // Add the first page, the attributes | 62 | // Add the first page, the attributes |
60 | QVBox *page = addPage( i18n( "Fields" ), QString::null, | 63 | Q3VBox *page = addPage( i18n( "Fields" ), QString::null, |
61 | KGlobal::iconLoader()->loadIcon( "view_detailed", | 64 | KGlobal::iconLoader()->loadIcon( "view_detailed", |
62 | KIcon::Panel, 16 ) ); | 65 | KIcon::Panel, 16 ) ); |
63 | 66 | ||
64 | 67 | ||
@@ -92,15 +95,15 @@ void ViewConfigureWidget::saveSettings( KConfig *config ) | |||
92 | mFieldsPage->saveSettings( config ); | 95 | mFieldsPage->saveSettings( config ); |
93 | mFilterPage->saveSettings( config ); | 96 | mFilterPage->saveSettings( config ); |
94 | } | 97 | } |
95 | 98 | ||
96 | QVBox *ViewConfigureWidget::addPage( const QString &item, const QString &header, | 99 | Q3VBox *ViewConfigureWidget::addPage( const QString &item, const QString &header, |
97 | const QPixmap &pixmap ) | 100 | const QPixmap &pixmap ) |
98 | { | 101 | { |
99 | return mMainWidget->addVBoxPage( item, header, pixmap ); | 102 | return mMainWidget->addVBoxPage( item, header, pixmap ); |
100 | } | 103 | } |
101 | 104 | ||
102 | #include <qframe.h> | 105 | #include <q3frame.h> |
103 | #include <qlabel.h> | 106 | #include <qlabel.h> |
104 | #include <qlayout.h> | 107 | #include <qlayout.h> |
105 | #include <stdlib.h> | 108 | #include <stdlib.h> |
106 | 109 | ||
@@ -151,9 +154,7 @@ void ViewConfigureDialog::slotHelp() | |||
151 | qDebug("ViewConfigureDialog::slotHelp not yet implemented"); | 154 | qDebug("ViewConfigureDialog::slotHelp not yet implemented"); |
152 | #endif //KAB_EMBEDDED | 155 | #endif //KAB_EMBEDDED |
153 | } | 156 | } |
154 | 157 | ||
155 | #ifndef KAB_EMBEDDED | 158 | #ifndef KAB_EMBEDDED_ |
156 | #include "viewconfigurewidget.moc" | 159 | #include "moc_viewconfigurewidget.cpp" |
157 | #endif //KAB_EMBEDDED | 160 | #endif //KAB_EMBEDDED |
158 | |||
159 | |||
diff --git a/kaddressbook/viewconfigurewidget.h b/kaddressbook/viewconfigurewidget.h index 0c2b77c..e3b9b12 100644 --- a/kaddressbook/viewconfigurewidget.h +++ b/kaddressbook/viewconfigurewidget.h | |||
@@ -27,9 +27,9 @@ | |||
27 | 27 | ||
28 | 28 | ||
29 | #include "configurewidget.h" | 29 | #include "configurewidget.h" |
30 | 30 | ||
31 | class QVBox; | 31 | class Q3VBox; |
32 | 32 | ||
33 | #include <kdialogbase.h> | 33 | #include <kdialogbase.h> |
34 | #include <qpixmap.h> | 34 | #include <qpixmap.h> |
35 | 35 | ||
@@ -73,9 +73,9 @@ class ViewConfigureWidget : public ConfigureWidget | |||
73 | 73 | ||
74 | /** | 74 | /** |
75 | Use this method to add new pages to the widget. | 75 | Use this method to add new pages to the widget. |
76 | */ | 76 | */ |
77 | QVBox *addPage( const QString &item, const QString &header = QString::null, | 77 | Q3VBox *addPage( const QString &item, const QString &header = QString::null, |
78 | const QPixmap &pixmap = QPixmap() ); | 78 | const QPixmap &pixmap = QPixmap() ); |
79 | 79 | ||
80 | private: | 80 | private: |
81 | KJanusWidget *mMainWidget; | 81 | KJanusWidget *mMainWidget; |
diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp index b5d9419..5cfe3ad 100644 --- a/kaddressbook/viewmanager.cpp +++ b/kaddressbook/viewmanager.cpp | |||
@@ -49,9 +49,12 @@ $Id$ | |||
49 | #include "kaddressbookview.h" | 49 | #include "kaddressbookview.h" |
50 | 50 | ||
51 | #include <qaction.h> | 51 | #include <qaction.h> |
52 | #include <qmessagebox.h> | 52 | #include <qmessagebox.h> |
53 | #include <qpopupmenu.h> | 53 | #include <q3popupmenu.h> |
54 | //Added by qt3to4: | ||
55 | #include <Q3HBoxLayout> | ||
56 | #include <QDropEvent> | ||
54 | #include <kconfigbase.h> | 57 | #include <kconfigbase.h> |
55 | 58 | ||
56 | #endif //KAB_EMBEDDED | 59 | #endif //KAB_EMBEDDED |
57 | 60 | ||
@@ -60,9 +63,10 @@ $Id$ | |||
60 | #include <kactionclasses.h> | 63 | #include <kactionclasses.h> |
61 | 64 | ||
62 | #include <qlayout.h> | 65 | #include <qlayout.h> |
63 | #include <qapplication.h> | 66 | #include <qapplication.h> |
64 | #include <qwidgetstack.h> | 67 | #include <QDesktopWidget> |
68 | #include <q3widgetstack.h> | ||
65 | 69 | ||
66 | #include <kabc/addressbook.h> | 70 | #include <kabc/addressbook.h> |
67 | #include "filtereditdialog.h" | 71 | #include "filtereditdialog.h" |
68 | #include "addviewdialog.h" | 72 | #include "addviewdialog.h" |
@@ -116,9 +120,9 @@ void ViewManager::restoreSettings() | |||
116 | // Tell the views to reread their config, since they may have | 120 | // Tell the views to reread their config, since they may have |
117 | // been modified by global settings | 121 | // been modified by global settings |
118 | QString _oldgroup = mCore->config()->group(); | 122 | QString _oldgroup = mCore->config()->group(); |
119 | 123 | ||
120 | QDictIterator<KAddressBookView> it( mViewDict ); | 124 | Q3DictIterator<KAddressBookView> it( mViewDict ); |
121 | for ( it.toFirst(); it.current(); ++it ) { | 125 | for ( it.toFirst(); it.current(); ++it ) { |
122 | KConfigGroupSaver saver( mCore->config(), it.currentKey() ); | 126 | KConfigGroupSaver saver( mCore->config(), it.currentKey() ); |
123 | it.current()->readConfig( mCore->config() ); | 127 | it.current()->readConfig( mCore->config() ); |
124 | } | 128 | } |
@@ -130,9 +134,9 @@ void ViewManager::restoreSettings() | |||
130 | void ViewManager::saveSettings() | 134 | void ViewManager::saveSettings() |
131 | { | 135 | { |
132 | QString _oldgroup = mCore->config()->group(); | 136 | QString _oldgroup = mCore->config()->group(); |
133 | 137 | ||
134 | QDictIterator<KAddressBookView> it( mViewDict ); | 138 | Q3DictIterator<KAddressBookView> it( mViewDict ); |
135 | for ( it.toFirst(); it.current(); ++it ) { | 139 | for ( it.toFirst(); it.current(); ++it ) { |
136 | KConfigGroupSaver saver( mCore->config(), it.currentKey() ); | 140 | KConfigGroupSaver saver( mCore->config(), it.currentKey() ); |
137 | #ifdef DESKTOP_VERSION | 141 | #ifdef DESKTOP_VERSION |
138 | (*it)->writeConfig( mCore->config() ); | 142 | (*it)->writeConfig( mCore->config() ); |
@@ -160,9 +164,9 @@ QStringList ViewManager::selectedUids() const | |||
160 | 164 | ||
161 | QStringList ViewManager::selectedEmails() const | 165 | QStringList ViewManager::selectedEmails() const |
162 | { | 166 | { |
163 | if ( mActiveView ) | 167 | if ( mActiveView ) |
164 | return mActiveView->selectedEmails(); | 168 | return QStringList(mActiveView->selectedEmails()); |
165 | else | 169 | else |
166 | return QStringList(); | 170 | return QStringList(); |
167 | } | 171 | } |
168 | 172 | ||
@@ -555,9 +559,9 @@ void ViewManager::startDrag() | |||
555 | for ( iter = uidList.begin(); iter != uidList.end(); ++iter ) | 559 | for ( iter = uidList.begin(); iter != uidList.end(); ++iter ) |
556 | addrList.append( mCore->addressBook()->findByUid( *iter ) ); | 560 | addrList.append( mCore->addressBook()->findByUid( *iter ) ); |
557 | 561 | ||
558 | KMultipleDrag *drag = new KMultipleDrag( this ); | 562 | KMultipleDrag *drag = new KMultipleDrag( this ); |
559 | drag->addDragObject( new QTextDrag( AddresseeUtil::addresseesToClipboard(addrList), this ) ); | 563 | drag->addDragObject( new Q3TextDrag( AddresseeUtil::addresseesToClipboard(addrList), this ) ); |
560 | KABC::Addressee::List::Iterator it; | 564 | KABC::Addressee::List::Iterator it; |
561 | QStringList vcards; | 565 | QStringList vcards; |
562 | for ( it = addrList.begin(); it != addrList.end(); ++it ) { | 566 | for ( it = addrList.begin(); it != addrList.end(); ++it ) { |
563 | QString vcard = QString::null; | 567 | QString vcard = QString::null; |
@@ -658,11 +662,11 @@ void ViewManager::initActions() | |||
658 | //US <ActionList name="view_loadedviews"/> | 662 | //US <ActionList name="view_loadedviews"/> |
659 | //US <Separator/> | 663 | //US <Separator/> |
660 | 664 | ||
661 | #ifdef KAB_EMBEDDED | 665 | #ifdef KAB_EMBEDDED |
662 | QPopupMenu *viewmenu = (QPopupMenu*)mCore->getViewMenu(); | 666 | Q3PopupMenu *viewmenu = (Q3PopupMenu*)mCore->getViewMenu(); |
663 | QPopupMenu *settingsmenu = (QPopupMenu*)mCore->getSettingsMenu(); | 667 | Q3PopupMenu *settingsmenu = (Q3PopupMenu*)mCore->getSettingsMenu(); |
664 | QPopupMenu *filtermenu = (QPopupMenu*)mCore->getFilterMenu(); | 668 | Q3PopupMenu *filtermenu = (Q3PopupMenu*)mCore->getFilterMenu(); |
665 | #endif //KAB_EMBEDDED | 669 | #endif //KAB_EMBEDDED |
666 | 670 | ||
667 | mActionSelectView = new KSelectAction( i18n( "Select View" ), 0, mCore->actionCollection(), "select_view" ); | 671 | mActionSelectView = new KSelectAction( i18n( "Select View" ), 0, mCore->actionCollection(), "select_view" ); |
668 | #if KDE_VERSION >= 309 | 672 | #if KDE_VERSION >= 309 |
@@ -737,12 +741,12 @@ void ViewManager::initActions() | |||
737 | } | 741 | } |
738 | 742 | ||
739 | void ViewManager::initGUI() | 743 | void ViewManager::initGUI() |
740 | { | 744 | { |
741 | QHBoxLayout *layout = new QHBoxLayout( this, 0, 0 ); | 745 | Q3HBoxLayout *layout = new Q3HBoxLayout( this, 0, 0 ); |
742 | mViewWidgetStack = new QWidgetStack( this ); | 746 | mViewWidgetStack = new Q3WidgetStack( this ); |
743 | layout->addWidget( mViewWidgetStack ); | 747 | layout->addWidget( mViewWidgetStack ); |
744 | } | 748 | } |
745 | 749 | ||
746 | #ifndef KAB_EMBEDDED | 750 | #ifndef KAB_EMBEDDED_ |
747 | #include "viewmanager.moc" | 751 | #include "moc_viewmanager.cpp" |
748 | #endif //KAB_EMBEDDED | 752 | #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 | |||
@@ -25,17 +25,19 @@ | |||
25 | #define VIEWMANAGER_H | 25 | #define VIEWMANAGER_H |
26 | 26 | ||
27 | #include <qwidget.h> | 27 | #include <qwidget.h> |
28 | #include <qstringlist.h> | 28 | #include <qstringlist.h> |
29 | //Added by qt3to4: | ||
30 | #include <QDropEvent> | ||
29 | #include <kaddressbookview.h> | 31 | #include <kaddressbookview.h> |
30 | #include <qdict.h> | 32 | #include <q3dict.h> |
31 | #include "filter.h" | 33 | #include "filter.h" |
32 | 34 | ||
33 | class KAction; | 35 | class KAction; |
34 | class KSelectAction; | 36 | class KSelectAction; |
35 | 37 | ||
36 | class KABCore; | 38 | class KABCore; |
37 | class QWidgetStack; | 39 | class Q3WidgetStack; |
38 | class QDropEvent; | 40 | class QDropEvent; |
39 | 41 | ||
40 | namespace KABC { class AddressBook; } | 42 | namespace KABC { class AddressBook; } |
41 | 43 | ||
@@ -144,13 +146,13 @@ class ViewManager : public QWidget | |||
144 | 146 | ||
145 | Filter mCurrentFilter; | 147 | Filter mCurrentFilter; |
146 | Filter::List mFilterList; | 148 | Filter::List mFilterList; |
147 | 149 | ||
148 | QDict<KAddressBookView> mViewDict; | 150 | Q3Dict<KAddressBookView> mViewDict; |
149 | QDict<ViewFactory> mViewFactoryDict; | 151 | Q3Dict<ViewFactory> mViewFactoryDict; |
150 | QStringList mViewNameList; | 152 | QStringList mViewNameList; |
151 | 153 | ||
152 | QWidgetStack *mViewWidgetStack; | 154 | Q3WidgetStack *mViewWidgetStack; |
153 | KAddressBookView *mActiveView; | 155 | KAddressBookView *mActiveView; |
154 | 156 | ||
155 | KAction *mActionDeleteView; | 157 | KAction *mActionDeleteView; |
156 | KSelectAction *mActionSelectFilter; | 158 | KSelectAction *mActionSelectFilter; |
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 | |||
@@ -33,8 +33,16 @@ | |||
33 | #include <qstyle.h> | 33 | #include <qstyle.h> |
34 | #include <qcursor.h> | 34 | #include <qcursor.h> |
35 | #include <qtooltip.h> | 35 | #include <qtooltip.h> |
36 | #include <qapplication.h> | 36 | #include <qapplication.h> |
37 | //Added by qt3to4: | ||
38 | #include <QKeyEvent> | ||
39 | #include <Q3PtrList> | ||
40 | #include <QResizeEvent> | ||
41 | #include <QFocusEvent> | ||
42 | #include <QMouseEvent> | ||
43 | #include <QEvent> | ||
44 | #include <QWheelEvent> | ||
37 | 45 | ||
38 | #include "kabprefs.h" | 46 | #include "kabprefs.h" |
39 | #include <kdebug.h> | 47 | #include <kdebug.h> |
40 | #include <kglobalsettings.h> | 48 | #include <kglobalsettings.h> |
@@ -70,13 +78,13 @@ class CardViewTip : public QLabel { | |||
70 | // | 78 | // |
71 | // Warning: make sure you use findRef() instead of find() to find an | 79 | // Warning: make sure you use findRef() instead of find() to find an |
72 | // item! Only the pointer value is unique in the list. | 80 | // item! Only the pointer value is unique in the list. |
73 | // | 81 | // |
74 | class CardViewItemList : public QPtrList<CardViewItem> | 82 | class CardViewItemList : public Q3PtrList<CardViewItem> |
75 | { | 83 | { |
76 | protected: | 84 | protected: |
77 | virtual int compareItems(QPtrCollection::Item item1, | 85 | virtual int compareItems(Q3PtrCollection::Item item1, |
78 | QPtrCollection::Item item2) | 86 | Q3PtrCollection::Item item2) |
79 | { | 87 | { |
80 | CardViewItem *cItem1 = (CardViewItem*)item1; | 88 | CardViewItem *cItem1 = (CardViewItem*)item1; |
81 | CardViewItem *cItem2 = (CardViewItem*)item2; | 89 | CardViewItem *cItem2 = (CardViewItem*)item2; |
82 | 90 | ||
@@ -160,9 +168,9 @@ class CardViewPrivate | |||
160 | mCompText( QString::null ) | 168 | mCompText( QString::null ) |
161 | {}; | 169 | {}; |
162 | 170 | ||
163 | CardViewItemList mItemList; | 171 | CardViewItemList mItemList; |
164 | QPtrList<CardViewSeparator> mSeparatorList; | 172 | Q3PtrList<CardViewSeparator> mSeparatorList; |
165 | QFontMetrics *mFm; | 173 | QFontMetrics *mFm; |
166 | QFontMetrics *mBFm; // bold font | 174 | QFontMetrics *mBFm; // bold font |
167 | QFont mHeaderFont; // custom header font | 175 | QFont mHeaderFont; // custom header font |
168 | CardView::SelectionMode mSelectionMode; | 176 | CardView::SelectionMode mSelectionMode; |
@@ -207,9 +215,9 @@ class CardViewItemPrivate | |||
207 | y( 0 ){}; | 215 | y( 0 ){}; |
208 | 216 | ||
209 | 217 | ||
210 | QString mCaption; | 218 | QString mCaption; |
211 | QPtrList< CardViewItem::Field > mFieldList; | 219 | Q3PtrList< CardViewItem::Field > mFieldList; |
212 | bool mSelected; | 220 | bool mSelected; |
213 | int x; // horizontal position, set by the view | 221 | int x; // horizontal position, set by the view |
214 | int y; // vertical position, set by the view | 222 | int y; // vertical position, set by the view |
215 | int maxLabelWidth; // the width of the widest label, according to the view font. | 223 | int maxLabelWidth; // the width of the widest label, according to the view font. |
@@ -312,9 +320,9 @@ void CardViewItem::paintCard(QPainter *p, QColorGroup &cg) | |||
312 | p->drawText(2+mg, 2+mg + bFm.ascent()/*bFm.height()*//*-bFm.descent()*//*-bFm.leading()*/, trimString(d->mCaption, w-4, bFm)); | 320 | p->drawText(2+mg, 2+mg + bFm.ascent()/*bFm.height()*//*-bFm.descent()*//*-bFm.leading()*/, trimString(d->mCaption, w-4, bFm)); |
313 | p->restore(); | 321 | p->restore(); |
314 | 322 | ||
315 | // Go through the fields and draw them | 323 | // Go through the fields and draw them |
316 | QPtrListIterator< CardViewItem::Field > iter(d->mFieldList); | 324 | Q3PtrListIterator< CardViewItem::Field > iter(d->mFieldList); |
317 | QString label, value; | 325 | QString label, value; |
318 | int yPos = mg + 4 + bFm.height()/* + 1*/ + fm.height(); // why the + 1 ??? (anders) | 326 | int yPos = mg + 4 + bFm.height()/* + 1*/ + fm.height(); // why the + 1 ??? (anders) |
319 | p->setPen(cg.text()); | 327 | p->setPen(cg.text()); |
320 | 328 | ||
@@ -407,14 +415,14 @@ int CardViewItem::height( bool allowCache ) const | |||
407 | //int sp = QMAX( 0, 2- mView->d->mFm->leading() ); // field spacing NOTE make a property | 415 | //int sp = QMAX( 0, 2- mView->d->mFm->leading() ); // field spacing NOTE make a property |
408 | int fieldHeight = 0; | 416 | int fieldHeight = 0; |
409 | int lines; | 417 | int lines; |
410 | int maxLines( mView->maxFieldLines() ); | 418 | int maxLines( mView->maxFieldLines() ); |
411 | QPtrListIterator< CardViewItem::Field > iter(d->mFieldList); | 419 | Q3PtrListIterator< CardViewItem::Field > iter(d->mFieldList); |
412 | for (iter.toFirst(); iter.current(); ++iter) | 420 | for (iter.toFirst(); iter.current(); ++iter) |
413 | { | 421 | { |
414 | if ( !sef && (*iter)->second.isEmpty() ) | 422 | if ( !sef && (*iter)->second.isEmpty() ) |
415 | continue; | 423 | continue; |
416 | lines = QMIN( (*iter)->second.contains('\n') + 1, maxLines ); | 424 | lines = QMIN( (*iter)->second.count('\n') + 1, maxLines ); |
417 | fieldHeight += ( lines * fh ) + 2;//sp; | 425 | fieldHeight += ( lines * fh ) + 2;//sp; |
418 | } | 426 | } |
419 | 427 | ||
420 | // height of caption font (bold) | 428 | // height of caption font (bold) |
@@ -449,9 +457,9 @@ void CardViewItem::insertField(const QString &label, const QString &value) | |||
449 | void CardViewItem::removeField(const QString &label) | 457 | void CardViewItem::removeField(const QString &label) |
450 | { | 458 | { |
451 | CardViewItem::Field *f; | 459 | CardViewItem::Field *f; |
452 | 460 | ||
453 | QPtrListIterator< CardViewItem::Field > iter(d->mFieldList); | 461 | Q3PtrListIterator< CardViewItem::Field > iter(d->mFieldList); |
454 | for (iter.toFirst(); iter.current(); ++iter) | 462 | for (iter.toFirst(); iter.current(); ++iter) |
455 | { | 463 | { |
456 | f = *iter; | 464 | f = *iter; |
457 | if (f->first == label) | 465 | if (f->first == label) |
@@ -522,9 +530,9 @@ void CardViewItem::setCaption(const QString &caption) | |||
522 | } | 530 | } |
523 | 531 | ||
524 | QString CardViewItem::fieldValue(const QString &label) | 532 | QString CardViewItem::fieldValue(const QString &label) |
525 | { | 533 | { |
526 | QPtrListIterator< CardViewItem::Field > iter(d->mFieldList); | 534 | Q3PtrListIterator< CardViewItem::Field > iter(d->mFieldList); |
527 | for (iter.toFirst(); iter.current(); ++iter) | 535 | for (iter.toFirst(); iter.current(); ++iter) |
528 | if ((*iter)->first == label) | 536 | if ((*iter)->first == label) |
529 | return (*iter)->second; | 537 | return (*iter)->second; |
530 | 538 | ||
@@ -568,9 +576,9 @@ void CardViewItem::showFullString( const QPoint &itempos, CardViewTip *tip ) | |||
568 | // { | 576 | // { |
569 | Field *_f; | 577 | Field *_f; |
570 | for (_f = d->mFieldList.first(); _f != f; _f = d->mFieldList.next()) | 578 | for (_f = d->mFieldList.first(); _f != f; _f = d->mFieldList.next()) |
571 | if ( se || ! _f->second.isEmpty() ) | 579 | if ( se || ! _f->second.isEmpty() ) |
572 | y += ( QMIN(_f->second.contains('\n')+1, maxLines) * fh ) + 2; | 580 | y += ( QMIN(_f->second.count('\n')+1, maxLines) * fh ) + 2; |
573 | // } | 581 | // } |
574 | if ( isLabel && itempos.y() > y + fh ) | 582 | if ( isLabel && itempos.y() > y + fh ) |
575 | return; | 583 | return; |
576 | // label or data? | 584 | // label or data? |
@@ -585,9 +593,9 @@ void CardViewItem::showFullString( const QPoint &itempos, CardViewTip *tip ) | |||
585 | { | 593 | { |
586 | trimmed = mView->d->mFm->width( s ) > mw - colonWidth; | 594 | trimmed = mView->d->mFm->width( s ) > mw - colonWidth; |
587 | } else { | 595 | } else { |
588 | QRect r( mView->d->mFm->boundingRect( 0, 0, INT_MAX, INT_MAX, Qt::AlignTop|Qt::AlignLeft, s ) ); | 596 | QRect r( mView->d->mFm->boundingRect( 0, 0, INT_MAX, INT_MAX, Qt::AlignTop|Qt::AlignLeft, s ) ); |
589 | trimmed = r.width() > mw || r.height()/fh > QMIN(s.contains('\n') + 1, maxLines); | 597 | trimmed = r.width() > mw || r.height()/fh > QMIN(s.count('\n') + 1, maxLines); |
590 | } | 598 | } |
591 | } | 599 | } |
592 | if ( trimmed ) | 600 | if ( trimmed ) |
593 | { | 601 | { |
@@ -625,9 +633,9 @@ CardViewItem::Field *CardViewItem::fieldAt( const QPoint & itempos ) const | |||
625 | Field *f; | 633 | Field *f; |
626 | for ( f = d->mFieldList.first(); f; f = d->mFieldList.next() ) | 634 | for ( f = d->mFieldList.first(); f; f = d->mFieldList.next() ) |
627 | { | 635 | { |
628 | if ( showEmpty || !f->second.isEmpty() ) | 636 | if ( showEmpty || !f->second.isEmpty() ) |
629 | ypos += ( QMIN( f->second.contains('\n')+1, maxLines ) *fh)+2; | 637 | ypos += ( QMIN( f->second.count('\n')+1, maxLines ) *fh)+2; |
630 | if ( iy <= ypos ) | 638 | if ( iy <= ypos ) |
631 | break; | 639 | break; |
632 | } | 640 | } |
633 | return f ? f : 0; | 641 | return f ? f : 0; |
@@ -636,9 +644,9 @@ CardViewItem::Field *CardViewItem::fieldAt( const QPoint & itempos ) const | |||
636 | 644 | ||
637 | //BEGIN CardView | 645 | //BEGIN CardView |
638 | 646 | ||
639 | CardView::CardView(QWidget *parent, const char *name) | 647 | CardView::CardView(QWidget *parent, const char *name) |
640 | : QScrollView(parent, name), | 648 | : Q3ScrollView(parent, name), |
641 | d(new CardViewPrivate()) | 649 | d(new CardViewPrivate()) |
642 | { | 650 | { |
643 | mFlagKeyPressed = false; | 651 | mFlagKeyPressed = false; |
644 | mFlagBlockKeyPressed = false; | 652 | mFlagBlockKeyPressed = false; |
@@ -655,15 +663,15 @@ CardView::CardView(QWidget *parent, const char *name) | |||
655 | d->mTimer = ( new QTimer(this, "mouseTimer") ), | 663 | d->mTimer = ( new QTimer(this, "mouseTimer") ), |
656 | 664 | ||
657 | viewport()->setMouseTracking( true ); | 665 | viewport()->setMouseTracking( true ); |
658 | viewport()->setFocusProxy(this); | 666 | viewport()->setFocusProxy(this); |
659 | viewport()->setFocusPolicy(WheelFocus); | 667 | viewport()->setFocusPolicy(Qt::WheelFocus); |
660 | viewport()->setBackgroundMode(PaletteBase); | 668 | viewport()->setBackgroundMode(Qt::PaletteBase); |
661 | 669 | ||
662 | connect( d->mTimer, SIGNAL(timeout()), this, SLOT(tryShowFullText()) ); | 670 | connect( d->mTimer, SIGNAL(timeout()), this, SLOT(tryShowFullText()) ); |
663 | 671 | ||
664 | //US setBackgroundMode(PaletteBackground, PaletteBase); | 672 | //US setBackgroundMode(PaletteBackground, PaletteBase); |
665 | setBackgroundMode(PaletteBackground); | 673 | setBackgroundMode(Qt::PaletteBackground); |
666 | 674 | ||
667 | // no reason for a vertical scrollbar | 675 | // no reason for a vertical scrollbar |
668 | setVScrollBarMode(AlwaysOff); | 676 | setVScrollBarMode(AlwaysOff); |
669 | } | 677 | } |
@@ -738,9 +746,9 @@ void CardView::setCurrentItem( CardViewItem *item ) | |||
738 | 746 | ||
739 | CardViewItem *CardView::itemAt(const QPoint &viewPos) | 747 | CardViewItem *CardView::itemAt(const QPoint &viewPos) |
740 | { | 748 | { |
741 | CardViewItem *item = 0; | 749 | CardViewItem *item = 0; |
742 | QPtrListIterator<CardViewItem> iter(d->mItemList); | 750 | Q3PtrListIterator<CardViewItem> iter(d->mItemList); |
743 | bool found = false; | 751 | bool found = false; |
744 | for (iter.toFirst(); iter.current() && !found; ++iter) | 752 | for (iter.toFirst(); iter.current() && !found; ++iter) |
745 | { | 753 | { |
746 | item = *iter; | 754 | item = *iter; |
@@ -786,9 +794,9 @@ CardView::SelectionMode CardView::selectionMode() const | |||
786 | } | 794 | } |
787 | 795 | ||
788 | void CardView::selectAll(bool state) | 796 | void CardView::selectAll(bool state) |
789 | { | 797 | { |
790 | QPtrListIterator<CardViewItem> iter(d->mItemList); | 798 | Q3PtrListIterator<CardViewItem> iter(d->mItemList); |
791 | if (!state) | 799 | if (!state) |
792 | { | 800 | { |
793 | for (iter.toFirst(); iter.current(); ++iter) | 801 | for (iter.toFirst(); iter.current(); ++iter) |
794 | { | 802 | { |
@@ -877,9 +885,9 @@ bool CardView::isSelected(CardViewItem *item) const | |||
877 | 885 | ||
878 | CardViewItem *CardView::selectedItem() const | 886 | CardViewItem *CardView::selectedItem() const |
879 | { | 887 | { |
880 | // find the first selected item | 888 | // find the first selected item |
881 | QPtrListIterator<CardViewItem> iter(d->mItemList); | 889 | Q3PtrListIterator<CardViewItem> iter(d->mItemList); |
882 | for (iter.toFirst(); iter.current(); ++iter) | 890 | for (iter.toFirst(); iter.current(); ++iter) |
883 | { | 891 | { |
884 | if ((*iter)->isSelected()) | 892 | if ((*iter)->isSelected()) |
885 | return *iter; | 893 | return *iter; |
@@ -954,9 +962,9 @@ void CardView::drawContents(QPainter *p, int clipx, int clipy, | |||
954 | // make sure the viewport is a pure background | 962 | // make sure the viewport is a pure background |
955 | viewport()->erase( QRect ( cX, cY , clipw, cliph ) ); | 963 | viewport()->erase( QRect ( cX, cY , clipw, cliph ) ); |
956 | 964 | ||
957 | // Now tell the cards to draw, if they are in the clip region | 965 | // Now tell the cards to draw, if they are in the clip region |
958 | QPtrListIterator<CardViewItem> iter(d->mItemList); | 966 | Q3PtrListIterator<CardViewItem> iter(d->mItemList); |
959 | for (iter.toFirst(); iter.current(); ++iter) | 967 | for (iter.toFirst(); iter.current(); ++iter) |
960 | { | 968 | { |
961 | item = *iter; | 969 | item = *iter; |
962 | cardRect.setRect( item->d->x, item->d->y, d->mItemWidth, item->height() ); | 970 | cardRect.setRect( item->d->x, item->d->y, d->mItemWidth, item->height() ); |
@@ -974,9 +982,9 @@ void CardView::drawContents(QPainter *p, int clipx, int clipy, | |||
974 | } | 982 | } |
975 | } | 983 | } |
976 | 984 | ||
977 | // Followed by the separators if they are in the clip region | 985 | // Followed by the separators if they are in the clip region |
978 | QPtrListIterator<CardViewSeparator> sepIter(d->mSeparatorList); | 986 | Q3PtrListIterator<CardViewSeparator> sepIter(d->mSeparatorList); |
979 | for (sepIter.toFirst(); sepIter.current(); ++sepIter) | 987 | for (sepIter.toFirst(); sepIter.current(); ++sepIter) |
980 | { | 988 | { |
981 | sep = *sepIter; | 989 | sep = *sepIter; |
982 | sepRect = sep->mRect; | 990 | sepRect = sep->mRect; |
@@ -992,9 +1000,9 @@ void CardView::drawContents(QPainter *p, int clipx, int clipy, | |||
992 | } | 1000 | } |
993 | 1001 | ||
994 | void CardView::resizeEvent(QResizeEvent *e) | 1002 | void CardView::resizeEvent(QResizeEvent *e) |
995 | { | 1003 | { |
996 | QScrollView::resizeEvent(e); | 1004 | Q3ScrollView::resizeEvent(e); |
997 | 1005 | ||
998 | setLayoutDirty(true); | 1006 | setLayoutDirty(true); |
999 | } | 1007 | } |
1000 | 1008 | ||
@@ -1012,9 +1020,9 @@ void CardView::calcLayout() | |||
1012 | 1020 | ||
1013 | // delete the old separators | 1021 | // delete the old separators |
1014 | d->mSeparatorList.clear(); | 1022 | d->mSeparatorList.clear(); |
1015 | 1023 | ||
1016 | QPtrListIterator<CardViewItem> iter(d->mItemList); | 1024 | Q3PtrListIterator<CardViewItem> iter(d->mItemList); |
1017 | CardViewItem *item = 0; | 1025 | CardViewItem *item = 0; |
1018 | CardViewSeparator *sep = 0; | 1026 | CardViewSeparator *sep = 0; |
1019 | xPos += cardSpacing; | 1027 | xPos += cardSpacing; |
1020 | 1028 | ||
@@ -1055,9 +1063,9 @@ void CardView::calcLayout() | |||
1055 | resizeContents( xPos + cardSpacing, maxHeight ); | 1063 | resizeContents( xPos + cardSpacing, maxHeight ); |
1056 | 1064 | ||
1057 | // Update the height of all the separators now that we know the | 1065 | // Update the height of all the separators now that we know the |
1058 | // max height of a column | 1066 | // max height of a column |
1059 | QPtrListIterator<CardViewSeparator> sepIter(d->mSeparatorList); | 1067 | Q3PtrListIterator<CardViewSeparator> sepIter(d->mSeparatorList); |
1060 | for (sepIter.toFirst(); sepIter.current(); ++sepIter) | 1068 | for (sepIter.toFirst(); sepIter.current(); ++sepIter) |
1061 | { | 1069 | { |
1062 | (*sepIter)->mRect.setHeight(maxHeight - 2*cardSpacing - 2*d->mItemMargin); | 1070 | (*sepIter)->mRect.setHeight(maxHeight - 2*cardSpacing - 2*d->mItemMargin); |
1063 | } | 1071 | } |
@@ -1100,9 +1108,9 @@ void CardView::setItemSpacing( uint spacing ) | |||
1100 | } | 1108 | } |
1101 | 1109 | ||
1102 | void CardView::contentsMousePressEvent(QMouseEvent *e) | 1110 | void CardView::contentsMousePressEvent(QMouseEvent *e) |
1103 | { | 1111 | { |
1104 | QScrollView::contentsMousePressEvent(e); | 1112 | Q3ScrollView::contentsMousePressEvent(e); |
1105 | 1113 | ||
1106 | QPoint pos = e->pos(); | 1114 | QPoint pos = e->pos(); |
1107 | d->mLastClickPos = pos; | 1115 | d->mLastClickPos = pos; |
1108 | 1116 | ||
@@ -1170,9 +1178,9 @@ void CardView::contentsMousePressEvent(QMouseEvent *e) | |||
1170 | if ( item == other ) return; | 1178 | if ( item == other ) return; |
1171 | 1179 | ||
1172 | bool s = ! item->isSelected(); | 1180 | bool s = ! item->isSelected(); |
1173 | 1181 | ||
1174 | if ( s && ! (e->state() & ControlButton) ) | 1182 | if ( s && ! (e->state() & Qt::ControlButton) ) |
1175 | { | 1183 | { |
1176 | bool b = signalsBlocked(); | 1184 | bool b = signalsBlocked(); |
1177 | blockSignals(true); | 1185 | blockSignals(true); |
1178 | selectAll(false); | 1186 | selectAll(false); |
@@ -1218,9 +1226,9 @@ void CardView::contentsMousePressEvent(QMouseEvent *e) | |||
1218 | } | 1226 | } |
1219 | 1227 | ||
1220 | void CardView::contentsMouseReleaseEvent(QMouseEvent *e) | 1228 | void CardView::contentsMouseReleaseEvent(QMouseEvent *e) |
1221 | { | 1229 | { |
1222 | QScrollView::contentsMouseReleaseEvent(e); | 1230 | Q3ScrollView::contentsMouseReleaseEvent(e); |
1223 | 1231 | ||
1224 | if ( d->mResizeAnchor ) | 1232 | if ( d->mResizeAnchor ) |
1225 | { | 1233 | { |
1226 | // finish the resizing: | 1234 | // finish the resizing: |
@@ -1256,9 +1264,9 @@ void CardView::contentsMouseReleaseEvent(QMouseEvent *e) | |||
1256 | } | 1264 | } |
1257 | 1265 | ||
1258 | void CardView::contentsMouseDoubleClickEvent(QMouseEvent *e) | 1266 | void CardView::contentsMouseDoubleClickEvent(QMouseEvent *e) |
1259 | { | 1267 | { |
1260 | QScrollView::contentsMouseDoubleClickEvent(e); | 1268 | Q3ScrollView::contentsMouseDoubleClickEvent(e); |
1261 | 1269 | ||
1262 | CardViewItem *item = itemAt(e->pos()); | 1270 | CardViewItem *item = itemAt(e->pos()); |
1263 | 1271 | ||
1264 | if (item) | 1272 | if (item) |
@@ -1301,14 +1309,14 @@ void CardView::contentsMouseMoveEvent( QMouseEvent *e ) | |||
1301 | int colw = colcontentw + d->mSepWidth; | 1309 | int colw = colcontentw + d->mSepWidth; |
1302 | int m = e->x()%colw; | 1310 | int m = e->x()%colw; |
1303 | if ( m >= colcontentw && m > 0 ) | 1311 | if ( m >= colcontentw && m > 0 ) |
1304 | { | 1312 | { |
1305 | setCursor( SplitVCursor ); // Why does this fail sometimes? | 1313 | setCursor( Qt::SplitVCursor ); // Why does this fail sometimes? |
1306 | d->mOnSeparator = true; | 1314 | d->mOnSeparator = true; |
1307 | } | 1315 | } |
1308 | else | 1316 | else |
1309 | { | 1317 | { |
1310 | setCursor( ArrowCursor ); | 1318 | setCursor( Qt::ArrowCursor ); |
1311 | d->mOnSeparator = false; | 1319 | d->mOnSeparator = false; |
1312 | } | 1320 | } |
1313 | } | 1321 | } |
1314 | } | 1322 | } |
@@ -1323,9 +1331,9 @@ void CardView::leaveEvent( QEvent * ) | |||
1323 | d->mTimer->stop(); | 1331 | d->mTimer->stop(); |
1324 | if (d->mOnSeparator) | 1332 | if (d->mOnSeparator) |
1325 | { | 1333 | { |
1326 | d->mOnSeparator = false; | 1334 | d->mOnSeparator = false; |
1327 | setCursor( ArrowCursor ); | 1335 | setCursor( Qt::ArrowCursor ); |
1328 | } | 1336 | } |
1329 | } | 1337 | } |
1330 | 1338 | ||
1331 | void CardView::focusInEvent( QFocusEvent * ) | 1339 | void CardView::focusInEvent( QFocusEvent * ) |
@@ -1367,23 +1375,23 @@ void CardView::keyPressEvent( QKeyEvent *e ) | |||
1367 | CardViewItem *old = d->mCurrentItem; | 1375 | CardViewItem *old = d->mCurrentItem; |
1368 | 1376 | ||
1369 | switch ( e->key() ) | 1377 | switch ( e->key() ) |
1370 | { | 1378 | { |
1371 | case Key_Up: | 1379 | case Qt::Key_Up: |
1372 | if ( pos > 0 ) | 1380 | if ( pos > 0 ) |
1373 | { | 1381 | { |
1374 | aItem = d->mItemList.at( pos - 1 ); | 1382 | aItem = d->mItemList.at( pos - 1 ); |
1375 | setCurrentItem( aItem ); | 1383 | setCurrentItem( aItem ); |
1376 | } | 1384 | } |
1377 | break; | 1385 | break; |
1378 | case Key_Down: | 1386 | case Qt::Key_Down: |
1379 | if ( pos < d->mItemList.count() - 1 ) | 1387 | if ( pos < d->mItemList.count() - 1 ) |
1380 | { | 1388 | { |
1381 | aItem = d->mItemList.at( pos + 1 ); | 1389 | aItem = d->mItemList.at( pos + 1 ); |
1382 | setCurrentItem( aItem ); | 1390 | setCurrentItem( aItem ); |
1383 | } | 1391 | } |
1384 | break; | 1392 | break; |
1385 | case Key_Left: | 1393 | case Qt::Key_Left: |
1386 | { | 1394 | { |
1387 | // look for an item in the previous/next column, starting from | 1395 | // look for an item in the previous/next column, starting from |
1388 | // the vertical middle of the current item. | 1396 | // the vertical middle of the current item. |
1389 | // FIXME use nice calculatd measures!!! | 1397 | // FIXME use nice calculatd measures!!! |
@@ -1399,9 +1407,9 @@ void CardView::keyPressEvent( QKeyEvent *e ) | |||
1399 | if ( aItem ) | 1407 | if ( aItem ) |
1400 | setCurrentItem( aItem ); | 1408 | setCurrentItem( aItem ); |
1401 | } | 1409 | } |
1402 | break; | 1410 | break; |
1403 | case Key_Right: | 1411 | case Qt::Key_Right: |
1404 | { | 1412 | { |
1405 | // FIXME use nice calculated measures!!! | 1413 | // FIXME use nice calculated measures!!! |
1406 | QPoint aPoint( d->mCurrentItem->d->x + d->mItemWidth, d->mCurrentItem->d->y ); | 1414 | QPoint aPoint( d->mCurrentItem->d->x + d->mItemWidth, d->mCurrentItem->d->y ); |
1407 | aPoint += QPoint( 30,(d->mCurrentItem->height()/2) ); | 1415 | aPoint += QPoint( 30,(d->mCurrentItem->height()/2) ); |
@@ -1414,17 +1422,17 @@ void CardView::keyPressEvent( QKeyEvent *e ) | |||
1414 | if ( aItem ) | 1422 | if ( aItem ) |
1415 | setCurrentItem( aItem ); | 1423 | setCurrentItem( aItem ); |
1416 | } | 1424 | } |
1417 | break; | 1425 | break; |
1418 | case Key_Home: | 1426 | case Qt::Key_Home: |
1419 | aItem = d->mItemList.first(); | 1427 | aItem = d->mItemList.first(); |
1420 | setCurrentItem( aItem ); | 1428 | setCurrentItem( aItem ); |
1421 | break; | 1429 | break; |
1422 | case Key_End: | 1430 | case Qt::Key_End: |
1423 | aItem = d->mItemList.last(); | 1431 | aItem = d->mItemList.last(); |
1424 | setCurrentItem( aItem ); | 1432 | setCurrentItem( aItem ); |
1425 | break; | 1433 | break; |
1426 | case Key_Prior: // PageUp | 1434 | case Qt::Key_Prior: // PageUp |
1427 | { | 1435 | { |
1428 | // QListView: "Make the item above the top visible and current" | 1436 | // QListView: "Make the item above the top visible and current" |
1429 | // TODO if contentsY(), pick the top item of the leftmost visible column | 1437 | // TODO if contentsY(), pick the top item of the leftmost visible column |
1430 | if ( contentsX() <= 0 ) | 1438 | if ( contentsX() <= 0 ) |
@@ -1435,9 +1443,9 @@ void CardView::keyPressEvent( QKeyEvent *e ) | |||
1435 | if ( aItem ) | 1443 | if ( aItem ) |
1436 | setCurrentItem( aItem ); | 1444 | setCurrentItem( aItem ); |
1437 | } | 1445 | } |
1438 | break; | 1446 | break; |
1439 | case Key_Next: // PageDown | 1447 | case Qt::Key_Next: // PageDown |
1440 | { | 1448 | { |
1441 | // QListView: "Make the item below the bottom visible and current" | 1449 | // QListView: "Make the item below the bottom visible and current" |
1442 | // find the first not fully visible column. | 1450 | // find the first not fully visible column. |
1443 | // TODO: consider if a partly visible (or even hidden) item at the | 1451 | // TODO: consider if a partly visible (or even hidden) item at the |
@@ -1457,21 +1465,21 @@ void CardView::keyPressEvent( QKeyEvent *e ) | |||
1457 | if ( aItem ) | 1465 | if ( aItem ) |
1458 | setCurrentItem( aItem ); | 1466 | setCurrentItem( aItem ); |
1459 | } | 1467 | } |
1460 | break; | 1468 | break; |
1461 | case Key_Space: | 1469 | case Qt::Key_Space: |
1462 | setSelected( d->mCurrentItem, !d->mCurrentItem->isSelected() ); | 1470 | setSelected( d->mCurrentItem, !d->mCurrentItem->isSelected() ); |
1463 | emit selectionChanged(); | 1471 | emit selectionChanged(); |
1464 | break; | 1472 | break; |
1465 | case Key_Return: | 1473 | case Qt::Key_Return: |
1466 | case Key_Enter: | 1474 | case Qt::Key_Enter: |
1467 | { | 1475 | { |
1468 | emit returnPressed( d->mCurrentItem ); | 1476 | emit returnPressed( d->mCurrentItem ); |
1469 | emit executed( d->mCurrentItem ); | 1477 | emit executed( d->mCurrentItem ); |
1470 | } | 1478 | } |
1471 | break; | 1479 | break; |
1472 | default: | 1480 | default: |
1473 | if ( (e->state() & ControlButton) && e->key() == Key_A ) | 1481 | if ( (e->state() & Qt::ControlButton) && e->key() == Qt::Key_A ) |
1474 | { | 1482 | { |
1475 | // select all | 1483 | // select all |
1476 | selectAll( true ); | 1484 | selectAll( true ); |
1477 | break; | 1485 | break; |
@@ -1487,9 +1495,9 @@ void CardView::keyPressEvent( QKeyEvent *e ) | |||
1487 | if ( aItem ) | 1495 | if ( aItem ) |
1488 | { | 1496 | { |
1489 | if ( d->mSelectionMode == CardView::Extended ) | 1497 | if ( d->mSelectionMode == CardView::Extended ) |
1490 | { | 1498 | { |
1491 | if ( (e->state() & ShiftButton) ) | 1499 | if ( (e->state() & Qt::ShiftButton) ) |
1492 | { | 1500 | { |
1493 | // shift button: toggle range | 1501 | // shift button: toggle range |
1494 | // if control button is pressed, leave all items | 1502 | // if control button is pressed, leave all items |
1495 | // and toggle selection current->old current | 1503 | // and toggle selection current->old current |
@@ -1518,9 +1526,9 @@ void CardView::keyPressEvent( QKeyEvent *e ) | |||
1518 | repaintItem( item ); | 1526 | repaintItem( item ); |
1519 | } | 1527 | } |
1520 | emit selectionChanged(); | 1528 | emit selectionChanged(); |
1521 | } | 1529 | } |
1522 | else if ( (e->state() & ControlButton) ) | 1530 | else if ( (e->state() & Qt::ControlButton) ) |
1523 | { | 1531 | { |
1524 | // control button: do nothing | 1532 | // control button: do nothing |
1525 | } | 1533 | } |
1526 | else | 1534 | else |
@@ -1637,11 +1645,11 @@ void CardView::drawRubberBands( int pos ) | |||
1637 | int x = d->firstX + tmpcw - d->mSepWidth - contentsX(); | 1645 | int x = d->firstX + tmpcw - d->mSepWidth - contentsX(); |
1638 | int h = visibleHeight(); | 1646 | int h = visibleHeight(); |
1639 | 1647 | ||
1640 | QPainter p( viewport() ); | 1648 | QPainter p( viewport() ); |
1641 | p.setRasterOp( XorROP ); | 1649 | p.setCompositionMode( QPainter::CompositionMode_Xor ); |
1642 | p.setPen( gray ); | 1650 | p.setPen( Qt::gray ); |
1643 | p.setBrush( gray ); | 1651 | p.setBrush( Qt::gray ); |
1644 | uint n = d->first; | 1652 | uint n = d->first; |
1645 | // erase | 1653 | // erase |
1646 | if ( d->mRubberBandAnchor ) | 1654 | if ( d->mRubberBandAnchor ) |
1647 | do { | 1655 | do { |
@@ -1698,9 +1706,9 @@ QFont CardView::headerFont() const | |||
1698 | } | 1706 | } |
1699 | 1707 | ||
1700 | void CardView::setFont( const QFont &fnt ) | 1708 | void CardView::setFont( const QFont &fnt ) |
1701 | { | 1709 | { |
1702 | QScrollView::setFont( fnt ); | 1710 | Q3ScrollView::setFont( fnt ); |
1703 | delete d->mFm; | 1711 | delete d->mFm; |
1704 | d->mFm = new QFontMetrics( fnt ); | 1712 | d->mFm = new QFontMetrics( fnt ); |
1705 | } | 1713 | } |
1706 | 1714 | ||
@@ -1735,16 +1743,16 @@ void CardView::keyReleaseEvent ( QKeyEvent * e ) | |||
1735 | qApp->processEvents(); | 1743 | qApp->processEvents(); |
1736 | mFlagBlockKeyPressed = false; | 1744 | mFlagBlockKeyPressed = false; |
1737 | mFlagKeyPressed = false; | 1745 | mFlagKeyPressed = false; |
1738 | } | 1746 | } |
1739 | QScrollView::keyReleaseEvent ( e ); | 1747 | Q3ScrollView::keyReleaseEvent ( e ); |
1740 | } | 1748 | } |
1741 | 1749 | ||
1742 | 1750 | ||
1743 | 1751 | ||
1744 | 1752 | ||
1745 | 1753 | ||
1746 | //END Cardview | 1754 | //END Cardview |
1747 | 1755 | ||
1748 | #ifndef KAB_EMBEDDED | 1756 | #ifndef KAB_EMBEDDED_ |
1749 | #include "cardview.moc" | 1757 | #include "moc_cardview.cpp" |
1750 | #endif //KAB_EMBEDDED | 1758 | #endif //KAB_EMBEDDED |
diff --git a/kaddressbook/views/cardview.h b/kaddressbook/views/cardview.h index 2ea3771..9c245ea 100644 --- a/kaddressbook/views/cardview.h +++ b/kaddressbook/views/cardview.h | |||
@@ -1,13 +1,21 @@ | |||
1 | #ifndef CARDVIEW_H | 1 | #ifndef CARDVIEW_H |
2 | #define CARDVIEW_H | 2 | #define CARDVIEW_H |
3 | 3 | ||
4 | #include <qscrollview.h> | 4 | #include <q3scrollview.h> |
5 | #include <qptrlist.h> | 5 | #include <q3ptrlist.h> |
6 | #include <qstring.h> | 6 | #include <qstring.h> |
7 | #include <qrect.h> | 7 | #include <qrect.h> |
8 | #include <qpair.h> | 8 | #include <qpair.h> |
9 | #include <qpoint.h> | 9 | #include <qpoint.h> |
10 | //Added by qt3to4: | ||
11 | #include <QWheelEvent> | ||
12 | #include <QResizeEvent> | ||
13 | #include <QFocusEvent> | ||
14 | #include <QLabel> | ||
15 | #include <QMouseEvent> | ||
16 | #include <QKeyEvent> | ||
17 | #include <QEvent> | ||
10 | 18 | ||
11 | class QLabel; | 19 | class QLabel; |
12 | class QPainter; | 20 | class QPainter; |
13 | class QResizeEvent; | 21 | class QResizeEvent; |
@@ -147,9 +155,9 @@ class CardViewItem | |||
147 | * QIconView. The CardView is also completely independant of KAddressBook and | 155 | * QIconView. The CardView is also completely independant of KAddressBook and |
148 | * can be used elsewhere. With the exception of a few simple config checks, | 156 | * can be used elsewhere. With the exception of a few simple config checks, |
149 | * the CardView is also 100% independant of KDE. | 157 | * the CardView is also 100% independant of KDE. |
150 | */ | 158 | */ |
151 | class CardView : public QScrollView | 159 | class CardView : public Q3ScrollView |
152 | { | 160 | { |
153 | friend class CardViewItem; | 161 | friend class CardViewItem; |
154 | 162 | ||
155 | Q_OBJECT | 163 | Q_OBJECT |
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 | |||
@@ -18,8 +18,13 @@ | |||
18 | * | 18 | * |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <qpainter.h> | 21 | #include <qpainter.h> |
22 | //Added by qt3to4: | ||
23 | #include <QDragEnterEvent> | ||
24 | #include <QDropEvent> | ||
25 | #include <QDragMoveEvent> | ||
26 | #include <QDragLeaveEvent> | ||
22 | 27 | ||
23 | #include <kcolordialog.h> | 28 | #include <kcolordialog.h> |
24 | 29 | ||
25 | #ifndef KAB_EMBEDDED | 30 | #ifndef KAB_EMBEDDED |
@@ -30,13 +35,13 @@ | |||
30 | #ifdef DESKTOP_VERSION | 35 | #ifdef DESKTOP_VERSION |
31 | #include <qcolordialog.h> | 36 | #include <qcolordialog.h> |
32 | #endif | 37 | #endif |
33 | 38 | ||
34 | ColorListBox::ColorListBox( QWidget *parent, const char *name, WFlags f ) | 39 | ColorListBox::ColorListBox( QWidget *parent, const char *name, Qt::WFlags f ) |
35 | :KListBox( parent, name, f ), mCurrentOnDragEnter(-1) | 40 | :KListBox( parent, name, f ), mCurrentOnDragEnter(-1) |
36 | { | 41 | { |
37 | connect( this, SIGNAL(selected(int)), this, SLOT(newColor(int)) ); | 42 | connect( this, SIGNAL(selected(int)), this, SLOT(newColor(int)) ); |
38 | connect( this, SIGNAL(clicked(QListBoxItem *)), this, SLOT(slotNewColor(QListBoxItem *)) ); | 43 | connect( this, SIGNAL(clicked(Q3ListBoxItem *)), this, SLOT(slotNewColor(Q3ListBoxItem *)) ); |
39 | setAcceptDrops( true); | 44 | setAcceptDrops( true); |
40 | } | 45 | } |
41 | 46 | ||
42 | 47 | ||
@@ -46,9 +51,9 @@ void ColorListBox::setEnabled( bool state ) | |||
46 | { | 51 | { |
47 | return; | 52 | return; |
48 | } | 53 | } |
49 | 54 | ||
50 | QListBox::setEnabled( state ); | 55 | Q3ListBox::setEnabled( state ); |
51 | for( uint i=0; i<count(); i++ ) | 56 | for( uint i=0; i<count(); i++ ) |
52 | { | 57 | { |
53 | updateItem( i ); | 58 | updateItem( i ); |
54 | } | 59 | } |
@@ -74,12 +79,12 @@ QColor ColorListBox::color( uint index ) const | |||
74 | return( colorItem->color() ); | 79 | return( colorItem->color() ); |
75 | } | 80 | } |
76 | else | 81 | else |
77 | { | 82 | { |
78 | return( black ); | 83 | return( Qt::black ); |
79 | } | 84 | } |
80 | } | 85 | } |
81 | void ColorListBox::slotNewColor(QListBoxItem * i) | 86 | void ColorListBox::slotNewColor(Q3ListBoxItem * i) |
82 | { | 87 | { |
83 | if ( i ) | 88 | if ( i ) |
84 | newColor( index( i ) ); | 89 | newColor( index( i ) ); |
85 | } | 90 | } |
@@ -197,9 +202,9 @@ qDebug("ColorListBox::dropEvent drag&drop currently not supported"); | |||
197 | 202 | ||
198 | 203 | ||
199 | 204 | ||
200 | ColorListItem::ColorListItem( const QString &text, const QColor &color ) | 205 | ColorListItem::ColorListItem( const QString &text, const QColor &color ) |
201 | : QListBoxItem(), mColor( color ), mBoxWidth( 30 ) | 206 | : Q3ListBoxItem(), mColor( color ), mBoxWidth( 30 ) |
202 | { | 207 | { |
203 | setText( text ); | 208 | setText( text ); |
204 | } | 209 | } |
205 | 210 | ||
@@ -228,18 +233,18 @@ void ColorListItem::paint( QPainter *p ) | |||
228 | p->fillRect( 4, 2, mBoxWidth-2, h-3, mColor ); | 233 | p->fillRect( 4, 2, mBoxWidth-2, h-3, mColor ); |
229 | } | 234 | } |
230 | 235 | ||
231 | 236 | ||
232 | int ColorListItem::height(const QListBox *lb ) const | 237 | int ColorListItem::height(const Q3ListBox *lb ) const |
233 | { | 238 | { |
234 | return( lb->fontMetrics().lineSpacing()+1 ); | 239 | return( lb->fontMetrics().lineSpacing()+1 ); |
235 | } | 240 | } |
236 | 241 | ||
237 | 242 | ||
238 | int ColorListItem::width(const QListBox *lb ) const | 243 | int ColorListItem::width(const Q3ListBox *lb ) const |
239 | { | 244 | { |
240 | return( mBoxWidth + lb->fontMetrics().width( text() ) + 6 ); | 245 | return( mBoxWidth + lb->fontMetrics().width( text() ) + 6 ); |
241 | } | 246 | } |
242 | 247 | ||
243 | #ifndef KAB_EMBEDDED | 248 | #ifndef KAB_EMBEDDED_ |
244 | #include "colorlistbox.moc" | 249 | #include "moc_colorlistbox.cpp" |
245 | #endif //KAB_EMBEDDED | 250 | #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 | |||
@@ -21,8 +21,13 @@ | |||
21 | #ifndef _COLOR_LISTBOX_H_ | 21 | #ifndef _COLOR_LISTBOX_H_ |
22 | #define _COLOR_LISTBOX_H_ | 22 | #define _COLOR_LISTBOX_H_ |
23 | 23 | ||
24 | #include <klistbox.h> | 24 | #include <klistbox.h> |
25 | //Added by qt3to4: | ||
26 | #include <QDragMoveEvent> | ||
27 | #include <QDragLeaveEvent> | ||
28 | #include <QDropEvent> | ||
29 | #include <QDragEnterEvent> | ||
25 | 30 | ||
26 | class QDragEnterEvent; | 31 | class QDragEnterEvent; |
27 | class QDragLeaveEvent; | 32 | class QDragLeaveEvent; |
28 | class QDragMoveEvent; | 33 | class QDragMoveEvent; |
@@ -32,9 +37,9 @@ class ColorListBox : public KListBox | |||
32 | { | 37 | { |
33 | Q_OBJECT | 38 | Q_OBJECT |
34 | 39 | ||
35 | public: | 40 | public: |
36 | ColorListBox( QWidget *parent=0, const char * name=0, WFlags f=0 ); | 41 | ColorListBox( QWidget *parent=0, const char * name=0, Qt::WFlags f=0 ); |
37 | void setColor( uint index, const QColor &color ); | 42 | void setColor( uint index, const QColor &color ); |
38 | QColor color( uint index ) const; | 43 | QColor color( uint index ) const; |
39 | 44 | ||
40 | public slots: | 45 | public slots: |
@@ -47,27 +52,27 @@ class ColorListBox : public KListBox | |||
47 | void dropEvent( QDropEvent *e ); | 52 | void dropEvent( QDropEvent *e ); |
48 | 53 | ||
49 | private slots: | 54 | private slots: |
50 | void newColor( int index ); | 55 | void newColor( int index ); |
51 | void slotNewColor(QListBoxItem * i); | 56 | void slotNewColor(Q3ListBoxItem * i); |
52 | 57 | ||
53 | private: | 58 | private: |
54 | int mCurrentOnDragEnter; | 59 | int mCurrentOnDragEnter; |
55 | 60 | ||
56 | }; | 61 | }; |
57 | 62 | ||
58 | 63 | ||
59 | class ColorListItem : public QListBoxItem | 64 | class ColorListItem : public Q3ListBoxItem |
60 | { | 65 | { |
61 | public: | 66 | public: |
62 | ColorListItem( const QString &text, const QColor &color=Qt::black ); | 67 | ColorListItem( const QString &text, const QColor &color=Qt::black ); |
63 | const QColor &color( void ); | 68 | const QColor &color( void ); |
64 | void setColor( const QColor &color ); | 69 | void setColor( const QColor &color ); |
65 | 70 | ||
66 | protected: | 71 | protected: |
67 | virtual void paint( QPainter * ); | 72 | virtual void paint( QPainter * ); |
68 | virtual int height( const QListBox * ) const; | 73 | virtual int height( const Q3ListBox * ) const; |
69 | virtual int width( const QListBox * ) const; | 74 | virtual int width( const Q3ListBox * ) const; |
70 | 75 | ||
71 | private: | 76 | private: |
72 | QColor mColor; | 77 | QColor mColor; |
73 | int mBoxWidth; | 78 | int mBoxWidth; |
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 | |||
@@ -24,13 +24,16 @@ | |||
24 | #include <qstring.h> | 24 | #include <qstring.h> |
25 | #include <qlayout.h> | 25 | #include <qlayout.h> |
26 | #include <qlabel.h> | 26 | #include <qlabel.h> |
27 | #include <qcheckbox.h> | 27 | #include <qcheckbox.h> |
28 | #include <qvbox.h> | 28 | #include <q3vbox.h> |
29 | #include <qgroupbox.h> | 29 | #include <q3groupbox.h> |
30 | #include <qspinbox.h> | 30 | #include <qspinbox.h> |
31 | #include <qtabwidget.h> | 31 | #include <qtabwidget.h> |
32 | #include <qwhatsthis.h> | 32 | #include <q3whatsthis.h> |
33 | //Added by qt3to4: | ||
34 | #include <Q3GridLayout> | ||
35 | #include <Q3Frame> | ||
33 | 36 | ||
34 | #include <kdebug.h> | 37 | #include <kdebug.h> |
35 | #include <kglobal.h> | 38 | #include <kglobal.h> |
36 | #include <kglobalsettings.h> | 39 | #include <kglobalsettings.h> |
@@ -88,9 +91,9 @@ void ConfigureCardViewWidget::saveSettings( KConfig *config ) | |||
88 | 91 | ||
89 | //////////////////////// | 92 | //////////////////////// |
90 | // CardViewLookNFeelPage | 93 | // CardViewLookNFeelPage |
91 | CardViewLookNFeelPage::CardViewLookNFeelPage( QWidget *parent, const char *name ) | 94 | CardViewLookNFeelPage::CardViewLookNFeelPage( QWidget *parent, const char *name ) |
92 | : QVBox( parent, name ) | 95 | : Q3VBox( parent, name ) |
93 | { | 96 | { |
94 | initGUI(); | 97 | initGUI(); |
95 | } | 98 | } |
96 | 99 | ||
@@ -233,87 +236,87 @@ void CardViewLookNFeelPage::initGUI() | |||
233 | 236 | ||
234 | QTabWidget *tabs = new QTabWidget( this ); | 237 | QTabWidget *tabs = new QTabWidget( this ); |
235 | 238 | ||
236 | // Layout | 239 | // Layout |
237 | QVBox *loTab = new QVBox( this, "layouttab" ); | 240 | Q3VBox *loTab = new Q3VBox( this, "layouttab" ); |
238 | 241 | ||
239 | loTab->setSpacing( spacing ); | 242 | loTab->setSpacing( spacing ); |
240 | loTab->setMargin( margin ); | 243 | loTab->setMargin( margin ); |
241 | 244 | ||
242 | QGroupBox *gbGeneral = new QGroupBox( 1, Qt::Horizontal, i18n("General"), loTab ); | 245 | Q3GroupBox *gbGeneral = new Q3GroupBox( 1, Qt::Horizontal, i18n("General"), loTab ); |
243 | 246 | ||
244 | cbDrawSeps = new QCheckBox( i18n("Draw &separators"), gbGeneral ); | 247 | cbDrawSeps = new QCheckBox( i18n("Draw &separators"), gbGeneral ); |
245 | 248 | ||
246 | QHBox *hbSW = new QHBox( gbGeneral ); | 249 | Q3HBox *hbSW = new Q3HBox( gbGeneral ); |
247 | QLabel *lSW = new QLabel( i18n("Separator &width:"), hbSW ); | 250 | QLabel *lSW = new QLabel( i18n("Separator &width:"), hbSW ); |
248 | sbSepWidth = new QSpinBox( 1, 50, 1, hbSW ); | 251 | sbSepWidth = new QSpinBox( 1, 50, 1, hbSW ); |
249 | lSW->setBuddy( sbSepWidth); | 252 | lSW->setBuddy( sbSepWidth); |
250 | 253 | ||
251 | QHBox *hbPadding = new QHBox( gbGeneral ); | 254 | Q3HBox *hbPadding = new Q3HBox( gbGeneral ); |
252 | QLabel *lSpacing = new QLabel( i18n("&Padding:"), hbPadding ); | 255 | QLabel *lSpacing = new QLabel( i18n("&Padding:"), hbPadding ); |
253 | sbSpacing = new QSpinBox( 0, 100, 1, hbPadding ); | 256 | sbSpacing = new QSpinBox( 0, 100, 1, hbPadding ); |
254 | lSpacing->setBuddy( sbSpacing ); | 257 | lSpacing->setBuddy( sbSpacing ); |
255 | 258 | ||
256 | QGroupBox *gbCards = new QGroupBox( 1, Qt::Horizontal, i18n("Cards"), loTab ); | 259 | Q3GroupBox *gbCards = new Q3GroupBox( 1, Qt::Horizontal, i18n("Cards"), loTab ); |
257 | 260 | ||
258 | QHBox *hbMargin = new QHBox( gbCards ); | 261 | Q3HBox *hbMargin = new Q3HBox( gbCards ); |
259 | QLabel *lMargin = new QLabel( i18n("&Margin:"), hbMargin ); | 262 | QLabel *lMargin = new QLabel( i18n("&Margin:"), hbMargin ); |
260 | sbMargin = new QSpinBox( 0, 100, 1, hbMargin ); | 263 | sbMargin = new QSpinBox( 0, 100, 1, hbMargin ); |
261 | lMargin->setBuddy( sbMargin ); | 264 | lMargin->setBuddy( sbMargin ); |
262 | 265 | ||
263 | cbDrawBorders = new QCheckBox( i18n("Draw &borders"), gbCards ); | 266 | cbDrawBorders = new QCheckBox( i18n("Draw &borders"), gbCards ); |
264 | 267 | ||
265 | loTab->setStretchFactor( new QWidget( loTab ), 1 ); | 268 | loTab->setStretchFactor( new QWidget( loTab ), 1 ); |
266 | 269 | ||
267 | QWhatsThis::add( sbMargin, i18n( | 270 | Q3WhatsThis::add( sbMargin, i18n( |
268 | "The item margin is the distance (in pixels) between the item edge and the item data. Most noticeably, " | 271 | "The item margin is the distance (in pixels) between the item edge and the item data. Most noticeably, " |
269 | "incrementing the item margin will add space between the focus rectangle and the item data." | 272 | "incrementing the item margin will add space between the focus rectangle and the item data." |
270 | ) ); | 273 | ) ); |
271 | QWhatsThis::add( lMargin, QWhatsThis::textFor( sbMargin ) ); | 274 | /* TODO:hacker: Q3WhatsThis::add( lMargin, Q3WhatsThis::textFor( sbMargin ) ); */ |
272 | QWhatsThis::add( sbSpacing, i18n( | 275 | Q3WhatsThis::add( sbSpacing, i18n( |
273 | "The Item Spacing decides the distance (in pixels) between the items and anything else: the view " | 276 | "The Item Spacing decides the distance (in pixels) between the items and anything else: the view " |
274 | "borders, other items or column separators." | 277 | "borders, other items or column separators." |
275 | ) ); | 278 | ) ); |
276 | QWhatsThis::add( lSpacing, QWhatsThis::textFor( sbSpacing ) ); | 279 | /* TODO:hacker: Q3WhatsThis::add( lSpacing, Q3WhatsThis::textFor( sbSpacing ) ); */ |
277 | QWhatsThis::add( sbSepWidth, i18n("Sets the width of column separators") ); | 280 | Q3WhatsThis::add( sbSepWidth, i18n("Sets the width of column separators") ); |
278 | QWhatsThis::add( lSW, QWhatsThis::textFor( sbSepWidth ) ); | 281 | /* TODO:hacker: Q3WhatsThis::add( lSW, Q3WhatsThis::textFor( sbSepWidth ) ); */ |
279 | 282 | ||
280 | tabs->addTab( loTab, i18n("&Layout") ); | 283 | tabs->addTab( loTab, i18n("&Layout") ); |
281 | 284 | ||
282 | // Colors | 285 | // Colors |
283 | QVBox *colorTab = new QVBox( this, "colortab" ); | 286 | Q3VBox *colorTab = new Q3VBox( this, "colortab" ); |
284 | colorTab->setSpacing( spacing ); | 287 | colorTab->setSpacing( spacing ); |
285 | colorTab->setMargin( spacing ); | 288 | colorTab->setMargin( spacing ); |
286 | cbEnableCustomColors = new QCheckBox( i18n("&Enable custom Colors"), colorTab ); | 289 | cbEnableCustomColors = new QCheckBox( i18n("&Enable custom Colors"), colorTab ); |
287 | connect( cbEnableCustomColors, SIGNAL(clicked()), this, SLOT(enableColors()) ); | 290 | connect( cbEnableCustomColors, SIGNAL(clicked()), this, SLOT(enableColors()) ); |
288 | lbColors = new ColorListBox( colorTab ); | 291 | lbColors = new ColorListBox( colorTab ); |
289 | tabs->addTab( colorTab, i18n("&Colors") ); | 292 | tabs->addTab( colorTab, i18n("&Colors") ); |
290 | 293 | ||
291 | QWhatsThis::add( cbEnableCustomColors, i18n( | 294 | Q3WhatsThis::add( cbEnableCustomColors, i18n( |
292 | "If custom colors are enabled, you may choose the colors for the view below. " | 295 | "If custom colors are enabled, you may choose the colors for the view below. " |
293 | "Otherwise colors from your current KDE color scheme are used." | 296 | "Otherwise colors from your current KDE color scheme are used." |
294 | ) ); | 297 | ) ); |
295 | QWhatsThis::add( lbColors, i18n( | 298 | Q3WhatsThis::add( lbColors, i18n( |
296 | "Double click or press RETURN on a item to select a color for the related strings in the view." | 299 | "Double click or press RETURN on a item to select a color for the related strings in the view." |
297 | ) ); | 300 | ) ); |
298 | 301 | ||
299 | // Fonts | 302 | // Fonts |
300 | QVBox *fntTab = new QVBox( this, "fonttab" ); | 303 | Q3VBox *fntTab = new Q3VBox( this, "fonttab" ); |
301 | 304 | ||
302 | fntTab->setSpacing( spacing ); | 305 | fntTab->setSpacing( spacing ); |
303 | fntTab->setMargin( spacing ); | 306 | fntTab->setMargin( spacing ); |
304 | 307 | ||
305 | cbEnableCustomFonts = new QCheckBox( i18n("&Enable custom fonts"), fntTab ); | 308 | cbEnableCustomFonts = new QCheckBox( i18n("&Enable custom fonts"), fntTab ); |
306 | connect( cbEnableCustomFonts, SIGNAL(clicked()), this, SLOT(enableFonts()) ); | 309 | connect( cbEnableCustomFonts, SIGNAL(clicked()), this, SLOT(enableFonts()) ); |
307 | 310 | ||
308 | vbFonts = new QWidget( fntTab ); | 311 | vbFonts = new QWidget( fntTab ); |
309 | QGridLayout *gFnts = new QGridLayout( vbFonts, 2, 3 ); | 312 | Q3GridLayout *gFnts = new Q3GridLayout( vbFonts, 2, 3 ); |
310 | gFnts->setSpacing( spacing ); | 313 | gFnts->setSpacing( spacing ); |
311 | gFnts->setAutoAdd( true ); | 314 | gFnts->setAutoAdd( true ); |
312 | gFnts->setColStretch( 1, 1 ); | 315 | gFnts->setColStretch( 1, 1 ); |
313 | QLabel *lTFnt = new QLabel( i18n("&Text font:"), vbFonts ); | 316 | QLabel *lTFnt = new QLabel( i18n("&Text font:"), vbFonts ); |
314 | lTextFont = new QLabel( vbFonts ); | 317 | lTextFont = new QLabel( vbFonts ); |
315 | lTextFont->setFrameStyle( QFrame::Panel|QFrame::Sunken ); | 318 | lTextFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken ); |
316 | #ifndef KAB_EMBEDDED | 319 | #ifndef KAB_EMBEDDED |
317 | btnFont = new KPushButton( i18n("Choose..."), vbFonts ); | 320 | btnFont = new KPushButton( i18n("Choose..."), vbFonts ); |
318 | #else //KAB_EMBEDDED | 321 | #else //KAB_EMBEDDED |
319 | btnFont = new QPushButton( i18n("Choose..."), vbFonts ); | 322 | btnFont = new QPushButton( i18n("Choose..."), vbFonts ); |
@@ -324,9 +327,9 @@ void CardViewLookNFeelPage::initGUI() | |||
324 | connect( btnFont, SIGNAL(clicked()), this, SLOT(setTextFont()) ); | 327 | connect( btnFont, SIGNAL(clicked()), this, SLOT(setTextFont()) ); |
325 | 328 | ||
326 | QLabel *lHFnt = new QLabel( i18n("&Header font:"), vbFonts ); | 329 | QLabel *lHFnt = new QLabel( i18n("&Header font:"), vbFonts ); |
327 | lHeaderFont = new QLabel( vbFonts ); | 330 | lHeaderFont = new QLabel( vbFonts ); |
328 | lHeaderFont->setFrameStyle( QFrame::Panel|QFrame::Sunken ); | 331 | lHeaderFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken ); |
329 | #ifndef KAB_EMBEDDED | 332 | #ifndef KAB_EMBEDDED |
330 | btnHeaderFont = new KPushButton( i18n("Choose..."), vbFonts ); | 333 | btnHeaderFont = new KPushButton( i18n("Choose..."), vbFonts ); |
331 | #else //KAB_EMBEDDED | 334 | #else //KAB_EMBEDDED |
332 | btnHeaderFont = new QPushButton( i18n("Choose..."), vbFonts ); | 335 | btnHeaderFont = new QPushButton( i18n("Choose..."), vbFonts ); |
@@ -335,18 +338,18 @@ void CardViewLookNFeelPage::initGUI() | |||
335 | connect( btnHeaderFont, SIGNAL(clicked()), this, SLOT(setHeaderFont()) ); | 338 | connect( btnHeaderFont, SIGNAL(clicked()), this, SLOT(setHeaderFont()) ); |
336 | 339 | ||
337 | fntTab->setStretchFactor( new QWidget( fntTab ), 1 ); | 340 | fntTab->setStretchFactor( new QWidget( fntTab ), 1 ); |
338 | 341 | ||
339 | QWhatsThis::add( cbEnableCustomFonts, i18n( | 342 | Q3WhatsThis::add( cbEnableCustomFonts, i18n( |
340 | "If custom fonts are enabled, you may choose which fonts to use for this view below. " | 343 | "If custom fonts are enabled, you may choose which fonts to use for this view below. " |
341 | "Otherwise the default KDE font will be used, in bold style for the header and " | 344 | "Otherwise the default KDE font will be used, in bold style for the header and " |
342 | "normal style for the data." | 345 | "normal style for the data." |
343 | ) ); | 346 | ) ); |
344 | 347 | ||
345 | tabs->addTab( fntTab, i18n("&Fonts") ); | 348 | tabs->addTab( fntTab, i18n("&Fonts") ); |
346 | 349 | ||
347 | // Behaviour | 350 | // Behaviour |
348 | QVBox *behaviourTab = new QVBox( this ); | 351 | Q3VBox *behaviourTab = new Q3VBox( this ); |
349 | behaviourTab->setMargin( margin ); | 352 | behaviourTab->setMargin( margin ); |
350 | behaviourTab->setSpacing( spacing ); | 353 | behaviourTab->setSpacing( spacing ); |
351 | 354 | ||
352 | cbShowEmptyFields = new QCheckBox( i18n("Show &empty fields"), behaviourTab ); | 355 | cbShowEmptyFields = new QCheckBox( i18n("Show &empty fields"), behaviourTab ); |
@@ -363,7 +366,7 @@ void CardViewLookNFeelPage::updateFontLabel( QFont fnt, QLabel *l ) | |||
363 | l->setFont( fnt ); | 366 | l->setFont( fnt ); |
364 | l->setText( QString( fnt.family() + " %1" ).arg( fnt.pointSize() ) ); | 367 | l->setText( QString( fnt.family() + " %1" ).arg( fnt.pointSize() ) ); |
365 | } | 368 | } |
366 | 369 | ||
367 | #ifndef KAB_EMBEDDED | 370 | #ifndef KAB_EMBEDDED_ |
368 | #include "configurecardviewdialog.moc" | 371 | #include "moc_configurecardviewdialog.cpp" |
369 | #endif //KAB_EMBEDDED | 372 | #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 | |||
@@ -25,11 +25,13 @@ | |||
25 | #define CONFIGURECARDVIEWDIALOG_H | 25 | #define CONFIGURECARDVIEWDIALOG_H |
26 | 26 | ||
27 | #include "viewconfigurewidget.h" | 27 | #include "viewconfigurewidget.h" |
28 | 28 | ||
29 | #include <qvbox.h> | 29 | #include <q3vbox.h> |
30 | #include <qwidget.h> | 30 | #include <qwidget.h> |
31 | #include <qfont.h> | 31 | #include <qfont.h> |
32 | //Added by qt3to4: | ||
33 | #include <QLabel> | ||
32 | 34 | ||
33 | class QString; | 35 | class QString; |
34 | class QWidget; | 36 | class QWidget; |
35 | class QCheckBox; | 37 | class QCheckBox; |
@@ -76,9 +78,9 @@ class ConfigureCardViewWidget : public ViewConfigureWidget | |||
76 | * item margin | 78 | * item margin |
77 | * item spacing | 79 | * item spacing |
78 | */ | 80 | */ |
79 | 81 | ||
80 | class CardViewLookNFeelPage : public QVBox { | 82 | class CardViewLookNFeelPage : public Q3VBox { |
81 | 83 | ||
82 | Q_OBJECT | 84 | Q_OBJECT |
83 | 85 | ||
84 | public: | 86 | public: |
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 | |||
@@ -26,13 +26,16 @@ | |||
26 | #include <qlayout.h> | 26 | #include <qlayout.h> |
27 | #include <qlabel.h> | 27 | #include <qlabel.h> |
28 | #include <qradiobutton.h> | 28 | #include <qradiobutton.h> |
29 | #include <qcheckbox.h> | 29 | #include <qcheckbox.h> |
30 | #include <qvbox.h> | 30 | #include <q3vbox.h> |
31 | #include <qbuttongroup.h> | 31 | #include <q3buttongroup.h> |
32 | #include <qtabwidget.h> | 32 | #include <qtabwidget.h> |
33 | #include <qwhatsthis.h> | 33 | #include <q3whatsthis.h> |
34 | #include <qpushbutton.h> | 34 | #include <qpushbutton.h> |
35 | //Added by qt3to4: | ||
36 | #include <Q3GridLayout> | ||
37 | #include <Q3Frame> | ||
35 | 38 | ||
36 | #include <kglobal.h> | 39 | #include <kglobal.h> |
37 | #include <klocale.h> | 40 | #include <klocale.h> |
38 | #include <klineedit.h> | 41 | #include <klineedit.h> |
@@ -83,9 +86,9 @@ void ConfigureTableViewWidget::saveSettings( KConfig *config ) | |||
83 | 86 | ||
84 | 87 | ||
85 | 88 | ||
86 | LookAndFeelPage::LookAndFeelPage(QWidget *parent, const char *name) | 89 | LookAndFeelPage::LookAndFeelPage(QWidget *parent, const char *name) |
87 | : QVBox(parent, name) | 90 | : Q3VBox(parent, name) |
88 | { | 91 | { |
89 | initGUI(); | 92 | initGUI(); |
90 | 93 | ||
91 | // Set initial state | 94 | // Set initial state |
@@ -228,14 +231,14 @@ void LookAndFeelPage::initGUI() | |||
228 | 231 | ||
229 | QTabWidget *tabs = new QTabWidget( this ); | 232 | QTabWidget *tabs = new QTabWidget( this ); |
230 | 233 | ||
231 | // General | 234 | // General |
232 | QVBox *generalTab = new QVBox( this, "generaltab" ); | 235 | Q3VBox *generalTab = new Q3VBox( this, "generaltab" ); |
233 | 236 | ||
234 | generalTab->setSpacing( spacing ); | 237 | generalTab->setSpacing( spacing ); |
235 | generalTab->setMargin( margin ); | 238 | generalTab->setMargin( margin ); |
236 | 239 | ||
237 | QButtonGroup *group = new QButtonGroup(1, Qt::Horizontal, | 240 | Q3ButtonGroup *group = new Q3ButtonGroup(1, Qt::Horizontal, |
238 | i18n("Row Separator"), generalTab); | 241 | i18n("Row Separator"), generalTab); |
239 | 242 | ||
240 | mAlternateButton = new QRadioButton(i18n("Alternating backgrounds"), | 243 | mAlternateButton = new QRadioButton(i18n("Alternating backgrounds"), |
241 | group, "mAlternateButton"); | 244 | group, "mAlternateButton"); |
@@ -261,41 +264,41 @@ void LookAndFeelPage::initGUI() | |||
261 | 264 | ||
262 | tabs->addTab( generalTab, i18n("&General") ); | 265 | tabs->addTab( generalTab, i18n("&General") ); |
263 | 266 | ||
264 | // Colors | 267 | // Colors |
265 | QVBox *colorTab = new QVBox( this, "colortab" ); | 268 | Q3VBox *colorTab = new Q3VBox( this, "colortab" ); |
266 | colorTab->setSpacing( spacing ); | 269 | colorTab->setSpacing( spacing ); |
267 | colorTab->setMargin( spacing ); | 270 | colorTab->setMargin( spacing ); |
268 | cbEnableCustomColors = new QCheckBox( i18n("&Enable custom Colors"), colorTab ); | 271 | cbEnableCustomColors = new QCheckBox( i18n("&Enable custom Colors"), colorTab ); |
269 | connect( cbEnableCustomColors, SIGNAL(clicked()), this, SLOT(enableColors()) ); | 272 | connect( cbEnableCustomColors, SIGNAL(clicked()), this, SLOT(enableColors()) ); |
270 | lbColors = new ColorListBox( colorTab ); | 273 | lbColors = new ColorListBox( colorTab ); |
271 | tabs->addTab( colorTab, i18n("&Colors") ); | 274 | tabs->addTab( colorTab, i18n("&Colors") ); |
272 | 275 | ||
273 | QWhatsThis::add( cbEnableCustomColors, i18n( | 276 | Q3WhatsThis::add( cbEnableCustomColors, i18n( |
274 | "If custom colors are enabled, you may choose the colors for the view below. " | 277 | "If custom colors are enabled, you may choose the colors for the view below. " |
275 | "Otherwise colors from your current KDE color scheme are used." | 278 | "Otherwise colors from your current KDE color scheme are used." |
276 | ) ); | 279 | ) ); |
277 | QWhatsThis::add( lbColors, i18n( | 280 | Q3WhatsThis::add( lbColors, i18n( |
278 | "Double click or press RETURN on a item to select a color for the related strings in the view." | 281 | "Double click or press RETURN on a item to select a color for the related strings in the view." |
279 | ) ); | 282 | ) ); |
280 | 283 | ||
281 | // Fonts | 284 | // Fonts |
282 | QVBox *fntTab = new QVBox( this, "fonttab" ); | 285 | Q3VBox *fntTab = new Q3VBox( this, "fonttab" ); |
283 | 286 | ||
284 | fntTab->setSpacing( spacing ); | 287 | fntTab->setSpacing( spacing ); |
285 | fntTab->setMargin( spacing ); | 288 | fntTab->setMargin( spacing ); |
286 | 289 | ||
287 | cbEnableCustomFonts = new QCheckBox( i18n("&Enable custom fonts"), fntTab ); | 290 | cbEnableCustomFonts = new QCheckBox( i18n("&Enable custom fonts"), fntTab ); |
288 | connect( cbEnableCustomFonts, SIGNAL(clicked()), this, SLOT(enableFonts()) ); | 291 | connect( cbEnableCustomFonts, SIGNAL(clicked()), this, SLOT(enableFonts()) ); |
289 | 292 | ||
290 | vbFonts = new QWidget( fntTab ); | 293 | vbFonts = new QWidget( fntTab ); |
291 | QGridLayout *gFnts = new QGridLayout( vbFonts, 2, 3 ); | 294 | Q3GridLayout *gFnts = new Q3GridLayout( vbFonts, 2, 3 ); |
292 | gFnts->setSpacing( spacing ); | 295 | gFnts->setSpacing( spacing ); |
293 | gFnts->setAutoAdd( true ); | 296 | gFnts->setAutoAdd( true ); |
294 | gFnts->setColStretch( 1, 1 ); | 297 | gFnts->setColStretch( 1, 1 ); |
295 | QLabel *lTFnt = new QLabel( i18n("&Text font:"), vbFonts ); | 298 | QLabel *lTFnt = new QLabel( i18n("&Text font:"), vbFonts ); |
296 | lTextFont = new QLabel( vbFonts ); | 299 | lTextFont = new QLabel( vbFonts ); |
297 | lTextFont->setFrameStyle( QFrame::Panel|QFrame::Sunken ); | 300 | lTextFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken ); |
298 | #ifndef KAB_EMBEDDED | 301 | #ifndef KAB_EMBEDDED |
299 | btnFont = new KPushButton( i18n("Choose..."), vbFonts ); | 302 | btnFont = new KPushButton( i18n("Choose..."), vbFonts ); |
300 | #else //KAB_EMBEDDED | 303 | #else //KAB_EMBEDDED |
301 | btnFont = new QPushButton( i18n("Choose..."), vbFonts ); | 304 | btnFont = new QPushButton( i18n("Choose..."), vbFonts ); |
@@ -306,9 +309,9 @@ void LookAndFeelPage::initGUI() | |||
306 | connect( btnFont, SIGNAL(clicked()), this, SLOT(setTextFont()) ); | 309 | connect( btnFont, SIGNAL(clicked()), this, SLOT(setTextFont()) ); |
307 | 310 | ||
308 | QLabel *lHFnt = new QLabel( i18n("&Header font:"), vbFonts ); | 311 | QLabel *lHFnt = new QLabel( i18n("&Header font:"), vbFonts ); |
309 | lHeaderFont = new QLabel( vbFonts ); | 312 | lHeaderFont = new QLabel( vbFonts ); |
310 | lHeaderFont->setFrameStyle( QFrame::Panel|QFrame::Sunken ); | 313 | lHeaderFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken ); |
311 | #ifndef KAB_EMBEDDED | 314 | #ifndef KAB_EMBEDDED |
312 | btnHeaderFont = new KPushButton( i18n("Choose..."), vbFonts ); | 315 | btnHeaderFont = new KPushButton( i18n("Choose..."), vbFonts ); |
313 | #else //KAB_EMBEDDED | 316 | #else //KAB_EMBEDDED |
314 | btnHeaderFont = new QPushButton( i18n("Choose..."), vbFonts ); | 317 | btnHeaderFont = new QPushButton( i18n("Choose..."), vbFonts ); |
@@ -317,9 +320,9 @@ void LookAndFeelPage::initGUI() | |||
317 | connect( btnHeaderFont, SIGNAL(clicked()), this, SLOT(setHeaderFont()) ); | 320 | connect( btnHeaderFont, SIGNAL(clicked()), this, SLOT(setHeaderFont()) ); |
318 | 321 | ||
319 | fntTab->setStretchFactor( new QWidget( fntTab ), 1 ); | 322 | fntTab->setStretchFactor( new QWidget( fntTab ), 1 ); |
320 | 323 | ||
321 | QWhatsThis::add( cbEnableCustomFonts, i18n( | 324 | Q3WhatsThis::add( cbEnableCustomFonts, i18n( |
322 | "If custom fonts are enabled, you may choose which fonts to use for this view below. " | 325 | "If custom fonts are enabled, you may choose which fonts to use for this view below. " |
323 | "Otherwise the default KDE font will be used, in bold style for the header and " | 326 | "Otherwise the default KDE font will be used, in bold style for the header and " |
324 | "normal style for the data." | 327 | "normal style for the data." |
325 | ) ); | 328 | ) ); |
@@ -339,7 +342,7 @@ void LookAndFeelPage::updateFontLabel( QFont fnt, QLabel *l ) | |||
339 | l->setFont( fnt ); | 342 | l->setFont( fnt ); |
340 | l->setText( QString( fnt.family() + " %1" ).arg( fnt.pointSize() ) ); | 343 | l->setText( QString( fnt.family() + " %1" ).arg( fnt.pointSize() ) ); |
341 | } | 344 | } |
342 | 345 | ||
343 | #ifndef KAB_EMBEDDED | 346 | #ifndef KAB_EMBEDDED_ |
344 | #include "configuretableviewdialog.moc" | 347 | #include "moc_configuretableviewdialog.cpp" |
345 | #endif //KAB_EMBEDDED | 348 | #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 | |||
@@ -25,9 +25,11 @@ | |||
25 | #define CONFIGURETABLEVIEWDIALOG_H | 25 | #define CONFIGURETABLEVIEWDIALOG_H |
26 | 26 | ||
27 | #include "viewconfigurewidget.h" | 27 | #include "viewconfigurewidget.h" |
28 | 28 | ||
29 | #include <qvbox.h> | 29 | #include <q3vbox.h> |
30 | //Added by qt3to4: | ||
31 | #include <QLabel> | ||
30 | 32 | ||
31 | class QString; | 33 | class QString; |
32 | class QWidget; | 34 | class QWidget; |
33 | class QRadioButton; | 35 | class QRadioButton; |
@@ -62,9 +64,9 @@ class ConfigureTableViewWidget : public ViewConfigureWidget | |||
62 | 64 | ||
63 | /** | 65 | /** |
64 | Internal class. It is only defined here for moc | 66 | Internal class. It is only defined here for moc |
65 | */ | 67 | */ |
66 | class LookAndFeelPage : public QVBox | 68 | class LookAndFeelPage : public Q3VBox |
67 | { | 69 | { |
68 | Q_OBJECT | 70 | Q_OBJECT |
69 | 71 | ||
70 | public: | 72 | public: |
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 | |||
@@ -20,17 +20,22 @@ | |||
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <qheader.h> | 24 | #include <q3header.h> |
25 | #include <qiconset.h> | 25 | #include <qicon.h> |
26 | #include <qimage.h> | 26 | #include <qimage.h> |
27 | #include <qdragobject.h> | 27 | #include <q3dragobject.h> |
28 | #include <qcombobox.h> | 28 | #include <qcombobox.h> |
29 | #include <qpainter.h> | 29 | #include <qpainter.h> |
30 | #include <qbrush.h> | 30 | #include <qbrush.h> |
31 | #include <qevent.h> | 31 | #include <qevent.h> |
32 | #include <qapplication.h> | 32 | #include <qapplication.h> |
33 | //Added by qt3to4: | ||
34 | #include <QDropEvent> | ||
35 | #include <QPixmap> | ||
36 | #include <QMouseEvent> | ||
37 | #include <QKeyEvent> | ||
33 | 38 | ||
34 | #include <klocale.h> | 39 | #include <klocale.h> |
35 | #include <kglobalsettings.h> | 40 | #include <kglobalsettings.h> |
36 | #include <kiconloader.h> | 41 | #include <kiconloader.h> |
@@ -46,14 +51,15 @@ | |||
46 | ///////////////////////////////// | 51 | ///////////////////////////////// |
47 | // DynamicTip Methods | 52 | // DynamicTip Methods |
48 | 53 | ||
49 | DynamicTip::DynamicTip( ContactListView *parent) | 54 | DynamicTip::DynamicTip( ContactListView *parent) |
50 | : QToolTip( parent ) | 55 | /* TODO:hacker:: QToolTip( parent ) */ |
51 | { | 56 | { |
52 | } | 57 | } |
53 | 58 | ||
54 | void DynamicTip::maybeTip( const QPoint &pos ) | 59 | void DynamicTip::maybeTip( const QPoint &pos ) |
55 | { | 60 | { |
61 | /* TODO:hacker: | ||
56 | static bool ishidden = true; | 62 | static bool ishidden = true; |
57 | if (!parentWidget()->inherits( "ContactListView" )) | 63 | if (!parentWidget()->inherits( "ContactListView" )) |
58 | return; | 64 | return; |
59 | 65 | ||
@@ -62,9 +68,9 @@ void DynamicTip::maybeTip( const QPoint &pos ) | |||
62 | return; | 68 | return; |
63 | 69 | ||
64 | QPoint posVp = plv->viewport()->pos(); | 70 | QPoint posVp = plv->viewport()->pos(); |
65 | 71 | ||
66 | QListViewItem *lvi = plv->itemAt( pos - posVp ); | 72 | Q3ListViewItem *lvi = plv->itemAt( pos - posVp ); |
67 | if (!lvi) | 73 | if (!lvi) |
68 | return; | 74 | return; |
69 | 75 | ||
70 | #ifndef KAB_EMBEDDED | 76 | #ifndef KAB_EMBEDDED |
@@ -150,9 +156,9 @@ void DynamicTip::maybeTip( const QPoint &pos ) | |||
150 | } | 156 | } |
151 | else | 157 | else |
152 | hide(); | 158 | hide(); |
153 | ishidden = !ishidden; | 159 | ishidden = !ishidden; |
154 | 160 | */ | |
155 | } | 161 | } |
156 | 162 | ||
157 | /////////////////////////// | 163 | /////////////////////////// |
158 | // ContactListViewItem Methods | 164 | // ContactListViewItem Methods |
@@ -172,9 +178,9 @@ QString ContactListViewItem::key(int column, bool ascending) const | |||
172 | #ifndef DESKTOP_VERSION | 178 | #ifndef DESKTOP_VERSION |
173 | int lan = KGlobal::locale()->language(); | 179 | int lan = KGlobal::locale()->language(); |
174 | //qDebug("language %d ", lan); | 180 | //qDebug("language %d ", lan); |
175 | if ( lan == 1 ) { //GERMAN | 181 | if ( lan == 1 ) { //GERMAN |
176 | QString ret = QListViewItem::key(column, ascending).lower().utf8(); | 182 | QString ret = Q3ListViewItem::key(column, ascending).lower().utf8(); |
177 | int start = -1; | 183 | int start = -1; |
178 | while ( (start = ret.find( 'ä', start+1)) > 0 ) { | 184 | while ( (start = ret.find( 'ä', start+1)) > 0 ) { |
179 | ret.at(start-1) = 'a'; | 185 | ret.at(start-1) = 'a'; |
180 | } | 186 | } |
@@ -196,9 +202,9 @@ QString ContactListViewItem::key(int column, bool ascending) const | |||
196 | 202 | ||
197 | } | 203 | } |
198 | else | 204 | else |
199 | #endif | 205 | #endif |
200 | return QListViewItem::key(column, ascending).lower(); | 206 | return Q3ListViewItem::key(column, ascending).lower(); |
201 | } | 207 | } |
202 | 208 | ||
203 | void ContactListViewItem::paintCell(QPainter * p, | 209 | void ContactListViewItem::paintCell(QPainter * p, |
204 | const QColorGroup & cg, | 210 | const QColorGroup & cg, |
@@ -287,9 +293,9 @@ void ContactListView::printMe() | |||
287 | if (!printer.setup() ) | 293 | if (!printer.setup() ) |
288 | return; | 294 | return; |
289 | QPainter p; | 295 | QPainter p; |
290 | p.begin ( &printer ); | 296 | p.begin ( &printer ); |
291 | QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); | 297 | Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer ); |
292 | float dx, dy; | 298 | float dx, dy; |
293 | int wid = (m.width() * 9)/10; | 299 | int wid = (m.width() * 9)/10; |
294 | dx = (float) wid/(float)contentsWidth (); | 300 | dx = (float) wid/(float)contentsWidth (); |
295 | dy = (float)(m.height()) / (float)contentsHeight (); | 301 | dy = (float)(m.height()) / (float)contentsHeight (); |
@@ -342,9 +348,9 @@ void ContactListView::contentsMousePressEvent(QMouseEvent* e) | |||
342 | 348 | ||
343 | // To initiate a drag operation | 349 | // To initiate a drag operation |
344 | void ContactListView::contentsMouseMoveEvent( QMouseEvent *e ) | 350 | void ContactListView::contentsMouseMoveEvent( QMouseEvent *e ) |
345 | { | 351 | { |
346 | if ((e->state() & LeftButton) && (e->pos() - presspos).manhattanLength() > 4 ) { | 352 | if ((e->state() & Qt::LeftButton) && (e->pos() - presspos).manhattanLength() > 4 ) { |
347 | emit startAddresseeDrag(); | 353 | emit startAddresseeDrag(); |
348 | } | 354 | } |
349 | else | 355 | else |
350 | KListView::contentsMouseMoveEvent( e ); | 356 | KListView::contentsMouseMoveEvent( e ); |
@@ -352,9 +358,9 @@ void ContactListView::contentsMouseMoveEvent( QMouseEvent *e ) | |||
352 | 358 | ||
353 | bool ContactListView::acceptDrag(QDropEvent *e) const | 359 | bool ContactListView::acceptDrag(QDropEvent *e) const |
354 | { | 360 | { |
355 | #ifndef KAB_EMBEDDED | 361 | #ifndef KAB_EMBEDDED |
356 | return QTextDrag::canDecode(e); | 362 | return Q3TextDrag::canDecode(e); |
357 | #else //KAB_EMBEDDED | 363 | #else //KAB_EMBEDDED |
358 | qDebug("ContactListView::acceptDrag has to be fixed"); | 364 | qDebug("ContactListView::acceptDrag has to be fixed"); |
359 | return false; | 365 | return false; |
360 | #endif //KAB_EMBEDDED | 366 | #endif //KAB_EMBEDDED |
@@ -423,7 +429,7 @@ void ContactListView::keyReleaseEvent ( QKeyEvent * e ) | |||
423 | mFlagKeyPressed = false; | 429 | mFlagKeyPressed = false; |
424 | } | 430 | } |
425 | KListView::keyReleaseEvent ( e ); | 431 | KListView::keyReleaseEvent ( e ); |
426 | } | 432 | } |
427 | #ifndef KAB_EMBEDDED | 433 | #ifndef KAB_EMBEDDED_ |
428 | #include "contactlistview.moc" | 434 | #include "moc_contactlistview.cpp" |
429 | #endif //KAB_EMBEDDED | 435 | #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 | |||
@@ -4,8 +4,12 @@ | |||
4 | #include <qcolor.h> | 4 | #include <qcolor.h> |
5 | #include <qpixmap.h> | 5 | #include <qpixmap.h> |
6 | #include <qtooltip.h> | 6 | #include <qtooltip.h> |
7 | #include <qstring.h> | 7 | #include <qstring.h> |
8 | //Added by qt3to4: | ||
9 | #include <QDropEvent> | ||
10 | #include <QMouseEvent> | ||
11 | #include <QKeyEvent> | ||
8 | 12 | ||
9 | #include <klistview.h> | 13 | #include <klistview.h> |
10 | 14 | ||
11 | #include <kabc/field.h> | 15 | #include <kabc/field.h> |
@@ -19,9 +23,9 @@ class ContactListView; | |||
19 | 23 | ||
20 | /** The whole tooltip design needs a lot of work. Currently it is | 24 | /** The whole tooltip design needs a lot of work. Currently it is |
21 | * hacked together to function. | 25 | * hacked together to function. |
22 | */ | 26 | */ |
23 | class DynamicTip : public QToolTip | 27 | class DynamicTip /* TODO:hacker: : public QToolTip */ |
24 | { | 28 | { |
25 | public: | 29 | public: |
26 | DynamicTip( ContactListView * parent ); | 30 | DynamicTip( ContactListView * parent ); |
27 | 31 | ||
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 | |||
@@ -20,15 +20,20 @@ | |||
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <qdragobject.h> | 24 | #include <q3dragobject.h> |
25 | #include <qevent.h> | 25 | #include <qevent.h> |
26 | #include <qiconview.h> | 26 | #include <q3iconview.h> |
27 | #include <qlayout.h> | 27 | #include <qlayout.h> |
28 | #include <qstringlist.h> | 28 | #include <qstringlist.h> |
29 | #include <qregexp.h> | 29 | #include <qregexp.h> |
30 | #include <qapplication.h> | 30 | #include <qapplication.h> |
31 | //Added by qt3to4: | ||
32 | #include <QDropEvent> | ||
33 | #include <QKeyEvent> | ||
34 | #include <Q3VBoxLayout> | ||
35 | #include <QDragEnterEvent> | ||
31 | 36 | ||
32 | #include <kabc/addressbook.h> | 37 | #include <kabc/addressbook.h> |
33 | #include <kabc/addressee.h> | 38 | #include <kabc/addressee.h> |
34 | #include <kconfig.h> | 39 | #include <kconfig.h> |
@@ -124,9 +129,9 @@ void AddresseeCardView::printMe() | |||
124 | if (!printer.setup() ) | 129 | if (!printer.setup() ) |
125 | return; | 130 | return; |
126 | QPainter p; | 131 | QPainter p; |
127 | p.begin ( &printer ); | 132 | p.begin ( &printer ); |
128 | QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); | 133 | Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer ); |
129 | float dx, dy; | 134 | float dx, dy; |
130 | int wid = (m.width() * 9)/10; | 135 | int wid = (m.width() * 9)/10; |
131 | dx = (float) wid/(float)contentsWidth (); | 136 | dx = (float) wid/(float)contentsWidth (); |
132 | dy = (float)(m.height()) / (float)contentsHeight (); | 137 | dy = (float)(m.height()) / (float)contentsHeight (); |
@@ -147,9 +152,9 @@ void AddresseeCardView::printMe() | |||
147 | 152 | ||
148 | void AddresseeCardView::dragEnterEvent(QDragEnterEvent *e) | 153 | void AddresseeCardView::dragEnterEvent(QDragEnterEvent *e) |
149 | { | 154 | { |
150 | #ifndef KAB_EMBEDDED | 155 | #ifndef KAB_EMBEDDED |
151 | if (QTextDrag::canDecode(e)) | 156 | if (Q3TextDrag::canDecode(e)) |
152 | e->accept(); | 157 | e->accept(); |
153 | #else //KAB_EMBEDDED | 158 | #else //KAB_EMBEDDED |
154 | qDebug("AddresseeCardView::dragEnterEvent drag&drop is not implemented"); | 159 | qDebug("AddresseeCardView::dragEnterEvent drag&drop is not implemented"); |
155 | #endif //KAB_EMBEDDED | 160 | #endif //KAB_EMBEDDED |
@@ -175,9 +180,9 @@ KAddressBookCardView::KAddressBookCardView( KABC::AddressBook *ab, | |||
175 | { | 180 | { |
176 | mShowEmptyFields = false; | 181 | mShowEmptyFields = false; |
177 | 182 | ||
178 | // Init the GUI | 183 | // Init the GUI |
179 | QVBoxLayout *layout = new QVBoxLayout(viewWidget()); | 184 | Q3VBoxLayout *layout = new Q3VBoxLayout(viewWidget()); |
180 | 185 | ||
181 | mCardView = new AddresseeCardView(viewWidget(), "mCardView"); | 186 | mCardView = new AddresseeCardView(viewWidget(), "mCardView"); |
182 | mCardView->setSelectionMode(CardView::Extended); | 187 | mCardView->setSelectionMode(CardView::Extended); |
183 | layout->addWidget(mCardView); | 188 | layout->addWidget(mCardView); |
@@ -519,7 +524,7 @@ void KAddressBookCardView::addresseeSelected() | |||
519 | if (!found) | 524 | if (!found) |
520 | emit selected(QString::null); | 525 | emit selected(QString::null); |
521 | 526 | ||
522 | } | 527 | } |
523 | #ifndef KAB_EMBEDDED | 528 | #ifndef KAB_EMBEDDED_ |
524 | #include "kaddressbookcardview.moc" | 529 | #include "moc_kaddressbookcardview.cpp" |
525 | #endif //KAB_EMBEDDED | 530 | #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 | |||
@@ -24,8 +24,11 @@ | |||
24 | without including the source code for Qt in the source distribution. | 24 | without including the source code for Qt in the source distribution. |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <qstring.h> | 27 | #include <qstring.h> |
28 | //Added by qt3to4: | ||
29 | #include <QDragEnterEvent> | ||
30 | #include <QDropEvent> | ||
28 | #ifndef KAB_EMBEDDED | 31 | #ifndef KAB_EMBEDDED |
29 | #include <kiconview.h> | 32 | #include <kiconview.h> |
30 | #else //KAB_EMBEDDED | 33 | #else //KAB_EMBEDDED |
31 | #include <klocale.h> | 34 | #include <klocale.h> |
diff --git a/kaddressbook/views/kaddressbookiconview.cpp b/kaddressbook/views/kaddressbookiconview.cpp index d6ddec3..3a41a4b 100644 --- a/kaddressbook/views/kaddressbookiconview.cpp +++ b/kaddressbook/views/kaddressbookiconview.cpp | |||
@@ -21,9 +21,9 @@ | |||
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #ifndef KAB_EMBEDDED | 24 | #ifndef KAB_EMBEDDED |
25 | #include <qiconview.h> | 25 | #include <q3iconview.h> |
26 | #include <qstringlist.h> | 26 | #include <qstringlist.h> |
27 | 27 | ||
28 | #include <kabc/addressee.h> | 28 | #include <kabc/addressee.h> |
29 | #include <kconfig.h> | 29 | #include <kconfig.h> |
@@ -34,8 +34,16 @@ | |||
34 | 34 | ||
35 | #else //KAB_EMBEDDED | 35 | #else //KAB_EMBEDDED |
36 | #endif //KAB_EMBEDDED | 36 | #endif //KAB_EMBEDDED |
37 | 37 | ||
38 | //Added by qt3to4: | ||
39 | #include <QDropEvent> | ||
40 | #include <Q3ValueList> | ||
41 | #include <QPixmap> | ||
42 | #include <QKeyEvent> | ||
43 | #include <QEvent> | ||
44 | #include <Q3VBoxLayout> | ||
45 | |||
38 | #include <kabc/addressbook.h> | 46 | #include <kabc/addressbook.h> |
39 | #include "kabprefs.h" | 47 | #include "kabprefs.h" |
40 | #include "viewmanager.h" | 48 | #include "viewmanager.h" |
41 | #include "kaddressbookiconview.h" | 49 | #include "kaddressbookiconview.h" |
@@ -72,14 +80,14 @@ extern "C" { | |||
72 | AddresseeIconView::AddresseeIconView(QWidget *parent, const char *name) | 80 | AddresseeIconView::AddresseeIconView(QWidget *parent, const char *name) |
73 | : KIconView(parent, name) | 81 | : KIconView(parent, name) |
74 | #else //KAB_EMBEDDED | 82 | #else //KAB_EMBEDDED |
75 | AddresseeIconView::AddresseeIconView(QWidget *parent, const char *name) | 83 | AddresseeIconView::AddresseeIconView(QWidget *parent, const char *name) |
76 | : QIconView(parent, name) | 84 | : Q3IconView(parent, name) |
77 | #endif //KAB_EMBEDDED | 85 | #endif //KAB_EMBEDDED |
78 | 86 | ||
79 | { | 87 | { |
80 | setSelectionMode( QIconView::Extended ); | 88 | setSelectionMode( Q3IconView::Extended ); |
81 | setResizeMode( QIconView::Adjust ); | 89 | setResizeMode( Q3IconView::Adjust ); |
82 | setWordWrapIconText( true ); | 90 | setWordWrapIconText( true ); |
83 | setGridX( 100 ); | 91 | setGridX( 100 ); |
84 | setItemsMovable(false); | 92 | setItemsMovable(false); |
85 | setSorting(true, true); | 93 | setSorting(true, true); |
@@ -88,10 +96,10 @@ AddresseeIconView::AddresseeIconView(QWidget *parent, const char *name) | |||
88 | //US ??? setMode( KIconView::Select ); | 96 | //US ??? setMode( KIconView::Select ); |
89 | 97 | ||
90 | #ifndef KAB_EMBEDDED | 98 | #ifndef KAB_EMBEDDED |
91 | 99 | ||
92 | connect(this, SIGNAL(dropped(QDropEvent*, const QValueList<QIconDragItem>&)), | 100 | connect(this, SIGNAL(dropped(QDropEvent*, const Q3ValueList<Q3IconDragItem>&)), |
93 | this, SLOT(itemDropped(QDropEvent*, const QValueList<QIconDragItem>&))); | 101 | this, SLOT(itemDropped(QDropEvent*, const Q3ValueList<Q3IconDragItem>&))); |
94 | #endif //KAB_EMBEDDED | 102 | #endif //KAB_EMBEDDED |
95 | } | 103 | } |
96 | 104 | ||
97 | AddresseeIconView::~AddresseeIconView() | 105 | AddresseeIconView::~AddresseeIconView() |
@@ -99,14 +107,14 @@ AddresseeIconView::~AddresseeIconView() | |||
99 | } | 107 | } |
100 | 108 | ||
101 | 109 | ||
102 | void AddresseeIconView::itemDropped(QDropEvent *e, | 110 | void AddresseeIconView::itemDropped(QDropEvent *e, |
103 | const QValueList<QIconDragItem> &) | 111 | const Q3ValueList<Q3IconDragItem> &) |
104 | { | 112 | { |
105 | emit addresseeDropped(e); | 113 | emit addresseeDropped(e); |
106 | } | 114 | } |
107 | 115 | ||
108 | QDragObject *AddresseeIconView::dragObject() | 116 | Q3DragObject *AddresseeIconView::dragObject() |
109 | { | 117 | { |
110 | emit startAddresseeDrag(); | 118 | emit startAddresseeDrag(); |
111 | 119 | ||
112 | // We never want IconView to start the drag | 120 | // We never want IconView to start the drag |
@@ -116,22 +124,22 @@ QDragObject *AddresseeIconView::dragObject() | |||
116 | // AddresseeIconViewItem (internal class) | 124 | // AddresseeIconViewItem (internal class) |
117 | #ifndef KAB_EMBEDDED | 125 | #ifndef KAB_EMBEDDED |
118 | class AddresseeIconViewItem : public KIconViewItem | 126 | class AddresseeIconViewItem : public KIconViewItem |
119 | #else //KAB_EMBEDDED | 127 | #else //KAB_EMBEDDED |
120 | class AddresseeIconViewItem : public QIconViewItem | 128 | class AddresseeIconViewItem : public Q3IconViewItem |
121 | #endif //KAB_EMBEDDED | 129 | #endif //KAB_EMBEDDED |
122 | { | 130 | { |
123 | public: | 131 | public: |
124 | #ifndef KAB_EMBEDDED | 132 | #ifndef KAB_EMBEDDED |
125 | AddresseeIconViewItem(const KABC::Field::List &fields, | 133 | AddresseeIconViewItem(const KABC::Field::List &fields, |
126 | KABC::AddressBook *doc, const KABC::Addressee &a, | 134 | KABC::AddressBook *doc, const KABC::Addressee &a, |
127 | QIconView *parent) | 135 | Q3IconView *parent) |
128 | : KIconViewItem(parent), mFields( fields ), mDocument(doc), mAddressee(a) | 136 | : KIconViewItem(parent), mFields( fields ), mDocument(doc), mAddressee(a) |
129 | #else //KAB_EMBEDDED | 137 | #else //KAB_EMBEDDED |
130 | AddresseeIconViewItem(const KABC::Field::List &fields, | 138 | AddresseeIconViewItem(const KABC::Field::List &fields, |
131 | KABC::AddressBook *doc, const KABC::Addressee &a, | 139 | KABC::AddressBook *doc, const KABC::Addressee &a, |
132 | QIconView *parent) | 140 | Q3IconView *parent) |
133 | : QIconViewItem(parent), mFields( fields ), mDocument(doc), mAddressee(a) | 141 | : Q3IconViewItem(parent), mFields( fields ), mDocument(doc), mAddressee(a) |
134 | #endif //KAB_EMBEDDED | 142 | #endif //KAB_EMBEDDED |
135 | { | 143 | { |
136 | if ( mFields.isEmpty() ) { | 144 | if ( mFields.isEmpty() ) { |
137 | mFields = KABC::Field::defaultFields(); | 145 | mFields = KABC::Field::defaultFields(); |
@@ -199,9 +207,9 @@ KAddressBookIconView::KAddressBookIconView( KABC::AddressBook *ab, | |||
199 | QWidget *parent, const char *name) | 207 | QWidget *parent, const char *name) |
200 | : KAddressBookView( ab, parent, name ) | 208 | : KAddressBookView( ab, parent, name ) |
201 | { | 209 | { |
202 | // Init the GUI | 210 | // Init the GUI |
203 | QVBoxLayout *layout = new QVBoxLayout(viewWidget()); | 211 | Q3VBoxLayout *layout = new Q3VBoxLayout(viewWidget()); |
204 | 212 | ||
205 | mIconView = new AddresseeIconView(viewWidget(), "mIconView"); | 213 | mIconView = new AddresseeIconView(viewWidget(), "mIconView"); |
206 | layout->addWidget(mIconView); | 214 | layout->addWidget(mIconView); |
207 | 215 | ||
@@ -209,10 +217,10 @@ KAddressBookIconView::KAddressBookIconView( KABC::AddressBook *ab, | |||
209 | 217 | ||
210 | //US method executed is part of KIconView | 218 | //US method executed is part of KIconView |
211 | //US connect(mIconView, SIGNAL(executed(QIconViewItem *)), | 219 | //US connect(mIconView, SIGNAL(executed(QIconViewItem *)), |
212 | //US this, SLOT(addresseeExecuted(QIconViewItem *))); | 220 | //US this, SLOT(addresseeExecuted(QIconViewItem *))); |
213 | connect(mIconView, SIGNAL(selectionChanged(QIconViewItem *)), | 221 | connect(mIconView, SIGNAL(selectionChanged(Q3IconViewItem *)), |
214 | this, SLOT(addresseeExecuted(QIconViewItem *))); | 222 | this, SLOT(addresseeExecuted(Q3IconViewItem *))); |
215 | 223 | ||
216 | connect(mIconView, SIGNAL(selectionChanged()), | 224 | connect(mIconView, SIGNAL(selectionChanged()), |
217 | this, SLOT(addresseeSelected())); | 225 | this, SLOT(addresseeSelected())); |
218 | connect(mIconView, SIGNAL(addresseeDropped(QDropEvent*)), | 226 | connect(mIconView, SIGNAL(addresseeDropped(QDropEvent*)), |
@@ -247,10 +255,10 @@ void KAddressBookIconView::readConfig(KConfig *config) | |||
247 | 255 | ||
248 | //US method executed is part of KIconView | 256 | //US method executed is part of KIconView |
249 | //US disconnect(mIconView, SIGNAL(executed(QIconViewItem *)), | 257 | //US disconnect(mIconView, SIGNAL(executed(QIconViewItem *)), |
250 | //US this, SLOT(addresseeExecuted(QIconViewItem *))); | 258 | //US this, SLOT(addresseeExecuted(QIconViewItem *))); |
251 | disconnect(mIconView, SIGNAL(selectionChanged(QIconViewItem *)), | 259 | disconnect(mIconView, SIGNAL(selectionChanged(Q3IconViewItem *)), |
252 | this, SLOT(addresseeExecuted(QIconViewItem *))); | 260 | this, SLOT(addresseeExecuted(Q3IconViewItem *))); |
253 | 261 | ||
254 | //US method executed is part of KIconView. Use selectionChanged instead | 262 | //US method executed is part of KIconView. Use selectionChanged instead |
255 | /*US | 263 | /*US |
256 | if (KABPrefs::instance()->mHonorSingleClick) | 264 | if (KABPrefs::instance()->mHonorSingleClick) |
@@ -259,10 +267,10 @@ void KAddressBookIconView::readConfig(KConfig *config) | |||
259 | else | 267 | else |
260 | connect(mIconView, SIGNAL(doubleClicked(QIconViewItem *)), | 268 | connect(mIconView, SIGNAL(doubleClicked(QIconViewItem *)), |
261 | this, SLOT(addresseeExecuted(QIconViewItem *))); | 269 | this, SLOT(addresseeExecuted(QIconViewItem *))); |
262 | */ | 270 | */ |
263 | connect(mIconView, SIGNAL(selectionChanged(QIconViewItem *)), | 271 | connect(mIconView, SIGNAL(selectionChanged(Q3IconViewItem *)), |
264 | this, SLOT(addresseeExecuted(QIconViewItem *))); | 272 | this, SLOT(addresseeExecuted(Q3IconViewItem *))); |
265 | 273 | ||
266 | } | 274 | } |
267 | void KAddressBookIconView::doSearch( const QString& s ,KABC::Field *field ) | 275 | void KAddressBookIconView::doSearch( const QString& s ,KABC::Field *field ) |
268 | { | 276 | { |
@@ -335,9 +343,9 @@ void KAddressBookIconView::doSearch( const QString& s ,KABC::Field *field ) | |||
335 | } | 343 | } |
336 | QStringList KAddressBookIconView::selectedUids() | 344 | QStringList KAddressBookIconView::selectedUids() |
337 | { | 345 | { |
338 | QStringList uidList; | 346 | QStringList uidList; |
339 | QIconViewItem *item; | 347 | Q3IconViewItem *item; |
340 | AddresseeIconViewItem *aItem; | 348 | AddresseeIconViewItem *aItem; |
341 | 349 | ||
342 | for (item = mIconView->firstItem(); item; item = item->nextItem()) | 350 | for (item = mIconView->firstItem(); item; item = item->nextItem()) |
343 | { | 351 | { |
@@ -357,9 +365,9 @@ QStringList KAddressBookIconView::selectedUids() | |||
357 | } | 365 | } |
358 | 366 | ||
359 | void KAddressBookIconView::refresh(QString uid) | 367 | void KAddressBookIconView::refresh(QString uid) |
360 | { | 368 | { |
361 | QIconViewItem *item; | 369 | Q3IconViewItem *item; |
362 | AddresseeIconViewItem *aItem; | 370 | AddresseeIconViewItem *aItem; |
363 | 371 | ||
364 | if ( uid.isNull() ) { | 372 | if ( uid.isNull() ) { |
365 | // Rebuild the view | 373 | // Rebuild the view |
@@ -405,9 +413,9 @@ void KAddressBookIconView::refresh(QString uid) | |||
405 | } | 413 | } |
406 | 414 | ||
407 | void KAddressBookIconView::setSelected(QString uid, bool selected) | 415 | void KAddressBookIconView::setSelected(QString uid, bool selected) |
408 | { | 416 | { |
409 | QIconViewItem *item; | 417 | Q3IconViewItem *item; |
410 | AddresseeIconViewItem *aItem; | 418 | AddresseeIconViewItem *aItem; |
411 | 419 | ||
412 | if (uid.isNull()) | 420 | if (uid.isNull()) |
413 | { | 421 | { |
@@ -434,9 +442,9 @@ void KAddressBookIconView::setSelected(QString uid, bool selected) | |||
434 | } | 442 | } |
435 | } | 443 | } |
436 | } | 444 | } |
437 | 445 | ||
438 | void KAddressBookIconView::addresseeExecuted(QIconViewItem *item) | 446 | void KAddressBookIconView::addresseeExecuted(Q3IconViewItem *item) |
439 | { | 447 | { |
440 | #ifndef KAB_EMBEDDED | 448 | #ifndef KAB_EMBEDDED |
441 | AddresseeIconViewItem *aItem = dynamic_cast<AddresseeIconViewItem*>(item); | 449 | AddresseeIconViewItem *aItem = dynamic_cast<AddresseeIconViewItem*>(item); |
442 | #else //KAB_EMBEDDED | 450 | #else //KAB_EMBEDDED |
@@ -449,9 +457,9 @@ void KAddressBookIconView::addresseeExecuted(QIconViewItem *item) | |||
449 | } | 457 | } |
450 | 458 | ||
451 | void KAddressBookIconView::addresseeSelected() | 459 | void KAddressBookIconView::addresseeSelected() |
452 | { | 460 | { |
453 | QIconViewItem *item; | 461 | Q3IconViewItem *item; |
454 | AddresseeIconViewItem *aItem; | 462 | AddresseeIconViewItem *aItem; |
455 | 463 | ||
456 | bool found = false; | 464 | bool found = false; |
457 | for (item = mIconView->firstItem(); item && !found; | 465 | for (item = mIconView->firstItem(); item && !found; |
@@ -475,7 +483,7 @@ void KAddressBookIconView::addresseeSelected() | |||
475 | if (!found) | 483 | if (!found) |
476 | emit selected(QString::null); | 484 | emit selected(QString::null); |
477 | } | 485 | } |
478 | 486 | ||
479 | #ifndef KAB_EMBEDDED | 487 | #ifndef KAB_EMBEDDED_ |
480 | #include "kaddressbookiconview.moc" | 488 | #include "moc_kaddressbookiconview.cpp" |
481 | #endif //KAB_EMBEDDED | 489 | #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 | |||
@@ -24,22 +24,25 @@ | |||
24 | #ifndef KADDRESSBOOKICONVIEW_H | 24 | #ifndef KADDRESSBOOKICONVIEW_H |
25 | #define KADDRESSBOOKICONVIEW_H | 25 | #define KADDRESSBOOKICONVIEW_H |
26 | 26 | ||
27 | #include <qstring.h> | 27 | #include <qstring.h> |
28 | //Added by qt3to4: | ||
29 | #include <Q3ValueList> | ||
30 | #include <QDropEvent> | ||
28 | #ifndef KAB_EMBEDDED | 31 | #ifndef KAB_EMBEDDED |
29 | #include <kiconview.h> | 32 | #include <kiconview.h> |
30 | #else //KAB_EMBEDDED | 33 | #else //KAB_EMBEDDED |
31 | #include <qiconview.h> | 34 | #include <q3iconview.h> |
32 | #include <qptrlist.h> | 35 | #include <q3ptrlist.h> |
33 | #include <klocale.h> | 36 | #include <klocale.h> |
34 | #endif //KAB_EMBEDDED | 37 | #endif //KAB_EMBEDDED |
35 | #include "kaddressbookview.h" | 38 | #include "kaddressbookview.h" |
36 | 39 | ||
37 | class QIconViewItem; | 40 | class Q3IconViewItem; |
38 | class KConfig; | 41 | class KConfig; |
39 | class AddresseeIconView; | 42 | class AddresseeIconView; |
40 | class AddresseeIconViewItem; | 43 | class AddresseeIconViewItem; |
41 | class QIconDragItem; | 44 | class Q3IconDragItem; |
42 | class KAddressBookIconView; | 45 | class KAddressBookIconView; |
43 | 46 | ||
44 | namespace KABC { class AddressBook; } | 47 | namespace KABC { class AddressBook; } |
45 | 48 | ||
@@ -67,32 +70,32 @@ class KAddressBookIconView : public KAddressBookView | |||
67 | 70 | ||
68 | public slots: | 71 | public slots: |
69 | void refresh(QString uid = QString::null); | 72 | void refresh(QString uid = QString::null); |
70 | #ifndef KAB_EMBEDDED | 73 | #ifndef KAB_EMBEDDED |
71 | //MOC_SKIP_BEGIN | 74 | #ifndef Q_MOC_RUN |
72 | void setSelected(QString uid = QString::null, bool selected = true); | 75 | void setSelected(QString uid = QString::null, bool selected = true); |
73 | //MOC_SKIP_END | 76 | #endif |
74 | #else //KAB_EMBEDDED | 77 | #else //KAB_EMBEDDED |
75 | //US my MOC do not like default parameters ??? | 78 | //US my MOC do not like default parameters ??? |
76 | void setSelected(QString uid, bool selected); | 79 | void setSelected(QString uid, bool selected); |
77 | #endif //KAB_EMBEDDED | 80 | #endif //KAB_EMBEDDED |
78 | 81 | ||
79 | protected slots: | 82 | protected slots: |
80 | void addresseeExecuted(QIconViewItem *item); | 83 | void addresseeExecuted(Q3IconViewItem *item); |
81 | void addresseeSelected(); | 84 | void addresseeSelected(); |
82 | 85 | ||
83 | private: | 86 | private: |
84 | AddresseeIconView *mIconView; | 87 | AddresseeIconView *mIconView; |
85 | QPtrList<AddresseeIconViewItem> mIconList; | 88 | Q3PtrList<AddresseeIconViewItem> mIconList; |
86 | }; | 89 | }; |
87 | 90 | ||
88 | 91 | ||
89 | #ifndef KAB_EMBEDDED | 92 | #ifndef KAB_EMBEDDED |
90 | //MOC_SKIP_BEGIN | 93 | #ifndef Q_MOC_RUN |
91 | class AddresseeIconView : public KIconView | 94 | class AddresseeIconView : public KIconView |
92 | //MOC_SKIP_END | 95 | #endif |
93 | #else //KAB_EMBEDDED | 96 | #else //KAB_EMBEDDED |
94 | class AddresseeIconView : public QIconView | 97 | class AddresseeIconView : public Q3IconView |
95 | #endif //KAB_EMBEDDED | 98 | #endif //KAB_EMBEDDED |
96 | { | 99 | { |
97 | Q_OBJECT | 100 | Q_OBJECT |
98 | 101 | ||
@@ -104,12 +107,12 @@ class AddresseeIconView : public QIconView | |||
104 | void addresseeDropped(QDropEvent *); | 107 | void addresseeDropped(QDropEvent *); |
105 | void startAddresseeDrag(); | 108 | void startAddresseeDrag(); |
106 | 109 | ||
107 | protected: | 110 | protected: |
108 | virtual QDragObject *dragObject(); | 111 | virtual Q3DragObject *dragObject(); |
109 | 112 | ||
110 | protected slots: | 113 | protected slots: |
111 | void itemDropped(QDropEvent *, const QValueList<QIconDragItem> &); | 114 | void itemDropped(QDropEvent *, const Q3ValueList<Q3IconDragItem> &); |
112 | }; | 115 | }; |
113 | 116 | ||
114 | class IconViewFactory : public ViewFactory | 117 | class IconViewFactory : public ViewFactory |
115 | { | 118 | { |
diff --git a/kaddressbook/views/kaddressbooktableview.cpp b/kaddressbook/views/kaddressbooktableview.cpp index 272f2eb..7efaaa9 100644 --- a/kaddressbook/views/kaddressbooktableview.cpp +++ b/kaddressbook/views/kaddressbooktableview.cpp | |||
@@ -1,17 +1,21 @@ | |||
1 | // $Id$ | 1 | // $Id$ |
2 | 2 | ||
3 | #include <qvbox.h> | 3 | #include <q3vbox.h> |
4 | #include <qlistbox.h> | 4 | #include <q3listbox.h> |
5 | #include <qwidget.h> | 5 | #include <qwidget.h> |
6 | #include <qfile.h> | 6 | #include <qfile.h> |
7 | #include <qimage.h> | 7 | #include <qimage.h> |
8 | #include <qcombobox.h> | 8 | #include <qcombobox.h> |
9 | #include <qapplication.h> | 9 | #include <qapplication.h> |
10 | #include <qdragobject.h> | 10 | #include <q3dragobject.h> |
11 | #include <qevent.h> | 11 | #include <qevent.h> |
12 | #include <qurl.h> | 12 | #include <q3url.h> |
13 | #include <qpixmap.h> | 13 | #include <qpixmap.h> |
14 | //Added by qt3to4: | ||
15 | #include <QDropEvent> | ||
16 | #include <QKeyEvent> | ||
17 | #include <Q3VBoxLayout> | ||
14 | 18 | ||
15 | #include <kabc/addressbook.h> | 19 | #include <kabc/addressbook.h> |
16 | #include <kapplication.h> | 20 | #include <kapplication.h> |
17 | #include <kconfig.h> | 21 | #include <kconfig.h> |
@@ -31,9 +35,9 @@ | |||
31 | #include "undocmds.h" | 35 | #include "undocmds.h" |
32 | #include "viewmanager.h" | 36 | #include "viewmanager.h" |
33 | 37 | ||
34 | #include <qlayout.h> | 38 | #include <qlayout.h> |
35 | #include <qheader.h> | 39 | #include <q3header.h> |
36 | #include <qregexp.h> | 40 | #include <qregexp.h> |
37 | 41 | ||
38 | #include "kaddressbooktableview.h" | 42 | #include "kaddressbooktableview.h" |
39 | 43 | ||
@@ -41,9 +45,9 @@ | |||
41 | KAddressBookTableView::KAddressBookTableView( KABC::AddressBook *ab, | 45 | KAddressBookTableView::KAddressBookTableView( KABC::AddressBook *ab, |
42 | QWidget *parent, const char *name ) | 46 | QWidget *parent, const char *name ) |
43 | : KAddressBookView( ab, parent, name ) | 47 | : KAddressBookView( ab, parent, name ) |
44 | { | 48 | { |
45 | mainLayout = new QVBoxLayout( viewWidget(), 2 ); | 49 | mainLayout = new Q3VBoxLayout( viewWidget(), 2 ); |
46 | 50 | ||
47 | // The list view will be created when the config is read. | 51 | // The list view will be created when the config is read. |
48 | mListView = 0; | 52 | mListView = 0; |
49 | } | 53 | } |
@@ -76,16 +80,16 @@ void KAddressBookTableView::reconstructListView() | |||
76 | if (mListView) | 80 | if (mListView) |
77 | { | 81 | { |
78 | disconnect(mListView, SIGNAL(selectionChanged()), | 82 | disconnect(mListView, SIGNAL(selectionChanged()), |
79 | this, SLOT(addresseeSelected())); | 83 | this, SLOT(addresseeSelected())); |
80 | disconnect(mListView, SIGNAL(executed(QListViewItem*)), | 84 | disconnect(mListView, SIGNAL(executed(Q3ListViewItem*)), |
81 | this, SLOT(addresseeExecuted(QListViewItem*))); | 85 | this, SLOT(addresseeExecuted(Q3ListViewItem*))); |
82 | disconnect(mListView, SIGNAL(doubleClicked(QListViewItem*)), | 86 | disconnect(mListView, SIGNAL(doubleClicked(Q3ListViewItem*)), |
83 | this, SLOT(addresseeExecuted(QListViewItem*))); | 87 | this, SLOT(addresseeExecuted(Q3ListViewItem*))); |
84 | disconnect(mListView, SIGNAL(startAddresseeDrag()), this, | 88 | disconnect(mListView, SIGNAL(startAddresseeDrag()), this, |
85 | SIGNAL(startDrag())); | 89 | SIGNAL(startDrag())); |
86 | disconnect(mListView, SIGNAL(returnPressed(QListViewItem*)), | 90 | disconnect(mListView, SIGNAL(returnPressed(Q3ListViewItem*)), |
87 | this, SLOT(addresseeExecuted(QListViewItem*))); | 91 | this, SLOT(addresseeExecuted(Q3ListViewItem*))); |
88 | 92 | ||
89 | disconnect(mListView, SIGNAL(addresseeDropped(QDropEvent*)), this, | 93 | disconnect(mListView, SIGNAL(addresseeDropped(QDropEvent*)), this, |
90 | SIGNAL(dropped(QDropEvent*))); | 94 | SIGNAL(dropped(QDropEvent*))); |
91 | delete mListView; | 95 | delete mListView; |
@@ -104,9 +108,9 @@ void KAddressBookTableView::reconstructListView() | |||
104 | 108 | ||
105 | int c = 0; | 109 | int c = 0; |
106 | for( it = fieldList.begin(); it != fieldList.end(); ++it ) { | 110 | for( it = fieldList.begin(); it != fieldList.end(); ++it ) { |
107 | mListView->addColumn( (*it)->label() ); | 111 | mListView->addColumn( (*it)->label() ); |
108 | mListView->setColumnWidthMode(c++, QListView::Manual); | 112 | mListView->setColumnWidthMode(c++, Q3ListView::Manual); |
109 | //US | 113 | //US |
110 | // qDebug("KAddressBookTableView::reconstructListView: field %s", (*it)->label().latin1()); | 114 | // qDebug("KAddressBookTableView::reconstructListView: field %s", (*it)->label().latin1()); |
111 | } | 115 | } |
112 | 116 | ||
@@ -118,17 +122,17 @@ void KAddressBookTableView::reconstructListView() | |||
118 | SIGNAL(dropped(QDropEvent*))); | 122 | SIGNAL(dropped(QDropEvent*))); |
119 | 123 | ||
120 | if (KABPrefs::instance()->mHonorSingleClick) { | 124 | if (KABPrefs::instance()->mHonorSingleClick) { |
121 | // qDebug("KAddressBookTableView::reconstructListView single"); | 125 | // qDebug("KAddressBookTableView::reconstructListView single"); |
122 | connect(mListView, SIGNAL(executed(QListViewItem*)), | 126 | connect(mListView, SIGNAL(executed(Q3ListViewItem*)), |
123 | this, SLOT(addresseeExecuted(QListViewItem*))); | 127 | this, SLOT(addresseeExecuted(Q3ListViewItem*))); |
124 | } else { | 128 | } else { |
125 | // qDebug("KAddressBookTableView::reconstructListView double"); | 129 | // qDebug("KAddressBookTableView::reconstructListView double"); |
126 | connect(mListView, SIGNAL(doubleClicked(QListViewItem*)), | 130 | connect(mListView, SIGNAL(doubleClicked(Q3ListViewItem*)), |
127 | this, SLOT(addresseeExecuted(QListViewItem*))); | 131 | this, SLOT(addresseeExecuted(Q3ListViewItem*))); |
128 | } | 132 | } |
129 | connect(mListView, SIGNAL(returnPressed(QListViewItem*)), | 133 | connect(mListView, SIGNAL(returnPressed(Q3ListViewItem*)), |
130 | this, SLOT(addresseeExecuted(QListViewItem*))); | 134 | this, SLOT(addresseeExecuted(Q3ListViewItem*))); |
131 | connect(mListView, SIGNAL(signalDelete()), | 135 | connect(mListView, SIGNAL(signalDelete()), |
132 | this, SLOT(addresseeDeleted())); | 136 | this, SLOT(addresseeDeleted())); |
133 | 137 | ||
134 | //US performceimprovement. Refresh is done from the outside | 138 | //US performceimprovement. Refresh is done from the outside |
@@ -343,9 +347,9 @@ void KAddressBookTableView::refresh(QString uid) | |||
343 | } | 347 | } |
344 | } else { | 348 | } else { |
345 | // Only need to update on entry. Iterate through and try to find it | 349 | // Only need to update on entry. Iterate through and try to find it |
346 | ContactListViewItem *ceItem; | 350 | ContactListViewItem *ceItem; |
347 | QListViewItemIterator it( mListView ); | 351 | Q3ListViewItemIterator it( mListView ); |
348 | while ( it.current() ) { | 352 | while ( it.current() ) { |
349 | #ifndef KAB_EMBEDDED | 353 | #ifndef KAB_EMBEDDED |
350 | ceItem = dynamic_cast<ContactListViewItem*>( it.current() ); | 354 | ceItem = dynamic_cast<ContactListViewItem*>( it.current() ); |
351 | #else //KAB_EMBEDDED | 355 | #else //KAB_EMBEDDED |
@@ -365,9 +369,9 @@ void KAddressBookTableView::refresh(QString uid) | |||
365 | 369 | ||
366 | QStringList KAddressBookTableView::selectedUids() | 370 | QStringList KAddressBookTableView::selectedUids() |
367 | { | 371 | { |
368 | QStringList uidList; | 372 | QStringList uidList; |
369 | QListViewItem *item; | 373 | Q3ListViewItem *item; |
370 | ContactListViewItem *ceItem; | 374 | ContactListViewItem *ceItem; |
371 | 375 | ||
372 | for(item = mListView->firstChild(); item; item = item->itemBelow()) | 376 | for(item = mListView->firstChild(); item; item = item->itemBelow()) |
373 | { | 377 | { |
@@ -393,9 +397,9 @@ QStringList KAddressBookTableView::selectedUids() | |||
393 | } | 397 | } |
394 | 398 | ||
395 | void KAddressBookTableView::setSelected(QString uid, bool selected) | 399 | void KAddressBookTableView::setSelected(QString uid, bool selected) |
396 | { | 400 | { |
397 | QListViewItem *item; | 401 | Q3ListViewItem *item; |
398 | ContactListViewItem *ceItem; | 402 | ContactListViewItem *ceItem; |
399 | 403 | ||
400 | if (uid.isNull()) | 404 | if (uid.isNull()) |
401 | { | 405 | { |
@@ -428,9 +432,9 @@ void KAddressBookTableView::addresseeSelected() | |||
428 | // We need to try to find the first selected item. This might not be the | 432 | // We need to try to find the first selected item. This might not be the |
429 | // last selected item, but when QListView is in multiselection mode, | 433 | // last selected item, but when QListView is in multiselection mode, |
430 | // there is no way to figure out which one was | 434 | // there is no way to figure out which one was |
431 | // selected last. | 435 | // selected last. |
432 | QListViewItem *item; | 436 | Q3ListViewItem *item; |
433 | bool found =false; | 437 | bool found =false; |
434 | for (item = mListView->firstChild(); item && !found; | 438 | for (item = mListView->firstChild(); item && !found; |
435 | item = item->nextSibling()) | 439 | item = item->nextSibling()) |
436 | { | 440 | { |
@@ -452,9 +456,9 @@ void KAddressBookTableView::addresseeSelected() | |||
452 | if (!found) | 456 | if (!found) |
453 | emit selected(QString::null); | 457 | emit selected(QString::null); |
454 | } | 458 | } |
455 | 459 | ||
456 | void KAddressBookTableView::addresseeExecuted(QListViewItem *item) | 460 | void KAddressBookTableView::addresseeExecuted(Q3ListViewItem *item) |
457 | { | 461 | { |
458 | if (item) | 462 | if (item) |
459 | { | 463 | { |
460 | #ifndef KAB_EMBEDDED | 464 | #ifndef KAB_EMBEDDED |
@@ -486,7 +490,7 @@ void KAddressBookTableView::addresseeDeleted() | |||
486 | 490 | ||
487 | 491 | ||
488 | 492 | ||
489 | 493 | ||
490 | #ifndef KAB_EMBEDDED | 494 | #ifndef KAB_EMBEDDED_ |
491 | #include "kaddressbooktableview.moc" | 495 | #include "moc_kaddressbooktableview.cpp" |
492 | #endif //KAB_EMBEDDED | 496 | #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 | |||
@@ -9,14 +9,14 @@ | |||
9 | #include <config.h> | 9 | #include <config.h> |
10 | #endif | 10 | #endif |
11 | 11 | ||
12 | #include <qwidget.h> | 12 | #include <qwidget.h> |
13 | #include <qlistview.h> | 13 | #include <q3listview.h> |
14 | #include <qstring.h> | 14 | #include <qstring.h> |
15 | #include <qdialog.h> | 15 | #include <qdialog.h> |
16 | #include <qtabdialog.h> | 16 | #include <q3tabdialog.h> |
17 | #include <qstringlist.h> | 17 | #include <qstringlist.h> |
18 | #include <qvaluelist.h> | 18 | #include <q3valuelist.h> |
19 | 19 | ||
20 | #include "undo.h" | 20 | #include "undo.h" |
21 | 21 | ||
22 | #else //KAB_EMBEDDED | 22 | #else //KAB_EMBEDDED |
@@ -24,12 +24,14 @@ | |||
24 | #endif //KAB_EMBEDDED | 24 | #endif //KAB_EMBEDDED |
25 | 25 | ||
26 | #include "klocale.h" | 26 | #include "klocale.h" |
27 | #include "kaddressbookview.h" | 27 | #include "kaddressbookview.h" |
28 | //Added by qt3to4: | ||
29 | #include <Q3VBoxLayout> | ||
28 | 30 | ||
29 | class QListViewItem; | 31 | class Q3ListViewItem; |
30 | class QListBox; | 32 | class Q3ListBox; |
31 | class QVBoxLayout; | 33 | class Q3VBoxLayout; |
32 | class KConfig; | 34 | class KConfig; |
33 | 35 | ||
34 | class ContactListViewItem; | 36 | class ContactListViewItem; |
35 | class ContactListView; | 37 | class ContactListView; |
@@ -78,12 +80,12 @@ friend class ContactListView; | |||
78 | 80 | ||
79 | /** Called whenever the user executes an addressee. In terms of the | 81 | /** Called whenever the user executes an addressee. In terms of the |
80 | * list view, this is probably a double click | 82 | * list view, this is probably a double click |
81 | */ | 83 | */ |
82 | void addresseeExecuted(QListViewItem*); | 84 | void addresseeExecuted(Q3ListViewItem*); |
83 | 85 | ||
84 | private: | 86 | private: |
85 | QVBoxLayout *mainLayout; | 87 | Q3VBoxLayout *mainLayout; |
86 | ContactListView *mListView; | 88 | ContactListView *mListView; |
87 | }; | 89 | }; |
88 | 90 | ||
89 | 91 | ||
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 | |||
@@ -29,9 +29,9 @@ $Id$ | |||
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <qfile.h> | 31 | #include <qfile.h> |
32 | #include <qregexp.h> | 32 | #include <qregexp.h> |
33 | #include <qtextstream.h> | 33 | #include <q3textstream.h> |
34 | #include <qtextcodec.h> | 34 | #include <qtextcodec.h> |
35 | 35 | ||
36 | #include <kfiledialog.h> | 36 | #include <kfiledialog.h> |
37 | #ifndef KAB_EMBEDDED | 37 | #ifndef KAB_EMBEDDED |
@@ -103,9 +103,9 @@ bool CSVXXPort::exportContacts( const KABC::AddresseeList &list, const QString& | |||
103 | 103 | ||
104 | return KIO::NetAccess::upload( tmpFile.name(), url, parentWidget() ); | 104 | return KIO::NetAccess::upload( tmpFile.name(), url, parentWidget() ); |
105 | } else { | 105 | } else { |
106 | QFile file( url.path() ); | 106 | QFile file( url.path() ); |
107 | if ( !file.open( IO_WriteOnly ) ) { | 107 | if ( !file.open( QIODevice::WriteOnly ) ) { |
108 | QString txt = i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ); | 108 | QString txt = i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ); |
109 | KMessageBox::error( parentWidget(), txt.arg( url.path() ) ); | 109 | KMessageBox::error( parentWidget(), txt.arg( url.path() ) ); |
110 | return false; | 110 | return false; |
111 | } | 111 | } |
@@ -123,9 +123,9 @@ bool CSVXXPort::exportContacts( const KABC::AddresseeList &list, const QString& | |||
123 | if ( fileName.isEmpty() ) | 123 | if ( fileName.isEmpty() ) |
124 | return false; | 124 | return false; |
125 | 125 | ||
126 | QFile file( fileName ); | 126 | QFile file( fileName ); |
127 | if ( !file.open( IO_WriteOnly ) ) { | 127 | if ( !file.open( QIODevice::WriteOnly ) ) { |
128 | QString txt = i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ); | 128 | QString txt = i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ); |
129 | KMessageBox::error( parentWidget(), txt.arg( fileName ) ); | 129 | KMessageBox::error( parentWidget(), txt.arg( fileName ) ); |
130 | return false; | 130 | return false; |
131 | } | 131 | } |
@@ -150,9 +150,9 @@ KABC::AddresseeList CSVXXPort::importContacts( const QString& ) const | |||
150 | } | 150 | } |
151 | 151 | ||
152 | void CSVXXPort::doExport( QFile *fp, const KABC::AddresseeList &list ) | 152 | void CSVXXPort::doExport( QFile *fp, const KABC::AddresseeList &list ) |
153 | { | 153 | { |
154 | QTextStream t( fp ); | 154 | Q3TextStream t( fp ); |
155 | t.setCodec( QTextCodec::codecForName("utf8") ); | 155 | t.setCodec( QTextCodec::codecForName("utf8") ); |
156 | 156 | ||
157 | KABC::AddresseeList::ConstIterator iter; | 157 | KABC::AddresseeList::ConstIterator iter; |
158 | KABC::Field::List fields = addressBook()->fields(); | 158 | KABC::Field::List fields = addressBook()->fields(); |
@@ -186,9 +186,7 @@ void CSVXXPort::doExport( QFile *fp, const KABC::AddresseeList &list ) | |||
186 | t << "\n"; | 186 | t << "\n"; |
187 | } | 187 | } |
188 | } | 188 | } |
189 | 189 | ||
190 | #ifndef KAB_EMBEDDED | 190 | #ifndef KAB_EMBEDDED_ |
191 | #include "csv_xxport.moc" | 191 | #include "moc_csv_xxport.cpp" |
192 | #endif //KAB_EMBEDDED | 192 | #endif //KAB_EMBEDDED |
193 | |||
194 | |||
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 | |||
@@ -26,9 +26,9 @@ Copyright (c) 2004 Ulf Schenk | |||
26 | $Id$ | 26 | $Id$ |
27 | */ | 27 | */ |
28 | 28 | ||
29 | 29 | ||
30 | #include <qbuttongroup.h> | 30 | #include <q3buttongroup.h> |
31 | #include <qcheckbox.h> | 31 | #include <qcheckbox.h> |
32 | #include <qcombobox.h> | 32 | #include <qcombobox.h> |
33 | #ifdef DESKTOP_VERSION | 33 | #ifdef DESKTOP_VERSION |
34 | #include <qinputdialog.h> | 34 | #include <qinputdialog.h> |
@@ -38,12 +38,16 @@ $Id$ | |||
38 | #include <qlabel.h> | 38 | #include <qlabel.h> |
39 | #include <qlineedit.h> | 39 | #include <qlineedit.h> |
40 | #include <qpushbutton.h> | 40 | #include <qpushbutton.h> |
41 | #include <qradiobutton.h> | 41 | #include <qradiobutton.h> |
42 | #include <qtable.h> | 42 | #include <q3table.h> |
43 | #include <qlayout.h> | 43 | #include <qlayout.h> |
44 | #include <qtextstream.h> | 44 | #include <q3textstream.h> |
45 | #include <qfile.h> | 45 | #include <qfile.h> |
46 | //Added by qt3to4: | ||
47 | #include <Q3HBoxLayout> | ||
48 | #include <Q3ValueList> | ||
49 | #include <Q3GridLayout> | ||
46 | 50 | ||
47 | #include <kapplication.h> | 51 | #include <kapplication.h> |
48 | #include <kdebug.h> | 52 | #include <kdebug.h> |
49 | #include <kdialogbase.h> | 53 | #include <kdialogbase.h> |
@@ -55,9 +59,9 @@ $Id$ | |||
55 | #include <kstandarddirs.h> | 59 | #include <kstandarddirs.h> |
56 | #include <kurlrequester.h> | 60 | #include <kurlrequester.h> |
57 | 61 | ||
58 | #ifdef DESKTOP_VERSION | 62 | #ifdef DESKTOP_VERSION |
59 | #include "qtable.h" | 63 | #include "q3table.h" |
60 | #else | 64 | #else |
61 | #include "qcombotableitem.h" | 65 | #include "qcombotableitem.h" |
62 | #endif | 66 | #endif |
63 | #include "csvimportdialog.h" | 67 | #include "csvimportdialog.h" |
@@ -160,9 +164,9 @@ CSVImportDialog::CSVImportDialog( KABC::AddressBook *ab, QWidget *parent, | |||
160 | connect( this, SIGNAL( user2Clicked() ), | 164 | connect( this, SIGNAL( user2Clicked() ), |
161 | this, SLOT( saveTemplate() ) ); | 165 | this, SLOT( saveTemplate() ) ); |
162 | 166 | ||
163 | // if ( QApplication::desktop()->width() < 321 ) | 167 | // if ( QApplication::desktop()->width() < 321 ) |
164 | QIconSet icon = SmallIcon("filesave"); | 168 | QIcon icon = SmallIcon("filesave"); |
165 | 169 | ||
166 | findButton( User2 )->setIconSet (icon ) ; | 170 | findButton( User2 )->setIconSet (icon ) ; |
167 | icon = SmallIcon("fileopen"); | 171 | icon = SmallIcon("fileopen"); |
168 | findButton( User1 )->setIconSet (icon ) ; | 172 | findButton( User1 )->setIconSet (icon ) ; |
@@ -185,9 +189,9 @@ KABC::AddresseeList CSVImportDialog::contacts() const | |||
185 | KABC::Address addrHome( KABC::Address::Home ); | 189 | KABC::Address addrHome( KABC::Address::Home ); |
186 | KABC::Address addrWork( KABC::Address::Work ); | 190 | KABC::Address addrWork( KABC::Address::Work ); |
187 | for ( int col = 0; col < mTable->numCols(); ++col ) { | 191 | for ( int col = 0; col < mTable->numCols(); ++col ) { |
188 | 192 | ||
189 | QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0, col ) ); | 193 | Q3ComboTableItem *item = static_cast<Q3ComboTableItem*>( mTable->item( 0, col ) ); |
190 | 194 | ||
191 | if ( !item ) { | 195 | if ( !item ) { |
192 | qDebug( "ERROR: item cast failed" ); | 196 | qDebug( "ERROR: item cast failed" ); |
193 | continue; | 197 | continue; |
@@ -228,9 +232,9 @@ KABC::AddresseeList CSVImportDialog::contacts() const | |||
228 | //the generated code had the following format: a.setBirthday( QDate::fromString( value, Qt::ISODate ) ); | 232 | //the generated code had the following format: a.setBirthday( QDate::fromString( value, Qt::ISODate ) ); |
229 | // But Qt::IsoDate and QDate::fromString was not specified. Do I have the wrong QT version ? | 233 | // But Qt::IsoDate and QDate::fromString was not specified. Do I have the wrong QT version ? |
230 | { | 234 | { |
231 | QDate dt = KGlobal::locale()->readDate( value, "%Y-%m-%d"); // = Qt::ISODate | 235 | QDate dt = KGlobal::locale()->readDate( value, "%Y-%m-%d"); // = Qt::ISODate |
232 | a.setBirthday(dt); | 236 | a.setBirthday(QDateTime(dt)); |
233 | } | 237 | } |
234 | break; | 238 | break; |
235 | case Email: | 239 | case Email: |
236 | if ( !value.isEmpty() ) | 240 | if ( !value.isEmpty() ) |
@@ -381,11 +385,11 @@ KABC::AddresseeList CSVImportDialog::contacts() const | |||
381 | void CSVImportDialog::initGUI() | 385 | void CSVImportDialog::initGUI() |
382 | { | 386 | { |
383 | QWidget* page = plainPage(); | 387 | QWidget* page = plainPage(); |
384 | 388 | ||
385 | QGridLayout *layout = new QGridLayout( page, 1, 1, marginHintSmall(), | 389 | Q3GridLayout *layout = new Q3GridLayout( page, 1, 1, marginHintSmall(), |
386 | spacingHintSmall() ); | 390 | spacingHintSmall() ); |
387 | QHBoxLayout *hbox = new QHBoxLayout(); | 391 | Q3HBoxLayout *hbox = new Q3HBoxLayout(); |
388 | hbox->setSpacing( spacingHint() ); | 392 | hbox->setSpacing( spacingHint() ); |
389 | 393 | ||
390 | QLabel *label = new QLabel( i18n( "File to import:" ), page ); | 394 | QLabel *label = new QLabel( i18n( "File to import:" ), page ); |
391 | hbox->addWidget( label ); | 395 | hbox->addWidget( label ); |
@@ -396,13 +400,13 @@ void CSVImportDialog::initGUI() | |||
396 | 400 | ||
397 | layout->addMultiCellLayout( hbox, 0, 0, 0, 2 ); | 401 | layout->addMultiCellLayout( hbox, 0, 0, 0, 2 ); |
398 | 402 | ||
399 | // Delimiter: comma, semicolon, tab, space, other | 403 | // Delimiter: comma, semicolon, tab, space, other |
400 | mDelimiterBox = new QButtonGroup( i18n( "Delimiter" ), page ); | 404 | mDelimiterBox = new Q3ButtonGroup( i18n( "Delimiter" ), page ); |
401 | mDelimiterBox->setColumnLayout( 0, Qt::Vertical ); | 405 | mDelimiterBox->setColumnLayout( 0, Qt::Vertical ); |
402 | mDelimiterBox->layout()->setSpacing( spacingHint() ); | 406 | mDelimiterBox->layout()->setSpacing( spacingHint() ); |
403 | mDelimiterBox->layout()->setMargin( marginHint() ); | 407 | mDelimiterBox->layout()->setMargin( marginHint() ); |
404 | QGridLayout *delimiterLayout = new QGridLayout( mDelimiterBox->layout() ); | 408 | Q3GridLayout *delimiterLayout = new Q3GridLayout( mDelimiterBox->layout() ); |
405 | delimiterLayout->setAlignment( Qt::AlignTop ); | 409 | delimiterLayout->setAlignment( Qt::AlignTop ); |
406 | layout->addMultiCellWidget( mDelimiterBox, 1, 1, 0, 2 ); | 410 | layout->addMultiCellWidget( mDelimiterBox, 1, 1, 0, 2 ); |
407 | 411 | ||
408 | mRadioComma = new QRadioButton( i18n( "Comma" ), mDelimiterBox ); | 412 | mRadioComma = new QRadioButton( i18n( "Comma" ), mDelimiterBox ); |
@@ -449,10 +453,10 @@ void CSVImportDialog::initGUI() | |||
449 | mIgnoreDuplicates = new QCheckBox( page ); | 453 | mIgnoreDuplicates = new QCheckBox( page ); |
450 | mIgnoreDuplicates->setText( i18n( "Ignore duplicate delimiters" ) ); | 454 | mIgnoreDuplicates->setText( i18n( "Ignore duplicate delimiters" ) ); |
451 | layout->addMultiCellWidget( mIgnoreDuplicates, 4, 4, 0, 2 ); | 455 | layout->addMultiCellWidget( mIgnoreDuplicates, 4, 4, 0, 2 ); |
452 | 456 | ||
453 | mTable = new QTable( 0, 0, page ); | 457 | mTable = new Q3Table( 0, 0, page ); |
454 | mTable->setSelectionMode( QTable::NoSelection ); | 458 | mTable->setSelectionMode( Q3Table::NoSelection ); |
455 | //mTable->horizontalHeader()->hide(); | 459 | //mTable->horizontalHeader()->hide(); |
456 | layout->addMultiCellWidget( mTable, 5, 5, 0, 2 ); | 460 | layout->addMultiCellWidget( mTable, 5, 5, 0, 2 ); |
457 | /*US | 461 | /*US |
458 | setButtonText( User1, i18n( "Apply Template" ) ); | 462 | setButtonText( User1, i18n( "Apply Template" ) ); |
@@ -482,13 +486,13 @@ void CSVImportDialog::fillTable() | |||
482 | QChar x; | 486 | QChar x; |
483 | QString field = ""; | 487 | QString field = ""; |
484 | 488 | ||
485 | // store previous assignment | 489 | // store previous assignment |
486 | QValueList<int> mTypeOld = mTypeStore; | 490 | Q3ValueList<int> mTypeOld = mTypeStore; |
487 | 491 | ||
488 | mTypeStore.clear(); | 492 | mTypeStore.clear(); |
489 | for ( column = 0; column < mTable->numCols(); ++column ) { | 493 | for ( column = 0; column < mTable->numCols(); ++column ) { |
490 | QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0, column ) ); | 494 | Q3ComboTableItem *item = static_cast<Q3ComboTableItem*>( mTable->item( 0, column ) ); |
491 | 495 | ||
492 | if ( !item || mClearTypeStore ) | 496 | if ( !item || mClearTypeStore ) |
493 | mTypeStore.append( typeToPos( Undefined ) ); | 497 | mTypeStore.append( typeToPos( Undefined ) ); |
494 | else if ( item ) | 498 | else if ( item ) |
@@ -505,16 +509,16 @@ void CSVImportDialog::fillTable() | |||
505 | } else { | 509 | } else { |
506 | mData = QString::fromLocal8Bit( mFileArray.data() ); | 510 | mData = QString::fromLocal8Bit( mFileArray.data() ); |
507 | } | 511 | } |
508 | 512 | ||
509 | QTextStream inputStream( mData, IO_ReadOnly ); | 513 | Q3TextStream inputStream( mData, QIODevice::ReadOnly ); |
510 | 514 | ||
511 | if ( mComboCodec->currentItem () == 0 ) { | 515 | if ( mComboCodec->currentItem () == 0 ) { |
512 | inputStream.setEncoding( QTextStream::UnicodeUTF8 ); | 516 | inputStream.setEncoding( Q3TextStream::UnicodeUTF8 ); |
513 | } else if ( mComboCodec->currentItem () == 1 ) { | 517 | } else if ( mComboCodec->currentItem () == 1 ) { |
514 | inputStream.setEncoding( QTextStream::Latin1 ); | 518 | inputStream.setEncoding( Q3TextStream::Latin1 ); |
515 | } else { | 519 | } else { |
516 | inputStream.setEncoding( QTextStream::Locale ); | 520 | inputStream.setEncoding( Q3TextStream::Locale ); |
517 | } | 521 | } |
518 | 522 | ||
519 | int maxColumn = 0; | 523 | int maxColumn = 0; |
520 | while ( !inputStream.atEnd() ) { | 524 | while ( !inputStream.atEnd() ) { |
@@ -525,9 +529,9 @@ void CSVImportDialog::fillTable() | |||
525 | switch ( state ) { | 529 | switch ( state ) { |
526 | case S_START : | 530 | case S_START : |
527 | if ( x == mTextQuote ) { | 531 | if ( x == mTextQuote ) { |
528 | state = S_QUOTED_FIELD; | 532 | state = S_QUOTED_FIELD; |
529 | } else if ( x == mDelimiter ) { | 533 | } else if ( QString(x) == mDelimiter ) { |
530 | if ( ( ignoreDups == false ) || ( lastCharDelimiter == false ) ) | 534 | if ( ( ignoreDups == false ) || ( lastCharDelimiter == false ) ) |
531 | ++column; | 535 | ++column; |
532 | lastCharDelimiter = true; | 536 | lastCharDelimiter = true; |
533 | } else if ( x == '\n' ) { | 537 | } else if ( x == '\n' ) { |
@@ -560,9 +564,9 @@ void CSVImportDialog::fillTable() | |||
560 | case S_MAYBE_END_OF_QUOTED_FIELD : | 564 | case S_MAYBE_END_OF_QUOTED_FIELD : |
561 | if ( x == mTextQuote ) { | 565 | if ( x == mTextQuote ) { |
562 | field += x; | 566 | field += x; |
563 | state = S_QUOTED_FIELD; | 567 | state = S_QUOTED_FIELD; |
564 | } else if ( x == mDelimiter || x == '\n' ) { | 568 | } else if ( QString(x) == mDelimiter || x == '\n' ) { |
565 | setText( row - mStartLine + 1, column, field ); | 569 | setText( row - mStartLine + 1, column, field ); |
566 | field = ""; | 570 | field = ""; |
567 | if ( x == '\n' ) { | 571 | if ( x == '\n' ) { |
568 | ++row; | 572 | ++row; |
@@ -577,9 +581,9 @@ void CSVImportDialog::fillTable() | |||
577 | state = S_END_OF_QUOTED_FIELD; | 581 | state = S_END_OF_QUOTED_FIELD; |
578 | } | 582 | } |
579 | break; | 583 | break; |
580 | case S_END_OF_QUOTED_FIELD : | 584 | case S_END_OF_QUOTED_FIELD : |
581 | if ( x == mDelimiter || x == '\n' ) { | 585 | if ( QString(x) == mDelimiter || x == '\n' ) { |
582 | setText( row - mStartLine + 1, column, field ); | 586 | setText( row - mStartLine + 1, column, field ); |
583 | field = ""; | 587 | field = ""; |
584 | if ( x == '\n' ) { | 588 | if ( x == '\n' ) { |
585 | ++row; | 589 | ++row; |
@@ -600,9 +604,9 @@ void CSVImportDialog::fillTable() | |||
600 | state = S_QUOTED_FIELD; | 604 | state = S_QUOTED_FIELD; |
601 | break; | 605 | break; |
602 | } | 606 | } |
603 | case S_NORMAL_FIELD : | 607 | case S_NORMAL_FIELD : |
604 | if ( x == mDelimiter || x == '\n' ) { | 608 | if ( QString(x) == mDelimiter || x == '\n' ) { |
605 | setText( row - mStartLine + 1, column, field ); | 609 | setText( row - mStartLine + 1, column, field ); |
606 | field = ""; | 610 | field = ""; |
607 | if ( x == '\n' ) { | 611 | if ( x == '\n' ) { |
608 | ++row; | 612 | ++row; |
@@ -616,9 +620,9 @@ void CSVImportDialog::fillTable() | |||
616 | } else { | 620 | } else { |
617 | field += x; | 621 | field += x; |
618 | } | 622 | } |
619 | } | 623 | } |
620 | if ( x != mDelimiter ) | 624 | if ( QString(x) != mDelimiter ) |
621 | lastCharDelimiter = false; | 625 | lastCharDelimiter = false; |
622 | 626 | ||
623 | if ( column > maxColumn ) | 627 | if ( column > maxColumn ) |
624 | maxColumn = column; | 628 | maxColumn = column; |
@@ -648,9 +652,9 @@ void CSVImportDialog::fillTable() | |||
648 | 652 | ||
649 | for ( column = 0; column < mTable->numCols(); ++column ) { | 653 | for ( column = 0; column < mTable->numCols(); ++column ) { |
650 | 654 | ||
651 | //US QComboTableItem *item = new QComboTableItem( mTable, mTypeMap.keys() ); | 655 | //US QComboTableItem *item = new QComboTableItem( mTable, mTypeMap.keys() ); |
652 | QComboTableItem *item = new QComboTableItem( mTable, keys ); | 656 | Q3ComboTableItem *item = new Q3ComboTableItem( mTable, keys ); |
653 | mTable->setItem( 0, column, item ); | 657 | mTable->setItem( 0, column, item ); |
654 | if ( column < mTypeStore.count() ) | 658 | if ( column < mTypeStore.count() ) |
655 | item->setCurrentItem( mTypeStore[ column ] ); | 659 | item->setCurrentItem( mTypeStore[ column ] ); |
656 | else | 660 | else |
@@ -763,9 +767,9 @@ void CSVImportDialog::slotOk() | |||
763 | { | 767 | { |
764 | bool assigned = false; | 768 | bool assigned = false; |
765 | 769 | ||
766 | for ( int column = 0; column < mTable->numCols(); ++column ) { | 770 | for ( int column = 0; column < mTable->numCols(); ++column ) { |
767 | QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0, | 771 | Q3ComboTableItem *item = static_cast<Q3ComboTableItem*>( mTable->item( 0, |
768 | column ) ); | 772 | column ) ); |
769 | if ( item && posToType( item->currentItem() ) != Undefined ) | 773 | if ( item && posToType( item->currentItem() ) != Undefined ) |
770 | assigned = true; | 774 | assigned = true; |
771 | } | 775 | } |
@@ -835,9 +839,9 @@ void CSVImportDialog::applyTemplate() | |||
835 | 839 | ||
836 | // apply the column map | 840 | // apply the column map |
837 | for ( uint column = 0; column < columnMap.count(); ++column ) { | 841 | for ( uint column = 0; column < columnMap.count(); ++column ) { |
838 | int type = columnMap[ column ]; | 842 | int type = columnMap[ column ]; |
839 | QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0, | 843 | Q3ComboTableItem *item = static_cast<Q3ComboTableItem*>( mTable->item( 0, |
840 | column ) ); | 844 | column ) ); |
841 | if ( item ) | 845 | if ( item ) |
842 | item->setCurrentItem( typeToPos( type ) ); | 846 | item->setCurrentItem( typeToPos( type ) ); |
843 | } | 847 | } |
@@ -877,9 +881,9 @@ void CSVImportDialog::saveTemplate() | |||
877 | 881 | ||
878 | config.setGroup( "csv column map" ); | 882 | config.setGroup( "csv column map" ); |
879 | 883 | ||
880 | for ( uint column = 0; column < mTable->numCols(); ++column ) { | 884 | for ( uint column = 0; column < mTable->numCols(); ++column ) { |
881 | QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0, | 885 | Q3ComboTableItem *item = static_cast<Q3ComboTableItem*>( mTable->item( 0, |
882 | column ) ); | 886 | column ) ); |
883 | if ( item ) | 887 | if ( item ) |
884 | config.writeEntry( QString::number( column ), posToType( | 888 | config.writeEntry( QString::number( column ), posToType( |
885 | item->currentItem() ) ); | 889 | item->currentItem() ) ); |
@@ -933,9 +937,9 @@ void CSVImportDialog::setFile( const QString &fileName ) | |||
933 | if ( fileName.isEmpty() ) | 937 | if ( fileName.isEmpty() ) |
934 | return; | 938 | return; |
935 | 939 | ||
936 | QFile file( fileName ); | 940 | QFile file( fileName ); |
937 | if ( !file.open( IO_ReadOnly ) ) { | 941 | if ( !file.open( QIODevice::ReadOnly ) ) { |
938 | KMessageBox::sorry( this, i18n( "Cannot open input file!" ) ); | 942 | KMessageBox::sorry( this, i18n( "Cannot open input file!" ) ); |
939 | file.close(); | 943 | file.close(); |
940 | return; | 944 | return; |
941 | } | 945 | } |
@@ -963,7 +967,7 @@ void CSVImportDialog::urlChanged( const QString &file ) | |||
963 | findButton( User2 )->setEnabled( state ); | 967 | findButton( User2 )->setEnabled( state ); |
964 | 968 | ||
965 | } | 969 | } |
966 | 970 | ||
967 | #ifndef KAB_EMBEDDED | 971 | #ifndef KAB_EMBEDDED_ |
968 | #include <csvimportdialog.moc> | 972 | #include <moc_csvimportdialog.cpp> |
969 | #endif //KAB_EMBEDDED | 973 | #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 | |||
@@ -32,19 +32,19 @@ $Id$ | |||
32 | #include <kabc/addressbook.h> | 32 | #include <kabc/addressbook.h> |
33 | #include <kabc/addresseelist.h> | 33 | #include <kabc/addresseelist.h> |
34 | #include <kdialogbase.h> | 34 | #include <kdialogbase.h> |
35 | 35 | ||
36 | #include <qvaluelist.h> | 36 | #include <q3valuelist.h> |
37 | 37 | ||
38 | class KURLRequester; | 38 | class KURLRequester; |
39 | 39 | ||
40 | class QButtonGroup; | 40 | class Q3ButtonGroup; |
41 | class QComboBox; | 41 | class QComboBox; |
42 | class QCheckBox; | 42 | class QCheckBox; |
43 | class QLineEdit; | 43 | class QLineEdit; |
44 | class QPushButton; | 44 | class QPushButton; |
45 | class QRadioButton; | 45 | class QRadioButton; |
46 | class QTable; | 46 | class Q3Table; |
47 | 47 | ||
48 | class CSVImportDialog : public KDialogBase | 48 | class CSVImportDialog : public KDialogBase |
49 | { | 49 | { |
50 | Q_OBJECT | 50 | Q_OBJECT |
@@ -84,10 +84,10 @@ class CSVImportDialog : public KDialogBase | |||
84 | HomePhone, BusinessPhone, MobilePhone, HomeFax, BusinessFax, MobileWorkPhone, | 84 | HomePhone, BusinessPhone, MobilePhone, HomeFax, BusinessFax, MobileWorkPhone, |
85 | Isdn, Pager, Email, Mailer, Title, Role, Organization, Note, URL, Categories | 85 | Isdn, Pager, Email, Mailer, Title, Role, Organization, Note, URL, Categories |
86 | }; | 86 | }; |
87 | 87 | ||
88 | QTable* mTable; | 88 | Q3Table* mTable; |
89 | QButtonGroup* mDelimiterBox; | 89 | Q3ButtonGroup* mDelimiterBox; |
90 | QRadioButton* mRadioComma; | 90 | QRadioButton* mRadioComma; |
91 | QRadioButton* mRadioSemicolon; | 91 | QRadioButton* mRadioSemicolon; |
92 | QRadioButton* mRadioTab; | 92 | QRadioButton* mRadioTab; |
93 | QRadioButton* mRadioSpace; | 93 | QRadioButton* mRadioSpace; |
@@ -118,9 +118,9 @@ class CSVImportDialog : public KDialogBase | |||
118 | QMap<QString, uint> mTypeMap; | 118 | QMap<QString, uint> mTypeMap; |
119 | KABC::AddressBook *mAddressBook; | 119 | KABC::AddressBook *mAddressBook; |
120 | int mCustomCounter; | 120 | int mCustomCounter; |
121 | bool mClearTypeStore; | 121 | bool mClearTypeStore; |
122 | QValueList<int> mTypeStore; | 122 | Q3ValueList<int> mTypeStore; |
123 | 123 | ||
124 | }; | 124 | }; |
125 | 125 | ||
126 | #endif | 126 | #endif |
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 | |||
@@ -115,7 +115,7 @@ KABC::AddresseeList KDE2XXPort::importContacts( const QString& ) const | |||
115 | 115 | ||
116 | return KABC::AddresseeList(); | 116 | return KABC::AddresseeList(); |
117 | } | 117 | } |
118 | 118 | ||
119 | #ifndef KAB_EMBEDDED | 119 | #ifndef KAB_EMBEDDED_ |
120 | #include "kde2_xxport.moc" | 120 | #include "moc_kde2_xxport.cpp" |
121 | #endif //KAB_EMBEDDED | 121 | #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 | |||
@@ -28,10 +28,12 @@ | |||
28 | $Id$ | 28 | $Id$ |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <qfile.h> | 31 | #include <qfile.h> |
32 | #include <qtextstream.h> | 32 | #include <q3textstream.h> |
33 | #include <qfileinfo.h> | 33 | #include <qfileinfo.h> |
34 | //Added by qt3to4: | ||
35 | #include <Q3CString> | ||
34 | 36 | ||
35 | #include <kabc/vcardconverter.h> | 37 | #include <kabc/vcardconverter.h> |
36 | #include <kabc/vcardparser/vcardtool.h> | 38 | #include <kabc/vcardparser/vcardtool.h> |
37 | #include <kfiledialog.h> | 39 | #include <kfiledialog.h> |
@@ -101,16 +103,16 @@ bool VCardXXPort::exportContacts( const KABC::AddresseeList &list, const QString | |||
101 | if ( fileName.isEmpty() ) | 103 | if ( fileName.isEmpty() ) |
102 | return false; | 104 | return false; |
103 | 105 | ||
104 | QFile outFile( fileName ); | 106 | QFile outFile( fileName ); |
105 | if ( !outFile.open( IO_WriteOnly ) ) { | 107 | if ( !outFile.open( QIODevice::WriteOnly ) ) { |
106 | QString text = i18n( "<qt>Unable to open file <b>%1</b> for export.</qt>" ); | 108 | QString text = i18n( "<qt>Unable to open file <b>%1</b> for export.</qt>" ); |
107 | KMessageBox::error( parentWidget(), text.arg( fileName ) ); | 109 | KMessageBox::error( parentWidget(), text.arg( fileName ) ); |
108 | return false; | 110 | return false; |
109 | } | 111 | } |
110 | 112 | ||
111 | QTextStream t( &outFile ); | 113 | Q3TextStream t( &outFile ); |
112 | t.setEncoding( QTextStream::UnicodeUTF8 ); | 114 | t.setEncoding( Q3TextStream::UnicodeUTF8 ); |
113 | 115 | ||
114 | KABC::Addressee::List::ConstIterator it; | 116 | KABC::Addressee::List::ConstIterator it; |
115 | for ( it = list.begin(); it != list.end(); ++it ) { | 117 | for ( it = list.begin(); it != list.end(); ++it ) { |
116 | KABC::VCardConverter converter; | 118 | KABC::VCardConverter converter; |
@@ -152,9 +154,9 @@ KABC::AddresseeList VCardXXPort::importContacts( const QString& ) const | |||
152 | QString caption( i18n( "vCard Import Failed" ) ); | 154 | QString caption( i18n( "vCard Import Failed" ) ); |
153 | if ( KIO::NetAccess::download( url, fileName ) ) { | 155 | if ( KIO::NetAccess::download( url, fileName ) ) { |
154 | QFile file( fileName ); | 156 | QFile file( fileName ); |
155 | 157 | ||
156 | file.open( IO_ReadOnly ); | 158 | file.open( QIODevice::ReadOnly ); |
157 | QByteArray rawData = file.readAll(); | 159 | QByteArray rawData = file.readAll(); |
158 | file.close(); | 160 | file.close(); |
159 | 161 | ||
160 | QString data = QString::fromUtf8( rawData.data(), rawData.size() + 1 ); | 162 | QString data = QString::fromUtf8( rawData.data(), rawData.size() + 1 ); |
@@ -195,10 +197,10 @@ KABC::AddresseeList VCardXXPort::importContacts( const QString& ) const | |||
195 | return addrList; | 197 | return addrList; |
196 | 198 | ||
197 | } | 199 | } |
198 | QFile file( fileName ); | 200 | QFile file( fileName ); |
199 | if ( file.open( IO_ReadOnly ) ) { | 201 | if ( file.open( QIODevice::ReadOnly ) ) { |
200 | QCString rawData ( file.readAll().data(),file.size()+1); | 202 | Q3CString rawData ( file.readAll().data(),file.size()+1); |
201 | file.close(); | 203 | file.close(); |
202 | int start = 0; | 204 | int start = 0; |
203 | #ifndef DESKTOP_VERSION | 205 | #ifndef DESKTOP_VERSION |
204 | while ( start < rawData.size()-2 ) { | 206 | while ( start < rawData.size()-2 ) { |
@@ -266,7 +268,7 @@ KABC::AddresseeList VCardXXPort::parseVCard( const QString &data ) const | |||
266 | return addrList; | 268 | return addrList; |
267 | } | 269 | } |
268 | 270 | ||
269 | 271 | ||
270 | #ifndef KAB_EMBEDDED | 272 | #ifndef KAB_EMBEDDED_ |
271 | #include "vcard_xxport.moc" | 273 | #include "moc_vcard_xxport.cpp" |
272 | #endif //KAB_EMBEDDED | 274 | #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 | |||
@@ -29,8 +29,10 @@ $Id$ | |||
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <qlayout.h> | 31 | #include <qlayout.h> |
32 | #include <qlist.h> | 32 | #include <qlist.h> |
33 | //Added by qt3to4: | ||
34 | #include <Q3VBoxLayout> | ||
33 | 35 | ||
34 | #include <kabc/addressbook.h> | 36 | #include <kabc/addressbook.h> |
35 | #include <kabc/resource.h> | 37 | #include <kabc/resource.h> |
36 | #include <kdebug.h> | 38 | #include <kdebug.h> |
@@ -216,20 +218,18 @@ void XXPortManager::loadPlugins() | |||
216 | continue; | 218 | continue; |
217 | } | 219 | } |
218 | 220 | ||
219 | #else //KAB_EMBEDDED | 221 | #else //KAB_EMBEDDED |
220 | QList<XXPortFactory> factorylist; | 222 | QList<XXPortFactory*> factorylist; |
221 | factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_csv_xxport())); | 223 | factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_csv_xxport())); |
222 | factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_kde2_xxport())); | 224 | factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_kde2_xxport())); |
223 | factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_vcard_xxport())); | 225 | factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_vcard_xxport())); |
224 | //US factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_opie_xxport())); | 226 | //US factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_opie_xxport())); |
225 | factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_qtopia_xxport())); | 227 | factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_qtopia_xxport())); |
226 | factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_sharpdtm_xxport())); | 228 | factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_sharpdtm_xxport())); |
227 | 229 | ||
228 | QListIterator<XXPortFactory> it(factorylist); | 230 | for(QList<XXPortFactory*>::iterator it=factorylist.begin();it!=factorylist.end();++it) { |
229 | for ( ; it.current(); ++it ) | 231 | XXPortFactory *xxportFactory = *it; |
230 | { | ||
231 | XXPortFactory *xxportFactory = it.current(); | ||
232 | #endif //KAB_EMBEDDED | 232 | #endif //KAB_EMBEDDED |
233 | 233 | ||
234 | XXPortObject *obj = xxportFactory->xxportObject( mCore->addressBook(), mCore ); | 234 | XXPortObject *obj = xxportFactory->xxportObject( mCore->addressBook(), mCore ); |
235 | if ( obj ) { | 235 | if ( obj ) { |
@@ -249,9 +249,9 @@ PreviewDialog::PreviewDialog( const KABC::Addressee &addr, QWidget *parent, | |||
249 | : KDialogBase( Plain, i18n( "Import this contact?" ), Ok | User1| User2, Ok, parent, | 249 | : KDialogBase( Plain, i18n( "Import this contact?" ), Ok | User1| User2, Ok, parent, |
250 | name, true, true ,i18n( "Import all!" ),i18n( "No" ) ) | 250 | name, true, true ,i18n( "Import all!" ),i18n( "No" ) ) |
251 | { | 251 | { |
252 | QWidget *page = plainPage(); | 252 | QWidget *page = plainPage(); |
253 | QVBoxLayout *layout = new QVBoxLayout( page, marginHint(), spacingHint() ); | 253 | Q3VBoxLayout *layout = new Q3VBoxLayout( page, marginHint(), spacingHint() ); |
254 | connect( this, SIGNAL( user1Clicked() ), this, SLOT ( slotClose() ) ); | 254 | connect( this, SIGNAL( user1Clicked() ), this, SLOT ( slotClose() ) ); |
255 | connect( this, SIGNAL( user2Clicked() ), this, SLOT ( slotCancel() ) ); | 255 | connect( this, SIGNAL( user2Clicked() ), this, SLOT ( slotCancel() ) ); |
256 | 256 | ||
257 | KABC::AddresseeView *view = new KABC::AddresseeView( page ); | 257 | KABC::AddresseeView *view = new KABC::AddresseeView( page ); |
@@ -263,8 +263,7 @@ PreviewDialog::PreviewDialog( const KABC::Addressee &addr, QWidget *parent, | |||
263 | showMaximized(); | 263 | showMaximized(); |
264 | #endif | 264 | #endif |
265 | } | 265 | } |
266 | 266 | ||
267 | #ifndef KAB_EMBEDDED | 267 | #ifndef KAB_EMBEDDED_ |
268 | #include "xxportmanager.moc" | 268 | #include "moc_xxportmanager.cpp" |
269 | #endif //KAB_EMBEDDED | 269 | #endif //KAB_EMBEDDED |
270 | |||
diff --git a/kaddressbook/xxportmanager.h b/kaddressbook/xxportmanager.h index e801d9b..0528922 100644 --- a/kaddressbook/xxportmanager.h +++ b/kaddressbook/xxportmanager.h | |||
@@ -31,9 +31,9 @@ $Id$ | |||
31 | 31 | ||
32 | #ifndef XXPORTMANAGER_H | 32 | #ifndef XXPORTMANAGER_H |
33 | #define XXPORTMANAGER_H | 33 | #define XXPORTMANAGER_H |
34 | 34 | ||
35 | #include <qdict.h> | 35 | #include <q3dict.h> |
36 | #include <qobject.h> | 36 | #include <qobject.h> |
37 | 37 | ||
38 | #include <kurl.h> | 38 | #include <kurl.h> |
39 | 39 | ||
@@ -70,9 +70,9 @@ class XXPortManager : public QObject | |||
70 | 70 | ||
71 | private: | 71 | private: |
72 | void loadPlugins(); | 72 | void loadPlugins(); |
73 | 73 | ||
74 | QDict<XXPortObject> mXXPortObjects; | 74 | Q3Dict<XXPortObject> mXXPortObjects; |
75 | 75 | ||
76 | KABCore *mCore; | 76 | KABCore *mCore; |
77 | bool mShowPreview; | 77 | bool mShowPreview; |
78 | }; | 78 | }; |
diff --git a/kaddressbook/xxportobject.cpp b/kaddressbook/xxportobject.cpp index bd9d986..2d8d0ff 100644 --- a/kaddressbook/xxportobject.cpp +++ b/kaddressbook/xxportobject.cpp | |||
@@ -270,7 +270,7 @@ KABC::AddresseeList XXPortResourceObject::_importContacts( const QString& identi | |||
270 | } | 270 | } |
271 | 271 | ||
272 | 272 | ||
273 | 273 | ||
274 | #ifndef KAB_EMBEDDED | 274 | #ifndef KAB_EMBEDDED_ |
275 | #include "xxportobject.moc" | 275 | #include "moc_xxportobject.cpp" |
276 | #endif //KAB_EMBEDDED | 276 | #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 | |||
@@ -35,18 +35,23 @@ $Id$ | |||
35 | #include <klocale.h> | 35 | #include <klocale.h> |
36 | #include <kglobal.h> | 36 | #include <kglobal.h> |
37 | 37 | ||
38 | #include <qapplication.h> | 38 | #include <qapplication.h> |
39 | #include <qbuttongroup.h> | 39 | #include <QDesktopWidget> |
40 | #include <q3buttongroup.h> | ||
40 | #include <qcombobox.h> | 41 | #include <qcombobox.h> |
41 | #include <qheader.h> | 42 | #include <q3header.h> |
42 | #include <qlabel.h> | 43 | #include <qlabel.h> |
43 | #include <qlayout.h> | 44 | #include <qlayout.h> |
44 | #include <qlistview.h> | 45 | #include <q3listview.h> |
45 | #include <qpushbutton.h> | 46 | #include <qpushbutton.h> |
46 | #include <qradiobutton.h> | 47 | #include <qradiobutton.h> |
47 | #include <qstringlist.h> | 48 | #include <qstringlist.h> |
48 | #include <qwhatsthis.h> | 49 | #include <q3whatsthis.h> |
50 | //Added by qt3to4: | ||
51 | #include <Q3GridLayout> | ||
52 | #include <Q3Frame> | ||
53 | #include <Q3VBoxLayout> | ||
49 | 54 | ||
50 | #include "kabcore.h" | 55 | #include "kabcore.h" |
51 | #include "kabprefs.h" | 56 | #include "kabprefs.h" |
52 | 57 | ||
@@ -61,10 +66,10 @@ XXPortSelectDialog::XXPortSelectDialog( KABCore *core, bool sort, | |||
61 | initGUI(); | 66 | initGUI(); |
62 | 67 | ||
63 | connect( mFiltersCombo, SIGNAL( activated( int ) ), | 68 | connect( mFiltersCombo, SIGNAL( activated( int ) ), |
64 | SLOT( filterChanged( int ) ) ); | 69 | SLOT( filterChanged( int ) ) ); |
65 | connect( mCategoriesView, SIGNAL( clicked( QListViewItem* ) ), | 70 | connect( mCategoriesView, SIGNAL( clicked( Q3ListViewItem* ) ), |
66 | SLOT( categoryClicked( QListViewItem* ) ) ); | 71 | SLOT( categoryClicked( Q3ListViewItem* ) ) ); |
67 | 72 | ||
68 | // setup filters | 73 | // setup filters |
69 | #ifndef KAB_EMBEDDED | 74 | #ifndef KAB_EMBEDDED |
70 | mFilters = Filter::restore( kapp->config(), "Filter" ); | 75 | mFilters = Filter::restore( kapp->config(), "Filter" ); |
@@ -83,9 +88,9 @@ XXPortSelectDialog::XXPortSelectDialog( KABCore *core, bool sort, | |||
83 | // setup categories | 88 | // setup categories |
84 | QStringList categories = KABPrefs::instance()->mCustomCategories; | 89 | QStringList categories = KABPrefs::instance()->mCustomCategories; |
85 | QStringList::Iterator it; | 90 | QStringList::Iterator it; |
86 | for ( it = categories.begin(); it != categories.end(); ++it ) | 91 | for ( it = categories.begin(); it != categories.end(); ++it ) |
87 | new QCheckListItem( mCategoriesView, *it, QCheckListItem::CheckBox ); | 92 | new Q3CheckListItem( mCategoriesView, *it, Q3CheckListItem::CheckBox ); |
88 | mUseCategories->setEnabled( categories.count() > 0 ); | 93 | mUseCategories->setEnabled( categories.count() > 0 ); |
89 | 94 | ||
90 | int count = mCore->selectedUIDs().count(); | 95 | int count = mCore->selectedUIDs().count(); |
91 | mUseSelection->setEnabled( count != 0 ); | 96 | mUseSelection->setEnabled( count != 0 ); |
@@ -209,11 +214,11 @@ KABC::AddresseeList XXPortSelectDialog::contacts() | |||
209 | QStringList XXPortSelectDialog::categories() const | 214 | QStringList XXPortSelectDialog::categories() const |
210 | { | 215 | { |
211 | QStringList list; | 216 | QStringList list; |
212 | 217 | ||
213 | QListViewItemIterator it( mCategoriesView ); | 218 | Q3ListViewItemIterator it( mCategoriesView ); |
214 | for ( ; it.current(); ++it ) { | 219 | for ( ; it.current(); ++it ) { |
215 | QCheckListItem* qcli = static_cast<QCheckListItem*>(it.current()); | 220 | Q3CheckListItem* qcli = static_cast<Q3CheckListItem*>(it.current()); |
216 | if ( qcli->isOn() ) | 221 | if ( qcli->isOn() ) |
217 | list.append( it.current()->text( 0 ) ); | 222 | list.append( it.current()->text( 0 ) ); |
218 | } | 223 | } |
219 | 224 | ||
@@ -224,11 +229,11 @@ void XXPortSelectDialog::filterChanged( int ) | |||
224 | { | 229 | { |
225 | mUseFilters->setChecked( true ); | 230 | mUseFilters->setChecked( true ); |
226 | } | 231 | } |
227 | 232 | ||
228 | void XXPortSelectDialog::categoryClicked( QListViewItem *i ) | 233 | void XXPortSelectDialog::categoryClicked( Q3ListViewItem *i ) |
229 | { | 234 | { |
230 | QCheckListItem *qcli = static_cast<QCheckListItem*>( i ); | 235 | Q3CheckListItem *qcli = static_cast<Q3CheckListItem*>( i ); |
231 | if ( qcli->isOn() ) | 236 | if ( qcli->isOn() ) |
232 | mUseCategories->setChecked( true ); | 237 | mUseCategories->setChecked( true ); |
233 | } | 238 | } |
234 | 239 | ||
@@ -243,62 +248,62 @@ void XXPortSelectDialog::slotHelp() | |||
243 | } | 248 | } |
244 | 249 | ||
245 | void XXPortSelectDialog::initGUI() | 250 | void XXPortSelectDialog::initGUI() |
246 | { | 251 | { |
247 | QFrame *page = plainPage(); | 252 | Q3Frame *page = plainPage(); |
248 | 253 | ||
249 | QVBoxLayout *topLayout = new QVBoxLayout( page, KDialog::marginHintSmall(), | 254 | Q3VBoxLayout *topLayout = new Q3VBoxLayout( page, KDialog::marginHintSmall(), |
250 | KDialog::spacingHintSmall() ); | 255 | KDialog::spacingHintSmall() ); |
251 | 256 | ||
252 | QLabel *label = new QLabel( i18n( "Which contacts do you want to select?" ), page ); | 257 | QLabel *label = new QLabel( i18n( "Which contacts do you want to select?" ), page ); |
253 | topLayout->addWidget( label ); | 258 | topLayout->addWidget( label ); |
254 | 259 | ||
255 | mButtonGroup = new QButtonGroup( i18n( "Contact Selection" ), page ); | 260 | mButtonGroup = new Q3ButtonGroup( i18n( "Contact Selection" ), page ); |
256 | mButtonGroup->setColumnLayout( 0, Qt::Vertical ); | 261 | mButtonGroup->setColumnLayout( 0, Qt::Vertical ); |
257 | mButtonGroup->layout()->setSpacing( KDialog::spacingHint() ); | 262 | mButtonGroup->layout()->setSpacing( KDialog::spacingHint() ); |
258 | mButtonGroup->layout()->setMargin( KDialog::marginHint() ); | 263 | mButtonGroup->layout()->setMargin( KDialog::marginHint() ); |
259 | 264 | ||
260 | QGridLayout *groupLayout = new QGridLayout( mButtonGroup->layout() ); | 265 | Q3GridLayout *groupLayout = new Q3GridLayout( mButtonGroup->layout() ); |
261 | groupLayout->setAlignment( Qt::AlignTop ); | 266 | groupLayout->setAlignment( Qt::AlignTop ); |
262 | 267 | ||
263 | mUseWholeBook = new QRadioButton( i18n( "&All" ), mButtonGroup ); | 268 | mUseWholeBook = new QRadioButton( i18n( "&All" ), mButtonGroup ); |
264 | mUseWholeBook->setChecked( true ); | 269 | mUseWholeBook->setChecked( true ); |
265 | QWhatsThis::add( mUseWholeBook, i18n( "Select the entire address book" ) ); | 270 | Q3WhatsThis::add( mUseWholeBook, i18n( "Select the entire address book" ) ); |
266 | groupLayout->addWidget( mUseWholeBook, 0, 0 ); | 271 | groupLayout->addWidget( mUseWholeBook, 0, 0 ); |
267 | 272 | ||
268 | mUseSelection = new QRadioButton( i18n( "&Selected" ), mButtonGroup ); | 273 | mUseSelection = new QRadioButton( i18n( "&Selected" ), mButtonGroup ); |
269 | QWhatsThis::add( mUseSelection, i18n( "Only contacts selected in KAddressBook.\n" | 274 | Q3WhatsThis::add( mUseSelection, i18n( "Only contacts selected in KAddressBook.\n" |
270 | "This option is disabled if no contacts are selected." ) ); | 275 | "This option is disabled if no contacts are selected." ) ); |
271 | groupLayout->addWidget( mUseSelection, 1, 0 ); | 276 | groupLayout->addWidget( mUseSelection, 1, 0 ); |
272 | 277 | ||
273 | mUseFilters = new QRadioButton( i18n( "By matching &filter" ), mButtonGroup ); | 278 | mUseFilters = new QRadioButton( i18n( "By matching &filter" ), mButtonGroup ); |
274 | QWhatsThis::add( mUseFilters, i18n( "Only contacts matching the selected filter.\n" | 279 | Q3WhatsThis::add( mUseFilters, i18n( "Only contacts matching the selected filter.\n" |
275 | "This option is disabled if you haven't defined any filters" ) ); | 280 | "This option is disabled if you haven't defined any filters" ) ); |
276 | groupLayout->addWidget( mUseFilters, 2, 0 ); | 281 | groupLayout->addWidget( mUseFilters, 2, 0 ); |
277 | 282 | ||
278 | mUseCategories = new QRadioButton( i18n( "By Cate&gories" ), mButtonGroup ); | 283 | mUseCategories = new QRadioButton( i18n( "By Cate&gories" ), mButtonGroup ); |
279 | QWhatsThis::add( mUseCategories, i18n( "Only contacts who are members of a category that is checked on the list to the left.\n" | 284 | Q3WhatsThis::add( mUseCategories, i18n( "Only contacts who are members of a category that is checked on the list to the left.\n" |
280 | "This option is disabled if you have no categories." ) ); | 285 | "This option is disabled if you have no categories." ) ); |
281 | groupLayout->addWidget( mUseCategories, 3, 0 ); | 286 | groupLayout->addWidget( mUseCategories, 3, 0 ); |
282 | 287 | ||
283 | mFiltersCombo = new QComboBox( false, mButtonGroup ); | 288 | mFiltersCombo = new QComboBox( false, mButtonGroup ); |
284 | mFiltersCombo->setSizePolicy(QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) ); | 289 | mFiltersCombo->setSizePolicy(QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) ); |
285 | QWhatsThis::add( mFiltersCombo, i18n( "Select a filter to decide which contacts to select." ) ); | 290 | Q3WhatsThis::add( mFiltersCombo, i18n( "Select a filter to decide which contacts to select." ) ); |
286 | groupLayout->addWidget( mFiltersCombo, 2, 1 ); | 291 | groupLayout->addWidget( mFiltersCombo, 2, 1 ); |
287 | 292 | ||
288 | mCategoriesView = new QListView( mButtonGroup ); | 293 | mCategoriesView = new Q3ListView( mButtonGroup ); |
289 | mCategoriesView->addColumn( "" ); | 294 | mCategoriesView->addColumn( "" ); |
290 | mCategoriesView->header()->hide(); | 295 | mCategoriesView->header()->hide(); |
291 | QWhatsThis::add( mCategoriesView, i18n( "Check the categories whose members you want to select." ) ); | 296 | Q3WhatsThis::add( mCategoriesView, i18n( "Check the categories whose members you want to select." ) ); |
292 | groupLayout->addWidget( mCategoriesView, 3, 1 ); | 297 | groupLayout->addWidget( mCategoriesView, 3, 1 ); |
293 | mCategoriesView->setSizePolicy(QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); | 298 | mCategoriesView->setSizePolicy(QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); |
294 | //if (QApplication::desktop()->height() == 480 ) | 299 | //if (QApplication::desktop()->height() == 480 ) |
295 | // mCategoriesView->setMaximumHeight( 240 ); | 300 | // mCategoriesView->setMaximumHeight( 240 ); |
296 | topLayout->addWidget( mButtonGroup ); | 301 | topLayout->addWidget( mButtonGroup ); |
297 | 302 | ||
298 | QButtonGroup *sortingGroup = new QButtonGroup( i18n( "Sorting" ), page ); | 303 | Q3ButtonGroup *sortingGroup = new Q3ButtonGroup( i18n( "Sorting" ), page ); |
299 | sortingGroup->setColumnLayout( 0, Qt::Vertical ); | 304 | sortingGroup->setColumnLayout( 0, Qt::Vertical ); |
300 | QGridLayout *sortLayout = new QGridLayout( sortingGroup->layout(), 2, 2, | 305 | Q3GridLayout *sortLayout = new Q3GridLayout( sortingGroup->layout(), 2, 2, |
301 | KDialog::spacingHint() ); | 306 | KDialog::spacingHint() ); |
302 | sortLayout->setAlignment( Qt::AlignTop ); | 307 | sortLayout->setAlignment( Qt::AlignTop ); |
303 | 308 | ||
304 | label = new QLabel( i18n( "Criterion:" ), sortingGroup ); | 309 | label = new QLabel( i18n( "Criterion:" ), sortingGroup ); |
@@ -334,9 +339,7 @@ void XXPortSelectDialog::initGUI() | |||
334 | #endif | 339 | #endif |
335 | } | 340 | } |
336 | } | 341 | } |
337 | 342 | ||
338 | #ifndef KAB_EMBEDDED | 343 | #ifndef KAB_EMBEDDED_ |
339 | #include "xxportselectdialog.moc" | 344 | #include "moc_xxportselectdialog.cpp" |
340 | #endif //KAB_EMBEDDED | 345 | #endif //KAB_EMBEDDED |
341 | |||
342 | |||
diff --git a/kaddressbook/xxportselectdialog.h b/kaddressbook/xxportselectdialog.h index 28b1fef..208f4f9 100644 --- a/kaddressbook/xxportselectdialog.h +++ b/kaddressbook/xxportselectdialog.h | |||
@@ -29,12 +29,12 @@ | |||
29 | #include <kdialogbase.h> | 29 | #include <kdialogbase.h> |
30 | 30 | ||
31 | #include "filter.h" | 31 | #include "filter.h" |
32 | 32 | ||
33 | class QButtonGroup; | 33 | class Q3ButtonGroup; |
34 | class QComboBox; | 34 | class QComboBox; |
35 | class QListView; | 35 | class Q3ListView; |
36 | class QListViewItem; | 36 | class Q3ListViewItem; |
37 | class QRadioButton; | 37 | class QRadioButton; |
38 | 38 | ||
39 | class KABCore; | 39 | class KABCore; |
40 | class KComboBox; | 40 | class KComboBox; |
@@ -52,24 +52,24 @@ class XXPortSelectDialog : public KDialogBase | |||
52 | QStringList uids(); | 52 | QStringList uids(); |
53 | 53 | ||
54 | private slots: | 54 | private slots: |
55 | void filterChanged( int ); | 55 | void filterChanged( int ); |
56 | void categoryClicked( QListViewItem * i ); | 56 | void categoryClicked( Q3ListViewItem * i ); |
57 | 57 | ||
58 | protected slots: | 58 | protected slots: |
59 | void slotHelp(); | 59 | void slotHelp(); |
60 | 60 | ||
61 | private: | 61 | private: |
62 | void initGUI(); | 62 | void initGUI(); |
63 | QStringList categories() const; | 63 | QStringList categories() const; |
64 | 64 | ||
65 | QButtonGroup* mButtonGroup; | 65 | Q3ButtonGroup* mButtonGroup; |
66 | QRadioButton* mUseCategories; | 66 | QRadioButton* mUseCategories; |
67 | QRadioButton* mUseFilters; | 67 | QRadioButton* mUseFilters; |
68 | QRadioButton* mUseWholeBook; | 68 | QRadioButton* mUseWholeBook; |
69 | QRadioButton* mUseSelection; | 69 | QRadioButton* mUseSelection; |
70 | QComboBox* mFiltersCombo; | 70 | QComboBox* mFiltersCombo; |
71 | QListView* mCategoriesView; | 71 | Q3ListView* mCategoriesView; |
72 | 72 | ||
73 | KComboBox *mFieldCombo; | 73 | KComboBox *mFieldCombo; |
74 | KComboBox *mSortTypeCombo; | 74 | KComboBox *mSortTypeCombo; |
75 | 75 | ||