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

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

#include <TBTableTabs.qo.h>

List of all members.

Public Slots

void dataChanged (int row, int col, String newVal)
 Updates the underlying table with the new data and then updates the GUI displays if successful.
void setEditable (bool e)
 Sets whether this table is currently in editing mode or not.
void showWidgetInTableSplitter (QWidget *widget, bool isArray=false)
 Shows the given widget in the side panel on the table data tab.
void showWidgetInKeywordSplitter (QWidget *widget)
 Shows the given widget in the side panel on the table keywords tab.
void showWidgetInFieldKeywordSplitter (QWidget *widget)
 Shows the given widget in the side panel on the field keywords tab.
void showWidgetInCurrentSplitter (QWidget *widget)
 Shows the given widget in the side panel of the tab that is currently selected.
void clearWidgetInTableSplitter ()
 Clears the side panel on the table data tab.
void clearWidgetInKeywordSplitter ()
 Clears the side panel on the table keywords tab.
void clearWidgetInFieldKeywordSplitter ()
 Clears the side panel on the field keywords tab.
void clearWidgetInCurrentSplitter ()
 Clears the side panel on the currently selected tab.

Public Member Functions

 TBTableTabs (TBBrowser *b, 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.
 ~TBTableTabs ()
bool isAvailable ()
 Returns true if the table is available, false otherwise.
bool isEditable ()
 Returns true if the table is currently in editing mode, false otherwise.
String getName ()
 Returns the "name" of this table (which is the last part of the filename).
String getFileName ()
 Returns the location of this table.
TBBrowsergetBrowser ()
 Returns the browser associated with this table.
TBDataTabgetDataTab ()
 Returns the data tab associated with this table.
TBTableKeywordsTabgetKeywordsTab ()
 Returns the table keywords tab associated with this table.
TBFieldKeywordsTabgetFieldKeywordsTab ()
 Returns the field keywords tab assicated with this table.
QTableWidget * getTableWidget ()
 Returns the QTableWidget used to display table data.
QTableWidget * getTableKeywords ()
 Returns the QTableWidget used to display table keywords.
QTreeWidget * getFieldKeywords ()
 Returns the QTreeWidget used to display the field keywords.
TBTablegetTable ()
 Returns the underlying table backend.
vector< pair< String, bool > > * getSortFields ()
 Returns the current sort on the table data tab, or an empty list if there is none.
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.
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.
void deleteRows (vector< int > r)
 Deletes the given rows from the table, if the table allows for deletion of rows.
void clearSort ()
 Clears the current sort on the table data tab.
void sort (vector< pair< String, bool > > &s)
 Sorts the table data tab with the given sort order.
void highlight (int row)
 Selects and highlights the given row in the data tab.

Private Attributes

bool available
 Indicates whether this table is currently available.
bool editable
 Indicates whether this table is currently in editing mode or not.
String filename
 This table's location.
String name
 This table's name.
TBTable table
 Table backend.
TBDataTab dataTab
 Table data tab.
TBTableKeywordsTab keywordsTab
 Table keywords tab.
TBFieldKeywordsTab fieldKeywordsTab
 Field keywords tab.
TBBrowserbrowser
 Reference to parent.

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 62 of file TBTableTabs.qo.h.


Constructor & Destructor Documentation

casa::TBTableTabs::TBTableTabs ( TBBrowser b,
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.


Member Function Documentation

Clears the current sort on the table data tab.

Clears the side panel on the currently selected tab.

Clears the side panel on the field keywords tab.

Clears the side panel on the table keywords tab.

Clears the side panel on the table data tab.

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

Returns the browser associated with this table.

Returns the data tab associated with this table.

Returns the QTreeWidget used to display the field keywords.

Returns the field keywords tab assicated with this table.

Returns the location of this table.

Returns the table keywords tab associated with this table.

Returns the "name" of this table (which is the last part of the filename).

vector<pair<String, bool> >* casa::TBTableTabs::getSortFields ( )

Returns the current sort on the table data tab, or an empty list if there is none.

Returns the underlying table backend.

Returns the QTableWidget used to display table keywords.

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.

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.

Returns true if the table is available, false otherwise.

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 ( vector< pair< String, bool > > &  s)

Sorts the table data tab with the given sort order.

See TBDataTab::sortBy().


Member Data Documentation

Indicates whether this table is currently available.

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

Reference to parent.

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

Table data tab.

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

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

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

Field keywords tab.

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

This table's location.

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

Table keywords tab.

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

This table's name.

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

Table backend.

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


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