casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Signals | Public Member Functions | Private Slots | Private Member Functions | Private Attributes
casa::TBSlicer Class Reference

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

#include <TBSlicer.qo.h>

List of all members.

Signals

void sliceChanged (vector< int > slice)
 This signal is emitted when the user changes the slice.

Public Member Functions

 TBSlicer (vector< int > d)
 Constructor that takes the shape of the array.
 ~TBSlicer ()

Private Slots

void valueChanged ()
 Slot for when one of the spinners changes values.
void rowAxisChanged (int newRow)
 Slot for when the row axis dimension is changed.
void colAxisChanged (int newCol)
 Slot for when the column axis dimension is changed.

Private Member Functions

void emitSliceChanged ()
 Collects the slice and emits the sliceChanged() signal.

Private Attributes

vector< QSpinBox * > spinners
 Current spinners.
vector< int > values
 Current slice values.
int oldR
 Holds the old row index.
int oldC
 Holds the old column index.
bool shouldEmit
 Flag to indicate whether GUI-generated events are "genuine.".

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 55 of file TBSlicer.qo.h.


Constructor & Destructor Documentation

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

Constructor that takes the shape of the array.


Member Function Documentation

void casa::TBSlicer::colAxisChanged ( int  newCol) [private, slot]

Slot for when the column axis dimension is changed.

Updates the slicer accordingly.

Collects the slice and emits the sliceChanged() signal.

void casa::TBSlicer::rowAxisChanged ( int  newRow) [private, slot]

Slot for when the row axis dimension is changed.

Updates the slicer accordingly.

void casa::TBSlicer::sliceChanged ( 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 ( ) [private, slot]

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 88 of file TBSlicer.qo.h.

int casa::TBSlicer::oldR [private]

Holds the old row index.

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

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

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

vector<QSpinBox*> casa::TBSlicer::spinners [private]

Current spinners.

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

vector<int> casa::TBSlicer::values [private]

Current slice values.

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


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