Isis Developer Reference
|
a subclass of the qisis mainwindow, tablemainwindow handles all of the table tasks. More...
#include <TableMainWindow.h>
Public Slots | |
void | showTable () |
This method checks to see if the table has been created. | |
void | syncColumns () |
This method hides and shows the columns according to which items the user has selected to be view-able on the left hand side list. | |
void | syncRows () |
Use this method to sync the table with the dock widget list if the table orientation is horizontal. | |
void | saveAsTable () |
This method will select a file, set it as the current file and save the table. | |
void | saveTable () |
This method allows the user to save the data from the table to the current file. | |
void | clearTable () |
This method clears all items from each row and column. | |
void | deleteRows () |
This method is called when the user selects a row or rows uses the delete button or selects the delete row menu item from the file menu. | |
void | clearRow (int row) |
This method clears the text of the given row. | |
void | setCurrentRow (int row) |
Sets the current row to row. | |
void | setCurrentIndex (int currentIndex) |
Sets the current index to currentIndex. | |
void | setTrackListItems (bool track=false) |
If this property is true, the class will keep track of the checked/unchecked items in the dock area which determines which columns are visible in the table. | |
bool | trackListItems () |
Returns whether or not we should track items. | |
void | loadTable () |
This method loads a text file into the table. | |
void | writeSettings () const |
This overriden method is called when the Tablemainwindow is closed or hidden to write the size and location settings (and dock widget settings) to a config file in the user's home directory. | |
void | resizeColumn (int columnIndex) |
Signals | |
void | fileLoaded () |
Signal emitted when a file has loaded. | |
Public Member Functions | |
TableMainWindow (QString title, QWidget *parent=0) | |
Constructs a new TableMainWindow object. | |
~TableMainWindow () | |
void | clear () |
QTableWidget * | table () const |
Returns the table. | |
QList< QListWidgetItem * > | itemList () const |
QListWidget * | listWidget () const |
Returns the list widget. | |
int | selectedRows () const |
Returns the selected rows. | |
int | currentIndex () const |
Returns the current index. | |
int | currentRow () const |
Returns the current row. | |
void | addToTable (bool setOn, const QString &heading, const QString &menuText="", int insertAt=-1, Qt::Orientation o=Qt::Horizontal, QString toolTip="") |
Adds a new column to the table when a new curve is added to the plot. | |
void | deleteColumn (int item) |
This method deletes a column from the table. | |
void | setStatusMessage (QString message) |
sets the status message in the lower lefthand corner of the window. | |
void | closeEvent (QCloseEvent *event) |
void | hideEvent (QHideEvent *event) |
Static Public Member Functions | |
static QString | settingsFileName (QString objectTitle) |
Protected Member Functions | |
bool | eventFilter (QObject *o, QEvent *e) |
This event filter is installed in the constructor. | |
void | createTable () |
This creates the table main window. | |
void | readItemSettings (QString heading, QListWidgetItem *item, bool defaultChecked) |
This method reads the 'checked' settings on the items listed in the dock area which determine which table columns are visible. | |
void | readColumnSettings () |
This method reads the columns in the table and sets their size to the appropriate size, or the size to auto based on what they were stored as. | |
QString | settingsFileName () const |
virtual void | readSettings (QSize defaultSize=QSize()) |
This method ensure that the settings get written even if the Main window was only hidden, not closed. | |
a subclass of the qisis mainwindow, tablemainwindow handles all of the table tasks.
Isis::TableMainWindow::TableMainWindow | ( | QString | title, |
QWidget * | parent = 0 ) |
Constructs a new TableMainWindow object.
title | |
parent |
References createTable(), readColumnSettings(), and Isis::MainWindow::readSettings().
Isis::TableMainWindow::~TableMainWindow | ( | ) |
References writeSettings().
void Isis::TableMainWindow::addToTable | ( | bool | setOn, |
const QString & | heading, | ||
const QString & | menuText = "", | ||
int | insertAt = -1, | ||
Qt::Orientation | o = Qt::Horizontal, | ||
QString | toolTip = "" ) |
Adds a new column to the table when a new curve is added to the plot.
Also adds the item to the dock area.
setOn | |
heading | |
menuText | |
insertAt | |
o | |
toolTip |
References readColumnSettings(), and readItemSettings().
Referenced by Isis::AdvancedTrackTool::AdvancedTrackTool(), Isis::PlotWindow::fillTable(), Isis::MeasureTool::MeasureTool(), and Isis::SunShadowTool::SunShadowTool().
void Isis::TableMainWindow::clear | ( | ) |
References writeSettings().
Referenced by createTable().
|
slot |
This method clears the text of the given row.
row |
Referenced by Isis::AdvancedTrackTool::mouseLeave(), and Isis::MeasureTool::updateMeasure().
|
slot |
This method clears all items from each row and column.
Referenced by createTable(), and loadTable().
|
virtual |
event |
Reimplemented from Isis::MainWindow.
References Isis::MainWindow::closeEvent(), and writeSettings().
|
protected |
This creates the table main window.
The table and docking area are created here. It also adds the two default menus to the menu bar. Programmers can add more menus to the menu bar once an instance of this class is established.
References clear(), clearTable(), deleteRows(), loadTable(), resizeColumn(), saveAsTable(), saveTable(), and syncColumns().
Referenced by showTable(), and TableMainWindow().
|
inline |
|
inline |
Returns the current row.
Referenced by Isis::AdvancedTrackTool::mouseLeave(), Isis::MeasureTool::rubberBandComplete(), and Isis::MeasureTool::updateMeasure().
void Isis::TableMainWindow::deleteColumn | ( | int | item | ) |
|
slot |
This method is called when the user selects a row or rows uses the delete button or selects the delete row menu item from the file menu.
References selectedRows().
Referenced by createTable().
|
protected |
This event filter is installed in the constructor.
o | |
e |
References writeSettings().
|
signal |
Signal emitted when a file has loaded.
Referenced by loadTable().
void Isis::TableMainWindow::hideEvent | ( | QHideEvent * | event | ) |
event |
QList< QListWidgetItem * > Isis::TableMainWindow::itemList | ( | ) | const |
Referenced by loadTable(), syncColumns(), syncRows(), and writeSettings().
|
inline |
|
slot |
This method loads a text file into the table.
References clearTable(), fileLoaded(), and itemList().
Referenced by createTable().
|
protected |
This method reads the columns in the table and sets their size to the appropriate size, or the size to auto based on what they were stored as.
References Isis::MainWindow::settingsFileName().
Referenced by addToTable(), and TableMainWindow().
|
protected |
This method reads the 'checked' settings on the items listed in the dock area which determine which table columns are visible.
This method is only called if p_trackItems is set to true.
heading | |
item |
References Isis::MainWindow::settingsFileName().
Referenced by addToTable().
|
protectedvirtualinherited |
This method ensure that the settings get written even if the Main window was only hidden, not closed.
event | This method is called from the constructor so that when the Main window is created, it know's it's size and location. |
References Isis::MainWindow::settingsFileName().
Referenced by Isis::PlotWindow::PlotWindow(), TableMainWindow(), and Isis::ViewportMainWindow::ViewportMainWindow().
|
slot |
Referenced by createTable().
|
slot |
This method will select a file, set it as the current file and save the table.
References saveTable().
Referenced by createTable().
|
slot |
This method allows the user to save the data from the table to the current file.
Referenced by createTable(), and saveAsTable().
|
inline |
|
slot |
|
slot |
void Isis::TableMainWindow::setStatusMessage | ( | QString | message | ) |
sets the status message in the lower lefthand corner of the window.
message |
Referenced by Isis::AdvancedTrackTool::AdvancedTrackTool(), Isis::MeasureTool::MeasureTool(), and Isis::SunShadowTool::SunShadowTool().
|
protectedinherited |
References _FILEINFO_, and Isis::IException::Programmer.
Referenced by readColumnSettings(), readItemSettings(), Isis::BlinkTool::readSettings(), Isis::MainWindow::readSettings(), Isis::BlinkTool::writeSettings(), and writeSettings().
|
staticinherited |
References _FILEINFO_, and Isis::IException::Programmer.
|
slot |
If this property is true, the class will keep track of the checked/unchecked items in the dock area which determines which columns are visible in the table.
track |
Referenced by Isis::AdvancedTrackTool::AdvancedTrackTool(), Isis::MeasureTool::MeasureTool(), Isis::PlotWindow::showTable(), and Isis::SunShadowTool::SunShadowTool().
|
slot |
This method checks to see if the table has been created.
If not it calls the createTable method before calling show.
References createTable(), and syncColumns().
Referenced by deleteColumn(), and Isis::AdvancedTrackTool::record().
|
slot |
This method hides and shows the columns according to which items the user has selected to be view-able on the left hand side list.
(dock area)
References itemList().
Referenced by createTable(), Isis::PlotWindow::showTable(), and showTable().
|
slot |
Use this method to sync the table with the dock widget list if the table orientation is horizontal.
References itemList().
|
inline |
Returns the table.
Referenced by Isis::AdvancedTrackTool::AdvancedTrackTool(), Isis::PlotWindow::clearPlot(), Isis::PlotWindow::fillTable(), Isis::SunShadowTool::mouseMove(), Isis::MeasureTool::rubberBandComplete(), and Isis::MeasureTool::updateMeasure().
|
slot |
Returns whether or not we should track items.
|
slot |
This overriden method is called when the Tablemainwindow is closed or hidden to write the size and location settings (and dock widget settings) to a config file in the user's home directory.
References itemList(), and Isis::MainWindow::settingsFileName().
Referenced by clear(), closeEvent(), eventFilter(), and ~TableMainWindow().