Isis Developer Reference
MatchTool.h
Go to the documentation of this file.
1#ifndef MatchTool_h
2#define MatchTool_h
3
4#include "Tool.h"
5#include "ControlPoint.h"
6#include "SerialNumberList.h"
7
8#include <QCloseEvent>
9#include <QHideEvent>
10#include <QPalette>
11#include <QPointer>
12#include <QStatusBar>
13#include <QStringList>
14
15class QAction;
16class QBoxLayout;
17class QCheckBox;
18class QComboBox;
19class QGroupBox;
20class QLabel;
21class QMainWindow;
22class QObject;
23class QPainter;
24class QPoint;
25class QPushButton;
26class QSplitter;
27class QStackedWidget;
28class QString;
29class QTableWidget;
30class QTextEdit;
31class QWidget;
32
33namespace Isis {
34 class ControlMeasure;
35 class ControlNet;
36 class ControlPointEdit;
37 class Cube;
38 class CubeViewport;
39 class MainWindow;
40 class MatchToolNewPointDialog;
41 class MdiCubeViewport;
42 class MatchHoldPointDialog;
43 class SerialNumberList;
44 class Stretch;
45 class ToolPad;
46 class UniversalGroundMap;
47
216 class MatchTool : public Tool {
217 Q_OBJECT
218
219 public:
220 MatchTool(QWidget *parent);
221 virtual ~MatchTool();
222 void paintViewport(MdiCubeViewport *mvp, QPainter *painter);
223
224// void addTo(Workspace *);
225
226 // measure column values
245 static const int NUMCOLUMNS = 16;
246
248
249
250 signals:
258
259 public slots:
260 void createPoint(MdiCubeViewport *mvp, double sample, double line);
261 void modifyPoint(ControlPoint *point);
262 void deletePoint(ControlPoint *point);
263 void updatePointInfo(QString pointId);
264 void refresh();
265
266 protected:
268 bool eventFilter(QObject *o,QEvent *e);
269
270 protected slots:
271 QWidget *createToolBarWidget(QStackedWidget *parent);
272 void mouseButtonRelease(QPoint p, Qt::MouseButton s);
273
274 private slots:
275 void showHelp();
276 void enterWhatsThisMode();
277 void paintAllViewports ();
278 void activateTool();
279 void openNet();
280 void saveNet();
281 void saveAsNet();
282 void setLockPoint (bool ignore);
283 void setIgnorePoint (bool ignore);
284 void setLockLeftMeasure (bool ignore);
285 void setIgnoreLeftMeasure (bool ignore);
286 void setLockRightMeasure (bool ignore);
287 void setIgnoreRightMeasure (bool ignore);
288
289 void nextRightMeasure();
290 void previousRightMeasure();
291 void selectLeftMeasure (int index);
292 void selectRightMeasure (int index);
293 void updateLeftMeasureInfo ();
294 void updateRightMeasureInfo ();
295
296 void measureSaved();
297 void checkReference();
298 void savePoint();
299 void colorizeSaveButton();
300
301 void cancelNewPoint();
302 void doneWithMeasures();
303
304 void openTemplateFile();
305 void viewTemplateFile();
306 void saveChips();
307 void showHideTemplateEditor();
308 void saveTemplateFile();
309 void saveTemplateFileAs();
310 void setTemplateModified();
311 void writeTemplateFile(QString);
312 void clearEditPoint();
313
314 void exiting();
315
316 private:
317 void createActions();
318 void createMenus();
319 void createToolBars();
320
321 void loadPoint();
322 void loadMeasureTable();
323 void drawAllMeasurments (MdiCubeViewport *mvp,QPainter *painter);
324 void createMatchTool(QWidget *parent);
325 QSplitter * createTopSplitter();
326 QGroupBox * createControlPointGroupBox();
327 QGroupBox * createLeftMeasureGroupBox();
328 QGroupBox * createRightMeasureGroupBox();
329 void createTemplateEditorWidget();
330 void loadTemplateFile(QString);
331 bool okToContinue();
332 bool IsMeasureLocked(QString serialNumber);
333 void addMeasure(MdiCubeViewport *mvp, double sample, double line);
334 bool validateMeasureChange(ControlMeasure *m);
335
336 QStringList missingCubes(ControlPoint *point);
337
338 // TODO pointer, reference, what???
339 SerialNumberList serialNumberList();
340 QString serialNumber(MdiCubeViewport *mvp);
341 void addViewportToSerialNumberList(MdiCubeViewport *mvp);
342
343 void readSettings();
344 void writeSettings() const;
345
346 private:
347
348 QMainWindow *m_matchTool;
349
350 QWidget *m_parent;
351 QStatusBar *m_statusBar;
352
353 QString m_cnetFileName;
354 QLabel *m_cnetFileNameLabel;
355 bool m_coregNet;
356 QString m_coregReferenceSN;
357 bool m_netChanged;
358
359 QAction *m_createPoint;
360 QAction *m_modifyPoint;
361 QAction *m_deletePoint;
362
363 QAction *m_saveNet;
364 QAction *m_saveAsNet;
365 QAction *m_closeMatchTool;
366
367 QAction *m_saveChips;
368 QAction *m_showHideTemplateEditor;
369 QAction *m_openTemplateFile;
370 QAction *m_saveTemplateFile;
371 QAction *m_saveTemplateFileAs;
372
373 QAction *m_whatsThis;
374 QAction *m_showHelp;
375
376 ControlPointEdit *m_pointEditor;
377
378 QPushButton *m_savePoint;
379 QPalette m_saveDefaultPalette;
380
381 QTextEdit *m_templateEditor;
382 QWidget *m_templateEditorWidget;
383 bool m_templateModified;
384
385 QLabel *m_templateFileNameLabel;
386 QLabel *m_ptIdValue;
387 QLabel *m_numMeasures;
388
389 QCheckBox *m_lockPoint;
390 QCheckBox *m_ignorePoint;
391 QLabel *m_leftReference;
392 QLabel *m_leftMeasureType;
393 QLabel *m_leftSampShift;
394 QLabel *m_leftLineShift;
395 QLabel *m_leftGoodness;
396 QLabel *m_rightGoodness;
397 QLabel *m_rightReference;
398 QLabel *m_rightMeasureType;
399 QLabel *m_rightSampShift;
400 QLabel *m_rightLineShift;
401 QCheckBox *m_lockLeftMeasure;
402 QCheckBox *m_ignoreLeftMeasure;
403 QCheckBox *m_lockRightMeasure;
404 QCheckBox *m_ignoreRightMeasure;
405
406 QComboBox *m_leftCombo;
407 QComboBox *m_rightCombo;
408
409 QMainWindow *m_measureWindow;
410 QTableWidget *m_measureTable;
411
412 QPointer<ControlNet> m_controlNet;
413 ControlPoint *m_editPoint;
414 MatchToolNewPointDialog *m_newPointDialog;
415 ControlPoint *m_newPoint;
416 QString m_lastUsedPointId;
417
418 QStringList m_pointFiles;
419
420 QString m_leftFile;
421 ControlMeasure *m_leftMeasure;
422 ControlMeasure *m_rightMeasure;
423 Cube *m_leftCube;
424 Cube *m_rightCube;
425
426 };
427};
428#endif
a control measurement
Definition ControlMeasure.h:175
a control network
Definition ControlNet.h:258
Point Editor Widget.
Definition ControlPointEdit.h:155
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
Match tool operations.
Definition MatchTool.h:216
QWidget * createToolBarWidget(QStackedWidget *parent)
Definition MatchTool.cpp:624
bool eventFilter(QObject *o, QEvent *e)
Event filter for MatchTool.
Definition MatchTool.cpp:2540
void modifyPoint(ControlPoint *point)
Modify control point.
Definition MatchTool.cpp:1874
void mouseButtonRelease(QPoint p, Qt::MouseButton s)
Handle mouse events on CubeViewport.
Definition MatchTool.cpp:1457
void deletePoint(ControlPoint *point)
Delete control point.
Definition MatchTool.cpp:1693
void refresh()
Refresh all necessary widgets in MatchTool including the PointEditor and CubeViewports.
Definition MatchTool.cpp:2973
MeasureColumns
Definition MatchTool.h:227
@ FILENAME
Definition MatchTool.h:228
@ GOODNESSOFFIT
Definition MatchTool.h:240
@ IGNORED
Definition MatchTool.h:241
@ APRIORILINE
Definition MatchTool.h:233
@ LINE
Definition MatchTool.h:231
@ PIXELSHIFT
Definition MatchTool.h:239
@ APRIORISAMPLE
Definition MatchTool.h:232
@ TYPE
Definition MatchTool.h:243
@ LINESHIFT
Definition MatchTool.h:238
@ SAMPLERESIDUAL
Definition MatchTool.h:234
@ CUBESN
Definition MatchTool.h:229
@ SAMPLESHIFT
Definition MatchTool.h:237
@ EDITLOCK
Definition MatchTool.h:242
@ SAMPLE
Definition MatchTool.h:230
@ LINERESIDUAL
Definition MatchTool.h:235
@ RESIDUALMAGNITUDE
Definition MatchTool.h:236
void measureChanged()
void ignoreRightChanged()
void paintViewport(MdiCubeViewport *mvp, QPainter *painter)
Take care of drawing things on a viewPort.
Definition MatchTool.cpp:2561
void ignoreLeftChanged()
static const int NUMCOLUMNS
Definition MatchTool.h:245
void newControlNetwork(ControlNet *)
void editPointChanged()
QString measureColumnToString(MeasureColumns column)
Definition MatchTool.cpp:2191
void createPoint(MdiCubeViewport *mvp, double sample, double line)
Create new control point at given samp, line for viewport.
Definition MatchTool.cpp:1553
void ignorePointChanged()
void stretchChipViewport(Stretch *, CubeViewport *)
virtual ~MatchTool()
Definition MatchTool.cpp:117
MatchTool(QWidget *parent)
Consructs the Match Tool window.
Definition MatchTool.cpp:57
void updatePointInfo(QString pointId)
Update the current editPoint information in the Point Editor labels.
Definition MatchTool.cpp:2937
QAction * toolPadAction(ToolPad *pad)
Adds the Tie tool action to the tool pad.
Definition MatchTool.cpp:614
Definition MatchToolNewPointDialog.h:22
Cube display widget for certain Isis MDI applications.
Definition MdiCubeViewport.h:39
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
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16