summaryrefslogtreecommitdiffstats
path: root/kipi-plugins/printwizard
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-01-19 18:22:05 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-01-19 18:22:05 +0000
commit57e10fedbcb8c3e8c6590ff0935dbf017ce5587f (patch)
tree3000a7649ca4e40e43f9e7feed963236a0b0f56b /kipi-plugins/printwizard
downloadkipi-plugins-57e10fedbcb8c3e8c6590ff0935dbf017ce5587f.tar.gz
kipi-plugins-57e10fedbcb8c3e8c6590ff0935dbf017ce5587f.zip
Import abandoned KDE3 version of kipi plugins
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/libraries/kipi-plugins@1077221 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kipi-plugins/printwizard')
-rw-r--r--kipi-plugins/printwizard/Makefile.am20
-rw-r--r--kipi-plugins/printwizard/cropframe.cpp315
-rw-r--r--kipi-plugins/printwizard/cropframe.h69
-rw-r--r--kipi-plugins/printwizard/frmprintwizard.cpp1988
-rw-r--r--kipi-plugins/printwizard/frmprintwizard.h154
-rw-r--r--kipi-plugins/printwizard/frmprintwizardbase.ui2330
-rw-r--r--kipi-plugins/printwizard/kipiplugin_printwizard.desktop62
-rw-r--r--kipi-plugins/printwizard/plugin_printwizard.cpp128
-rw-r--r--kipi-plugins/printwizard/plugin_printwizard.h52
-rw-r--r--kipi-plugins/printwizard/tphoto.cpp152
-rw-r--r--kipi-plugins/printwizard/tphoto.h74
-rw-r--r--kipi-plugins/printwizard/utils.cpp95
-rw-r--r--kipi-plugins/printwizard/utils.h37
13 files changed, 5476 insertions, 0 deletions
diff --git a/kipi-plugins/printwizard/Makefile.am b/kipi-plugins/printwizard/Makefile.am
new file mode 100644
index 0000000..abb7e57
--- /dev/null
+++ b/kipi-plugins/printwizard/Makefile.am
@@ -0,0 +1,20 @@
+INCLUDES = $(KIPI_PLUGINS_COMMON_INCLUDE) $(LIBKEXIV2_CFLAGS) $(LIBKIPI_CFLAGS) $(LIBKDCRAW_CFLAGS) $(all_includes)
+
+METASOURCES = AUTO
+
+# Install this plugin in the KDE modules directory
+kde_module_LTLIBRARIES = kipiplugin_printwizard.la
+kipiplugin_printwizard_la_DEPENDENCIES = $(LIBKIPI_LIBS_DEP) $(LIBKEXIV2_LIBS_DEP) $(LIBKDCRAW_LIBS_DEP)
+kipiplugin_printwizard_la_SOURCES = frmprintwizardbase.ui plugin_printwizard.cpp frmprintwizard.cpp cropframe.cpp tphoto.cpp utils.cpp
+
+#LIBKIPI_LIBS = $(top_builddir)/libkipi/libkipi/libkipi.la
+kipiplugin_printwizard_la_LIBADD = $(LIBKEXIV2_LIBS) $(LIBKDCRAW_LIBS) -lkipiplugins \
+ $(LIB_KDEPRINT) $(LIBKIPI_LIBS) $(LIB_KIO) $(LIB_KDEUI) $(LIB_KDECORE) $(LIB_QT)
+
+kipiplugin_printwizard_la_LDFLAGS = $(KIPI_PLUGINS_COMMON_LDFLAGS) -module $(KDE_PLUGIN) $(all_libraries)
+
+kde_services_DATA = kipiplugin_printwizard.desktop
+
+messages: rc.cpp
+ $(XGETTEXT) *.cpp *.h -o $(podir)/kipiplugin_printwizard.pot
+
diff --git a/kipi-plugins/printwizard/cropframe.cpp b/kipi-plugins/printwizard/cropframe.cpp
new file mode 100644
index 0000000..60eb532
--- /dev/null
+++ b/kipi-plugins/printwizard/cropframe.cpp
@@ -0,0 +1,315 @@
+/***************************************************************************
+ cropframe.cpp - description
+ -------------------
+ begin : Mon Sep 30 2002
+ copyright : (C) 2002 by Todd Shoemaker
+ email : jtshoe11@yahoo.com
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+// C Ansi includes.
+
+extern "C"
+{
+#include <math.h>
+#include <stdio.h>
+}
+
+// Qt includes.
+
+#include <qpainter.h>
+#include <qimage.h>
+
+// Local includes.
+
+#include "cropframe.h"
+#include "utils.h"
+
+namespace KIPIPrintWizardPlugin
+{
+
+CropFrame::CropFrame(QWidget *parent=0, const char *name=0)
+ : QWidget(parent, name)
+{
+ m_mouseDown = false;
+}
+
+// FIXME: This method is doing way too much. The cropFrame initialization
+// should be a TPhoto method, and should not require the scaling of
+// pixmaps to get the desired effect, which are too slow.
+
+void CropFrame::init(TPhoto *photo, int width, int height, bool autoRotate, bool paint)
+{
+ m_photo = photo;
+ QImage scaledImg = m_photo->thumbnail().convertToImage();
+
+ // has the cropRegion been set yet?
+ bool resetCropRegion = (m_photo->cropRegion == QRect(-1, -1, -1, -1));
+ if (resetCropRegion)
+ {
+ // first, let's see if we should rotate
+ if (autoRotate) {
+ if (m_photo->rotation == 0 && ((width > height &&
+ m_photo->thumbnail().height() > m_photo->thumbnail().width()) ||
+ (height > width &&
+ m_photo->thumbnail().width() > m_photo->thumbnail().height())) )
+ {
+ // rotate
+ m_photo->rotation = 90;
+ }
+ }
+ }
+ else
+ {
+ // does the crop region need updating (but the image shouldn't be rotated)?
+ resetCropRegion = (m_photo->cropRegion == QRect(-2, -2, -2, -2));
+ }
+
+ // rotate
+ QWMatrix matrix;
+ matrix.rotate(m_photo->rotation);
+ scaledImg = scaledImg.xForm(matrix);
+
+ scaledImg = scaledImg.smoothScale(this->width(), this->height(), QImage::ScaleMin);
+
+ m_pixmap = new QPixmap();
+ m_pixmap->convertFromImage(scaledImg);
+ m_pixmapX = (this->width() / 2) - (m_pixmap->width() / 2);
+ m_pixmapY = (this->height() / 2) - (m_pixmap->height() / 2);
+
+ m_color = Qt::red;
+ // size the rectangle based on the minimum image dimension
+ int w = m_pixmap->width();
+ int h = m_pixmap->height();;
+ if (w < h)
+ {
+ h = NINT((double)w * ((double)height / (double)width));
+ if (h > m_pixmap->height())
+ {
+ h = m_pixmap->height();
+ w = NINT((double)h * ((double)width / (double)height));
+ }
+ }
+ else
+ {
+ w = NINT((double)h * ((double)width / (double)height));
+ if (w > m_pixmap->width())
+ {
+ w = m_pixmap->width();
+ h = NINT((double)w * ((double)height / (double)width));
+ }
+ }
+
+ if (resetCropRegion)
+ {
+ m_cropRegion.setRect((this->width() / 2) - (w / 2), (this->height() / 2) - (h / 2), w, h);
+
+ m_photo->cropRegion = _screenToPhotoRect(m_cropRegion);
+ }
+ else
+ m_cropRegion = _photoToScreenRect(m_photo->cropRegion);
+
+ if (paint)
+ repaint(false);
+}
+
+QRect CropFrame::_screenToPhotoRect(QRect r)
+{
+ // r is given in screen coordinates, and we want to convert that
+ // to photo coordinates
+ double xRatio = 0.0;
+ double yRatio = 0.0;
+
+ // flip the photo dimensions if rotated
+ int photoW;
+ int photoH;
+
+ if (m_photo->rotation == 0 || m_photo->rotation == 180)
+ {
+ photoW = m_photo->width();
+ photoH = m_photo->height();
+ }
+ else
+ {
+ photoW = m_photo->height();
+ photoH = m_photo->width();
+ }
+ if (m_pixmap->width() > 0)
+ xRatio = (double) photoW / (double) m_pixmap->width();
+
+ if (m_pixmap->height() > 0)
+ yRatio = (double) photoH / (double) m_pixmap->height();
+
+
+ int x1 = NINT((r.left() - m_pixmapX) * xRatio);
+ int y1 = NINT((r.top() - m_pixmapY) * yRatio);
+
+ int w = NINT(r.width() * xRatio);
+ int h = NINT(r.height() * yRatio);
+
+ QRect result;
+ result.setRect(x1, y1, w, h);
+ return result;
+}
+
+QRect CropFrame::_photoToScreenRect(QRect r)
+{
+ // r is given in photo coordinates, and we want to convert that
+ // to screen coordinates
+ double xRatio = 0.0;
+ double yRatio = 0.0;
+
+ // flip the photo dimensions if rotated
+ int photoW;
+ int photoH;
+
+ if (m_photo->rotation == 0 || m_photo->rotation == 180)
+ {
+ photoW = m_photo->width();
+ photoH = m_photo->height();
+ }
+ else
+ {
+ photoW = m_photo->height();
+ photoH = m_photo->width();
+ }
+
+ if (m_photo->width() > 0)
+ xRatio = (double) m_pixmap->width() / (double) photoW;
+
+ if (m_photo->height() > 0)
+ yRatio = (double)m_pixmap->height() / (double)photoH;
+
+
+ int x1 = NINT(r.left() * xRatio + m_pixmapX);
+ int y1 = NINT(r.top() * yRatio + m_pixmapY);
+
+ int w = NINT(r.width() * xRatio);
+ int h = NINT(r.height() * yRatio);
+
+ QRect result;
+ result.setRect(x1, y1, w, h);
+ return result;
+}
+
+CropFrame::~CropFrame()
+{
+}
+void CropFrame::paintEvent (QPaintEvent *)
+{
+
+ QPixmap bmp(this->width(), this->height());
+ QPainter p;
+ p.begin(&bmp);
+
+ p.eraseRect(0, 0, this->width(), this->height());
+
+ // draw the background pixmap
+ p.drawPixmap(m_pixmapX, m_pixmapY, *m_pixmap);
+
+ // draw the rectangle
+ p.setPen(QPen(m_color, 2));
+ p.drawRect(m_cropRegion);
+ // draw the crosshairs
+ int midX = m_cropRegion.left() + m_cropRegion.width() / 2;
+ int midY = m_cropRegion.top() + m_cropRegion.height() / 2;
+ p.drawLine(midX - 10, midY, midX + 10, midY);
+ p.drawLine(midX, midY - 10, midX, midY + 10);
+ p.end();
+
+ QPainter newp(this);
+ newp.drawPixmap(0, 0, bmp);
+}
+
+void CropFrame::mousePressEvent(QMouseEvent *e)
+{
+ if (e->button() == QMouseEvent::LeftButton)
+ {
+ m_mouseDown = true;
+ this->mouseMoveEvent(e);
+ }
+
+}
+
+void CropFrame::mouseReleaseEvent(QMouseEvent *e)
+{
+ if (e->button() == QMouseEvent::LeftButton)
+ m_mouseDown = false;
+}
+
+void CropFrame::mouseMoveEvent(QMouseEvent *e)
+{
+ if (m_mouseDown)
+ {
+ // don't let the rectangle float off the image.
+ int newW = m_cropRegion.width();
+ int newH = m_cropRegion.height();
+
+ int newX = e->x() - (newW / 2);
+ newX = MAX(m_pixmapX, newX);
+ newX = MIN(m_pixmapX + m_pixmap->width() - newW, newX);
+
+ int newY = e->y() - (newH / 2);
+ newY = MAX(m_pixmapY, newY);
+ newY = MIN(m_pixmapY + m_pixmap->height() - newH, newY);
+
+ m_cropRegion.setRect(newX, newY, newW, newH);
+ m_photo->cropRegion = _screenToPhotoRect(m_cropRegion);
+ repaint(false);
+ }
+}
+
+void CropFrame::keyPressEvent(QKeyEvent *e)
+{
+ int newX = m_cropRegion.x();
+ int newY = m_cropRegion.y();
+
+ switch (e->key()) {
+ case Qt::Key_Up : newY--;
+ break;
+ case Qt::Key_Down : newY++;
+ break;
+ case Qt::Key_Left : newX--;
+ break;
+ case Qt::Key_Right : newX++;
+ break;
+ }
+
+ // keep inside the pixmap
+ int w = m_cropRegion.width();
+ int h = m_cropRegion.height();
+
+ newX = MAX(m_pixmapX, newX);
+ newX = MIN(m_pixmapX + m_pixmap->width() - w, newX);
+
+ newY = MAX(m_pixmapY, newY);
+ newY = MIN(m_pixmapY + m_pixmap->height() - h, newY);
+
+ m_cropRegion.setRect(newX, newY, w, h);
+ m_photo->cropRegion = _screenToPhotoRect(m_cropRegion);
+ repaint(false);
+
+}
+
+void CropFrame::setColor(QColor c)
+{
+ m_color = c;
+ repaint(false);
+}
+
+QColor CropFrame::color()
+{
+ return m_color;
+}
+
+} // NameSpace KIPIPrintWizardPlugin
+
+#include "cropframe.moc"
diff --git a/kipi-plugins/printwizard/cropframe.h b/kipi-plugins/printwizard/cropframe.h
new file mode 100644
index 0000000..ce90b5d
--- /dev/null
+++ b/kipi-plugins/printwizard/cropframe.h
@@ -0,0 +1,69 @@
+/***************************************************************************
+ cropframe.h - description
+ -------------------
+ begin : Mon Sep 30 2002
+ copyright : (C) 2002 by Todd Shoemaker
+ email : jtshoe11@yahoo.com
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef CROPFRAME_H
+#define CROPFRAME_H
+
+// Qt includes.
+
+#include <qwidget.h>
+#include <qpixmap.h>
+
+// Local includes.
+
+#include "tphoto.h"
+
+namespace KIPIPrintWizardPlugin
+{
+
+class CropFrame : public QWidget
+{
+ Q_OBJECT
+
+ public:
+ CropFrame(QWidget *parent, const char *name);
+ ~CropFrame();
+ void init(TPhoto *photo, int width, int height, bool autoRotate, bool paint = true);
+ void setColor(QColor);
+ QColor color();
+
+ private:
+ TPhoto *m_photo;
+ bool m_mouseDown;
+ QPixmap *m_pixmap;
+ int m_pixmapX;
+ int m_pixmapY;
+
+ QColor m_color;
+
+ QRect m_cropRegion;
+
+
+ QRect _screenToPhotoRect(QRect r);
+ QRect _photoToScreenRect(QRect r);
+
+ protected:
+ void paintEvent (QPaintEvent *);
+ void mousePressEvent(QMouseEvent *);
+ void mouseReleaseEvent(QMouseEvent *);
+ void mouseMoveEvent(QMouseEvent *);
+ void keyPressEvent(QKeyEvent *);
+};
+
+} // NameSpace KIPIPrintWizardPlugin
+
+#endif // CROPFRAME_H
diff --git a/kipi-plugins/printwizard/frmprintwizard.cpp b/kipi-plugins/printwizard/frmprintwizard.cpp
new file mode 100644
index 0000000..52fbeb0
--- /dev/null
+++ b/kipi-plugins/printwizard/frmprintwizard.cpp
@@ -0,0 +1,1988 @@
+/***************************************************************************
+ frmprintwizard.cpp - description
+ -------------------
+ begin : Mon Sep 30 2002
+ copyright : (C) 2002 by Todd Shoemaker
+ : (C) 2007 Angelo Naselli
+ email : todd@theshoemakers.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+// C Ansi includes.
+
+extern "C"
+{
+#include <unistd.h>
+}
+
+// Include files for Qt
+
+#include <qlabel.h>
+#include <qpushbutton.h>
+#include <qcheckbox.h>
+#include <qspinbox.h>
+#include <qpainter.h>
+#include <qbuttongroup.h>
+#include <qradiobutton.h>
+#include <qdir.h>
+#include <qslider.h>
+
+// Include files for KDE
+
+#include <kprogress.h>
+#include <kprocess.h>
+#include <ksimpleconfig.h>
+#include <klistbox.h>
+#include <kprinter.h>
+#include <klocale.h>
+#include <klineedit.h>
+#include <kdebug.h>
+#include <kmessagebox.h>
+#include <kcombobox.h>
+#include <kprogress.h>
+#include <kurllabel.h>
+#include <kfiledialog.h>
+#include <kpushbutton.h>
+#include <kapplication.h>
+#include <kaboutdata.h>
+#include <khelpmenu.h>
+#include <kiconloader.h>
+#include <kpopupmenu.h>
+#include <kdeversion.h>
+#include <kfontcombo.h>
+#include <kcolorcombo.h>
+
+// Local includes
+
+#include "kpaboutdata.h"
+#include "pluginsversion.h"
+#include "utils.h"
+#include "cropframe.h"
+#include "frmprintwizard.h"
+#include "frmprintwizard.moc"
+
+namespace KIPIPrintWizardPlugin
+{
+
+#if QT_VERSION<0x030200
+// This function emulates int QButtonGroup::selectedId() which does not exist
+// in Qt 3.1
+inline int buttonGroupSelectedId(const QButtonGroup* group)
+{
+ QButton* button=group->selected();
+ if (!button) return -1;
+ return group->id(button);
+}
+#else
+inline int buttonGroupSelectedId(const QButtonGroup* group)
+{
+ return group->selectedId();
+}
+#endif
+
+
+FrmPrintWizard::FrmPrintWizard(QWidget *parent, const char *name )
+ : FrmPrintWizardBase(parent, name)
+{
+ // enable help buttons
+ for(int i = 0; i < pageCount(); ++i)
+ setHelpEnabled(page(i), true);
+
+ // ---------------------------------------------------------------
+
+ // About data and help button.
+
+ m_about = new KIPIPlugins::KPAboutData(I18N_NOOP("Print Wizard"),
+ 0,
+ KAboutData::License_GPL,
+ I18N_NOOP("A KIPI plugin to print images"),
+ "(c) 2003-2004, Todd Shoemaker\n(c) 2007-2008, Angelo Naselli");
+
+ m_about->addAuthor("Todd Shoemaker", I18N_NOOP("Author"),
+ "todd@theshoemakers.net");
+ m_about->addAuthor("Angelo Naselli", I18N_NOOP("Developer and maintainer"),
+ "anaselli@linux.it");
+ m_about->addAuthor("Valerio Fuoglio", I18N_NOOP("Contributor"),
+ "valerio.fuoglio@gmail.com");
+
+ // setting-up icons on buttons
+ BtnBrowseOutputPath->setText("");
+ BtnBrowseOutputPath->setIconSet( SmallIconSet( "fileopen" ) );
+ BtnPrintOrderDown->setText("");
+ BtnPrintOrderDown->setIconSet( SmallIconSet( "down" ) );
+ BtnPrintOrderUp->setText("");
+ BtnPrintOrderUp->setIconSet( SmallIconSet( "up" ) );
+ BtnPreviewPageUp->setText("");
+ BtnPreviewPageUp->setIconSet( SmallIconSet( "next" ) );
+ BtnPreviewPageDown->setText("");
+ BtnPreviewPageDown->setIconSet( SmallIconSet( "previous" ) );
+ BtnCropPrev->setText("");
+ BtnCropPrev->setIconSet( SmallIconSet( "previous" ) );
+ BtnCropNext->setText("");
+ BtnCropNext->setIconSet( SmallIconSet( "next" ) );
+ BtnCropRotate->setText("");
+ BtnCropRotate->setIconSet( SmallIconSet( "rotate" ) );
+
+ // wizard buttons
+ QPushButton *pBtn = backButton ();
+ pBtn->setText("");
+ pBtn->setIconSet( SmallIconSet( "previous" ) );
+ pBtn = nextButton ();
+ pBtn->setText("");
+ pBtn->setIconSet( SmallIconSet( "next" ) );
+
+ m_helpButton = helpButton();
+ KHelpMenu* helpMenu = new KHelpMenu(this, m_about, false);
+ helpMenu->menu()->removeItemAt(0);
+ helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, SLOT(slotHelp()), 0, -1, 0);
+ m_helpButton->setPopup( helpMenu->menu() );
+
+ // NOTE does it work????
+ setModal(false);
+ // ---------------------------------------------------------------
+ // turn off back button for first and last page
+ setBackEnabled(page(0), false);
+
+ m_currentPreviewPage = 0;
+ //TODO fix next two steps
+ m_pageSize = Unknown; // select a different page to force a refresh in initPhotoSizes.
+ initPhotoSizes(A4); // default to A4 for now.
+
+ EditOutputPath->setText(QDir::homeDirPath());
+
+ connect(this, SIGNAL(selected(const QString &)),
+ this, SLOT(FrmPrintWizardBaseSelected(const QString &)));
+
+ connect(GrpOutputSettings, SIGNAL(clicked(int)),
+ this, SLOT(GrpOutputSettings_clicked(int)));
+
+ connect(m_captions, SIGNAL(activated(int)),
+ this, SLOT(CaptionChanged(int)));
+
+ connect(EditOutputPath, SIGNAL(textChanged(const QString &)),
+ this, SLOT(EditOutputPath_textChanged(const QString &)));
+
+ connect(BtnBrowseOutputPath, SIGNAL(clicked(void)),
+ this, SLOT(BtnBrowseOutputPath_clicked(void)));
+
+ CmbPaperSize->setCurrentItem(0);
+
+ connect(CmbPaperSize, SIGNAL(activated(int)),
+ this, SLOT(CmbPaperSize_activated(int)));
+
+ connect(BtnPrintOrderDown, SIGNAL(clicked(void)),
+ this, SLOT(BtnPrintOrderDown_clicked(void)));
+ connect(BtnPrintOrderUp, SIGNAL(clicked(void)),
+ this, SLOT(BtnPrintOrderUp_clicked(void)));
+ connect(BtnPreviewPageUp, SIGNAL(clicked(void)),
+ this, SLOT(BtnPreviewPageUp_clicked(void)));
+ connect(BtnPreviewPageDown, SIGNAL(clicked(void)),
+ this, SLOT(BtnPreviewPageDown_clicked(void)));
+
+ connect(BtnCropPrev, SIGNAL(clicked()),
+ this, SLOT(BtnCropPrev_clicked()));
+ connect(BtnCropNext, SIGNAL(clicked()),
+ this, SLOT(BtnCropNext_clicked()));
+
+ connect(BtnCropRotate, SIGNAL(clicked()),
+ this, SLOT(BtnCropRotate_clicked()));
+
+ loadSettings();
+
+ m_Proc = new KProcess;
+ *m_Proc << "kjobviewer" << "--all";
+}
+
+FrmPrintWizard::~FrmPrintWizard()
+{
+ for(unsigned int i=0; i < m_photos.count(); i++)
+ if (m_photos.at(i))
+ delete m_photos.at(i);
+ m_photos.clear();
+
+ for(unsigned int i=0; i < m_photoSizes.count(); i++)
+ if (m_photoSizes.at(i))
+ delete m_photoSizes.at(i);
+ m_photoSizes.clear();
+
+ delete m_about;
+}
+
+void FrmPrintWizard::slotHelp()
+{
+ KApplication::kApplication()->invokeHelp("printwizard","kipi-plugins");
+}
+
+void FrmPrintWizard::print( KURL::List fileList, QString tempPath)
+{
+ for(unsigned int i=0; i < m_photos.count(); i++)
+ if (m_photos.at(i))
+ delete m_photos.at(i);
+ m_photos.clear();
+ ListPrintOrder->clear();
+
+ for(unsigned int i=0; i < fileList.count(); i++)
+ {
+ TPhoto *photo = new TPhoto(150);
+ photo->filename = fileList[i];
+ m_photos.append(photo);
+ // load the print order listbox
+ ListPrintOrder->insertItem(photo->filename.filename());
+ }
+ ListPrintOrder->setCurrentItem(0);
+
+ m_tempPath = tempPath;
+ LblPhotoCount->setText(QString::number(m_photos.count()));
+
+ BtnCropPrev->setEnabled(false);
+
+ if (m_photos.count() == 1)
+ BtnCropNext->setEnabled(false);
+}
+
+void FrmPrintWizard::BtnCropRotate_clicked()
+{
+ // by definition, the cropRegion should be set by now,
+ // which means that after our rotation it will become invalid,
+ // so we will initialize it to -2 in an awful hack (this
+ // tells the cropFrame to reset the crop region, but don't
+ // automagically rotate the image to fit.
+ TPhoto *photo = m_photos.current();
+ photo->cropRegion = QRect(-2, -2, -2, -2);
+ photo->rotation = (photo->rotation + 90) % 360;
+
+ updateCropFrame(photo, m_photos.at());
+
+}
+
+void FrmPrintWizard::setBtnCropEnabled()
+{
+ if (m_photos.at() == 0)
+ BtnCropPrev->setEnabled(false);
+ else
+ BtnCropPrev->setEnabled(true);
+
+ if (m_photos.at() == (int)m_photos.count() - 1)
+ BtnCropNext->setEnabled(false);
+ else
+ BtnCropNext->setEnabled(true);
+}
+
+void FrmPrintWizard::BtnCropNext_clicked()
+{
+ TPhoto *photo = 0;
+ photo = m_photos.next();
+ setBtnCropEnabled();
+ if (photo == 0)
+ {
+ m_photos.last();
+ return;
+ }
+ updateCropFrame(photo, m_photos.at());
+}
+
+void FrmPrintWizard::updateCropFrame(TPhoto *photo, int photoIndex)
+{
+ TPhotoSize *s = m_photoSizes.at(ListPhotoSizes->currentItem());
+ cropFrame->init(photo, getLayout(photoIndex)->width(), getLayout(photoIndex)->height(), s->autoRotate);
+ LblCropPhoto->setText(i18n("Photo %1 of %2").arg( QString::number(m_photos.at() + 1) ).arg( QString::number(m_photos.count()) ));
+}
+
+void FrmPrintWizard::BtnCropPrev_clicked()
+{
+ TPhoto *photo = 0;
+ photo = m_photos.prev();
+
+ setBtnCropEnabled();
+
+ if (photo == 0)
+ {
+ m_photos.first();
+ return;
+ }
+ updateCropFrame(photo, m_photos.at());
+}
+
+void FrmPrintWizard::FrmPrintWizardBaseSelected(const QString &)
+{
+ QString pageName = this->currentPage()->name();
+ if (pageName == "pgPrinter")
+ {
+ // use this method to enable/disable the next button
+ GrpOutputSettings_clicked(GrpOutputSettings->id(GrpOutputSettings->selected()));
+ }
+ else
+ if (pageName == "pgLayout")
+ {
+ // create our photo sizes list
+ initPhotoSizes(m_pageSize);
+ previewPhotos();
+ }
+ else
+ if (pageName == "pgCrop")
+ {
+ TPhoto *photo = m_photos.first();
+ setBtnCropEnabled();
+ updateCropFrame(photo, m_photos.at());
+ } else
+ if (pageName == "pgFinished")
+ {
+ this->finishButton()->setEnabled(true);
+
+ // set the default crop regions if not already set
+ TPhotoSize *s = m_photoSizes.at(ListPhotoSizes->currentItem());
+ int i = 0;
+ for (TPhoto *photo = m_photos.first(); photo != 0; photo = m_photos.next())
+ {
+ if (photo->cropRegion == QRect(-1, -1, -1, -1))
+ cropFrame->init(photo, getLayout(i)->width(), getLayout(i)->height(), s->autoRotate);
+ i++;
+ }
+
+ if (RdoOutputPrinter->isChecked())
+ {
+ KPrinter printer(false);
+ switch(m_pageSize)
+ {
+ case Letter : printer.setPageSize(KPrinter::Letter);
+ break;
+ case A4 : printer.setPageSize(KPrinter::A4);
+ break;
+ case A6 : printer.setPageSize(KPrinter::A6);
+ break;
+ default:
+ break;
+ }
+ if (m_fullbleed->isChecked())
+ {
+ printer.setFullPage(true);
+ printer.setMargins (0, 0, 0, 0);
+ }
+
+#if KDE_IS_VERSION(3,2,0)
+ printer.setUsePrinterResolution(true);
+#endif
+ if (printer.setup())
+ printPhotos(m_photos, s->layouts, printer);
+ }
+ else
+ if (RdoOutputFile->isChecked())
+ {
+ // now output the items
+ QString path = EditOutputPath->text();
+ if (path.right(1) != "/")
+ path = path + "/";
+ path = path + "kipi_printwizard_";
+ printPhotosToFile(m_photos, path, s);
+ } else
+ if (RdoOutputGimp->isChecked())
+ {
+ // now output the items
+ QString path = m_tempPath;
+ if (!checkTempPath(this, path))
+ return;
+ path = path + "kipi_tmp_";
+ if (m_gimpFiles.count() > 0)
+ removeGimpFiles();
+ m_gimpFiles = printPhotosToFile(m_photos, path, s);
+ QStringList args;
+ args << "gimp-remote";
+ for(QStringList::Iterator it = m_gimpFiles.begin(); it != m_gimpFiles.end(); ++it)
+ args << (*it);
+ if (!launchExternalApp(args))
+ {
+ KMessageBox::sorry(this, i18n("There was an error launching the Gimp. Please make sure it is properly installed."), i18n("KIPI")); return;
+ }
+
+ }
+ }
+}
+
+double getMaxDPI(QPtrList<TPhoto> photos, QPtrList<QRect> layouts, unsigned int current)
+{
+ Q_ASSERT(layouts.count() > 1);
+
+ QRect *layout = layouts.at(1);
+
+ double maxDPI = 0.0;
+
+ for(; current < photos.count(); current++)
+ {
+ TPhoto *photo = photos.at(current);
+ double dpi = ((double)photo->cropRegion.width() + (double)photo->cropRegion.height()) /
+ (((double)layout->width() / 1000.0) + ((double)layout->height() / 1000.0));
+ if (dpi > maxDPI)
+ maxDPI = dpi;
+ // iterate to the next position
+ layout = layouts.next();
+ if (layout == 0)
+ {
+ break;
+ }
+ }
+ return maxDPI;
+}
+
+QRect * FrmPrintWizard::getLayout(int photoIndex)
+{
+ TPhotoSize *s = m_photoSizes.at(ListPhotoSizes->currentItem());
+
+ // how many photos would actually be printed, including copies?
+ int photoCount = (photoIndex + 1);
+ // how many pages? Recall that the first layout item is the paper size
+ int photosPerPage = s->layouts.count() - 1;
+ int remainder = photoCount % photosPerPage;
+
+ int retVal = remainder;
+ if (remainder == 0)
+ retVal = photosPerPage;
+ return s->layouts.at(retVal);
+}
+
+int FrmPrintWizard::getPageCount()
+{
+ // get the selected layout
+ TPhotoSize *s = m_photoSizes.at(ListPhotoSizes->currentItem());
+
+ int photoCount = m_photos.count();
+ // how many pages? Recall that the first layout item is the paper size
+ int photosPerPage = s->layouts.count() - 1;
+ int remainder = photoCount % photosPerPage;
+ int emptySlots = 0;
+ if (remainder > 0)
+ emptySlots = photosPerPage - remainder;
+ int pageCount = photoCount / photosPerPage;
+ if (emptySlots > 0)
+ pageCount++;
+ return pageCount;
+}
+
+
+const float FONT_HEIGHT_RATIO = 0.8;
+
+void FrmPrintWizard::printCaption(QPainter &p, TPhoto*photo, int captionW, int captionH, QString caption)
+{
+ // PENDING anaselli TPhoto*photo will be needed to add a per photo caption management
+ QStringList captionByLines;
+
+ uint captionIndex = 0;
+
+ while (captionIndex < caption.length())
+ {
+ QString newLine;
+ bool breakLine = false; // End Of Line found
+ uint currIndex; // Caption QString current index
+
+ // Check minimal lines dimension
+ //TODO fix length, maybe useless
+ uint captionLineLocalLength = 40;
+
+ for ( currIndex = captionIndex; currIndex < caption.length() && !breakLine; currIndex++ )
+ if( caption[currIndex] == QChar('\n') || caption[currIndex].isSpace() )
+ breakLine = true;
+
+ if (captionLineLocalLength <= (currIndex - captionIndex))
+ captionLineLocalLength = (currIndex - captionIndex);
+
+ breakLine = false;
+
+ for ( currIndex = captionIndex;
+ currIndex <= captionIndex + captionLineLocalLength &&
+ currIndex < caption.length() && !breakLine;
+ currIndex++ )
+ {
+ breakLine = (caption[currIndex] == QChar('\n')) ? true : false;
+
+ if (breakLine)
+ newLine.append( ' ' );
+ else
+ newLine.append( caption[currIndex] );
+ }
+
+ captionIndex = currIndex; // The line is ended
+
+ if ( captionIndex != caption.length() )
+ while ( !newLine.endsWith(" ") )
+ {
+ newLine.truncate(newLine.length() - 1);
+ captionIndex--;
+ }
+
+ captionByLines.prepend(newLine.stripWhiteSpace());
+ }
+
+ QFont font(m_font_name->currentFont());
+ font.setStyleHint(QFont::SansSerif);
+ font.setPixelSize( (int)(captionH * FONT_HEIGHT_RATIO) );
+ font.setWeight(QFont::Normal);
+
+ QFontMetrics fm( font );
+ int pixelsHigh = fm.height();
+
+ p.setFont(font);
+ p.setPen(m_font_color->color());
+ kdDebug( 51000 ) << "Number of lines " << (int)captionByLines.count() << endl;
+
+ // Now draw the caption
+ // TODO allow printing captions per photo and on top, bottom and vertically
+ for ( int lineNumber = 0; lineNumber < (int)captionByLines.count(); lineNumber++ )
+ {
+ if (lineNumber > 0)
+ p.translate(0, -(int)(pixelsHigh));
+ QRect r(0, 0, captionW, captionH);
+ p.drawText(r, Qt::AlignLeft, captionByLines[lineNumber], -1, &r);
+ }
+}
+
+
+
+QString FrmPrintWizard::captionFormatter(TPhoto *photo, const QString& format)
+{
+ QString str=format;
+
+ QFileInfo fi(photo->filename.path());
+ QString resolution;
+ QSize imageSize = photo->exiv2Iface()->getImageDimensions();
+ if (imageSize.isValid()) {
+ resolution = QString( "%1x%2" ).arg( imageSize.width()).arg( imageSize.height());
+ }
+ str.replace("\\n", "\n");
+
+ // %f filename
+ // %c comment
+ // %d date-time
+ // %t exposure time
+ // %i iso
+ // %r resolution
+ // %a aperture
+ // %l focal length
+ str.replace("%f", fi.fileName());
+ str.replace("%c", photo->exiv2Iface()->getExifComment());
+ str.replace("%d", KGlobal::locale()->formatDateTime(photo->exiv2Iface()->getImageDateTime(),
+ false, false));
+ str.replace("%t", photo->exiv2Iface()->getExifTagString("Exif.Photo.ExposureTime"));
+ str.replace("%i", photo->exiv2Iface()->getExifTagString("Exif.Photo.ISOSpeedRatings"));
+ str.replace("%r", resolution);
+ str.replace("%a", photo->exiv2Iface()->getExifTagString("Exif.Photo.FNumber"));
+ str.replace("%l", photo->exiv2Iface()->getExifTagString("Exif.Photo.FocalLength"));
+
+ return str;
+}
+
+bool FrmPrintWizard::paintOnePage(QPainter &p, QPtrList<TPhoto> photos, QPtrList<QRect> layouts,
+ int captionType, unsigned int &current, bool useThumbnails)
+{
+ Q_ASSERT(layouts.count() > 1);
+
+ if (photos.count() == 0) return true; // no photos => last photo
+
+ QRect *srcPage = layouts.at(0);
+ QRect *layout = layouts.at(1);
+
+ // scale the page size to best fit the painter
+ // size the rectangle based on the minimum image dimension
+ int destW = p.window().width();
+ int destH = p.window().height();
+
+ int srcW = srcPage->width();
+ int srcH = srcPage->height();
+ if (destW < destH)
+ {
+ destH = NINT((double)destW * ((double)srcH / (double)srcW));
+ if (destH > p.window().height())
+ {
+ destH = p.window().height();
+ destW = NINT((double)destH * ((double)srcW / (double)srcH));
+ }
+ }
+ else
+ {
+ destW = NINT((double)destH * ((double)srcW / (double)srcH));
+ if (destW > p.window().width())
+ {
+ destW = p.window().width();
+ destH = NINT((double)destW * ((double)srcH / (double)srcW));
+ }
+ }
+
+ double xRatio = (double)destW / (double)srcPage->width();
+ double yRatio = (double)destH / (double)srcPage->height();
+
+ int left = (p.window().width() - destW) / 2;
+ int top = (p.window().height() - destH) / 2;
+
+ // FIXME: may not want to erase the background page
+ p.eraseRect(left, top,
+ NINT((double)srcPage->width() * xRatio),
+ NINT((double)srcPage->height() * yRatio));
+
+ for(; current < photos.count(); current++)
+ {
+ TPhoto *photo = photos.at(current);
+ // crop
+ QImage img;
+ if (useThumbnails)
+ img = photo->thumbnail().convertToImage();
+ else
+ img = photo->loadPhoto();
+
+ // next, do we rotate?
+ if (photo->rotation != 0)
+ {
+ // rotate
+ QWMatrix matrix;
+ matrix.rotate(photo->rotation);
+ img = img.xForm(matrix);
+ }
+
+ if (useThumbnails)
+ {
+ // scale the crop region to thumbnail coords
+ double xRatio = 0.0;
+ double yRatio = 0.0;
+
+ if (photo->thumbnail().width() != 0)
+ xRatio = (double)photo->thumbnail().width() / (double) photo->width();
+ if (photo->thumbnail().height() != 0)
+ yRatio = (double)photo->thumbnail().height() / (double) photo->height();
+
+ int x1 = NINT((double)photo->cropRegion.left() * xRatio);
+ int y1 = NINT((double)photo->cropRegion.top() * yRatio);
+
+ int w = NINT((double)photo->cropRegion.width() * xRatio);
+ int h = NINT((double)photo->cropRegion.height() * yRatio);
+
+ img = img.copy(QRect(x1, y1, w, h));
+ }
+ else
+ img = img.copy(photo->cropRegion);
+
+ int x1 = NINT((double)layout->left() * xRatio);
+ int y1 = NINT((double)layout->top() * yRatio);
+ int w = NINT((double)layout->width() * xRatio);
+ int h = NINT((double)layout->height() * yRatio);
+
+ p.drawImage( QRect(x1 + left, y1 + top, w, h), img );
+
+ if (captionType > 0)
+ {
+ p.save();
+ QString caption;
+ QString format;
+ switch (captionType)
+ {
+ case FileNames:
+ format = "%f";
+ break;
+ case ExifDateTime:
+ format = "%d";
+ break;
+ case Comment:
+ format = "%c";
+ break;
+ case Free:
+ format = m_FreeCaptionFormat->text();
+ break;
+ default:
+ kdWarning( 51000 ) << "UNKNOWN caption type " << captionType << endl;
+ break;
+ }
+ caption = captionFormatter(photo, format);
+ kdDebug( 51000 ) << "Caption " << caption << endl;
+
+ // draw the text at (0,0), but we will translate and rotate the world
+ // before drawing so the text will be in the correct location
+ // next, do we rotate?
+ int captionW = w-2;
+ double ratio = m_font_size->value() * 0.01;
+ int captionH = (int)(QMIN(w, h) * ratio);
+
+ int exifOrientation = photo->exiv2Iface()->getImageOrientation();
+ int orientatation = photo->rotation;
+
+
+ //ORIENTATION_ROT_90_HFLIP .. ORIENTATION_ROT_270
+ if (exifOrientation == KExiv2Iface::KExiv2::ORIENTATION_ROT_90_HFLIP ||
+ exifOrientation == KExiv2Iface::KExiv2::ORIENTATION_ROT_90 ||
+ exifOrientation == KExiv2Iface::KExiv2::ORIENTATION_ROT_90_VFLIP ||
+ exifOrientation == KExiv2Iface::KExiv2::ORIENTATION_ROT_270)
+ orientatation = (photo->rotation + 270) % 360; // -90 degrees
+
+ if(orientatation == 90 || orientatation == 270)
+ {
+ captionW = h;
+ }
+ p.rotate(orientatation);
+ kdDebug( 51000 ) << "rotation " << photo->rotation << " orientation " << orientatation << endl;
+ int tx = left;
+ int ty = top;
+
+ switch(orientatation) {
+ case 0 : {
+ tx += x1 + 1;
+ ty += y1 + (h - captionH - 1);
+ break;
+ }
+ case 90 : {
+ tx = top + y1 + 1;
+ ty = -left - x1 - captionH - 1;
+ break;
+ }
+ case 180 : {
+ tx = -left - x1 - w + 1;
+ ty = -top -y1 - (captionH + 1);
+ break;
+ }
+ case 270 : {
+ tx = -top - y1 - h + 1;
+ ty = left + x1 + (w - captionH)- 1;
+ break;
+ }
+ }
+ p.translate(tx, ty);
+ printCaption(p, photo, captionW, captionH, caption);
+ p.restore();
+ } // caption
+
+ // iterate to the next position
+ layout = layouts.next();
+ if (layout == 0)
+ {
+ current++;
+ break;
+ }
+ }
+ // did we print the last photo?
+ return (current < photos.count());
+}
+
+
+// Like above, but outputs to an initialized QImage. UseThumbnails is
+// not an option.
+// We have to use QImage for saving to a file, otherwise we would have
+// to use a QPixmap, which will have the same bit depth as the display.
+// So someone with an 8-bit display would not be able to save 24-bit
+// images!
+bool FrmPrintWizard::paintOnePage(QImage &p, QPtrList<TPhoto> photos, QPtrList<QRect> layouts,
+ int captionType, unsigned int &current)
+{
+ Q_ASSERT(layouts.count() > 1);
+
+ QRect *srcPage = layouts.at(0);
+ QRect *layout = layouts.at(1);
+
+ // scale the page size to best fit the painter
+ // size the rectangle based on the minimum image dimension
+ int destW = p.width();
+ int destH = p.height();
+
+ int srcW = srcPage->width();
+ int srcH = srcPage->height();
+ if (destW < destH)
+ {
+ destH = NINT((double)destW * ((double)srcH / (double)srcW));
+ if (destH > p.height())
+ {
+ destH = p.height();
+ destW = NINT((double)destH * ((double)srcW / (double)srcH));
+ }
+ }
+ else
+ {
+ destW = NINT((double)destH * ((double)srcW / (double)srcH));
+ if (destW > p.width())
+ {
+ destW = p.width();
+ destH = NINT((double)destW * ((double)srcH / (double)srcW));
+ }
+ }
+
+ double xRatio = (double)destW / (double)srcPage->width();
+ double yRatio = (double)destH / (double)srcPage->height();
+
+ int left = (p.width() - destW) / 2;
+ int top = (p.height() - destH) / 2;
+
+
+ p.fill(0xffffff);
+
+ for(; current < photos.count(); current++)
+ {
+ TPhoto *photo = photos.at(current);
+ // crop
+ QImage img;
+ img = photo->loadPhoto();
+
+ // next, do we rotate?
+ if (photo->rotation != 0)
+ {
+ // rotate
+ QWMatrix matrix;
+ matrix.rotate(photo->rotation);
+ img = img.xForm(matrix);
+ }
+
+ img = img.copy(photo->cropRegion);
+
+ int x1 = NINT((double)layout->left() * xRatio);
+ int y1 = NINT((double)layout->top() * yRatio);
+ int w = NINT((double)layout->width() * xRatio);
+ int h = NINT((double)layout->height() * yRatio);
+
+ // We can use scaleFree because the crop frame should have the proper dimensions.
+ img = img.smoothScale(w, h, QImage::ScaleFree);
+ // don't have drawimage, so we copy the pixels over manually
+ for(int srcY = 0; srcY < img.height(); srcY++)
+ for(int srcX = 0; srcX < img.width(); srcX++)
+ {
+ p.setPixel(x1 + left + srcX, y1 + top + srcY, img.pixel(srcX, srcY));
+ }
+
+ if (captionType != NoCaptions)
+ {
+ // Now draw the caption
+ QString caption;
+ QString format;
+ switch (captionType)
+ {
+ case FileNames:
+ format = "%f";
+ break;
+ case ExifDateTime:
+ format = "%d";
+ break;
+ case Comment:
+ format = "%c";
+ break;
+ case Free:
+ format = m_FreeCaptionFormat->text();
+ break;
+ default:
+ kdWarning( 51000 ) << "UNKNOWN caption type " << captionType << endl;
+ break;
+ }
+ caption = captionFormatter(photo, format);
+ kdDebug( 51000 ) << "Caption " << caption << endl;
+
+ int captionW = w-2;
+ double ratio = m_font_size->value() * 0.01;
+ int captionH = (int)(QMIN(w, h) * ratio);
+
+ int exifOrientation = photo->exiv2Iface()->getImageOrientation();
+ int orientatation = photo->rotation;
+
+ //ORIENTATION_ROT_90_HFLIP .. ORIENTATION_ROT_270
+ if (exifOrientation == KExiv2Iface::KExiv2::ORIENTATION_ROT_90_HFLIP ||
+ exifOrientation == KExiv2Iface::KExiv2::ORIENTATION_ROT_90 ||
+ exifOrientation == KExiv2Iface::KExiv2::ORIENTATION_ROT_90_VFLIP ||
+ exifOrientation == KExiv2Iface::KExiv2::ORIENTATION_ROT_270)
+ orientatation = (photo->rotation + 270) % 360; // -90 degrees
+
+ if (orientatation == 90 || orientatation == 270)
+ {
+ captionW = h;
+ }
+
+ QPixmap pixmap(w-2, img.height()-2);
+ //TODO black is not ok if font is black...
+ pixmap.fill(Qt::black);
+ QPainter painter;
+ painter.begin(&pixmap);
+ painter.rotate(orientatation);
+ kdDebug( 51000 ) << "rotation " << photo->rotation << " orientation " << orientatation << endl;
+ int tx = left;
+ int ty = top;
+
+ switch(orientatation) {
+ case 0 : {
+ tx += x1 + 1;
+ ty += y1 + (h - captionH - 1);
+ break;
+ }
+ case 90 : {
+ tx = top + y1 + 1;
+ ty = -left - x1 - captionH - 1;
+ break;
+ }
+ case 180 : {
+ tx = -left - x1 - w + 1;
+ ty = -top -y1 - (captionH + 1);
+ break;
+ }
+ case 270 : {
+ tx = -top - y1 - h + 1;
+ ty = left + x1 + (w - captionH)- 1;
+ break;
+ }
+ }
+
+ painter.translate(tx, ty);
+ printCaption(painter, photo, captionW, captionH, caption);
+ painter.end();
+
+ // now put it on picture
+ QImage fontImage = pixmap.convertToImage();
+ QRgb black = QColor(0, 0, 0).rgb();
+ for(int srcY = 0; srcY < fontImage.height(); srcY++)
+ for(int srcX = 0; srcX < fontImage.width(); srcX++)
+ {
+ if (fontImage.pixel(srcX, srcY) != black)
+ p.setPixel(srcX, srcY, fontImage.pixel(srcX, srcY));
+ }
+ } // caption
+
+ // iterate to the next position
+ layout = layouts.next();
+ if (layout == 0)
+ {
+ current++;
+ break;
+ }
+ }
+ // did we print the last photo?
+ return (current < photos.count());
+}
+
+
+// update the pages to be printed and preview first/last pages
+void FrmPrintWizard::previewPhotos()
+{
+ // get the selected layout
+ TPhotoSize *s = m_photoSizes.at(ListPhotoSizes->currentItem());
+
+ int photoCount = m_photos.count();
+ // how many pages? Recall that the first layout item is the paper size
+ int photosPerPage = s->layouts.count() - 1;
+ int remainder = photoCount % photosPerPage;
+ int emptySlots = 0;
+ if (remainder > 0)
+ emptySlots = photosPerPage - remainder;
+ int pageCount = photoCount / photosPerPage;
+ if (emptySlots > 0)
+ pageCount++;
+
+ LblPhotoCount->setText(QString::number(photoCount));
+ LblSheetsPrinted->setText(QString::number(pageCount));
+ LblEmptySlots->setText(QString::number(emptySlots));
+
+ // photo previews
+ // preview the first page.
+ // find the first page of photos
+ int count = 0;
+ int page = 0;
+ unsigned int current = 0;
+ for (TPhoto *photo = m_photos.first(); photo != 0; photo = m_photos.next())
+ {
+ if (page == m_currentPreviewPage) {
+ photo->cropRegion.setRect(-1, -1, -1, -1);
+ photo->rotation = 0;
+ int w = s->layouts.at(count+1)->width();
+ int h = s->layouts.at(count+1)->height();
+ cropFrame->init(photo, w, h, s->autoRotate, false);
+ }
+ count++;
+ if (count >= photosPerPage)
+ {
+ if (page == m_currentPreviewPage)
+ break;
+ page++;
+ current += photosPerPage;
+ count = 0;
+ }
+ }
+
+ // send this photo list to the painter
+ QPixmap img(BmpFirstPagePreview->width(), BmpFirstPagePreview->height());
+ QPainter p;
+ p.begin(&img);
+ p.fillRect(0, 0, img.width(), img.height(), this->paletteBackgroundColor());
+ paintOnePage(p, m_photos, s->layouts, m_captions->currentItem(), current, true);
+ p.end();
+ BmpFirstPagePreview->setPixmap(img);
+ LblPreview->setText(i18n("Page ") + QString::number(m_currentPreviewPage + 1) + i18n(" of ") + QString::number(getPageCount()));
+ LblPreview->setText(i18n("Page %1 of %2").arg(m_currentPreviewPage + 1).arg(getPageCount()));
+
+ manageBtnPreviewPage();
+ manageBtnPrintOrder();
+}
+
+void FrmPrintWizard::ListPhotoSizes_highlighted ( int )
+{
+ m_currentPreviewPage = 0;
+ for (TPhoto *photo = m_photos.first(); photo != 0; photo = m_photos.next())
+ {
+ photo->cropRegion.setRect(-1, -1, -1, -1);
+ photo->rotation = 0;
+ }
+ previewPhotos();
+}
+
+void FrmPrintWizard::ListPhotoSizes_selected( QListBoxItem * )
+{
+ previewPhotos();
+}
+
+void FrmPrintWizard::manageBtnPreviewPage()
+{
+ BtnPreviewPageDown->setEnabled(true);
+ BtnPreviewPageUp->setEnabled(true);
+ if (m_currentPreviewPage == 0)
+ {
+ BtnPreviewPageDown->setEnabled(false);
+ }
+
+ if ((m_currentPreviewPage + 1) == getPageCount())
+ {
+ BtnPreviewPageUp->setEnabled(false);
+ }
+}
+
+void FrmPrintWizard::manageBtnPrintOrder()
+{
+ if (ListPrintOrder->currentItem() == -1)
+ return;
+
+ BtnPrintOrderDown->setEnabled(true);
+ BtnPrintOrderUp->setEnabled(true);
+ if (ListPrintOrder->currentItem() == 0)
+ {
+ BtnPrintOrderUp->setEnabled(false);
+ }
+ if (uint(ListPrintOrder->currentItem() + 1) == ListPrintOrder->count())
+ {
+ BtnPrintOrderDown->setEnabled(false);
+ }
+}
+
+void FrmPrintWizard::ListPhotoOrder_highlighted ( int index )
+{
+ EditCopies->blockSignals(true);
+ EditCopies->setValue ( m_photos.at(index)->copies );
+ EditCopies->blockSignals(false);
+
+ manageBtnPrintOrder();
+}
+
+void FrmPrintWizard::ListPrintOrder_selected( QListBoxItem * )
+{
+ int currentIndex = ListPrintOrder->currentItem();
+ EditCopies->blockSignals(true);
+ EditCopies->setValue ( m_photos.at(currentIndex)->copies );
+ EditCopies->blockSignals(false);
+
+ manageBtnPrintOrder();
+}
+
+void FrmPrintWizard::EditCopies_valueChanged( int copies )
+{
+ if (copies < 1)
+ return;
+
+ int currentIndex = ListPrintOrder->currentItem();
+ QString item = ListPrintOrder->selectedItem()->text();
+ TPhoto *pCurPhoto = m_photos.at(currentIndex);
+ KURL fileName = pCurPhoto->filename;
+
+ if ( pCurPhoto->copies >= copies )
+ {
+ // removing copies
+ if (pCurPhoto->copies == 1 || pCurPhoto->copies == copies)
+ return;
+
+ ListPrintOrder->blockSignals(true);
+ ListPrintOrder->setSelected (currentIndex, false);
+ for (int removing = pCurPhoto->copies - copies; removing >0 ;removing--)
+ {
+ for (unsigned int index = 0; index < ListPrintOrder->count(); index++)
+ {
+ if (ListPrintOrder->text(index) == item)
+ {
+ TPhoto *pPhoto = m_photos.at(index);
+ m_photos.remove(index);
+ delete (pPhoto);
+ ListPrintOrder->removeItem(index);
+ break;
+ }
+ }
+ }
+ ListPrintOrder->blockSignals(false);
+ currentIndex = -1;
+ }
+ else
+ {
+ // adding copies
+ for (int adding = copies - pCurPhoto->copies; adding >0 ;adding--)
+ {
+ TPhoto *pPhoto = new TPhoto(150);
+ pPhoto->filename = pCurPhoto->filename;
+ m_photos.insert(currentIndex, pPhoto);
+ ListPrintOrder->insertItem(pPhoto->filename.filename(), currentIndex);
+ }
+ }
+
+ LblPhotoCount->setText(QString::number(m_photos.count()));
+
+ int index = 0;
+ for (TPhoto *pPhoto = m_photos.first(); pPhoto != 0; pPhoto = m_photos.next(), index++)
+ {
+ if (pPhoto->filename == fileName)
+ {
+ pPhoto->copies = copies;
+ if (currentIndex == -1)
+ currentIndex = index;
+ }
+ }
+ ListPrintOrder->blockSignals(true);
+ ListPrintOrder->setCurrentItem(currentIndex);
+ ListPrintOrder->setSelected( currentIndex, true );
+ ListPrintOrder->blockSignals(false);
+ previewPhotos();
+}
+
+void FrmPrintWizard::removeGimpFiles()
+{
+ for(QStringList::Iterator it = m_gimpFiles.begin(); it != m_gimpFiles.end(); ++it)
+ {
+ if (QFile::exists(*it))
+ {
+ if (QFile::remove(*it) == false)
+ {
+ KMessageBox::sorry(this, i18n("Could not remove the Gimp's temporary files."));
+ break;
+ }
+ }
+ }
+}
+
+// this is called when Finish is clicked.
+void FrmPrintWizard::accept()
+{
+ saveSettings();
+
+ // if we output to Gimp, we need to remove the temp files
+ if (m_gimpFiles.count() > 0)
+ removeGimpFiles();
+ QDialog::accept();
+}
+
+// this is called when Cancel is clicked.
+void FrmPrintWizard::reject()
+{
+ m_cancelPrinting = true;
+ if (m_gimpFiles.count() > 0)
+ removeGimpFiles();
+ QDialog::reject();
+}
+
+void FrmPrintWizard::printPhotos(QPtrList<TPhoto> photos, QPtrList<QRect> layouts, KPrinter &printer)
+{
+ m_cancelPrinting = false;
+ LblPrintProgress->setText("");
+ PrgPrintProgress->setProgress(0);
+ PrgPrintProgress->setTotalSteps(photos.count());
+ this->finishButton()->setEnabled(false);
+ KApplication::kApplication()->processEvents();
+
+ QPainter p;
+ p.begin(&printer);
+
+ unsigned int current = 0;
+
+ bool printing = true;
+ while(printing)
+ {
+ printing = paintOnePage(p, photos, layouts, m_captions->currentItem(), current);
+ if (printing)
+ printer.newPage();
+ PrgPrintProgress->setProgress(current);
+ KApplication::kApplication()->processEvents();
+ if (m_cancelPrinting)
+ {
+ printer.abort();
+ return;
+ }
+ }
+ p.end();
+
+ this->finishButton()->setEnabled(true);
+ if (m_kjobviewer->isChecked())
+ if ( !m_Proc->start() )
+ kdDebug( 51000 ) << "Error running kjobviewr\n";
+ LblPrintProgress->setText(i18n("Complete. Click Finish to exit the Print Wizard."));
+}
+
+QStringList FrmPrintWizard::printPhotosToFile(QPtrList<TPhoto> photos, QString &baseFilename, TPhotoSize* layouts)
+{
+ Q_ASSERT(layouts->layouts.count() > 1);
+
+ m_cancelPrinting = false;
+ LblPrintProgress->setText("");
+ PrgPrintProgress->setProgress(0);
+ PrgPrintProgress->setTotalSteps(photos.count());
+ this->finishButton()->setEnabled(false);
+ KApplication::kApplication()->processEvents();
+
+ unsigned int current = 0;
+ int pageCount = 1;
+ bool printing = true;
+ QStringList files;
+
+ QRect *srcPage = layouts->layouts.at(0);
+
+ while (printing)
+ {
+ // make a pixmap to save to file. Make it just big enough to show the
+ // highest-dpi image on the page without losing data.
+ double dpi = layouts->dpi;
+ if (dpi == 0.0)
+ dpi = getMaxDPI(photos, layouts->layouts, current) * 1.1;
+ int w = NINT(srcPage->width() / 1000.0 * dpi);
+ int h = NINT(srcPage->height() / 1000.0 * dpi);
+ QImage *img = new QImage(w, h, 32);
+ if (!img)
+ break;
+
+ // save this page out to file
+ QString filename = baseFilename + QString::number(pageCount) + ".jpeg";
+ bool saveFile = true;
+ if (QFile::exists(filename))
+ {
+ int result = KMessageBox::warningYesNoCancel( this,
+ i18n("The following file will be overwritten. Do you want to overwrite this file?") +
+ "\n\n" + filename);
+ if (result == KMessageBox::No)
+ saveFile = false;
+ else if (result == KMessageBox::Cancel)
+ {
+ delete img;
+ break;
+ }
+ }
+
+ // paint this page, even if we aren't saving it to keep the page
+ // count accurate.
+ printing = paintOnePage(*img, photos, layouts->layouts, m_captions->currentItem(), current);
+
+ if (saveFile)
+ {
+ files.append(filename);
+ img->save(filename, "JPEG");
+ }
+ delete img;
+ pageCount++;
+
+ PrgPrintProgress->setProgress(current);
+ KApplication::kApplication()->processEvents();
+ if (m_cancelPrinting)
+ break;
+ }
+ this->finishButton()->setEnabled(true);
+ // did we cancel?
+ if (printing)
+ LblPrintProgress->setText(i18n("Printing Canceled."));
+ else
+ {
+ if (m_kjobviewer->isChecked())
+ if ( !m_Proc->start() )
+ kdDebug( 51000 ) << "Error launching kjobviewr\n";
+ LblPrintProgress->setText(i18n("Complete. Click Finish to exit the Print Wizard."));
+ }
+ return files;
+}
+
+void FrmPrintWizard::loadSettings()
+{
+ KSimpleConfig config("kipirc");
+ config.setGroup("PrintWizard");
+
+ //internal PageSize
+ PageSize pageSize = (PageSize)config.readNumEntry("PageSize", (int)A4); //Default A4
+ initPhotoSizes(pageSize);
+ CmbPaperSize->setCurrentItem(int(pageSize));
+
+ //Use Margins
+ m_fullbleed->setChecked(config.readBoolEntry("NoMargins", false));
+
+ // captions
+ int captions = config.readNumEntry("ImageCaptions", 0);
+ m_captions->setCurrentItem(captions);
+ // caption color
+ QColor defColor(Qt::yellow);
+ QColor color = config.readColorEntry("CaptionColor", &defColor);
+ m_font_color->setColor(color);
+ // caption font
+ QFont defFont("Sans Serif");
+ QFont font = config.readFontEntry ( "CaptionFont", &defFont);
+ m_font_name->setCurrentFont(font.family());
+ // caption size
+ int fontSize = config.readNumEntry("CaptionSize", 4);
+ m_font_size->setValue(fontSize);
+ // free caption
+ QString captionTxt = config.readEntry("FreeCaption");
+ m_FreeCaptionFormat->setText(captionTxt);
+ //enable right caption stuff
+ CaptionChanged(captions);
+
+ // set the last output path
+ QString outputPath = config.readPathEntry("OutputPath", EditOutputPath->text());
+ EditOutputPath->setText(outputPath);
+
+ // set the proper radio button
+ int id = config.readNumEntry("PrintOutput", GrpOutputSettings->id(RdoOutputPrinter));
+ GrpOutputSettings->setButton(id);
+
+ // photo size
+ QString photoSize = config.readEntry("PhotoSize");
+ QListBoxItem *item = ListPhotoSizes->findItem(photoSize);
+ if (item)
+ ListPhotoSizes->setCurrentItem(item);
+ else
+ ListPhotoSizes->setCurrentItem(0);
+
+ // kjobviewer
+ m_kjobviewer->setChecked(config.readBoolEntry("KjobViewer", true));
+}
+
+
+// save the current wizard settings
+void FrmPrintWizard::saveSettings()
+{
+ KSimpleConfig config("kipirc");
+ config.setGroup("PrintWizard");
+
+ config.writeEntry("PageSize", (int)m_pageSize);
+ config.writeEntry("NoMargins", m_fullbleed->isChecked());
+
+ // output
+ int output = 0;
+ if (RdoOutputPrinter->isChecked())
+ output = GrpOutputSettings->id(RdoOutputPrinter);
+ else
+ if (RdoOutputFile->isChecked())
+ output = GrpOutputSettings->id(RdoOutputFile);
+ else
+ if (RdoOutputGimp->isChecked())
+ output = GrpOutputSettings->id(RdoOutputGimp);
+ config.writeEntry("PrintOutput", output);
+
+ // image captions
+ config.writeEntry("ImageCaptions", m_captions->currentItem());
+ // caption color
+ config.writeEntry("CaptionColor", m_font_color->color());
+ // caption font
+ config.writeEntry ("CaptionFont", QFont(m_font_name->currentFont()));
+ // caption size
+ config.writeEntry("CaptionSize", m_font_size->value());
+ // free caption
+ config.writeEntry("FreeCaption", m_FreeCaptionFormat->text());
+
+ // output path
+ config.writePathEntry("OutputPath", EditOutputPath->text());
+
+ // photo size
+ config.writeEntry("PhotoSize", ListPhotoSizes->currentText());
+
+ // kjobviewer
+ config.writeEntry("KjobViewer", m_kjobviewer->isChecked());
+}
+
+void FrmPrintWizard::GrpOutputSettings_clicked(int id)
+{
+ this->nextButton()->setEnabled(false);
+ // disable next buttons when appropriate
+ if (id == GrpOutputSettings->id(RdoOutputPrinter))
+ this->nextButton()->setEnabled(true);
+ else
+ if (id == GrpOutputSettings->id(RdoOutputFile))
+ {
+ if (!EditOutputPath->text().isEmpty())
+ {
+ QFileInfo fileInfo(EditOutputPath->text());
+ if (fileInfo.exists() && fileInfo.isDir())
+ this->nextButton()->setEnabled(true);
+ }
+ }
+ else
+ if (id == GrpOutputSettings->id(RdoOutputGimp))
+ {
+ this->nextButton()->setEnabled(true);
+ }
+}
+
+void FrmPrintWizard::BtnBrowseOutputPath_clicked( void )
+{
+ QString newPath = KFileDialog::getExistingDirectory(EditOutputPath->text(), this, "Select Output Folder");
+ if (newPath.isEmpty())
+ return;
+ // assume this directory exists
+ EditOutputPath->setText(newPath);
+ GrpOutputSettings_clicked(GrpOutputSettings->id(GrpOutputSettings->selected()));
+}
+
+
+void FrmPrintWizard::CaptionChanged(int captionUsed)
+{
+ switch (captionUsed)
+ {
+ case NoCaptions:
+ // disable m_font_frame and mFreeOutputFormat
+ m_font_frame->setEnabled(false);
+ m_FreeCaptionFormat->setEnabled(false);
+ m_free_label->setEnabled(false);
+ break;
+
+ case Free:
+ m_font_frame->setEnabled(true);
+ m_FreeCaptionFormat->setEnabled(true);
+ m_free_label->setEnabled(true);
+ break;
+
+ case FileNames:
+ case ExifDateTime:
+ case Comment:
+ default:
+ // disable mFreeOutputFormat
+ m_font_frame->setEnabled(true);
+ m_FreeCaptionFormat->setEnabled(false);
+ m_free_label->setEnabled(false);
+ break;
+ }
+
+}
+
+
+
+void FrmPrintWizard::EditOutputPath_textChanged(const QString &)
+{
+ GrpOutputSettings_clicked(GrpOutputSettings->id(GrpOutputSettings->selected()));
+}
+
+void FrmPrintWizard::CmbPaperSize_activated( int index )
+{
+ PageSize pageSize = (PageSize)index;
+ initPhotoSizes(pageSize);
+
+ if (pageSize > A6)
+ {
+ KMessageBox::information (this,
+ i18n("Don't forget to set up the correct page size according to your printer settings"),
+ i18n("Page size settings"), "pageSizeInfo");
+ }
+}
+
+void FrmPrintWizard::BtnPrintOrderUp_clicked() {
+ if (ListPrintOrder->currentItem() == 0)
+ return;
+
+ int currentIndex = ListPrintOrder->currentItem();
+ QString item1 = ListPrintOrder->selectedItem()->text();
+ QString item2 = ListPrintOrder->item(currentIndex - 1)->text();
+
+ // swap these items
+ ListPrintOrder->changeItem(item2, currentIndex);
+ ListPrintOrder->changeItem(item1, currentIndex - 1);
+
+ // the list box items are swapped, now swap the items in the photo list
+ TPhoto *photo1 = m_photos.at(currentIndex);
+ TPhoto *photo2 = m_photos.at(currentIndex - 1);
+ m_photos.remove(currentIndex - 1);
+ m_photos.remove(currentIndex - 1);
+ m_photos.insert(currentIndex - 1, photo2);
+ m_photos.insert(currentIndex - 1, photo1);
+ previewPhotos();
+}
+
+void FrmPrintWizard::BtnPrintOrderDown_clicked() {
+ if (ListPrintOrder->currentItem() == (signed int)ListPrintOrder->count() - 1)
+ return;
+
+ int currentIndex = ListPrintOrder->currentItem();
+ QString item1 = ListPrintOrder->selectedItem()->text();
+ QString item2 = ListPrintOrder->item(currentIndex + 1)->text();
+
+ // swap these items
+ ListPrintOrder->changeItem(item2, currentIndex);
+ ListPrintOrder->changeItem(item1, currentIndex + 1);
+
+ // the list box items are swapped, now swap the items in the photo list
+ TPhoto *photo1 = m_photos.at(currentIndex);
+ TPhoto *photo2 = m_photos.at(currentIndex + 1);
+ m_photos.remove(currentIndex);
+ m_photos.remove(currentIndex);
+ m_photos.insert(currentIndex, photo1);
+ m_photos.insert(currentIndex, photo2);
+ previewPhotos();
+}
+
+void FrmPrintWizard::BtnPreviewPageDown_clicked() {
+ if (m_currentPreviewPage == 0)
+ return;
+ m_currentPreviewPage--;
+ previewPhotos();
+}
+void FrmPrintWizard::BtnPreviewPageUp_clicked() {
+ if (m_currentPreviewPage == getPageCount() - 1)
+ return;
+ m_currentPreviewPage++;
+ previewPhotos();
+}
+
+// create a MxN grid of photos, fitting on the page
+TPhotoSize * createPhotoGrid(int pageWidth, int pageHeight, QString label, int rows, int columns) {
+ int MARGIN = (int)((pageWidth + pageHeight) / 2 * 0.04 + 0.5);
+ int GAP = MARGIN / 4;
+ int photoWidth = (pageWidth - (MARGIN * 2) - ((columns-1) * GAP)) / columns;
+ int photoHeight = (pageHeight - (MARGIN * 2) - ((rows-1) * GAP)) / rows;
+
+ TPhotoSize *p = new TPhotoSize;
+ p->label = label;
+ p->dpi = 100;
+ p->autoRotate = false;
+ p->layouts.append(new QRect(0, 0, pageWidth, pageHeight));
+
+ int row = 0;
+ for(int y=MARGIN; row < rows && y < pageHeight - MARGIN; y += photoHeight + GAP) {
+ int col = 0;
+ for(int x=MARGIN; col < columns && x < pageWidth - MARGIN; x += photoWidth + GAP) {
+ p->layouts.append(new QRect(x, y, photoWidth, photoHeight));
+ col++;
+ }
+ row++;
+ }
+ return p;
+}
+
+void FrmPrintWizard::initPhotoSizes(PageSize pageSize)
+{
+ // don't refresh anything if we haven't changed page sizes.
+ if (pageSize == m_pageSize)
+ return;
+
+ m_pageSize = pageSize;
+
+ // cleanng m_pageSize memory before invoking clear()
+ for(unsigned int i=0; i < m_photoSizes.count(); i++)
+ if (m_photoSizes.at(i))
+ delete m_photoSizes.at(i);
+ m_photoSizes.clear();
+
+ switch (pageSize)
+ {
+ // ====================== LETTER SIZE =====================
+ case Letter:
+ {
+ TPhotoSize *p;
+ // ========== 5 x 3.5
+ p = new TPhotoSize;
+ p->label = i18n("3.5 x 5\"");
+ p->dpi = 0;
+ p->autoRotate = true;
+ // page size
+ p->layouts.append(new QRect(0, 0, 8500, 11000));
+ // photo layouts
+ p->layouts.append(new QRect( 700, 500, 3500, 5000));
+ p->layouts.append(new QRect(4300, 500, 3500, 5000));
+ p->layouts.append(new QRect( 700, 5600, 3500, 5000));
+ p->layouts.append(new QRect(4300, 5600, 3500, 5000));
+ // add to the list
+ m_photoSizes.append(p);
+
+ // ========== 4 x 6
+ p = new TPhotoSize;
+ p->label = i18n("4 x 6\"");
+ p->dpi = 0;
+ p->autoRotate = true;
+ // page size
+ p->layouts.append(new QRect(0, 0, 8500, 11000));
+ // photo layouts
+ p->layouts.append(new QRect( 225, 500, 4000, 6000));
+ p->layouts.append(new QRect(4275, 500, 4000, 6000));
+ p->layouts.append(new QRect(1250, 6600, 6000, 4000));
+ // add to the list
+ m_photoSizes.append(p);
+
+ // ========== 4 x 6 Album
+ p = new TPhotoSize;
+ p->label = i18n("4 x 6\" Album");
+ p->dpi = 0;
+ p->autoRotate = true;
+ // page size
+ p->layouts.append(new QRect(0, 0, 8500, 11000));
+ // photo layouts
+ p->layouts.append(new QRect( 1250, 1000, 6000, 4000));
+ p->layouts.append(new QRect( 1250, 6000, 6000, 4000));
+ // add to the list
+ m_photoSizes.append(p);
+
+ // ========== 5 x 7
+ p = new TPhotoSize;
+ p->label = i18n("5 x 7\"");
+ p->dpi = 0;
+ p->autoRotate = true;
+ // page size
+ p->layouts.append(new QRect(0, 0, 8500, 11000));
+ // photo layouts
+ p->layouts.append(new QRect( 750, 500, 7000, 5000));
+ p->layouts.append(new QRect( 750, 5750, 7000, 5000));
+ // add to the list
+ m_photoSizes.append(p);
+
+ // ========== 8 x 10
+ p = new TPhotoSize;
+ p->label = i18n("8 x 10\"");
+ p->dpi = 0;
+ p->autoRotate = true;
+ // page size
+ p->layouts.append(new QRect(0, 0, 8500, 11000));
+ // photo layouts
+ p->layouts.append(new QRect(250, 500, 8000, 10000));
+ // add to the list
+ m_photoSizes.append(p);
+
+ // thumbnails
+ m_photoSizes.append(createPhotoGrid(8500, 11000, i18n("Thumbnails"), 5, 4));
+
+ // small thumbnails
+ m_photoSizes.append(createPhotoGrid(8500, 11000, i18n("Small Thumbnails"), 6, 5));
+
+ // album collage 1
+ p = new TPhotoSize;
+ p->label = i18n("Album Collage 1 (9 photos)");
+ p->dpi = 0;
+ p->autoRotate = false;
+ // page size
+ p->layouts.append(new QRect(0, 0, 8500, 11000));
+ // photo layouts
+ // photo 1 is in the center, 3x4.5
+ p->layouts.append(new QRect(2750, 3250, 3000, 4500));
+ // the remaining 1.5x2 photos begin with upper left and circle around
+ // top row
+ p->layouts.append(new QRect(750, 750, 1500, 2000));
+ p->layouts.append(new QRect(3500, 750, 1500, 2000));
+ p->layouts.append(new QRect(6250, 750, 1500, 2000));
+ p->layouts.append(new QRect(6250, 4500, 1500, 2000));
+ p->layouts.append(new QRect(6250, 8250, 1500, 2000));
+ p->layouts.append(new QRect(3500, 8250, 1500, 2000));
+ p->layouts.append(new QRect(750, 8250, 1500, 2000));
+ p->layouts.append(new QRect(750, 4500, 1500, 2000));
+ m_photoSizes.append(p);
+
+ // album collage 2
+ p = new TPhotoSize;
+ p->label = i18n("Album Collage 2 (6 photos)");
+ p->dpi = 0;
+ p->autoRotate = false;
+ // page size
+ p->layouts.append(new QRect(0, 0, 8500, 11000));
+ // photo layouts
+ p->layouts.append(new QRect(1000, 1000, 3000, 3000));
+ p->layouts.append(new QRect(5000, 1000, 2500, 1250));
+ p->layouts.append(new QRect(5000, 2750, 2500, 1250));
+ p->layouts.append(new QRect(1000, 5000, 1500, 2000));
+ p->layouts.append(new QRect(2750, 5000, 4750, 2000));
+ p->layouts.append(new QRect(1000, 8000, 6500, 2000));
+ m_photoSizes.append(p);
+ } // letter
+ break;
+
+ // ====================== A4 SIZE =====================
+ case A4:
+ {
+ // A4 is 21 x 29.7cm
+ TPhotoSize *p;
+
+ // ========== 20x25cm
+ p = new TPhotoSize;
+ p->dpi = 0;
+ p->autoRotate = true;
+ p->label = i18n("21 x 29.7cm");
+ // page size
+ p->layouts.append(new QRect(0, 0, 2100, 2970));
+ // photo layouts
+ p->layouts.append(new QRect( 0, 0, 2100, 2970));
+ // add to the list
+ m_photoSizes.append(p);
+
+ // ========== 6x9 cm - 8 photos
+ p = new TPhotoSize;
+ p->dpi = 0;
+ p->autoRotate = true;
+ p->label = i18n("6 x 9cm (8 photos)");
+ // page size
+ p->layouts.append(new QRect(0, 0, 2100, 2970));
+ // photo layouts
+ p->layouts.append(new QRect( 100, 100, 900, 600));
+ p->layouts.append(new QRect(1100, 100, 900, 600));
+ p->layouts.append(new QRect( 100, 800, 900, 600));
+ p->layouts.append(new QRect(1100, 800, 900, 600));
+ p->layouts.append(new QRect( 100, 1500, 900, 600));
+ p->layouts.append(new QRect(1100, 1500, 900, 600));
+ p->layouts.append(new QRect( 100, 2200, 900, 600));
+ p->layouts.append(new QRect(1100, 2200, 900, 600));
+ // add to the list
+ m_photoSizes.append(p);
+
+ // ========== 9x13
+ p = new TPhotoSize;
+ p->dpi = 0;
+ p->autoRotate = true;
+ p->label = i18n("9 x 13cm");
+ // page size
+ p->layouts.append(new QRect(0, 0, 2100, 2970));
+ // photo layouts
+ p->layouts.append(new QRect( 100, 100, 900, 1300));
+ p->layouts.append(new QRect(1100, 100, 900, 1300));
+ p->layouts.append(new QRect( 100, 1500, 900, 1300));
+ p->layouts.append(new QRect(1100, 1500, 900, 1300));
+ // add to the list
+ m_photoSizes.append(p);
+
+ // ========== 10x13.33cm
+ p = new TPhotoSize;
+ p->dpi = 0;
+ p->autoRotate = true;
+ p->label = i18n("10 x 13.33cm");
+ // page size
+ p->layouts.append(new QRect(0, 0, 2100, 2970));
+ // photo layouts
+ p->layouts.append(new QRect( 50, 100, 1000, 1333));
+ p->layouts.append(new QRect(1060, 100, 1000, 1333));
+ p->layouts.append(new QRect( 50, 1500, 1000, 1333));
+ p->layouts.append(new QRect(1060, 1500, 1000, 1333));
+ // add to the list
+ m_photoSizes.append(p);
+
+ // ========== 10x15cm
+ p = new TPhotoSize;
+ p->dpi = 0;
+ p->autoRotate = true;
+ p->label = i18n("10 x 15cm");
+ // page size
+ p->layouts.append(new QRect(0, 0, 2100, 2970));
+ // photo layouts
+ p->layouts.append(new QRect( 50, 150, 1000, 1500));
+ p->layouts.append(new QRect(1060, 150, 1000, 1500));
+ p->layouts.append(new QRect( 300, 1750, 1500, 1000));
+ // add to the list
+ m_photoSizes.append(p);
+
+ // ========== 10x15cm album
+ p = new TPhotoSize;
+ p->dpi = 0;
+ p->autoRotate = true;
+ p->label = i18n("10 x 15cm Album");
+ // page size
+ p->layouts.append(new QRect(0, 0, 2100, 2970));
+ // photo layouts
+ p->layouts.append(new QRect( 300, 350, 1500, 1000));
+ p->layouts.append(new QRect( 300, 1620, 1500, 1000));
+ // add to the list
+ m_photoSizes.append(p);
+
+ // ========== 11.5x15cm album
+ p = new TPhotoSize;
+ p->dpi = 0;
+ p->autoRotate = true;
+ p->label = i18n("11.5 x 15cm Album");
+ // page size
+ p->layouts.append(new QRect(0, 0, 2100, 2970));
+ // photo layouts
+ p->layouts.append(new QRect( 300, 250, 1500, 1100));
+ p->layouts.append(new QRect( 300, 1570, 1500, 1100));
+ // add to the list
+ m_photoSizes.append(p);
+
+ // ========== 13x18cm
+ p = new TPhotoSize;
+ p->dpi = 0;
+ p->autoRotate = true;
+ p->label = i18n("13 x 18cm");
+ // page size
+ p->layouts.append(new QRect(0, 0, 2100, 2970));
+ // photo layouts
+ p->layouts.append(new QRect( 150, 150, 1800, 1300));
+ p->layouts.append(new QRect( 150, 1520, 1800, 1300));
+ // add to the list
+ m_photoSizes.append(p);
+
+ // ========== 20x25cm
+ p = new TPhotoSize;
+ p->dpi = 0;
+ p->autoRotate = true;
+ p->label = i18n("20 x 25cm");
+ // page size
+ p->layouts.append(new QRect(0, 0, 2100, 2970));
+ // photo layouts
+ p->layouts.append(new QRect( 50, 230, 2000, 2500));
+ // add to the list
+ m_photoSizes.append(p);
+
+ // thumbnails
+ m_photoSizes.append(createPhotoGrid(2100, 2970, i18n("Thumbnails"), 5, 4));
+
+ // small thumbnails
+ m_photoSizes.append(createPhotoGrid(2100, 2970, i18n("Small Thumbnails"), 6, 5));
+ } // A4
+ break;
+
+ // ====================== A6 SIZE =====================
+ case A6:
+ {
+ // A6 is 10.5 x 14.8 cm
+ TPhotoSize *p;
+ // ========== 9x13
+ p = new TPhotoSize;
+ p->dpi = 0;
+ p->autoRotate = true;
+ p->label = i18n("9 x 13cm");
+ // page size
+ p->layouts.append(new QRect(0, 0, 1050, 1480));
+ // photo layouts
+ p->layouts.append(new QRect( 50, 100, 900, 1300));
+ // add to the list
+ m_photoSizes.append(p);
+
+ // ========== 10x15cm
+ p = new TPhotoSize;
+ p->dpi = 0;
+ p->autoRotate = true;
+ p->label = i18n("10.5 x 14.8cm");
+ // page size
+ p->layouts.append(new QRect(0, 0, 1050, 1480));
+ // photo layouts
+ p->layouts.append(new QRect(0, 0, 1050, 1480));
+ // add to the list
+ m_photoSizes.append(p);
+
+ // thumbnails
+ m_photoSizes.append(createPhotoGrid(1050, 1480, i18n("Thumbnails"), 5, 4));
+
+ // small thumbnails
+ m_photoSizes.append(createPhotoGrid(1050, 1480, i18n("Small Thumbnails"), 6, 5));
+ } // A6
+ break;
+
+ // ====================== 10x15cm SIZE =====================
+ case P10X15:
+ {
+ // 10x15cm photo paper is 4x6" so the right size is 10.16 x 15.24 cm
+ TPhotoSize *p;
+ // ========== 10x15cm
+ p = new TPhotoSize;
+ p->dpi = 0;
+ p->autoRotate = true;
+ p->label = i18n("10 x 15cm");
+ // page size
+ p->layouts.append(new QRect(0, 0, 1016, 1524));
+ // photo layouts
+ p->layouts.append(new QRect(0, 0, 1016, 1524));
+ // add to the list
+ m_photoSizes.append(p);
+
+ // ========== 9x13
+ p = new TPhotoSize;
+ p->dpi = 0;
+ p->autoRotate = true;
+ p->label = i18n("9 x 13cm");
+ // page size
+ p->layouts.append(new QRect(0, 0, 1016, 1524));
+ // photo layouts
+ p->layouts.append(new QRect( 50, 100, 900, 1300));
+ // add to the list
+ m_photoSizes.append(p);
+
+ // thumbnails
+ m_photoSizes.append(createPhotoGrid(1016, 1524, i18n("Thumbnails"), 5, 4));
+
+ // small thumbnails
+ m_photoSizes.append(createPhotoGrid(1016, 1524, i18n("Small Thumbnails"), 6, 5));
+
+ } // 10x15 cm
+ break;
+
+ // ====================== 13x18cm SIZE =====================
+ case P13X18:
+ {
+ // 10x18cm photo paper is 5x7" so the right conversion
+ // is 12.7 x 17.78 cm
+ TPhotoSize *p;
+ // ========== 10x15cm
+ p = new TPhotoSize;
+ p->dpi = 0;
+ p->autoRotate = true;
+ p->label = i18n("13 x 18cm");
+ // page size
+ p->layouts.append(new QRect(0, 0, 1270, 1778));
+ // photo layouts
+ p->layouts.append(new QRect(0, 0, 1270, 1778));
+ // add to the list
+ m_photoSizes.append(p);
+
+ // ========== 10x15cm
+ p = new TPhotoSize;
+ p->dpi = 0;
+ p->autoRotate = true;
+ p->label = i18n("10 x 15cm");
+ // page size
+ p->layouts.append(new QRect(0, 0, 1270, 1778));
+ // photo layouts
+ p->layouts.append(new QRect(0, 0, 1016, 1524));
+ // add to the list
+ m_photoSizes.append(p);
+
+ // ========== 9x13
+ p = new TPhotoSize;
+ p->dpi = 0;
+ p->autoRotate = true;
+ p->label = i18n("9 x 13cm");
+ // page size
+ p->layouts.append(new QRect(0, 0, 1270, 1778));
+ // photo layouts
+ p->layouts.append(new QRect( 50, 100, 900, 1300));
+ // add to the list
+ m_photoSizes.append(p);
+
+ // thumbnails
+ m_photoSizes.append(createPhotoGrid(1270, 1778, i18n("Thumbnails"), 5, 4));
+
+ // small thumbnails
+ m_photoSizes.append(createPhotoGrid(1270, 1778, i18n("Small Thumbnails"), 6, 5));
+
+ } // 13x18 cm
+ break;
+
+ default:
+ {
+ kdDebug( 51000 ) << "Initializing Unsupported page layouts\n";
+ // We don't support this page size yet. Just create a default page.
+ TPhotoSize *p;
+ p = new TPhotoSize;
+ p->dpi = 0;
+ p->autoRotate = false;
+ p->label = i18n("Unsupported Paper Size");
+ // page size
+ p->layouts.append(new QRect(0, 0, 8500, 11000));
+ p->layouts.append(new QRect(0, 0, 8500, 11000));
+ // add to the list
+ m_photoSizes.append(p);
+ }
+ break;
+ };
+
+ // load the photo sizes into the listbox
+ ListPhotoSizes->clear();
+ for (TPhotoSize *s = m_photoSizes.first(); s != 0; s = m_photoSizes.next())
+ ListPhotoSizes->insertItem(s->label);
+ ListPhotoSizes->setCurrentItem(0);
+}
+
+} // NameSpace KIPIPrintWizardPlugin
+
diff --git a/kipi-plugins/printwizard/frmprintwizard.h b/kipi-plugins/printwizard/frmprintwizard.h
new file mode 100644
index 0000000..2eb25e1
--- /dev/null
+++ b/kipi-plugins/printwizard/frmprintwizard.h
@@ -0,0 +1,154 @@
+/***************************************************************************
+ frmprintwizard.h - description
+ -------------------
+ begin : Mon Sep 30 2002
+ copyright : (C) 2002 by Todd Shoemaker
+ email : jtshoe11@yahoo.com
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef FRMPRINTWIZARD_H
+#define FRMPRINTWIZARD_H
+
+// Qt includes.
+
+#include <qwidget.h>
+
+// KDE includes.
+
+#include <kprinter.h>
+
+// Local includes.
+
+#include "kpaboutdata.h"
+#include "tphoto.h"
+#include "frmprintwizardbase.h"
+
+class QPushButton;
+class KProcess;
+
+namespace KIPIPrintWizardPlugin
+{
+
+class FrmPrintWizardBase;
+
+typedef struct _TPhotoSize {
+ QString label;
+ int dpi;
+ bool autoRotate;
+ QPtrList<QRect> layouts; // first element is page size
+} TPhotoSize;
+
+class FrmPrintWizard : public FrmPrintWizardBase
+{
+ Q_OBJECT
+
+private:
+
+ enum PageSize {
+ Unknown = -1,
+ Letter = 0,
+ A4,
+ A6,
+ P10X15,
+ P13X18
+ };
+
+ enum AvailableCaptions {
+ NoCaptions = 0,
+ FileNames,
+ ExifDateTime,
+ Comment,
+ Free
+ };
+
+ QPtrList<TPhoto> m_photos;
+ QPtrList<TPhotoSize> m_photoSizes;
+
+ PageSize m_pageSize;
+ KProcess *m_Proc;
+ QString m_tempPath;
+
+ int m_currentPreviewPage;
+ QStringList m_gimpFiles;
+
+ QPushButton *m_helpButton;
+
+ bool m_cancelPrinting;
+
+ KIPIPlugins::KPAboutData *m_about;
+
+ void updateCropFrame(TPhoto *, int);
+ void setBtnCropEnabled();
+ void removeGimpFiles();
+ void initPhotoSizes(PageSize pageSize);
+ void previewPhotos();
+ void printPhotos(QPtrList<TPhoto> photos, QPtrList<QRect> layouts, KPrinter &printer);
+ QStringList printPhotosToFile(QPtrList<TPhoto> photos, QString &baseFilename, TPhotoSize *layouts);
+ void loadSettings();
+ void saveSettings();
+
+ int getPageCount();
+
+ QString captionFormatter(TPhoto *photo, const QString& format);
+ void printCaption(QPainter &p, TPhoto*photo, int captionW, int captionH, QString caption);
+
+ bool paintOnePage(QPainter &p, QPtrList<TPhoto> photos, QPtrList<QRect> layouts,
+ int captionType, unsigned int &current, bool useThumbnails = false);
+
+ bool paintOnePage(QImage &p, QPtrList<TPhoto> photos, QPtrList<QRect> layouts,
+ int captionType, unsigned int &current);
+
+ void manageBtnPrintOrder();
+ void manageBtnPreviewPage();
+
+public:
+
+ FrmPrintWizard(QWidget *parent=0, const char *name=0);
+ ~FrmPrintWizard();
+ void print( KURL::List fileList, QString tempPath);
+ QRect * getLayout(int photoIndex);
+
+public slots:
+
+ void BtnCropRotate_clicked();
+ void BtnCropNext_clicked();
+ void BtnCropPrev_clicked();
+ void FrmPrintWizardBaseSelected(const QString &);
+ void ListPhotoSizes_selected( QListBoxItem * );
+ void ListPhotoSizes_highlighted ( int );
+ void ListPrintOrder_selected( QListBoxItem * );
+ void ListPhotoOrder_highlighted ( int );
+ void EditCopies_valueChanged( int );
+ void GrpOutputSettings_clicked(int id);
+ void EditOutputPath_textChanged(const QString &);
+ void CaptionChanged( int );
+ void BtnBrowseOutputPath_clicked();
+ void CmbPaperSize_activated( int );
+
+ void BtnPrintOrderUp_clicked();
+ void BtnPrintOrderDown_clicked();
+
+ void BtnPreviewPageDown_clicked();
+ void BtnPreviewPageUp_clicked();
+
+protected slots:
+
+ void accept();
+ void reject();
+ void slotHelp();
+};
+
+} // NameSpace KIPIPrintWizardPlugin
+
+
+#endif // FRMPRINTWIZARD_H
+
diff --git a/kipi-plugins/printwizard/frmprintwizardbase.ui b/kipi-plugins/printwizard/frmprintwizardbase.ui
new file mode 100644
index 0000000..a353296
--- /dev/null
+++ b/kipi-plugins/printwizard/frmprintwizardbase.ui
@@ -0,0 +1,2330 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>KIPIPrintWizardPlugin::FrmPrintWizardBase</class>
+<widget class="QWizard">
+ <property name="name">
+ <cstring>FrmPrintWizardBase</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>776</width>
+ <height>627</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>3</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="caption">
+ <string>Print Wizard</string>
+ </property>
+ <property name="titleFont">
+ <font>
+ <pointsize>16</pointsize>
+ </font>
+ </property>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>pgWelcome</cstring>
+ </property>
+ <attribute name="title">
+ <string>Welcome to the Print Wizard</string>
+ </attribute>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout53</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>10</y>
+ <width>730</width>
+ <height>522</height>
+ </rect>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout24</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>PixmapLabel1_4</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShadow">
+ <enum>Raised</enum>
+ </property>
+ <property name="pixmap">
+ <pixmap>image0</pixmap>
+ </property>
+ <property name="scaledContents">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer5</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>300</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+ </widget>
+ <widget class="Line">
+ <property name="name">
+ <cstring>Line1</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>VLine</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Sunken</enum>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout52</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer9</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>31</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Welcome to the Print Wizard. This wizard will walk you through the process of printing your photos.
+
+Click the 'Next' button to begin.</string>
+ </property>
+ <property name="alignment">
+ <set>WordBreak|AlignVCenter</set>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer8</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>381</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+ </widget>
+ </hbox>
+ </widget>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>pgPrinter</cstring>
+ </property>
+ <attribute name="title">
+ <string>Select Printer</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>layout88</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>PixmapLabel1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShadow">
+ <enum>Raised</enum>
+ </property>
+ <property name="pixmap">
+ <pixmap>image0</pixmap>
+ </property>
+ <property name="scaledContents">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>471</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget" row="0" column="1">
+ <property name="name">
+ <cstring>layout87</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>groupBox1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>4</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>Page Settings</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout37</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout36</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>3</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Paper size:</string>
+ </property>
+ </widget>
+ <widget class="KComboBox">
+ <item>
+ <property name="text">
+ <string>Letter</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>A4</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>A6</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>10x15cm</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>13x17cm</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>CmbPaperSize</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout36</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>spacer19</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>210</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>m_fullbleed</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>3</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>No margins</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Full-bleed mode</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Full-bleed mode</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout86</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>m_imageCaptions</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>Image Captions</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KComboBox">
+ <item>
+ <property name="text">
+ <string>No captions</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Image file names</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Exif date-time</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Comments</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Free</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>m_captions</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>3</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="KLineEdit">
+ <property name="name">
+ <cstring>m_FreeCaptionFormat</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>%d %c</string>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>m_free_label</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>200</width>
+ <height>110</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>%f filename %t exposure time
+%c comment %i iso
+%d date-time %r resolution
+%a aperture %l focal length
+\n newline</string>
+ </property>
+ <property name="alignment">
+ <set>WordBreak|AlignVCenter</set>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>m_font_frame</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>3</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape">
+ <enum>GroupBoxPanel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Sunken</enum>
+ </property>
+ <property name="title">
+ <string>Caption font</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Choose the caption font size</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KFontCombo">
+ <property name="name">
+ <cstring>m_font_name</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="KColorCombo">
+ <property name="name">
+ <cstring>m_font_color</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="insertionPolicy">
+ <enum>NoInsertion</enum>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout37</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Size</string>
+ </property>
+ </widget>
+ <widget class="QSlider">
+ <property name="name">
+ <cstring>m_font_size</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minValue">
+ <number>2</number>
+ </property>
+ <property name="maxValue">
+ <number>8</number>
+ </property>
+ <property name="lineStep">
+ <number>2</number>
+ </property>
+ <property name="pageStep">
+ <number>2</number>
+ </property>
+ <property name="value">
+ <number>4</number>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QButtonGroup">
+ <property name="name">
+ <cstring>GrpOutputSettings</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>3</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>Output Settings</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>RdoOutputPrinter</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Output to printer</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout24</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>RdoOutputGimp</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Open image using Gimp</string>
+ </property>
+ </widget>
+ <widget class="KURLLabel">
+ <property name="name">
+ <cstring>KURLLabel1</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="pixmap">
+ <pixmap>image1</pixmap>
+ </property>
+ <property name="url" stdset="0">
+ <string>http://www.gimp.org</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Visit Gimp website (www.gimp.org) using external browser</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer16</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>RdoOutputFile</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Output to image file</string>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout23</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer1_2_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>19</width>
+ <height>26</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel2_2</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>This wizard will output each page to this folder with the filename kipi_printwizard_1, kipi_printwizard_2, etc.</string>
+ </property>
+ <property name="alignment">
+ <set>WordBreak|AlignVCenter</set>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout23</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer1_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>19</width>
+ <height>26</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KLineEdit">
+ <property name="name">
+ <cstring>EditOutputPath</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="KPushButton">
+ <property name="name">
+ <cstring>BtnBrowseOutputPath</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&amp;Browse...</string>
+ </property>
+ <property name="accel">
+ <string>Alt+B</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ </vbox>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>pgLayout</cstring>
+ </property>
+ <attribute name="title">
+ <string>Select Photo Layout</string>
+ </attribute>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout16</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>PixmapLabel3</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="pixmap">
+ <pixmap>image2</pixmap>
+ </property>
+ <property name="scaledContents">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer10</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>0</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+ </widget>
+ <widget class="Line">
+ <property name="name">
+ <cstring>Line3_2_3</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>VLine</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Sunken</enum>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout113</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout88</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout86</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Select the photo size to print</string>
+ </property>
+ </widget>
+ <widget class="KListBox">
+ <item>
+ <property name="text">
+ <string>Photo Sizes</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>ListPhotoSizes</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>150</width>
+ <height>200</height>
+ </size>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout87</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>groupBox2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>Print Summary</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout90</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel4_2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Photos:</string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter|AlignRight</set>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>LblPhotoCount</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>30</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>&lt;p align="right"&gt;0&lt;/p&gt;</string>
+ </property>
+ <property name="alignment">
+ <set>WordBreak|AlignVCenter|AlignLeft</set>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout91</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel4</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Sheets:</string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter|AlignRight</set>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>LblSheetsPrinted</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>30</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>&lt;p align="right"&gt;0&lt;/p&gt;</string>
+ </property>
+ <property name="alignment">
+ <set>WordBreak|AlignVCenter|AlignLeft</set>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout92</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel6</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Empty slots:</string>
+ </property>
+ <property name="alignment">
+ <set>WordBreak|AlignVCenter|AlignRight</set>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>LblEmptySlots</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>30</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>&lt;p align="right"&gt;0&lt;/p&gt;</string>
+ </property>
+ <property name="alignment">
+ <set>WordBreak|AlignVCenter|AlignLeft</set>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer50</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>21</width>
+ <height>105</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>groupBox3</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>Print Order</string>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QListBox">
+ <item>
+ <property name="text">
+ <string>New Item</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>ListPrintOrder</cstring>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout112</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>BtnPrintOrderUp</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="font">
+ <font>
+ </font>
+ </property>
+ <property name="text">
+ <string>Up</string>
+ <comment>Move Up</comment>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Move Up selected photo</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Move Up selected photo</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer20</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>80</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>BtnPrintOrderDown</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="font">
+ <font>
+ </font>
+ </property>
+ <property name="text">
+ <string>Down</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Move Down selected photo</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Move Down selected photo</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout75</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>LblCopies_2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Number of times to print selected photo:</string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter|AlignRight</set>
+ </property>
+ </widget>
+ <widget class="QSpinBox">
+ <property name="name">
+ <cstring>EditCopies</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="minValue">
+ <number>1</number>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Number of copies of selected photo</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Number of copies of selected photo</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout40</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>groupBox6</cstring>
+ </property>
+ <property name="title">
+ <string></string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>LblPreview</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Preview</string>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout37</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>spacer26</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>BmpFirstPagePreview</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>260</width>
+ <height>367</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>260</width>
+ <height>367</height>
+ </size>
+ </property>
+ <property name="frameShape">
+ <enum>Box</enum>
+ </property>
+ <property name="pixmap">
+ <pixmap>image3</pixmap>
+ </property>
+ <property name="scaledContents">
+ <bool>true</bool>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter</set>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer27</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>21</width>
+ <height>21</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout35</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>BtnPreviewPageDown</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>30</width>
+ <height>32767</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>&lt;</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Previous photo</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Previous photo</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer20_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>161</width>
+ <height>21</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>BtnPreviewPageUp</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>30</width>
+ <height>32767</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>&gt;</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Next page</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Next page</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer21</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>pgCrop</cstring>
+ </property>
+ <attribute name="title">
+ <string>Crop Photos</string>
+ </attribute>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout110</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>PixmapLabel1_2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="pixmap">
+ <pixmap>image4</pixmap>
+ </property>
+ <property name="scaledContents">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel8</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Move the box below to tell to this wizard how to crop the photos to fit inside the photo sizes you have given. You can crop each image differently, or just click 'Next' to use the default center cropping for each photo.</string>
+ </property>
+ <property name="textFormat">
+ <enum>AutoText</enum>
+ </property>
+ <property name="scaledContents">
+ <bool>false</bool>
+ </property>
+ <property name="alignment">
+ <set>WordBreak|AlignTop|AlignLeft</set>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel10</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Click and Drag the mouse</string>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout121</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>spacer70</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>41</width>
+ <height>21</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout119</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KIPIPrintWizardPlugin::CropFrame">
+ <property name="name">
+ <cstring>cropFrame</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>200</width>
+ <height>200</height>
+ </size>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout118</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>BtnCropRotate</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Rotate</string>
+ </property>
+ <property name="accel">
+ <string>Alt+R</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Rotate photo</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Rotate photo</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer12</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>127</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>BtnCropPrev</cstring>
+ </property>
+ <property name="text">
+ <string>&lt;&lt; Pr&amp;evious</string>
+ </property>
+ <property name="accel">
+ <string>Alt+E</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Previous photo</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Previous photo</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>BtnCropNext</cstring>
+ </property>
+ <property name="text">
+ <string>Ne&amp;xt &gt;&gt;</string>
+ </property>
+ <property name="accel">
+ <string>Alt+X</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Next photo</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Next photo</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer13</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>127</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>LblCropPhoto</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Photo 0 of 0</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer69</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>41</width>
+ <height>21</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>pgPrint</cstring>
+ </property>
+ <attribute name="title">
+ <string>Print</string>
+ </attribute>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout62</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>11</x>
+ <y>11</y>
+ <width>742</width>
+ <height>520</height>
+ </rect>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout61</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>PixmapLabel1_3</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShadow">
+ <enum>Raised</enum>
+ </property>
+ <property name="pixmap">
+ <pixmap>image0</pixmap>
+ </property>
+ <property name="scaledContents">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer3_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>438</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+ </widget>
+ <widget class="Line">
+ <property name="name">
+ <cstring>Line3_2</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>VLine</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Sunken</enum>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout60</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer13_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>70</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>LblPrintClickFinish</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Click the Next button to print.</string>
+ </property>
+ <property name="alignment">
+ <set>AlignTop|AlignHCenter</set>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer22</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>31</width>
+ <height>361</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout35</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>spacer18</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>360</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>m_kjobviewer</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Printer job viewer</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ </hbox>
+ </widget>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>pgFinished</cstring>
+ </property>
+ <attribute name="title">
+ <string>Printing</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>layout55</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout18_2</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>PixmapLabel1_3_2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShadow">
+ <enum>Raised</enum>
+ </property>
+ <property name="pixmap">
+ <pixmap>image0</pixmap>
+ </property>
+ <property name="scaledContents">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer3_2_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>0</width>
+ <height>289</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+ </widget>
+ <widget class="Line">
+ <property name="name">
+ <cstring>Line3_2_2</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>VLine</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Sunken</enum>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout54</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer13_2_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>70</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KProgress">
+ <property name="name">
+ <cstring>PrgPrintProgress</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>LblPrintProgress</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>3</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Complete. Click Finish to exit the Print Wizard.</string>
+ </property>
+ <property name="alignment">
+ <set>AlignTop|AlignHCenter</set>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer23</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>41</width>
+ <height>371</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+ </widget>
+ </hbox>
+ </widget>
+ </grid>
+ </widget>
+</widget>
+<customwidgets>
+ <customwidget>
+ <class>KIPIPrintWizardPlugin::CropFrame</class>
+ <header location="local">cropframe.h</header>
+ <sizehint>
+ <width>-1</width>
+ <height>-1</height>
+ </sizehint>
+ <container>0</container>
+ <sizepolicy>
+ <hordata>5</hordata>
+ <verdata>5</verdata>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ <pixmap>image5</pixmap>
+ </customwidget>
+</customwidgets>
+<images>
+ <image name="image0">
+ <data format="PNG" length="2126">89504e470d0a1a0a0000000d49484452000000300000003008060000005702f98700000815494441546881d59a3f681cd91dc73f3aa6f80dc8300b17d096812be290c2965de4cedd1d294e22814839832dc585250cd13a86444a0adff90ad95111e42b4ce4e2b02e452419ecac0e72d8cd1135216e02b68b60a538900bc10ace30532cbc570c6c8af767de8c66add54576f003f1db9d999df97dbfbf3feffbde68e8d1a347bcc9e3adffb703ffeb78e301447507d796667a3a0789e0a8ecf4d5d5a1570160a85f0dac2db57a2b1bff341073fa580d91188ba0d0c408a0015039c491b10b173e60faeaca9183e89b42d35757865ae74f592741d559ca36a6fff1e52f1eb0b634d37b6d00fcb00cc781354e098075ba603a8e08ce17a0e2da647dc500a6afae0ecd4c9c020667baeeb8b3cb5ffc9d3b8b471b8503232051c03455c643a65d0d50aa95a2268c75f77b6d004c2d9c2931dc97e9bcf84ee53cf6fcf2e7ed23ad8581e78130f77db7b191f0162064dc16bc8fc82b18030350ba7f6e87e7a94440e7ca58ad4adf8f6a0c0460faeaead0c2c5f112e36614b9ede783d279105b3d12c5e8dcd8d70e0040d7e5b4b37971de331edadc58b1df976ffff5c8bad1c0004cf708735b2a4c3b1b30ed9c86b2b5a08f62f4951275636d69a677e3f307848dd0395bb255676d7a49243e52972f4eb2dd6dec93272bb70e27370edd1b4a5d3c643aa2d679e7b4b740a63510430e133f9f60eadc14cfbed941e78af92bf33d9d6b566e0f06e4d000f631edad46283b0ba06d77caf20c41d8d3192a53645a9166291b7737d8fc721380f6bd36f39f7e8c10d39a6bf5060171a8f580ce293b4d98db5280f02dd500ebbce890eea5ec3cdfa1f3bcc393ed6d9436e79556e8ae013d797692d11ffc108de2fad232adb9d681855e1b81d695562fcc4dc784d6b0d7cd4824415361da16e59ece505d8dd629005996917e9b92754de1a63a63e3ab2da04163c4dcbf7dafed6be0f17f9e7992ae2f2e1f18891280d65cab2791f0a7db776c9730dcb6e6667b120992a7749e775089a69124e8c83a9565902b74aed15dcd4ea783d6da442287d5fb0f4bb5d0de68979c78f6cd8e25a1a6211ca09d7c176acdb57ad717af5b9763464f1f4710b69f9b9b2789307d619a998fc61879bb49e37b09c9b0907535e9b7195966184fb566e3cb87a5eed2bed746e58a383285bbb3bb839f8ffd75462a6a54a915eb5cf187c56b7dbb53e49d5f5a2efde8f1d36d74ae78ffc7ef993cde4d696fb4993a3f85ce3533e726ec2d34ab775fcef0ce6e0789602fcffc5363379f88d558510385a6418cca41c48075b66f044e9e38d9bbbeb4ec0fd43120c0e8e9513abb29320c7114337976b2c4b06352e58a2cd37eb273adb368ad54e4467972f46a9742c2035cfbfd426d6b8d2412cf482d0356bb3c7ebacde889e3a47b2929ca386d479aa58098c2b6338588a07348ac15ebac4405f3065cd810a061af8fedf52e52fd6ae12ded9689386ba4b30b75681fff7b9bc648038920ed2aff47142e56ac33d85d096b2d5d813ddcf5aedbd5470088c5e97bb7022b40a85c13db5c75d79b0805856719f4cc233e6dc83522459a984825260207446aeb1f5b1041f3ed663d00537805f2ba1c8d2d5371243c7afa84f77e74924ed6012f230a6bc094f7854acce78573e2c0549ebff5f5967770e2a309e228a6b3db79490422d9cf5435472972144c21ab1c6229db0631caa541ae068ed4d6579bdea9a97353fef3ce6e07f23d9efceb09d3bf9cae8fc0d6d70f0178ff27630553d408b1c86d596141145651dd5a512642a8be917a1838ed982687ce5ec7e67cb18c7d690d38c4eb77d70d900fc73ce3626bc3e73eb0fd7c9be3ef1c27ebba16a969d887c4e2f68f1a18b8e50839e15665baf32225b3f3849125e57da87e5d28d2b9369d24d74c9d9b42e58acdfbe621631f4e14395ac9691f110bcedbd2f2d2d8cdfbebf54cbf48f7cf1715e69536cbd403bb90889076cda4558dc8d84f276c4e1735e2d22a71b5e28e93009ad5bf144e874ca79922cb53db2a83c54ec83cc12e884dcb9746a0da3dd00a9ddb07e7b07ebf00e21e5aa8d062265dfdf36a2dd36957050c53fa5df5f8277393d83ec1fc1fd751a5ebfb452032f221ec1a22314a9bee511f11f3f0d0e99069a515a9dd4ac1ad13827474a00558b834692288e6e3c565e22461246970edb75356826b566e6fd68ab9a193274ef68c5a74da235421b605daee610ab1a8912ad32a775aaacc74590319e6172e8e174cffee06f1b184246920c34233692289a0bb9aacab505a73edca2489188131bb58bc6b187af7f4bbbdf58d752afb0686c570d7b980b46f19e4c2ecfb7d5e301f16e8e50be39ee9f9dfdc203e262449820c3768260992c42539e3654d65e1df3a7bcabf30896edeba3934797eb2470eedcd07e59715b5fddd80906121cdb48f50b846f6ce0397cf7f1030fd09724c8cb3c342236922c3626bd0a495f2aa36d8ca0f2c955a286dabb815d9fabd7610074a2dd1d92449e8bcc86a99374e9b3bb47e6d9d1e764e37acd34ec0d99dba40ae9405a594980729bde9a9dd17726be2077f7b5074998a6e178134d301f358e7cf30f3ab79469a4d1ac38288713a11f14e3a6d540f029fa27124cc9c3de30b7ff6d3fdefd96a17f56ef936feb3f19e44427bb30d4e5d069316795a2c7e3033b248c248b3c9e83bdf4786856a6d154ed73befa4fdc2857140d73a1d8e8176e6c28884d0d317a9679e5c333b374b927768260d966fdfb1931f76260de48857a165100b97c60ffd56f3505b8bae46da9b6d44849ddd0e972fcd7ac177f3d64dffd0b5a5560f34373e5ba38840b86871e912b370699c6a6e0f3a0e05c00309f68d0edacbbcb338d393086e7c76a7b42e58b8f48b97e6f6a0e33b01f82ec345c4d5c251bdf87e6d005ed578e3ff57e28d07f05f4643b55bbeab9b920000000049454e44ae426082</data>
+ </image>
+ <image name="image1">
+ <data format="PNG" length="872">89504e470d0a1a0a0000000d4948445200000020000000200806000000737a7af40000032f494441545885ed97bd6ed35014c77f863c40063c5862a83be50e48cd6a098904f1009485b8c0d209923e01095f798426ea0ca4ee4479830609e1356cd7536e874a5e3c642c9319ec7bed266953a0a80c9cc5e72ac7e7fccfff7c5cc70ac390eb941bd71afd3f000d60b03b48af15c0df968b12ac68c5f3bc340c43eb6f04eeec74cef56b18f05b3e9ee75d59293ccf4bdbcfdb2bedce94a0ffb67f25203ccf4b47ef4728a556da56ce1e7b8689df2987a6bcffb68f3a56c8485e483fcc3120231fed60b03b487f653a34e5a226801e00c141b0f2bd330c885a808c7c64248d3ed81da4da91dff2171c0407017ecb67f47ec4706f9803e8e3aeb997026ee9bb6055b699e34cb473755cae710fe817a7d73d2e53c6853d10c7056da256a6b0878c243292a8e327a86385bbe6b2f5748bee5381bb3602a0fbaa4bf75597e9747aa9869e2b81000a9a0f3fd71179e2ba3fca146f3d73510a701fb1e502ea13009695253e9d4e595f5fbfb0a10d039d9d8e25236958905252ad4e1658d10de6ddf508bf42f76597fd0ffbd9c8b98fcce8d537ea4b03ce37b735ff3da07f945216cc08411c07384ec142b3d164b837444ac9e6c34d9a8d26ce6dc7bc139fc4461fee0de9ec74acf68b763af99e25e5b77c3a3b1d6ba107f4dceaecf5b32c9a2951134caa130e3f1f9ae0fb1ff709bf8628a5504a71343e42d404ed17ed5488a291f5645516bce7329bd5cd73369308e11b16442de0682c70d75cbebdfb6632d6f497a743839d675597e85c003a7b0d4407cf9cf880ccf745915571ee21233f9f22ff8ccdbc2cbd8e7519747000c7c918d03504bdb8649e650f5113b9decf019d1f7cf3e1260037b7b7b7971aa8a97a93248961e2e4a4c2e9a943b3d1243808a8542ac8c8c1b66d0092e40e4992e4a01cc3dae90f07fb968d7dcb2649126cdbc6b66d1eb71e5bb0640aca32d81da4711c18269635517da3be3025524a635bf48da0f73a1be1f25eb810c03c886a7542b3d14746d2ec86f1176800e3dcbe710f630b85ee38fed29b7125000d4267339bd54dfda0e872dde1e51ea96f64b6f71fdc3f77135e0ac03c101d50335206a381ac0afc5b00ca40e23860fc253b97d7ae1062e547c81f03b84af937fe98fc07709df2134112b48c0699d0860000000049454e44ae426082</data>
+ </image>
+ <image name="image2">
+ <data format="PNG" length="1807">89504e470d0a1a0a0000000d49484452000000300000003008060000005702f987000006d6494441546881ed9a4f6865571dc73f913b702e64918842225d342242aa088fea22475d6470a1b312e9c6c15577b6ae8c2e548a94812e1a4611a25098eac64e37c94330938d9d6431e37b8363f3065b7a8b0d736711e63d9c32f7e25c7a7e9803d7c539f7cffb37c94bd289427f10ee9f73ef39dfefeff7fbfece39f765aad56af1ff6c9f3a6b0027b54f089cb59d2a01ad75aeb5ce4fb3cfc32c38ad8eb4d6f9a5bb17112be82f3a12ad566beab4fa1f67a742406b9dafde7f1e2c08c2ca3f2f8005fdccc74fe4c404b4d6f9eadd0abc42012081f0c23f96dd335ff9f8889c8880d63a5fbbfb024c83b102d6f76841a13081010bcfef2e219950e8e334891c5bc45aebfccafd15d47488222444a1025592108490b07a41c1c5bf3568bc3487be78fed4847e2c025aeb7cfddf9750d3ca833555a38fa9c2b511e08801f18d2ef1ed1e4ccf9c1477691313d05ae79b1fadf6259f0abca7adbf2ec0fb6bb142f77642b49396f706fb3c6ef99d48035aebfc7abe86393035b0207d3da560fb3d1cb7bb44377b63fbbcf2468e58d07a6a628d1c9980d63adffccfaa030fb56a0358012044819d437082568122ba1113dfea39c285d0ebe09b0f7d1bacbe96bbf23b01912311d05ae7cbbbb0b5df643e58a031d7a852c48357844e0bb51e3b3b11effdbd5b1bcdc72b4b4bf02a98452c28af1703acfe262795a311992885a2b44d449bae8d990f1658fccc22a05056480bf0be8476da11f19dae9b1f0aaf5b71609f12d65ecd510ac4f1472c18ebf8898fc82f5ece1149d0fad363891cab0a45699bed0fafb2dddba29b390f2bc2323dda373ac4ef76fb5f3aa84eaffcfc21333394a9e3c80d8f53105ff9d94396bebbc928a11f7b221381ce7e9b76d6464d43e3a925e659207a37267ebf8b58711e1db0f55fe5cecbe2470f12c4cc828250c004be3004f808cdb27baf45fbdece481c131328c24be64108a40f60276a63b23661a050d4aa9017ae58d87825af4805066c8862d6f53b3086f2c7ddfd163b1f8cdf354e94422578a9c08b71644ce651d4d3a2b000aebd5a137831d979e172aef68ef73c01747abbecc4b17bd61a46d9641a10901424031ec1b52f5c62a5f73dc8948b48c6704e5bd87879f4e00e70e2676bfa2b581ab31577c7be36318112b8802470adb18600e7bfb9c0fad72ef2936019ac5fd41566e1fcb70cdb7b8624ebefaf9abd671dd973555bbb17d37c27f1eda9fb3b3101c179f911bcbdfc473f8d55b6d4986563e9022f668dfe060b7137a4d931b4f67d24ca5432e57aa9a852edfd98e69ef2daa93ba3ae92ca8e2ee2cce5fb7bdfb98e910402b7fa9440f9094a4120e88662f1d12c9d3b5d5e2f46b0800a891f40fcc075b7f059c3621096a923e7607bafebc127034e180d1e8e188156ab35d5fdf19c036f8d031c0cc4a0e68a3048687c59b1f6550537173c08aaa3852886669410598352b0f54197e6dec0c056608c78470c3bdeb4d6f947f7373db8d091b002410881100621423d4fe7812e6906f13bf758f8460d3c20e2df17a1d3113a3675e00b9207321c8531766804b4d679feafebe5b5b18630088722a07c4a15f7535134ff5c5b815ac01a075e1c78b194e7c068777a01cbfbbf9f7c2931e8f9fab100ac6020a5421281adbf8c02efc1da1a785b4484e1f9c3a610ccc09dcb6317746353689ce7cb08d48117220b14c9a384f6ad08a8d632f594a92643416c015cfa36407d15e8d64f1fbb1a1d1981bae78d17d16004fa807b4b33a17327c208c325d0321abc0826ab7f10a8e5fecd1f1dba27182fe20f2f63a6e70995c6d8a74bf0c31170424e33d8bdbddd9706e5ba470652c69af2bc6f936371020678ebb9236d681e2fe2ac4bd2db00b94ac8bd2112850e4c2a449da6c72a05e6d2aefef299fe7cf7e746a48a56e1ca730a36bf7ee46de5a16554059e48ba819a71110983c5b23d4d13a2e87577e1d3448a7428cca6342f7d1e800b3f7c1b8aa57641ca1898054c17fef4ece9ef89c5873aedc5a4c4cccc2d102a4d9ace1047971dc9ba1df447005beda6b47e360758fefef50a7c914613823f94c0e056d07958e8ed4518dba197188cf560fd33a6be8504766ef56f052b226e77b5f4ed75b70c7ff373c7fa62379640e1f53af062b5595613200cdcf8f57b45051a045fb74122c7fddc383e0256dc24e9c198429c2521575eeb1eafda60ebe6d1409df43be9580269e693d84222d5b958e3727c40a8a6f689a5f9d693f96d001e1b81fecd8988f3b81ce0aa8840a8942f8dfe190bbf7b539e1878780c8122d7454cb9d928bf3494de97da72012effe1c9828731045aadd6d497bcb8fefac6d3c3c007dfb2c24bbf4e9f387880a9c37ee82eaac4e66b730393939fb4047eb0d23b13f070040285f511a1aa3ccfbd7876e0610202851544d67f3b77e6e0e118040ad35ae7670d1e4e40e07fc53ef95783b3b6ff02cd6f40286fb55a930000000049454e44ae426082</data>
+ </image>
+ <image name="image3">
+ <data format="XPM.GZ" length="29651">789cdd7c59532bc9b6defbf9151d37df4e38f2021a8070f801108346103372f821a72a8424d0080287ffbb57ae215512709add67dbee7013d5e2a3aab2d63c6569ffe73fffb8bf68fff1cffffcc76c6ee67df7877b34d33ffee917a3d1fb7fff1fffed7ffee33fb6b7b6fe884765b7f2c7ce7ffc977ffc879afde1fe505bf81fe276c27b882b82b7f1bc394e98ce4f1997f9fe56c278dec8fa65badf4e12a6fb05efd1fda69c309ef7e93cdfaf183bba3e3c11de66fa3dd3b3cdf4d880784ff8338f09137d9960e66f3f61a2afc998d73379c274be2c98ef2f254ce71b8c993f554d989e3f17ccfcdd254cfc1f09dea1f39a31f36f6dc2b4de4230ade76b09e3f9d0134ceb29a657e4172609d37a7dc6a2df3163e6273c33167a3a116f27fd8513c67c3eb309d3fa3b8289de704858e8c99f04d3796713c6fb6d5d30f1630263a637eb0ae6fb878c451f4cafd06f98de1d7ebe358c857f7a5ee2d7d408cbf5ca3096eb1563799e66ccf7e7d711efa4f5739f30f297bd0966fbda66ccebe58384c95e0263d1c7947049e89b33e6e7852a635ecfa37c77f6d3f582459eef0993fe6e198bff3619f3f3fd1ee132afe7d01f4adbe97acf58e83d4b98d6bf202cf72b97309e776f8c793d87f22cedcbfdae4a58ee0f5709e3f9fc5630cb77ca98f9752e61f2e733c174bd7a612ccf1f244cf4bf329678354c98ecf73ee2f2b65c9f3f08667f7861ccf7abf38449dfaf82397eb40957985fbd9730d1bf605c617aee05d3fdb9dcbfcffca0bf974d45fcef817185fc2f738cf97a151226f9bf0a66fa881e53dd668ce72b3b15cff6be14bcb38ff4940957b779bd53c14cef55c224cf7dc1140ff223c6cc9fdf61cccfcb31be55809ed236debfcd98af374709137d3b82391e0b667e55c22caf2bc1747d76c9589e7f2798e95b244cfa1d0be6fb3b8477997fb59b30f17f2a98ae0f729ee90f78beba53dd2fa17cb36dc6fcbcf02a989fe705d3f56640383d6f2c98afd709e3f5c1326679da3c61f28f8a60d6578331db53b815ccf2980966fe503f55e097f91931aeb0fd38c1acdf73c6bc9eae0aa6f5bc4e98d61b0ba6fbb3e784f1bc7a65ccfab32e6192672698e95d244cf2690ae6f5493e668fe59b9505b37c30ffec96643dd3252ce7fd79c2b8be1f09a6f5cd0d639677d64a98e8d911ccd7bf316679e463c1743ec77cb76be5fefc84319fb733c642ef2461bcdec9fdcc7f4ef4db7de63f9405d3f5f659305def317eed95243f9927c61c8f6d8370baff4d30df3f642cf6b160ccfcaa5c309f3f4998ec03f3cd9e95e7eb7dc6521fd0f3addc9f4f1933bf6a9430c96f8bb0617a4d4b30d3fb9e305d7fc098e9cf6f1226fd63bc867425f57089b0acef3f18f3fdee266192575f7019cf8779c206cf1f3336fc3c2398ce67fb8c03ebfb52305fdf134cebbb1961bbc3f5434930dbeb6dc264af4e30cb73c0b8caf72f13a6f891ce73feb08c0dc79b7ac2e47f4782e9fa0cf3d7be4bf9d81396fc988f088b3ccc2963e62fbb272cf4e61f09e3f5ba2c98aeb7c384519e798531f3134682f9f91dc1242f7d2998e3d59e605a5f1d3166fe4d2f61ca4f4dc1b4be3e4998f2f1b3607e5e57303dcfbd300eec1f8b8429fe2e05f3faef09537e4898d677e709d3faa42fe7d85ef430615aff4030e7cbcb84c91eb618b3bdb8c38449ff0f82f9fe5bc62c1f8bf1ddc4728dec274f98e45316ccf1bcca58ea892bc2a26f759230f9d783e00af6ebd98231eb331c0ba6fbfd5bc278bf2b09a6fbed3563d6a72d0be6fcd116ccf698ae67ff0f09e3fafe4e30d327f4b0bedd6dc2248f7bc15cef7413267b3e10ccf45c264cf49c0b66fbda12ccfcf71346fa0cd39fec639630d9c74030dbdf24613a7f2c98edbb9930c5af8a608e9f7b09937e1a8299be9b84913ecdf48bfde990303d5f0966fa5cc274fe5530cbab9c30c9a72f98eb0bd6af637fd76709d37a8f82f9792f09537d2bf2647bc9585f8ef5adae1226fbde15ccf57037618a2f44bfdbe37a397c1016fbcbab82495ea12698ed6d9030f94b9731db433e4f98fc615f30dd9ff37aa27f5f4d98e8cf0473bd7f9930d1b710ccf9a79f30c95f0b66fd6f274cfea304133d2e67ccfa768f0993bc9e05733d759f30e59b2bc1448f6e274cf17f2998f3edb1607abe6f30667b500782d91efa09537cae0be679522d61f2d707c15c3fcd13267aba82891e7d9b30f9c72963891f7782593e070913bd4f82b97e2f0966ff6c254cfae3e77b8e07ea4630e7b723c1ec4f689fb6bcc7f5be7184a55ed5bb8c39bebb1dc6d2df2ac19caf4f098b7e5c10ccf692274cf9bfc598e519ba0993fe0f04b37ea709937f5405b3ff3c264ceb5f3066795a2f98e3df76c2541f6e09e67ec1244cf48c04b33faa84293e77087bf61f7f9230e9ef90b1c4338cb7d6ef73ff96dd08e6785467ccfd86237abde17ed99d08e67eec3c617a5e5ff05e09f97b27ec385e84c784a9be25fd79cffaf1a87f5791fade5f1396e7f9c384297f3c0966f96d31e6fe2cc8fd5c9ffb63c14cdf6dc216e5db63ccfe19fa82d93f797dcffe9e6f33667bf098df9c977e3418c2a9bfec30667a32a2df0b3d619a30d213de191b3a9f7d248ce7b30963f1df4c30dbd78b60ba5f9d268cf77b2f78bf8ccf7b209cfa018c97be92fad543c6d27f633cf741fac350219ceca5c358e641e7842d3fdf8d084b7ef09960969f4a98e2614530cb07eb8550957ed279c272bf7d14ccfc8d1376c8cf8c31c70f7fc698fd3fbb63ccf2f3fb84bdf453747f10fbb223c29ef355b62598ed2b08a6e7ab37c6525fcc05b33f9c0aa6eb5d9331c72fa30807ae771cfa4f5695fe327f27ec391edadd84299f2f19f37a6a3b61d2e79b608e8713c1eccffb82893e3364ccf14b3d0a26f9ab07c281f345b811ccfc5f244cf1a429989e6ff61873bd679b09533c3b13ccf9619230e5ff743fe77f9647907aee2861f2a73bc19cbf3f122679b71973fde6e709537ed782b93eeb10ceb89ecece1326fad1ffb34cec27cf0553bcf48eb1e8e35d30f7272dc681f57128d8a0fc334338483df62498fb9356c2643f2f8279fd0bc1b45e3e4c189fe7eb8c59fe613b61d2f75230fbfb6dc2e4dfb23efba3be12ccfef49a30e58f2098e91b0826fa545a8fe8cb2f19b3bed547c2445f5b30c7ab9784299f0b3d52bfd712a6787b2098e3e53261cae77782b95f1d264cf545ba9ef34b2698e24f7e2c98e3d78e60e2d7cd19cbbc6085a9be1a09667b1e274ce7df0473bdd24898e28117ccf1a79d309d2f09e678534b98ea95f43ce66f5730e703b1478e17e63261e437cc0413bfe122619247a2dfd2fd146f32f137dd4b98f8f582591e36613a9f0be678f19130e59b8560ee175a0993fd7604737d7e9330d9ef8960f26f5d134cfa762b8cf2b1897e928f2e096679dc254cf2b8174cf20867825d059f5f612cfd739630f16f04937cbaf384e9fc9360f68746c2e40f8782393f1e254ce7d3f3b95ebf4898e2dd9560b60fe1bfcaf6719630e5d363c1240fff9c30c9235d4ff2c886829d47fc22d8a37c72cd98e3857f4998f817fe385ea8fb84e9bc3c5fe67bf584c97e9460b69f743fe7cf7dc1ec4f1f09537c16fd4b3e4ef4b2fd6409a3fcf48e60929f7f4c98f285d83fc713534d98fc6f2098e5d74b18e597a7f57c40fa453e19c7d3e784493e53c19c0f5a0913ffb27ec6fde745c274fe5d30d707cb84c99fc41f32ce0fe27f19d7bf0782491e4eec23637eb70413bfddb956da68f5573fb5d50e8ecdcf3f3be8dec2f1efd281b251daffe6c3fee0f04841404e7ecb73294efddb32098523fd1dcfd93fd1e96fd249fcfc2d7a093a5be346641d7ebbbeff542fbf4326490fe6f3513ccfba5af94daeddef78fe6ff4974d3ff09f74f4ddf5ae70cfdfc15f0ab1e93bddf0f1c9affe76fef2758cfa2c6fe222dbf0afbf9bbf3c4acc82cfbe7e421d0da22ff0efd127f0887f87cf417c3a7ff6ff66fee2f5508f80b2a80bf97c02ae9ef50b5bdf408ff1ef2ff0b749fc1db9b67ceddfc75fa640a127ea108ff48c3d7ea8e77ac13a1b70dc7a8563a2df90a32573f577f2178fd6122dedb1e003334d39661175851636d6effa03397965eb3b80737f237f01d9077d085c44aa8fe0e068cbfe41c713505fd3c7c0c509ea25ea6484f79dfeae58f65bf47206149d214591ea3a50dcd04dddd26dddd1e7fa4277e1b8d457fa5adfe85b7d077fbfd70fa897785fef77c5b2dfe22f877a0b2852e0d5db7a07282de9b2aee8aaded57b7a5f69a59451f13fab9cf22aa84ce5ea51f5f5bd7ad2560dfeafe6975566f37a3db74bce9883c534745b0dd5483dab17a07aac266a8ac754cd0a47fcdb04ceced542bdaa37b554efa0c7687576e3199bf1ed4fe3dd4ffc058e68418fc9fea9861aa80f75a00ed5911ea99a3a5627ea549da93a50db409aa7aac99f2dd5866386c78aa37874d4b9aeaa0bd5051d5deab9ba52877a086b4f74aeaee1394bd0db4da12f921cf657fd0573b5bae5bb901b75079cdceb857a80cf9eda52db6a07745102ea67aa0c9457e068c3efc563869ff45301beaac855e447ab5db5a7f6f5abd110c53d44f8278c790eac16cc53ffa4a6f8b9bfa05e12260e21371863ac2e1b67bc09ac03e0c46470e4406933e966865cc2a779444ee8a72c3a327df36406666846e06f27910b9054a438d610cba23efe4d7ff95c099e9928af17d537633331642f4479b5a087e91707eac6cc9897b62a9bdccccd02391a9b57f3a6f6ccd2bc63b48ecf1d4124afff4a1cfb498c28c82446d185f93007e6d01c999a9a820eca40518eba98910ed6f422fe221c452b134b84c31cab8a99a37e4ef4ae393567aad68d39cba803fd64eadfd5de7f2dbf142c6b0b7ce748d7d5d234f49ee9a344911aa4b05a885b2bea57feb33ad72af84e05b9895200ef314dd3326dd381670ed1b247c936fea4aefe89bf708d4b3ac9e033074ecec1d72728f76a92f10c71d4495bfc86cf559255010f66013f73d44f0b3e89af0a7e62343017a66b2ecd15f8cd4c67e65a7fd1f3fc457f91f821abe5ba6d6e20bc44f956d90372a02a4fbe22f26e6ffcac7ca9459fc8c98c75b9f2b3a9b9356fe6cedcc373b7ccc3a75942f844dfcff34b8c90b152f1a6673e40275b663bc524e0c6ec1007a644d6823e90938e90ca46ca9a101d4c197c7dc55fcb94d37524018ad4755331555533bb58afcd388e0ecddebfe92f319fc42a70817e7203d5c89465da260f409d44bbdf37945fc82f2616529d2a991365ac014d7620034de5c75af69916e69a49f435b4ce0a4a68a2ac75a66d3d70936889911aa3f55fafc79ea0a28f31255ad73973f2885a99d9c0765f627f402bb11ae29bb599cdeda3eddb27b56707766847f6d9bed8b1b905ae484f2d3b61bf2fd33af05941df89dc4eed0cf2d7317775b1ffe96fc4d4351dfdc85f16b8d2d8ceed023c7ecab95d72f98ce48bba89f495808657fb6697f6dd7ea8be3dd04d88e0f7f6503fd823ddb6357b6c4feca93db328155bc78cd3663f42cb339243bd6d405d7d5c988e0c0afd4ef8ac973ff317db8415decc956dd936c833fa491975d2510dcc2a15935b4b36a55eecb9bdb05dddb297f6ca5e432c8a328ddd70eca2e331b13790df4ba0af5ba8df3a14b3ed5dcc50290244ab6bc06a137b6f1f6c0fb8891d5cec817253df9c45ff92bf3cdaa6ddd237761bf2c92ce5f6980b3902472aac32db76c79674c796b9031e70b74cf5740fe72f6788c7e6dd566cd5eedabd986d71b52a6a05d7a7ac0b24472def3b7058ec47a9bb7e2ec4aeb5f9db4ffc056a57a58e9dc1a736292e453f01fda0bf381b9feb9cf32eb82cfa96cbbb733c1ed12a80932ecd6a1e795df8bbba341faeef9ecca91bb821fa20e9a59aea872a560d1d37d20f2e73cf20a163ecaebf98c37de32feb3528f0ed5e540f2a0baad41bc94b66ec230de464ec266e6aafdc4cf7dc8b9b63af3fe099cc2cd50eb1bf8f9d34e5f34577aeaedd02b87945df99b2df552536625c9bba37b78422f60a7433c66e7bb3b70a9ffd85bb5cac4fa17a040a207665708cddbbfbc0ca7155a580d4a2df449d40953bb003b5d435d443712dd96739d3cfee007e7fd487ee30760bdc3d283d7247aee68edd49e406ea8119e7a6294568a81d4082eed49d814ec8ebfb6beb7fe52fa1c0099d9de393eb9021efd5b66b603d5fe1acd62cf42425b5eb9aae653e701ab1d0f34f31e6ccb5b1c35290a796fa49d55cc79dbb0bfd0e56d8d547a0ab86bb7457987d5a6b751bd70beedaddb885bbd53d7590fa595fd891fa4e2f8e2bc999ba77777aeeee8d553b2660766c631e6c225f14371beec10e5c0bfc64c2def8c98e410fc144bd400c733db7e5b64dd3ede86bdd825e0565ad2edd992bb9325b5a8bac57ea3ab0b2a1abb800be32d0539abdb1c5baa25fafe925b0bf446f1da285c5aae1439731ab3459664d9656b4ea89abba5db707f1e58027448fdd79613d9219541fea06fefeaededd3e3c628cf570c52be8f54fc0fa0ee1be637de38d1bc43ccb79a6b5d28b9a7aeb1d549b395898e497559df82ff4829352c14fe6c07bd47e23f5ef54fb821dfbe0339feb1acfba581abcde8a9b43f70296f4ea1f7ddf3f61468951640c3e52b5477e00d1e20eeaac1377e6873ea0d4daec3778a02d94fcc83f43b539727971ffa658036cf80bf17bc0f3c72144ce9aad4146939eb1c1fd4aace6a760113b2e407c7171dae75fc0b7e63c1fb61bf37cd489577e8c1d0f54291e6a183ff5330d710c24d173753f5735d0cd02ab1be96e44371071fcab7f03ce97dc3daf4d33bed60bc79717fcdbc8d45dcfbfc7e88f95e494f34b05aa2fe0c54cfd873f303d88da75ee3707fa39e5e555668cb3b31dffe60fa34e4cd91f012f351bfb1fe58f21862dd425581974c4fec49f9a2672534e3e2391adeecfc046eae8fdc5189674b3965f42bacae2ef4b5d777bea19576e15662934752841b55201ea7bbe8139ddf00c65cc6b65b107e535dff4b56f829f0027a9b7a1da7e6cc7b60aba19a06e5bbeed3b3c3f903ea7257d8d3ff717bebb16c33ef52f9ff268ac8b7b78555397d40b585645662ba92a076fb417feb23b5ff57d85d8427362d00b5884f357b6ebaf31b7b7529dcf5d57b45477e26fdc05e8b7a7fbfed6dff97bf4ce99e47ffc84facc3f806f8e919341617fda6df88b5dcb310e2bc1f87bc3f730864935df4a329d402ddcd56fe089bd8297d33a90fb3df483e43f6ee1b7ed183d1eeb6b9c52605786b9377264fc8e2f419d0554fab2b9832a40c71ab630cf894f8e3dc01344fe1ed714dfea456cbc3be7291b52e62bba821134e904f41375345375fba65bbe4af3928d7efc506ff917d00b70e2afa025dd454e26989fb837e14a32e68f89557ecfef43f50ad20c5a9f07654e3032b73986911466aa6317103329536ee8a5e02f36d978fcfd1dac8c6cb2e56768bd229f36775cd1c296f6525bd08bd79b7b90a7d0a347af5fea7ba0cc60444f9d34d7c2521bc7caeb24d8e07403a91b041f02cf4556b5c58ca63421831c33a2fa4efc3bcd88442f2ec51e9c4e402c8a57e65063edc2aa4d354bd57dd4cb23ac9a874788c6b4f768d6f209450188c21003b7439fad4bfa12ea1fd1ba803b907978b22f1afa9d58d1c03a47e63e0cb04f9a26ce63fd7f8799f9d456dc7d918b2ff2cb4a2f01397b065befc167270cd766f5a417a88b21fa7c8411e6e0d15a9e27698c40b7f71e6acef01cef672fae16ba2df2e8a9a9d9b1db82bc51d63954391eb22a646733d8d04b9bb2407801e37fa19ddb7498effc050e87fd75f4835c9febfdc284b5497a516d08d963a7717ec5fb900519c5fb27e0275ba11f390913964495ad8ca8c33acbd4c2d42be89e15cf90632e72b6e28731a74a97c7331ed095b90d33e8f4ec9a5ed29cbb905f6c318eb958c54cf4054d2ad20c92f5a24a616e0fa0c2f750bb8e36f2afd5c7c1fb7e58c4a8019cb4d837d6e7fd312ea9f0eab7fd2df895d10738ebc19ed357c25bcc4569ce334b7920c07f4bd4cb2a8e7dd5573ac9a5aca399ce7d1b677ab2a644e486393187907b9e39134267a5ee211fd38e9d023f51fe09ab95d8bba549114e6e3053464f71c3f01e3ec0e7e2b363d5f442eb0067357d6d4ef8b98d24458cde76100e90be1c690d9ffa17d1c724e986bceb555f59b36eb71c258dda83faf9516750e3c2b57e4efd27f62e6fb62bf9046b8f781f4fc18913f0e376380c47a1061e3f8bb1137412b959180d6b82859a3be4651591658fc084638c773eee36c167f64dbfef84578e72f1bd894bb0b159eac5452f281f888ed4c7473b1f825e6ea0165eba1e542bd7348f48b3fe36eba445b3ce68fbe1249c863337f575ec4786a89751a847bf311fa151b08769e204fccb1cc64cb0ae97357f913a4cf41277b7a3268fed13fbcb6c4d2f201f5d068f1d8245c57e052a5115e53a51fbe138345d8c7d13b3a0faa318bba4578c937137b4e3d0f297a1ed0e43c71d4257fe087a59826597f515ea85fc5426b4513adbba0cb51be9c5723efcd4bf482d1579e529a78b768b15ccbaf7c7cf8e1de98718eba46f0f6dfd0efd890ae7587755638e378f661ea9169dc81e19e038499f9a00dc5c842e449a3a74d171870aa402b579cd1ea38d5265304df572ccd003d68bfdc65f24feb8422c8befaf1c43efe2d6fc857e8f53ab671bdf4aa03ae111ec7d6296d069919fb43082b6d3ecbf5db85f66fa2d8c0a905dcc58d5a29592cf45cb3657e1323c619f44951855b47077b88222a7b111773fcd2d0b712c5a5cbf3b87eafacd5695e7eeebb110cba002815cdd86687c16f33ec8f320c6ae708d91b4aaca3c212f2b99ddc7fb674af69631c6027db1b3ab87d770a39e2026c6a907d40bf0dc56b8c5597985eb58a91726ea3cdc511c2bf4f95ff52f2bbd0c616507f9f55ddf857bac5853df8d39b80cda1edb1af814f62710cb9e21332ea8d3e2b97d8b7b0fc94ac57db1865aed4e34ac3237e1062c36e76c9d3bad76e27c89af5979dd042ae82ae79762bff5555f69531c1be09e4baedbe1812ba30acd90e31370afd49a539751270d16f2e0b6b1d39a851ed2d9a038c631394661d1d32ccdbda8d36e624596872db0ac6dc851e02f6116bbfe38a726db4cf97f1276420927e55feda316fb7dbfe62ff1f7a53d0a65eed049b6adb4eb3256233bc71e127276a8842af24c3b7955e4a5ca563ee38836e70eacb87726dd6527ec424e897396a5f950396878265db292a9ccd4f4c31e58f6db5aafb5d9bf7c9e8dbde0defa086ad67d1b9f55e6fdf816cfc820e68279dd41eeb718959b19f41c6ae227be46b107baf92af52714b1c221cab785be93a519cb4c6694aa0375e89d6e67c605f7013d4d60bb6ca21466998d512c1c835f76d32469f5bee0e67c6cd543c75c3150f7b166757b9953347d5ded3fcee20e853db37de8f7dfe3f5ee026ae24ad4209ca18ab8ccba98a13c8f32afeaa883165ad6c6fe3fd69f1d9b6701fca1857325ecbe582ff1ea06c86fe12fb22cd5f4fe477a893ab1d176413ff759ce557b819be8fd56d9dbec112a9921766f2d779cf52192c6377730bb487fa24ad95336c886d908dfcda8aa365bcf34edff538c9ac095cfd94b368e3a544df0b6471b30feb571e23fc926d91422523fe925ff623e26533ad18b74585bbaa76ad92ced2850749d4b9dabceb2b9ebe3ecdeea13b3b4555381da83e65bd233d6329d2d80d369f60a555a7d2de3ca5e3f5b2d58d25bb6ccde53b4931d44da93a9f90f7b687a3c1f0ba926dbdcaf2c7abce49a003dfb96863ec5bf922f73f581b314ecf33a76cfc55e6704b5d8489f4047d50fef182b66e427ca641f7e3bf69fbe6e2fc30572d3e03e75b52b017a46ff295124000eda96e69754bfc5951afe5597e244491d14f4f2fa699e5c9c25af8e5e76601efcd22cb311c615f2199278cbc41d24e8d4637d941d425539d4d3ecc81eba63e83815c6a6688563afb25aac67b3e3d00eddec24bcaef5a932ff9a6154a8a08466b44b957e482a253bce4eb3337750d87771a8972ffde5ab3dda18a3d40578e304bc5af2708cb73c4d34533b7435cc4bb17739700bf09bba35c08781dae03a6bace657f0d487ac99b5d2be91ec9e3347a9b668ab62351be7165337b0c77a87664438fbc9b23672633fcdc7fed57e65ee02f4df51fff14d04d97da32a64668283de5037e214555d456e624f9975fc5ed6d197ee423f66e7d833c67a2bd6130fd905781554085937ae64ed5a1d2eb57dae6685bf4facca2ea1d7998025bfb085ad66a29ff4f22ff62b9d3dcaaeb2eb385336c7185167f80e0c59c4d4eaecc61ebb33fd6af6e0098710cddfb3dbec2ebb87bebd1cf78ebbf3ec21ae07dc1c046de7594fed82574d8ad626d4176695533e62ffd0ccb64c47cf5d3dce418b7b6f5feebffc8bfd7ddf85b8be1d779338afaf621a5130c9765c49df687aefab677afa292b419ff18e7bc9b8ff02bdc9b33e036e16a0e7be1a9a41ccad3cd1dbd4cbaa269ff1fa65a831acdeca2a9801dc5a8ef9a5fdfdd036f7ded97b945bb6cadb1ca1e3bb1ffdf8edfab0a56a7ae4ea6617fbf601f42507e699abd55eb68bbfcfe35b74fa21dcf919ce5ae6386ffba49bd45dc35fb2bd6cdfb75c3dd7380b5deb5dbee95fbe3d7cc3bce42a37696a27d53cd755b1d6b40abcf359df1883fbef1e7b4eea51212a64e7b9f538fd7175ec79e2aca595bbdc537efff287669b53e83ffbd0b338de37785cdbdff9d4bffc89bfc4f9f04cef40c6dbe53dad76716f24c6a05807c4898f1fe7c1b7838fefb0c489933aa21ddc6c17b9a35da538031be4599ee78f791ff3d617fe82bcc099fc291fe4435f918ea0e02fe12ff84b9c257adf35cb7c646e291ff3dec3947328f69af896c4c4dcfa8e7f83dea60db29ce08461a4174c418c41d0cfe7cff1cdadfc25779ce3bff414e60abab51c7a255fc927b8c3b59a597efaced30fdfb7ec87b6efba5e3e7555d10cfbacec63b6d8c621eae87d779acff2b9a9baa9eee40bfa1e8caaf92b3bb71573102e4c237ff5b1769ed2cc8ce896ff8bce93df409eccdfd432d60f38b75bed55ae2ceda7efc34cf05d8751fe9c2f4dd73524d3e11b12f2ee74f14d3678ba32c6dbb6cded5bfe9e7fc477fab3667e901f669dfc08326f27dd2371f1b3660aef9a9b13e863976604516368e87d9849b234c9333fca2f3acfb2ee3caf696bb7f2e3fc846aaaf836ae5abd5598f3bbba65ec2a27f88e9182fe3740656a80b36d386a9855900b7e9fa6cd75f06ad6325bd309e9254aac0324cf20b248bdb8fafe5ff8057fb1f9336a37ee77597315eb5d4f93a6866aafbc364d0237672eab4fe27a8e71b092fac6d5fc0b7bd1b4deea686175d009b7a164ea6bfbfbc5fdef9fbd6f09de4a59cfdd43743ecdcff27aacd054c35a9c83e5eb87a2f9c56c85cdcc14fb62e6187582ef6dad7c45deb85ad30b7478b8eba7f2064875f53e8c59af1f7fe22f7953d7dd6368c73d30770b7a6a85929d19af56df3c903d5fd64f7afb437250a127655da255617ff255b6fff4ce39d4a360b3793befaceaaf35fdfc34bf78c815b9afe28e5e4f6f993debcd996dd87ba86ba2df649c3d9b6af57e72dacd03995aea4fb07fa3b9c62cedb53db28e78b7297f5af9ceda3c00b831cdfcdc5fe965f15d985fcd2ff9856d428d15e3c7dc5c9b87bc9b5f4236bcb3c3fc8a7ace35bdf08e498a4dcd0d194bdc9369914c01a731c7e7d7f8ad938d3806b95fd9a93db11ff0dcd52c4ffce58bf7c7bef597f583f734fda57bb25d37726f380d2cbc21b5166165d78175c655762bcdfc29fe5571b2b367fbf9303fe19d9bf4f62f4478a894f31b13df37801aaf40d7dafef50fbf2fb6f1ce769c6043543c76175929bbc88ff25b43b3932ad2f9795f6055d9cb546a568861683f5939dbd70d7f696bf634e61f6b713a338d71dcbc9a96eee0db70436d0afaf8e5f72d3fe9668473cd57a82a4ec07edbfed9ddb88a6bf0776048ee6555b677f6ce9464faa8a42a8d3fd5cc82df34b0f229b9417e976dd9b96fc5bc01d5cabd1f47db8de7884fff1ee79a104be57b9c7ff5fde4d551ec17f05b86f11d487b05f9e7108878f73a7f30359c644d37f4b219abf87b6366db43b682eeb7059d56dc23851a3a9fa8ae5dfa31be2331094f76eadf750738f928bc33be3617fb95fcf2690e40ef1b4365037907f22f44eb5b9d1b63aaa196cfbcf60f768a6f867ffef61b7df36da2c6e63673792fdfd2a57c1bfbf8b9deca35f6f07d7b6546f98e75406ed4c910fde48deb2f9ac3c8bce897fb974f32c06fe5e2bb9363fc76da81eeb95ba8959af6c81ce4259fdb27bb08595e0e2f503707ac616aa08310aed4b97bf5e7612f1cdb0f33b287be9b9dc55adad5b34a86fb06b80b12bbb552de807c721e6317e0a893197662a3357ac2ba5efed45f641f4a6471c4ef82937ee27cec404fadd7e3bce2ebee1e389ce89ab9b215b50cb3bc6a0740f945766507f93cdcd9aa2ee976be1b0eb89688ef1ef59952ec47f1f731f8e39e7b7619cef5e30ef823451dfafed85ff417fbf9c00e78a45fa2fdc6bd4ad9e7c7dfe9edb700b2868ac796c312a86ed84bb7b097ba110eec55dca5faf2fb9403cdef7ae21bc5237c0b78193fe3ae397233e24cb99a91fd6a7ed9f8f75fbe8d71eb9a97f7bc060529b8c2b1fe06f1fadfdd865dacddf71d9dbfe02f9b4731efacfb15d5d4aba368d7eb9febefad095e9fb3ac4be25ff8f12f7d1ff90bddaccd4236652e4fa1efec17ef2be66b792f735553d8f4aec1a64dac66631bf8c7f9655dee2b4ad7f3eeeadcfabf9560b1ef9f7cba4fd65dcd20571defea9dcf955436a5f429c7fcb01e0b9bba59d3cb37ff46d257f9794d87f9ea5d8fcde76ce6b6428f5fc46bebfe502fd917f2dfb4fbaffe5ebc3f2bf8165142faca379ef5ddf728bfd6c9aff5fbf1f36ccd96bff1173e5ce1907f35a2789ddb3c3ec52d7adeba5e0bcf4d7a8953c40ad60abfe22feb32ddac03566f8d16bc74d342bff0ab753ff8ca0ebedd9bc4df69e7624d2f3fad917fa56edbb4f99f9effee795ffad086a4fe0ffdfb63ff4f8edff4ef8ffd2d3effbfd2cbfffaaffff8df2c3931f2</data>
+ </image>
+ <image name="image4">
+ <data format="PNG" length="3339">89504e470d0a1a0a0000000d49484452000000300000003008060000005702f98700000cd2494441546881d59a6f881c659ec73f3d94f0aba3e59e820e74c9784c8504d2ae2e74c41789770799b0617712179c0982497459cd7a6824e0cec4239ab89cc6855d270aab9305cddc719a645f683c382f3958487ce13979b1302eb23ac2ca76c0601597e69e07525cfdc082b9174f75cf7426317f140e1f68a667baba9eeff7f7f7fb7b6a6a7373737c97d7d0ff37806fba0280f9b7c7168b1254a17ddf5100b48489fb2738f9f649f42b6575b2bad6fbd287ff796cf1f21b690994baf41e41d5f53f2fcaa56b9d566f4ad0c2d18c4708eb2113f74fd4b8c1559b9b9be3e46f471729c1167ef31d8f1dab008116dabf78f55a4fe2ccbf1d5d6cffdd18043270b33008afb961a19630009b83b31969d7b2f0a70500e2e1f886490400e94500c529588583cf6d6772dfb1fe453b1fdec9eceb33ccff617e71fd3deb6b5a0aaa30f6c35142b936e8cb97cd2daa8aed5a3a173a5079273211d3af4c2f4e3d3575dd2486003a4e59c8a0d385d481089c7e6bb7f7803a665f9f412b477c78eec34555877ea5a82a85161465714304a27a84a91ba24644329cd06ab570b9a37d4f9bd1bf1d65f2e7932b42f46b09b81c6203ed1161e21e61ec2ec3c696c0e7530317efd9bb074a30c32d3477b86e8aaa42c90d930825444408eb21ad752d6cd7928c24b4ef693376df187bf6eeb92e1201c0585b681a211241ea3152b744f5101190f024e7d20900a65f9eee7f31cdac4fccdc61308808059ec4f5e402784f0098ba21bb981137620046378d02b067ef9ec599dfcc7c6d380d01b4d7195a6b0cad3b239235902411cda489899b440d186b9ff4162e414be5c03307d05239f1bb135867073c71bde0979310592a06712326194918dd34caf8fde3d7f4c41040321213df1e615619cc2a43d4308402613d444c0841c844fb345a7a90079e3bd04fbc136f9da028e993e8e5c48d8454af10d8dc5e91c4d7e5c410407c7b05da44448d10a97bd06881ed16145d8bedc2e8c8bb7d125a2a877e790880993766b0aadfc81300ceb92b92d8f9e04ea65f99be228900f08001cd0b6c17287d8501412f3954a1d0a26a504b6beae75314ea2d3dfbc62c7b1edfd3cf89dedd6f8488eda6a005347d68f572a2b78ebe717471f7cf760fe4446d6e6e8ebfce9f5d44152d152d3c019b03a5072d12120670f6fc385a2a9bd6ccf1fe671bfb7931736486471f79142d95c9a7268944308dd8c7f67592d83abe95f93fce43e9fb8131becc9a5b8d7f6f22acb32b3a766d6e6e8ec5ce9ec51e68d50209f0210444757fe1e9cf3cf8477e308f9631628499b77cf269451e80129eddff2c61c00d91b0ceb2f0f9822f0ad6a1b923cd2c2e775867d15c49d394244958ee8521f025d1baa2021c124a48548738f6497dfab37100261f5c206a46881122234c1f8caa50f3c08fbf791c2d95832f1cf43991bbebee135217e2664c329c902409cdb84932929034856438211e8e894c44e78bcec0f7867aa023131219c1ac129a4993786d42d48c38f181afc9933fed604c13d330feba7a0881f0daaf923e89890726e02baf9f0e3e73b05f625deeae49220c4292e1c4573ef164e2558269b6889b114953309141731df8de10d02f9ff1ed867824266a84988661f6bdb6af36fb52a2861056b9a9aab8bc005534774cef373e84bef2d5e9d47ba728ca82a9a7a7b0ea0bc2724f5c8d4851165e629808118369c424ab0ca62e8818622368ee06be330470b6334e3c9c609ab1b772b3c9e17f49d05299de672914ff72a0b95238c53a25cb52dc058bed3a261fd27e89ddfaa3adfdb07a72ef93de13cbc2e94af9d023d56b6a61008222f590283218132181ae50c043bd8d66df4bfa567ef1555fbe5e78dc52e41eb4cb32b22c233defc8d2149765a459469a39b22f1c3685277e543531f5d5e9ecfb67a184dd8fed1ee8d8571580a542e93001480061bd098031115164a09ef4678ede0a80ca72c28157e27e879d7cb083730ecd0b0a05cd1d5af8f049bbc6eb2409a1b4b83c01165085890d70f2034155d9b86163df2bbb1edec53b27de816e8a18af467bdaa90f1e500411c59521940551dd607387885cdd033d6dd3ebb08ffe608ef44287f4f382ce17d0f97346fa85a57321253d6f71ce917515e7acff992f903ae8384873587f576f32f3f79cffc8d7f7ed0f6c5f91132c6f8ea5221540b38c5c54618e8374a95c2ff7c0a1e70f0dfc71e6bdf56c5a7316d54a1a28b85ce98d9d5aa6481d8ad2e094a50ead0eab7eb7248185054fe28ebbee007c9c4f8c4f70f2dd93a005520f3175f12402e3d16856210b91a0404b475182a987b820ee131cf040cf22877e79a85f294eff6903d905479a299d4ce97495cc292e5752aba40eb21c6cee133aed2a1d27fd79376e541b95f463bef3e70e5a2a5b7fbcd57b222f70b9faf0d1ecb2f8f69a48a44958ddca082b3c3004b0f5bead35a8b4cd32d93cefc6c9ba4ae7a2622ff9d1732155b25cc85448bb8eccf921ddd4a1352c6c58236c5c239cfdc01be5b5fd499f487c7b5c4d79cae6d1cda4ce615d41967b2ff69b2240105539e67b485885d4a0fd971dab4cdc3f51eb558f992333fdd84c192773ca42a62c74bde553071496b861688f08a3eb3ce8d6b0d21a8938fcb6434be5d8cb6d9a719353af6f1cc8317bd15b77f396cd689e416ebde7ca8a482f24cb145008a0e0ca5264e05c68d743bb6a5a2a8f3ef628bdd0021033ee67e5005a4d185dabb45b31ed616ff5d69a88248969ad4d38f8db14805347361019216c406884f9d3e37df74751d42774f7df6fc6e60e5c07cd53d0144aeb5ff83da1ea0be5d5fac0b2b5fba7bb6b3d7176fcc4f1fea677ac19ab6665e367d71121591bf9e96d95c134845dcf2ca0aa9c7a7303d47d531211045f56e7ff7d7cb02b17dee3776fdc4cea0a6cee73cc7f5e010d04290b08400359d107ae7832f7e4e34fd6547549db54d63adb69d35a1733322c447158495e43d810b6effd088033ef6e42024102f1f2bcaba873140e6cd771e64dafadb4546ab525697fefe8369cab7a8e2a5a5692a1549010ca2afeafe581de9a7a6aaab65cdbf89bc181b70ca18931c6101a41eac2d647ce4109a7dedc80e68a3a45bb1568e748bb4a7631c3598502cecc8e0ed4ffc5453f6cddbbc593b0cefabcc875593e144b84ae8700c0d4d353b59eb6e94d5e00075eb584756fe5cd3bde07e0d4913645178aae7ad0ce79d097aa3cba4530b70a120a72abf0c9ef77f4ef37e0892ddb409534571f3aea5f12ac047f4d0200079e3b50ebe9969eb6d1529978ec230fbe84777eddc63af51dfaa2432f794bcb2d82090509f08ab22e440d43d4f461f7e5c74f0cecd5f3c4dd5b76f90166b9076045f85c170180179f7fb176b9b6e925f7d1e75b64d6e1aa33d49e954dd41b058568d8103685a8699086601a11cd46846944fcef7f3fdbdf67c013639e847599af52d5badc07d77dbc7ef8e5c3b5cbb54da1053b9f9ec784ded2a62e7e5aab123b6a0ad2349846843151ffa7d485506c8548f99fbf4c0eecd5cf89b15df87358f5244abd7a23bb9e35f39b99da726dd35b5bf7cef9b0687af03d2b7bad13fad031cbb62ec1e6517f30d27c505a5fee09e7ec6097be590200b3afcfd62ed73600eb7ffcaeb772f58aaab999c08bb5225f52a1ce59d415b8cc622f386efbfe1100ce1c1f1bd8abe789cd0fec23bda8a8da15473b37f58466fd9deb57681b4a58bd7e96b00e04e227b89cfee7ce151ef4050f3abd906133c7f7b69c00e03f66da14dd94632fb6fbfb2cf7c4b69d4f5ed10b37f9884999fef5f40a6da3a512de7618d4e19cf5f342967a4b671e749a39b28b29699a72f7f8bb001cfba7365906e7332575ca4b4fb50676eb7962f72f4eac98e46efa199904303f3f0f54da4697aad35ffdcd613473d80bce03ef64645f78d0699a622f38b6fdc339005edbdf22cdd5cbf21cb26a307ae2a12512cb3d71fef3f3df0e01029040f8747ede4b8652fbda0660f5e8093a173ba4a992762da9733807aeab6cff472f3b5e7aaa35003a7560f302971764b660ec8723035bf63cf12d10f015450245c4f0e9c79f02839602d8f693736499c575953453d2ae63f70b1efce4cf5a741c74bac512e84b0559555d9338a49d84bcb6ffca9ef886049651091423f0e5a79ff4ffb6dc52bb7f718ed4292e877d2ff987794f3cd422753d4b83bb0446429255219b5a21a3eb22dac3427b4418198633b39baeba7f7033a007c6ba52bd4e91902f3ffd90dbeeb87785a50ebebad07f3fbe6d84cc1648e8e7dc56d33f938bc5faa74302a178cf4a28104410289ffc7e8cef6d39fded10b8e20a40c4f0978fcfb0fafb9b01ef89e5641e797084a81ed2ac03628845fdf14cdd104a1311456e11ff50a53484e23cc20028854fce8e9339fb2d10a88e43cefdd7d9ea77ef115bf8d3b477fef525b6ff64df0a4ffcf3efce73f460db8b3ba3102851dd00eaad2d11224069204829ca9830500a95ea990514a9236c2eddb37633ff2bb1e3e11d8b513df2c0abc1a537c0f409020b9ff9d069ddd9ea3fcc0638f6ab2622893fa8aa0b612983d37a08145094fe488752d152fc596c09ab37cd0c3e1ff82eafeffc3f7b7ce709fc1f49e081ea51c5e5f70000000049454e44ae426082</data>
+ </image>
+ <image name="image5">
+ <data format="PNG" length="1027">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000003ca49444154388db595c18b1c451487bfd13ebc362b54c759e9960d6c434427249059c84131875d0824012f811cf6a8012f7af3284810fc0ff422040f1e728bb7e410c85e643610d9c941d281446b20035d98c12a4c433f42b1eba167b38eab1e040b9aa6e0d557af7eef57f57aa3d188fdf1d91797f6dc54f92f235f11befcfc466f7fde1b8d467c75fdcade78abe6c30f3e261583488a6a4b1bff6593d8fd54153ba9b04f6adcb462b85ef0c9e6b55e02d0413fa52c4bdcd31a3ff390406684729041e269a3431b8f7d04da08daa473700b89906519c492f196854de8ad9fcff72e9ebb42590e70754d3d739479cee04c89e9038943d5a2d1a331d0361ee7145b097e5aa011b409a882b61e3f0b88f1246eaaa462704fe7d0d59c8befafe1d5129a1dbc56a83a4804490404cc4a60d0afa9a7966aeb041a01da4e9e04dc5449004452fccc77d00b6bd4cd083bbb813696fa8999ebd942925214822c75fa167980f51dc6b70668032d00021dbfd329eb4b07d511d5f46bc20c1e6c0f08936ca1666381f274cde04c37cf72a53ce9a8eee60b712f01b45131cb293e56d4b31b8419ecdc3e0c1dbe07e5db2df66e41b55db2ef99e2cd1a9145b724fb8bcae3426876708dc5de2bd159ba00dd38bfcaf06c4650cb9d68b13f1698dc931d0bc89262561df553b39871278d47a34383504f8abf40876c5cd840120328c3730104ec4f0771c54a7b588a2e7785a8dd51e241c0e0f42aefac0f01edeca69eeddbe6505c762cfc0338eadc5207ba96270d9736df2515a5d51a8d35aa8a7702717e51822c687b081c1a45128348575db30297364ba0c63715412bbc5a44948dcb8af44104c474256c9fc902f845f188be03f6334caea8423db3644be06320048f2c299208c6081b973dc1d52f96bbc78b0e7a69ff1876a2787590784e9c6d51859bd703d5d4b27dcb73f3bb0cf75850ed321309983cccb516da287f0306ea47420816558b59a9d8b8fc006d5aee7c9b61ef67d0c0e8fb8cea1edddba1f5dcc78a6fc04dcc02f8e5e5d7e5ea60b046f82da2bb8e5733073192244af1968324213ddab0fc4643da6f30794def48204660b773516f37c11c0dd887198d36c4e74da7b19d549008f50f0544a53835d74ea03c6317cb1d39b025bcc85a9695f254cd786b9ef1a9357335fc9ed0ebf588cfc14d8467bfa6c82b4a7aa481ddb8f8c508bb50d786e9c382ec35a5d504f7f312ee978430837e3eef20573ebab897e725a974fedcbf4345a914b9273f7e607e3731d42e2558431ba11c04b2158fbd2fd44f20cc02d7beb9d97590e17ac178cb62968ab901bb0adb31583260d14a7f1661bc0d22d23df82190af746b7bff5733fd03180609d531ae3d950000000049454e44ae426082</data>
+ </image>
+</images>
+<connections>
+ <connection>
+ <sender>ListPhotoSizes</sender>
+ <signal>highlighted(int)</signal>
+ <receiver>FrmPrintWizardBase</receiver>
+ <slot>ListPhotoSizes_highlighted(int)</slot>
+ </connection>
+ <connection>
+ <sender>ListPhotoSizes</sender>
+ <signal>selected(QListBoxItem*)</signal>
+ <receiver>FrmPrintWizardBase</receiver>
+ <slot>ListPhotoSizes_selected(QListBoxItem*)</slot>
+ </connection>
+ <connection>
+ <sender>ListPrintOrder</sender>
+ <signal>selected(QListBoxItem*)</signal>
+ <receiver>FrmPrintWizardBase</receiver>
+ <slot>ListPrintOrder_selected(QListBoxItem*)</slot>
+ </connection>
+ <connection>
+ <sender>ListPrintOrder</sender>
+ <signal>highlighted(int)</signal>
+ <receiver>FrmPrintWizardBase</receiver>
+ <slot>ListPhotoOrder_highlighted(int)</slot>
+ </connection>
+ <connection>
+ <sender>EditCopies</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>FrmPrintWizardBase</receiver>
+ <slot>EditCopies_valueChanged(int)</slot>
+ </connection>
+ <connection>
+ <sender>RdoOutputFile</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>EditOutputPath</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>RdoOutputGimp</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>KURLLabel1</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>RdoOutputFile</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>TextLabel2_2</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>RdoOutputFile</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>BtnBrowseOutputPath</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+</connections>
+<slots>
+ <slot>BtnCropNext_clicked()</slot>
+ <slot>BtnCropPrev_clicked()</slot>
+ <slot>BtnCropRotate_clicked()</slot>
+ <slot>ListPhotoSizes_selected( QListBoxItem * )</slot>
+ <slot>ListPhotoSizes_highlighted( int )</slot>
+ <slot>EditCopies_valueChanged( int )</slot>
+ <slot>ListPrintOrder_selected( QListBoxItem * )</slot>
+ <slot>ListPhotoOrder_highlighted( int )</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>kcombobox.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>klineedit.h</includehint>
+ <includehint>kfontcombo.h</includehint>
+ <includehint>klineedit.h</includehint>
+ <includehint>kcolorcombo.h</includehint>
+ <includehint>kurllabel.h</includehint>
+ <includehint>klineedit.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>klistbox.h</includehint>
+ <includehint>cropframe.h</includehint>
+ <includehint>kprogress.h</includehint>
+</includehints>
+</UI>
diff --git a/kipi-plugins/printwizard/kipiplugin_printwizard.desktop b/kipi-plugins/printwizard/kipiplugin_printwizard.desktop
new file mode 100644
index 0000000..cb3f750
--- /dev/null
+++ b/kipi-plugins/printwizard/kipiplugin_printwizard.desktop
@@ -0,0 +1,62 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=PrintWizard
+Name[br]=Skoazeller moulañ
+Name[ca]=Auxiliar d'impressió
+Name[cs]=Průvodcem tiskem
+Name[da]=Udskriftsguide
+Name[de]=Druckassistent
+Name[el]=ΜάγοςΕκτύπωσης
+Name[es]=Asistente de impresión
+Name[et]=Trükkimisnõustaja
+Name[fi]=Tulostus
+Name[ga]=DraoiPriontála
+Name[gl]=Asistente para a Impresión
+Name[is]=PrentÁlfur
+Name[it]=AssistenteDiStampa
+Name[nds]=Druckhölper
+Name[nl]=Afdrukassistent
+Name[pl]=Asystent drukowania
+Name[pt]=Assistente de Impressão
+Name[sk]=Sprievodca tlačou
+Name[sr]=Чаробњак штампе
+Name[sr@Latn]=Čarobnjak štampe
+Name[sv]=Utskriftsguide
+Name[tg]=Танзимоти Чопкунӣ
+Name[tr]=YazdırmaSihirbazı
+Name[xx]=xxPrintWizardxx
+Name[zh_CN]=打印向导
+Comment=KIPI Print Wizard Plugin
+Comment[br]=Lugent skoazeller moulañ evit KIPI
+Comment[ca]=Connector del KIPI auxiliar d'impressió
+Comment[cs]=KIPI modul průvodce tiskem
+Comment[da]=KIPI-plugin: Udskriftsguide
+Comment[de]=Ein KIPI-Modul zum Ausdrucken von Bildern
+Comment[el]=Πρόσθετο μάγου εκτύπωσης του KIPI
+Comment[es]=Complemento de KIPI de asistente de impresión
+Comment[et]=KIPI trükkimisnõustaja plugin
+Comment[fi]=Kipi-liitännäinen ohjattua tulostusta varten
+Comment[fr]=Module externe KIPI pour imprimer des images
+Comment[gl]=Plugin de KIPI para Asisténcia na Impresión
+Comment[is]=KIPI Prentálfsíforrit
+Comment[it]=Plugin assistente di stampa di KIPI
+Comment[ja]=Kipi 印刷ウィザードプラグイン
+Comment[nds]=KIPI-Moduul för't Utdrucken mit Hülp
+Comment[nl]=KIPI-plugin voor het afdrukken van afbeeldingen
+Comment[pa]=KIPI ਛਪਾਈ ਸਹਾਇਕ ਪਲੱਗਇਨ
+Comment[pl]=Wtyczka KIPI - Asystent drukowania
+Comment[pt]='Plugin' do KIPI de Assistência de Impressão
+Comment[pt_BR]=Plugin de Assistente de Impressão do KIPI
+Comment[sk]=KIPI modul sprievodca tlačou
+Comment[sr]=KIPI прикључак за чаробњака штампе
+Comment[sr@Latn]=KIPI priključak za čarobnjaka štampe
+Comment[sv]=KIPI-insticksprogram: Utskriftsguide
+Comment[tg]=Модули KIPI барои танзимоти чопкунӣ
+Comment[tr]=KIPI Yazdırma Sihirbazı Eklentisi
+Comment[xx]=xxKIPI Print Wizard Pluginxx
+Comment[zh_CN]=KIPI 打印向导插件
+Type=Service
+ServiceTypes=KIPI/Plugin
+X-KDE-Library=kipiplugin_printwizard
+X-KIPI-MergeMenu=true
+author=Todd Shoemaker, todd@theshoemakers.net
diff --git a/kipi-plugins/printwizard/plugin_printwizard.cpp b/kipi-plugins/printwizard/plugin_printwizard.cpp
new file mode 100644
index 0000000..a82b3f2
--- /dev/null
+++ b/kipi-plugins/printwizard/plugin_printwizard.cpp
@@ -0,0 +1,128 @@
+/* ============================================================
+ * Author: Todd Shoemaker <todd@theshoemakers.net>
+ * Date : 2003-09-30
+ * Description :
+ *
+ * Copyright 2003 by Todd Shoemaker <todd@theshoemakers.net>
+
+ * This program is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation;
+ * either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * ============================================================ */
+
+// C Ansi includes
+
+extern "C"
+{
+#include <unistd.h>
+}
+
+// Include files for Qt
+
+#include <qdir.h>
+
+// Include files for KDE
+
+#include <klocale.h>
+#include <kaction.h>
+#include <kapplication.h>
+#include <kgenericfactory.h>
+#include <klibloader.h>
+#include <kconfig.h>
+#include <kdebug.h>
+#include <kmessagebox.h>
+#include <kstandarddirs.h>
+#include <kurl.h>
+
+// Local includes
+
+#include "frmprintwizard.h"
+#include "plugin_printwizard.h"
+#include "plugin_printwizard.moc"
+
+typedef KGenericFactory<Plugin_PrintWizard> Factory;
+
+K_EXPORT_COMPONENT_FACTORY( kipiplugin_printwizard,
+ Factory("kipiplugin_printwizard"))
+
+Plugin_PrintWizard::Plugin_PrintWizard(QObject *parent, const char*, const QStringList&)
+ : KIPI::Plugin(Factory::instance(), parent, "PrintWizard")
+{
+ kdDebug( 51001 ) << "Plugin_PrintWizard plugin loaded"
+ << endl;
+}
+
+void Plugin_PrintWizard::setup( QWidget* widget )
+{
+ KIPI::Plugin::setup( widget );
+
+ m_printAction = new KAction (i18n("Print Wizard..."),
+ "fileprint",
+ CTRL+Key_P,
+ this,
+ SLOT(slotActivate()),
+ actionCollection(),
+ "printwizard");
+
+ addAction( m_printAction );
+
+ m_interface = dynamic_cast< KIPI::Interface* >( parent() );
+
+ if ( !m_interface )
+ {
+ kdError( 51000 ) << "Kipi interface is null!" << endl;
+ return;
+ }
+
+ KIPI::ImageCollection selection = m_interface->currentSelection();
+ m_printAction->setEnabled( selection.isValid() &&
+ !selection.images().isEmpty() );
+
+ connect( m_interface, SIGNAL( selectionChanged( bool ) ),
+ m_printAction, SLOT( setEnabled( bool ) ) );
+}
+
+Plugin_PrintWizard::~Plugin_PrintWizard()
+{
+}
+
+void Plugin_PrintWizard::slotActivate()
+{
+ KIPI::ImageCollection album = m_interface->currentSelection();
+
+ if ( !album.isValid() )
+ return;
+
+ KURL::List fileList = album.images();
+
+ if (fileList.count() == 0)
+ {
+ KMessageBox::sorry(kapp->activeWindow(), i18n("Please select one or more photos to print."),
+ i18n("Print Wizard"));
+ return;
+ }
+
+ KIPIPrintWizardPlugin::FrmPrintWizard frm(kapp->activeWindow());
+ KStandardDirs dir;
+ QString tempPath = dir.saveLocation("tmp", "kipi-printwizardplugin-" + QString::number(getpid()) + "/");
+ frm.print(fileList, tempPath);
+ frm.exec();
+}
+
+KIPI::Category Plugin_PrintWizard::category( KAction* action ) const
+{
+ if ( action == m_printAction )
+ return KIPI::IMAGESPLUGIN;
+
+ kdWarning( 51000 ) << "Unrecognized action for plugin category identification" << endl;
+ return KIPI::IMAGESPLUGIN; // no warning from compiler, please
+}
+
diff --git a/kipi-plugins/printwizard/plugin_printwizard.h b/kipi-plugins/printwizard/plugin_printwizard.h
new file mode 100644
index 0000000..bb84928
--- /dev/null
+++ b/kipi-plugins/printwizard/plugin_printwizard.h
@@ -0,0 +1,52 @@
+/* ============================================================
+ * Author: Todd Shoemaker <todd@theshoemakers.net>
+ * Date : 2003-09-30
+ * Description :
+ *
+ * Copyright 2003 by Todd Shoemaker <todd@theshoemakers.net>
+
+ * This program is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation;
+ * either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * ============================================================ */
+
+#ifndef PLUGIN_PRINTWIZARD_H
+#define PLUGIN_PRINTWIZARD_H
+
+// LibKIPI includes.
+
+#include <libkipi/plugin.h>
+
+class KAction;
+
+class Plugin_PrintWizard : public KIPI::Plugin
+{
+ Q_OBJECT
+
+public:
+
+ Plugin_PrintWizard(QObject *parent,
+ const char* name,
+ const QStringList &args);
+ ~Plugin_PrintWizard();
+ virtual KIPI::Category category( KAction* action ) const;
+ virtual void setup( QWidget* widget );
+
+public slots:
+
+ void slotActivate();
+
+private:
+ KAction *m_printAction;
+ KIPI::Interface *m_interface;
+};
+
+#endif // PLUGIN_PRINTWIZARD_H
diff --git a/kipi-plugins/printwizard/tphoto.cpp b/kipi-plugins/printwizard/tphoto.cpp
new file mode 100644
index 0000000..f81a53b
--- /dev/null
+++ b/kipi-plugins/printwizard/tphoto.cpp
@@ -0,0 +1,152 @@
+/***************************************************************************
+ tphoto.cpp - description
+ -------------------
+ begin : Thu Sep 12 2002
+ copyright : (C) 2002 by Todd Shoemaker
+ : (C) 2007 Angelo Naselli
+ email : jtshoe11@yahoo.com
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+// Qt includes.
+
+#include <qpainter.h>
+#include <qdir.h>
+#include <qmessagebox.h>
+#include <qdragobject.h>
+#include <qstringlist.h>
+#include <qurl.h>
+#include <qstrlist.h>
+
+// KDE includes.
+
+#include <kprinter.h>
+#include <kglobal.h>
+#include <klocale.h>
+#include <kdebug.h>
+
+// Local includes.
+
+#include "tphoto.h"
+#include "utils.h"
+
+// LibKDcraw includes.
+
+#include <libkdcraw/version.h>
+#include <libkdcraw/kdcraw.h>
+
+#if KDCRAW_VERSION < 0x000106
+#include <libkdcraw/dcrawbinary.h>
+#endif
+
+#define IMAGE_FILE_MASK "*"
+//"*.jpg;*.jpeg;*.JPG;*.JPEG;*.png;*.PNG"
+
+namespace KIPIPrintWizardPlugin
+{
+
+TPhoto::TPhoto(int thumbnailSize)
+{
+ m_size = 0;
+ cropRegion = QRect(-1, -1, -1, -1);
+ rotation = 0;
+ copies = 1;
+
+ filename = "";
+ m_exiv2Iface = NULL;
+
+ m_thumbnail = NULL;
+
+ this->m_thumbnailSize = thumbnailSize;
+}
+
+TPhoto::~TPhoto()
+{
+ if (m_thumbnail)
+ delete m_thumbnail;
+ if (m_size)
+ delete m_size;
+ if (m_exiv2Iface)
+ delete m_exiv2Iface;
+}
+
+void TPhoto::loadCache()
+{
+ // load the thumbnail and size only once.
+ if (m_thumbnail)
+ delete m_thumbnail;
+
+
+ QImage photo = loadPhoto();
+
+ m_thumbnail = new QPixmap(QImage( photo.scale(m_thumbnailSize, m_thumbnailSize, QImage::ScaleMin) ));
+
+ if (m_size)
+ delete m_size;
+ m_size = new QSize(photo.width(), photo.height());
+}
+
+QPixmap & TPhoto::thumbnail()
+{
+ if (!m_thumbnail)
+ loadCache();
+ return *m_thumbnail;
+}
+
+QImage TPhoto::loadPhoto()
+{
+ QImage photo;
+
+ // Check if RAW file.
+#if KDCRAW_VERSION < 0x000106
+ QString rawFilesExt(KDcrawIface::DcrawBinary::instance()->rawFiles());
+#else
+ QString rawFilesExt(KDcrawIface::KDcraw::rawFiles());
+#endif
+ QFileInfo fileInfo(filename.path());
+ if (rawFilesExt.upper().contains( fileInfo.extension(false).upper() ))
+ KDcrawIface::KDcraw::loadDcrawPreview(photo, filename.path());
+ else
+ photo.load(filename.path()); // PENDING(blackie) handle URL
+
+ return photo;
+}
+
+QSize & TPhoto::size() // private
+{
+ if (m_size == 0)
+ loadCache();
+ return *m_size;
+}
+
+KExiv2Iface::KExiv2 *TPhoto::exiv2Iface()
+{
+ if (!m_exiv2Iface && !filename.url().isEmpty())
+ {
+ m_exiv2Iface = new KExiv2Iface::KExiv2(filename.path());
+ }
+
+ return m_exiv2Iface;
+}
+
+int TPhoto::width()
+{
+ return size().width();
+}
+
+int TPhoto::height()
+{
+ return size().height();
+}
+
+} // NameSpace KIPIPrintWizardPlugin
+
+
diff --git a/kipi-plugins/printwizard/tphoto.h b/kipi-plugins/printwizard/tphoto.h
new file mode 100644
index 0000000..a71d991
--- /dev/null
+++ b/kipi-plugins/printwizard/tphoto.h
@@ -0,0 +1,74 @@
+/***************************************************************************
+ tphoto.h - description
+ -------------------
+ begin : Thu Sep 12 2002
+ copyright : (C) 2002 by Todd Shoemaker
+ : (C) 2007 Angelo Naselli
+ email : jtshoe11@yahoo.com
+***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef TPHOTO_H
+#define TPHOTO_H
+
+// Qt includes.
+
+#include <qstring.h>
+#include <qptrlist.h>
+#include <qrect.h>
+#include <qiconview.h>
+
+// KDE includes.
+
+#include <kurl.h>
+#include <libkexiv2/kexiv2.h>
+
+class QImage;
+class QPixmap;
+
+class KPrinter;
+
+namespace KIPIPrintWizardPlugin
+{
+
+class TPhoto
+{
+ public:
+ TPhoto(int thumbnailSize);
+ ~TPhoto();
+
+ KURL filename; // full path
+
+ QPixmap & thumbnail();
+ QImage loadPhoto();
+
+ int m_thumbnailSize;
+
+ int width();
+ int height();
+
+ QRect cropRegion;
+ int copies;
+ int rotation;
+ KExiv2Iface::KExiv2 *exiv2Iface();
+
+ private:
+ QPixmap *m_thumbnail;
+ void loadCache();
+ QSize & size();
+ QSize * m_size;
+ KExiv2Iface::KExiv2 *m_exiv2Iface;
+};
+
+} // NameSpace KIPIPrintWizardPlugin
+
+#endif // TPHOTO_H
+
diff --git a/kipi-plugins/printwizard/utils.cpp b/kipi-plugins/printwizard/utils.cpp
new file mode 100644
index 0000000..cab5ccd
--- /dev/null
+++ b/kipi-plugins/printwizard/utils.cpp
@@ -0,0 +1,95 @@
+/***************************************************************************
+ utils.cpp - description
+ -------------------
+ begin : Fri Jan 31 2003
+ copyright : (C) 2003 by Todd Shoemaker
+ email : jtshoe11@yahoo.com
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+// C Ansi includes
+
+extern "C"
+{
+#include <unistd.h>
+#include <stdio.h>
+}
+
+// Include files for Qt
+
+#include <qstringlist.h>
+#include <qwidget.h>
+#include <qdir.h>
+#include <qprocess.h>
+
+// Include files for KDE
+
+#include <kurl.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <kio/netaccess.h>
+
+namespace KIPIPrintWizardPlugin
+{
+
+int NINT(double n)
+{
+ return (int)(n + 0.5);
+}
+
+int MIN(int a, int b)
+{
+ if (a < b)
+ return a;
+ else
+ return b;
+}
+
+int MAX(int a, int b)
+{
+ if (a > b)
+ return a;
+ else
+ return b;
+}
+
+// given a list of args, launch this app as a separate thread.
+// args[0] is the application to run.
+bool launchExternalApp(QStringList &args)
+{
+ QProcess process;
+ for(QStringList::Iterator it = args.begin(); it != args.end(); ++it)
+ {
+ process.addArgument(*it);
+ }
+
+ return process.start();
+}
+
+bool checkTempPath(QWidget *parent, QString tempPath)
+{
+ // does the temp path exist?
+ QDir tempDir(tempPath);
+ if (!tempDir.exists())
+ {
+ if (!tempDir.mkdir(tempDir.path()))
+ {
+ KMessageBox::sorry(parent,
+ i18n("Unable to create a temporary folder; "
+ "please make sure you have proper permissions to this folder and try again."));
+ return false;
+ }
+ }
+ return true;
+}
+
+} // NameSpace KIPIPrintWizardPlugin
+
diff --git a/kipi-plugins/printwizard/utils.h b/kipi-plugins/printwizard/utils.h
new file mode 100644
index 0000000..43d5fc4
--- /dev/null
+++ b/kipi-plugins/printwizard/utils.h
@@ -0,0 +1,37 @@
+/***************************************************************************
+ utils.h - description
+ -------------------
+ begin : Fri Jan 31 2003
+ copyright : (C) 2003 by Todd Shoemaker
+ email : jtshoe11@yahoo.com
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef UTILS_H
+#define UTILS_H
+
+class QWidget;
+class QStringList;
+
+namespace KIPIPrintWizardPlugin
+{
+
+int NINT(double n);
+int MIN(int a, int b);
+int MAX(int a, int b);
+
+bool launchExternalApp(QStringList &args);
+bool checkTempPath(QWidget *parent, QString tempPath);
+
+} // NameSpace KIPIPrintWizardPlugin
+
+#endif // UTILS_H
+