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

Collection of table backend and display tabs. More...

#include <TBTableTabs.qo.h>

Inheritance diagram for casa::TBTableTabs:

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...
 
TBBrowsergetBrowser ()
 Returns the browser associated with this table. More...
 
TBDataTabgetDataTab ()
 Returns the data tab associated with this table. More...
 
TBTableKeywordsTabgetKeywordsTab ()
 Returns the table keywords tab associated with this table. More...
 
TBFieldKeywordsTabgetFieldKeywordsTab ()
 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...
 
TBTablegetTable ()
 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...
 
TBBrowserbrowser
 Reference to parent. More...
 

Detailed Description

Collection of table backend and display tabs.

Synopsis

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.

Constructor & Destructor Documentation

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 ( )

Member Function Documentation

void casa::TBTableTabs::clearSort ( )

Clears the current sort on the table data tab.

void casa::TBTableTabs::clearWidgetInCurrentSplitter ( )
slot

Clears the side panel on the currently selected tab.

void casa::TBTableTabs::clearWidgetInFieldKeywordSplitter ( )
slot

Clears the side panel on the field keywords tab.

void casa::TBTableTabs::clearWidgetInKeywordSplitter ( )
slot

Clears the side panel on the table keywords tab.

void casa::TBTableTabs::clearWidgetInTableSplitter ( )
slot

Clears the side panel on the table data tab.

void casa::TBTableTabs::dataChanged ( int  row,
int  col,
casacore::String  newVal 
)
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.

void casa::TBTableTabs::setEditable ( bool  e)
slot

Sets whether this table is currently in editing mode or not.

void casa::TBTableTabs::showWidgetInCurrentSplitter ( QWidget *  widget)
slot

Shows the given widget in the side panel of the tab that is currently selected.

void casa::TBTableTabs::showWidgetInFieldKeywordSplitter ( QWidget *  widget)
slot

Shows the given widget in the side panel on the field keywords tab.

void casa::TBTableTabs::showWidgetInKeywordSplitter ( QWidget *  widget)
slot

Shows the given widget in the side panel on the table keywords tab.

void casa::TBTableTabs::showWidgetInTableSplitter ( QWidget *  widget,
bool  isArray = false 
)
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().

Member Data Documentation

bool casa::TBTableTabs::available
private

Indicates whether this table is currently available.

Definition at line 180 of file TBTableTabs.qo.h.

TBBrowser* casa::TBTableTabs::browser
private

Reference to parent.

Definition at line 204 of file TBTableTabs.qo.h.

TBDataTab casa::TBTableTabs::dataTab
private

casacore::Table data tab.

Definition at line 195 of file TBTableTabs.qo.h.

bool casa::TBTableTabs::editable
private

Indicates whether this table is currently in editing mode or not.

Definition at line 183 of file TBTableTabs.qo.h.

TBFieldKeywordsTab casa::TBTableTabs::fieldKeywordsTab
private

Field keywords tab.

Definition at line 201 of file TBTableTabs.qo.h.

casacore::String casa::TBTableTabs::filename
private

This table's location.

Definition at line 186 of file TBTableTabs.qo.h.

TBTableKeywordsTab casa::TBTableTabs::keywordsTab
private

casacore::Table keywords tab.

Definition at line 198 of file TBTableTabs.qo.h.

casacore::String casa::TBTableTabs::name
private

This table's name.

Definition at line 189 of file TBTableTabs.qo.h.

TBTable casa::TBTableTabs::table
private

casacore::Table backend.

Definition at line 192 of file TBTableTabs.qo.h.


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