Isis 3 Programmer Reference
|
This widget provides full editing, filtering and viewing capabilities for the raw data in a control network. More...
#include <CnetEditorWidget.h>
Public Types | |
enum | View { PointView, ImageView, ConnectionView } |
Public Slots | |
void | configSorting () |
Configures the sorting dialog. More... | |
void | setTablesFrozen (bool) |
Sets if the tables are frozen. More... | |
void | rebuildModels () |
Rebuilds the models. More... | |
Signals | |
void | cnetModified () |
void | editControlPoint (ControlPoint *controlPoint, QString serialNumber) |
Public Member Functions | |
CnetEditorWidget (Control *control, QString pathForSettings) | |
virtual | ~CnetEditorWidget () |
Destructor. More... | |
void | readSettings () |
Reads the working version settings stored at the settings path. More... | |
void | writeSettings () |
Writes the configuration settings used. More... | |
QWidget * | pointTreeView () |
Returns the point tree view. More... | |
QWidget * | serialTreeView () |
Returns the serial tree view. More... | |
QWidget * | connectionTreeView () |
Returns the connection tree view. More... | |
QWidget * | pointFilterWidget () |
Returns the point filter widget. More... | |
QWidget * | serialFilterWidget () |
Returns the serial filter widget. More... | |
QWidget * | connectionFilterWidget () |
Returns the connection filter widget. More... | |
TableView * | pointTableView () |
Returns the point table view. More... | |
TableView * | measureTableView () |
Returns the measure table view. More... | |
ControlNet * | control () |
Returns the control network. More... | |
AbstractTableModel * | measureTableModel () |
Returns the measure table model. More... | |
AbstractTableModel * | pointTableModel () |
Returns the point table model. More... | |
QMap< QAction *, QList< QString > > | menuActions () |
Returns the menu actions. More... | |
QMap< QString, QList< QAction *> > | toolBarActions () |
Returns the tool bar actions. More... | |
ControlNet * | filteredNetwork () const |
Returns the filtered control net. More... | |
bool | measureTableSortingEnabled () const |
Returns true if the measure table can be sorted. More... | |
int | measureTableSortLimit () const |
Returns the sorting limit for the measure table. More... | |
bool | pointTableSortingEnabled () const |
Returns true if the point table can be sorted. More... | |
int | pointTableSortLimit () const |
Returns the sorting limit for the point table. More... | |
void | setMeasureTableSortingEnabled (bool enabled) |
Sets if the measure table can be sorted. More... | |
void | setMeasureTableSortLimit (int limit) |
Sets the measure table sorting limit. More... | |
void | setPointTableSortingEnabled (bool enabled) |
Sets if the point table can be sorted. More... | |
void | setPointTableSortLimit (int limit) |
Sets the point table sorting limit. More... | |
Private Slots | |
void | rebuildModels (QList< AbstractTreeItem * > itemsToDelete) |
Deletes the current models, clears the tree, and rebuilds the models. More... | |
void | pointColToggled () |
Toggles the point column. More... | |
void | measureColToggled () |
Toggles the measure column. More... | |
void | handlePointTableFilterCountsChanged (int visibleRows, int totalRows) |
Handles point table filter changes. More... | |
void | handleMeasureTableFilterCountsChanged (int visibleRows, int totalRows) |
Handles measure table filter changes. More... | |
void | setCnetModified () |
Connected to cnetModified(). More... | |
Private Member Functions | |
void | nullify () |
Sets all member variables to NULL. More... | |
QBoxLayout * | createMainLayout () |
Creates the layout of the widget. More... | |
void | createActions () |
Creates the menus, and options for the widget. More... | |
void | createPointTreeView () |
Creates the point tree view and adds it to the model. More... | |
void | createSerialTreeView () |
Creates the serial tree and adds it to the model. More... | |
void | createConnectionTreeView () |
Creates the connection tree and adds it to the model. More... | |
void | createFilterArea () |
Creates filter widgets. More... | |
void | createPointTableView () |
Creates the point table and adds it to the widget. More... | |
void | createMeasureTableView () |
Creates the measure table and adds it to the widget. More... | |
void | upgradeVersion () |
Upgrades the working version number. More... | |
void | handleTableFilterCountsChanged (int visibleRows, int totalRows, QGroupBox *box, QString initialText) |
Handles any table filter changes. More... | |
Static Private Attributes | |
static const QString | VERSION = "0.1" |
Version. More... | |
This widget provides full editing, filtering and viewing capabilities for the raw data in a control network.
The raw data is, for example, chooser name or cube serial number. The display is all textual. Please use the widget accessors to appropriately place the various ancillary sections of the editor.
2015-10-07 Ian Humphrey - Icons updated and no longer embedded (in order to not violate licensing terms). Fixes #1041.
2017-05-18 Tracie Sucharski - Added a signal to indicate the control point chosen from either the point table or the measure table. If the point was chosen from the measure table, the serial number of the measure is also passed. This was added for IPCE, for the interaction with other views.
2017-07-25 Summer Stapleton - Removed the CnetViz namespace. Fixes #5054.
2017-07-24 Makayla Shepherd - Fixed a seg fault in ipce that occurs when attempting to edit a control point when there is not an active control network. Fixes #5048.
2017-08-10 Christopher Combs - Added Apriori lat, lon, and radius labels. Fixes#5066
2017-08-11 Christopher Combs - Changed constructor to take in a Control instead of a ControlNet. Added load and save methods as well as an XmlHandler to allow for serialization of the widget into the project. Fixes #4989.
2018-04-11 Tracie Sucharski - Moved the Xml serialization to the newly created CnetEditorView class for ipce.
2018-06-12 Kaitlyn Lee - Added m_sortDialog to keep track if a dialog exists so only one instance can be open at a time.
2018-07-12 Kaitlyn Lee - Added setCnetModified() and the connection with cnetModified() to call setModified(true) on a control when a user edits a cnet. cnetModified() was only connected to a slot in Directory, and this was connected to a slot in Project called activeControlModified() that would call setModified(true) on the active control. So, when a user changed any cnets, the only cnet that was recognized as being modified was the active. Adding this allows a user to save changes made to a nonactive cnet. Fixes #5414.
Definition at line 88 of file CnetEditorWidget.h.
|
virtual |
Destructor.
Definition at line 103 of file CnetEditorWidget.cpp.
References m_connectionFilterWidget, m_connectionModel, m_connectionTreeView, m_imageModel, m_imageTreeView, m_mainSplitter, m_measureTableBox, m_measureTableView, m_menuActions, m_pointFilterWidget, m_pointModel, m_pointTableBox, m_pointTableView, m_pointTreeView, m_serialFilterWidget, m_settingsPath, m_sortDialog, m_toolBarActions, m_workingVersion, and writeSettings().
|
slot |
Configures the sorting dialog.
If one does not already exist, create it, then show the dialog
Definition at line 1029 of file CnetEditorWidget.cpp.
References m_sortDialog.
Referenced by createActions().
QWidget * Isis::CnetEditorWidget::connectionFilterWidget | ( | ) |
Returns the connection filter widget.
Definition at line 768 of file CnetEditorWidget.cpp.
References m_connectionFilterWidget.
QWidget * Isis::CnetEditorWidget::connectionTreeView | ( | ) |
Returns the connection tree view.
Definition at line 738 of file CnetEditorWidget.cpp.
References m_connectionTreeView.
ControlNet * Isis::CnetEditorWidget::control | ( | ) |
Returns the control network.
Definition at line 818 of file CnetEditorWidget.cpp.
References Isis::Control::controlNet(), and m_control.
|
private |
Creates the menus, and options for the widget.
Definition at line 299 of file CnetEditorWidget.cpp.
References configSorting(), m_menuActions, m_toolBarActions, and setTablesFrozen().
|
private |
Creates the connection tree and adds it to the model.
Definition at line 368 of file CnetEditorWidget.cpp.
References Isis::Control::controlNet(), m_connectionModel, m_connectionTreeView, and m_control.
Referenced by createMainLayout().
|
private |
Creates filter widgets.
Definition at line 379 of file CnetEditorWidget.cpp.
References m_connectionFilterWidget, m_connectionModel, m_imageModel, m_pointFilterWidget, m_pointModel, and m_serialFilterWidget.
Referenced by createMainLayout().
|
private |
Creates the layout of the widget.
Definition at line 251 of file CnetEditorWidget.cpp.
References createConnectionTreeView(), createFilterArea(), createMeasureTableView(), createPointTableView(), createPointTreeView(), createSerialTreeView(), m_connectionTreeView, m_imageTreeView, m_mainSplitter, m_measureTableBox, m_measureTableView, m_pointTableBox, m_pointTableView, and m_pointTreeView.
|
private |
Creates the measure table and adds it to the widget.
Definition at line 473 of file CnetEditorWidget.cpp.
References Isis::TableView::getHorizontalHeader(), handleMeasureTableFilterCountsChanged(), m_measureTableModel, m_measureTableView, m_pointModel, m_pointTableModel, m_pointTableView, m_pointTreeView, m_settingsPath, measureColToggled(), and rebuildModels().
Referenced by createMainLayout().
|
private |
Creates the point table and adds it to the widget.
Definition at line 431 of file CnetEditorWidget.cpp.
References Isis::TableView::getHorizontalHeader(), handlePointTableFilterCountsChanged(), m_pointModel, m_pointTableModel, m_pointTableView, m_pointTreeView, m_settingsPath, pointColToggled(), and rebuildModels().
Referenced by createMainLayout().
|
private |
Creates the point tree view and adds it to the model.
Definition at line 346 of file CnetEditorWidget.cpp.
References Isis::Control::controlNet(), m_control, m_pointModel, and m_pointTreeView.
Referenced by createMainLayout().
|
private |
Creates the serial tree and adds it to the model.
Definition at line 357 of file CnetEditorWidget.cpp.
References Isis::Control::controlNet(), m_control, m_imageModel, and m_imageTreeView.
Referenced by createMainLayout().
ControlNet * Isis::CnetEditorWidget::filteredNetwork | ( | ) | const |
Returns the filtered control net.
Definition at line 850 of file CnetEditorWidget.cpp.
References Isis::Control::controlNet(), Isis::ControlPoint::Delete(), Isis::ControlNet::DeletePoint(), Isis::ControlMeasure::GetCubeSerialNumber(), Isis::ControlPoint::GetId(), Isis::ControlPoint::GetMeasure(), Isis::ControlNet::GetNumPoints(), m_control, m_pointModel, and Isis::ControlPoint::SetEditLock().
|
privateslot |
Handles measure table filter changes.
visibleRows | Number of visible rows |
totalRows | Total number of rows |
Definition at line 582 of file CnetEditorWidget.cpp.
References handleTableFilterCountsChanged(), and m_measureTableBox.
Referenced by createMeasureTableView().
|
privateslot |
Handles point table filter changes.
visibleRows | Number of visible rows |
totalRows | Total number of rows |
Definition at line 566 of file CnetEditorWidget.cpp.
References handleTableFilterCountsChanged(), and m_pointTableBox.
Referenced by createPointTableView().
|
private |
Handles any table filter changes.
visibleRows | Number of visible rows |
totalRows | Total number of rows |
box | The table box to change |
initialText | The initial text at the top of the table |
Definition at line 597 of file CnetEditorWidget.cpp.
Referenced by handleMeasureTableFilterCountsChanged(), and handlePointTableFilterCountsChanged().
|
privateslot |
Toggles the measure column.
Definition at line 548 of file CnetEditorWidget.cpp.
References Isis::TableView::getHorizontalHeader(), m_measureTableView, and Isis::TableView::setColumnVisible().
Referenced by createMeasureTableView().
AbstractTableModel * Isis::CnetEditorWidget::measureTableModel | ( | ) |
Returns the measure table model.
Definition at line 798 of file CnetEditorWidget.cpp.
References m_measureTableModel.
bool Isis::CnetEditorWidget::measureTableSortingEnabled | ( | ) | const |
Returns true if the measure table can be sorted.
Definition at line 950 of file CnetEditorWidget.cpp.
References m_measureTableModel.
Referenced by writeSettings().
int Isis::CnetEditorWidget::measureTableSortLimit | ( | ) | const |
Returns the sorting limit for the measure table.
Definition at line 960 of file CnetEditorWidget.cpp.
References m_measureTableModel.
Referenced by writeSettings().
TableView * Isis::CnetEditorWidget::measureTableView | ( | ) |
Returns the measure table view.
Definition at line 788 of file CnetEditorWidget.cpp.
References m_measureTableView.
Referenced by Isis::Directory::addCnetEditorView(), and Isis::Directory::newActiveControl().
Returns the menu actions.
Definition at line 828 of file CnetEditorWidget.cpp.
References m_menuActions.
|
private |
Sets all member variables to NULL.
Definition at line 166 of file CnetEditorWidget.cpp.
References m_connectionFilterWidget, m_connectionModel, m_connectionTreeView, m_control, m_filterArea, m_imageModel, m_imageTreeView, m_mainSplitter, m_measureTableBox, m_measureTableModel, m_measureTableView, m_menuActions, m_pointFilterWidget, m_pointModel, m_pointTableBox, m_pointTableModel, m_pointTableView, m_pointTreeView, m_serialFilterWidget, m_settingsPath, m_sortDialog, m_toolBarActions, and m_workingVersion.
|
privateslot |
Toggles the point column.
Definition at line 534 of file CnetEditorWidget.cpp.
References Isis::TableView::getHorizontalHeader(), m_pointTableView, and Isis::TableView::setColumnVisible().
Referenced by createPointTableView().
QWidget * Isis::CnetEditorWidget::pointFilterWidget | ( | ) |
Returns the point filter widget.
Definition at line 748 of file CnetEditorWidget.cpp.
References m_pointFilterWidget.
AbstractTableModel * Isis::CnetEditorWidget::pointTableModel | ( | ) |
Returns the point table model.
Definition at line 808 of file CnetEditorWidget.cpp.
References m_pointTableModel.
bool Isis::CnetEditorWidget::pointTableSortingEnabled | ( | ) | const |
Returns true if the point table can be sorted.
Definition at line 970 of file CnetEditorWidget.cpp.
References m_pointTableModel.
Referenced by writeSettings().
int Isis::CnetEditorWidget::pointTableSortLimit | ( | ) | const |
Returns the sorting limit for the point table.
Definition at line 980 of file CnetEditorWidget.cpp.
References m_pointTableModel.
Referenced by writeSettings().
TableView * Isis::CnetEditorWidget::pointTableView | ( | ) |
Returns the point table view.
Definition at line 778 of file CnetEditorWidget.cpp.
References m_pointTableView.
Referenced by Isis::Directory::addCnetEditorView(), and Isis::Directory::newActiveControl().
QWidget * Isis::CnetEditorWidget::pointTreeView | ( | ) |
Returns the point tree view.
Definition at line 718 of file CnetEditorWidget.cpp.
References m_pointTreeView.
void Isis::CnetEditorWidget::readSettings | ( | ) |
Reads the working version settings stored at the settings path.
Definition at line 629 of file CnetEditorWidget.cpp.
References Isis::TableView::getHorizontalHeader(), m_mainSplitter, m_measureTableView, m_pointTableView, m_settingsPath, m_workingVersion, setMeasureTableSortingEnabled(), setMeasureTableSortLimit(), setPointTableSortingEnabled(), and setPointTableSortLimit().
|
slot |
Rebuilds the models.
Definition at line 526 of file CnetEditorWidget.cpp.
Referenced by createMeasureTableView(), and createPointTableView().
|
privateslot |
Deletes the current models, clears the tree, and rebuilds the models.
itemsToDelete | Tree to clear |
Definition at line 208 of file CnetEditorWidget.cpp.
References m_connectionModel, m_imageModel, m_pointModel, and Isis::IException::what().
QWidget * Isis::CnetEditorWidget::serialFilterWidget | ( | ) |
Returns the serial filter widget.
Definition at line 758 of file CnetEditorWidget.cpp.
References m_serialFilterWidget.
QWidget * Isis::CnetEditorWidget::serialTreeView | ( | ) |
Returns the serial tree view.
Definition at line 728 of file CnetEditorWidget.cpp.
References m_imageTreeView.
|
privateslot |
Connected to cnetModified().
Sets the modification of m_control when the cnet is modified.
Definition at line 1059 of file CnetEditorWidget.cpp.
References m_control, and Isis::Control::setModified().
void Isis::CnetEditorWidget::setMeasureTableSortingEnabled | ( | bool | enabled | ) |
Sets if the measure table can be sorted.
bool | Bool if the table can be sorted or not |
Definition at line 990 of file CnetEditorWidget.cpp.
References m_measureTableModel.
Referenced by readSettings().
void Isis::CnetEditorWidget::setMeasureTableSortLimit | ( | int | limit | ) |
Sets the measure table sorting limit.
int | Sorting limit |
Definition at line 1000 of file CnetEditorWidget.cpp.
References m_measureTableModel.
Referenced by readSettings().
void Isis::CnetEditorWidget::setPointTableSortingEnabled | ( | bool | enabled | ) |
Sets if the point table can be sorted.
bool | Bool if the table can be sorted or not |
Definition at line 1010 of file CnetEditorWidget.cpp.
References m_pointTableModel.
Referenced by readSettings().
void Isis::CnetEditorWidget::setPointTableSortLimit | ( | int | limit | ) |
Sets the point table sorting limit.
int | Sorting limit |
Definition at line 1020 of file CnetEditorWidget.cpp.
References m_pointTableModel.
Referenced by readSettings().
|
slot |
Sets if the tables are frozen.
bool | Bool that freezes the tables or not |
Definition at line 1042 of file CnetEditorWidget.cpp.
References m_connectionModel, m_imageModel, and m_pointModel.
Referenced by createActions().
Returns the tool bar actions.
Definition at line 839 of file CnetEditorWidget.cpp.
References m_toolBarActions.
|
private |
Upgrades the working version number.
Definition at line 616 of file CnetEditorWidget.cpp.
References m_workingVersion, and VERSION.
void Isis::CnetEditorWidget::writeSettings | ( | ) |
Writes the configuration settings used.
Definition at line 673 of file CnetEditorWidget.cpp.
References Isis::TableView::getHorizontalHeader(), m_mainSplitter, m_measureTableView, m_pointTableView, m_settingsPath, measureTableSortingEnabled(), measureTableSortLimit(), pointTableSortingEnabled(), pointTableSortLimit(), and VERSION.
Referenced by ~CnetEditorWidget().
|
private |
Connection filter widget.
Definition at line 191 of file CnetEditorWidget.h.
Referenced by connectionFilterWidget(), createFilterArea(), nullify(), and ~CnetEditorWidget().
|
private |
Connection tree model.
Definition at line 195 of file CnetEditorWidget.h.
Referenced by createConnectionTreeView(), createFilterArea(), nullify(), rebuildModels(), setTablesFrozen(), and ~CnetEditorWidget().
|
private |
Connection tree view.
Definition at line 179 of file CnetEditorWidget.h.
Referenced by connectionTreeView(), createConnectionTreeView(), createMainLayout(), nullify(), and ~CnetEditorWidget().
|
private |
Control for this widget.
Definition at line 172 of file CnetEditorWidget.h.
Referenced by control(), createConnectionTreeView(), createPointTreeView(), createSerialTreeView(), filteredNetwork(), nullify(), and setCnetModified().
|
private |
Scroll area for filters.
Definition at line 187 of file CnetEditorWidget.h.
Referenced by nullify().
|
private |
Image tree model.
Definition at line 194 of file CnetEditorWidget.h.
Referenced by createFilterArea(), createSerialTreeView(), nullify(), rebuildModels(), setTablesFrozen(), and ~CnetEditorWidget().
|
private |
Image tree view.
Definition at line 178 of file CnetEditorWidget.h.
Referenced by createMainLayout(), createSerialTreeView(), nullify(), serialTreeView(), and ~CnetEditorWidget().
|
private |
Splitter.
Definition at line 200 of file CnetEditorWidget.h.
Referenced by createMainLayout(), nullify(), readSettings(), writeSettings(), and ~CnetEditorWidget().
|
private |
Measure table box.
Definition at line 185 of file CnetEditorWidget.h.
Referenced by createMainLayout(), handleMeasureTableFilterCountsChanged(), nullify(), and ~CnetEditorWidget().
|
private |
Measure table model.
Definition at line 198 of file CnetEditorWidget.h.
Referenced by createMeasureTableView(), measureTableModel(), measureTableSortingEnabled(), measureTableSortLimit(), nullify(), setMeasureTableSortingEnabled(), and setMeasureTableSortLimit().
|
private |
Measure table view.
Definition at line 182 of file CnetEditorWidget.h.
Referenced by createMainLayout(), createMeasureTableView(), measureColToggled(), measureTableView(), nullify(), readSettings(), writeSettings(), and ~CnetEditorWidget().
QMap of menu actions.
Definition at line 202 of file CnetEditorWidget.h.
Referenced by createActions(), menuActions(), nullify(), and ~CnetEditorWidget().
|
private |
Point filter widget.
Definition at line 189 of file CnetEditorWidget.h.
Referenced by createFilterArea(), nullify(), pointFilterWidget(), and ~CnetEditorWidget().
|
private |
Point tree model.
Definition at line 193 of file CnetEditorWidget.h.
Referenced by createFilterArea(), createMeasureTableView(), createPointTableView(), createPointTreeView(), filteredNetwork(), nullify(), rebuildModels(), setTablesFrozen(), and ~CnetEditorWidget().
|
private |
Point table box.
Definition at line 184 of file CnetEditorWidget.h.
Referenced by createMainLayout(), handlePointTableFilterCountsChanged(), nullify(), and ~CnetEditorWidget().
|
private |
Point table model.
Definition at line 197 of file CnetEditorWidget.h.
Referenced by createMeasureTableView(), createPointTableView(), nullify(), pointTableModel(), pointTableSortingEnabled(), pointTableSortLimit(), setPointTableSortingEnabled(), and setPointTableSortLimit().
|
private |
Point table view.
Definition at line 181 of file CnetEditorWidget.h.
Referenced by createMainLayout(), createMeasureTableView(), createPointTableView(), nullify(), pointColToggled(), pointTableView(), readSettings(), writeSettings(), and ~CnetEditorWidget().
|
private |
Point tree view.
Definition at line 177 of file CnetEditorWidget.h.
Referenced by createMainLayout(), createMeasureTableView(), createPointTableView(), createPointTreeView(), nullify(), pointTreeView(), and ~CnetEditorWidget().
|
private |
Serial filter widget.
Definition at line 190 of file CnetEditorWidget.h.
Referenced by createFilterArea(), nullify(), serialFilterWidget(), and ~CnetEditorWidget().
|
private |
Path to read/write settings.
Definition at line 205 of file CnetEditorWidget.h.
Referenced by createMeasureTableView(), createPointTableView(), nullify(), readSettings(), writeSettings(), and ~CnetEditorWidget().
|
private |
Sorting dialog.
Definition at line 207 of file CnetEditorWidget.h.
Referenced by configSorting(), nullify(), and ~CnetEditorWidget().
QMap of tool bar actions.
Definition at line 203 of file CnetEditorWidget.h.
Referenced by createActions(), nullify(), toolBarActions(), and ~CnetEditorWidget().
|
private |
Updates selection.
Definition at line 171 of file CnetEditorWidget.h.
|
private |
Working version.
Definition at line 173 of file CnetEditorWidget.h.
Referenced by nullify(), readSettings(), upgradeVersion(), and ~CnetEditorWidget().
|
staticprivate |
Version.
Definition at line 174 of file CnetEditorWidget.h.
Referenced by upgradeVersion(), and writeSettings().