aboutsummaryrefslogtreecommitdiffstats
path: root/commands/command_edit.h
AgeCommit message (Collapse)Author
2020-01-06core: read and write the user-specified salinityGravatar willemferguson
Both XML and git storage are added. Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-05Undo: make weight editing undoableGravatar Berthold Stoeger
Implement the EditWeight undo command. Since there is common code (storage of the old weight), this creates a common base class for RemoveWeight and EditWeight. The model calls directly into the undo command, which is somewhat unfortunate as it feels like a layering violation. It's the easy thing to do for now. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-12-05Undo: make weight-deletion an undoable actionGravatar Berthold Stoeger
This one is a bit more complicated than weight adding, because the multiple-dive case is not well defined. If multiple dives are selected, this implementation will search for weights that are identical to the weight deleted in the currently shown dive. The position of the weight in the list is ignored. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-12-05Undo: make adding of weights an undoable actionGravatar Berthold Stoeger
Introduce an AddWeight undo command. This is modelled after the numerous dive-edit undo commands. The redo and undo actions are connected to the WeightModel via two new signals, weightAdded and weightRemoved. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-12-03Undo: make profile-editing undoableGravatar Berthold Stoeger
Recently, undo of dive-replanning was introduced. Therefore, it appears logical to do the same thing for editing of the profile of manually added dives. For now, use the same undo-command, just change the displayed text from "replan dive" to "edit profile". Move the fixup dive call into the undo-command. Eventually, every action on the profile should be made undoable. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-12-03Desktop: add additional star widgets to Information tabGravatar willemferguson
Connect the UI to the underlying dive structure. Enable proper initialisation and management of star widgets while Information tab is active. Enable undo for the addtional star widgets. Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-14Refactoring: move undo commands to top levelGravatar Berthold Stoeger
In the future we might want to use undo-commands for mobile as well (even if not implementing undo). Therefore, move the undo-command source from desktop-widgets to their own commands top-level folder. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>