casa
5.7.0-16
|
Widget to display and change the current array slice. More...
#include <TBSlicer.qo.h>
Signals | |
void | sliceChanged (std::vector< int > slice) |
This signal is emitted when the user changes the slice. More... | |
Public Member Functions | |
TBSlicer (std::vector< int > d) | |
Constructor that takes the shape of the array. More... | |
~TBSlicer () | |
Private Slots | |
void | valueChanged () |
Slot for when one of the spinners changes values. More... | |
void | rowAxisChanged (int newRow) |
Slot for when the row axis dimension is changed. More... | |
void | colAxisChanged (int newCol) |
Slot for when the column axis dimension is changed. More... | |
Private Member Functions | |
void | emitSliceChanged () |
Collects the slice and emits the sliceChanged() signal. More... | |
Private Attributes | |
std::vector< QSpinBox * > | spinners |
Current spinners. More... | |
std::vector< int > | values |
Current slice values. More... | |
int | oldR |
Holds the old row index. More... | |
int | oldC |
Holds the old column index. More... | |
bool | shouldEmit |
Flag to indicate whether GUI-generated events are "genuine.". More... | |
Widget to display and change the current array slice.
A TBSlicer has two parts: the bottom part allows the user to chooser which dimension is viewed along the two axes, and the top part chooses which "slice" along those two axes to view. When the user changes the slice, a signal is emitted; the parent/caller is responsible for connecting and processing the signal.
Definition at line 52 of file TBSlicer.qo.h.
casa::TBSlicer::TBSlicer | ( | std::vector< int > | d | ) |
Constructor that takes the shape of the array.
casa::TBSlicer::~TBSlicer | ( | ) |
|
privateslot |
Slot for when the column axis dimension is changed.
Updates the slicer accordingly.
|
private |
Collects the slice and emits the sliceChanged() signal.
|
privateslot |
Slot for when the row axis dimension is changed.
Updates the slicer accordingly.
|
signal |
This signal is emitted when the user changes the slice.
The slice parameter contains non-negative values along all dimensions EXCEPT for the two dimensions that are mapped to the X- and Y-axes. The dimension mapped to the X-axis has the value TBConstants::SLICER_ROW_AXIS in the vector while the dimension mapped to the Y-axis has the value TBConstants::SLICER_COL_AXIS in the vector. For example, if the array was 4x4x4, a slice of [SLICER_ROW_AXIS 1 SLICER_COL_AXIS] would mean to display the first dimension along the X-axis and the third dimension along the Y-axis and to use 1 as the index for the second dimension.
|
privateslot |
Slot for when one of the spinners changes values.
Updates the current slice and calls emitSliceChanged() if the slice has changed.
|
private |
Holds the old column index.
Definition at line 85 of file TBSlicer.qo.h.
|
private |
Holds the old row index.
Definition at line 82 of file TBSlicer.qo.h.
|
private |
Flag to indicate whether GUI-generated events are "genuine.".
Definition at line 88 of file TBSlicer.qo.h.
|
private |
Current spinners.
Definition at line 76 of file TBSlicer.qo.h.
|
private |
Current slice values.
Definition at line 79 of file TBSlicer.qo.h.