Isis Developer Reference
QnetTool.h
Go to the documentation of this file.
1#ifndef QnetTool_h
2#define QnetTool_h
3
4#include "Tool.h"
5#include "ControlPoint.h"
6
7#include <QCloseEvent>
8#include <QPalette>
9#include <QPointer>
10#include <QStringList>
11
12class QAction;
13class QBoxLayout;
14class QCheckBox;
15class QComboBox;
16class QGroupBox;
17class QLabel;
18class QMainWindow;
19class QObject;
20class QPainter;
21class QPoint;
22class QPushButton;
23class QSplitter;
24class QStackedWidget;
25class QString;
26class QTableWidget;
27class QTextEdit;
28class QWidget;
29
30namespace Isis {
31 class ControlMeasure;
32 class ControlNet;
33 class ControlPointEdit;
34 class Cube;
35 class CubeViewport;
36 class MainWindow;
37 class MdiCubeViewport;
38 class QnetHoldPointDialog;
39 class SerialNumberList;
40 class Stretch;
41 class ToolPad;
42 class UniversalGroundMap;
43
259 class QnetTool : public Tool {
260 Q_OBJECT
261
262 public:
263 QnetTool (QWidget *parent);
264 virtual ~QnetTool ();
265 void paintViewport (MdiCubeViewport *cvp,QPainter *painter);
266
267 // measure column values
286 static const int NUMCOLUMNS = 16;
287
289
291 const ControlNet *controlNet() const;
292
294 const SerialNumberList *serialNumberList() const;
295
296 Workspace *workspace() const;
297
298 signals:
302 void editPointChanged(QString pointId);
311
312 public slots:
313 void updateList();
314 void updateNet(QString cNetFileName);
315 void createPoint(double lat,double lon);
316 void createFixedPoint(double lat,double lon);
317 void modifyPoint(ControlPoint *point);
318 void deletePoint(ControlPoint *point);
319 void updatePointInfo(QString pointId);
320 void refresh();
321
322 protected:
324 bool eventFilter(QObject *o,QEvent *e);
325
326 protected slots:
327 void mouseButtonRelease(QPoint p, Qt::MouseButton s);
328 QWidget *createToolBarWidget (QStackedWidget *parent);
329
330 private slots:
331 void enterWhatsThisMode();
332 void paintAllViewports (QString pointId );
333 void saveNet();
334 void saveAsNet();
335 void addMeasure();
336 void setPointType (int pointType);
337 void setLockPoint (bool ignore);
338 void setIgnorePoint (bool ignore);
339 void setLockLeftMeasure (bool ignore);
340 void setIgnoreLeftMeasure (bool ignore);
341 void setLockRightMeasure (bool ignore);
342 void setIgnoreRightMeasure (bool ignore);
343 void showNavWindow (bool checked);
344
345 void updateSurfacePointInfo ();
346
347 void nextRightMeasure();
348 void previousRightMeasure();
349 void selectLeftMeasure (int index);
350 void selectRightMeasure (int index);
351 void updateLeftMeasureInfo ();
352 void updateRightMeasureInfo ();
353
354 void measureSaved();
355 bool checkReference();
356 void updateGroundPosition();
357 void savePoint();
358 void colorizeSaveButton();
359
360 void openTemplateFile();
361 void viewTemplateFile();
362 void saveChips();
363
364 void openGround();
365 void groundViewportClosed(CubeViewport *);
366 void openDem();
367 void openReferenceRadius();
368 void showHideTemplateEditor();
369 void saveTemplateFile();
370 void saveTemplateFileAs();
371 void setTemplateModified();
372 void writeTemplateFile(QString);
373
374 private:
375 void createActions();
376 void createMenus();
377 ControlMeasure *createTemporaryGroundMeasure();
378 void createToolBars();
379 bool findPointLocation();
380 void loadPoint();
381 void loadGroundMeasure();
382 void loadMeasureTable();
383 void drawAllMeasurments (MdiCubeViewport *vp,QPainter *painter);
384 void drawGroundMeasures (MdiCubeViewport *vp,QPainter *painter);
385// void drawMeasures (MdiCubeViewport *vp,QPainter *painter,ControlPoint &point);
386 void createQnetTool(QWidget *parent);
387 QSplitter * createTopSplitter();
388 QGroupBox * createControlPointGroupBox();
389 QGroupBox * createLeftMeasureGroupBox();
390 QGroupBox * createRightMeasureGroupBox();
391 void createTemplateEditorWidget();
392 void loadTemplateFile(QString);
393 bool okToContinue();
394 void initDem(QString demFile);
395 double demRadius(double latitude, double longitude);
396 void clearGroundSource();
397 bool IsMeasureLocked(QString serialNumber);
398
399 void readSettings();
400 void writeSettings() const;
401
402 QPointer<MainWindow> m_qnetTool;
403
404 QString m_cnetFileName;
405
406 QStringList findPointFiles(double lat, double lon);
407
408 QPointer<QAction> m_createPoint;
409 QPointer<QAction> m_modifyPoint;
410 QPointer<QAction> m_deletePoint;
411
412 QPointer<QAction> m_openGround;
413 QPointer<QAction> m_openDem;
414 QPointer<QAction> m_saveNet;
415 QPointer<QToolBar> toolBar;
416 QPointer<QAction> m_saveAsNet;
417 QPointer<QAction> m_closeQnetTool;
418
419 QPointer<QAction> m_saveChips;
420 QPointer<QAction> m_showHideTemplateEditor;
421 QPointer<QAction> m_openTemplateFile;
422 QPointer<QAction> m_saveTemplateFile;
423 QPointer<QAction> m_saveTemplateFileAs;
424
425 QPointer<QAction> m_whatsThis;
426
427 QPointer<QMainWindow> m_mw;
428 QPointer<ControlPointEdit> m_pointEditor;
429
430 QPushButton *m_savePoint;
431 QPalette m_saveDefaultPalette;
432
433 QTextEdit *m_templateEditor;
434 QWidget *m_templateEditorWidget;
435 bool m_templateModified;
436
437 QPointer<QLabel> m_templateFileNameLabel;
438 QPointer<QLabel> m_groundFileNameLabel;
439 QPointer<QLabel> m_radiusFileNameLabel;
440 QPointer<QLabel> m_ptIdValue;
441 QPointer<QComboBox> m_pointType;
442 QPointer<QLabel> m_numMeasures;
443 QPointer<QLabel> m_pointAprioriLatitude;
444 QPointer<QLabel> m_pointAprioriLongitude;
445 QPointer<QLabel> m_pointAprioriRadius;
446 QPointer<QLabel> m_pointAprioriLatitudeSigma;
447 QPointer<QLabel> m_pointAprioriLongitudeSigma;
448 QPointer<QLabel> m_pointAprioriRadiusSigma;
449 QPointer<QLabel> m_pointLatitude;
450 QPointer<QLabel> m_pointLongitude;
451 QPointer<QLabel> m_pointRadius;
452
453 QPointer<QCheckBox> m_lockPoint;
454 QPointer<QCheckBox> m_ignorePoint;
455 QPointer<QLabel> m_leftReference;
456 QPointer<QLabel> m_leftMeasureType;
457 QPointer<QLabel> m_leftSampError;
458 QPointer<QLabel> m_leftLineError;
459 QPointer<QLabel> m_leftSampShift;
460 QPointer<QLabel> m_leftLineShift;
461 QPointer<QLabel> m_leftGoodness;
462 QPointer<QLabel> m_rightGoodness;
463 QPointer<QLabel> m_rightReference;
464 QPointer<QLabel> m_rightMeasureType;
465 QPointer<QLabel> m_rightSampError;
466 QPointer<QLabel> m_rightLineError;
467 QPointer<QLabel> m_rightSampShift;
468 QPointer<QLabel> m_rightLineShift;
469 QPointer<QCheckBox> m_lockLeftMeasure;
470 QPointer<QCheckBox> m_ignoreLeftMeasure;
471 QPointer<QCheckBox> m_lockRightMeasure;
472 QPointer<QCheckBox> m_ignoreRightMeasure;
473
474 QPointer<QComboBox> m_leftCombo;
475 QPointer<QComboBox> m_rightCombo;
476
477 QPointer<QMainWindow> m_measureWindow;
478 QPointer<QTableWidget> m_measureTable;
479
480 QPointer<ControlPoint> m_editPoint;
481
482 QStringList m_pointFiles;
483
484 QString m_leftFile;
485 QPointer<ControlMeasure> m_leftMeasure;
486 QPointer<ControlMeasure> m_rightMeasure;
487 QScopedPointer<Cube> m_leftCube;
488 QScopedPointer<Cube> m_rightCube;
489
490 QString m_groundFile;
491 QScopedPointer<Cube> m_groundCube;
492 QString m_groundSN;
493 QScopedPointer<UniversalGroundMap> m_groundGmap;
494 bool m_groundOpen;
495 ControlPoint::SurfacePointSource::Source m_groundSurfacePointSource;
496 ControlPoint::RadiusSource::Source m_groundRadiusSource;
497 // TODO: Combine the following m_groundSourceFile, m_radiusSourceFile
498 // with m_groundFile and m_demFile. Is it just a matter of
499 // full path vs filename only?
500 QString m_groundSourceFile;
501 QString m_radiusSourceFile;
502 QString m_demFile;
503 bool m_demOpen;
504 QScopedPointer<Cube> m_demCube;
505
506 QString m_lastUsedPointId;
507 QPointer<ControlNet> m_controlNet;
508 SerialNumberList *m_serialNumberList;
509 QPointer<Workspace> m_workspace;
510 };
511};
512
513#endif
a control measurement
Definition ControlMeasure.h:175
a control network
Definition ControlNet.h:258
A single control point.
Definition ControlPoint.h:356
Widget to display Isis cubes for qt apps.
Definition CubeViewport.h:122
Cube display widget for certain Isis MDI applications.
Definition MdiCubeViewport.h:39
Qnet tool operations.
Definition QnetTool.h:259
void qnetToolSaveAs()
void updateNet(QString cNetFileName)
Updates the Control Network displayed in the Qnet Tool title bar.
Definition QnetTool.cpp:1455
void refresh()
Refresh all necessary widgets in QnetTool including the PointEditor and CubeViewports.
Definition QnetTool.cpp:3557
virtual ~QnetTool()
Definition QnetTool.cpp:94
void updateList()
Definition QnetTool.cpp:1432
void ignorePointChanged()
void updatePointInfo(QString pointId)
Update the current editPoint information in the Point Editor labels.
Definition QnetTool.cpp:3517
void newControlNetwork(ControlNet *)
void paintViewport(MdiCubeViewport *cvp, QPainter *painter)
Take care of drawing things on a viewPort.
Definition QnetTool.cpp:3120
void ignoreLeftChanged()
void modifyPoint(ControlPoint *point)
Modify control point.
Definition QnetTool.cpp:2111
void stretchChipViewport(Stretch *, CubeViewport *)
void qnetToolSave()
QnetTool(QWidget *parent)
Consructs the Qnet Tool window.
Definition QnetTool.cpp:67
void ignoreRightChanged()
Workspace * workspace() const
Definition QnetTool.cpp:2601
MeasureColumns
Definition QnetTool.h:268
@ LINERESIDUAL
Definition QnetTool.h:276
@ RESIDUALMAGNITUDE
Definition QnetTool.h:277
@ SAMPLE
Definition QnetTool.h:271
@ PIXELSHIFT
Definition QnetTool.h:280
@ GOODNESSOFFIT
Definition QnetTool.h:281
@ SAMPLESHIFT
Definition QnetTool.h:278
@ SAMPLERESIDUAL
Definition QnetTool.h:275
@ APRIORISAMPLE
Definition QnetTool.h:273
@ LINESHIFT
Definition QnetTool.h:279
@ LINE
Definition QnetTool.h:272
@ EDITLOCK
Definition QnetTool.h:283
@ CUBESN
Definition QnetTool.h:270
@ APRIORILINE
Definition QnetTool.h:274
@ FILENAME
Definition QnetTool.h:269
@ TYPE
Definition QnetTool.h:284
@ IGNORED
Definition QnetTool.h:282
static const int NUMCOLUMNS
Definition QnetTool.h:286
void showNavTool()
void createFixedPoint(double lat, double lon)
Create new Fixed control point.
Definition QnetTool.cpp:1788
void measureChanged()
void mouseButtonRelease(QPoint p, Qt::MouseButton s)
Handle mouse events on CubeViewport.
Definition QnetTool.cpp:1521
SerialNumberList * serialNumberList()
Definition QnetTool.cpp:2591
QWidget * createToolBarWidget(QStackedWidget *parent)
This method creates the widgets for the tool bar.
Definition QnetTool.cpp:3609
void deletePoint(ControlPoint *point)
Delete control point.
Definition QnetTool.cpp:1962
void refreshNavList()
void createPoint(double lat, double lon)
Create new control point.
Definition QnetTool.cpp:1673
ControlNet * controlNet()
Definition QnetTool.cpp:2581
void editPointChanged(QString pointId)
QAction * toolPadAction(ToolPad *pad)
Adds the Tie tool action to the tool pad.
Definition QnetTool.cpp:1476
QString measureColumnToString(MeasureColumns column)
Definition QnetTool.cpp:2541
bool eventFilter(QObject *o, QEvent *e)
Event filter for QnetTool.
Definition QnetTool.cpp:3099
Serial Number list generator.
Definition SerialNumberList.h:64
Pixel value mapper.
Definition Stretch.h:58
Base class for the Qisis tools.
Definition Tool.h:67
Definition ToolPad.h:14
Definition Workspace.h:78
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16
Source
Definition ControlPoint.h:453
Source
Definition ControlPoint.h:442