summaryrefslogtreecommitdiffabout
path: root/kabc/addresseeview.cpp
Side-by-side diff
Diffstat (limited to 'kabc/addresseeview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addresseeview.cpp47
1 files changed, 26 insertions, 21 deletions
diff --git a/kabc/addresseeview.cpp b/kabc/addresseeview.cpp
index cde19a1..425e67c 100644
--- a/kabc/addresseeview.cpp
+++ b/kabc/addresseeview.cpp
@@ -28,8 +28,8 @@
#include <klocale.h>
//US #include <kstringhandler.h>
-#include <qscrollview.h>
+#include <q3scrollview.h>
#include <qregexp.h>
#include <qfile.h>
-#include <qvbox.h>
+#include <q3vbox.h>
#include <qlabel.h>
#include <qwidget.h>
@@ -38,11 +38,16 @@
#include <qpushbutton.h>
#ifdef DESKTOP_VERSION
-#include <qpaintdevicemetrics.h>
+#include <q3paintdevicemetrics.h>
#include <qprinter.h>
#include <qpainter.h>
#endif
+#include <QDesktopWidget>
-#include <qstylesheet.h>
+#include <q3stylesheet.h>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
+#include <QPixmap>
+#include <Q3VBoxLayout>
#include "externalapphandler.h"
#include <kabc/addresseeview.h>
@@ -60,5 +65,5 @@ bool AddresseeView::sFullDetailsMode = false;
AddresseeView::AddresseeView( QWidget *parent, const char *name )
- : QTextBrowser( parent, name )
+ : Q3TextBrowser( parent, name )
@@ -83,5 +88,5 @@ void AddresseeView::printMe()
QPainter p;
p.begin ( &printer );
- QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer );
+ Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer );
float dx, dy;
int wid = (m.width() * 9)/10;
@@ -403,5 +408,5 @@ void AddresseeView::setAddressee( const KABC::Addressee& mAddressee )
picString = "<img src=\"myimage\" width=\"50\" height=\"70\">";
if ( picAvailintern ) {
- QMimeSourceFactory::defaultFactory()->setImage( "myimage", picture.data() );
+ Q3MimeSourceFactory::defaultFactory()->setImage( "myimage", picture.data() );
int wid = picture.data().width();
int hei = picture.data().height();
@@ -419,5 +424,5 @@ void AddresseeView::setAddressee( const KABC::Addressee& mAddressee )
if ( picAvailUrl ) {
QPixmap picPix( picture.url() );
- QMimeSourceFactory::defaultFactory()->setPixmap( "myimage", picPix );
+ Q3MimeSourceFactory::defaultFactory()->setPixmap( "myimage", picPix );
int wid = picPix.width();
int hei = picPix.height();
@@ -436,5 +441,5 @@ void AddresseeView::setAddressee( const KABC::Addressee& mAddressee )
static bool setDefaultImageChildren = false;
if ( !setDefaultImageChildren ) {
- QMimeSourceFactory::defaultFactory()->setPixmap( "familyIcon", KGlobal::iconLoader()->loadIcon( "ic_kids", KIcon::Desktop, 128 ) );
+ Q3MimeSourceFactory::defaultFactory()->setPixmap( "familyIcon", KGlobal::iconLoader()->loadIcon( "ic_kids", KIcon::Desktop, 128 ) );
setDefaultImageChildren = true;
}
@@ -444,5 +449,5 @@ void AddresseeView::setAddressee( const KABC::Addressee& mAddressee )
static bool setDefaultImagepouses = false;
if ( !setDefaultImagepouses ) {
- QMimeSourceFactory::defaultFactory()->setPixmap( "SpousesIcon", KGlobal::iconLoader()->loadIcon( "ic_family", KIcon::Desktop, 128 ) );
+ Q3MimeSourceFactory::defaultFactory()->setPixmap( "SpousesIcon", KGlobal::iconLoader()->loadIcon( "ic_family", KIcon::Desktop, 128 ) );
setDefaultImagepouses = true;
}
@@ -453,5 +458,5 @@ void AddresseeView::setAddressee( const KABC::Addressee& mAddressee )
static bool setDefaultImageMale = false;
if ( !setDefaultImageMale ) {
- QMimeSourceFactory::defaultFactory()->setPixmap( "MaleIcon", KGlobal::iconLoader()->loadIcon( "ic_male", KIcon::Desktop, 128 ) );
+ Q3MimeSourceFactory::defaultFactory()->setPixmap( "MaleIcon", KGlobal::iconLoader()->loadIcon( "ic_male", KIcon::Desktop, 128 ) );
setDefaultImageMale = true;
}
@@ -461,5 +466,5 @@ void AddresseeView::setAddressee( const KABC::Addressee& mAddressee )
static bool setDefaultImageFemale = false;
if ( !setDefaultImageFemale ) {
- QMimeSourceFactory::defaultFactory()->setPixmap( "FemaleIcon", KGlobal::iconLoader()->loadIcon( "ic_female", KIcon::Desktop, 128 ) );
+ Q3MimeSourceFactory::defaultFactory()->setPixmap( "FemaleIcon", KGlobal::iconLoader()->loadIcon( "ic_female", KIcon::Desktop, 128 ) );
setDefaultImageFemale = true;
}
@@ -470,5 +475,5 @@ void AddresseeView::setAddressee( const KABC::Addressee& mAddressee )
if ( !setDefaultImage ) {
//qDebug("Setting default pixmap ");
- QMimeSourceFactory::defaultFactory()->setPixmap( "defaultIcon", KGlobal::iconLoader()->loadIcon( "ic_penguin", KIcon::Desktop, 128 ) );
+ Q3MimeSourceFactory::defaultFactory()->setPixmap( "defaultIcon", KGlobal::iconLoader()->loadIcon( "ic_penguin", KIcon::Desktop, 128 ) );
setDefaultImage = true;
}
@@ -654,5 +659,5 @@ void AddresseeView::addTag(const QString & tag,const QString & text)
if ( text.isEmpty() )
return;
- int number=text.contains("\n");
+ int number=text.count("\n");
QString str = "<" + tag + ">";
QString tmpText=text;
@@ -689,22 +694,22 @@ AddresseeChooser::AddresseeChooser( KABC::Addressee loc, KABC::Addressee rem, bo
QWidget* topframe = new QWidget( this );
setMainWidget( topframe );
- QBoxLayout* bl;
+ Q3BoxLayout* bl;
if ( QApplication::desktop()->width() < 640 ) {
- bl = new QVBoxLayout( topframe );
+ bl = new Q3VBoxLayout( topframe );
} else {
- bl = new QHBoxLayout( topframe );
+ bl = new Q3HBoxLayout( topframe );
}
- QVBox* subframe = new QVBox( topframe );
+ Q3VBox* subframe = new Q3VBox( topframe );
bl->addWidget(subframe );
QLabel* lab = new QLabel( i18n("Local Addressee"), subframe );
if ( takeloc )
- lab->setBackgroundColor(Qt::green.light() );
+ lab->setBackgroundColor(QColor(Qt::green).light() );
AddresseeView * av = new AddresseeView( subframe );
av->setAddressee( loc );
- subframe = new QVBox( topframe );
+ subframe = new Q3VBox( topframe );
bl->addWidget(subframe );
lab = new QLabel( i18n("Remote Addressee"), subframe );
if ( !takeloc )
- lab->setBackgroundColor(Qt::green.light() );
+ lab->setBackgroundColor(QColor(Qt::green).light() );
av = new AddresseeView( subframe );
av->setAddressee( rem );