From kde-commits Wed Aug 25 14:32:50 2004 From: Antonio Larrosa Jimenez Date: Wed, 25 Aug 2004 14:32:50 +0000 To: kde-commits Subject: kdepim Message-Id: <20040825143250.EF8D516B24 () office ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=109344438431854 CVS commit by antlarr: Added a new dialog that allows the user to select a region of an image and use it when choosing a photo for a person in the address book. This is very useful for the usual case when you don't have a photo of someone, but a group photo where that person appears. Many people showed interest in using this dialog (or widget) in different applications, so I'll put it in kdeui, but since the kdepim team decided today to be compatible to kdelibs 3.3, I have to put a copy on libkdepim too. A libkdepim/kpixmapregionselectordialog.cpp 1.1 [no copyright] A libkdepim/kpixmapregionselectordialog.h 1.1 [no copyright] A libkdepim/kpixmapregionselectorwidget.cpp 1.1 [no copyright] A libkdepim/kpixmapregionselectorwidget.h 1.1 [no copyright] M +8 -0 kaddressbook/imagewidget.cpp 1.22 M +4 -2 libkdepim/Makefile.am 1.58 --- kdepim/kaddressbook/imagewidget.cpp #1.21:1.22 @@ -31,4 +31,5 @@ #include #include +#include #include @@ -241,4 +242,11 @@ QPixmap ImageBaseWidget::loadPixmap( con } + QPixmap pixmap2 = KPIM::KPixmapRegionSelectorDialog::getSelectedImage( pixmap, 100, 140, this ); + if (!pixmap2.isNull()) + { + pixmap=pixmap2; + mImageUrl->clear(); + } + if ( pixmap.height() != 140 || pixmap.width() != 100 ) { if ( pixmap.height() > pixmap.width() ) --- kdepim/libkdepim/Makefile.am #1.57:1.58 @@ -25,7 +25,9 @@ statusbarprogresswidget.cpp ssllabel.cpp completionordereditor.cpp \ resourceabc.cpp diffalgo.cpp addresseediffalgo.cpp calendardiffalgo.cpp \ - htmldiffalgodisplay.cpp part.cpp broadcaststatus.cpp kresourceprefs.cpp + htmldiffalgodisplay.cpp part.cpp broadcaststatus.cpp kresourceprefs.cpp \ + kpixmapregionselectorwidget.cpp kpixmapregionselectordialog.cpp -noinst_HEADERS = categoryselectdialog.h categoryeditdialog.h ktimeedit.h +noinst_HEADERS = categoryselectdialog.h categoryeditdialog.h ktimeedit.h \ + kpixmapregionselectorwidget.h kpixmapregionselectordialog.h $(srcdir)/categoryselectdialog.h: categoryselectdialog_base.h $(srcdir)/categoryeditdialog.h: categoryeditdialog_base.h kimproxyiface.h kimiface.h