Isis 3 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. More... | |
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. More... | |
void | syncRows () |
Use this method to sync the table with the dock widget list if the table orientation is horizontal. More... | |
void | saveAsTable () |
This method will select a file, set it as the current file and save the table. More... | |
void | saveTable () |
This method allows the user to save the data from the table to the current file. More... | |
void | clearTable () |
This method clears all items from each row and column. More... | |
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. More... | |
void | clearRow (int row) |
This method clears the text of the given row. More... | |
void | setCurrentRow (int row) |
Sets the current row to row. More... | |
void | setCurrentIndex (int currentIndex) |
Sets the current index to currentIndex. More... | |
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. More... | |
bool | trackListItems () |
Returns whether or not we should track items. More... | |
void | loadTable () |
This method loads a text file into the table. More... | |
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. More... | |
void | resizeColumn (int columnIndex) |
Signals | |
void | fileLoaded () |
Signal emitted when a file has loaded. More... | |
Public Member Functions | |
TableMainWindow (QString title, QWidget *parent=0) | |
Constructs a new TableMainWindow object. More... | |
~TableMainWindow () | |
void | clear () |
QTableWidget * | table () const |
Returns the table. More... | |
QList< QListWidgetItem * > | itemList () const |
QListWidget * | listWidget () const |
Returns the list widget. More... | |
int | selectedRows () const |
Returns the selected rows. More... | |
int | currentIndex () const |
Returns the current index. More... | |
int | currentRow () const |
Returns the current row. More... | |
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. More... | |
void | deleteColumn (int item) |
This method deletes a column from the table. More... | |
void | setStatusMessage (QString message) |
sets the status message in the lower lefthand corner of the window. More... | |
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. More... | |
void | createTable () |
This creates the table main window. More... | |
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. More... | |
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. More... | |
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. More... | |
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().
|
staticinherited |
References _FILEINFO_, and Isis::IException::Programmer.
|
protectedinherited |
References _FILEINFO_, and Isis::IException::Programmer.
Referenced by readColumnSettings(), readItemSettings(), Isis::BlinkTool::readSettings(), Isis::MainWindow::readSettings(), Isis::BlinkTool::writeSettings(), and writeSettings().
|
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(), showTable(), and Isis::PlotWindow::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().