[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdepim
From:       Antonio Larrosa Jimenez <larrosa () kde ! org>
Date:       2004-08-25 14:32:50
Message-ID: 20040825143250.EF8D516B24 () office ! kde ! org
[Download RAW message or body]

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 <kurlrequester.h>
 #include <kimageio.h>
+#include <libkdepim/kpixmapregionselectordialog.h>
 
 #include <qcheckbox.h>
@@ -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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic