summaryrefslogtreecommitdiffabout
path: root/kaddressbook/imagewidget.cpp
Unidiff
Diffstat (limited to 'kaddressbook/imagewidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/imagewidget.cpp32
1 files changed, 18 insertions, 14 deletions
diff --git a/kaddressbook/imagewidget.cpp b/kaddressbook/imagewidget.cpp
index eec5e08..6ecf66d 100644
--- a/kaddressbook/imagewidget.cpp
+++ b/kaddressbook/imagewidget.cpp
@@ -38,5 +38,5 @@
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>
@@ -44,4 +44,8 @@
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"
@@ -50,9 +54,9 @@ 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 );
@@ -64,5 +68,5 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name )
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
@@ -76,5 +80,5 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name )
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 );
@@ -87,6 +91,6 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name )
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
@@ -94,5 +98,5 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name )
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
@@ -105,5 +109,5 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name )
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 );
@@ -181,5 +185,5 @@ KABC::Picture ImageWidget::photo() const
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
@@ -233,5 +237,5 @@ KABC::Picture ImageWidget::logo() const
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
@@ -293,5 +297,5 @@ QPixmap ImageWidget::loadPixmap( const QString &url )
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