summaryrefslogtreecommitdiffabout
path: root/kaddressbook/imagewidget.cpp
authorMichael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
committer Michael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
commita08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (side-by-side diff)
tree8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kaddressbook/imagewidget.cpp
parent11edc920afe4f274c0964436633aa632c8288a40 (diff)
downloadkdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2
initial public commit of qt4 portp1
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
@@ -37,23 +37,27 @@
#include <kurl.h>
#include <qcheckbox.h>
-#include <qgroupbox.h>
+#include <q3groupbox.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qpixmap.h>
#include <qpushbutton.h>
#include <qapplication.h>
+#include <QDesktopWidget>
+//Added by qt3to4:
+#include <Q3GridLayout>
+#include <Q3Frame>
#include "imagewidget.h"
ImageWidget::ImageWidget( QWidget *parent, const char *name )
: QWidget( parent, name )
{
- QGridLayout *topLayout = new QGridLayout( this, 2, 1, KDialog::marginHint(),
+ Q3GridLayout *topLayout = new Q3GridLayout( this, 2, 1, KDialog::marginHint(),
KDialog::spacingHint() );
- QGroupBox *photoBox = new QGroupBox( 0, Qt::Vertical, i18n( "Photo" ), this );
- QGridLayout *boxLayout = new QGridLayout( photoBox->layout(), 3, 2,
+ Q3GroupBox *photoBox = new Q3GroupBox( 0, Qt::Vertical, i18n( "Photo" ), this );
+ Q3GridLayout *boxLayout = new Q3GridLayout( photoBox->layout(), 3, 2,
KDialog::spacingHint() );
boxLayout->setRowStretch( 2, 1 );
@@ -63,7 +67,7 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name )
fac = 6;
mPhotoLabel->setFixedSize( 50*9/fac, 70*9/fac );
mPhotoLabel->setScaledContents( true );
- mPhotoLabel->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ mPhotoLabel->setFrameStyle( Q3Frame::Panel | Q3Frame::Sunken );
boxLayout->addMultiCellWidget( mPhotoLabel, 0, 3, 0, 0 );
mPhotoUrl = new KURLRequester( photoBox );
@@ -75,7 +79,7 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name )
boxLayout->addWidget( mPhotoUrl, 0, 1 );
- QHBox *hb1 = new QHBox ( photoBox );
+ Q3HBox *hb1 = new Q3HBox ( photoBox );
mUsePhotoUrl = new QCheckBox( i18n( "Store as URL" ), hb1 );
mUsePhotoUrl->setEnabled( false );
boxLayout->addWidget( hb1, 1, 1 );
@@ -86,14 +90,14 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name )
topLayout->addWidget( photoBox, 0, 0 );
- QGroupBox *logoBox = new QGroupBox( 0, Qt::Vertical, i18n( "Logo" ), this );
- boxLayout = new QGridLayout( logoBox->layout(), 3, 2, KDialog::spacingHint() );
+ Q3GroupBox *logoBox = new Q3GroupBox( 0, Qt::Vertical, i18n( "Logo" ), this );
+ boxLayout = new Q3GridLayout( logoBox->layout(), 3, 2, KDialog::spacingHint() );
boxLayout->setRowStretch( 2, 1 );
mLogoLabel = new QLabel( logoBox );
mLogoLabel->setFixedSize( 50*9/fac, 70*9/fac );
mLogoLabel->setScaledContents( true );
- mLogoLabel->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ mLogoLabel->setFrameStyle( Q3Frame::Panel | Q3Frame::Sunken );
boxLayout->addMultiCellWidget( mLogoLabel, 0, 3, 0, 0 );
mLogoUrl = new KURLRequester( logoBox );
@@ -104,7 +108,7 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name )
#endif //KAB_EMBEDDED
boxLayout->addWidget( mLogoUrl, 0, 1 );
- QHBox *hb2 = new QHBox ( logoBox );
+ Q3HBox *hb2 = new Q3HBox ( logoBox );
mUseLogoUrl = new QCheckBox( i18n( "Store as URL" ), hb2 );
mUseLogoUrl->setEnabled( false );
boxLayout->addWidget( hb2, 1, 1 );
@@ -180,7 +184,7 @@ KABC::Picture ImageWidget::photo() const
if ( mUsePhotoUrl->isChecked() )
photo.setUrl( mPhotoUrl->url() );
else {
- QPixmap *px = mPhotoLabel->pixmap();
+ const QPixmap *px = mPhotoLabel->pixmap();
if ( px ) {
#ifndef KAB_EMBEDDED
if ( px->height() > px->width() )
@@ -232,7 +236,7 @@ KABC::Picture ImageWidget::logo() const
if ( mUseLogoUrl->isChecked() )
logo.setUrl( mLogoUrl->url() );
else {
- QPixmap *px = mLogoLabel->pixmap();
+ const QPixmap *px = mLogoLabel->pixmap();
if ( px ) {
#ifndef KAB_EMBEDDED
if ( px->height() > px->width() )
@@ -292,6 +296,6 @@ QPixmap ImageWidget::loadPixmap( const QString &url )
return pixmap;
}
-#ifndef KAB_EMBEDDED
-#include "imagewidget.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_imagewidget.cpp"
#endif //KAB_EMBEDDED