12#include <QModelIndexList>
29void applyToCells(SignalModel &model,
const QModelIndexList &cells,
const std::function<
int(
int)> &valueFn);
33void clockWave(SignalModel &model,
const QModelIndexList &cells,
int firstCol,
int period);
37void combinational(SignalModel &model,
int inputPorts,
int columns);
40void clearInputs(SignalModel &model,
int inputPorts);
47void growInputColumns(SignalModel &model,
int inputPorts,
int oldLength,
int newLength);
QStandardItemModel subclass that makes all cells non-editable.
Pure mutations of a SignalModel's value grid — the data side of the editor's commands (set/invert/cle...
void combinational(SignalModel &model, const int inputPorts, const int columns)
void clearInputs(SignalModel &model, const int inputPorts)
Sets every input cell (the first inputPorts rows, over the model's columns) to 0.
void applyToCells(SignalModel &model, const QModelIndexList &cells, const std::function< int(int)> &valueFn)
Sets each cell in cells to valueFn(currentValue).
void growInputColumns(SignalModel &model, const int inputPorts, const int oldLength, const int newLength)
int lastNonZeroColumn(const SignalModel &model, const int inputPorts)
Returns the index of the last column with any non-zero input value, or 0 if none.
void clockWave(SignalModel &model, const QModelIndexList &cells, const int firstCol, const int period)