mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
profile: port basic dive editing to QtQuick
This needed a bit of refactoring of the ChartItem code, because we have to be signaled on drag start. Currently only one handle can be selected at a time. This was (implicitly) the case anyway, as far as I can tell. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
ea0085fef6
commit
bece0a0652
21 changed files with 597 additions and 477 deletions
|
@ -15,6 +15,15 @@ struct gasmix {
|
|||
fraction_t o2;
|
||||
fraction_t he;
|
||||
std::string name() const;
|
||||
// TODO: use spaceship operator once we move to C++20
|
||||
bool operator==(const gasmix &g2) const
|
||||
{
|
||||
return o2.permille == g2.o2.permille && he.permille == g2.he.permille;
|
||||
}
|
||||
bool operator!=(const gasmix &g2) const
|
||||
{
|
||||
return !(*this == g2);
|
||||
}
|
||||
};
|
||||
static const struct gasmix gasmix_invalid = { { .permille = -1 }, { .permille = -1 } };
|
||||
static const struct gasmix gasmix_air = { 0_percent, 0_percent };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue