mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
6381425476
commit
3c3523f9b8
2 changed files with 10 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@ public:
|
|||
void refreshDisplayedDiveSite();
|
||||
void nextInputField(QKeyEvent *event);
|
||||
void showAndTriggerEditSelective(struct dive_components what);
|
||||
void contextMenuEvent(QContextMenuEvent *event);
|
||||
|
||||
signals:
|
||||
void addDiveFinished();
|
||||
|
|
Loading…
Add table
Reference in a new issue