Revision 890271

Go back to digest for 30th November 2008

Other in Graphics

Andi Clemens committed changes in /trunk/extragear/graphics/kipi-plugins:

The imageslist widget used in IPod, Flickr, SendImages and RemoveRedEyes has been refactorized to be a common kipiplugins widget. Flickr and RemoveRedEyes have already been ported.

The widget can be used "as it is", if no special features or columns are required. It will display "Thumbnail" and "Filename" column by default. It also provides 3 User Columns, as shown here: <a href="http://www.flickr.com/photos/26732399@N05/3066278002/">http://www.flickr.com/photos/26732399@N05/3066278002/</a>;

Also a plainPage widget is added, where a plugin can add additional widgets if needed, like the summarybox in RemoveRedEyes plugin.

If you need additional methods, just derive your own class from the common imageslist.

The cstor of the ImagesList widget takes two additional parameters:

allowRAW:
---------
allow RAW files to be added [default: true]
If false, don't load RAW files and send a signal so that the plugin can react in this case

autoLoad:
---------
load images from interface directly when ImagesList widget is created [default: true]
I needed to provide this for RemoveRedEyes because I need to load the images later, otherwise some signals will not work

To change the column setup, you can use the widget as follows:

m_imglst = new KIPIPlugins::ImagesList(iface, true, true, parent);
m_imglst->listView()->setWhatsThis(i18n("This is the list of images to upload on your Flickr account."));

// set additional column
m_imglst->listView()->setColumnEnabled(KIPIPlugins::ImagesListView::User1, true);
m_imglst->listView()->setColumnLabel(KIPIPlugins::ImagesListView::User1, i18n("blabla"));

// or use this wrapper method instead
m_imglst->listView()->setColumn(KIPIPlugins::ImagesListView::User1, i18n("blabla"), true);

For additional information, take a look at the already ported plugins (Flickr and RemoveRedEyes).

File Changes

Added 4 files
  • /trunk/extragear/graphics/kipi-plugins
  •   /removeredeyes/myimageslist.cpp
  •   /removeredeyes/myimageslist.h
  •   /common/libkipiplugins/imageslist.cpp
  •   /common/libkipiplugins/imageslist.h
Deleted 4 files
  • /trunk/extragear/graphics/kipi-plugins
  •   /flickrexport/imageslist.cpp
  •   /flickrexport/imageslist.h
  •   /removeredeyes/imageslist.cpp
  •   /removeredeyes/imageslist.h
Modified 9 files
  • /trunk/extragear/graphics/kipi-plugins
  •   /flickrexport/CMakeLists.txt
  •   /flickrexport/flickrwidget.cpp
  •   /flickrexport/flickrwidget.h
  •   /flickrexport/flickrwindow.cpp
  •   /flickrexport/flickrwindow.h
  •   /removeredeyes/CMakeLists.txt
  •   /removeredeyes/removeredeyeswindow.cpp
  •   /common/libkipiplugins/CMakeLists.txt
  •   /common/libkipiplugins/imagedialog.h
17 files changed in total