wiRedPanda
Logic Circuit Simulator
Loading...
Searching...
No Matches
ToggleTruthTableOutputCommand Class Reference

Undo command that toggles one output bit in a TruthTable element. More...

#include <Commands.h>

Inheritance diagram for ToggleTruthTableOutputCommand:
[legend]

Public Member Functions

void redo () override
 Toggles the bit at pos.
 ToggleTruthTableOutputCommand (GraphicElement *element, int pos, Scene *scene, QUndoCommand *parent=nullptr)
 Constructs the toggle command.
void undo () override
 Toggles the bit again (involution).

Detailed Description

Undo command that toggles one output bit in a TruthTable element.

Definition at line 416 of file Commands.h.

Constructor & Destructor Documentation

◆ ToggleTruthTableOutputCommand()

ToggleTruthTableOutputCommand::ToggleTruthTableOutputCommand ( GraphicElement * element,
int pos,
Scene * scene,
QUndoCommand * parent = nullptr )
explicit

Constructs the toggle command.

Parameters
elementTruthTable element to modify.
posFlat index of the bit to toggle in the proposition array.
sceneTarget scene.
parentOptional parent undo command.

Definition at line 1053 of file Commands.cpp.

References ItemWithId::id().

Member Function Documentation

◆ redo()

void ToggleTruthTableOutputCommand::redo ( )
override

Toggles the bit at pos.

Definition at line 1062 of file Commands.cpp.

References CommandUtils::findElm(), PANDACEPTION, and qCDebug.

Referenced by undo().

◆ undo()

void ToggleTruthTableOutputCommand::undo ( )
override

Toggles the bit again (involution).

Definition at line 1084 of file Commands.cpp.

References redo().


The documentation for this class was generated from the following files: