aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--desktop-widgets/maintab.cpp9
-rw-r--r--desktop-widgets/maintab.h1
2 files changed, 10 insertions, 0 deletions
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();
+}
diff --git a/desktop-widgets/maintab.h b/desktop-widgets/maintab.h
index 20b4da690..7b2bb863b 100644
--- a/desktop-widgets/maintab.h
+++ b/desktop-widgets/maintab.h
@@ -54,6 +54,7 @@ public:
void refreshDisplayedDiveSite();
void nextInputField(QKeyEvent *event);
void showAndTriggerEditSelective(struct dive_components what);
+ void contextMenuEvent(QContextMenuEvent *event);
signals:
void addDiveFinished();