mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Context menu entry to change setpoint
This patch adds a context menu entry to add a setpoint change event. In particular, this can be used to turn a logged dive into a CCR dive. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
96a94f1a19
commit
fb265c2929
4 changed files with 51 additions and 1 deletions
|
@ -172,13 +172,18 @@ void SetpointDialog::setpointData(struct divecomputer *divecomputer, int second)
|
|||
{
|
||||
dc = divecomputer;
|
||||
time = second;
|
||||
qDebug() << second << time;
|
||||
}
|
||||
|
||||
void SetpointDialog::buttonClicked(QAbstractButton *button)
|
||||
{
|
||||
if (ui.buttonBox->buttonRole(button) == QDialogButtonBox::AcceptRole) {
|
||||
add_event(dc, time, SAMPLE_EVENT_PO2, 0, ui.spinbox->value(), "SP change");
|
||||
qDebug() << time << (int)(1000.0 * ui.spinbox->value());
|
||||
add_event(dc, time, SAMPLE_EVENT_PO2, 0, (int)(1000.0 * ui.spinbox->value()), "SP change");
|
||||
}
|
||||
mark_divelist_changed(true);
|
||||
MainWindow::instance()->graphics()->replot();
|
||||
|
||||
}
|
||||
|
||||
SetpointDialog::SetpointDialog(QWidget *parent) : QDialog(parent)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue