Isis Developer Reference
CnetEditorWidget.h
Go to the documentation of this file.
1 #ifndef CnetEditorWidget_H
2 #define CnetEditorWidget_H
3 
10 /* SPDX-License-Identifier: CC0-1.0 */
11 
12 
13 #include <QWidget>
14 
15 #include "XmlStackedHandler.h"
16 
17 class QAction;
18 class QBoxLayout;
19 class QGroupBox;
20 template< typename T > class QList;
21 class QMenu;
22 class QScrollArea;
23 class QSplitter;
24 class QString;
25 class QToolBar;
26 class QXmlStreamWriter;
27 class QXmlAttributes;
28 
29 namespace Isis {
30  class AbstractTableModel;
31  class AbstractTreeItem;
32  class Control;
33  class ControlNet;
34  class ControlPoint;
35  class Directory;
36  class FileName;
37  class Image;
38  class MosaicGraphicsView;
39  class MosaicSceneItem;
40  class MosaicTool;
41  class ProgressBar;
42  class Projection;
43  class Project;
44  class PvlGroup;
45  class PvlObject;
46  class ToolPad;
47  class FilterWidget;
48  class ImageImageTreeModel;
49  class ImagePointTreeModel;
50  class MeasureTableModel;
51  class PointMeasureTreeModel;
52  class PointTableModel;
53  class TableView;
54  class TreeView;
55  class CnetEditorSortConfigDialog;
56 
96  class CnetEditorWidget : public QWidget {
97  Q_OBJECT
98 
99  public:
100  enum View {
104  };
105 
106  CnetEditorWidget(Control *control, QString pathForSettings);
107  virtual ~CnetEditorWidget();
108  void readSettings();
109  void writeSettings();
110 
119  ControlNet *control();
120 
121 
124 
127 
128  ControlNet *filteredNetwork() const;
129 
130  bool measureTableSortingEnabled() const;
131  int measureTableSortLimit() const;
132  bool pointTableSortingEnabled() const;
133  int pointTableSortLimit() const;
134 
135  void setMeasureTableSortingEnabled(bool enabled);
136  void setMeasureTableSortLimit(int limit);
137  void setPointTableSortingEnabled(bool enabled);
138  void setPointTableSortLimit(int limit);
139 
140 
141  public slots:
142  void configSorting();
143  void setTablesFrozen(bool);
144  void rebuildModels();
145 
146 
147  signals:
148  void cnetModified();
149  void editControlPoint(ControlPoint *controlPoint, QString serialNumber);
150 
151  private slots:
152  void rebuildModels(QList< AbstractTreeItem * > itemsToDelete);
153 
154  void pointColToggled();
155  void measureColToggled();
156 
157  void handlePointTableFilterCountsChanged(int visibleRows, int totalRows);
158  void handleMeasureTableFilterCountsChanged(int visibleRows,
159  int totalRows);
160  void setCnetModified();
161 
162 
163  private:
164  //methods
165  void nullify();
166  QBoxLayout *createMainLayout();
167  void createActions();
168  void createPointTreeView();
169  void createSerialTreeView();
170  void createConnectionTreeView();
171  void createFilterArea();
172  void createPointTableView();
173  void createMeasureTableView();
174  void upgradeVersion();
175  void handleTableFilterCountsChanged(int visibleRows, int totalRows,
176  QGroupBox *box, QString initialText);
177 
178  // data
179  bool m_updatingSelection;
180  Control *m_control;
181  QString *m_workingVersion;
182  static const QString VERSION;
183 
184  //widgets
185  TreeView *m_pointTreeView;
186  TreeView *m_imageTreeView;
187  TreeView *m_connectionTreeView;
188 
189  TableView *m_pointTableView;
190  TableView *m_measureTableView;
191 
192  QGroupBox *m_pointTableBox;
193  QGroupBox *m_measureTableBox;
194 
195  QScrollArea *m_filterArea;
196 
197  QWidget *m_pointFilterWidget;
198  QWidget *m_serialFilterWidget;
199  QWidget *m_connectionFilterWidget;
200 
201  PointMeasureTreeModel *m_pointModel;
202  ImagePointTreeModel *m_imageModel;
203  ImageImageTreeModel *m_connectionModel;
204 
205  PointTableModel *m_pointTableModel;
206  MeasureTableModel *m_measureTableModel;
207 
208  QSplitter *m_mainSplitter;
209 
210  QMap< QAction *, QList< QString > > * m_menuActions;
211  QMap< QString, QList< QAction * > > * m_toolBarActions;
212 
213  QString *m_settingsPath;
214 
215  CnetEditorSortConfigDialog *m_sortDialog;
216 
217  };
218 }
219 
220 #endif
Isis::AbstractTreeModel::setFrozen
void setFrozen(bool)
Definition: AbstractTreeModel.cpp:331
Isis::AbstractTreeItem::Point
@ Point
Definition: AbstractTreeItem.h:46
Isis::AbstractTableModel::sortLimit
virtual int sortLimit() const
Definition: AbstractTableModel.cpp:136
FileName.h
Isis::CnetEditorWidget::~CnetEditorWidget
virtual ~CnetEditorWidget()
Destructor.
Definition: CnetEditorWidget.cpp:111
Isis::ControlMeasure::Parent
ControlPoint * Parent()
Definition: ControlMeasure.h:260
QWidget
Isis::CnetEditorWidget::pointFilterWidget
QWidget * pointFilterWidget()
Returns the point filter widget.
Definition: CnetEditorWidget.cpp:758
Isis::AbstractTreeModel::PointItems
@ PointItems
Definition: AbstractTreeModel.h:52
Isis::CnetEditorWidget::serialFilterWidget
QWidget * serialFilterWidget()
Returns the serial filter widget.
Definition: CnetEditorWidget.cpp:768
Isis::AbstractMeasureItem::getColumnName
static QString getColumnName(Column)
Definition: AbstractMeasureItem.cpp:29
Isis::ImagePointTreeModel
Tree model for images and control points.
Definition: ImagePointTreeModel.h:48
Isis::CnetEditorWidget::measureTableModel
AbstractTableModel * measureTableModel()
Returns the measure table model.
Definition: CnetEditorWidget.cpp:808
Isis::AbstractMeasureItem::Column
Column
Definition: AbstractMeasureItem.h:41
Isis::ControlPoint::GetMeasure
const ControlMeasure * GetMeasure(QString serialNumber) const
Get a control measure based on its cube's serial number.
Definition: ControlPoint.cpp:416
QList
This is free and unencumbered software released into the public domain.
Definition: BoxcarCachingAlgorithm.h:13
Isis::CnetEditorWidget::measureTableSortingEnabled
bool measureTableSortingEnabled() const
Returns true if the measure table can be sorted.
Definition: CnetEditorWidget.cpp:960
Project.h
Isis::CnetEditorWidget::connectionTreeView
QWidget * connectionTreeView()
Returns the connection tree view.
Definition: CnetEditorWidget.cpp:748
Isis::AbstractTableModel::setSortingEnabled
virtual void setSortingEnabled(bool)
Definition: AbstractTableModel.cpp:128
Isis::AbstractTreeModel::stopWorking
void stopWorking()
Definition: AbstractTreeModel.cpp:405
Isis::CnetEditorWidget::rebuildModels
void rebuildModels()
Rebuilds the models.
Definition: CnetEditorWidget.cpp:536
Isis::TableView::getHorizontalHeader
TableViewHeader * getHorizontalHeader()
Returns the horizontal header.
Definition: TableView.cpp:164
Isis::CnetDisplayProperties::getInstance
static CnetDisplayProperties * getInstance()
Definition: CnetDisplayProperties.cpp:39
Isis::ControlPoint::SetEditLock
Status SetEditLock(bool editLock)
Set the EditLock state.
Definition: ControlPoint.cpp:522
Isis::AbstractTableModel::sortingIsEnabled
virtual bool sortingIsEnabled() const
Definition: AbstractTableModel.cpp:123
QMenu
Isis::AbstractTreeItem::Measure
@ Measure
Definition: AbstractTreeItem.h:47
Isis::CnetEditorWidget::setPointTableSortingEnabled
void setPointTableSortingEnabled(bool enabled)
Sets if the point table can be sorted.
Definition: CnetEditorWidget.cpp:1020
Isis::ImageImageTreeModel
Tree model for images and images.
Definition: ImageImageTreeModel.h:48
Isis::ControlPoint::GetNumMeasures
int GetNumMeasures() const
Definition: ControlPoint.cpp:1702
CnetDisplayProperties.h
Isis::ControlMeasure::SetEditLock
Status SetEditLock(bool editLock)
Definition: ControlMeasure.cpp:281
Isis::TreeView::setModel
void setModel(AbstractTreeModel *someModel)
Definition: TreeView.cpp:62
Isis::CnetEditorWidget::control
ControlNet * control()
Returns the control network.
Definition: CnetEditorWidget.cpp:828
AbstractPointItem.h
Isis::TableView
Definition: TableView.h:43
CnetEditorWidget.h
Isis::AbstractPointItem::getColumnName
static QString getColumnName(Column)
Definition: AbstractPointItem.cpp:30
Isis::CnetEditorWidget::filteredNetwork
ControlNet * filteredNetwork() const
Returns the filtered control net.
Definition: CnetEditorWidget.cpp:860
Isis::CnetEditorWidget::setMeasureTableSortingEnabled
void setMeasureTableSortingEnabled(bool enabled)
Sets if the measure table can be sorted.
Definition: CnetEditorWidget.cpp:1000
Isis::ControlPoint::GetId
QString GetId() const
Return the Id of the control point.
Definition: ControlPoint.cpp:1306
Isis::Control
This represents an ISIS control net in a project-based GUI interface.
Definition: Control.h:66
Isis::CnetEditorSortConfigDialog
Configure user's sorting settings for the cneteditor widget.
Definition: CnetEditorSortConfigDialog.h:37
Isis::CnetEditorWidget::editControlPoint
void editControlPoint(ControlPoint *controlPoint, QString serialNumber)
CnetEditorSortConfigDialog.h
ImagePointTreeModel.h
Isis::CnetEditorWidget::readSettings
void readSettings()
Reads the working version settings stored at the settings path.
Definition: CnetEditorWidget.cpp:639
Isis::CnetEditorWidget::setTablesFrozen
void setTablesFrozen(bool)
Sets if the tables are frozen.
Definition: CnetEditorWidget.cpp:1052
Isis::AbstractTableModel
Translates the tree model into a table model.
Definition: AbstractTableModel.h:48
Isis::CnetEditorWidget::menuActions
QMap< QAction *, QList< QString > > menuActions()
Returns the menu actions.
Definition: CnetEditorWidget.cpp:838
QToolBar
Isis::CnetEditorWidget
This widget provides full editing, filtering and viewing capabilities for the raw data in a control n...
Definition: CnetEditorWidget.h:96
Isis::CnetEditorWidget::toolBarActions
QMap< QString, QList< QAction * > > toolBarActions()
Returns the tool bar actions.
Definition: CnetEditorWidget.cpp:849
PointTableModel.h
FilterWidget.h
TableView.h
Isis::ControlMeasure::GetCubeSerialNumber
QString GetCubeSerialNumber() const
Return the serial number of the cube containing the coordinate.
Definition: ControlMeasure.cpp:557
Isis::CnetEditorWidget::setMeasureTableSortLimit
void setMeasureTableSortLimit(int limit)
Sets the measure table sorting limit.
Definition: CnetEditorWidget.cpp:1010
Isis::ControlPoint
A single control point.
Definition: ControlPoint.h:354
Isis::AbstractPointItem::Column
Column
Definition: AbstractPointItem.h:44
ControlNet.h
Isis::ControlNet::GetNumPoints
int GetNumPoints() const
Return the number of control points in the network.
Definition: ControlNet.cpp:1465
ImageImageTreeModel.h
Isis::ImageImageTreeModel::rebuildItems
void rebuildItems()
Definition: ImageImageTreeModel.cpp:122
Isis::Control::controlNet
ControlNet * controlNet()
Open and return a pointer to the ControlNet for this Control.
Definition: Control.cpp:150
Isis::CnetEditorWidget::cnetModified
void cnetModified()
Isis::AbstractTreeModel::setFilter
void setFilter(FilterWidget *newFilter)
Definition: AbstractTreeModel.cpp:365
AbstractTreeItem.h
Isis::CnetEditorWidget::CnetEditorWidget
CnetEditorWidget(Control *control, QString pathForSettings)
Definition: CnetEditorWidget.cpp:77
Isis::ImagePointTreeModel::rebuildItems
void rebuildItems()
Definition: ImagePointTreeModel.cpp:128
Isis::AbstractPointItem::COLS
static const int COLS
Definition: AbstractPointItem.h:70
Isis::CnetEditorWidget::pointTableModel
AbstractTableModel * pointTableModel()
Returns the point table model.
Definition: CnetEditorWidget.cpp:818
Isis::CnetEditorWidget::measureTableView
TableView * measureTableView()
Returns the measure table view.
Definition: CnetEditorWidget.cpp:798
Isis::CnetEditorWidget::writeSettings
void writeSettings()
Writes the configuration settings used.
Definition: CnetEditorWidget.cpp:683
Isis::Control::setModified
void setModified(bool modified=true)
@description Sets the modification state of this control.
Definition: Control.cpp:241
ControlPoint.h
Isis::TableView::setColumnVisible
void setColumnVisible(QString, bool)
Sets the specified column visible or invisible.
Definition: TableView.cpp:175
Isis::ControlNet
a control network
Definition: ControlNet.h:257
Isis::CnetEditorWidget::connectionFilterWidget
QWidget * connectionFilterWidget()
Returns the connection filter widget.
Definition: CnetEditorWidget.cpp:778
TreeView.h
ASSERT
#define ASSERT(x)
Definition: IsisDebug.h:134
Isis::CnetEditorWidget::ConnectionView
@ ConnectionView
Definition: CnetEditorWidget.h:103
Isis::CnetEditorWidget::pointTableSortingEnabled
bool pointTableSortingEnabled() const
Returns true if the point table can be sorted.
Definition: CnetEditorWidget.cpp:980
Isis::CnetEditorWidget::pointTableView
TableView * pointTableView()
Returns the point table view.
Definition: CnetEditorWidget.cpp:788
Isis::CnetEditorWidget::measureTableSortLimit
int measureTableSortLimit() const
Returns the sorting limit for the measure table.
Definition: CnetEditorWidget.cpp:970
Isis::PointMeasureTreeModel::rebuildItems
void rebuildItems()
Definition: PointMeasureTreeModel.cpp:111
Isis::AbstractTreeModel::MeasureItems
@ MeasureItems
Definition: AbstractTreeModel.h:53
IException.h
Isis::CnetEditorWidget::pointTableSortLimit
int pointTableSortLimit() const
Returns the sorting limit for the point table.
Definition: CnetEditorWidget.cpp:990
Isis::CnetEditorWidget::configSorting
void configSorting()
Configures the sorting dialog.
Definition: CnetEditorWidget.cpp:1039
Isis::CnetEditorWidget::serialTreeView
QWidget * serialTreeView()
Returns the serial tree view.
Definition: CnetEditorWidget.cpp:738
Isis::ControlPoint::Delete
int Delete(ControlMeasure *measure)
Remove a measurement from the control point, deleting reference measure is allowed.
Definition: ControlPoint.cpp:354
Isis::AbstractMeasureItem::COLS
static const int COLS
Definition: AbstractMeasureItem.h:66
TableViewHeader.h
PointMeasureTreeModel.h
Isis::ControlNet::DeletePoint
int DeletePoint(ControlPoint *point)
Delete a ControlPoint from the network by the point's address.
Definition: ControlNet.cpp:879
Isis::PointTableModel
Table model for control points.
Definition: PointTableModel.h:39
QMap
This is free and unencumbered software released into the public domain.
Definition: CubeIoHandler.h:22
Control.h
Isis::TreeView
Definition: TreeView.h:31
Isis::TreeView::setTitle
void setTitle(QString someTitle)
Definition: TreeView.cpp:97
Isis::AbstractTableModel::setSortLimit
virtual void setSortLimit(int)
Definition: AbstractTableModel.cpp:141
Isis::PointMeasureTreeModel
Tree model for control points and control measures.
Definition: PointMeasureTreeModel.h:49
Isis::CnetEditorWidget::pointTreeView
QWidget * pointTreeView()
Returns the point tree view.
Definition: CnetEditorWidget.cpp:728
IsisDebug.h
QAction
XmlStackedHandlerReader.h
Isis::MeasureTableModel
Table model for control measures.
Definition: MeasureTableModel.h:42
XmlStackedHandler.h
Isis::CnetEditorWidget::setPointTableSortLimit
void setPointTableSortLimit(int limit)
Sets the point table sorting limit.
Definition: CnetEditorWidget.cpp:1030
Isis::ControlNet::GetPoint
const ControlPoint * GetPoint(QString pointId) const
Definition: ControlNet.cpp:1815
MeasureTableModel.h
Isis::AbstractTreeModel::getItems
QList< AbstractTreeItem * > getItems(int, int, InterestingItemsFlag=AllItems, bool=false)
Definition: AbstractTreeModel.cpp:121
Isis::CnetEditorWidget::View
View
Definition: CnetEditorWidget.h:100
ControlMeasure.h
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::CnetEditorWidget::PointView
@ PointView
Definition: CnetEditorWidget.h:101
AbstractMeasureItem.h
Isis::CnetEditorWidget::ImageView
@ ImageView
Definition: CnetEditorWidget.h:102
Isis::ControlMeasure
a control measurement
Definition: ControlMeasure.h:175