Isis 3 Programmer Reference
Isis::ControlPointGraphicsItem Class Reference

The visual display of a single control point. More...

#include <ControlPointGraphicsItem.h>

Inheritance diagram for Isis::ControlPointGraphicsItem:
Inheritance graph
Collaboration diagram for Isis::ControlPointGraphicsItem:
Collaboration graph

Public Member Functions

 ControlPointGraphicsItem (QPointF center, QPointF apriori, ControlPoint *cp, SerialNumberList *snList, MosaicSceneWidget *scene, QGraphicsItem *parent)
 Create a CP graphics item.
 
void paint (QPainter *, const QStyleOptionGraphicsItem *, QWidget *widget=0)
 This virtual paint method is called anytime an update() or paintEvent() is called.
 
ControlPointcontrolPoint ()
 
void setArrowVisible (bool visible, bool colorByMeasureCount, int measureCount, bool colorByResidualMagnitude, double residualMagnitude)
 

Protected Member Functions

void contextMenuEvent (QGraphicsSceneContextMenuEvent *event)
 

Private Member Functions

QRectF calcRect () const
 
QRectF calcCrosshairRect () const
 
QPolygonF calcArrowHead () const
 
QString makeToolTip (SerialNumberList *snlist)
 

Private Attributes

QPointF * m_centerPoint
 
QPointF * m_origPoint
 
MosaicSceneWidgetm_mosaicScene
 
ControlPointm_controlPoint
 
bool m_showArrow
 
bool m_colorByMeasureCount
 Are we coloring the movement arrow based on CP measure count.
 
bool m_colorByResidualMagnitude
 Are we coloring the movement arrow based on max CM residual magnitude.
 
int m_measureCount
 Measure count threshold for colored vs. black.
 
double m_residualMagnitude
 Residual magnitude threshold for colored vs. black.
 

Detailed Description

The visual display of a single control point.

The control point tries to always draw itself at a constant size and uses the scene pointer to accomplish this.

Author
2011-05-07 Steven Lambright
History

2011-05-09 Steven Lambright - Fixed known issue with paint() when zoomed in.

2011-05-10 Steven Lambright - Added arrow capabilities, fixed problem with boundingRect() that seemed to cause a crash.

2011-06-07 Debbie A. Cook and Tracie Sucharski - Modified point types Ground ------> Fixed Tie----------> Free

2013-01-02 Steven Lambright - Updated setArrowVisible() to support new coloring options. The design of this configuration is wrong/needs fixed, but I'm leaving it alone due to time constraints. Updated paint() method to appropriately apply colors. Fixes #479.

2016-05-18 Ian Humphrey - Updated the control point crosses to be cosmetic so that they always appear on screen (Qt4 to Qt5).

2016-10-20 Tracie Sucharski - Remove obsolete code that was commented out. Fixes #4479.

2017-08-02 Tracie Sucharski - Draw the current edit Control Point as a circle with center crosshair in red. Fixes #5007, #5008.

2018-05-01 Kaitlyn Lee - Changed colors of control points to match qnet. Colors Changed: free from blue to darkGreen, locked from magenta to darkGreen, ignored from red to yellow, and constrained (was dark green) and fixed (was green) are now both represented with magenta. Fixes #5401.

Definition at line 45 of file ControlPointGraphicsItem.h.

Constructor & Destructor Documentation

◆ ControlPointGraphicsItem()

Isis::ControlPointGraphicsItem::ControlPointGraphicsItem ( QPointF center,
QPointF apriori,
ControlPoint * cp,
SerialNumberList * snList,
MosaicSceneWidget * boundingRectSrc,
QGraphicsItem * parent )

Create a CP graphics item.

This will colorize and set the appropriate toolTip for this control point.

Definition at line 33 of file ControlPointGraphicsItem.cpp.

References Isis::ControlPoint::Constrained, Isis::ControlPoint::Fixed, m_colorByMeasureCount, m_colorByResidualMagnitude, m_measureCount, m_residualMagnitude, and Isis::Null.

◆ ~ControlPointGraphicsItem()

Isis::ControlPointGraphicsItem::~ControlPointGraphicsItem ( )
virtual

Definition at line 77 of file ControlPointGraphicsItem.cpp.

Member Function Documentation

◆ calcArrowHead()

QPolygonF Isis::ControlPointGraphicsItem::calcArrowHead ( ) const
private

Definition at line 284 of file ControlPointGraphicsItem.cpp.

◆ calcCrosshairRect()

QRectF Isis::ControlPointGraphicsItem::calcCrosshairRect ( ) const
private

Definition at line 264 of file ControlPointGraphicsItem.cpp.

◆ calcRect()

QRectF Isis::ControlPointGraphicsItem::calcRect ( ) const
private

Definition at line 234 of file ControlPointGraphicsItem.cpp.

◆ contextMenuEvent()

void Isis::ControlPointGraphicsItem::contextMenuEvent ( QGraphicsSceneContextMenuEvent * event)
protected

Definition at line 214 of file ControlPointGraphicsItem.cpp.

◆ controlPoint()

ControlPoint * Isis::ControlPointGraphicsItem::controlPoint ( )

Definition at line 195 of file ControlPointGraphicsItem.cpp.

◆ makeToolTip()

QString Isis::ControlPointGraphicsItem::makeToolTip ( SerialNumberList * snlist)
private

Definition at line 315 of file ControlPointGraphicsItem.cpp.

◆ paint()

void Isis::ControlPointGraphicsItem::paint ( QPainter * painter,
const QStyleOptionGraphicsItem * style,
QWidget * widget = 0 )

This virtual paint method is called anytime an update() or paintEvent() is called.

Parameters
painter(QPainter *) Painter used to draw
style(QStyleOptionGraphicsItem *) Describes parameters used to draw a QGraphicsItem
widget(QWidget *) Optional argument which indicates the widget that is being painted on

Definition at line 99 of file ControlPointGraphicsItem.cpp.

References Isis::Statistics::AddData(), Isis::Directory::editPointId(), Isis::ControlPoint::GetId(), Isis::ControlPoint::getMeasures(), Isis::IsSpecial(), m_colorByMeasureCount, m_colorByResidualMagnitude, m_measureCount, m_residualMagnitude, and Isis::Null.

◆ setArrowVisible()

void Isis::ControlPointGraphicsItem::setArrowVisible ( bool visible,
bool colorByMeasureCount,
int measureCount,
bool colorByResidualMagnitude,
double residualMagnitude )

Definition at line 199 of file ControlPointGraphicsItem.cpp.

Member Data Documentation

◆ m_centerPoint

QPointF* Isis::ControlPointGraphicsItem::m_centerPoint
private

Definition at line 69 of file ControlPointGraphicsItem.h.

◆ m_colorByMeasureCount

bool Isis::ControlPointGraphicsItem::m_colorByMeasureCount
private

Are we coloring the movement arrow based on CP measure count.

Definition at line 75 of file ControlPointGraphicsItem.h.

Referenced by ControlPointGraphicsItem(), and paint().

◆ m_colorByResidualMagnitude

bool Isis::ControlPointGraphicsItem::m_colorByResidualMagnitude
private

Are we coloring the movement arrow based on max CM residual magnitude.

Definition at line 77 of file ControlPointGraphicsItem.h.

Referenced by ControlPointGraphicsItem(), and paint().

◆ m_controlPoint

ControlPoint* Isis::ControlPointGraphicsItem::m_controlPoint
private

Definition at line 72 of file ControlPointGraphicsItem.h.

◆ m_measureCount

int Isis::ControlPointGraphicsItem::m_measureCount
private

Measure count threshold for colored vs. black.

Definition at line 79 of file ControlPointGraphicsItem.h.

Referenced by ControlPointGraphicsItem(), and paint().

◆ m_mosaicScene

MosaicSceneWidget* Isis::ControlPointGraphicsItem::m_mosaicScene
private

Definition at line 71 of file ControlPointGraphicsItem.h.

◆ m_origPoint

QPointF* Isis::ControlPointGraphicsItem::m_origPoint
private

Definition at line 70 of file ControlPointGraphicsItem.h.

◆ m_residualMagnitude

double Isis::ControlPointGraphicsItem::m_residualMagnitude
private

Residual magnitude threshold for colored vs. black.

Definition at line 81 of file ControlPointGraphicsItem.h.

Referenced by ControlPointGraphicsItem(), and paint().

◆ m_showArrow

bool Isis::ControlPointGraphicsItem::m_showArrow
private

Definition at line 73 of file ControlPointGraphicsItem.h.


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