Isis 3 Developer Reference
CnetEditorWidget.h
Go to the documentation of this file.
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 {
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();
162  void createConnectionTreeView();
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
171  bool m_updatingSelection;
172  Control *m_control;
173  QString *m_workingVersion;
174  static const QString VERSION;
175 
176  //widgets
177  TreeView *m_pointTreeView;
178  TreeView *m_imageTreeView;
179  TreeView *m_connectionTreeView;
180 
181  TableView *m_pointTableView;
182  TableView *m_measureTableView;
183 
184  QGroupBox *m_pointTableBox;
185  QGroupBox *m_measureTableBox;
186 
187  QScrollArea *m_filterArea;
188 
189  QWidget *m_pointFilterWidget;
190  QWidget *m_serialFilterWidget;
191  QWidget *m_connectionFilterWidget;
192 
193  PointMeasureTreeModel *m_pointModel;
194  ImagePointTreeModel *m_imageModel;
195  ImageImageTreeModel *m_connectionModel;
196 
197  PointTableModel *m_pointTableModel;
198  MeasureTableModel *m_measureTableModel;
199 
200  QSplitter *m_mainSplitter;
201 
202  QMap< QAction *, QList< QString > > * m_menuActions;
203  QMap< QString, QList< QAction * > > * m_toolBarActions;
204 
205  QString *m_settingsPath;
206 
207  CnetEditorSortConfigDialog *m_sortDialog;
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.
Definition: CnetEditorWidget.cpp:1042
int pointTableSortLimit() const
Returns the sorting limit for the point table.
Definition: CnetEditorWidget.cpp:980
void configSorting()
Configures the sorting dialog.
Definition: CnetEditorWidget.cpp:1029
bool pointTableSortingEnabled() const
Returns true if the point table can be sorted.
Definition: CnetEditorWidget.cpp:970
int measureTableSortLimit() const
Returns the sorting limit for the measure table.
Definition: CnetEditorWidget.cpp:960
void setMeasureTableSortLimit(int limit)
Sets the measure table sorting limit.
Definition: CnetEditorWidget.cpp:1000
Configure user&#39;s sorting settings for the cneteditor widget.
Definition: CnetEditorSortConfigDialog.h:29
QMap< QString, QList< QAction *> > toolBarActions()
Returns the tool bar actions.
Definition: CnetEditorWidget.cpp:839
void setPointTableSortLimit(int limit)
Sets the point table sorting limit.
Definition: CnetEditorWidget.cpp:1020
Tree model for control points and control measures.
Definition: PointMeasureTreeModel.h:42
Tree model for images and control points.
Definition: ImagePointTreeModel.h:40
QWidget * pointTreeView()
Returns the point tree view.
Definition: CnetEditorWidget.cpp:718
virtual ~CnetEditorWidget()
Destructor.
Definition: CnetEditorWidget.cpp:103
Definition: CnetEditorWidget.h:94
void writeSettings()
Writes the configuration settings used.
Definition: CnetEditorWidget.cpp:673
QWidget * connectionFilterWidget()
Returns the connection filter widget.
Definition: CnetEditorWidget.cpp:768
AbstractTableModel * measureTableModel()
Returns the measure table model.
Definition: CnetEditorWidget.cpp:798
void rebuildModels()
Rebuilds the models.
Definition: CnetEditorWidget.cpp:526
TableView * pointTableView()
Returns the point table view.
Definition: CnetEditorWidget.cpp:778
a control network
Definition: ControlNet.h:271
void setPointTableSortingEnabled(bool enabled)
Sets if the point table can be sorted.
Definition: CnetEditorWidget.cpp:1010
Definition: TreeView.h:23
Definition: CnetEditorWidget.h:93
Translates the tree model into a table model.
Definition: AbstractTableModel.h:40
Definition: CnetEditorWidget.h:95
QWidget * serialTreeView()
Returns the serial tree view.
Definition: CnetEditorWidget.cpp:728
Tree model for images and images.
Definition: ImageImageTreeModel.h:41
A single control point.
Definition: ControlPoint.h:369
Definition: TableView.h:35
ControlNet * filteredNetwork() const
Returns the filtered control net.
Definition: CnetEditorWidget.cpp:850
void setMeasureTableSortingEnabled(bool enabled)
Sets if the measure table can be sorted.
Definition: CnetEditorWidget.cpp:990
View
Definition: CnetEditorWidget.h:92
QWidget * pointFilterWidget()
Returns the point filter widget.
Definition: CnetEditorWidget.cpp:748
QMap< QAction *, QList< QString > > menuActions()
Returns the menu actions.
Definition: CnetEditorWidget.cpp:828
QWidget * connectionTreeView()
Returns the connection tree view.
Definition: CnetEditorWidget.cpp:738
Definition: BoxcarCachingAlgorithm.h:29
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
QWidget * serialFilterWidget()
Returns the serial filter widget.
Definition: CnetEditorWidget.cpp:758
bool measureTableSortingEnabled() const
Returns true if the measure table can be sorted.
Definition: CnetEditorWidget.cpp:950
AbstractTableModel * pointTableModel()
Returns the point table model.
Definition: CnetEditorWidget.cpp:808
Table model for control measures.
Definition: MeasureTableModel.h:35
ControlNet * control()
Returns the control network.
Definition: CnetEditorWidget.cpp:818
CnetEditorWidget(Control *control, QString pathForSettings)
Definition: CnetEditorWidget.cpp:69
Definition: CubeIoHandler.h:38
This widget provides full editing, filtering and viewing capabilities for the raw data in a control n...
Definition: CnetEditorWidget.h:88
void editControlPoint(ControlPoint *controlPoint, QString serialNumber)
TableView * measureTableView()
Returns the measure table view.
Definition: CnetEditorWidget.cpp:788
Table model for control points.
Definition: PointTableModel.h:32
void readSettings()
Reads the working version settings stored at the settings path.
Definition: CnetEditorWidget.cpp:629