mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Merge branch 'Planner'
This commit is contained in:
commit
9cc8e39d42
12 changed files with 87 additions and 72 deletions
|
@ -67,9 +67,7 @@ CylindersModel::CylindersModel(QObject *parent) : current(0), rows(0)
|
|||
{
|
||||
// enum {REMOVE, TYPE, SIZE, WORKINGPRESS, START, END, O2, HE, DEPTH};
|
||||
setHeaderDataStrings(QStringList() << "" << tr("Type") << tr("Size") << tr("WorkPress") << tr("StartPress") << tr("EndPress") << trUtf8("O" UTF8_SUBSCRIPT_2 "%") << tr("He%")
|
||||
#ifdef ENABLE_PLANNER
|
||||
<< tr("Switch at")
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -145,11 +143,9 @@ QVariant CylindersModel::data(const QModelIndex &index, int role) const
|
|||
case HE:
|
||||
ret = percent_string(cyl->gasmix.he);
|
||||
break;
|
||||
#ifdef ENABLE_PLANNER
|
||||
case DEPTH:
|
||||
ret = get_depth_string(cyl->depth, true);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case Qt::DecorationRole:
|
||||
|
@ -265,13 +261,11 @@ bool CylindersModel::setData(const QModelIndex &index, const QVariant &value, in
|
|||
changed = true;
|
||||
}
|
||||
break;
|
||||
#ifdef ENABLE_PLANNER
|
||||
case DEPTH:
|
||||
if (CHANGED()) {
|
||||
cyl->depth = string_to_depth(vString.toUtf8().data());
|
||||
changed = true;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
dataChanged(index, index);
|
||||
if (addDiveMode)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue