USGS

Isis 3.0 Object Programmers' Reference

Home

Qisis::ControlPointEdit Class Reference

#include <ControlPointEdit.h>

Inheritance diagram for Qisis::ControlPointEdit:

Inheritance graph
[legend]
Collaboration diagram for Qisis::ControlPointEdit:

Collaboration graph
[legend]
List of all members.

Detailed Description

Point Editor Widget.

Author:
2008-09-09 Tracie Sucharski

For internal use only.

History:
2008-11-19 Tracie Sucharski - Addition option to constructor to allow mouse events on leftChipViewport.
History:
2008-11-24 Tracie Sucharski - Changed class name from PointEdit
History:
2008-12-02 Jeannie Walldren - Modified createPointEditor() to allow the leftChipViewport to refresh even if allowLeftMouse = false.
History:
2008-12-10 Jeannie Walldren - Added a private variable for the template filename. Set the default value of this variable to the previously hard-coded template filename. Added setTemplateFile() method derived from previously unused and commented out method called openTemplateFile().
History:
2008-12-15 Jeannie Walldren - Some QMessageBox warnings had strings tacked on to the list of errors. These strings were changed to iExceptions and added to the error stack to conform with Isis standards.
History:
2008-12-30 Jeannie Walldren - Modified savePoint() method to update user (chooser) name and date when point is saved
History:
2009-03-17 Tracie Sucharski - Add slot to set a boolean to indicate whether the registration chips should be saved.

Definition at line 60 of file ControlPointEdit.h.

Public Slots

void setLeftMeasure (Isis::ControlMeasure *leftMeasure, Isis::Cube *leftCube, std::string pointId)
 Set the measure displayed in the left ChipViewport.
void setRightMeasure (Isis::ControlMeasure *rightMeasure, Isis::Cube *rightCube, std::string pointId)
 Set the measure displayed in the right ChipViewport.
void saveChips ()
 Slot to save registration chips to files and fire off qview.

Signals

void updateLeftView (double sample, double line)
void updateRightView (double sample, double line)
void pointSaved ()

Public Member Functions

 ControlPointEdit (QWidget *parent=0, bool allowLeftMouse=false)
 Constructs a ControlPointEdit widget.
std::string templateFilename ()
void setTemplateFile ()
 Allows user to choose a new template file by opening a window from which to select a filename.
void allowLeftMouse (bool allowMouse)
 Set the option that allows mouse movements in the left ChipViewport.

Private Slots

void setNoGeom ()
 Slot to turn off geom.
void setGeom ()
 Turn geom on.
void setRotate ()
 Slot to enable the rotate dial.
void setCircle (bool)
 Turn circle widgets on/off.
void findPoint ()
 Find point from left ChipViewport in the right ChipViewport.
void registerPoint ()
 Sub-pixel register point in right chipViewport with point in left.
void savePoint ()
 Save point under the crosshair in right ChipViewport.
void updateLeftPositionLabel (double zoomFactor)
 Update sample/line, lat/lon and zoom factor of left measure.
void updateRightGeom ()
 Slot to update the geomed right ChipViewport for zoom operations.
void updateRightPositionLabel (double zoomFactor)
 Update sample/line, lat/lon and zoom factor of right measure.
void blinkStart ()
 Slot to start blink function.
void blinkStop ()
 Slot to stop blink function.
void changeBlinkTime (double interval)
 Set blink rate.
void updateBlink ()
 Slot to cause the blink to happen coinciding with the timer.

Private Member Functions

void createPointEditor (QWidget *parent)
 Design the PointEdit widget.

Private Attributes

bool p_allowLeftMouse
std::string p_templateFilename
QLabel * p_leftZoomFactor
QLabel * p_rightZoomFactor
QLabel * p_leftSampLinePosition
QLabel * p_rightSampLinePosition
QLabel * p_leftLatLonPosition
QLabel * p_rightLatLonPosition
QRadioButton * p_nogeom
QRadioButton * p_geom
QToolButton * p_rightZoomIn
QToolButton * p_rightZoomOut
QToolButton * p_rightZoom1
bool p_timerOn
QTimer * p_timer
std::vector< ChipViewport * > p_blinkList
unsigned char p_blinkIndex
QDial * p_dial
QLCDNumber * p_dialNumber
QDoubleSpinBox * p_blinkTimeBox
bool p_circle
QScrollBar * p_slider
QPushButton * p_autoReg
QWidgetp_autoRegExtension
QLabel * p_oldPosition
QLabel * p_goodFit
bool p_autoRegShown
bool p_autoRegAttempted
ChipViewportp_leftView
ChipViewportp_rightView
Isis::Cubep_leftCube
Isis::Cubep_rightCube
Isis::ControlMeasurep_leftMeasure
Isis::ControlMeasurep_rightMeasure
Isis::Chipp_leftChip
Isis::Chipp_rightChip
Isis::UniversalGroundMapp_leftGroundMap
Isis::UniversalGroundMapp_rightGroundMap
Isis::AutoRegp_autoRegFact
std::string p_pointId
int p_rotation
bool p_geomIt


Constructor & Destructor Documentation

Qisis::ControlPointEdit::ControlPointEdit ( QWidget parent = 0,
bool  allowLeftMouse = false 
)

Constructs a ControlPointEdit widget.

Parameters:
parent Input Parent of widget
allowLeftMouse Input Allow/Disallow mouse events on Left ChipViewport
Author:
Tracie Sucharski

For internal use only.

History:
2008-15-2008 Jeannie Walldren - Added error string to Isis::iException::Message before creating QMessageBox

Definition at line 29 of file ControlPointEdit.cpp.

References _FILEINFO_, Isis::AutoRegFactory::Create(), createPointEditor(), e, p_allowLeftMouse, p_autoRegFact, p_leftCube, p_leftGroundMap, p_rightCube, p_rightGroundMap, p_rotation, p_templateFilename, p_timerOn, and pvl().


Member Function Documentation

void Qisis::ControlPointEdit::allowLeftMouse ( bool  allowMouse  ) 

Set the option that allows mouse movements in the left ChipViewport.

Author:
Tracie Sucharski

For internal use only.

Definition at line 994 of file ControlPointEdit.cpp.

References p_allowLeftMouse.

void Qisis::ControlPointEdit::blinkStart (  )  [private, slot]

Slot to start blink function.

Definition at line 887 of file ControlPointEdit.cpp.

References p_blinkIndex, p_blinkList, p_blinkTimeBox, p_leftView, p_rightView, p_timer, p_timerOn, and updateBlink().

Referenced by createPointEditor().

void Qisis::ControlPointEdit::blinkStop (  )  [private, slot]

Slot to stop blink function.

Definition at line 904 of file ControlPointEdit.cpp.

References p_blinkList, p_leftView, p_timer, and p_timerOn.

Referenced by createPointEditor().

void Qisis::ControlPointEdit::changeBlinkTime ( double  interval  )  [private, slot]

Set blink rate.

Parameters:
interval Input Blink rate in seconds
Author:
Tracie Sucharski

Definition at line 922 of file ControlPointEdit.cpp.

References p_timer, and p_timerOn.

Referenced by createPointEditor().

void Qisis::ControlPointEdit::createPointEditor ( QWidget parent  )  [private]

Design the PointEdit widget.

Author:
Tracie Sucharski

For internal use only.

History:
2008-11-19 Tracie Sucharski - Added left pan buttons, but default to hidden.
History:
2008-12-02 Jeannie Walldren - Allow connection between updateLeftView and refreshView for all objects. Previously this was only done if allowLeftMouse = true.
History:
2008-12-02 Tracie Sucharski - Another bug fix due to change on 2008-11-19, The leftView tackPointChanged connection needs to always be made whether mouse button events are allowed or not.
History:
2008-12-10 Jeannie Walldren - Set the default value of the new private variable, p_templateFilename, to the previously hard-coded template filename.

Definition at line 82 of file ControlPointEdit.cpp.

References blinkStart(), blinkStop(), changeBlinkTime(), circle(), findPoint(), p_allowLeftMouse, p_autoReg, p_autoRegAttempted, p_autoRegExtension, p_autoRegShown, p_blinkTimeBox, p_dial, p_dialNumber, p_geom, p_geomIt, p_goodFit, p_leftChip, p_leftLatLonPosition, p_leftSampLinePosition, p_leftView, p_leftZoomFactor, p_nogeom, p_oldPosition, p_rightChip, p_rightLatLonPosition, p_rightSampLinePosition, p_rightView, p_rightZoom1, p_rightZoomFactor, p_rightZoomIn, p_rightZoomOut, p_rotation, p_slider, registerPoint(), savePoint(), setCircle(), setGeom(), setNoGeom(), setRotate(), updateLeftPositionLabel(), updateRightGeom(), updateRightPositionLabel(), and Qisis::VIEWSIZE.

Referenced by ControlPointEdit().

void Qisis::ControlPointEdit::findPoint (  )  [private, slot]

Find point from left ChipViewport in the right ChipViewport.

Definition at line 605 of file ControlPointEdit.cpp.

References Isis::UniversalGroundMap::Line(), p_leftGroundMap, p_leftView, p_rightGroundMap, Isis::UniversalGroundMap::Sample(), Isis::UniversalGroundMap::SetImage(), Isis::UniversalGroundMap::SetUniversalGround(), Qisis::ChipViewport::tackLine(), Qisis::ChipViewport::tackSample(), Isis::UniversalGroundMap::UniversalLatitude(), and Isis::UniversalGroundMap::UniversalLongitude().

Referenced by createPointEditor().

void Qisis::ControlPointEdit::registerPoint (  )  [private, slot]

Sub-pixel register point in right chipViewport with point in left.

For internal use only.

History:
2008-15-2008 Jeannie Walldren - Throw and catch error before creating QMessageBox
History:
2009-03-23 Tracie Sucharski - Added private p_autoRegAttempted for the SaveChips method.

Definition at line 628 of file ControlPointEdit.cpp.

References _FILEINFO_, Isis::AutoReg::CubeLine(), Isis::AutoReg::CubeSample(), e, Isis::AutoReg::GoodnessOfFit(), Isis::ControlMeasure::Line(), Isis::iException::Message(), p_autoReg, p_autoRegAttempted, p_autoRegExtension, p_autoRegFact, p_autoRegShown, p_goodFit, p_leftCube, p_leftMeasure, p_oldPosition, p_rightCube, p_rightMeasure, Isis::AutoReg::PatternChip(), Isis::AutoReg::Register(), Isis::ControlMeasure::Sample(), and Isis::AutoReg::SearchChip().

Referenced by createPointEditor().

void Qisis::ControlPointEdit::saveChips (  )  [slot]

Slot to save registration chips to files and fire off qview.

Author:
2009-03-18 Tracie Sucharski

For internal use only.

History:
2009-03-23 Tracie Sucharski - Use p_autoRegAttempted to see if chips exist.

Definition at line 1009 of file ControlPointEdit.cpp.

References Isis::AutoReg::FitChip(), Isis::ControlMeasure::Line(), p_autoRegAttempted, p_autoRegFact, p_leftMeasure, p_pointId, p_rightMeasure, Isis::AutoReg::PatternChip(), Isis::ControlMeasure::Sample(), Isis::AutoReg::SearchChip(), and Isis::System().

void Qisis::ControlPointEdit::savePoint (  )  [private, slot]

Save point under the crosshair in right ChipViewport.

For internal use only.

History:
2008-12-30 Jeannie Walldren - Modified to update user (chooser) name and date when point is saved

Definition at line 688 of file ControlPointEdit.cpp.

References Isis::ControlMeasure::CubeSerialNumber(), p_allowLeftMouse, p_autoReg, p_autoRegExtension, p_autoRegShown, p_leftMeasure, p_leftView, p_rightMeasure, p_rightView, Isis::ControlMeasure::SetChooserName(), Isis::ControlMeasure::SetCoordinate(), Isis::ControlMeasure::SetDateTime(), Qisis::ChipViewport::tackLine(), and Qisis::ChipViewport::tackSample().

Referenced by createPointEditor().

void Qisis::ControlPointEdit::setCircle ( bool  checked  )  [private, slot]

Turn circle widgets on/off.

Parameters:
checked Input Turn cirle on or off
Author:
2008-09-09 Tracie Sucharski

Definition at line 861 of file ControlPointEdit.cpp.

References p_circle, p_leftView, p_rightView, p_slider, and Qisis::ChipViewport::setCircle().

Referenced by createPointEditor().

void Qisis::ControlPointEdit::setGeom (  )  [private, slot]

Turn geom on.

For internal use only.

History:
2007-06-15 Tracie Sucharski - Grey out zoom buttons
History:
2008-15-2008 Jeannie Walldren - Added error string to Isis::iException::Message before creating QMessageBox

Definition at line 776 of file ControlPointEdit.cpp.

References _FILEINFO_, e, Qisis::ChipViewport::geomChip(), p_dial, p_dialNumber, p_geom, p_geomIt, p_leftChip, p_leftCube, p_nogeom, p_rightView, p_rightZoom1, p_rightZoomIn, and p_rightZoomOut.

Referenced by createPointEditor().

void Qisis::ControlPointEdit::setLeftMeasure ( Isis::ControlMeasure leftMeasure,
Isis::Cube leftCube,
std::string  pointId 
) [slot]

Set the measure displayed in the left ChipViewport.

Parameters:
leftMeasure Input Measure displayed in left ChipViewport
leftCube Input Cube of measure displayed in left ChipViewport
Author:
Tracie Sucharski

For internal use only.

History:
2008-11-19 Tracie Sucharski - If left cube changes, get new universalGroundMap.

Definition at line 450 of file ControlPointEdit.cpp.

References Isis::ControlMeasure::Line(), Isis::Chip::Load(), p_autoReg, p_autoRegExtension, p_autoRegShown, p_leftChip, p_leftCube, p_leftGroundMap, p_leftMeasure, p_leftView, p_pointId, Isis::ControlMeasure::Sample(), Qisis::ChipViewport::setChip(), and Isis::Chip::TackCube().

void Qisis::ControlPointEdit::setNoGeom (  )  [private, slot]

Slot to turn off geom.

Definition at line 821 of file ControlPointEdit.cpp.

References Qisis::ChipViewport::nogeomChip(), p_dial, p_dialNumber, p_geomIt, p_rightView, p_rightZoom1, p_rightZoomIn, and p_rightZoomOut.

Referenced by createPointEditor().

void Qisis::ControlPointEdit::setRightMeasure ( Isis::ControlMeasure rightMeasure,
Isis::Cube rightCube,
std::string  pointId 
) [slot]

Set the measure displayed in the right ChipViewport.

Parameters:
rightMeasure Input Measure displayed in right ChipViewport
rightCube Input Cube of measure displayed in right ChipViewport
Author:
Tracie Sucharski

For internal use only.

History:
2008-11-19 Tracie Sucharski - If right cube changes, get new universalGroundMap.
History:
2008-15-2008 Jeannie Walldren - Added error string to Isis::iException::Message before creating QMessageBox
History:
2009-09-14 Tracie Sucharski - Call geomChip to make sure left chip is initialized in the ChipViewport. This was done for the changes made to the Chip class and the ChipViewport class where the Cube info is no longer stored.

Definition at line 499 of file ControlPointEdit.cpp.

