SVN commit 736830 by vfuoglio:
Added Ken Burns effect.
Backported some code from SmoothSlideSaver (by Carsten
Weinhold).
Next step: port SlideShow to KDE4.
BUG: 102021
CCMAIL: kde-imaging kde.org
GUI:
M +5 -1 NEWS
M +2 -1 slideshow/Makefile.am
A slideshow/imageloadthread.cpp [License: GPL
(v2+)]
A slideshow/imageloadthread.h [License: GPL
(v2+)]
A slideshow/kbeffect.cpp [License: GPL
(v2+)]
A slideshow/kbeffect.h [License: GPL (v2+)]
M +14 -8 slideshow/plugin_slideshow.cpp
A slideshow/screenproperties.cpp [License:
GPL (v2+)]
A slideshow/screenproperties.h [License: GPL
(v2+)]
M +64 -13 slideshow/slideshowconfig.cpp
M +2 -1 slideshow/slideshowconfig.h
M +46 -2 slideshow/slideshowconfigbase.ui
M +0 -10 slideshow/slideshowgl.cpp
A slideshow/slideshowkb.cpp [License: GPL
(v2+)]
A slideshow/slideshowkb.h [License: GPL
(v2+)]
--- branches/extragear/kde3/libs/kipi-plugins/NEWS
#736829:736830
 -9,6
