casa
5.7.0-16
|
Collection of table backend and display tabs. More...
#include <TBTableTabs.qo.h>
Public Slots | |
void | dataChanged (int row, int col, casacore::String newVal) |
Updates the underlying table with the new data and then updates the GUI displays if successful. More... | |
void | setEditable (bool e) |
Sets whether this table is currently in editing mode or not. More... | |
void | showWidgetInTableSplitter (QWidget *widget, bool isArray=false) |
Shows the given widget in the side panel on the table data tab. More... | |
void | showWidgetInKeywordSplitter (QWidget *widget) |
Shows the given widget in the side panel on the table keywords tab. More... | |
void | showWidgetInFieldKeywordSplitter (QWidget *widget) |
Shows the given widget in the side panel on the field keywords tab. More... | |
void | showWidgetInCurrentSplitter (QWidget *widget) |
Shows the given widget in the side panel of the tab that is currently selected. More... | |
void | clearWidgetInTableSplitter () |
Clears the side panel on the table data tab. More... | |
void | clearWidgetInKeywordSplitter () |
Clears the side panel on the table keywords tab. More... | |
void | clearWidgetInFieldKeywordSplitter () |
Clears the side panel on the field keywords tab. More... | |
void | clearWidgetInCurrentSplitter () |
Clears the side panel on the currently selected tab. More... | |
Public Member Functions | |
TBTableTabs (TBBrowser *b, casacore::String filename, DriverParams *dp, bool taql) | |
Constructor that takes the browser parent, the location of the table, the driver parameters for opening the table, and whether the table is from a TaQL command or not. More... | |
~TBTableTabs () | |
bool | isAvailable () |
Returns true if the table is available, false otherwise. More... | |
bool | isEditable () |
Returns true if the table is currently in editing mode, false otherwise. More... | |
casacore::String | getName () |
Returns the "name" of this table (which is the last part of the filename). More... | |
casacore::String | getFileName () |
Returns the location of this table. More... | |
TBBrowser * | getBrowser () |
Returns the browser associated with this table. More... | |
TBDataTab * | getDataTab () |
Returns the data tab associated with this table. More... | |
TBTableKeywordsTab * | getKeywordsTab () |
Returns the table keywords tab associated with this table. More... | |
TBFieldKeywordsTab * | getFieldKeywordsTab () |
Returns the field keywords tab assicated with this table. More... | |
QTableWidget * | getTableWidget () |
Returns the QTableWidget used to display table data. More... | |
QTableWidget * | getTableKeywords () |
Returns the QTableWidget used to display table keywords. More... | |
QTreeWidget * | getFieldKeywords () |
Returns the QTreeWidget used to display the field keywords. More... | |
TBTable * | getTable () |
Returns the underlying table backend. More... | |
std::vector< std::pair < casacore::String, bool > > * | getSortFields () |
Returns the current sort on the table data tab, or an empty list if there is none. More... | |
bool | loadRows (int start=0, int num=TBConstants::DEFAULT_SELECT_NUM) |
Loads rows into the table backend and, if successful, updates the three GUI displays to reflect the new table data. More... | |
void | insertRows (int n) |
If the table allows for insertion of rows, the given number of rows is inserted at the end of the table and, if successful, the GUI display is updated accordingly. More... | |
void | deleteRows (std::vector< int > r) |
Deletes the given rows from the table, if the table allows for deletion of rows. More... | |
void | clearSort () |
Clears the current sort on the table data tab. More... | |
void | sort (std::vector< std::pair< casacore::String, bool > > &s) |
Sorts the table data tab with the given sort order. More... | |
void | highlight (int row) |
Selects and highlights the given row in the data tab. More... | |
Private Attributes | |
bool | available |
Indicates whether this table is currently available. More... | |
bool | editable |
Indicates whether this table is currently in editing mode or not. More... | |
casacore::String | filename |
This table's location. More... | |
casacore::String | name |
This table's name. More... | |
TBTable | table |
casacore::Table backend. More... | |
TBDataTab | dataTab |
casacore::Table data tab. More... | |
TBTableKeywordsTab | keywordsTab |
casacore::Table keywords tab. More... | |
TBFieldKeywordsTab | fieldKeywordsTab |
Field keywords tab. More... | |
TBBrowser * | browser |
Reference to parent. More... | |
Collection of table backend and display tabs.
TBTableTabs keeps track of the underlying TBTable object as well as the three tabs associated with its view (data, table keywords, and field keywords). It is the unifying interface over the GUI and non-GUI aspects of a table. Methods called on a TBTableTabs object tend to update the backend via the TBTable and then update the GUIs with the new data.
Definition at line 60 of file TBTableTabs.qo.h.
casa::TBTableTabs::TBTableTabs | ( | TBBrowser * | b, |
casacore::String | filename, | ||
DriverParams * | dp, | ||
bool | taql | ||
) |
Constructor that takes the browser parent, the location of the table, the driver parameters for opening the table, and whether the table is from a TaQL command or not.
casa::TBTableTabs::~TBTableTabs | ( | ) |
void casa::TBTableTabs::clearSort | ( | ) |
Clears the current sort on the table data tab.
|
slot |
Clears the side panel on the currently selected tab.
|
slot |
Clears the side panel on the field keywords tab.
|
slot |
Clears the side panel on the table keywords tab.
|
slot |
Clears the side panel on the table data tab.
|
slot |
Updates the underlying table with the new data and then updates the GUI displays if successful.
The new value is first checked for validity. If the update fails, an error message is displayed.
void casa::TBTableTabs::deleteRows | ( | std::vector< int > | r | ) |
Deletes the given rows from the table, if the table allows for deletion of rows.
Each element in the vector should be a row number. If successful, the GUI display is updated; otherwise an error message is displayed.
TBBrowser* casa::TBTableTabs::getBrowser | ( | ) |
Returns the browser associated with this table.
TBDataTab* casa::TBTableTabs::getDataTab | ( | ) |
Returns the data tab associated with this table.
QTreeWidget* casa::TBTableTabs::getFieldKeywords | ( | ) |
Returns the QTreeWidget used to display the field keywords.
TBFieldKeywordsTab* casa::TBTableTabs::getFieldKeywordsTab | ( | ) |
Returns the field keywords tab assicated with this table.
casacore::String casa::TBTableTabs::getFileName | ( | ) |
Returns the location of this table.
TBTableKeywordsTab* casa::TBTableTabs::getKeywordsTab | ( | ) |
Returns the table keywords tab associated with this table.
casacore::String casa::TBTableTabs::getName | ( | ) |
Returns the "name" of this table (which is the last part of the filename).
std::vector<std::pair<casacore::String, bool> >* casa::TBTableTabs::getSortFields | ( | ) |
Returns the current sort on the table data tab, or an empty list if there is none.
TBTable* casa::TBTableTabs::getTable | ( | ) |
Returns the underlying table backend.
QTableWidget* casa::TBTableTabs::getTableKeywords | ( | ) |
Returns the QTableWidget used to display table keywords.
QTableWidget* casa::TBTableTabs::getTableWidget | ( | ) |
Returns the QTableWidget used to display table data.
void casa::TBTableTabs::highlight | ( | int | row | ) |
Selects and highlights the given row in the data tab.
If the given row is not loaded in the table, the user is prompted on whether they want to load the appropriate page or not.
void casa::TBTableTabs::insertRows | ( | int | n | ) |
If the table allows for insertion of rows, the given number of rows is inserted at the end of the table and, if successful, the GUI display is updated accordingly.
If the insertion was not successful an error message is displayed.
bool casa::TBTableTabs::isAvailable | ( | ) |
Returns true if the table is available, false otherwise.
bool casa::TBTableTabs::isEditable | ( | ) |
Returns true if the table is currently in editing mode, false otherwise.
bool casa::TBTableTabs::loadRows | ( | int | start = 0 , |
int | num = TBConstants::DEFAULT_SELECT_NUM |
||
) |
Loads rows into the table backend and, if successful, updates the three GUI displays to reflect the new table data.
Returns whether the loading was successful or not. If the loading was not successful an error message is displayed.
|
slot |
Sets whether this table is currently in editing mode or not.
|
slot |
Shows the given widget in the side panel of the tab that is currently selected.
|
slot |
Shows the given widget in the side panel on the field keywords tab.
|
slot |
Shows the given widget in the side panel on the table keywords tab.
|
slot |
Shows the given widget in the side panel on the table data tab.
void casa::TBTableTabs::sort | ( | std::vector< std::pair< casacore::String, bool > > & | s | ) |
Sorts the table data tab with the given sort order.
See TBDataTab::sortBy().
|
private |
Indicates whether this table is currently available.
Definition at line 180 of file TBTableTabs.qo.h.
|
private |
Reference to parent.
Definition at line 204 of file TBTableTabs.qo.h.
|
private |
casacore::Table data tab.
Definition at line 195 of file TBTableTabs.qo.h.
|
private |
Indicates whether this table is currently in editing mode or not.
Definition at line 183 of file TBTableTabs.qo.h.
|
private |
Field keywords tab.
Definition at line 201 of file TBTableTabs.qo.h.
|
private |
This table's location.
Definition at line 186 of file TBTableTabs.qo.h.
|
private |
casacore::Table keywords tab.
Definition at line 198 of file TBTableTabs.qo.h.
|
private |
This table's name.
Definition at line 189 of file TBTableTabs.qo.h.
|
private |
casacore::Table backend.
Definition at line 192 of file TBTableTabs.qo.h.