mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 22:33:24 +00:00
Start external viewer on photo double-click
Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
d1511aa968
commit
e88f37d327
2 changed files with 8 additions and 0 deletions
|
@ -27,6 +27,7 @@
|
|||
#include <QScrollBar>
|
||||
#include <QShortcut>
|
||||
#include <QMessageBox>
|
||||
#include <QDesktopServices>
|
||||
|
||||
MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
|
||||
weightModel(new WeightModel(this)),
|
||||
|
@ -41,6 +42,7 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
|
|||
ui.cylinders->setModel(cylindersModel);
|
||||
ui.weights->setModel(weightModel);
|
||||
ui.photosView->setModel(divePictureModel);
|
||||
connect(ui.photosView, SIGNAL(photoDoubleClicked(QString)), this, SLOT(photoDoubleClicked(QString)));
|
||||
closeMessage();
|
||||
|
||||
QAction *action = new QAction(tr("Save"), this);
|
||||
|
@ -1119,3 +1121,8 @@ void MainTab::escDetected()
|
|||
if (editMode != NONE)
|
||||
rejectChanges();
|
||||
}
|
||||
|
||||
void MainTab::photoDoubleClicked(const QString filePath)
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile(filePath));
|
||||
}
|
||||
|
|
|
@ -85,6 +85,7 @@ slots:
|
|||
void updateTextLabels(bool showUnits = true);
|
||||
QString trHemisphere(const char *orig);
|
||||
void escDetected(void);
|
||||
void photoDoubleClicked(const QString filePath);
|
||||
|
||||
private:
|
||||
Ui::MainTab ui;
|
||||
|
|
Loading…
Add table
Reference in a new issue