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

List:       kde-commits
Subject:    koffice/karbon
From:       Jan Hambrecht <jaham () gmx ! net>
Date:       2009-04-15 21:34:47
Message-ID: 1239831287.355637.15846.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 954547 by jaham:

use actions from default tool for changin z-order of selection

BUG:189710



 M  +8 -8      data/karbon.rc  
 M  +1 -53     ui/KarbonView.cpp  
 M  +0 -4      ui/KarbonView.h  


--- trunk/koffice/karbon/data/karbon.rc #954546:954547
@@ -76,10 +76,10 @@
             <Action name="object_duplicate"/>
             <Menu name="object_order">
                 <text>&amp;Order</text>
-                <Action name="object_move_totop"/>
-                <Action name="object_move_up"/>
-                <Action name="object_move_down"/>
-                <Action name="object_move_tobottom"/>
+                <Action name="object_order_front"/>
+                <Action name="object_order_raise"/>
+                <Action name="object_order_lower"/>
+                <Action name="object_order_back"/>
             </Menu>
             <Menu name="object_align">
                 <text>&amp;Align</text>
@@ -141,10 +141,10 @@
     </ToolBar>
     <ToolBar name="object_toolbar" hidden="true" fullWidth="false">
         <text>Object</text>
-        <Action name="object_move_totop"/>
-        <Action name="object_move_up"/>
-        <Action name="object_move_down"/>
-        <Action name="object_move_tobottom"/>
+        <Action name="object_order_front"/>
+        <Action name="object_order_raise"/>
+        <Action name="object_order_lower"/>
+        <Action name="object_order_back"/>
         <Action name="selection_group"/>
         <Action name="selection_ungroup"/>
     </ToolBar>
--- trunk/koffice/karbon/ui/KarbonView.cpp #954546:954547
@@ -542,38 +542,6 @@
     d->canvas->addCommand( cmd );
 }
 
-void KarbonView::selectionBringToFront()
-{
-    debugView("KarbonView::selectionBringToFront()");
-
-    QList<KoShape*> selectedShapes = \
                d->canvas->shapeManager()->selection()->selectedShapes( \
                KoFlake::TopLevelSelection );
-    d->canvas->addCommand( KoShapeReorderCommand::createCommand( selectedShapes, \
                d->canvas->shapeManager(), KoShapeReorderCommand::BringToFront ) );
-}
-
-void KarbonView::selectionMoveUp()
-{
-    debugView("KarbonView::selectionMoveUp()");
-
-    QList<KoShape*> selectedShapes = \
                d->canvas->shapeManager()->selection()->selectedShapes( \
                KoFlake::TopLevelSelection );
-    d->canvas->addCommand( KoShapeReorderCommand::createCommand( selectedShapes, \
                d->canvas->shapeManager(), KoShapeReorderCommand::RaiseShape ) );
-}
-
-void KarbonView::selectionMoveDown()
-{
-    debugView("KarbonView::selectionMoveDown()");
-
-    QList<KoShape*> selectedShapes = \
                d->canvas->shapeManager()->selection()->selectedShapes( \
                KoFlake::TopLevelSelection );
-    d->canvas->addCommand( KoShapeReorderCommand::createCommand( selectedShapes, \
                d->canvas->shapeManager(), KoShapeReorderCommand::LowerShape ) );
-}
-
-void KarbonView::selectionSendToBack()
-{
-    debugView("KarbonView::selectionSendToBack()");
-
-    QList<KoShape*> selectedShapes = \
                d->canvas->shapeManager()->selection()->selectedShapes( \
                KoFlake::TopLevelSelection );
-    d->canvas->addCommand( KoShapeReorderCommand::createCommand( selectedShapes, \
                d->canvas->shapeManager(), KoShapeReorderCommand::SendToBack ) );
-}
-
 void KarbonView::groupSelection()
 {
     debugView("KarbonView::groupSelection()");
@@ -844,27 +812,7 @@
     actionCollection()->addAction("object_duplicate", actionDuplicate );
     actionDuplicate->setShortcut(QKeySequence("Ctrl+D"));
     connect(actionDuplicate, SIGNAL(triggered()), this, SLOT(selectionDuplicate()));
-
-    KAction *actionBringToFront  = new KAction(KIcon("object-order-front"), \
                i18n("Bring to &Front"), this);
-    actionCollection()->addAction("object_move_totop", actionBringToFront );
-    actionBringToFront->setShortcut(QKeySequence("Ctrl+Shift+]"));
-    connect(actionBringToFront, SIGNAL(triggered()), this, \
                SLOT(selectionBringToFront()));
-
-    KAction *actionRaise  = new KAction(KIcon("object-order-raise"), i18n("&Raise"), \
                this);
-    actionCollection()->addAction("object_move_up", actionRaise );
-    actionRaise->setShortcut(QKeySequence("Ctrl+]"));
-    connect(actionRaise, SIGNAL(triggered()), this, SLOT(selectionMoveUp()));
-
-    KAction *actionLower  = new KAction(KIcon("object-order-lower"), i18nc("Lower \
                selected shapes", "&Lower"), this);
-    actionCollection()->addAction("object_move_down", actionLower );
-    actionLower->setShortcut(QKeySequence("Ctrl+["));
-    connect(actionLower, SIGNAL(triggered()), this, SLOT(selectionMoveDown()));
-
-    KAction *actionSendToBack  = new KAction(KIcon("object-order-back"), i18n("Send \
                to &Back"), this);
-    actionCollection()->addAction("object_move_tobottom", actionSendToBack );
-    actionSendToBack->setShortcut(QKeySequence("Ctrl+Shift+["));
-    connect(actionSendToBack, SIGNAL(triggered()), this, \
                SLOT(selectionSendToBack()));
-
+    
     KAction *actionDistributeHorizontalCenter  = new KAction(i18n("Distribute Center \
                (Horizontal)"), this);
     actionCollection()->addAction("object_distribute_horizontal_center", \
                actionDistributeHorizontalCenter );
     connect(actionDistributeHorizontalCenter, SIGNAL(triggered()), this, \
                SLOT(selectionDistributeHorizontalCenter()));
--- trunk/koffice/karbon/ui/KarbonView.h #954546:954547
@@ -93,10 +93,6 @@
     void editDeleteSelection();
 
     void selectionDuplicate();
-    void selectionBringToFront();
-    void selectionSendToBack();
-    void selectionMoveUp();
-    void selectionMoveDown();
     void selectionDistributeHorizontalCenter();
     void selectionDistributeHorizontalGap();
     void selectionDistributeHorizontalLeft();


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

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