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

List:       kde-commits
Subject:    extragear/graphics/digikam/utilities/imageeditor/editor
From:       Eva Brucherseifer <eva () kde ! org>
Date:       2010-07-17 10:11:04
Message-ID: 20100717101104.59727AC76A () svn ! kde ! org
[Download RAW message or body]

SVN commit 1150983 by eva:

Added new key action for Enter in editor. 
One can now open a tool and apply it immidiately using the enter key.
This speeds things up a bit. 
also see #174391 for some thoughts.


 M  +5 -0      editortool.cpp  
 M  +1 -0      editortool.h  
 M  +6 -0      editortooliface.cpp  
 M  +1 -0      editortooliface.h  
 M  +1 -0      editortoolsettings.cpp  
 M  +11 -0     editorwindow.cpp  
 M  +1 -0      editorwindow.h  


--- trunk/extragear/graphics/digikam/utilities/imageeditor/editor/editortool.cpp #1150982:1150983
@@ -242,6 +242,11 @@
     slotCancel();
 }
 
+void EditorTool::slotApplyTool()
+{
+    slotOk();
+}
+
 void EditorTool::slotPreviewModeChanged()
 {
     slotEffect();
--- trunk/extragear/graphics/digikam/utilities/imageeditor/editor/editortool.h #1150982:1150983
@@ -68,6 +68,7 @@
 
     void slotUpdateSpotInfo(const Digikam::DColor& col, const QPoint& point);
     virtual void slotCloseTool();
+    virtual void slotApplyTool();
     void slotPreviewModeChanged();
 
 Q_SIGNALS:
--- trunk/extragear/graphics/digikam/utilities/imageeditor/editor/editortooliface.cpp #1150982:1150983
@@ -189,6 +189,12 @@
     if (tool) tool->slotCloseTool();
 }
 
+void EditorToolIface::slotApplyTool()
+{
+    EditorTool *tool = dynamic_cast<EditorTool*>(d->tool);
+    if (tool) tool->slotApplyTool();
+}
+
 void EditorToolIface::setupICC()
 {
     d->editor->setupICC();
--- trunk/extragear/graphics/digikam/utilities/imageeditor/editor/editortooliface.h #1150982:1150983
@@ -78,6 +78,7 @@
 
     void slotCloseTool();
     void slotToolAborted();
+    void slotApplyTool();
 
 private:
 
--- trunk/extragear/graphics/digikam/utilities/imageeditor/editor/editortoolsettings.cpp #1150982:1150983
@@ -169,6 +169,7 @@
 
     d->okBtn = new KPushButton(d->btnBox1);
     d->okBtn->setGuiItem(KStandardGuiItem::ok());
+    d->okBtn->setDefault(true);
 
     d->cancelBtn = new KPushButton(d->btnBox1);
     d->cancelBtn->setGuiItem(KStandardGuiItem::cancel());
--- trunk/extragear/graphics/digikam/utilities/imageeditor/editor/editorwindow.cpp #1150982:1150983
@@ -577,6 +577,11 @@
     altBackwardAction->setShortcut( KShortcut(Qt::SHIFT+Qt::Key_Space) );
     connect(altBackwardAction, SIGNAL(triggered()), this, SLOT(slotBackward()));
 
+    KAction *applyToolAction = new KAction(i18n("Apply Tool"), this);
+    actionCollection()->addAction("editorwindow_apply_enter", applyToolAction);
+    applyToolAction->setShortcut( KShortcut(Qt::Key_Return) );
+    connect(applyToolAction, SIGNAL(triggered()), this, SLOT(slotApplyTool()));
+
     m_animLogo = new DLogoAction(this);
     actionCollection()->addAction("logo_action", m_animLogo);
 }
@@ -2230,6 +2235,12 @@
         d->toolIface->slotCloseTool();
 }
 
+void EditorWindow::slotApplyTool()
+{
+    if (d->toolIface)
+        d->toolIface->slotApplyTool();
+}
+
 void EditorWindow::setPreviewModeMask(int mask)
 {
     d->previewToolBar->setPreviewModeMask(mask);
--- trunk/extragear/graphics/digikam/utilities/imageeditor/editor/editorwindow.h #1150982:1150983
@@ -276,6 +276,7 @@
     void slotRawCameraList();
     void slotShowMenuBar();
     void slotCloseTool();
+    void slotApplyTool();
     void slotKioMoveFinished(KJob *job);
     void slotUndoStateChanged(bool, bool, bool);
 
[prev in list] [next in list] [prev in thread] [next in thread] 

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