mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Store camera time offset in preferences
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
dd24eaa377
commit
fe2a264db3
4 changed files with 36 additions and 0 deletions
|
@ -11,6 +11,7 @@
|
|||
#include <QProcess>
|
||||
#include <QStringList>
|
||||
#include <QDebug>
|
||||
#include <QTime>
|
||||
|
||||
#include "../dive.h"
|
||||
#include "mainwindow.h"
|
||||
|
@ -163,6 +164,7 @@ void ShiftImageTimesDialog::buttonClicked(QAbstractButton* button)
|
|||
m_amount = ui.timeEdit->time().hour() * 3600 + ui.timeEdit->time().minute() * 60;
|
||||
if (ui.backwards->isChecked())
|
||||
m_amount *= -1;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -177,6 +179,17 @@ int ShiftImageTimesDialog::amount() const
|
|||
return m_amount;
|
||||
}
|
||||
|
||||
void ShiftImageTimesDialog::setOffset(int offset)
|
||||
{
|
||||
if (offset >= 0) {
|
||||
ui.forward->setDown(TRUE);
|
||||
} else {
|
||||
ui.backwards->setDown(TRUE);
|
||||
offset *= -1;
|
||||
}
|
||||
ui.timeEdit->setTime(QTime::QTime(offset / 3600, (offset % 3600) / 60, offset % 60));
|
||||
}
|
||||
|
||||
bool isGnome3Session()
|
||||
{
|
||||
#if defined(QT_OS_WIW) || defined(QT_OS_MAC)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue