GSoC/GCI Archive
Google Code-in 2012 KDE

Marble: Add Copy Menu and Shortcut to the MarbleLegendBrowser

completed by: Illya Kovalevskyy

mentors: Torsten Rahn, René Küttner, Dennis Nienhüser

The newly created MarbleLegendBrowser based on the QWebView lacks a context menu with a copy action. It also lacks shortcut support.

Please add a context menu to the new QWebView based MarbleLegendBrowser and add a translatable entry "Copy" (including a "copy" icon).

Add a shortcut Ctrl-C that copies the text entry. NOTE: It looks like there is a bug inside Qt 4.7 which doesn't support:

 

  1. QAction *act = ui->webView->pageAction(QWebPage::Copy);
  2. act->setShortcut(QKeySequence::Copy);

Instead it seems that an event filter needs to be set.

See:

http://www.qtforum.org/article/26983/qwebview-selected-text-context-menu.html

http://www.qtcentre.org/threads/41997-Qwebview-Copy-Text-And-Save-Image

This task needs to be developed on top of the existing patch sets that are currently located on reviewboard.