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. | |
void | setTablesFrozen (bool) |
Sets if the tables are frozen. | |
void | rebuildModels () |
Rebuilds the models. | |
Signals | |
void | cnetModified () |
void | editControlPoint (ControlPoint *controlPoint, QString serialNumber) |
Public Member Functions | |
CnetEditorWidget (Control *control, QString pathForSettings) | |
virtual | ~CnetEditorWidget () |
Destructor. | |
void | readSettings () |
Reads the working version settings stored at the settings path. | |
void | writeSettings () |
Writes the configuration settings used. | |
QWidget * | pointTreeView () |
Returns the point tree view. | |
QWidget * | serialTreeView () |
Returns the serial tree view. | |
QWidget * | connectionTreeView () |
Returns the connection tree view. | |
QWidget * | pointFilterWidget () |
Returns the point filter widget. | |
QWidget * | serialFilterWidget () |
Returns the serial filter widget. | |
QWidget * | connectionFilterWidget () |
Returns the connection filter widget. | |
TableView * | pointTableView () |
Returns the point table view. | |
TableView * | measureTableView () |
Returns the measure table view. | |
ControlNet * | control () |
Returns the control network. | |
AbstractTableModel * | measureTableModel () |
Returns the measure table model. | |
AbstractTableModel * | pointTableModel () |
Returns the point table model. | |
QMap< QAction *, QList< QString > > | menuActions () |
Returns the menu actions. | |
QMap< QString, QList< QAction * > > | toolBarActions () |
Returns the tool bar actions. | |
ControlNet * | filteredNetwork () const |
Returns the filtered control net. | |
bool | measureTableSortingEnabled () const |
Returns true if the measure table can be sorted. | |
int | measureTableSortLimit () const |
Returns the sorting limit for the measure table. | |
bool | pointTableSortingEnabled () const |
Returns true if the point table can be sorted. | |
int | pointTableSortLimit () const |
Returns the sorting limit for the point table. | |
void | setMeasureTableSortingEnabled (bool enabled) |
Sets if the measure table can be sorted. | |
void | setMeasureTableSortLimit (int limit) |
Sets the measure table sorting limit. | |
void | setPointTableSortingEnabled (bool enabled) |
Sets if the point table can be sorted. | |
void | setPointTableSortLimit (int limit) |
Sets the point table sorting limit. | |
Private Slots | |
void | rebuildModels (QList< AbstractTreeItem * > itemsToDelete) |
Deletes the current models, clears the tree, and rebuilds the models. | |
void | pointColToggled () |
Toggles the point column. | |
void | measureColToggled () |
Toggles the measure column. | |
void | handlePointTableFilterCountsChanged (int visibleRows, int totalRows) |
Handles point table filter changes. | |
void | handleMeasureTableFilterCountsChanged (int visibleRows, int totalRows) |
Handles measure table filter changes. | |
void | setCnetModified () |
Connected to cnetModified(). | |
Private Member Functions | |
void | nullify () |
Sets all member variables to NULL. | |
QBoxLayout * | createMainLayout () |
Creates the layout of the widget. | |
void | createActions () |
Creates the menus, and options for the widget. | |
void | createPointTreeView () |
Creates the point tree view and adds it to the model. | |
void | createSerialTreeView () |
Creates the serial tree and adds it to the model. | |
void | createConnectionTreeView () |
Creates the connection tree and adds it to the model. | |
void | createFilterArea () |
Creates filter widgets. | |
void | createPointTableView () |
Creates the point table and adds it to the widget. | |
void | createMeasureTableView () |
Creates the measure table and adds it to the widget. | |
void | upgradeVersion () |
Upgrades the working version number. | |
void | handleTableFilterCountsChanged (int visibleRows, int totalRows, QGroupBox *box, QString initialText) |
Handles any table filter changes. | |
Private Attributes | |
bool | m_updatingSelection |
Updates selection. | |
Control * | m_control |
Control for this widget. | |
QString * | m_workingVersion |
Working version. | |
TreeView * | m_pointTreeView |
Point tree view. | |
TreeView * | m_imageTreeView |
Image tree view. | |
TreeView * | m_connectionTreeView |
Connection tree view. | |
TableView * | m_pointTableView |
Point table view. | |
TableView * | m_measureTableView |
Measure table view. | |
QGroupBox * | m_pointTableBox |
Point table box. | |
QGroupBox * | m_measureTableBox |
Measure table box. | |
QScrollArea * | m_filterArea |
Scroll area for filters. | |
QWidget * | m_pointFilterWidget |
Point filter widget. | |
QWidget * | m_serialFilterWidget |
Serial filter widget. | |
QWidget * | m_connectionFilterWidget |
Connection filter widget. | |
PointMeasureTreeModel * | m_pointModel |
Point tree model. | |
ImagePointTreeModel * | m_imageModel |
Image tree model. | |
ImageImageTreeModel * | m_connectionModel |
Connection tree model. | |
PointTableModel * | m_pointTableModel |
Point table model. | |
MeasureTableModel * | m_measureTableModel |
Measure table model. | |
QSplitter * | m_mainSplitter |
Splitter. | |
QMap< QAction *, QList< QString > > * | m_menuActions |
QMap of menu actions. | |
QMap< QString, QList< QAction * > > * | m_toolBarActions |
QMap of tool bar actions. | |
QString * | m_settingsPath |
Path to read/write settings. | |
CnetEditorSortConfigDialog * | m_sortDialog |
Sorting dialog. | |
Static Private Attributes | |
static const QString | VERSION = "0.1" |
Version. | |
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 96 of file CnetEditorWidget.h.
enum Isis::CnetEditorWidget::View |
Definition at line 100 of file CnetEditorWidget.h.
Isis::CnetEditorWidget::CnetEditorWidget | ( | Control * | control, |
QString | pathForSettings ) |
Definition at line 75 of file CnetEditorWidget.cpp.
|
virtual |
Destructor.
Definition at line 109 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 1024 of file CnetEditorWidget.cpp.
References m_sortDialog.
Referenced by createActions().
QWidget * Isis::CnetEditorWidget::connectionFilterWidget | ( | ) |
Returns the connection filter widget.
Definition at line 765 of file CnetEditorWidget.cpp.
References m_connectionFilterWidget.
QWidget * Isis::CnetEditorWidget::connectionTreeView | ( | ) |
Returns the connection tree view.
Definition at line 735 of file CnetEditorWidget.cpp.
References m_connectionTreeView.
ControlNet * Isis::CnetEditorWidget::control | ( | ) |
Returns the control network.
Definition at line 815 of file CnetEditorWidget.cpp.
References Isis::Control::controlNet(), and m_control.
|
private |
Creates the menus, and options for the widget.
Definition at line 305 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 375 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 386 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 257 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 477 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 435 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 353 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 364 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 845 of file CnetEditorWidget.cpp.
References Isis::Control::controlNet(), 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 585 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 569 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 600 of file CnetEditorWidget.cpp.
Referenced by handleMeasureTableFilterCountsChanged(), and handlePointTableFilterCountsChanged().
|
privateslot |
Toggles the measure column.
Definition at line 551 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 795 of file CnetEditorWidget.cpp.
References m_measureTableModel.
bool Isis::CnetEditorWidget::measureTableSortingEnabled | ( | ) | const |
Returns true if the measure table can be sorted.
Definition at line 945 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 955 of file CnetEditorWidget.cpp.
References m_measureTableModel.
Referenced by writeSettings().
TableView * Isis::CnetEditorWidget::measureTableView | ( | ) |
Returns the measure table view.
Definition at line 785 of file CnetEditorWidget.cpp.
References m_measureTableView.
Referenced by Isis::Directory::addCnetEditorView().
Returns the menu actions.
Definition at line 825 of file CnetEditorWidget.cpp.
References m_menuActions.
|
private |
Sets all member variables to NULL.
Definition at line 172 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 537 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 745 of file CnetEditorWidget.cpp.
References m_pointFilterWidget.
AbstractTableModel * Isis::CnetEditorWidget::pointTableModel | ( | ) |
Returns the point table model.
Definition at line 805 of file CnetEditorWidget.cpp.
References m_pointTableModel.
bool Isis::CnetEditorWidget::pointTableSortingEnabled | ( | ) | const |
Returns true if the point table can be sorted.
Definition at line 965 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 975 of file CnetEditorWidget.cpp.
References m_pointTableModel.
Referenced by writeSettings().
TableView * Isis::CnetEditorWidget::pointTableView | ( | ) |
Returns the point table view.
Definition at line 775 of file CnetEditorWidget.cpp.
References m_pointTableView.
Referenced by Isis::Directory::addCnetEditorView().
QWidget * Isis::CnetEditorWidget::pointTreeView | ( | ) |
Returns the point tree view.
Definition at line 715 of file CnetEditorWidget.cpp.
References m_pointTreeView.
void Isis::CnetEditorWidget::readSettings | ( | ) |
Reads the working version settings stored at the settings path.
Definition at line 632 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 529 of file CnetEditorWidget.cpp.
References rebuildModels().
Referenced by createMeasureTableView(), createPointTableView(), and rebuildModels().
|
privateslot |
Deletes the current models, clears the tree, and rebuilds the models.
itemsToDelete | Tree to clear |
Definition at line 214 of file CnetEditorWidget.cpp.
References m_connectionModel, m_imageModel, and m_pointModel.
QWidget * Isis::CnetEditorWidget::serialFilterWidget | ( | ) |
Returns the serial filter widget.
Definition at line 755 of file CnetEditorWidget.cpp.
References m_serialFilterWidget.
QWidget * Isis::CnetEditorWidget::serialTreeView | ( | ) |
Returns the serial tree view.
Definition at line 725 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 1054 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 985 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 995 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 1005 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 1015 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 1037 of file CnetEditorWidget.cpp.
References m_connectionModel, m_imageModel, and m_pointModel.
Referenced by createActions().
Returns the tool bar actions.
Definition at line 835 of file CnetEditorWidget.cpp.
References m_toolBarActions.
|
private |
Upgrades the working version number.
Definition at line 619 of file CnetEditorWidget.cpp.
References m_workingVersion, upgradeVersion(), and VERSION.
Referenced by upgradeVersion().
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 199 of file CnetEditorWidget.h.
Referenced by connectionFilterWidget(), createFilterArea(), nullify(), and ~CnetEditorWidget().
|
private |
Connection tree model.
Definition at line 203 of file CnetEditorWidget.h.
Referenced by createConnectionTreeView(), createFilterArea(), nullify(), rebuildModels(), setTablesFrozen(), and ~CnetEditorWidget().
|
private |
Connection tree view.
Definition at line 187 of file CnetEditorWidget.h.
Referenced by connectionTreeView(), createConnectionTreeView(), createMainLayout(), nullify(), and ~CnetEditorWidget().
|
private |
Control for this widget.
Definition at line 180 of file CnetEditorWidget.h.
Referenced by control(), createConnectionTreeView(), createPointTreeView(), createSerialTreeView(), filteredNetwork(), nullify(), and setCnetModified().
|
private |
Scroll area for filters.
Definition at line 195 of file CnetEditorWidget.h.
Referenced by nullify().
|
private |
Image tree model.
Definition at line 202 of file CnetEditorWidget.h.
Referenced by createFilterArea(), createSerialTreeView(), nullify(), rebuildModels(), setTablesFrozen(), and ~CnetEditorWidget().
|
private |
Image tree view.
Definition at line 186 of file CnetEditorWidget.h.
Referenced by createMainLayout(), createSerialTreeView(), nullify(), serialTreeView(), and ~CnetEditorWidget().
|
private |
Splitter.
Definition at line 208 of file CnetEditorWidget.h.
Referenced by createMainLayout(), nullify(), readSettings(), writeSettings(), and ~CnetEditorWidget().
|
private |
Measure table box.
Definition at line 193 of file CnetEditorWidget.h.
Referenced by createMainLayout(), handleMeasureTableFilterCountsChanged(), nullify(), and ~CnetEditorWidget().
|
private |
Measure table model.
Definition at line 206 of file CnetEditorWidget.h.
Referenced by createMeasureTableView(), measureTableModel(), measureTableSortingEnabled(), measureTableSortLimit(), nullify(), setMeasureTableSortingEnabled(), and setMeasureTableSortLimit().
|
private |
Measure table view.
Definition at line 190 of file CnetEditorWidget.h.
Referenced by createMainLayout(), createMeasureTableView(), measureColToggled(), measureTableView(), nullify(), readSettings(), writeSettings(), and ~CnetEditorWidget().
QMap of menu actions.
Definition at line 210 of file CnetEditorWidget.h.
Referenced by createActions(), menuActions(), nullify(), and ~CnetEditorWidget().
|
private |
Point filter widget.
Definition at line 197 of file CnetEditorWidget.h.
Referenced by createFilterArea(), nullify(), pointFilterWidget(), and ~CnetEditorWidget().
|
private |
Point tree model.
Definition at line 201 of file CnetEditorWidget.h.
Referenced by createFilterArea(), createMeasureTableView(), createPointTableView(), createPointTreeView(), filteredNetwork(), nullify(), rebuildModels(), setTablesFrozen(), and ~CnetEditorWidget().
|
private |
Point table box.
Definition at line 192 of file CnetEditorWidget.h.
Referenced by createMainLayout(), handlePointTableFilterCountsChanged(), nullify(), and ~CnetEditorWidget().
|
private |
Point table model.
Definition at line 205 of file CnetEditorWidget.h.
Referenced by createMeasureTableView(), createPointTableView(), nullify(), pointTableModel(), pointTableSortingEnabled(), pointTableSortLimit(), setPointTableSortingEnabled(), and setPointTableSortLimit().
|
private |
Point table view.
Definition at line 189 of file CnetEditorWidget.h.
Referenced by createMainLayout(), createMeasureTableView(), createPointTableView(), nullify(), pointColToggled(), pointTableView(), readSettings(), writeSettings(), and ~CnetEditorWidget().
|
private |
Point tree view.
Definition at line 185 of file CnetEditorWidget.h.
Referenced by createMainLayout(), createMeasureTableView(), createPointTableView(), createPointTreeView(), nullify(), pointTreeView(), and ~CnetEditorWidget().
|
private |
Serial filter widget.
Definition at line 198 of file CnetEditorWidget.h.
Referenced by createFilterArea(), nullify(), serialFilterWidget(), and ~CnetEditorWidget().
|
private |
Path to read/write settings.
Definition at line 213 of file CnetEditorWidget.h.
Referenced by createMeasureTableView(), createPointTableView(), nullify(), readSettings(), writeSettings(), and ~CnetEditorWidget().
|
private |
Sorting dialog.
Definition at line 215 of file CnetEditorWidget.h.
Referenced by configSorting(), nullify(), and ~CnetEditorWidget().
QMap of tool bar actions.
Definition at line 211 of file CnetEditorWidget.h.
Referenced by createActions(), nullify(), toolBarActions(), and ~CnetEditorWidget().
|
private |
Updates selection.
Definition at line 179 of file CnetEditorWidget.h.
|
private |
Working version.
Definition at line 181 of file CnetEditorWidget.h.
Referenced by nullify(), readSettings(), upgradeVersion(), and ~CnetEditorWidget().
|
staticprivate |
Version.
Definition at line 182 of file CnetEditorWidget.h.
Referenced by upgradeVersion(), and writeSettings().