Isis Developer Reference
Isis::MosaicControlNetTool Class Reference

//TODO: Remove debug printout & comment // 2016-08-25 Tracie Sucharski - Checking Directory pointer for IPCE code not ideal. More...

#include <MosaicControlNetTool.h>

Inheritance diagram for Isis::MosaicControlNetTool:
Inheritance graph
Collaboration diagram for Isis::MosaicControlNetTool:
Collaboration graph

Public Types

enum  MovementColorSource { NoMovement = 0 , NoColor , MeasureCount , ResidualMagnitude }
 This enum defines how to draw the movement arrows (arrows from CP A Priori location to adjusted location). More...
 

Public Slots

void loadNetwork ()
 Load m_controlNetFile into memory - this will re-load the network if it's already open.
 
void rebuildPointGraphics ()
 Slot used to re-create the graphics items that depict the control points.
 
void displayNewControlPoint (QString pointId)
 
void displayChangedControlPoint (QString pointId)
 
void displayUponControlPointDeletion ()
 
void activate (bool)
 Activates the tool.
 

Signals

void modifyControlPoint (ControlPoint *controlPoint)
 
void deleteControlPoint (ControlPoint *controlPoint)
 
void createControlPoint (double latitude, double longitude)
 
void controlPointSelected (ControlPoint *)
 
void deleteControlPoint (QString controlPointId)
 
void activated (bool)
 

Public Member Functions

 MosaicControlNetTool (MosaicSceneWidget *)
 MosaicControlNetTool constructor.
 
 ~MosaicControlNetTool ()
 
void addToMenu (QMenu *menu)
 
PvlObject toPvl () const
 
void fromPvl (const PvlObject &obj)
 
QString projectPvlObjectName () const
 
void setMovementArrowColorSource (MovementColorSource, int, double)
 Define how the movement arrows should be drawn.
 
MovementColorSource movementArrowColorSource () const
 Get the current setting for the movement arrows.
 
int maxMovementColorMeasureCount () const
 Get the current measure count to become fully colored.
 
double maxMovementColorResidualMagnitude () const
 Get the current max.
 
bool isActive () const
 Returns the activeness of this toool.
 
QPixmap getIcon (QString iconName) const
 returns the path to the icon directory.
 
virtual void addTo (QMenu *menu)
 
virtual void addTo (ToolPad *toolPad)
 
virtual void addTo (QToolBar *toolBar)
 
virtual QList< QAction * > getViewActions ()
 

Static Public Member Functions

static QString toString (MovementColorSource)
 Convert a MovementColorSource to a string for serialization purposes.
 
static MovementColorSource fromMovementColorSourceString (QString)
 Convert a string back to a MovementColorSource (for serialization purposes).
 

Static Public Attributes

static const int NUM_MOVEMENT_COLOR_SOURCE_VALUES = 4
 This is the count of possible values of MovementColorSource (useful for loops).
 

Protected Member Functions

QActiongetPrimaryAction ()
 Adds the action to the toolpad.
 
QWidgetgetToolBarWidget ()
 This method returns a widget that will be put in a tool bar when the tool is activated.
 
void mouseButtonRelease (QPointF, Qt::MouseButton s)
 
virtual void mouseEnter ()
 
virtual void mouseMove (QPointF)
 
virtual void mouseLeave ()
 
virtual void mouseDoubleClick (QPointF)
 
virtual void mouseButtonPress (QPointF, Qt::MouseButton s)
 
virtual void mouseWheel (QPointF, int delta)
 
virtual void rubberBandComplete (QRectF r, Qt::MouseButton s)
 
void toolBarDestroyed (QObject *obj)
 
MosaicSceneWidgetgetWidget ()
 

Detailed Description

//TODO: Remove debug printout & comment // 2016-08-25 Tracie Sucharski - Checking Directory pointer for IPCE code not ideal.

Is there a better design? This might go away if we emit signals, which only IPCE classes would connect to.

Handles Control Net displays

Author
????-??-?? Christopher Austin

Member Enumeration Documentation

◆ MovementColorSource

This enum defines how to draw the movement arrows (arrows from CP A Priori location to adjusted location).

These settings include whether the arrows are shown and how to color them.

NOTE: It's important to start at zero. Also, if you add to this enumeration, be sure to update NUM_MOVEMENT_COLOR_SOURCE_VALUES.

Enumerator
NoMovement 

Do not show movement arrows.

NoColor 

Show black movement arrows.

MeasureCount 

Show movement arrows colored by measure count.

ResidualMagnitude 

Show movement arrows colored by residual magnitude.

Constructor & Destructor Documentation

◆ MosaicControlNetTool()

Isis::MosaicControlNetTool::MosaicControlNetTool ( MosaicSceneWidget * scene)

MosaicControlNetTool constructor.

Parameters
parent

References controlPointSelected(), Isis::MosaicTool::getWidget(), and NoMovement.

◆ ~MosaicControlNetTool()

Isis::MosaicControlNetTool::~MosaicControlNetTool ( )

Member Function Documentation

◆ activate

void Isis::MosaicTool::activate ( bool on)
slotinherited

Activates the tool.

Parameters
on

References Isis::MosaicTool::activated().

Referenced by Isis::MosaicTool::addTo().

◆ activated

void Isis::MosaicTool::activated ( bool )
signalinherited

◆ addTo() [1/3]

virtual void Isis::MosaicTool::addTo ( QMenu * menu)
inlinevirtualinherited

◆ addTo() [2/3]

void Isis::MosaicTool::addTo ( QToolBar * toolBar)
virtualinherited

◆ addTo() [3/3]

void Isis::MosaicTool::addTo ( ToolPad * toolPad)
virtualinherited

◆ addToMenu()

void Isis::MosaicControlNetTool::addToMenu ( QMenu * menu)

◆ controlPointSelected

void Isis::MosaicControlNetTool::controlPointSelected ( ControlPoint * )
signal

Referenced by MosaicControlNetTool().

◆ createControlPoint

void Isis::MosaicControlNetTool::createControlPoint ( double latitude,
double longitude )
signal

Referenced by mouseButtonRelease().

◆ deleteControlPoint [1/2]

void Isis::MosaicControlNetTool::deleteControlPoint ( ControlPoint * controlPoint)
signal

Referenced by mouseButtonRelease().

◆ deleteControlPoint [2/2]

void Isis::MosaicControlNetTool::deleteControlPoint ( QString controlPointId)
signal

◆ displayChangedControlPoint

void Isis::MosaicControlNetTool::displayChangedControlPoint ( QString pointId)
slot

◆ displayNewControlPoint

void Isis::MosaicControlNetTool::displayNewControlPoint ( QString pointId)
slot

◆ displayUponControlPointDeletion

void Isis::MosaicControlNetTool::displayUponControlPointDeletion ( )
slot

◆ fromMovementColorSourceString()

MosaicControlNetTool::MovementColorSource Isis::MosaicControlNetTool::fromMovementColorSourceString ( QString string)
static

Convert a string back to a MovementColorSource (for serialization purposes).

References NoMovement, NUM_MOVEMENT_COLOR_SOURCE_VALUES, and toString().

Referenced by fromPvl().

◆ fromPvl()

void Isis::MosaicControlNetTool::fromPvl ( const PvlObject & obj)
virtual

◆ getIcon()

◆ getPrimaryAction()

QAction * Isis::MosaicControlNetTool::getPrimaryAction ( )
protectedvirtual

Adds the action to the toolpad.

Parameters
toolpad
Returns
QAction*

Implements Isis::MosaicTool.

References Isis::MosaicTool::getIcon().

◆ getToolBarWidget()

QWidget * Isis::MosaicControlNetTool::getToolBarWidget ( )
protectedvirtual

This method returns a widget that will be put in a tool bar when the tool is activated.

This method will only be called once so it can new the widget without a problem.

Reimplemented from Isis::MosaicTool.

◆ getViewActions()

QList< QAction * > Isis::MosaicTool::getViewActions ( )
virtualinherited

Reimplemented in Isis::MosaicZoomTool.

◆ getWidget()

◆ isActive()

◆ loadNetwork

void Isis::MosaicControlNetTool::loadNetwork ( )
slot

◆ maxMovementColorMeasureCount()

int Isis::MosaicControlNetTool::maxMovementColorMeasureCount ( ) const

