From 3c3523f9b8af25a2eb28042e0de3c527c33506eb Mon Sep 17 00:00:00 2001 From: Guido Lerch Date: Tue, 20 Oct 2015 21:02:41 +0200 Subject: Context menu for images Just add a context menu for now - the following commits will make this useful. Signed-off-by: Guido Lerch Signed-off-by: Dirk Hohndel --- desktop-widgets/maintab.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'desktop-widgets/maintab.cpp') diff --git a/desktop-widgets/maintab.cpp b/desktop-widgets/maintab.cpp index c7961735a..7b4c4b9d1 100644 --- a/desktop-widgets/maintab.cpp +++ b/desktop-widgets/maintab.cpp @@ -1610,3 +1610,12 @@ void MainTab::showAndTriggerEditSelective(struct dive_components what) weightModel->changed = true; } } + +void MainTab::contextMenuEvent(QContextMenuEvent *event) +{ + QMenu popup(this); + popup.addAction(tr("Delete selected images"), this, SLOT(removeSelectedPhotos())); + popup.addAction(tr("Delete all images"), this, SLOT(removeAllPhotos())); + QAction *actionTaken = popup.exec(event->globalPos()); + event->accept(); +} -- cgit v1.2.3-70-g09d2