Isis Developer Reference
ControlPointEditWidget.h
Go to the documentation of this file.
1#ifndef ControlPointEditWidget_h
2#define ControlPointEditWidget_h
3
10/* SPDX-License-Identifier: CC0-1.0 */
11
12
13#include "ControlPoint.h"
14#include "FileName.h"
15#include "SpecialPixel.h"
16#include "TemplateList.h"
17
18#include <QCloseEvent>
19#include <QDir>
20#include <QHideEvent>
21#include <QPalette>
22#include <QPointer>
23#include <QStatusBar>
24#include <QString>
25#include <QStringList>
26#include <QWidget>
27
28class QAction;
29class QBoxLayout;
30class QCheckBox;
31class QComboBox;
32class QGroupBox;
33class QLabel;
34class QMainWindow;
35class QObject;
36class QPainter;
37class QPoint;
38class QPushButton;
39class QSplitter;
40class QStackedWidget;
42class QString;
43class QTableWidget;
44class QTextEdit;
45class QWidget;
46
47namespace Isis {
48 class Control;
49 class ControlMeasureEditWidget;
50 class ControlMeasure;
51 class ControlNet;
52 class Cube;
53 class CubeViewport;
54 class Directory;
55 class MdiCubeViewport;
56 class SerialNumberList;
57 class Stretch;
58 class ToolPad;
59 class UniversalGroundMap;
60
122 Q_OBJECT
123
124 public:
125 ControlPointEditWidget(Directory *directory, QWidget *parent, bool addMeasures = false);
126 virtual ~ControlPointEditWidget();
127
128 QString editPointId();
130
131 signals:
132 void controlPointChanged(QString pointId);
133 void controlPointAdded(QString pointId);
141 // temporary signal for quick & dirty autosave in Ipce
143
144 public slots:
146 void setControl(Control *control);
148 void setEditPoint(ControlPoint *controlPoint, QString serialNumber = "");
149 void deletePoint(ControlPoint *controlPoint);
150
151 void createControlPoint(double latitude, double longitude, Cube *cube = 0,
152 bool isGroundSource = false);
153
154 // Changed colorizeSaveNetButton to public slot so it could be called from
155 // Directory::saveActiveControl(). This should be temporary until the modify/save functionality
156 // of active control is re-factored. Also added reset parameter, defaulting to false so button
157 // is red. This default was used so that current calls did not need to be changed.
158 void colorizeSaveNetButton(bool reset = false);
159
160 void addTemplates(TemplateList *templateList);
161
162 protected:
163 bool eventFilter(QObject *o,QEvent *e);
164
165 private slots:
166// void enterWhatsThisMode();
167 void reloadPoint();
168 void saveNet();
169// void addMeasure();
170 void setPointType (int pointType);
171 void setLockPoint (bool ignore);
172 void setIgnorePoint (bool ignore);
173 void setLockLeftMeasure (bool ignore);
174 void setIgnoreLeftMeasure (bool ignore);
175 void setLockRightMeasure (bool ignore);
176 void setIgnoreRightMeasure (bool ignore);
177
178 void selectLeftMeasure (int index);
179 void selectRightMeasure (int index);
180 void nextRightMeasure();
181 void previousRightMeasure();
182 void updateLeftMeasureInfo ();
183 void updateRightMeasureInfo ();
184
185 void measureSaved();
186 void checkReference();
187
188 void updateGroundPosition();
189 void updateSurfacePointInfo ();
190 void openReferenceRadius();
191 void groundSourceFileSelectionChanged(int index);
192
193 void savePoint();
194
195 void colorizeAllSaveButtons(QString color);
196 void colorizeSavePointButton();
197
198 void openTemplateFile();
199 void viewTemplateFile();
200 void saveChips();
201 void showHideTemplateEditor();
202 void saveTemplateFile();
203 void saveTemplateFileAs();
204 void setTemplateFile(QString);
205 void setTemplateModified();
206 void writeTemplateFile(QString);
207 void resetTemplateComboBox(QString fileName);
208 void clearEditPoint();
209
210 private:
211 void createActions();
212
213 void loadPoint(QString serialNumber = "");
214 void loadGroundMeasure();
215 void createPointEditor(QWidget *parent, bool addMeasures);
216 QSplitter * createTopSplitter();
217 QGroupBox * createControlPointGroupBox();
218 QGroupBox * createLeftMeasureGroupBox();
219 QGroupBox * createRightMeasureGroupBox();
220 void createTemplateEditorWidget();
221 void loadTemplateFile(QString);
222 bool okToContinue();
223 bool IsMeasureLocked(QString serialNumber);
224 bool validateMeasureChange(ControlMeasure *m);
225
226 void setShapesForPoint(double latitude=Null, double longitude=Null);
227 ControlMeasure *createTemporaryGroundMeasure();
228 bool setGroundSourceInfo();
229 FileName checkGroundFileLocation(FileName groundFile);
230 void changeGroundLocationsInNet();
231 void clearGroundSource();
232
233 void initDem(QString demFile);
234 double demRadius(double latitude, double longitude);
235
236 private:
237
238 QPointer<QWidget> m_parent;
239 Directory *m_directory;
240 bool m_addMeasuresButton;
241
242 QString m_cnetFileName;
243 QPointer<QLabel> m_cnetFileNameLabel;
244 bool m_cnetModified;
245
246 QPointer<QAction> m_closePointEditor;
247
248 QPointer<QAction> m_saveChips;
250 QPointer<QAction> m_showHideTemplateEditor;
251 QPointer<QAction> m_openTemplateFile;
252 QPointer<QAction> m_saveTemplateFile;
253 QPointer<QAction> m_saveTemplateFileAs;
254
255
257 QPointer<ControlMeasureEditWidget> m_measureEditor;
258
259 QPointer<QPushButton> m_reloadPoint;
260 QPointer<QPushButton> m_savePoint;
261 QPalette m_saveDefaultPalette;
262
263 QPointer<QPushButton> m_saveNet;
264
265 QPointer<QTextEdit> m_templateEditor;
266 QPointer<QWidget> m_templateEditorWidget;
267 bool m_templateModified;
268
269 QPointer<QComboBox> m_templateComboBox;
270 QPointer<QComboBox> m_groundSourceCombo;
271 QPointer<QComboBox> m_radiusSourceCombo;
272 QPointer<QLabel> m_ptIdValue;
273 QPointer<QComboBox> m_pointTypeCombo;
274 QPointer<QLabel> m_numMeasures;
275 QPointer<QLabel> m_aprioriLatitude;
276 QPointer<QLabel> m_aprioriLongitude;
277 QPointer<QLabel> m_aprioriRadius;
278
279 QPointer<QCheckBox> m_lockPoint;
280 QPointer<QCheckBox> m_ignorePoint;
281 QPointer<QLabel> m_leftReference;
282 QPointer<QLabel> m_leftMeasureType;
283 QPointer<QLabel> m_rightReference;
284 QPointer<QLabel> m_rightMeasureType;
285 QPointer<QCheckBox> m_lockLeftMeasure;
286 QPointer<QCheckBox> m_ignoreLeftMeasure;
287 QPointer<QCheckBox> m_lockRightMeasure;
288 QPointer<QCheckBox> m_ignoreRightMeasure;
289
290 QPointer<QComboBox> m_leftCombo;
291 QPointer<QComboBox> m_rightCombo;
292 QPointer<QStandardItemModel> m_model;
293
294 QPointer<QMainWindow> m_measureWindow;
295 QPointer<QTableWidget> m_measureTable;
296
297 QPointer<ControlPoint> m_editPoint;
298 SerialNumberList *m_serialNumberList;
299 QPointer<ControlNet> m_controlNet;
300 QPointer<Control> m_control;
301
302 QPointer<ControlPoint> m_newPoint;
303 QString m_lastUsedPointId;
304
305 QStringList m_pointFiles;
306
307 QString m_leftFile;
308 QPointer<ControlMeasure> m_leftMeasure;
309 QPointer<ControlMeasure> m_rightMeasure;
310 QScopedPointer<Cube> m_leftCube;
311 QScopedPointer<Cube> m_rightCube;
312
313 QStringList m_projectShapeNames;
314 int m_numberProjectShapesWithPoint;
315 QMap<QString, Shape *> m_nameToShapeMap;
316
317 QString m_groundFilename;
318 QString m_groundSN;
320 QScopedPointer<UniversalGroundMap> m_groundGmap;
321
322 bool m_changeAllGroundLocation;
324 bool m_changeGroundLocationInNet;
325 QString m_newGroundDir;
326
327 // TODO: Combine the following m_groundSourceFile, m_radiusSourceFile
328 // with m_groundFile and m_demFile. Is it just a matter of
329 // full path vs filename only?
330 QString m_radiusFilename;
331 ControlPoint::RadiusSource::Source m_radiusSourceType;
332 bool m_demOpen;
333 QString m_demFile;
334 QScopedPointer<Cube> m_demCube;
335 };
336};
337#endif
This represents an ISIS control net in a project-based GUI interface.
Definition Control.h:66
a control measurement
Definition ControlMeasure.h:175
a control network
Definition ControlNet.h:258
Gui for editing ControlPoints in ipce application.
Definition ControlPointEditWidget.h:121
void deletePoint(ControlPoint *controlPoint)
Gives user options for deleting a control point from the control network.
Definition ControlPointEditWidget.cpp:1566
void colorizeSaveNetButton(bool reset=false)
Turn "Save Net" button text to red.
Definition ControlPointEditWidget.cpp:3120
void setEditPoint(ControlPoint *controlPoint, QString serialNumber="")
Slot called by Directory to set the control point for editing.
Definition ControlPointEditWidget.cpp:1167
void controlPointChanged(QString pointId)
void setControl(Control *control)
New control network being edited.
Definition ControlPointEditWidget.cpp:672
void setSerialNumberList(SerialNumberList *snList)
Set the serial number list.
Definition ControlPointEditWidget.cpp:651
void newControlNetwork(ControlNet *)
void controlPointAdded(QString pointId)
void createControlPoint(double latitude, double longitude, Cube *cube=0, bool isGroundSource=false)
Create a new control point at the given latitude, longitude.
Definition ControlPointEditWidget.cpp:1453
void addTemplates(TemplateList *templateList)
Add registration TemplateList to combobox when imported to project.
Definition ControlPointEditWidget.cpp:2969
void setControlFromActive()
New active control was set from ipce.
Definition ControlPointEditWidget.cpp:695
QString editPointId()
Definition ControlPointEditWidget.cpp:109
void stretchChipViewport(Stretch *, CubeViewport *)
virtual ~ControlPointEditWidget()
Definition ControlPointEditWidget.cpp:104
ControlPoint * editPoint()
Definition ControlPointEditWidget.cpp:119
bool eventFilter(QObject *o, QEvent *e)
Event filter for ControlPointEditWidget.
Definition ControlPointEditWidget.cpp:2733
ControlPointEditWidget(Directory *directory, QWidget *parent, bool addMeasures=false)
Consructs the ControlPointEditWidget widget.
Definition ControlPointEditWidget.cpp:78
A single control point.
Definition ControlPoint.h:356
IO Handler for Isis Cubes.
Definition Cube.h:168
Widget to display Isis cubes for qt apps.
Definition CubeViewport.h:122
Definition Directory.h:271
File name manipulation and expansion.
Definition FileName.h:100
Serial Number list generator.
Definition SerialNumberList.h:64
Pixel value mapper.
Definition Stretch.h:58
Definition TemplateList.h:35
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16
const double Null
Value for an Isis Null pixel.
Definition SpecialPixel.h:95
Source
Definition ControlPoint.h:453
Source
Definition ControlPoint.h:442