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

Main window which is mainly responsible for menu actions. More...

#include <TBMain.qo.h>

Inheritance diagram for casa::TBMain:

Signals

void closeTableTriggered (casacore::String name)
 This signal is emitted when a close menu command is given with a table name. More...
 

Public Member Functions

 TBMain ()
 Default Constructor. More...
 
 ~TBMain ()
 
void openTable (casacore::String filename, DriverParams *dp=NULL, int start=0, int num=TBConstants::DEFAULT_SELECT_NUM)
 Opens a table with the given file name and driver parameters. More...
 

Protected Member Functions

void closeEvent (QCloseEvent *event)
 Catches a close event for the window. More...
 

Private Slots

void openTable ()
 Opens a filechooser dialog to allow the user to open a table. More...
 
void openTaQL ()
 Opens a TBTaQL dialog to allow the user to open a table using a TaQL command. More...
 
void tableOpened (casacore::String name, casacore::String fullpath)
 Connects with TBBrowser::tableOpened() signal. More...
 
void closeTable ()
 void openTableWithOptions(); More...
 
void closeTable (QAction *which)
 Closes the table corresponding to the given action's name. More...
 
void closeAll ()
 Closes all opened tables. More...
 
void closeAllAndExit ()
 Closes all currently opened tables and closes the window. More...
 
void showVersion ()
 
void tableClosed (casacore::String name)
 Connects with TBBrowser::tableClosed() signal. More...
 
void tabChanged (int tableIndex)
 Slot for when the tab is changed in the browser. More...
 
void viewColumn (QAction *which)
 Shows or hides the column on the current table that corresponds to the name of the given action. More...
 
void columnHidden (int index, bool hidden)
 Updates the column menu to indicate that the given column has been shown/hidden. More...
 
void actionPerformed (TBAction *action)
 Updates display to indicate the last action performed. More...
 
void actionUndone ()
 Updates display to indicate that the last action was undone. More...
 
void actionRedone ()
 Update display to indicate that the last undone action was redone. More...
 
void undoAction ()
 Undoes the last performed action. More...
 
void redoAction ()
 Redoes the last undone action. More...
 
void editCurrentTable ()
 Enters the currently selected table into editing mode. More...
 
void editTable (QAction *action)
 Enters the table corresponding to the given edit action into editing mode. More...
 
void exportVOTable ()
 Exports the current table to VOTable format. More...
 
void threadFinished ()
 Reenables menus after a task thread has completed. More...
 
void checkValidity ()
 Opens a new TBValidityChecker widget. More...
 
void plot2D ()
 Opens a new TBPlotter window. More...
 
void showAllColumns ()
 Shows all the columns in the currently selected table. More...
 
void hideAllColumns ()
 Hides all the columns in the currently selected table. More...
 
void filterOnFields ()
 Opens widget to enter filter rules for the current table. More...
 
void clearFilterOnFields ()
 Clears the current filter on the current table. More...
 
void filterRuleAvailable (int i)
 Enables the "clear filter" action. More...
 
void filterRuleCleared (int i)
 Disables the "clear filter" action. More...
 
void find ()
 Opens widget to enter search rules for the current table. More...
 
void findNext ()
 Searches for the next row matching the search rule for the current table. More...
 
void findPrev ()
 Searches for the previous row matching the search rule for the current table. More...
 
void findRuleAvailable ()
 Slot for when the current table has a find rule associated with it. More...
 
void sortEntered ()
 Slot for when a sort has been entered for the current table. More...
 
void sortCleared ()
 Slot for when a sort has been cleared for the current table. More...
 
void viewTableInfo ()
 Displays table information for the currently selected table. More...
 
void formatDisplay (QAction *which)
 Formats the field with the name in the given QAction. More...
 
void openHelp ()
 Opens the help window. More...
 
void insertRows ()
 Shows an insert rows dialog. More...
 
void deleteRows ()
 Shows a delete rows dialog. More...
 
void sort ()
 Shows a sort dialog. More...
 
void clearSort ()
 Clears the current sort. More...
 
void sort (std::vector< std::pair< casacore::String, bool > > &sort)
 casacore::Sort the current table with the given order. More...
 
void options ()
 Allows the user to edit table options. More...
 
void saveOptions (TBOptions *opt)
 Applies the user-provided options and deletes the TBOptions widget. More...
 

Private Member Functions

void setup ()
 Sets up GUI components and signal/slot connections. More...
 
void setupKeyboardShortcuts ()
 Sets up the keyboard shortcuts. More...
 
void enableMenus (bool en)
 Calls setEnabled() on all menus with the given parameter. More...
 
void editTable (TBTableTabs *table, bool edit)
 Turns on/off editing, if write lock is available, on the given table. More...
 

Private Attributes

TBBrowser browser
 Browser object. More...
 
QStatusBar * statusBar
 The window's status bar. More...
 
QMenu * closeMenu
 Close menu that lists all currently opened tables. More...
 
QMenu * columnsMenu
 Columns menu that lists the table fields in the currently selected table. More...
 
QMenu * editTablesMenu
 Edit menu that lists all currently opened tables. More...
 
bool waiting
 Indicates whether the main window is waiting for some other task to complete or not. More...
 
QAction * separator
 Separator added in the Edit menu before the Options command. More...
 
QMenu * formatMenu
 casacore::Format menu that lists the table fields in the currently selected table. More...
 
QToolBar * fileBar
 Toolbar holding "file"-related menu commands. More...
 
QToolBar * editBar
 Toolbar holding "edit"-related menu commands. More...
 
QToolBar * viewBar
 Toolbar holding "view"-related menu commands. More...
 
QToolBar * toolBar
 Toolbar holding "tool"-related menu commands. More...
 
bool saveView
 Indicates whether the TBMain should save the current view on close or not. More...
 

Detailed Description

Main window which is mainly responsible for menu actions.

Synopsis

TBMain is a QMainWindow subclass that wraps about a TBBrowser object. Its main responsibility is to provide menu commands and interact with the TBBrowser.

Definition at line 55 of file TBMain.qo.h.

Constructor & Destructor Documentation

casa::TBMain::TBMain ( )

Default Constructor.

casa::TBMain::~TBMain ( )

Member Function Documentation

void casa::TBMain::actionPerformed ( TBAction action)
privateslot

Updates display to indicate the last action performed.

void casa::TBMain::actionRedone ( )
privateslot

Update display to indicate that the last undone action was redone.

void casa::TBMain::actionUndone ( )
privateslot

Updates display to indicate that the last action was undone.

void casa::TBMain::checkValidity ( )
privateslot

Opens a new TBValidityChecker widget.

void casa::TBMain::clearFilterOnFields ( )
privateslot

Clears the current filter on the current table.

See TBBrowser::clearFilterOnFields().

void casa::TBMain::clearSort ( )
privateslot

Clears the current sort.

void casa::TBMain::closeAll ( )
privateslot

Closes all opened tables.

void casa::TBMain::closeAllAndExit ( )
privateslot

Closes all currently opened tables and closes the window.

void casa::TBMain::closeEvent ( QCloseEvent *  event)
protected

Catches a close event for the window.

If a background task is running, a confirmation dialog is presented to the user. If the "save view on close" option is turned on, the current view is saved to the default location.

void casa::TBMain::closeTable ( )
privateslot

void openTableWithOptions();

Closes the currently selected table.

void casa::TBMain::closeTable ( QAction *  which)
privateslot

Closes the table corresponding to the given action's name.

void casa::TBMain::closeTableTriggered ( casacore::String  name)
signal

This signal is emitted when a close menu command is given with a table name.

void casa::TBMain::columnHidden ( int  index,
bool  hidden 
)
privateslot

Updates the column menu to indicate that the given column has been shown/hidden.

void casa::TBMain::deleteRows ( )
privateslot

Shows a delete rows dialog.

void casa::TBMain::editCurrentTable ( )
privateslot

Enters the currently selected table into editing mode.

void casa::TBMain::editTable ( TBTableTabs table,
bool  edit 
)
private

Turns on/off editing, if write lock is available, on the given table.

void casa::TBMain::editTable ( QAction *  action)
privateslot

Enters the table corresponding to the given edit action into editing mode.

void casa::TBMain::enableMenus ( bool  en)
private

Calls setEnabled() on all menus with the given parameter.

void casa::TBMain::exportVOTable ( )
privateslot

Exports the current table to VOTable format.

See TBBrowser::exportVOTable().

void casa::TBMain::filterOnFields ( )
privateslot

Opens widget to enter filter rules for the current table.

See TBBrowser::filterOnFields().

void casa::TBMain::filterRuleAvailable ( int  i)
privateslot

Enables the "clear filter" action.

void casa::TBMain::filterRuleCleared ( int  i)
privateslot

Disables the "clear filter" action.

void casa::TBMain::find ( )
privateslot

Opens widget to enter search rules for the current table.

See TBBrowser::find().

void casa::TBMain::findNext ( )
privateslot

Searches for the next row matching the search rule for the current table.

See TBBrowser::findNext().

void casa::TBMain::findPrev ( )
privateslot

Searches for the previous row matching the search rule for the current table.

See TBBrowser::findPrev().

void casa::TBMain::findRuleAvailable ( )
privateslot

Slot for when the current table has a find rule associated with it.

void casa::TBMain::formatDisplay ( QAction *  which)
privateslot

Formats the field with the name in the given QAction.

void casa::TBMain::hideAllColumns ( )
privateslot

Hides all the columns in the currently selected table.

void casa::TBMain::insertRows ( )
privateslot

Shows an insert rows dialog.

void casa::TBMain::openHelp ( )
privateslot

Opens the help window.

