mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix slot handling in Photos tab
This clearly has never been tested, never worked. Oh well. Fixes #478 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
b7b2e813ad
commit
1b8b112048
2 changed files with 6 additions and 5 deletions
|
@ -43,11 +43,11 @@ void TabDivePhotos::clear()
|
||||||
void TabDivePhotos::contextMenuEvent(QContextMenuEvent *event)
|
void TabDivePhotos::contextMenuEvent(QContextMenuEvent *event)
|
||||||
{
|
{
|
||||||
QMenu popup(this);
|
QMenu popup(this);
|
||||||
popup.addAction(tr("Load image(s) from file(s)"), this, SLOT(addPhotosFromFile));
|
popup.addAction(tr("Load image(s) from file(s)"), this, SLOT(addPhotosFromFile()));
|
||||||
popup.addAction(tr("Load image(s) from web"), this, SLOT(addPhotosFromURL));
|
popup.addAction(tr("Load image(s) from web"), this, SLOT(addPhotosFromURL()));
|
||||||
popup.addSeparator();
|
popup.addSeparator();
|
||||||
popup.addAction(tr("Delete selected images"), this, SLOT(removeSelectedPhotos));
|
popup.addAction(tr("Delete selected images"), this, SLOT(removeSelectedPhotos()));
|
||||||
popup.addAction(tr("Delete all images"), this, SLOT(removeAllPhotos));
|
popup.addAction(tr("Delete all images"), this, SLOT(removeAllPhotos()));
|
||||||
popup.exec(event->globalPos());
|
popup.exec(event->globalPos());
|
||||||
event->accept();
|
event->accept();
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,12 +21,13 @@ public:
|
||||||
protected:
|
protected:
|
||||||
void contextMenuEvent(QContextMenuEvent *ev) override;
|
void contextMenuEvent(QContextMenuEvent *ev) override;
|
||||||
|
|
||||||
private:
|
private slots:
|
||||||
void addPhotosFromFile();
|
void addPhotosFromFile();
|
||||||
void addPhotosFromURL();
|
void addPhotosFromURL();
|
||||||
void removeAllPhotos();
|
void removeAllPhotos();
|
||||||
void removeSelectedPhotos();
|
void removeSelectedPhotos();
|
||||||
|
|
||||||
|
private:
|
||||||
Ui::TabDivePhotos *ui;
|
Ui::TabDivePhotos *ui;
|
||||||
DivePictureModel *divePictureModel;
|
DivePictureModel *divePictureModel;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue