casa
$Rev:20696$
|
Main window which is mainly responsible for menu actions. More...
#include <TBMain.qo.h>
Signals | |
void | closeTableTriggered (String name) |
This signal is emitted when a close menu command is given with a table name. | |
Public Member Functions | |
TBMain () | |
Default Constructor. | |
~TBMain () | |
void | openTable (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. | |
Protected Member Functions | |
void | closeEvent (QCloseEvent *event) |
Catches a close event for the window. | |
Private Slots | |
void | openTable () |
Opens a filechooser dialog to allow the user to open a table. | |
void | openTaQL () |
Opens a TBTaQL dialog to allow the user to open a table using a TaQL command. | |
void | tableOpened (String name, String fullpath) |
Connects with TBBrowser::tableOpened() signal. | |
void | closeTable () |
void openTableWithOptions(); | |
void | closeTable (QAction *which) |
Closes the table corresponding to the given action's name. | |
void | closeAll () |
Closes all opened tables. | |
void | closeAllAndExit () |
Closes all currently opened tables and closes the window. | |
void | tableClosed (String name) |
Connects with TBBrowser::tableClosed() signal. | |
void | tabChanged (int tableIndex) |
Slot for when the tab is changed in the browser. | |
void | viewColumn (QAction *which) |
Shows or hides the column on the current table that corresponds to the name of the given action. | |
void | columnHidden (int index, bool hidden) |
Updates the column menu to indicate that the given column has been shown/hidden. | |
void | actionPerformed (TBAction *action) |
Updates display to indicate the last action performed. | |
void | actionUndone () |
Updates display to indicate that the last action was undone. | |
void | actionRedone () |
Update display to indicate that the last undone action was redone. | |
void | undoAction () |
Undoes the last performed action. | |
void | redoAction () |
Redoes the last undone action. | |
void | editCurrentTable () |
Enters the currently selected table into editing mode. | |
void | editTable (QAction *action) |
Enters the table corresponding to the given edit action into editing mode. | |
void | exportVOTable () |
Exports the current table to VOTable format. | |
void | threadFinished () |
Reenables menus after a task thread has completed. | |
void | checkValidity () |
Opens a new TBValidityChecker widget. | |
void | plot2D () |
Opens a new TBPlotter window. | |
void | showAllColumns () |
Shows all the columns in the currently selected table. | |
void | hideAllColumns () |
Hides all the columns in the currently selected table. | |
void | filterOnFields () |
Opens widget to enter filter rules for the current table. | |
void | clearFilterOnFields () |
Clears the current filter on the current table. | |
void | filterRuleAvailable (int i) |
Enables the "clear filter" action. | |
void | filterRuleCleared (int i) |
Disables the "clear filter" action. | |
void | find () |
Opens widget to enter search rules for the current table. | |
void | findNext () |
Searches for the next row matching the search rule for the current table. | |
void | findPrev () |
Searches for the previous row matching the search rule for the current table. | |
void | findRuleAvailable () |
Slot for when the current table has a find rule associated with it. | |
void | sortEntered () |
Slot for when a sort has been entered for the current table. | |
void | sortCleared () |
Slot for when a sort has been cleared for the current table. | |
void | viewTableInfo () |
Displays table information for the currently selected table. | |
void | formatDisplay (QAction *which) |
Formats the field with the name in the given QAction. | |
void | openHelp () |
Opens the help window. | |
void | insertRows () |
Shows an insert rows dialog. | |
void | deleteRows () |
Shows a delete rows dialog. | |
void | sort () |
Shows a sort dialog. | |
void | clearSort () |
Clears the current sort. | |
void | sort (vector< pair< String, bool > > &sort) |
Sort the current table with the given order. | |
void | options () |
Allows the user to edit table options. | |
void | saveOptions (TBOptions *opt) |
Applies the user-provided options and deletes the TBOptions widget. | |
Private Member Functions | |
void | setup () |
Sets up GUI components and signal/slot connections. | |
void | setupKeyboardShortcuts () |
Sets up the keyboard shortcuts. | |
void | enableMenus (bool en) |
Calls setEnabled() on all menus with the given parameter. | |
void | editTable (TBTableTabs *table, bool edit) |
Turns on/off editing, if write lock is available, on the given table. | |
Private Attributes | |
TBBrowser | browser |
Browser object. | |
QStatusBar * | statusBar |
The window's status bar. | |
QMenu * | closeMenu |
Close menu that lists all currently opened tables. | |
QMenu * | columnsMenu |
Columns menu that lists the table fields in the currently selected table. | |
QMenu * | editTablesMenu |
Edit menu that lists all currently opened tables. | |
bool | waiting |
Indicates whether the main window is waiting for some other task to complete or not. | |
QAction * | separator |
Separator added in the Edit menu before the Options command. | |
QMenu * | formatMenu |
Format menu that lists the table fields in the currently selected table. | |
QToolBar * | fileBar |
Toolbar holding "file"-related menu commands. | |
QToolBar * | editBar |
Toolbar holding "edit"-related menu commands. | |
QToolBar * | viewBar |
Toolbar holding "view"-related menu commands. | |
QToolBar * | toolBar |
Toolbar holding "tool"-related menu commands. | |
bool | saveView |
Indicates whether the TBMain should save the current view on close or not. |
Main window which is mainly responsible for menu actions.
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 57 of file TBMain.qo.h.
Default Constructor.
void casa::TBMain::actionPerformed | ( | TBAction * | action | ) | [private, slot] |
Updates display to indicate the last action performed.
void casa::TBMain::actionRedone | ( | ) | [private, slot] |
Update display to indicate that the last undone action was redone.
void casa::TBMain::actionUndone | ( | ) | [private, slot] |
Updates display to indicate that the last action was undone.
void casa::TBMain::checkValidity | ( | ) | [private, slot] |
Opens a new TBValidityChecker widget.
void casa::TBMain::clearFilterOnFields | ( | ) | [private, slot] |
Clears the current filter on the current table.
void casa::TBMain::clearSort | ( | ) | [private, slot] |
Clears the current sort.
void casa::TBMain::closeAll | ( | ) | [private, slot] |
Closes all opened tables.
void casa::TBMain::closeAllAndExit | ( | ) | [private, slot] |
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 | ( | ) | [private, slot] |
void openTableWithOptions();
Closes the currently selected table.
void casa::TBMain::closeTable | ( | QAction * | which | ) | [private, slot] |
Closes the table corresponding to the given action's name.
void casa::TBMain::closeTableTriggered | ( | 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 | ||
) | [private, slot] |
Updates the column menu to indicate that the given column has been shown/hidden.
void casa::TBMain::deleteRows | ( | ) | [private, slot] |
Shows a delete rows dialog.
void casa::TBMain::editCurrentTable | ( | ) | [private, slot] |
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 | ) | [private, slot] |
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 | ( | ) | [private, slot] |
Exports the current table to VOTable format.
void casa::TBMain::filterOnFields | ( | ) | [private, slot] |
Opens widget to enter filter rules for the current table.
void casa::TBMain::filterRuleAvailable | ( | int | i | ) | [private, slot] |
Enables the "clear filter" action.
void casa::TBMain::filterRuleCleared | ( | int | i | ) | [private, slot] |
Disables the "clear filter" action.
void casa::TBMain::find | ( | ) | [private, slot] |
Opens widget to enter search rules for the current table.
See TBBrowser::find().
void casa::TBMain::findNext | ( | ) | [private, slot] |
Searches for the next row matching the search rule for the current table.
void casa::TBMain::findPrev | ( | ) | [private, slot] |
Searches for the previous row matching the search rule for the current table.
void casa::TBMain::findRuleAvailable | ( | ) | [private, slot] |
Slot for when the current table has a find rule associated with it.
void casa::TBMain::formatDisplay | ( | QAction * | which | ) | [private, slot] |
Formats the field with the name in the given QAction.
void casa::TBMain::hideAllColumns | ( | ) | [private, slot] |
Hides all the columns in the currently selected table.
void casa::TBMain::insertRows | ( | ) | [private, slot] |
Shows an insert rows dialog.
void casa::TBMain::openHelp | ( | ) | [private, slot] |
Opens the help window.
See TBHelp.
void casa::TBMain::openTable | ( | 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 | ( | ) | [private, slot] |
Opens a filechooser dialog to allow the user to open a table.
void casa::TBMain::openTaQL | ( | ) | [private, slot] |
Opens a TBTaQL dialog to allow the user to open a table using a TaQL command.
void casa::TBMain::options | ( | ) | [private, slot] |
Allows the user to edit table options.
See TBOptions.
void casa::TBMain::plot2D | ( | ) | [private, slot] |
Opens a new TBPlotter window.
void casa::TBMain::redoAction | ( | ) | [private, slot] |
Redoes the last undone action.
void casa::TBMain::saveOptions | ( | TBOptions * | opt | ) | [private, slot] |
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 | ( | ) | [private, slot] |
Shows all the columns in the currently selected table.
void casa::TBMain::sort | ( | ) | [private, slot] |
Shows a sort dialog.
See TBSorter.
void casa::TBMain::sort | ( | vector< pair< String, bool > > & | sort | ) | [private, slot] |
Sort the current table with the given order.
See TBBrowser::sort().
void casa::TBMain::sortCleared | ( | ) | [private, slot] |
Slot for when a sort has been cleared for the current table.
void casa::TBMain::sortEntered | ( | ) | [private, slot] |
Slot for when a sort has been entered for the current table.
void casa::TBMain::tabChanged | ( | int | tableIndex | ) | [private, slot] |
Slot for when the tab is changed in the browser.
Updates all necessary menus.
void casa::TBMain::tableClosed | ( | String | name | ) | [private, slot] |
Connects with TBBrowser::tableClosed() signal.
Updates dynamic menus as necessary.
void casa::TBMain::tableOpened | ( | String | name, |
String | fullpath | ||
) | [private, slot] |
Connects with TBBrowser::tableOpened() signal.
Updates dynamic menus as necessary.
void casa::TBMain::threadFinished | ( | ) | [private, slot] |
Reenables menus after a task thread has completed.
void casa::TBMain::undoAction | ( | ) | [private, slot] |
Undoes the last performed action.
void casa::TBMain::viewColumn | ( | QAction * | which | ) | [private, slot] |
Shows or hides the column on the current table that corresponds to the name of the given action.
void casa::TBMain::viewTableInfo | ( | ) | [private, slot] |
Displays table information for the currently selected table.
TBBrowser casa::TBMain::browser [private] |
Browser object.
Definition at line 88 of file TBMain.qo.h.
QMenu* casa::TBMain::closeMenu [private] |
Close menu that lists all currently opened tables.
Definition at line 94 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 98 of file TBMain.qo.h.
QToolBar* casa::TBMain::editBar [private] |
Toolbar holding "edit"-related menu commands.
Definition at line 119 of file TBMain.qo.h.
QMenu* casa::TBMain::editTablesMenu [private] |
Edit menu that lists all currently opened tables.
Definition at line 101 of file TBMain.qo.h.
QToolBar* casa::TBMain::fileBar [private] |
Toolbar holding "file"-related menu commands.
Definition at line 116 of file TBMain.qo.h.
QMenu* casa::TBMain::formatMenu [private] |
Format menu that lists the table fields in the currently selected table.
Definition at line 113 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 129 of file TBMain.qo.h.
QAction* casa::TBMain::separator [private] |
Separator added in the Edit menu before the Options command.
Definition at line 109 of file TBMain.qo.h.
QStatusBar* casa::TBMain::statusBar [private] |
The window's status bar.
Definition at line 91 of file TBMain.qo.h.
QToolBar* casa::TBMain::toolBar [private] |
Toolbar holding "tool"-related menu commands.
Definition at line 125 of file TBMain.qo.h.
QToolBar* casa::TBMain::viewBar [private] |
Toolbar holding "view"-related menu commands.
Definition at line 122 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 106 of file TBMain.qo.h.