[Qgis-developer] "Edit" Menu

Brendan Morley morb at beagle.com.au
Fri Apr 20 22:57:43 EDT 2007


Fellow programmers,

Another thing I want to do is add an Edit menu to the QGIS GUI.

The things I want to have on it are encapsulated in the following code
fragment:

  mEditMenu = menuBar()->addMenu(tr("&Edit"));
  mEditMenu->addAction(mActionEditCut);
  mEditMenu->addAction(mActionEditCopy);
  mEditMenu->addAction(mActionEditPaste);
  mEditMenu->addSeparator();
  mEditMenu->addAction(mActionAddVertex);
  mEditMenu->addAction(mActionMoveVertex);
  mEditMenu->addAction(mActionDeleteVertex);
  mEditMenu->addSeparator();
  mEditMenu->addAction(mActionPasteTransformations);
  mEditMenu->addSeparator();
  mEditMenu->addAction(mActionToggleSnapNearestVertex);

Also, I want to set up keyboard shortcuts for Cut, Copy and Paste as
encapsulated in the following code fragment:

  mActionEditCut->setShortcut(tr("Ctrl+X", "Cut selected objects to the clipboard"));
  mActionEditCopy->setShortcut(tr("Ctrl+C", "Copy selected objects to the clipboard"));
  mActionEditPaste->setShortcut(tr("Ctrl+V", "Paste objects from the clipboard"));


I've had this functionality on my local copy (the shortcuts are
particularly time-saving), and I have a feeling it ended up in one of
the subversion branches, but it is not in HEAD.

If there are no objections, I'll commit it to head in the next week or
so.



Brendan




More information about the Qgis-developer mailing list