Isis 3 Programmer Reference
Isis::MosaicAreaTool Class Reference

This displays a box with a given distance from a point. More...

#include <MosaicAreaTool.h>

Inheritance diagram for Isis::MosaicAreaTool:
Inheritance graph
Collaboration diagram for Isis::MosaicAreaTool:
Collaboration graph

Public Slots

void userChangedBox ()
 
void clearBox ()
 
void activate (bool)
 Activates the tool. More...
 

Signals

void activated (bool)
 

Public Member Functions

 MosaicAreaTool (MosaicSceneWidget *)
 MosaicAreaTool constructor. More...
 
void addToMenu (QMenu *menu)
 Adds the pan action to the given menu. More...
 
PvlObject toPvl () const
 
void fromPvl (const PvlObject &obj)
 
QString projectPvlObjectName () const
 
bool isActive () const
 Returns the activeness of this toool. More...
 
QPixmap getIcon (QString iconName) const
 returns the path to the icon directory. More...
 
virtual void addTo (QMenu *menu)
 
virtual void addTo (ToolPad *toolPad)
 
virtual void addTo (QToolBar *toolBar)
 
virtual QList< QAction * > getViewActions ()
 

Protected Slots

virtual void updateTool ()
 

Protected Member Functions

QActiongetPrimaryAction ()
 Adds the action to the toolpad. More...
 
QWidgetgetToolBarWidget ()
 This method returns a widget that will be put in a tool bar when the tool is activated. More...
 
QWidgetcreateToolBarWidget ()
 Creates the widget to add to the tool bar. More...
 
void mouseButtonRelease (QPointF, Qt::MouseButton)
 
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 ()
 

Private Member Functions

QRectF calcLatLonRange (QPointF centerLatLon, Distance size)
 Given a distance and a center lat,lon this will return the bounding lat,lon rect. More...
 

Private Attributes

QActionm_drawBox
 
QLineEdit * m_lonLineEdit
 Input for longitude. More...
 
QLineEdit * m_latLineEdit
 Input for latitude. More...
 
QLineEdit * m_areaLineEdit
 Input for latitude. More...
 
QGraphicsPolygonItem * m_box
 
QActionm_action
 

Detailed Description

This displays a box with a given distance from a point.

Author
????-??-?? Steven Lambright
History:

2011-09-27 Steven Lambright - Improved user documentation

2012-04-16 Jeannie Backer - Added forward declaration for PvlObject. Added #include for PvlKeyword and PvlObject classes in implementation file.

2016-05-18 Ian Humphrey - Explicity made bounding lines cosmetic so that they always appear as 1 pixel wide on screen (Qt4 to Qt5).

Definition at line 28 of file MosaicAreaTool.h.

Constructor & Destructor Documentation

◆ MosaicAreaTool()

Isis::MosaicAreaTool::MosaicAreaTool ( MosaicSceneWidget scene)

MosaicAreaTool constructor.

Parameters
parent

Definition at line 35 of file MosaicAreaTool.cpp.

References m_areaLineEdit, m_latLineEdit, and m_lonLineEdit.

Member Function Documentation

◆ activate

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

Activates the tool.

Parameters
on

Definition at line 148 of file MosaicTool.cpp.

References Isis::MosaicTool::disableToolBar(), Isis::MosaicTool::enableToolBar(), and Isis::MosaicTool::p_active.

◆ addToMenu()

void Isis::MosaicAreaTool::addToMenu ( QMenu menu)

Adds the pan action to the given menu.

Parameters
menu

Definition at line 287 of file MosaicAreaTool.cpp.

◆ calcLatLonRange()

QRectF Isis::MosaicAreaTool::calcLatLonRange ( QPointF  centerLatLon,
Distance  size 
)
private

Given a distance and a center lat,lon this will return the bounding lat,lon rect.

The distance is the distance across the entire rectangle (i.e. width and height).

Definition at line 387 of file MosaicAreaTool.cpp.

References Isis::Angle::Degrees, Isis::Distance::Meters, Isis::Angle::Radians, and Isis::Angle::radians().

◆ createToolBarWidget()

QWidget * Isis::MosaicAreaTool::createToolBarWidget ( )
protected

Creates the widget to add to the tool bar.

Parameters
parent
Returns
QWidget*

Definition at line 337 of file MosaicAreaTool.cpp.

◆ getIcon()

◆ getPrimaryAction()

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

Adds the action to the toolpad.

Parameters
toolpad
Returns
QAction*

Implements Isis::MosaicTool.

Definition at line 220 of file MosaicAreaTool.cpp.

References Isis::MosaicTool::getIcon().

◆ getToolBarWidget()

QWidget * Isis::MosaicAreaTool::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.

Definition at line 238 of file MosaicAreaTool.cpp.

References m_areaLineEdit, m_latLineEdit, and m_lonLineEdit.

◆ isActive()

bool Isis::MosaicTool::isActive ( ) const
inlineinherited

Member Data Documentation

◆ m_areaLineEdit

QLineEdit* Isis::MosaicAreaTool::m_areaLineEdit
private

Input for latitude.

Definition at line 55 of file MosaicAreaTool.h.

Referenced by getToolBarWidget(), and MosaicAreaTool().

◆ m_latLineEdit

QLineEdit* Isis::MosaicAreaTool::m_latLineEdit
private

Input for latitude.

Definition at line 54 of file MosaicAreaTool.h.

Referenced by getToolBarWidget(), and MosaicAreaTool().

◆ m_lonLineEdit

QLineEdit* Isis::MosaicAreaTool::m_lonLineEdit
private

Input for longitude.

Definition at line 53 of file MosaicAreaTool.h.

Referenced by getToolBarWidget(), and MosaicAreaTool().


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