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

List:       kde-commits
Subject:    koffice/kspread/part
From:       Carlos Licea <carlos_licea () hotmail ! com>
Date:       2009-09-11 23:31:21
Message-ID: 1252711881.324118.22186.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1022529 by clicea:

Allow the deletion of a selected shape.

BUG:173622


 M  +17 -0     View.cpp  
 M  +1 -0      View.h  


--- trunk/koffice/kspread/part/View.cpp #1022528:1022529
@@ -104,6 +104,7 @@
 #include <KoZoomAction.h>
 #include <KoZoomController.h>
 #include <KoZoomHandler.h>
+#include <KoToolProxy.h>
 
 // KSpread includes
 #include "ApplicationSettings.h"
@@ -235,6 +236,9 @@
     QAction * hideSheet;
     QAction * showSheet;
 
+    //Shape manipulation
+    KAction * deleteShape;
+
     // page layout
     QAction * paperLayout;
     QAction * resetPrintRange;
@@ -506,6 +510,13 @@
     actions->calcCountA->setToolTip(i18n("Calculate using the countA"));
     actions->calcCountA->setActionGroup( groupCalc );
 
+    //Shape actions
+    actions->deleteShape = new KAction( KIcon("edit-delete"), i18n("Delete"), view \
); +    actions->deleteShape->setShortcut(QKeySequence("Del"));
+    connect(actions->deleteShape, SIGNAL(triggered()), view, \
SLOT(editDeleteSelection())); +    connect(canvas->toolProxy(), \
SIGNAL(selectionChanged(bool)), actions->deleteShape, SLOT(setEnabled(bool))); +    \
ac->addAction("edit_delete", actions->deleteShape ); +
     // -- special action, only for developers --
     //
 
@@ -1089,6 +1100,12 @@
     }
 }
 
+
+void View::editDeleteSelection()
+{
+    d->canvas->toolProxy()->deleteSelection();
+}
+
 void View::initialPosition()
 {
     // Loading completed, pick initial worksheet
--- trunk/koffice/kspread/part/View.h #1022528:1022529
@@ -349,6 +349,7 @@
     void slotSheetShown( Sheet*_sheet );
     void slotSheetRemoved( Sheet*_sheet );
     void shapeSelectionChanged();
+    void editDeleteSelection();
 
 public:
     virtual int leftBorder() const;


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

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