Context menu for images

Just add a context menu for now - the following commits will make this
useful.

Signed-off-by: Guido Lerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Guido Lerch 2015-10-20 21:02:41 +02:00 committed by Dirk Hohndel
parent 6381425476
commit 3c3523f9b8
2 changed files with 10 additions and 0 deletions

View file

@ -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();
}

View file

@ -54,6 +54,7 @@ public:
void refreshDisplayedDiveSite();
void nextInputField(QKeyEvent *event);
void showAndTriggerEditSelective(struct dive_components what);
void contextMenuEvent(QContextMenuEvent *event);
signals:
void addDiveFinished();