Isis 3 Programmer Reference
CnetEditorWidget.h
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 {
101  PointView,
102  ImageView,
103  ConnectionView
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();
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
181  QString *m_workingVersion;
182  static const QString VERSION;
183 
184  //widgets
188 
191 
192  QGroupBox *m_pointTableBox;
193  QGroupBox *m_measureTableBox;
194 
195  QScrollArea *m_filterArea;
196 
200 
204 
207 
208  QSplitter *m_mainSplitter;
209 
212 
213  QString *m_settingsPath;
214 
216 
217  };
218 }
219 
220 #endif
Isis::CnetEditorWidget::m_updatingSelection
bool m_updatingSelection
Updates selection.
Definition: CnetEditorWidget.h:179
Isis::CnetEditorWidget::~CnetEditorWidget
virtual ~CnetEditorWidget()
Destructor.
Definition: CnetEditorWidget.cpp:111
Isis::CnetEditorWidget::createMeasureTableView
void createMeasureTableView()
Creates the measure table and adds it to the widget.
Definition: CnetEditorWidget.cpp:483
Isis::CnetEditorWidget::m_pointTreeView
TreeView * m_pointTreeView
Point tree view.
Definition: CnetEditorWidget.h:185
QWidget
Isis::CnetEditorWidget::m_serialFilterWidget
QWidget * m_serialFilterWidget
Serial filter widget.
Definition: CnetEditorWidget.h:198
Isis::CnetEditorWidget::pointFilterWidget
QWidget * pointFilterWidget()
Returns the point filter widget.
Definition: CnetEditorWidget.cpp:758
Isis::CnetEditorWidget::serialFilterWidget
QWidget * serialFilterWidget()
Returns the serial filter widget.
Definition: CnetEditorWidget.cpp:768
Isis::CnetEditorWidget::m_connectionFilterWidget
QWidget * m_connectionFilterWidget
Connection filter widget.
Definition: CnetEditorWidget.h:199
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
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
Isis::CnetEditorWidget::setCnetModified
void setCnetModified()
Connected to cnetModified().
Definition: CnetEditorWidget.cpp:1069
Isis::CnetEditorWidget::connectionTreeView
QWidget * connectionTreeView()
Returns the connection tree view.
Definition: CnetEditorWidget.cpp:748
Isis::CnetEditorWidget::rebuildModels
void rebuildModels()
Rebuilds the models.
Definition: CnetEditorWidget.cpp:536
Isis::CnetEditorWidget::m_mainSplitter
QSplitter * m_mainSplitter
Splitter.
Definition: CnetEditorWidget.h:208
Isis::CnetEditorWidget::m_measureTableBox
QGroupBox * m_measureTableBox
Measure table box.
Definition: CnetEditorWidget.h:193
QMenu
Isis::CnetEditorWidget::m_pointModel
PointMeasureTreeModel * m_pointModel
Point tree model.
Definition: CnetEditorWidget.h:201
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::CnetEditorWidget::createFilterArea
void createFilterArea()
Creates filter widgets.
Definition: CnetEditorWidget.cpp:389
Isis::CnetEditorWidget::control
ControlNet * control()
Returns the control network.
Definition: CnetEditorWidget.cpp:828
Isis::TableView
Definition: TableView.h:43
Isis::CnetEditorWidget::m_menuActions
QMap< QAction *, QList< QString > > * m_menuActions
QMap of menu actions.
Definition: CnetEditorWidget.h:210
Isis::CnetEditorWidget::m_sortDialog
CnetEditorSortConfigDialog * m_sortDialog
Sorting dialog.
Definition: CnetEditorWidget.h:215
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::CnetEditorWidget::m_toolBarActions
QMap< QString, QList< QAction * > > * m_toolBarActions
QMap of tool bar actions.
Definition: CnetEditorWidget.h:211
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::readSettings
void readSettings()
Reads the working version settings stored at the settings path.
Definition: CnetEditorWidget.cpp:639
Isis::CnetEditorWidget::m_connectionTreeView
TreeView * m_connectionTreeView
Connection tree view.
Definition: CnetEditorWidget.h:187
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::m_pointFilterWidget
QWidget * m_pointFilterWidget
Point filter widget.
Definition: CnetEditorWidget.h:197
Isis::CnetEditorWidget::toolBarActions
QMap< QString, QList< QAction * > > toolBarActions()
Returns the tool bar actions.
Definition: CnetEditorWidget.cpp:849
Isis::CnetEditorWidget::createActions
void createActions()
Creates the menus, and options for the widget.
Definition: CnetEditorWidget.cpp:307
Isis::CnetEditorWidget::createPointTreeView
void createPointTreeView()
Creates the point tree view and adds it to the model.
Definition: CnetEditorWidget.cpp:356
Isis::CnetEditorWidget::setMeasureTableSortLimit
void setMeasureTableSortLimit(int limit)
Sets the measure table sorting limit.
Definition: CnetEditorWidget.cpp:1010
Isis::CnetEditorWidget::createPointTableView
void createPointTableView()
Creates the point table and adds it to the widget.
Definition: CnetEditorWidget.cpp:441
Isis::ControlPoint
A single control point.
Definition: ControlPoint.h:354
Isis::CnetEditorWidget::nullify
void nullify()
Sets all member variables to NULL.
Definition: CnetEditorWidget.cpp:174
Isis::CnetEditorWidget::m_pointTableBox
QGroupBox * m_pointTableBox
Point table box.
Definition: CnetEditorWidget.h:192
Isis::CnetEditorWidget::createConnectionTreeView
void createConnectionTreeView()
Creates the connection tree and adds it to the model.
Definition: CnetEditorWidget.cpp:378
Isis::CnetEditorWidget::handleTableFilterCountsChanged
void handleTableFilterCountsChanged(int visibleRows, int totalRows, QGroupBox *box, QString initialText)
Handles any table filter changes.
Definition: CnetEditorWidget.cpp:607
Isis::CnetEditorWidget::m_imageTreeView
TreeView * m_imageTreeView
Image tree view.
Definition: CnetEditorWidget.h:186
Isis::CnetEditorWidget::m_measureTableView
TableView * m_measureTableView
Measure table view.
Definition: CnetEditorWidget.h:190
Isis::CnetEditorWidget::createMainLayout
QBoxLayout * createMainLayout()
Creates the layout of the widget.
Definition: CnetEditorWidget.cpp:259
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::m_filterArea
QScrollArea * m_filterArea
Scroll area for filters.
Definition: CnetEditorWidget.h:195
Isis::CnetEditorWidget::m_pointTableModel
PointTableModel * m_pointTableModel
Point table model.
Definition: CnetEditorWidget.h:205
Isis::CnetEditorWidget::writeSettings
void writeSettings()
Writes the configuration settings used.
Definition: CnetEditorWidget.cpp:683
Isis::ControlNet
a control network
Definition: ControlNet.h:257
Isis::CnetEditorWidget::m_workingVersion
QString * m_workingVersion
Working version.
Definition: CnetEditorWidget.h:181
Isis::CnetEditorWidget::connectionFilterWidget
QWidget * connectionFilterWidget()
Returns the connection filter widget.
Definition: CnetEditorWidget.cpp:778
Isis::CnetEditorWidget::VERSION
static const QString VERSION
Version.
Definition: CnetEditorWidget.h:182
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::CnetEditorWidget::m_connectionModel
ImageImageTreeModel * m_connectionModel
Connection tree model.
Definition: CnetEditorWidget.h:203
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::upgradeVersion
void upgradeVersion()
Upgrades the working version number.
Definition: CnetEditorWidget.cpp:626
Isis::CnetEditorWidget::serialTreeView
QWidget * serialTreeView()
Returns the serial tree view.
Definition: CnetEditorWidget.cpp:738
Isis::CnetEditorWidget::handlePointTableFilterCountsChanged
void handlePointTableFilterCountsChanged(int visibleRows, int totalRows)
Handles point table filter changes.
Definition: CnetEditorWidget.cpp:576
Isis::CnetEditorWidget::m_control
Control * m_control
Control for this widget.
Definition: CnetEditorWidget.h:180
Isis::CnetEditorWidget::m_settingsPath
QString * m_settingsPath
Path to read/write settings.
Definition: CnetEditorWidget.h:213
Isis::CnetEditorWidget::m_measureTableModel
MeasureTableModel * m_measureTableModel
Measure table model.
Definition: CnetEditorWidget.h:206
Isis::PointTableModel
Table model for control points.
Definition: PointTableModel.h:39
Isis::CnetEditorWidget::m_pointTableView
TableView * m_pointTableView
Point table view.
Definition: CnetEditorWidget.h:189
QMap
This is free and unencumbered software released into the public domain.
Definition: CubeIoHandler.h:22
Isis::CnetEditorWidget::measureColToggled
void measureColToggled()
Toggles the measure column.
Definition: CnetEditorWidget.cpp:558
Isis::TreeView
Definition: TreeView.h:31
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
QAction
Isis::CnetEditorWidget::pointColToggled
void pointColToggled()
Toggles the point column.
Definition: CnetEditorWidget.cpp:544
Isis::MeasureTableModel
Table model for control measures.
Definition: MeasureTableModel.h:42
Isis::CnetEditorWidget::createSerialTreeView
void createSerialTreeView()
Creates the serial tree and adds it to the model.
Definition: CnetEditorWidget.cpp:367
Isis::CnetEditorWidget::setPointTableSortLimit
void setPointTableSortLimit(int limit)
Sets the point table sorting limit.
Definition: CnetEditorWidget.cpp:1030
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::CnetEditorWidget::m_imageModel
ImagePointTreeModel * m_imageModel
Image tree model.
Definition: CnetEditorWidget.h:202
Isis::CnetEditorWidget::handleMeasureTableFilterCountsChanged
void handleMeasureTableFilterCountsChanged(int visibleRows, int totalRows)
Handles measure table filter changes.
Definition: CnetEditorWidget.cpp:592