+9,7 
PrintWizard : Added raw file management, now raw files
can be printed.
SlideShow : Solved minor issue in filename printing
(2D slideshow).
SlideShow : New caching mechanism
+SlideShow : Added Ken Burns effect
Kipi-plugins BUG FIXING from B.K.O (http://bugs.kde.org):
 -16,8
+17,11 
001 ==> 149666 : General : iPod Export kipi plugin
cannot be disabled at compile
time when libgpod is present
on system
002 ==> 151604 : PrintWizard : Print Wizard does not
recognize raw images
-003 ==>
+003 ==> 102021 : SlideShow : Pan and Zoom on Slideshow
viewing (not a transition)
+ a la iPhoto
+004 ==>
+
v 0.1.5 - Beta1
-----------------------------------------------------------
-----------------
---
branches/extragear/kde3/libs/kipi-plugins/slideshow/Makefile
.am #736829:736830
 -10,7
+10,8 
kipiplugin_slideshow_la_SOURCES = listimageitems.cpp
plugin_slideshow.cpp
slideshow.cpp slideshowconfig.cpp slideshowconfigbase.ui
slideshowgl.cpp
- slideshowloader.cpp toolbar.cpp
+ slideshowloader.cpp toolbar.cpp imageloadthread.cpp
kbeffect.cpp screenproperties.cpp
+ slideshowkb.cpp
#kipiplugin_slideshow_la_LIBADD = -lkdefx $(GL_LIBS)
$(LIBKIPI_LIBS) $(LIB_KDEUI) $(LIB_KDECORE) $(LIB_QT)
kipiplugin_slideshow_la_LIBADD = -lkdefx $(GL_LIBS)
$(LIBKIPI_LIBS) $(LIBKDCRAW_LIBS)
---
branches/extragear/kde3/libs/kipi-plugins/slideshow/plugin_s
lideshow.cpp #736829:736830
 -43,6
+43,7 
#include "slideshow.h"
#include "slideshowgl.h"
+#include "slideshowkb.h"
#include "slideshowconfig.h"
#include "plugin_slideshow.h"
 -173,13
+174,13 
bool opengl;
bool shuffle;
+ bool wantKB;
config.setGroup("SlideShow Settings");
opengl =
config.readBoolEntry("OpenGL");
shuffle =
config.readBoolEntry("Shuffle");
-
- if ( !m_urlList ) {kdDebug() << "ERRORE
m_urlList NON ALLOCATO!!!"; return;}
-
+ wantKB = config.readEntry("Effect
Name (OpenGL)") == QString("Ken Burns");
+
if ( m_urlList->isEmpty() )
{
KMessageBox::sorry(kapp->activeWindow(),
i18n("There are no images to show."));
 -227,10
+228,8 
}
}
-
if (!opengl) {
- KIPISlideShowPlugin::SlideShow *slideShow =
- new
KIPISlideShowPlugin::SlideShow(fileList, commentsList,
m_imagesHasComments);
+ KIPISlideShowPlugin::SlideShow* slideShow = new
KIPISlideShowPlugin::SlideShow(fileList, commentsList,
m_imagesHasComments);
slideShow->show();
}
else {
 -238,9
+237,16 
KMessageBox::error(kapp->activeWindow(),
i18n("Sorry. OpenGL
support not available on your system"));
else {
- KIPISlideShowPlugin::SlideShowGL *slideShow =
- new
KIPISlideShowPlugin::SlideShowGL(fileList, commentsList,
m_imagesHasComments);
+ if (wantKB) {
+ KIPISlideShowPlugin::SlideShowKB* slideShow =
+ new
KIPISlideShowPlugin::SlideShowKB(fileList, commentsList,
m_imagesHasComments);
slideShow->show();
+ }
+ else {
+ KIPISlideShowPlugin::SlideShowGL * slideShow =
+ new
KIPISlideShowPlugin::SlideShowGL(fileList, commentsList,
m_imagesHasComments);
+ slideShow->show();
+ }
}
}
}
---
branches/extragear/kde3/libs/kipi-plugins/slideshow/slidesho
wconfig.cpp #736829:736830
 -69,6
+69,7 
#include "listimageitems.h"
#include "slideshow.h"
#include "slideshowgl.h"
+#include "slideshowkb.h"
#include "slideshowconfig.h"
#include "slideshowconfig.moc"
 -122,6
+123,7 
connect(m_commentsBgColor, SIGNAL(changed(const QColor
&)), this, SLOT(slotCommentsBgColorChanged()));
connect(m_useMillisecondsCheckBox,
SIGNAL(toggled(bool)), SLOT(slotUseMillisecondsToggled()));
connect(m_delaySpinBox, SIGNAL(valueChanged(int)),
this, SLOT(slotDelayChanged()));
+ connect(m_effectsComboBox, SIGNAL(activated(int)),
this, SLOT(slotEffectChanged()));
connect(m_fileSrcButtonGroup, SIGNAL(clicked(int)),
this, SLOT(slotSelection()));
 -165,6
+167,7 
m_urlList = urlList;
slotSelection();
+ slotEffectChanged();
}
 -201,20
+204,31 
{
m_effectsComboBox->clear();
- QMap<QString,QString> effectNames =
SlideShowGL::effectNamesI18N();
QStringList effects;
+ QMap<QString,QString> effectNames;
+ QMap<QString,QString>::Iterator it;
+
+ // Load slideshowgl effects
+ effectNames = SlideShowGL::effectNamesI18N();
- QMap<QString,QString>::Iterator it;
for (it = effectNames.begin(); it != effectNames.end();
++it)
effects.append(it.data());
+ // Load Ken Burns effect
+ effectNames = SlideShowKB::effectNamesI18N();
+ for (it = effectNames.begin(); it != effectNames.end();
++it)
+ effects.append(it.data());
+
+ // Update GUI
+
+ effects.sort();
m_effectsComboBox->insertStringList(effects);
for (int i=0; i<m_effectsComboBox->count(); i++)
{
- if (effectNames[m_effectNameGL] ==
m_effectsComboBox->text(i)) {
- m_effectsComboBox->setCurrentItem(i);
- break;
- }
+ if (effectNames[m_effectNameGL] ==
m_effectsComboBox->text(i)) {
+ m_effectsComboBox->setCurrentItem(i);
+ break;
+ }
}
}
 -248,6
+262,7 
useMilliseconds =
m_config->readBoolEntry("Use Milliseconds",
false);
enableMouseWheel =
m_config->readNumEntry("Enable Mouse Wheel",
true);
+
// Comments tab settings
uint commentsFontColor;
uint commentsBgColor;
 -269,11
+284,15 
commentsLinesLength =
m_config->readNumEntry("Comments Lines Length",
72);
// Advanced tab
- bool enableCache;
-
+ bool enableCache, kbDisableFadeInOut,
kbDisableCrossFade;
+
+ kbDisableFadeInOut =
m_config->readBoolEntry("KB Disable FadeInOut",
false);
+ kbDisableCrossFade =
m_config->readBoolEntry("KB Disable Crossfade",
false);
+
enableCache = m_config->readBoolEntry("Enable
Cache", false);
m_cacheSize = m_config->readNumEntry("Cache
Size", 5);
+
// -- Apply Settings to widgets
------------------------------
m_openglCheckBox->setChecked(opengl);
 -304,6
+323,9 
m_commentsFontChooser->setFont(*savedFont);
delete savedFont;
+
m_kbDisableFadeCheckBox->setChecked(kbDisableFadeInOut);
+
m_kbDisableCrossfadeCheckBox->setChecked(kbDisableCrossFa
de);
+
m_cacheCheckBox->setChecked(enableCache);
slotOpenGLToggled();
 -374,14
+396,27 
}
else {
+ QStringList effects;
+ QMap<QString,QString> effectNames;
+ QMap<QString,QString>::Iterator it;
+
+ // Load slideshowgl effects
+ effectNames = SlideShowGL::effectNamesI18N();
+ for (it = effectNames.begin(); it !=
effectNames.end(); ++it)
+ effects.append(it.data());
+
+ // Load Ken Burns effect
+ effectNames = SlideShowKB::effectNamesI18N();
+ for (it = effectNames.begin(); it !=
effectNames.end(); ++it)
+ effects.append(it.data());
+
QString effect;
- QMap<QString,QString> effectNames =
SlideShowGL::effectNamesI18N();
- QMap<QString,QString>::Iterator it;
+ QStringList::Iterator it1;
- for (it = effectNames.begin(); it !=
effectNames.end(); ++it) {
- if (it.data() ==
m_effectsComboBox->currentText()) {
- effect = it.key();
+ for (it1 = effects.begin(); it1 != effects.end();
++it1) {
+ if ( *it1 ==
m_effectsComboBox->currentText()) {
+ effect = *it1;
break;
}
}
 -391,6
+426,9 
}
// Advanced settings
+ m_config->writeEntry("KB Disable
FadeInOut", m_kbDisableFadeCheckBox->isChecked());
+ m_config->writeEntry("KB Disable
Crossfade",
m_kbDisableCrossfadeCheckBox->isChecked());
+
m_config->writeEntry("Enable Cache",
m_cacheCheckBox->isChecked());
m_config->writeEntry("Cache Size",
m_cacheSizeSpinBox->value());
 -480,6
+518,17 
}
}
+void SlideShowConfig::slotEffectChanged()
+{
+ bool isKB = m_effectsComboBox->currentText() ==
i18n("Ken Burns");
+
+ m_printNameCheckBox->setEnabled(!isKB);
+ m_printProgressCheckBox->setEnabled(!isKB);
+ m_printCommentsCheckBox->setEnabled(!isKB);
+
+ m_cacheButtonGroup->setEnabled(!isKB);
+}
+
void SlideShowConfig::slotCacheToggled()
{
bool isEnabled = m_cacheCheckBox->isChecked();
 -499,6
+548,8 
}
ShowNumberImages( m_ImagesFilesListBox->count() );
+
+ slotEffectChanged();
}
---
branches/extragear/kde3/libs/kipi-plugins/slideshow/slidesho
wconfig.h #736829:736830
 -90,6
+90,7 
void slotStartClicked();
void slotHelp();
void slotOpenGLToggled();
+ void slotEffectChanged();
void slotDelayChanged();
void slotUseMillisecondsToggled();
void slotPrintCommentsToggled();
 -98,7
+99,7 
void slotSelection();
void slotCacheToggled();
-
+
void SlotPortfolioDurationChanged ( int );
void slotImagesFilesSelected( QListBoxItem *item );
void slotAddDropItems(KURL::List filesUrl);
---
branches/extragear/kde3/libs/kipi-plugins/slideshow/slidesho
wconfigbase.ui #736829:736830
 -1266,9
+1266,41 
</widget>
<widget
class="QButtonGroup">
<property
name="name">
-
<cstring>buttonGroup2</cstring>
+
<cstring>buttonGroup3</cstring>
</property>
<property
name="title">
+ <string>Ken Burns
effect</string>
+ </property>
+ <hbox>
+ <property
name="name">
+
<cstring>unnamed</cstring>
+ </property>
+ <widget
class="QCheckBox">
+ <property
name="name">
+
<cstring>m_kbDisableFadeCheckBox</cstring>
+ </property>
+ <property
name="text">
+ <string>Disable
fade-in / fade-out</string>
+ </property>
+ </widget>
+ <widget
class="QCheckBox">
+ <property
name="name">
+
<cstring>m_kbDisableCrossfadeCheckBox</cstring>
+ </property>
+ <property
name="text">
+ <string>Disable
crossfade</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget
class="QButtonGroup">
+ <property
name="name">
+
<cstring>m_cacheButtonGroup</cstring>
+ </property>
+ <property
name="enabled">
+ <bool>true</bool>
+ </property>
+ <property
name="title">
<string>Others</string>
</property>
<vbox>
 -1340,6
+1372,18 
</widget>
</hbox>
</widget>
+ <widget
class="QLabel">
+ <property
name="name">
+
<cstring>m_KBCacheLabel</cstring>
+ </property>
+ <property
name="enabled">
+
<bool>true</bool>
+ </property>
+ <property
name="text">
+
<string><b>Notice</b>:
+Ken Burns effect doesn't use this cache
mechanism.</string>
+ </property>
+ </widget>
</vbox>
</widget>
<spacer>
 -1355,7
+1399,7 
<property
name="sizeHint">
<size>
<width>41</width>
-
<height>140</height>
+
<height>90</height>
</size>
</property>
</spacer>
---
branches/extragear/kde3/libs/kipi-plugins/slideshow/slidesho
wgl.cpp #736829:736830
 -491,16
+491,6 
void SlideShowGL::loadImage()
{
-// QPair<QString, int> fileAngle =
m_fileList[m_fileIndex];
-// QString path(fileAngle.first);
-// int angle(fileAngle.second);
-// QImage image(path);
-// if (angle != 0)
-// {
-// QWMatrix wm;
-// wm.rotate(angle);
-// image = image.xForm(wm);
-// }
QImage image = m_imageLoader->getCurrent();
_______________________________________________
kde-docbook mailing list
kde-docbook kde.org
htt
ps://mail.kde.org/mailman/listinfo/kde-docbook
|