[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/graphics/kphotoalbum
From: Miika Turkia <miika.turkia () gmail ! com>
Date: 2010-09-07 17:57:44
Message-ID: 20100907180202.3E686AC769 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1172662 by mturkia:
Autostack affects selected images only (instead of whole database). Thanks \
to Andreas Neustifter for the patch.
M +2 -0 ChangeLog
M +4 -4 MainWindow/AutoStackImages.cpp
M +2 -1 MainWindow/AutoStackImages.h
M +9 -3 MainWindow/Window.cpp
M +1 -0 MainWindow/Window.h
--- trunk/extragear/graphics/kphotoalbum/ChangeLog #1172661:1172662
@@ -1,6 +1,8 @@
2010-09-07 Miika Turkia <miika.turkia@gmail.com>
* bugfix: Autostack set to ignore images with no exact timestamp
+ * Autostack affects selected images only (instead of whole database).
+ Thanks to Andreas Neustifter for the patch.
2010-09-05 Miika Turkia <miika.turkia@gmail.com>
--- trunk/extragear/graphics/kphotoalbum/MainWindow/AutoStackImages.cpp \
#1172661:1172662 @@ -37,8 +37,8 @@
using namespace MainWindow;
-AutoStackImages::AutoStackImages( QWidget* parent )
- :KDialog( parent )
+AutoStackImages::AutoStackImages( QWidget* parent, const DB::Result& list \
) + :KDialog( parent ), _list( list )
{
setWindowTitle( i18n("Automatically Stack Images" ) );
setButtons( Cancel | Ok );
@@ -101,7 +101,7 @@
// Stacking all images that have the same MD5 sum
// First make a map of MD5 sums with corresponding images
- Q_FOREACH( const DB::ImageInfoPtr info, \
DB::ImageDB::instance()->images().fetchInfos()) { + Q_FOREACH(const \
DB::ImageInfoPtr info, _list.fetchInfos()) { QString fileName = \
info->fileName(DB::AbsolutePath);
DB::MD5 sum = Utilities::MD5Sum( info->fileName(DB::AbsolutePath) \
); if ( DB::ImageDB::instance()->md5Map()->contains( sum ) ) {
@@ -151,7 +151,7 @@
void AutoStackImages::continuousShooting(DB::Result &toBeShown )
{
DB::ImageInfoPtr prev;
- Q_FOREACH( const DB::ImageInfoPtr info, \
DB::ImageDB::instance()->images().fetchInfos() ) { + Q_FOREACH(const \
DB::ImageInfoPtr info, _list.fetchInfos()) { // Skipping images that do \
not have exact time stamp if ( info->date().start() != info->date().end() \
) continue;
--- trunk/extragear/graphics/kphotoalbum/MainWindow/AutoStackImages.h \
#1172661:1172662 @@ -35,7 +35,7 @@
Q_OBJECT
public:
- AutoStackImages( QWidget* parent );
+ AutoStackImages( QWidget* parent, const DB::Result& list );
protected slots:
virtual void accept();
@@ -47,6 +47,7 @@
QRadioButton* _autostackSkip;
QRadioButton* _autostackDefault;
QSpinBox* _continuousThreshold;
+ const DB::Result& _list;
virtual void matchingMD5( DB::Result &toBeShown );
virtual void continuousShooting( DB::Result &toBeShown );
};
--- trunk/extragear/graphics/kphotoalbum/MainWindow/Window.cpp \
#1172661:1172662 @@ -533,7 +533,12 @@
void MainWindow::Window::slotAutoStackImages()
{
- AutoStackImages stacker( this );
+ const DB::Result& list = selected();
+ if (list.isEmpty()) {
+ KMessageBox::sorry( this, i18n("No item is selected."), i18n("No \
Selection") ); + return;
+ }
+ AutoStackImages stacker( this, list );
if ( stacker.exec() == QDialog::Accepted )
showThumbNails();
}
@@ -826,8 +831,8 @@
a->setText( i18n("Read EXIF Info From Files...") );
#endif
- a = actionCollection()->addAction( QString::fromLatin1( "autoStack" ), \
this, SLOT ( slotAutoStackImages() ) );
- a->setText( i18n("Automatically Stack Images...") );
+ _AutoStackImages = actionCollection()->addAction( QString::fromLatin1( \
"autoStack" ), this, SLOT ( slotAutoStackImages() ) ); + \
_AutoStackImages->setText( i18n("Automatically Stack Selected Images...") \
);
#ifdef SQLDB_SUPPORT
a = actionCollection()->addAction( \
QString::fromLatin1("convertBackend"), this, SLOT( convertBackend() ) ); @@ \
-1233,6 +1238,7 @@ _recreateThumbnails->setEnabled(selectionSize >= 1);
_rotLeft->setEnabled(selectionSize >= 1);
_rotRight->setEnabled(selectionSize >= 1);
+ _AutoStackImages->setEnabled(selectionSize > 1);
}
void MainWindow::Window::rotateSelected( int angle )
--- trunk/extragear/graphics/kphotoalbum/MainWindow/Window.h \
#1172661:1172662 @@ -216,6 +216,7 @@
KAction* _rotLeft;
KAction* _rotRight;
KAction* _sortByDateAndTime;
+ KAction* _AutoStackImages;
KAction* _viewInNewWindow;
KActionMenu* _viewMenu;
KToggleAction* _smallListView;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic