Isis 3 Programmer Reference
CnetEditorWidget.h
1 #ifndef CnetEditorWidget_H
2 #define CnetEditorWidget_H
3 
4 
5 #include <QWidget>
6 
7 #include "XmlStackedHandler.h"
8 
9 class QAction;
10 class QBoxLayout;
11 class QGroupBox;
12 template< typename T > class QList;
13 class QMenu;
14 class QScrollArea;
15 class QSplitter;
16 class QString;
17 class QToolBar;
18 class QXmlStreamWriter;
19 class QXmlAttributes;
20 
21 namespace Isis {
22  class AbstractTableModel;
23  class AbstractTreeItem;
24  class Control;
25  class ControlNet;
26  class ControlPoint;
27  class Directory;
28  class FileName;
29  class Image;
30  class MosaicGraphicsView;
31  class MosaicSceneItem;
32  class MosaicTool;
33  class ProgressBar;
34  class Projection;
35  class Project;
36  class PvlGroup;
37  class PvlObject;
38  class ToolPad;
39  class FilterWidget;
40  class ImageImageTreeModel;
41  class ImagePointTreeModel;
42  class MeasureTableModel;
43  class PointMeasureTreeModel;
44  class PointTableModel;
45  class TableView;
46  class TreeView;
47  class CnetEditorSortConfigDialog;
48 
88  class CnetEditorWidget : public QWidget {
89  Q_OBJECT
90 
91  public:
92  enum View {
93  PointView,
94  ImageView,
95  ConnectionView
96  };
97 
98  CnetEditorWidget(Control *control, QString pathForSettings);
99  virtual ~CnetEditorWidget();
100  void readSettings();
101  void writeSettings();
102 
111  ControlNet *control();
112 
113 
116 
119 
120  ControlNet *filteredNetwork() const;
121 
122  bool measureTableSortingEnabled() const;
123  int measureTableSortLimit() const;
124  bool pointTableSortingEnabled() const;
125  int pointTableSortLimit() const;
126 
127  void setMeasureTableSortingEnabled(bool enabled);
128  void setMeasureTableSortLimit(int limit);
129  void setPointTableSortingEnabled(bool enabled);
130  void setPointTableSortLimit(int limit);
131 
132 
133  public slots:
134  void configSorting();
135  void setTablesFrozen(bool);
136  void rebuildModels();
137 
138 
139  signals:
140  void cnetModified();
141  void editControlPoint(ControlPoint *controlPoint, QString serialNumber);
142 
143  private slots:
144  void rebuildModels(QList< AbstractTreeItem * > itemsToDelete);
145 
146  void pointColToggled();
147  void measureColToggled();
148 
149  void handlePointTableFilterCountsChanged(int visibleRows, int totalRows);
150  void handleMeasureTableFilterCountsChanged(int visibleRows,
151  int totalRows);
152  void setCnetModified();
153 
154 
155  private:
156  //methods
157  void nullify();
158  QBoxLayout *createMainLayout();
159  void createActions();
160  void createPointTreeView();
161  void createSerialTreeView();
163  void createFilterArea();
164  void createPointTableView();
165  void createMeasureTableView();
166  void upgradeVersion();
167  void handleTableFilterCountsChanged(int visibleRows, int totalRows,
168  QGroupBox *box, QString initialText);
169 
170  // data
173  QString *m_workingVersion;
174  static const QString VERSION;
175 
176  //widgets
180 
183 
184  QGroupBox *m_pointTableBox;
185  QGroupBox *m_measureTableBox;
186 
187  QScrollArea *m_filterArea;
188 
192 
196 
199 
200  QSplitter *m_mainSplitter;
201 
204 
205  QString *m_settingsPath;
206 
208 
209  };
210 }
211 
212 #endif
This represents an ISIS control net in a project-based GUI interface.
Definition: Control.h:79
void setTablesFrozen(bool)
Sets if the tables are frozen.
int pointTableSortLimit() const
Returns the sorting limit for the point table.
void configSorting()
Configures the sorting dialog.
QWidget * m_pointFilterWidget
Point filter widget.
bool pointTableSortingEnabled() const
Returns true if the point table can be sorted.
int measureTableSortLimit() const
Returns the sorting limit for the measure table.
TreeView * m_connectionTreeView
Connection tree view.
void setMeasureTableSortLimit(int limit)
Sets the measure table sorting limit.
void measureColToggled()
Toggles the measure column.
void nullify()
Sets all member variables to NULL.
void handlePointTableFilterCountsChanged(int visibleRows, int totalRows)
Handles point table filter changes.
void createConnectionTreeView()
Creates the connection tree and adds it to the model.
Control * m_control
Control for this widget.
Configure user&#39;s sorting settings for the cneteditor widget.
void createSerialTreeView()
Creates the serial tree and adds it to the model.
QMap< QString, QList< QAction *> > toolBarActions()
Returns the tool bar actions.
TableView * m_pointTableView
Point table view.
void setPointTableSortLimit(int limit)
Sets the point table sorting limit.
TableView * m_measureTableView
Measure table view.
Tree model for control points and control measures.
Tree model for images and control points.
QWidget * pointTreeView()
Returns the point tree view.
TreeView * m_imageTreeView
Image tree view.
QString * m_workingVersion
Working version.
virtual ~CnetEditorWidget()
Destructor.
TreeView * m_pointTreeView
Point tree view.
static const QString VERSION
Version.
bool m_updatingSelection
Updates selection.
ImagePointTreeModel * m_imageModel
Image tree model.
void handleMeasureTableFilterCountsChanged(int visibleRows, int totalRows)
Handles measure table filter changes.
void writeSettings()
Writes the configuration settings used.
PointTableModel * m_pointTableModel
Point table model.
QWidget * connectionFilterWidget()
Returns the connection filter widget.
AbstractTableModel * measureTableModel()
Returns the measure table model.
ImageImageTreeModel * m_connectionModel
Connection tree model.
void rebuildModels()
Rebuilds the models.
QGroupBox * m_measureTableBox
Measure table box.
QString * m_settingsPath
Path to read/write settings.
TableView * pointTableView()
Returns the point table view.
MeasureTableModel * m_measureTableModel
Measure table model.
a control network
Definition: ControlNet.h:271
void setPointTableSortingEnabled(bool enabled)
Sets if the point table can be sorted.
void upgradeVersion()
Upgrades the working version number.
Translates the tree model into a table model.
QWidget * serialTreeView()
Returns the serial tree view.
CnetEditorSortConfigDialog * m_sortDialog
Sorting dialog.
Tree model for images and images.
void pointColToggled()
Toggles the point column.
QMap< QString, QList< QAction *> > * m_toolBarActions
QMap of tool bar actions.
void createFilterArea()
Creates filter widgets.
A single control point.
Definition: ControlPoint.h:369
ControlNet * filteredNetwork() const
Returns the filtered control net.
void setMeasureTableSortingEnabled(bool enabled)
Sets if the measure table can be sorted.
QWidget * pointFilterWidget()
Returns the point filter widget.
QWidget * m_serialFilterWidget
Serial filter widget.
void createMeasureTableView()
Creates the measure table and adds it to the widget.
QMap< QAction *, QList< QString > > menuActions()
Returns the menu actions.
void createPointTreeView()
Creates the point tree view and adds it to the model.
void createPointTableView()
Creates the point table and adds it to the widget.
QWidget * m_connectionFilterWidget
Connection filter widget.
QGroupBox * m_pointTableBox
Point table box.
void createActions()
Creates the menus, and options for the widget.
QWidget * connectionTreeView()
Returns the connection tree view.
void setCnetModified()
Connected to cnetModified().
void handleTableFilterCountsChanged(int visibleRows, int totalRows, QGroupBox *box, QString initialText)
Handles any table filter changes.
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
QSplitter * m_mainSplitter
Splitter.
QWidget * serialFilterWidget()
Returns the serial filter widget.
bool measureTableSortingEnabled() const
Returns true if the measure table can be sorted.
AbstractTableModel * pointTableModel()
Returns the point table model.
Table model for control measures.
QScrollArea * m_filterArea
Scroll area for filters.
ControlNet * control()
Returns the control network.
QMap< QAction *, QList< QString > > * m_menuActions
QMap of menu actions.
QBoxLayout * createMainLayout()
Creates the layout of the widget.
PointMeasureTreeModel * m_pointModel
Point tree model.
This widget provides full editing, filtering and viewing capabilities for the raw data in a control n...
TableView * measureTableView()
Returns the measure table view.
Table model for control points.
void readSettings()
Reads the working version settings stored at the settings path.