| Summary: | Wish: way to copy tags between photos | ||
|---|---|---|---|
| Product: | [Applications] kphotoalbum | Reporter: | Martin Jost <kde> |
| Component: | Annotation Dialog | Assignee: | KPhotoAlbum Bugs <kphotoalbum-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | wishlist | ||
| Priority: | NOR | ||
| Version First Reported In: | 2.1 | ||
| Target Milestone: | --- | ||
| Platform: | openSUSE | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Martin Jost
2007-05-07 21:33:10 UTC
Jesper: you need to have a "unspecified" version for your product - or people will have problems commenting on their own bugs SVN commit 673330 by jkt:
Allow re-using of tags from the previously tagged image in the annotation dialog
FEATURE: 145158
M +30 -0 AnnotationDialog/Dialog.cpp
M +2 -0 AnnotationDialog/Dialog.h
M +5 -0 ChangeLog
--- branches/extragear/kde3/graphics/kphotoalbum/AnnotationDialog/Dialog.cpp #673329:673330
@@ -159,6 +159,12 @@
_rotateRight->setIconSet( KGlobal::iconLoader()->loadIconSet( QString::fromLatin1( "rotate_cw" ), KIcon::Desktop, 22 ) );
_rotateRight->setFixedWidth( 40 );
+ _copyPreviousBut = new QPushButton( top2 );
+ lay6->addWidget( _copyPreviousBut );
+ _copyPreviousBut->setIconSet( KGlobal::iconLoader()->loadIconSet( QString::fromLatin1( "legalmoves" ), KIcon::Desktop, 22 ) );
+ _copyPreviousBut->setFixedWidth( 40 );
+ connect( _copyPreviousBut, SIGNAL( clicked() ), this, SLOT( slotCopyPrevious() ) );
+
lay6->addStretch( 1 );
_delBut = new QPushButton( top2 );
_delBut->setPixmap( KGlobal::iconLoader()->loadIcon( QString::fromLatin1( "editdelete" ), KIcon::Desktop, 22 ) );
@@ -328,6 +334,24 @@
}
}
+/*
+ * Copy tags (only tags/categories, not description/label/...) from previous image to the currently showed one
+ */
+void AnnotationDialog::Dialog::slotCopyPrevious()
+{
+ if ( _setup != InputSingleImageConfigMode )
+ return;
+ if ( _current < 1 )
+ return;
+
+ // FIXME: it would be better to compute the "previous image" in a better way, but let's stick with this for now...
+ DB::ImageInfo& old_info = _editList[ _current - 1 ];
+
+ for( QPtrListIterator<ListSelect> it( _optionList ); *it; ++it ) {
+ (*it)->setSelection( old_info.itemsOfCategory( (*it)->category() ) );
+ }
+}
+
void AnnotationDialog::Dialog::load()
{
DB::ImageInfo& info = _editList[ _current ];
@@ -357,6 +381,7 @@
_nextBut->setEnabled( _current != (int)_origList.count()-1 );
_prevBut->setEnabled( _current != 0 );
+ _copyPreviousBut->setEnabled( _current != 0 );
_preview->setImage( info );
@@ -429,6 +454,7 @@
_prevBut->setEnabled( false );
_nextBut->setEnabled( false );
+ _copyPreviousBut->setEnabled( false );
}
_thumbnailShouldReload = false;
@@ -493,6 +519,7 @@
}
_delBut->setEnabled( _setup == InputSingleImageConfigMode );
+ _copyPreviousBut->setEnabled( _setup == InputSingleImageConfigMode );
for( QPtrListIterator<ListSelect> it( _optionList ); *it; ++it )
(*it)->setMode( _setup );
@@ -931,6 +958,9 @@
new KAction( i18n("Delete"), CTRL+Key_Delete, this, SLOT( slotDeleteImage() ),
_actions, "annotationdialog-delete-image" );
+ new KAction( i18n("Copy tags from previous image"), CTRL+Key_Insert, this, SLOT( slotCopyPrevious() ),
+ _actions, "annotationdialog-copy-previous");
+
new KAction( i18n("Rotate Left"), 0, this, SLOT( rotateLeft() ), _actions, "annotationdialog-rotate-left" );
new KAction( i18n("Rotate Right"), 0, this, SLOT( rotateRight() ), _actions, "annotationdialog-rotate-right" );
--- branches/extragear/kde3/graphics/kphotoalbum/AnnotationDialog/Dialog.h #673329:673330
@@ -80,6 +80,7 @@
void slotDeleteImage();
void slotResetLayout();
void slotStartDateChanged( const DB::ImageDate& );
+ void slotCopyPrevious();
protected:
void load();
@@ -132,6 +133,7 @@
QPushButton* _rotateLeft;
QPushButton* _rotateRight;
QPushButton* _delBut;
+ QPushButton* _copyPreviousBut;
Editor* _description;
KTimeWidget* _time;
QPushButton* _addTime;
--- branches/extragear/kde3/graphics/kphotoalbum/ChangeLog #673329:673330
@@ -1,3 +1,8 @@
+2007-06-10 Jan Kundrat <jkt@gentoo.org>
+
+ * Allow re-using of tags from the previously tagged image in the
+ annotation dialog (first part of bug #145158)
+
2007-05-23 Jan Kundrat <jkt@gentoo.org>
* Make "show this image" fast again.
|