mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Context menu for images: add loading from file / web
Signed-off-by: Guido Lerch <guido.lerch@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
b73b312673
commit
fb24210ad9
2 changed files with 15 additions and 0 deletions
|
@ -1584,6 +1584,16 @@ void MainTab::removeAllPhotos()
|
|||
}
|
||||
}
|
||||
|
||||
void MainTab::addPhotosFromFile()
|
||||
{
|
||||
MainWindow::instance()->dive_list()->loadImages();
|
||||
}
|
||||
|
||||
void MainTab::addPhotosFromURL()
|
||||
{
|
||||
MainWindow::instance()->dive_list()->loadWebImages();
|
||||
}
|
||||
|
||||
#define SHOW_SELECTIVE(_component) \
|
||||
if (what._component) \
|
||||
ui._component->setText(displayed_dive._component);
|
||||
|
@ -1627,6 +1637,9 @@ void MainTab::showAndTriggerEditSelective(struct dive_components what)
|
|||
void MainTab::contextMenuEvent(QContextMenuEvent *event)
|
||||
{
|
||||
QMenu popup(this);
|
||||
popup.addAction(tr("Load image(s) from file(s)"), this, SLOT(addPhotosFromFile()));
|
||||
popup.addAction(tr("Load image(s) from web"), this, SLOT(addPhotosFromURL()));
|
||||
popup.addSeparator();
|
||||
popup.addAction(tr("Delete selected images"), this, SLOT(removeSelectedPhotos()));
|
||||
popup.addAction(tr("Delete all images"), this, SLOT(removeAllPhotos()));
|
||||
QAction *actionTaken = popup.exec(event->globalPos());
|
||||
|
|
|
@ -98,6 +98,8 @@ slots:
|
|||
void photoDoubleClicked(const QString filePath);
|
||||
void removeSelectedPhotos();
|
||||
void removeAllPhotos();
|
||||
void addPhotosFromFile();
|
||||
void addPhotosFromURL();
|
||||
void showLocation();
|
||||
void enableGeoLookupEdition();
|
||||
void disableGeoLookupEdition();
|
||||
|
|
Loading…
Reference in a new issue