Isis Developer Reference
Isis::ChipViewport Class Reference

Viewport for Isis Chips. More...

#include <ChipViewport.h>

Inheritance diagram for Isis::ChipViewport:
Inheritance graph
Collaboration diagram for Isis::ChipViewport:
Collaboration graph

Public Slots

void autoStretch ()
 Apply automatic stretch using data from entire chip.
 
void stretchFromCubeViewport (Stretch *, CubeViewport *)
 Applies a new stretch to the specified cube viewport.
 
void changeStretchLock (int)
 Locks or unlocks the stretch on the chip viewport during transformations (zoom, pan, etc.)
 
void setPoints (bool checked)
 Slot to set whether control points are drawn.
 
void setCross (bool checked)
 Slot to change state of crosshair.
 
void rotateChip (int rotation)
 Slot to rotate chip.
 
void setCircle (bool checked)
 Slot to change state of circle.
 
void setCircleSize (int size)
 Set the size of the circle.
 
void geomChip (Chip *matchChip, Cube *matchChipCube)
 Slot to geom chip (apply geometry transformation)
 
void nogeomChip ()
 Slot to un-geom chip (revert geometry transformation)
 
void panUp ()
 Pan up.
 
void panDown ()
 Pan down.
 
void panLeft ()
 Pan left.
 
void panRight ()
 Pan right.
 
void zoomIn ()
 Zoom in.
 
void zoomOut ()
 Zoom out.
 
void zoom1 ()
 Zoom by a factor of one.
 
void zoom (double zoomFactor)
 Zoom by a specified factor.
 
void refreshView (double tackSample, double tackLine)
 Slot to refresh viewport when the tack point has changed.
 
void setControlNet (ControlNet *newControlNet)
 sets the ControlNet to be used for drawing measure locations
 

Signals

void tackPointChanged (double)
 < Signal sent when tack point changes
 
void userMovedTackPoint ()
 

Public Member Functions

 ChipViewport (int width, int height, QWidget *parent=0)
 Construct an empty viewport.
 
virtual ~ChipViewport ()
 Destructor.
 
bool cubeToViewport (double samp, double line, int &x, int &y)
 Get viewport x and y from cube sample and line.
 
void setChip (Chip *chip, Cube *chipCube)
 Set chip.
 
void loadView (ChipViewport &newView)
 Load with another ChipViewport, used for blinking.
 
Chipchip () const
 Return chip.
 
CubechipCube () const
 
int chipSamples () const
 Return the number of samples in the chip.
 
int chipLines () const
 Return the number of lines in the chip.
 
int grayBand () const
 Return the gray band currently viewed.
 
double tackSample ()
 Return the position of cube under cross hair.
 
double tackLine ()
 Returns tack line.
 
double zoomFactor ()
 Return the zoom factor.
 
Stretch grayStretch () const
 Draw X on point.
 

Protected Member Functions

void paintEvent (QPaintEvent *e)
 Repaint the viewport.
 
void enterEvent (QEvent *e)
 If mouse enters, make sure key events are processed w/o clicking.
 
void keyPressEvent (QKeyEvent *e)
 Process arrow keystrokes on cube.
 
void mousePressEvent (QMouseEvent *event)
 Process mouse events.
 

Detailed Description

Viewport for Isis Chips.

Author
2007-05-01 Tracie Sucharski

Constructor & Destructor Documentation

◆ ChipViewport()

Isis::ChipViewport::ChipViewport ( int width,
int height,
QWidget * parent = 0 )

Construct an empty viewport.

Parameters
widthThe width of the viewport
heightThe height of the viewport
parentThe parent widget

◆ ~ChipViewport()

Isis::ChipViewport::~ChipViewport ( )
virtual

Destructor.

Member Function Documentation

◆ autoStretch

void Isis::ChipViewport::autoStretch ( )
slot

Apply automatic stretch using data from entire chip.

Referenced by geomChip(), nogeomChip(), rotateChip(), and setChip().

◆ changeStretchLock

void Isis::ChipViewport::changeStretchLock ( int newStatus)
slot

Locks or unlocks the stretch on the chip viewport during transformations (zoom, pan, etc.)

Parameters
newStatusNon-zero locks the stretch

◆ chip()

Chip * Isis::ChipViewport::chip ( ) const
inline

Return chip.

Referenced by setChip().

◆ chipCube()

Cube * Isis::ChipViewport::chipCube ( ) const
inline

Referenced by setChip().

◆ chipLines()

int Isis::ChipViewport::chipLines ( ) const
inline

Return the number of lines in the chip.

References Isis::Chip::Lines().

◆ chipSamples()

int Isis::ChipViewport::chipSamples ( ) const
inline

Return the number of samples in the chip.

References Isis::Chip::Samples().

◆ cubeToViewport()

bool Isis::ChipViewport::cubeToViewport ( double samp,
double line,
int & x,
int & y )

Get viewport x and y from cube sample and line.

Parameters
sampSample in cube
lineLine in cube
xCalcualated viewport x coordinate
yCalcualated viewport y coordinate
Returns
bool true if the point is contained in the viewport, false otherwise

References Isis::Chip::ChipLine(), Isis::Chip::ChipSample(), Isis::Chip::IsInsideChip(), and Isis::Chip::SetCubePosition().

Referenced by paintEvent().

◆ enterEvent()

void Isis::ChipViewport::enterEvent ( QEvent * e)
protected

If mouse enters, make sure key events are processed w/o clicking.

Parameters
eQEvent

◆ geomChip

void Isis::ChipViewport::geomChip ( Chip * matchChip,
Cube * matchChipCube )
slot