See TBHelp.

void casa::TBMain::openTable ( casacore::String  filename,
DriverParams dp = NULL,
int  start = 0,
int  num = TBConstants::DEFAULT_SELECT_NUM 
)

Opens a table with the given file name and driver parameters.

If the driver parameters are NULL, the defaults are used. If a start and num are provided, those rows are loaded into the new table; otherwise the default number of rows are loaded.

void casa::TBMain::openTable ( )
privateslot

Opens a filechooser dialog to allow the user to open a table.

void casa::TBMain::openTaQL ( )
privateslot

Opens a TBTaQL dialog to allow the user to open a table using a TaQL command.

void casa::TBMain::options ( )
privateslot

Allows the user to edit table options.

See TBOptions.

void casa::TBMain::plot2D ( )
privateslot

Opens a new TBPlotter window.

void casa::TBMain::redoAction ( )
privateslot

Redoes the last undone action.

See TBBrowser::redoAction().

void casa::TBMain::saveOptions ( TBOptions opt)
privateslot

Applies the user-provided options and deletes the TBOptions widget.

void casa::TBMain::setup ( )
private

Sets up GUI components and signal/slot connections.

void casa::TBMain::setupKeyboardShortcuts ( )
private

Sets up the keyboard shortcuts.

void casa::TBMain::showAllColumns ( )
privateslot

Shows all the columns in the currently selected table.

void casa::TBMain::showVersion ( )
privateslot
void casa::TBMain::sort ( )
privateslot

Shows a sort dialog.

See TBSorter.

void casa::TBMain::sort ( std::vector< std::pair< casacore::String, bool > > &  sort)
privateslot

casacore::Sort the current table with the given order.

See TBBrowser::sort().

void casa::TBMain::sortCleared ( )
privateslot

Slot for when a sort has been cleared for the current table.

void casa::TBMain::sortEntered ( )
privateslot

Slot for when a sort has been entered for the current table.

void casa::TBMain::tabChanged ( int  tableIndex)
privateslot

Slot for when the tab is changed in the browser.

Updates all necessary menus.

void casa::TBMain::tableClosed ( casacore::String  name)
privateslot

Connects with TBBrowser::tableClosed() signal.

Updates dynamic menus as necessary.

void casa::TBMain::tableOpened ( casacore::String  name,
casacore::String  fullpath 
)
privateslot

Connects with TBBrowser::tableOpened() signal.

Updates dynamic menus as necessary.

void casa::TBMain::threadFinished ( )
privateslot

Reenables menus after a task thread has completed.

void casa::TBMain::undoAction ( )
privateslot

Undoes the last performed action.

See TBBrowser::undoAction().

void casa::TBMain::viewColumn ( QAction *  which)
privateslot

Shows or hides the column on the current table that corresponds to the name of the given action.

void casa::TBMain::viewTableInfo ( )
privateslot

Displays table information for the currently selected table.

Member Data Documentation

TBBrowser casa::TBMain::browser
private

Browser object.

Definition at line 86 of file TBMain.qo.h.

QMenu* casa::TBMain::closeMenu
private

Close menu that lists all currently opened tables.

Definition at line 92 of file TBMain.qo.h.

QMenu* casa::TBMain::columnsMenu
private

Columns menu that lists the table fields in the currently selected table.

Definition at line 96 of file TBMain.qo.h.

QToolBar* casa::TBMain::editBar
private

Toolbar holding "edit"-related menu commands.

Definition at line 117 of file TBMain.qo.h.

QMenu* casa::TBMain::editTablesMenu
private

Edit menu that lists all currently opened tables.

Definition at line 99 of file TBMain.qo.h.

QToolBar* casa::TBMain::fileBar
private

Toolbar holding "file"-related menu commands.

Definition at line 114 of file TBMain.qo.h.

QMenu* casa::TBMain::formatMenu
private

casacore::Format menu that lists the table fields in the currently selected table.

Definition at line 111 of file TBMain.qo.h.

bool casa::TBMain::saveView
private

Indicates whether the TBMain should save the current view on close or not.

Definition at line 127 of file TBMain.qo.h.

QAction* casa::TBMain::separator
private

Separator added in the Edit menu before the Options command.

Definition at line 107 of file TBMain.qo.h.

QStatusBar* casa::TBMain::statusBar
private

The window's status bar.

Definition at line 89 of file TBMain.qo.h.

QToolBar* casa::TBMain::toolBar
private

Toolbar holding "tool"-related menu commands.

Definition at line 123 of file TBMain.qo.h.

QToolBar* casa::TBMain::viewBar
private

Toolbar holding "view"-related menu commands.

Definition at line 120 of file TBMain.qo.h.

bool casa::TBMain::waiting
private

Indicates whether the main window is waiting for some other task to complete or not.

If the window is waiting, menu commands will not respond.

Definition at line 104 of file TBMain.qo.h.


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