Widget for viewing array data in TBArray format.
More...
#include <TBViewArray.qo.h>
|
| TBViewArray (TBTableTabs *tt, casacore::String first, casacore::String second, TBArrayData *arr, int row, int col, bool editable) |
| Constructor which takes the table parent, the "indices" where this array is located, the array to view, the location in the table (if applicable, and whether this array should be editable or not. More...
|
|
| ~TBViewArray () |
|
TBArrayData * | getArrayData () |
| Returns the array that is being displayed. More...
|
|
void | setShouldRelease (bool b) |
| Sets whether the arrays being viewed should release their data when closed or not. More...
|
|
TBData * | dataAt (std::vector< int > d) |
| Returns the data at the given coordinates, or NULL if the coordinates are invalid. More...
|
|
void | setDataAt (std::vector< int > d, TBData &newVal, bool format=true) |
| Sets the data at the given coordinates to the given value WITHOUT updating the table backend. More...
|
|
void | applyFormat (TBFormat *f) |
| Applies the given format to the array cells. More...
|
|
void | clearFormat (QFontColor *f) |
| Clears the current format from the array cells and applies the given QFontColor (which should be the default table cell font and color). More...
|
|
Widget for viewing array data in TBArray format.
Synopsis
A TBViewArray displays potentially multi-dimensional array data in a QTableWidget. If the array has dimensionality greater than two, a TBSlicer is used to control the array slice.
Definition at line 64 of file TBViewArray.qo.h.
Constructor which takes the table parent, the "indices" where this array is located, the array to view, the location in the table (if applicable, and whether this array should be editable or not.
The top of the array view will have a label that says "[table name][first, second] =
[type] array of size [size]." For keyword arrays, row and col are irrelevant and editable should be false.
casa::TBViewArray::~TBViewArray |
( |
| ) |
|
void casa::TBViewArray::applyFormat |
( |
TBFormat * |
f | ) |
|
Applies the given format to the array cells.
void casa::TBViewArray::cellClicked |
( |
int |
row, |
|
|
int |
col |
|
) |
| |
|
privateslot |
Slot for when an array cell is clicked.
Updates cells in the same row or column with a "selected" background.
void casa::TBViewArray::cellDoubleClicked |
( |
int |
row, |
|
|
int |
col |
|
) |
| |
|
privateslot |
Slot for when an array cell is double-clicked.
If the array is editable and the table is currently in editing mode, the user is then allowed to edit the cell data.
void casa::TBViewArray::clearFormat |
( |
QFontColor * |
f | ) |
|
Clears the current format from the array cells and applies the given QFontColor (which should be the default table cell font and color).
void casa::TBViewArray::contextMenuEvent |
( |
QContextMenuEvent * |
event | ) |
|
|
protected |
Catches the right-click event to allow for copying.
void casa::TBViewArray::copyData |
( |
| ) |
|
|
privateslot |
Slot for copying the currently selected text into the system clipboard.
std::vector<int> casa::TBViewArray::currentCell |
( |
int |
row, |
|
|
int |
col |
|
) |
| |
|
private |
Returns the array-relevant coordinates corresponding to the given indices.
TBData* casa::TBViewArray::dataAt |
( |
std::vector< int > |
d | ) |
|
Returns the data at the given coordinates, or NULL if the coordinates are invalid.
void casa::TBViewArray::dataChanged |
( |
int |
row, |
|
|
int |
col |
|
) |
| |
|
privateslot |
Slot for when the user changes data in the array.
If the edit is valid, a TBEditArrayDataAction is generated and sent to the browser for execution.
Returns the array that is being displayed.
void casa::TBViewArray::relabelHeaders |
( |
| ) |
|
|
private |
Relabels the table headers to be 0- rather than 1-based.
void casa::TBViewArray::setDataAt |
( |
std::vector< int > |
d, |
|
|
TBData & |
newVal, |
|
|
bool |
format = true |
|
) |
| |
Sets the data at the given coordinates to the given value WITHOUT updating the table backend.
If format is true, then any current format is applied to the new value.
void casa::TBViewArray::setShouldRelease |
( |
bool |
b | ) |
|
Sets whether the arrays being viewed should release their data when closed or not.
Sets up the GUI components with the given parameters for the label.
void casa::TBViewArray::sliceChanged |
( |
std::vector< int > |
newSlice | ) |
|
|
privateslot |
Slot for when the slicer changes (for arrays with dimensionality greater than two).
int casa::TBViewArray::col |
|
private |
std::vector<int> casa::TBViewArray::currentSlice |
|
private |
Current slice for arrays with dimensionality greater than two.
Definition at line 125 of file TBViewArray.qo.h.
bool casa::TBViewArray::editable |
|
private |
Indicates whether this array is allowed to be edited.
casacore::Data arrays should be true while keyword arrays should be false.
Definition at line 129 of file TBViewArray.qo.h.
int casa::TBViewArray::row |
|
private |
QBrush casa::TBViewArray::selectedBackground |
|
private |
std::vector<QTableWidgetItem*> casa::TBViewArray::selectedCells |
|
private |
bool casa::TBViewArray::shouldRelease |
|
private |
Indicates whether the underlying array data should be released when the view is closed or not.
Definition at line 146 of file TBViewArray.qo.h.
QBrush casa::TBViewArray::unselectedBackground |
|
private |
bool casa::TBViewArray::update |
|
private |
Flag to indicate whether GUI-generated events are "genuine.".
Definition at line 119 of file TBViewArray.qo.h.
The documentation for this class was generated from the following file: