[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [digikam] /: Restore CTRL+ENTER action to Captions/Tags sidebar when focus is given to text edit wid
From:       Gilles Caulier <caulier.gilles () gmail ! com>
Date:       2014-09-09 15:53:03
Message-ID: E1XRNj5-00055K-LL () scm ! kde ! org
[Download RAW message or body]

Git commit 26abf66c86cd9e374a1a7c34fe4bc2110bd7adbf by Gilles Caulier.
Committed on 09/09/2014 at 15:50.
Pushed by cgilles into branch 'master'.

Restore CTRL+ENTER action to Captions/Tags sidebar when focus is given to text edit \
widget. Add new events filter to re-route PageUp/PageDown action from TextEdit wigets \
to icon-view, to be able to naviguate between items while properties editing. These \
                feature require KExiv2 2.3.2 to work.
BUGS: 201698
BUGS: 211622
FIXED-IN: 4.4.0

M  +5    -1    NEWS
M  +10   -0    libs/imageproperties/captionedit.cpp
M  +7    -0    libs/imageproperties/captionedit.h
M  +20   -2    libs/imageproperties/imagedescedittab.cpp

http://commits.kde.org/digikam/26abf66c86cd9e374a1a7c34fe4bc2110bd7adbf

diff --git a/NEWS b/NEWS
index b5fe070..b29a905 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,8 @@ digiKam 4.4.0 - Release date: 2014-10-12
 
 NEW FEATURES:
 
+General : Naviguate between pictures using PageUp/PageDown is now possible while \
editing properties through captions/tags sidebar. +
 BUGFIXES FROM KDE BUGZILLA (alias B.K.O | http://bugs.kde.org):
 
 001 ==> 147175 - CANVAS : fit only large images to window.
@@ -14,4 +16,6 @@ BUGFIXES FROM KDE BUGZILLA (alias B.K.O | http://bugs.kde.org):
 007 ==> 110658 - Thumbnails generation process should have low priority.
 008 ==> 224806 - ICONVIEW : use keyboard modifier with right mouse click to run \
default "Open With..." action  009 ==> 309557 - Add a new option to show image Title \
                information in tooltips.
-010 ==> 
+010 ==> 201698 - Add keyboard shortcut for album navigation when using Captions/Tags \
sidebar. +011 ==> 211622 - Pressing PageDown should show the next image when focus is \
in Captions/Tags side bar. +012 ==> 
diff --git a/libs/imageproperties/captionedit.cpp \
b/libs/imageproperties/captionedit.cpp index 4bb1b64..88413fc 100644
--- a/libs/imageproperties/captionedit.cpp
+++ b/libs/imageproperties/captionedit.cpp
@@ -34,6 +34,7 @@
 
 #include <libkexiv2/version.h>
 #include <libkexiv2/altlangstredit.h>
+#include <libkexiv2/msgtextedit.h>
 
 using namespace KExiv2Iface;
 
@@ -199,4 +200,13 @@ void CaptionEdit::slotAuthorChanged(const QString& text)
     }
 }
 
+MsgTextEdit* CaptionEdit::textEdit() const
+{
+#if KEXIV2_VERSION >= 0x020302
+    return d->altLangStrEdit->textEdit();
+#else
+    return 0;
+#endif
+}
+
 }  // namespace Digikam
diff --git a/libs/imageproperties/captionedit.h b/libs/imageproperties/captionedit.h
index 4caf72d..17c6714 100644
--- a/libs/imageproperties/captionedit.h
+++ b/libs/imageproperties/captionedit.h
@@ -38,6 +38,11 @@
 
 #include "captionvalues.h"
 
+namespace KExiv2Iface
+{
+    class MsgTextEdit;
+}
+
 namespace Digikam
 {
 
@@ -58,6 +63,8 @@ public:
 
     void reset();
 
+    KExiv2Iface::MsgTextEdit* textEdit() const;
+
 Q_SIGNALS:
 
     void signalModified();
diff --git a/libs/imageproperties/imagedescedittab.cpp \
b/libs/imageproperties/imagedescedittab.cpp index 10018d7..c213372 100644
--- a/libs/imageproperties/imagedescedittab.cpp
+++ b/libs/imageproperties/imagedescedittab.cpp
@@ -53,6 +53,7 @@
 
 #include <libkexiv2/version.h>
 #include <libkexiv2/altlangstredit.h>
+#include <libkexiv2/msgtextedit.h>
 
 // Libkdcraw includes
 
@@ -428,8 +429,11 @@ ImageDescEditTab::ImageDescEditTab(QWidget* const parent)
 
     // Initialize ---------------------------------------------
 
-    d->titleEdit->installEventFilter(this);
-    d->captionsEdit->installEventFilter(this);
+#if KEXIV2_VERSION >= 0x020302
+    d->titleEdit->textEdit()->installEventFilter(this);
+    d->captionsEdit->textEdit()->installEventFilter(this);
+#endif
+
     d->dateTimeEdit->installEventFilter(this);
     d->pickLabelSelector->installEventFilter(this);
     d->colorLabelSelector->installEventFilter(this);
@@ -872,6 +876,20 @@ bool ImageDescEditTab::eventFilter(QObject* o, QEvent* e)
                 return true;
             }
         }
+
+        if (k->key() == Qt::Key_PageUp)
+        {
+            d->lastSelectedWidget = qobject_cast<QWidget*>(o);
+            emit signalPrevItem();
+            return true;
+        }
+
+        if (k->key() == Qt::Key_PageDown)
+        {
+            d->lastSelectedWidget = qobject_cast<QWidget*>(o);
+            emit signalNextItem();
+            return true;
+        }
     }
 
     return KVBox::eventFilter(o, e);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic