a subclass of the qisis mainwindow, tablemainwindow handles all of the table tasks.
More...
#include <TableMainWindow.h>
|
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) |
|
|
void | fileLoaded () |
| Signal emitted when a file has loaded.
|
|
|
| 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) |
|
|
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.
- Author
- ????-??-?? Stacy Alley
◆ TableMainWindow()
Isis::TableMainWindow::TableMainWindow |
( |
QString | title, |
|
|
QWidget * | parent = 0 ) |
◆ ~TableMainWindow()
Isis::TableMainWindow::~TableMainWindow |
( |
| ) |
|
◆ addToTable()
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.
- Parameters
-
setOn | |
heading | |
menuText | |
insertAt | |
o | |
toolTip | |
References readColumnSettings(), and readItemSettings().
◆ clear()
void Isis::TableMainWindow::clear |
( |
| ) |
|
◆ clearRow
void Isis::TableMainWindow::clearRow |
( |
int | row | ) |
|
|
slot |
This method clears the text of the given row.
- Parameters
-
◆ clearTable
void Isis::TableMainWindow::clearTable |
( |
| ) |
|
|
slot |
◆ closeEvent()
void Isis::TableMainWindow::closeEvent |
( |
QCloseEvent * | event | ) |
|
|
virtual |
◆ createTable()
void Isis::TableMainWindow::createTable |
( |
| ) |
|
|
protected |
◆ currentIndex()
int Isis::TableMainWindow::currentIndex |
( |
| ) |
const |
|
inline |
◆ currentRow()
int Isis::TableMainWindow::currentRow |
( |
| ) |
const |
|
inline |
Returns the current row.
- Returns
- int
◆ deleteColumn()
void Isis::TableMainWindow::deleteColumn |
( |
int | item | ) |
|
This method deletes a column from the table.
- Parameters
-
References showTable().
◆ deleteRows
void Isis::TableMainWindow::deleteRows |
( |
| ) |
|
|
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().
◆ eventFilter()
bool Isis::TableMainWindow::eventFilter |
( |
QObject * | o, |
|
|
QEvent * | e ) |
|
protected |
This event filter is installed in the constructor.
- Parameters
-
- Returns
- bool
References writeSettings().
◆ fileLoaded
void Isis::TableMainWindow::fileLoaded |
( |
| ) |
|
|
signal |
Signal emitted when a file has loaded.
Referenced by loadTable().
◆ hideEvent()
void Isis::TableMainWindow::hideEvent |
( |
QHideEvent * | event | ) |
|
◆ itemList()
QList< QListWidgetItem * > Isis::TableMainWindow::itemList |
( |
| ) |
const |
◆ listWidget()
QListWidget * Isis::TableMainWindow::listWidget |
( |
| ) |
const |
|
inline |
Returns the list widget.
- Returns
- QListWidget*
◆ loadTable
void Isis::TableMainWindow::loadTable |
( |
| ) |
|
|
slot |
◆ readColumnSettings()
void Isis::TableMainWindow::readColumnSettings |
( |
| ) |
|
|
protected |
◆ readItemSettings()
void Isis::TableMainWindow::readItemSettings |
( |
QString | heading, |
|
|
QListWidgetItem * | item, |
|
|
bool | defaultChecked ) |
|
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.
- Parameters
-
References Isis::MainWindow::settingsFileName().
Referenced by addToTable().
◆ readSettings()
void Isis::MainWindow::readSettings |
( |
QSize | defaultSize = QSize() | ) |
|
|
protectedvirtualinherited |
◆ resizeColumn
void Isis::TableMainWindow::resizeColumn |
( |
int | columnIndex | ) |
|
|
slot |
◆ saveAsTable
void Isis::TableMainWindow::saveAsTable |
( |
| ) |
|
|
slot |
This method will select a file, set it as the current file and save the table.
References saveTable().
Referenced by createTable().
◆ saveTable
void Isis::TableMainWindow::saveTable |
( |
| ) |
|
|
slot |
◆ selectedRows()
int Isis::TableMainWindow::selectedRows |
( |
| ) |
const |
|
inline |
Returns the selected rows.
- Returns
- int
Referenced by deleteRows().
◆ setCurrentIndex
void Isis::TableMainWindow::setCurrentIndex |
( |
int | currentIndex | ) |
|
|
slot |
Sets the current index to currentIndex.
- Parameters
-
References currentIndex().
◆ setCurrentRow
void Isis::TableMainWindow::setCurrentRow |
( |
int | row | ) |
|
|
slot |
Sets the current row to row.
- Parameters
-
◆ setStatusMessage()
void Isis::TableMainWindow::setStatusMessage |
( |
QString | message | ) |
|
sets the status message in the lower lefthand corner of the window.
- Parameters
-
◆ settingsFileName() [1/2]
QString Isis::MainWindow::settingsFileName |
( |
| ) |
const |
|
protectedinherited |
◆ settingsFileName() [2/2]
QString Isis::MainWindow::settingsFileName |
( |
QString | objectTitle | ) |
|
|
staticinherited |
◆ setTrackListItems
void Isis::TableMainWindow::setTrackListItems |
( |
bool | track = false | ) |
|
|
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.
- Parameters
-
◆ showTable
void Isis::TableMainWindow::showTable |
( |
| ) |
|
|
slot |
This method checks to see if the table has been created.
If not it calls the createTable method before calling show.
- History
- 2017-10-06 Adam Goins - showTable() now calls syncColumns() after it calls this->show() so that it hides the unselected columns appropriately. Fixes #5141.
- History
- 2017-10-06 Adam Goins - showTable() now calls syncColumns() after it calls this->show() so that it hides the unselected columns appropriately. Fixes #5141.
References createTable(), and syncColumns().
Referenced by deleteColumn().
◆ syncColumns
void Isis::TableMainWindow::syncColumns |
( |
| ) |
|
|
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(), and showTable().
◆ syncRows
void Isis::TableMainWindow::syncRows |
( |
| ) |
|
|
slot |
Use this method to sync the table with the dock widget list if the table orientation is horizontal.
References itemList().
◆ table()
QTableWidget * Isis::TableMainWindow::table |
( |
| ) |
const |
|
inline |
Returns the table.
- Returns
- QTableWidget*
◆ trackListItems
bool Isis::TableMainWindow::trackListItems |
( |
| ) |
|
|
slot |
Returns whether or not we should track items.
- Returns
- bool
◆ writeSettings
void Isis::TableMainWindow::writeSettings |
( |
| ) |
const |
|
slot |
The documentation for this class was generated from the following files: