Isis 3 Programmer Reference
ControlPointEdit.h
1 #ifndef ControlPointEdit_h
2 #define ControlPointEdit_h
3 
4 // This is the only include allowed in this file!
5 #include <QWidget>
6 
7 
8 class QCheckBox;
9 class QDial;
10 class QDoubleSpinBox;
11 class QHBoxLayout;
12 class QLabel;
13 class QLCDNumber;
14 class QPalette;
15 class QPushButton;
16 class QRadioButton;
17 class QScrollBar;
18 class QString;
19 class QTimer;
20 class QToolButton;
21 class QVBoxLayout;
22 
23 namespace Isis {
24  class AutoReg;
25  class Chip;
26  class ChipViewport;
27  class ControlMeasure;
28  class ControlNet;
29  class Cube;
30  class CubeViewport;
31  class Stretch;
32  class Tool;
33  class UniversalGroundMap;
34 
147  class ControlPointEdit : public QWidget {
148  Q_OBJECT
149 
150  public:
151  ControlPointEdit(ControlNet * cnet, QWidget *parent = 0,
152  bool allowLeftMouse = false, bool useGeometry = true);
153  ~ControlPointEdit();
154  QString templateFileName() {
155  return p_templateFileName;
156  };
157  bool setTemplateFile(QString);
158  void allowLeftMouse(bool allowMouse);
159 
160  signals:
161  void updateLeftView(double sample, double line);
162  void updateRightView(double sample, double line);
163  void measureSaved();
164  void newControlNetwork(ControlNet *);
165  void stretchChipViewport(Stretch *, CubeViewport *);
166 
167  public slots:
168  void setLeftMeasure(ControlMeasure *leftMeasure,
169  Cube *leftCube, QString pointId);
170  void setRightMeasure(ControlMeasure *rightMeasure,
171  Cube *rightCube, QString pointId);
172  void colorizeSaveButton();
173  void refreshChips();
174  void saveChips();
175 
176  protected slots:
177 
178  private slots:
179 
180  void setNoGeom();
181  void setGeom();
182  void setRotate();
183  void setCircle(bool);
184  void setZoomLink(bool);
185 
186  void findPoint();
187  void registerPoint();
188  void saveMeasure();
189  void updateLeftPositionLabel(double zoomFactor);
190  void updateRightGeom();
191  void updateRightPositionLabel(double zoomFactor);
192 
193  void blinkStart();
194  void blinkStop();
195  void changeBlinkTime(double interval);
196  void updateBlink();
197 
198  private:
199  void createPointEditor(QWidget *parent);
200 
201  bool p_allowLeftMouse;
202  bool p_useGeometry;
203 
204  QString p_templateFileName;
205  QLabel *p_leftZoomFactor;
206  QLabel *p_rightZoomFactor;
207  QLabel *p_leftSampLinePosition;
208  QLabel *p_rightSampLinePosition;
209  QLabel *p_leftLatLonPosition;
210  QLabel *p_rightLatLonPosition;
211  QRadioButton *p_nogeom;
212  QRadioButton *p_geom;
213  QToolButton *p_rightZoomIn;
214  QToolButton *p_rightZoomOut;
215  QToolButton *p_rightZoom1;
216 
217 
218  bool p_timerOn;
219  QTimer *p_timer;
220  std::vector<ChipViewport *> p_blinkList;
221  unsigned char p_blinkIndex;
222 
223  QDial *p_dial;
224  QLCDNumber *p_dialNumber;
225  QDoubleSpinBox *p_blinkTimeBox;
226 
227  bool p_circle;
228  QScrollBar *p_slider;
229 
230  QPushButton *p_autoReg;
231  QWidget *p_autoRegExtension;
232  QLabel *p_oldPosition;
233  QLabel *p_goodFit;
234  bool p_autoRegShown;
235  bool p_autoRegAttempted;
236 
237  QPushButton *p_saveMeasure;
238  QPalette p_saveDefaultPalette;
239 
240  ChipViewport *p_leftView;
241  ChipViewport *p_rightView;
242 
243  Cube *p_leftCube;
244  Cube *p_rightCube;
245  ControlMeasure *p_leftMeasure;
246  ControlMeasure *p_rightMeasure;
247  Chip *p_leftChip;
248  Chip *p_rightChip;
249  UniversalGroundMap *p_leftGroundMap;
250  UniversalGroundMap *p_rightGroundMap;
251 
252  AutoReg *p_autoRegFact;
253  QString p_pointId;
254 
255  int p_rotation;
256  bool p_geomIt;
257  bool p_linkZoom;
258  };
259 };
260 
261 #endif
void allowLeftMouse(bool allowMouse)
Set the option that allows mouse movements in the left ChipViewport.
void findPoint()
Find point from left ChipViewport in the right ChipViewport.
Universal Ground Map.
A small chip of data used for pattern matching.
Definition: Chip.h:102
void setNoGeom()
Slot to turn off geom.
void updateRightPositionLabel(double zoomFactor)
Update sample/line, lat/lon and zoom factor of right measure.
void registerPoint()
Sub-pixel register point in right chipViewport with point in left.
void updateLeftPositionLabel(double zoomFactor)
Update sample/line, lat/lon and zoom factor of left measure.
void saveChips()
Slot to save registration chips to files and fire off qview.
Widget to display Isis cubes for qt apps.
Definition: CubeViewport.h:132
void colorizeSaveButton()
Turn "Save Measure" button text to red.
void setRightMeasure(ControlMeasure *rightMeasure, Cube *rightCube, QString pointId)
Set the measure displayed in the right ChipViewport.
ControlPointEdit(ControlNet *cnet, QWidget *parent=0, bool allowLeftMouse=false, bool useGeometry=true)
Constructs a ControlPointEdit widget.
a control network
Definition: ControlNet.h:271
bool setTemplateFile(QString)
Allows user to choose a new template file by opening a window from which to select a filename...
Pixel value mapper.
Definition: Stretch.h:72
void setGeom()
Turn geom on.
void changeBlinkTime(double interval)
Set blink rate.
void blinkStart()
Slot to start blink function.
void saveMeasure()
Save control measure under the crosshair in right ChipViewport.
void updateBlink()
Slot to cause the blink to happen coinciding with the timer.
void updateRightGeom()
Slot to update the geomed right ChipViewport for zoom operations.
Auto Registration class.
Definition: AutoReg.h:183
void blinkStop()
Slot to stop blink function.
void createPointEditor(QWidget *parent)
Design the PointEdit widget.
Viewport for Isis Chips.
Definition: ChipViewport.h:85
void setRotate()
Slot to update the right ChipViewport for zoom operations.
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
a control measurement
Point Editor Widget.
void setZoomLink(bool)
Turn linking of zoom on or off.
void setCircle(bool)
Turn circle widgets on/off.
void setLeftMeasure(ControlMeasure *leftMeasure, Cube *leftCube, QString pointId)
Set the measure displayed in the left ChipViewport.
IO Handler for Isis Cubes.
Definition: Cube.h:170