casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Signals | Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
casa::TBSlicer Class Reference

Widget to display and change the current array slice. More...

#include <TBSlicer.qo.h>

Inheritance diagram for casa::TBSlicer:

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...
 

Detailed Description

Widget to display and change the current array slice.

Synopsis

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.

Constructor & Destructor Documentation

casa::TBSlicer::TBSlicer ( std::vector< int >  d)

Constructor that takes the shape of the array.

casa::TBSlicer::~TBSlicer ( )

Member Function Documentation

void casa::TBSlicer::colAxisChanged ( int  newCol)
privateslot

Slot for when the column axis dimension is changed.

Updates the slicer accordingly.

void casa::TBSlicer::emitSliceChanged ( )
private

Collects the slice and emits the sliceChanged() signal.

void casa::TBSlicer::rowAxisChanged ( int  newRow)
privateslot

Slot for when the row axis dimension is changed.

Updates the slicer accordingly.

void casa::TBSlicer::sliceChanged ( std::vector< int >  slice)
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.

void casa::TBSlicer::valueChanged ( )
privateslot

Slot for when one of the spinners changes values.

Updates the current slice and calls emitSliceChanged() if the slice has changed.

Member Data Documentation

int casa::TBSlicer::oldC
private

Holds the old column index.

Definition at line 85 of file TBSlicer.qo.h.

int casa::TBSlicer::oldR
private

Holds the old row index.

Definition at line 82 of file TBSlicer.qo.h.

bool casa::TBSlicer::shouldEmit
private

Flag to indicate whether GUI-generated events are "genuine.".

Definition at line 88 of file TBSlicer.qo.h.

std::vector<QSpinBox*> casa::TBSlicer::spinners
private

Current spinners.

Definition at line 76 of file TBSlicer.qo.h.

std::vector<int> casa::TBSlicer::values
private

Current slice values.

Definition at line 79 of file TBSlicer.qo.h.


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