References _FILEINFO_, e, Isis::ControlMeasure::Line(), Isis::Chip::Load(), p_autoReg, p_autoRegAttempted, p_autoRegExtension, p_autoRegShown, p_geom, p_geomIt, p_leftChip, p_leftCube, p_nogeom, p_pointId, p_rightChip, p_rightCube, p_rightGroundMap, p_rightMeasure, p_rightView, Isis::ControlMeasure::Sample(), Qisis::ChipViewport::setChip(), Isis::Chip::TackCube(), and updateRightGeom().

void Qisis::ControlPointEdit::setRotate (  )  [private, slot]

Slot to enable the rotate dial.

Definition at line 758 of file ControlPointEdit.cpp.

References p_dial, and p_dialNumber.

Referenced by createPointEditor().

void Qisis::ControlPointEdit::setTemplateFile (  ) 

Allows user to choose a new template file by opening a window from which to select a filename.

This file is then registered and set as the new template.

Author:
Tracie Sucharski

For internal use only.

History:
2008-12-10 Jeannie Walldren - Changed name from openTemplateFile() and added functionality to set new template filename to the private variable, p_templateFilename
History:
2008-12-15 Jeannie Walldren - Modified code to only allow the template file to be modified if registration is successfull, otherwise the original template file is kept.

Definition at line 953 of file ControlPointEdit.cpp.

References _FILEINFO_, Isis::AutoRegFactory::Create(), e, filter(), p_autoRegFact, p_templateFilename, and pvl().

void Qisis::ControlPointEdit::updateBlink (  )  [private, slot]

Slot to cause the blink to happen coinciding with the timer.

Definition at line 928 of file ControlPointEdit.cpp.

References Qisis::ChipViewport::loadView(), p_blinkIndex, p_blinkList, and p_leftView.

Referenced by blinkStart().

void Qisis::ControlPointEdit::updateLeftPositionLabel ( double  zoomFactor  )  [private, slot]

Update sample/line, lat/lon and zoom factor of left measure.

Parameters:
zoomFactor Input zoom factor
Author:
Tracie Sucharski

Definition at line 555 of file ControlPointEdit.cpp.

References p_leftGroundMap, p_leftLatLonPosition, p_leftSampLinePosition, p_leftView, p_leftZoomFactor, pos, Isis::UniversalGroundMap::SetImage(), Qisis::ChipViewport::tackLine(), Qisis::ChipViewport::tackSample(), Isis::UniversalGroundMap::UniversalLatitude(), and Isis::UniversalGroundMap::UniversalLongitude().

Referenced by createPointEditor().

void Qisis::ControlPointEdit::updateRightGeom (  )  [private, slot]

Slot to update the geomed right ChipViewport for zoom operations.

For internal use only.

History:
2008-15-2008 Jeannie Walldren - Added error string to Isis::iException::Message before creating QMessageBox

Definition at line 736 of file ControlPointEdit.cpp.

References _FILEINFO_, e, Qisis::ChipViewport::geomChip(), p_geom, p_geomIt, p_leftChip, p_leftCube, p_nogeom, and p_rightView.

Referenced by createPointEditor(), and setRightMeasure().

void Qisis::ControlPointEdit::updateRightPositionLabel ( double  zoomFactor  )  [private, slot]

Update sample/line, lat/lon and zoom factor of right measure.

Parameters:
zoomFactor Input zoom factor
Author:
Tracie Sucharski

Definition at line 583 of file ControlPointEdit.cpp.

References p_rightGroundMap, p_rightLatLonPosition, p_rightSampLinePosition, p_rightView, p_rightZoomFactor, pos, Isis::UniversalGroundMap::SetImage(), Qisis::ChipViewport::tackLine(), Qisis::ChipViewport::tackSample(), Isis::UniversalGroundMap::UniversalLatitude(), and Isis::UniversalGroundMap::UniversalLongitude().

Referenced by createPointEditor().


The documentation for this class was generated from the following files: