• OctoMY API
  • OctoMY API Reference
  • C++ Classes
  • libconfigui
  • SetCommand
  • config::ui::SetCommand Class

    class config::ui::SetCommand

    One edit of one setting at one level, as an undo step. More...

    Header: #include <SetCommand>
    Inherits: QUndoCommand

    Detailed Description

    The command holds the schema, the id, the level, the state before (set or unset, and the value) and the state after. redo() applies the state after and undo() the state before, so an undo of a first write clears the level instead of writing the default (config-ui §CFGV-3).

    A drag produces many edits. Two commands merge only when they have the same id, the same level and the same drag session. A press starts a session and a release ends it, so one drag is one undo step and two drags are two.