Slot to geom chip (apply geometry transformation)

Parameters
matchChipThe matching chip for the geometry
matchChipCubeThe matching chip's cube for the geometry

References autoStretch(), and Isis::Chip::Load().

◆ grayBand()

int Isis::ChipViewport::grayBand ( ) const
inline

Return the gray band currently viewed.

◆ grayStretch()

Stretch Isis::ChipViewport::grayStretch ( ) const
inline

Draw X on point.

Return the gray band stretch

◆ keyPressEvent()

void Isis::ChipViewport::keyPressEvent ( QKeyEvent * e)
protected

◆ loadView()

void Isis::ChipViewport::loadView ( ChipViewport & newView)

Load with another ChipViewport, used for blinking.

Load with info from given ChipViewport.

Parameters
newViewThe chip viewport to load from

◆ mousePressEvent()

void Isis::ChipViewport::mousePressEvent ( QMouseEvent * event)
protected

◆ nogeomChip

void Isis::ChipViewport::nogeomChip ( )
slot

Slot to un-geom chip (revert geometry transformation)

References autoStretch(), and Isis::Chip::Load().

◆ paintEvent()

void Isis::ChipViewport::paintEvent ( QPaintEvent * e)
protected

◆ panDown

◆ panLeft

◆ panRight

◆ panUp

◆ refreshView

void Isis::ChipViewport::refreshView ( double tackSample,
double tackLine )
slot

Slot to refresh viewport when the tack point has changed.

Parameters
tackSampleSample on the cube to load the chip viewport at (center)
tackLineLine on the cube to load the chip viewport at (center)

References tackLine(), and tackSample().

◆ rotateChip

void Isis::ChipViewport::rotateChip ( int rotation)
slot

Slot to rotate chip.

Parameters
rotationHow much to rotate the chip

References autoStretch(), and Isis::Chip::Load().

◆ setChip()

void Isis::ChipViewport::setChip ( Chip * chip,
Cube * chipCube )

Set chip.

Set the chip for this ChipViewport.

Parameters
chipPointer to the chip to set the viewport with
chipCubePointer to the chip's cube
Exceptions
IException::Programmer"Can not view NULL chip pointer"
Author
Tracie Sucharski

References _FILEINFO_, autoStretch(), chip(), chipCube(), Isis::Chip::Lines(), Isis::IException::Programmer, Isis::Chip::Samples(), and tackPointChanged().

Referenced by Isis::ControlMeasureEditWidget::setLeftMeasure(), Isis::ControlPointEdit::setLeftMeasure(), Isis::ControlMeasureEditWidget::setRightMeasure(), and Isis::ControlPointEdit::setRightMeasure().

◆ setCircle

void Isis::ChipViewport::setCircle ( bool checked)
slot

Slot to change state of circle.

Parameters
checkedCircle set to be drawn if true

◆ setCircleSize

void Isis::ChipViewport::setCircleSize ( int size)
slot

Set the size of the circle.

Parameters
sizeThe size of the circle

◆ setControlNet

void Isis::ChipViewport::setControlNet ( ControlNet * newControlNet)
inlineslot

sets the ControlNet to be used for drawing measure locations

Parameters
newControlNetThe new ControlNet to be used

◆ setCross

void Isis::ChipViewport::setCross ( bool checked)
slot

Slot to change state of crosshair.

Parameters
checkedCrosshair set to be drawn if true

◆ setPoints

void Isis::ChipViewport::setPoints ( bool checked)
slot

Slot to set whether control points are drawn.

Parameters
checkedControl points are set to be drawn if true

◆ stretchFromCubeViewport

void Isis::ChipViewport::stretchFromCubeViewport ( Stretch * newStretch,
CubeViewport * cvp )
slot

Applies a new stretch to the specified cube viewport.

Parameters
newStretchPointer to the new stretch to apply
cvpPointer to the cube viewport to apply the stretch to

References Isis::Cube::fileName().

◆ tackLine()

double Isis::ChipViewport::tackLine ( )

Returns tack line.

Returns
double The tack line for the chip

References Isis::Chip::CubeLine(), Isis::Chip::SetChipPosition(), Isis::Chip::TackLine(), and Isis::Chip::TackSample().

Referenced by refreshView().

◆ tackPointChanged

void Isis::ChipViewport::tackPointChanged ( double )
signal

< Signal sent when tack point changes

Referenced by setChip().

◆ tackSample()

double Isis::ChipViewport::tackSample ( )

Return the position of cube under cross hair.

Returns tack sample.

Returns
double The tack sample for the chip

References Isis::Chip::CubeSample(), Isis::Chip::SetChipPosition(), Isis::Chip::TackLine(), and Isis::Chip::TackSample().

Referenced by refreshView().

◆ userMovedTackPoint

void Isis::ChipViewport::userMovedTackPoint ( )
signal

Referenced by keyPressEvent(), and mousePressEvent().

◆ zoom

void Isis::ChipViewport::zoom ( double zoomFactor)
slot

Zoom by a specified factor.

Parameters
zoomFactorThe zoom factor

References zoomFactor().

◆ zoom1

void Isis::ChipViewport::zoom1 ( )
slot

Zoom by a factor of one.

◆ zoomFactor()

double Isis::ChipViewport::zoomFactor ( )

Return the zoom factor.

Returns the current zoom factor.

Returns
double The current zoom factor

Referenced by zoom().

◆ zoomIn

void Isis::ChipViewport::zoomIn ( )
slot

Zoom in.

◆ zoomOut

void Isis::ChipViewport::zoomOut ( )
slot

Zoom out.


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