[Kst] extragear/graphics/kst/src/libkstapp

Andrew Walker arwalker at sumusltd.com
Wed Feb 22 19:13:09 CET 2006


SVN commit 512514 by arwalker:

BUG:121994 Create default shortcuts for all modes

 M  +30 -20    kst.cpp  


--- trunk/extragear/graphics/kst/src/libkstapp/kst.cpp #512513:512514
@@ -449,7 +449,8 @@
   connect(PauseAction, SIGNAL(toggled(bool)), this, SLOT(updatePausedState(bool)));
 
   /************/
-  XYZoomAction = new KRadioAction(i18n("XY Mouse &Zoom"), "kst_zoomxy", 0,
+  XYZoomAction = new KRadioAction(i18n("XY Mouse &Zoom"), "kst_zoomxy",
+                                  KShortcut(Key_F2),
                                   this, SLOT(toggleMouseMode()),
                                   actionCollection(), "zoomxy_action");
   XYZoomAction->setExclusiveGroup("gfx");
@@ -459,7 +460,8 @@
   XYZoomAction->setChecked(true);
 
   /************/
-  XZoomAction = new KRadioAction(i18n("&X Mouse Zoom"), "kst_zoomx", 0,
+  XZoomAction = new KRadioAction(i18n("&X Mouse Zoom"), "kst_zoomx",
+                                 KShortcut(Key_F3),
                                  this, SLOT(toggleMouseMode()),
                                  actionCollection(), "zoomx_action");
   XZoomAction->setExclusiveGroup("gfx");
@@ -468,7 +470,8 @@
                                  "X axis (CTRL-mouse also does this)"));
 
   /************/
-  YZoomAction = new KRadioAction(i18n("&Y Mouse Zoom"), "kst_zoomy", 0,
+  YZoomAction = new KRadioAction(i18n("&Y Mouse Zoom"), "kst_zoomy",
+                                  KShortcut(Key_F4),
                                   this, SLOT(toggleMouseMode()),
                                   actionCollection(), "zoomy_action");
   YZoomAction->setExclusiveGroup("gfx");
@@ -765,53 +768,60 @@
   _tiedZoomAction->setWhatsThis(i18n("Apply zoom actions to all plots\n"
                                      "(not just the active one)."));
 
-  _gfxRectangleAction = new KRadioAction(i18n("&Rectangle"), "kst_gfx_rectangle", 0,
+  _gfxRectangleAction = new KRadioAction(i18n("&Rectangle"), "kst_gfx_rectangle", 
+                                  KShortcut(Key_F8),
                                   this, SLOT(toggleMouseMode()),
                                   actionCollection(), "rectangle_action");
   _gfxRectangleAction->setExclusiveGroup("gfx");
   _gfxRectangleAction->setToolTip(i18n("Draw rectangle"));
   _gfxRectangleAction->setWhatsThis(i18n("Draw rectangle"));
 
-  _gfxEllipseAction = new KRadioAction(i18n("&Ellipse"), "kst_gfx_ellipse", 0,
+  _gfxEllipseAction = new KRadioAction(i18n("&Ellipse"), "kst_gfx_ellipse",
+                                  KShortcut(Key_F9),
                                   this, SLOT(toggleMouseMode()),
                                   actionCollection(), "ellipse_action");
   _gfxEllipseAction->setExclusiveGroup("gfx");
   _gfxEllipseAction->setToolTip(i18n("Draw ellipse"));
   _gfxEllipseAction->setWhatsThis(i18n("Draw ellipse"));
 
-  _gfxPictureAction = new KRadioAction(i18n("&Picture"), "kst_gfx_picture", 0,
-                                       this, SLOT(toggleMouseMode()),
-                                       actionCollection(), "picture_action");
+  _gfxPictureAction = new KRadioAction(i18n("&Picture"), "kst_gfx_picture",
+                                   KShortcut(Key_F12),
+                                   this, SLOT(toggleMouseMode()),
+                                   actionCollection(), "picture_action");
   _gfxPictureAction->setExclusiveGroup("gfx");
   _gfxPictureAction->setToolTip(i18n("Insert picture"));
   _gfxPictureAction->setWhatsThis(i18n("Insert picture"));
 
-  _gfxArrowAction = new KRadioAction(i18n("&Arrow"), "kst_gfx_arrow", 0,
-                                     this, SLOT(toggleMouseMode()),
-                                     actionCollection(), "arrow_action");
+  _gfxArrowAction = new KRadioAction(i18n("&Arrow"), "kst_gfx_arrow",
+                                   KShortcut(Key_F11),
+                                   this, SLOT(toggleMouseMode()),
+                                   actionCollection(), "arrow_action");
   _gfxArrowAction->setExclusiveGroup("gfx");
   _gfxArrowAction->setToolTip(i18n("Draw arrow"));
   _gfxArrowAction->setWhatsThis(i18n("Draw arrow"));
 
-  _gfxLineAction = new KRadioAction(i18n("&Line"), "kst_gfx_line", 0,
-                                  this, SLOT(toggleMouseMode()),
-                                  actionCollection(), "line_action");
+  _gfxLineAction = new KRadioAction(i18n("&Line"), "kst_gfx_line",
+                                   KShortcut(Key_F10),
+                                   this, SLOT(toggleMouseMode()),
+                                   actionCollection(), "line_action");
   _gfxLineAction->setExclusiveGroup("gfx");
   _gfxLineAction->setToolTip(i18n("Draw line"));
   _gfxLineAction->setWhatsThis(i18n("Draw line"));
   _gfxLineAction->setChecked(true);
 
   /************/
-  _gfxLabelAction = new KRadioAction(i18n("L&abel"), "text", 0,
-                                this, SLOT(toggleMouseMode()),
-                                actionCollection(), "label_action");
+  _gfxLabelAction = new KRadioAction(i18n("L&abel"), "text",
+                                   KShortcut(Key_F7),
+                                   this, SLOT(toggleMouseMode()),
+                                   actionCollection(), "label_action");
   _gfxLabelAction->setExclusiveGroup("gfx");
   _gfxLabelAction->setToolTip(i18n("Draw label"));
   _gfxLabelAction->setWhatsThis(i18n("Draw label"));
 
-  LayoutAction = new KRadioAction(i18n("Layout Mode"), "kst_layoutmode", 0,
-                                  this, SLOT(toggleMouseMode()),
-                                  actionCollection(), "layoutmode_action");
+  LayoutAction = new KRadioAction(i18n("Layout Mode"), "kst_layoutmode",
+                                   KShortcut(Key_F6),
+                                   this, SLOT(toggleMouseMode()),
+                                   actionCollection(), "layoutmode_action");
   LayoutAction->setExclusiveGroup("gfx");
   LayoutAction->setToolTip(i18n("Layout mode"));
   LayoutAction->setWhatsThis(i18n("Use this mode to move, resize, and group plots."));


More information about the Kst mailing list