Get the current measure count to become fully colored.

This will return -1 if it's undefined.

Referenced by toPvl().

◆ maxMovementColorResidualMagnitude()

double Isis::MosaicControlNetTool::maxMovementColorResidualMagnitude ( ) const

Get the current max.

residual magnitude to become fully colored. This will return Null if it's undefined.

References Isis::IsSpecial(), and Isis::Null.

Referenced by toPvl().

◆ modifyControlPoint

void Isis::MosaicControlNetTool::modifyControlPoint ( ControlPoint * controlPoint)
signal

Referenced by mouseButtonRelease().

◆ mouseButtonPress()

void Isis::MosaicTool::mouseButtonPress ( QPointF ,
Qt::MouseButton s )
protectedvirtualinherited

◆ mouseButtonRelease()

◆ mouseDoubleClick()

void Isis::MosaicTool::mouseDoubleClick ( QPointF )
protectedvirtualinherited

◆ mouseEnter()

virtual void Isis::MosaicTool::mouseEnter ( )
inlineprotectedvirtualinherited

◆ mouseLeave()

virtual void Isis::MosaicTool::mouseLeave ( )
inlineprotectedvirtualinherited

◆ mouseMove()

void Isis::MosaicTool::mouseMove ( QPointF )
protectedvirtualinherited

◆ mouseWheel()

void Isis::MosaicTool::mouseWheel ( QPointF ,
int delta )
protectedvirtualinherited

Reimplemented in Isis::MosaicZoomTool.

Referenced by Isis::MosaicTool::MosaicTool().

◆ movementArrowColorSource()

MosaicControlNetTool::MovementColorSource Isis::MosaicControlNetTool::movementArrowColorSource ( ) const

Get the current setting for the movement arrows.

◆ projectPvlObjectName()

QString Isis::MosaicControlNetTool::projectPvlObjectName ( ) const
virtual

Reimplemented from Isis::MosaicTool.

Referenced by toPvl().

◆ rebuildPointGraphics

void Isis::MosaicControlNetTool::rebuildPointGraphics ( )
slot

Slot used to re-create the graphics items that depict the control points.

References Isis::ControlNetGraphicsItem::buildChildren().

◆ rubberBandComplete()

virtual void Isis::MosaicTool::rubberBandComplete ( QRectF r,
Qt::MouseButton s )
inlineprotectedvirtualinherited

Reimplemented in Isis::MosaicZoomTool.

Referenced by Isis::MosaicTool::MosaicTool().

◆ setMovementArrowColorSource()

void Isis::MosaicControlNetTool::setMovementArrowColorSource ( MovementColorSource colorSource,
int maxMeasureCount,
double maxResidualMagnitude )

Define how the movement arrows should be drawn.

This includes if movement arrows should be drawn, what criteria should be used, and how to stretch (where to transition colors) the arrows.

NOTE: This is just a quick implementation and is probably not designed correctly. This is subject to change.

Parameters
colorSourceIf and how to draw and color the arrows
maxMeasureCountThe measure count to become fully colored
maxResidualMagnitudeThe max residual magnitude to become fully colored

References MeasureCount, NoMovement, ResidualMagnitude, and Isis::ControlNetGraphicsItem::setArrowsVisible().

Referenced by loadNetwork().

◆ toolBarDestroyed()

void Isis::MosaicTool::toolBarDestroyed ( QObject * obj)
protectedinherited

Referenced by Isis::MosaicTool::addTo().

◆ toPvl()

PvlObject Isis::MosaicControlNetTool::toPvl ( ) const
virtual

◆ toString()

QString Isis::MosaicControlNetTool::toString ( MovementColorSource source)
static

Convert a MovementColorSource to a string for serialization purposes.

References MeasureCount, NoColor, NoMovement, and ResidualMagnitude.

Referenced by fromMovementColorSourceString(), and toPvl().

Member Data Documentation

◆ NUM_MOVEMENT_COLOR_SOURCE_VALUES

const int Isis::MosaicControlNetTool::NUM_MOVEMENT_COLOR_SOURCE_VALUES = 4
static

This is the count of possible values of MovementColorSource (useful for loops).

Referenced by fromMovementColorSourceString().


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