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
17class QAction;
18class QBoxLayout;
19class QGroupBox;
20template< typename T > class QList;
21class QMenu;
22class QScrollArea;
23class QSplitter;
24class QString;
25class QToolBar;
26class QXmlStreamWriter;
27class QXmlAttributes;
28
29namespace 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
120
121
124
125 QMap< QAction *, QList< QString > > menuActions();
126 QMap< QString, QList< QAction * > > toolBarActions();
127
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();
171 void createFilterArea();
174 void upgradeVersion();
175 void handleTableFilterCountsChanged(int visibleRows, int totalRows,
176 QGroupBox *box, QString initialText);
177
178 // data
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
210 QMap< QAction *, QList< QString > > * m_menuActions;
211 QMap< QString, QList< QAction * > > * m_toolBarActions;
212
213 QString *m_settingsPath;
214
216
217 };
218}
219
220#endif
Translates the tree model into a table model.
Configure user's sorting settings for the cneteditor widget.
This widget provides full editing, filtering and viewing capabilities for the raw data in a control n...
void createSerialTreeView()
Creates the serial tree and adds it to the model.
Control * m_control
Control for this widget.
virtual ~CnetEditorWidget()
Destructor.
QWidget * m_connectionFilterWidget
Connection filter widget.
int pointTableSortLimit() const
Returns the sorting limit for the point table.
void setPointTableSortLimit(int limit)
Sets the point table sorting limit.
TreeView * m_connectionTreeView
Connection tree view.
static const QString VERSION
Version.
void setCnetModified()
Connected to cnetModified().
void createMeasureTableView()
Creates the measure table and adds it to the widget.
QString * m_settingsPath
Path to read/write settings.
TreeView * m_imageTreeView
Image tree view.
QWidget * serialFilterWidget()
Returns the serial filter widget.
QGroupBox * m_pointTableBox
Point table box.
AbstractTableModel * measureTableModel()
Returns the measure table model.
void setMeasureTableSortLimit(int limit)
Sets the measure table sorting limit.
bool m_updatingSelection
Updates selection.
void rebuildModels()
Rebuilds the models.
QMap< QString, QList< QAction * > > toolBarActions()
Returns the tool bar actions.
ControlNet * control()
Returns the control network.
QWidget * connectionTreeView()
Returns the connection tree view.
void createConnectionTreeView()
Creates the connection tree and adds it to the model.
void pointColToggled()
Toggles the point column.
void handleMeasureTableFilterCountsChanged(int visibleRows, int totalRows)
Handles measure table filter changes.
AbstractTableModel * pointTableModel()
Returns the point table model.
ControlNet * filteredNetwork() const
Returns the filtered control net.
QWidget * connectionFilterWidget()
Returns the connection filter widget.
void writeSettings()
Writes the configuration settings used.
void setTablesFrozen(bool)
Sets if the tables are frozen.
void readSettings()
Reads the working version settings stored at the settings path.
PointTableModel * m_pointTableModel
Point table model.
void createPointTableView()
Creates the point table and adds it to the widget.
QGroupBox * m_measureTableBox
Measure table box.
void createPointTreeView()
Creates the point tree view and adds it to the model.
QSplitter * m_mainSplitter
Splitter.
void handlePointTableFilterCountsChanged(int visibleRows, int totalRows)
Handles point table filter changes.
MeasureTableModel * m_measureTableModel
Measure table model.
void handleTableFilterCountsChanged(int visibleRows, int totalRows, QGroupBox *box, QString initialText)
Handles any table filter changes.
void upgradeVersion()
Upgrades the working version number.
int measureTableSortLimit() const
Returns the sorting limit for the measure table.
QScrollArea * m_filterArea
Scroll area for filters.
void setPointTableSortingEnabled(bool enabled)
Sets if the point table can be sorted.
CnetEditorSortConfigDialog * m_sortDialog
Sorting dialog.
QWidget * m_pointFilterWidget
Point filter widget.
TableView * pointTableView()
Returns the point table view.
void nullify()
Sets all member variables to NULL.
QBoxLayout * createMainLayout()
Creates the layout of the widget.
void createFilterArea()
Creates filter widgets.
QMap< QAction *, QList< QString > > * m_menuActions
QMap of menu actions.
void createActions()
Creates the menus, and options for the widget.
QMap< QAction *, QList< QString > > menuActions()
Returns the menu actions.
TableView * measureTableView()
Returns the measure table view.
TreeView * m_pointTreeView
Point tree view.
void setMeasureTableSortingEnabled(bool enabled)
Sets if the measure table can be sorted.
QWidget * serialTreeView()
Returns the serial tree view.
TableView * m_pointTableView
Point table view.
QWidget * pointTreeView()
Returns the point tree view.
QWidget * m_serialFilterWidget
Serial filter widget.
QString * m_workingVersion
Working version.
bool measureTableSortingEnabled() const
Returns true if the measure table can be sorted.
void configSorting()
Configures the sorting dialog.
ImageImageTreeModel * m_connectionModel
Connection tree model.
bool pointTableSortingEnabled() const
Returns true if the point table can be sorted.
void measureColToggled()
Toggles the measure column.
TableView * m_measureTableView
Measure table view.
QWidget * pointFilterWidget()
Returns the point filter widget.
PointMeasureTreeModel * m_pointModel
Point tree model.
ImagePointTreeModel * m_imageModel
Image tree model.
QMap< QString, QList< QAction * > > * m_toolBarActions
QMap of tool bar actions.
This represents an ISIS control net in a project-based GUI interface.
Definition Control.h:66
a control network
Definition ControlNet.h:258
A single control point.
Tree model for images and images.
Tree model for images and control points.
Table model for control measures.
Tree model for control points and control measures.
Table model for control points.
This is free and unencumbered software released into the public domain.
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16