27 #ifndef TBVIEWARRAY_H_
28 #define TBVIEWARRAY_H_
30 #include <casaqt/QtBrowser/TBViewArray.ui.h>
31 #include <casaqt/QtBrowser/TBArrayPanel.ui.h>
49 class QCloseableWidget;
std::vector< int > currentSlice
Current slice for arrays with dimensionality greater than two.
bool addArray(TBViewArray *array, int colIndex)
Adds the given TBViewArray widget to this panel and returns whether it succeeded or not...
bool editable
Indicates whether this array is allowed to be edited.
std::vector< QTableWidgetItem * > selectedCells
casacore::List of cells that are on the same row or column as the currently selected cell...
TBArrayData * array
casacore::Array being displayed.
void applyFormat(TBFormat *f)
Applies the given format to the array cells.
QSplitter splitter
Splitter to hold the opened arrays.
void copyData()
Slot for copying the currently selected text into the system clipboard.
TableExprNode array(const TableExprNode &values, const TableExprNodeSet &shape)
Create an array of the given shape and fill it with the values.
TBTableTabs * tt
casacore::Table parent.
void relabelHeaders()
Relabels the table headers to be 0- rather than 1-based.
casacore::Data types used for loaded data.
TBTableTabs * tTabs
casacore::Table backend.
std::vector< int > indices
casacore::Array indices.
std::vector< TBViewArray * > arrays
casacore::List of opened arrays.
Widget for viewing record data.
void cellDoubleClicked(int row, int col)
Slot for when an array cell is double-clicked.
void removeActionsAssociatedWithArrays()
Removes any actions in the browser that are associated with any of the arrays in this panel...
void setShouldRelease(bool b)
Sets whether the arrays being viewed should release their data when closed or not.
casacore::Data type that holds an array.
void dataChanged(int row, int col)
Slot for when the user changes data in the array.
bool shouldRelease
Indicates whether the underlying array data should be released when the view is closed or not...
bool update
Flag to indicate whether GUI-generated events are "genuine.".
QBrush selectedBackground
Background for selected cells.
void cellClicked(int row, int col)
Slot for when an array cell is clicked.
void contextMenuEvent(QContextMenuEvent *event)
Catches the right-click event to allow for copying.
TBData * dataAt(std::vector< int > d)
Returns the data at the given coordinates, or NULL if the coordinates are invalid.
Primary interface for the rest of the browser to a table.
void fill(QTableWidget &table, casacore::Record &r, casacore::String first, casacore::String second)
Fills the given table with the given parameters.
A hierarchical collection of named fields of various types.
TBArrayData * getArrayData()
Returns the array that is being displayed.
casacore::Record & record
Displayed record.
TBArrayPanel(TBTableTabs *tt)
Constructor that takes the table backend.
std::vector< QCloseableWidget * > widgets
casacore::List of wrapper widgets.
void setup(casacore::String first, casacore::String second)
Sets up the GUI components with the given parameters for the label.
TBViewRecord(TBTableTabs *tt, TBDataRecord *r, casacore::String first, casacore::String second="")
Constructor which takes the table parent, the record to display, and the "indices" to display in the ...
const Double second
Time interval [T]:
Implementation of TBData for casacore::Record data.
void sliceChanged(std::vector< int > newSlice)
Slot for when the slicer changes (for arrays with dimensionality greater than two).
Widget to display and change the current array slice.
QBrush unselectedBackground
Background for unselected cells.
int col
Column of data array.
Collection of table backend and display tabs.
TBTableTabs * ttabs
casacore::Table backend.
void removeActionsAssociatedWithArray(TBViewArray *array)
Removes any actions in the browser that are associate with the given array in this panel...
void closeRequested(QWidget *widget)
Slot for when the user closes an individual array.
String: the storage and methods of handling collections of characters.
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.
Widget for viewing array data in TBArray format.
void setShouldRelease(bool b)
Calls setShouldRelease on all TBViewArrays in this panel.
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...
void clearFormat(QFontColor *f)
Clears the current format from the array cells and applies the given QFontColor (which should be the ...
void allArraysClosed()
This signal is emitted when the user presses "close" on all the currently opened arrays in this panel...
TBFormat * format
Current format.
void applyFormat(TBFormat *format, int colIndex)
Applies the given format to any TBViewArray with the given index.
TBSlicer * slicer
casacore::Slicer for arrays with dimensionality greater than two.
std::vector< int > currentCell(int row, int col)
Returns the array-relevant coordinates corresponding to the given indices.
Panel that can hold multiple TBViewArray widgets.
QFont color is a convenience class containing a QFont and a QColor.
int row
Row of data array.