Isis Developer Reference
Isis::MosaicSceneWidget Class Reference

This widget encompasses the entire mosaic scene. More...

#include <MosaicSceneWidget.h>

Inheritance diagram for Isis::MosaicSceneWidget:
Inheritance graph
Collaboration diagram for Isis::MosaicSceneWidget:
Collaboration graph

Public Slots

void addImages (ImageList)
 
void removeImages (ImageList)
 
void refit ()
 This method refits t:he items in the graphics view.
 
void setCubesSelectable (bool)
 
void setProjection (Projection *)
 This method takes ownership of proj.
 
void setOutlineRect (QRectF)
 

Signals

void mouseEnter ()
 
void mouseMove (QPointF)
 
void mouseLeave ()
 
void mouseDoubleClick (QPointF)
 
void mouseButtonPress (QPointF, Qt::MouseButton s)
 
void mouseButtonRelease (QPointF, Qt::MouseButton s)
 
void mouseWheel (QPointF, int delta)
 
void projectionChanged (Projection *)
 
void rubberBandComplete (QRectF r, Qt::MouseButton s)
 
void visibleRectChanged (QRectF)
 
void cubesChanged ()
 
void queueSelectionChanged ()
 
void modifyControlPoint (ControlPoint *controlPoint)
 
void deleteControlPoint (ControlPoint *controlPoint)
 
void createControlPoint (double latitude, double longitude)
 
void controlPointSelected (ControlPoint *)
 
void cnetModified ()
 
void controlPointChanged (QString pointId)
 
void controlPointDeleted ()
 
void mosCubeClosed (Image *)
 

Public Member Functions

 MosaicSceneWidget (QStatusBar *status, bool showTools, bool internalizeToolBarsAndProgress, Directory *directory, QWidget *parent=0)
 Create a scene widget.
 
virtual ~MosaicSceneWidget ()
 
MosaicGraphicsViewgetView () const
 
QGraphicsScenegetScene () const
 
ProjectiongetProjection () const
 
QList< MosaicSceneItem * > allMosaicSceneItems ()
 
void addTo (QMenu *menu)
 
void addTo (ToolPad *toolPad)
 
void addToPermanent (QToolBar *toolBar)
 
void addTo (QToolBar *toolBar)
 
bool contextMenuEvent (QGraphicsSceneContextMenuEvent *event)
 This is called by MosaicGraphicsScene::contextMenuEvent.
 
MosaicSceneItemcubeToMosaic (Image *)
 
bool cubesSelectable () const
 
void enableRubberBand (bool)
 
bool blockSelectionChange (bool)
 
bool userHasTools () const
 
QProgressBargetProgress ()
 
PvlObject toPvl () const
 
void fromPvl (const PvlObject &)
 Call this method after loading any cubes when loading a project.
 
void load (XmlStackedHandlerReader *xmlReader)
 
void save (QXmlStreamWriter &stream, Project *project, FileName newProjectRoot) const
 
QRectF cubesBoundingRect () const
 
QStringList cubeFileNames ()
 
Directorydirectory () const
 
ImageList images ()
 
ImageList selectedImages ()
 Returns a list of all the cubes selected in the scene.
 
QList< QAction * > getExportActions ()
 
QList< QAction * > getViewActions ()
 
QList< QAction * > supportedActions (ImageList *)
 Get a list of actions this scene can perform given "images".
 
double moveDownOne (MosaicSceneItem *)
 
double moveDownOne (Image *)
 
QList< double > moveDownOne (ImageList *)
 
double moveToBottom (MosaicSceneItem *)
 This doesn't compress the Z values - the original Z values of this scene item is guaranteed to be empty after this operation.
 
double moveToBottom (Image *)
 This doesn't compress the Z values - the original Z value of this image is guaranteed to be empty after this operation.
 
QList< double > moveToBottom (ImageList *)
 This doesn't compress the Z values - the original Z values of these images are guaranteed to be empty after this operation.
 
double moveUpOne (MosaicSceneItem *)
 
double moveUpOne (Image *)
 
QList< double > moveUpOne (ImageList *)
 
double moveToTop (MosaicSceneItem *)
 This doesn't compress the Z values - the original Z values of this scene item is guaranteed to be empty after this operation.
 
double moveToTop (Image *)
 This doesn't compress the Z values - the original Z value of this image is guaranteed to be empty after this operation.
 
QList< double > moveToTop (ImageList *)
 This doesn't compress the Z values - the original Z values of these images are guaranteed to be empty after this operation.
 
double moveZ (MosaicSceneItem *sceneItem, double newZ, bool newZValueMightExist=true)
 This method moves the given scene item to the given Z value.
 
double moveZ (Image *image, double newZ, bool newZValueMightExist=true)
 
template<typename DataType >
QList< QAction * > supportedActions (DataType)
 Return an empty list of actions for unknown data types.
 
bool isControlNetToolActive ()
 

Static Public Member Functions

static QWidgetgetControlNetHelp (QWidget *cnetToolContainer=NULL)
 
static QWidgetgetGridHelp (QWidget *gridToolContainer=NULL)
 
static QWidgetgetLongHelp (QWidget *mosaicSceneContainer=NULL)
 
static QWidgetgetMapHelp (QWidget *mapContainer=NULL)
 
static QWidgetgetPreviewHelp (QWidget *worldViewContainer=NULL)
 

Protected Member Functions

virtual bool eventFilter (QObject *obj, QEvent *ev)
 

Detailed Description

This widget encompasses the entire mosaic scene.

This widget is a self-contained 2D footprint view using Qt's graphics scene/view framework.

Author
????-??-?? Stacy Alley

Constructor & Destructor Documentation

◆ MosaicSceneWidget()

Isis::MosaicSceneWidget::MosaicSceneWidget ( QStatusBar * status,
bool showTools,
bool internalizeToolBarsAndProgress,
Directory * directory,
QWidget * parent = 0 )

◆ ~MosaicSceneWidget()

Isis::MosaicSceneWidget::~MosaicSceneWidget ( )
virtual

Member Function Documentation

◆ addImages

void Isis::MosaicSceneWidget::addImages ( ImageList images)
slot

◆ addTo() [1/3]

void Isis::MosaicSceneWidget::addTo ( QMenu * menu)

◆ addTo() [2/3]

void Isis::MosaicSceneWidget::addTo ( QToolBar * toolBar)

◆ addTo() [3/3]

void Isis::MosaicSceneWidget::addTo ( ToolPad * toolPad)

◆ addToPermanent()

void Isis::MosaicSceneWidget::addToPermanent ( QToolBar * toolBar)

◆ allMosaicSceneItems()

QList< MosaicSceneItem * > Isis::MosaicSceneWidget::allMosaicSceneItems ( )
inline

◆ blockSelectionChange()

bool Isis::MosaicSceneWidget::blockSelectionChange ( bool block)

◆ cnetModified

void Isis::MosaicSceneWidget::cnetModified ( )
signal

Referenced by MosaicSceneWidget().

◆ contextMenuEvent()

bool Isis::MosaicSceneWidget::contextMenuEvent ( QGraphicsSceneContextMenuEvent * event)

◆ controlPointChanged

void Isis::MosaicSceneWidget::controlPointChanged ( QString pointId)
signal

◆ controlPointDeleted

void Isis::MosaicSceneWidget::controlPointDeleted ( )
signal

◆ controlPointSelected

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

◆ createControlPoint

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

Referenced by MosaicSceneWidget().

◆ cubeFileNames()

QStringList Isis::MosaicSceneWidget::cubeFileNames ( )

◆ cubesBoundingRect()

◆ cubesChanged

void Isis::MosaicSceneWidget::cubesChanged ( )
signal

Referenced by addImages().

◆ cubesSelectable()

bool Isis::MosaicSceneWidget::cubesSelectable ( ) const
inline

◆ cubeToMosaic()

◆ deleteControlPoint

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

Referenced by MosaicSceneWidget().

◆ directory()

◆ enableRubberBand()

void Isis::MosaicSceneWidget::enableRubberBand ( bool enable)

◆ eventFilter()

bool Isis::MosaicSceneWidget::eventFilter ( QObject * obj,
QEvent * ev )
protectedvirtual

◆ fromPvl()

void Isis::MosaicSceneWidget::fromPvl ( const PvlObject & project)

Call this method after loading any cubes when loading a project.

Parameters
projectThe project Pvl

References Isis::PvlObject::findGroup(), Isis::PvlObject::findObject(), Isis::PvlObject::hasObject(), setProjection(), and Isis::toDouble().

◆ getControlNetHelp()

QWidget * Isis::MosaicSceneWidget::getControlNetHelp ( QWidget * cnetToolContainer = NULL)
static

◆ getExportActions()

QList< QAction * > Isis::MosaicSceneWidget::getExportActions ( )

◆ getGridHelp()

QWidget * Isis::MosaicSceneWidget::getGridHelp ( QWidget * gridToolContainer = NULL)
static

◆ getLongHelp()

QWidget * Isis::MosaicSceneWidget::getLongHelp ( QWidget * mosaicSceneContainer = NULL)
static

◆ getMapHelp()

QWidget * Isis::MosaicSceneWidget::getMapHelp ( QWidget * mapContainer = NULL)
static

◆ getPreviewHelp()

QWidget * Isis::MosaicSceneWidget::getPreviewHelp ( QWidget * worldViewContainer = NULL)
static

◆ getProgress()

QProgressBar * Isis::MosaicSceneWidget::getProgress ( )

◆ getProjection()

◆ getScene()

◆ getView()

◆ getViewActions()

QList< QAction * > Isis::MosaicSceneWidget::getViewActions ( )

◆ images()

◆ isControlNetToolActive()

bool Isis::MosaicSceneWidget::isControlNetToolActive ( )

◆ load()

void Isis::MosaicSceneWidget::load ( XmlStackedHandlerReader * xmlReader)

◆ modifyControlPoint

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

Referenced by MosaicSceneWidget().

◆ mosCubeClosed

void Isis::MosaicSceneWidget::mosCubeClosed ( Image * )
signal

◆ mouseButtonPress

void Isis::MosaicSceneWidget::mouseButtonPress ( QPointF ,
Qt::MouseButton s )
signal

Referenced by eventFilter().

◆ mouseButtonRelease

void Isis::MosaicSceneWidget::mouseButtonRelease ( QPointF ,
Qt::MouseButton s )
signal

Referenced by eventFilter().

◆ mouseDoubleClick

void Isis::MosaicSceneWidget::mouseDoubleClick ( QPointF )
signal

Referenced by eventFilter().

◆ mouseEnter

void Isis::MosaicSceneWidget::mouseEnter ( )
signal

Referenced by eventFilter().

◆ mouseLeave

void Isis::MosaicSceneWidget::mouseLeave ( )
signal

Referenced by eventFilter().

◆ mouseMove

void Isis::MosaicSceneWidget::mouseMove ( QPointF )
signal

Referenced by eventFilter().

◆ mouseWheel

void Isis::MosaicSceneWidget::mouseWheel ( QPointF ,
int delta )
signal

Referenced by eventFilter().

◆ moveDownOne() [1/3]

double Isis::MosaicSceneWidget::moveDownOne ( Image * image)

References cubeToMosaic(), and moveDownOne().

◆ moveDownOne() [2/3]

QList< double > Isis::MosaicSceneWidget::moveDownOne ( ImageList * images)

References images(), and moveDownOne().

◆ moveDownOne() [3/3]

double Isis::MosaicSceneWidget::moveDownOne ( MosaicSceneItem * item)

References moveZ().

Referenced by mosCubeClosed(), moveDownOne(), and moveDownOne().

◆ moveToBottom() [1/3]

double Isis::MosaicSceneWidget::moveToBottom ( Image * image)

This doesn't compress the Z values - the original Z value of this image is guaranteed to be empty after this operation.

References cubeToMosaic(), and moveToBottom().

◆ moveToBottom() [2/3]

QList< double > Isis::MosaicSceneWidget::moveToBottom ( ImageList * images)

This doesn't compress the Z values - the original Z values of these images are guaranteed to be empty after this operation.

References images(), and moveToBottom().

◆ moveToBottom() [3/3]

double Isis::MosaicSceneWidget::moveToBottom ( MosaicSceneItem * item)

This doesn't compress the Z values - the original Z values of this scene item is guaranteed to be empty after this operation.

Referenced by mosCubeClosed(), moveToBottom(), and moveToBottom().

◆ moveToTop() [1/3]

double Isis::MosaicSceneWidget::moveToTop ( Image * image)

This doesn't compress the Z values - the original Z value of this image is guaranteed to be empty after this operation.

References cubeToMosaic(), and moveToTop().

◆ moveToTop() [2/3]

QList< double > Isis::MosaicSceneWidget::moveToTop ( ImageList * images)

This doesn't compress the Z values - the original Z values of these images are guaranteed to be empty after this operation.

References images(), and moveToTop().

◆ moveToTop() [3/3]

double Isis::MosaicSceneWidget::moveToTop ( MosaicSceneItem * item)

This doesn't compress the Z values - the original Z values of this scene item is guaranteed to be empty after this operation.

Referenced by mosCubeClosed(), moveToTop(), and moveToTop().

◆ moveUpOne() [1/3]

double Isis::MosaicSceneWidget::moveUpOne ( Image * image)

References cubeToMosaic(), and moveUpOne().

◆ moveUpOne() [2/3]

QList< double > Isis::MosaicSceneWidget::moveUpOne ( ImageList * images)

References images(), and moveUpOne().

◆ moveUpOne() [3/3]

double Isis::MosaicSceneWidget::moveUpOne ( MosaicSceneItem * item)

References moveZ().

Referenced by mosCubeClosed(), moveUpOne(), and moveUpOne().

◆ moveZ() [1/2]

double Isis::MosaicSceneWidget::moveZ ( Image * image,
double newZ,
bool newZValueMightExist = true )

References cubeToMosaic(), and moveZ().

◆ moveZ() [2/2]

double Isis::MosaicSceneWidget::moveZ ( MosaicSceneItem * sceneItem,
double newZ,
bool newZValueMightExist = true )

This method moves the given scene item to the given Z value.

By default, this does not create gaps in the Z-values and makes the necessary room/adjustments for the new item to go to it's spot. If the last operation was moveToTop or moveToBottom, because those methods don't compress/adjust the surrounding Z values, we can avoid any and all adjustments here (significant performance boost) by using newZValueMightExist=false.

N = # items in the scene The time complexity of this method is N if newZValueMightExist. The time complexity of this method is constant if !newZValueMightExist.

Parameters
sceneItemThe item in this scene to change the Z value
newZThe new Z value for the item
newZValueMightExistTrue if an item in the scene might occupy the new Z value

Referenced by moveDownOne(), moveUpOne(), moveZ(), and Isis::MosaicSceneWorkOrder::restoreZPositions().

◆ projectionChanged

void Isis::MosaicSceneWidget::projectionChanged ( Projection * )
signal

Referenced by setProjection().

◆ queueSelectionChanged

void Isis::MosaicSceneWidget::queueSelectionChanged ( )
signal

Referenced by MosaicSceneWidget().

◆ refit

void Isis::MosaicSceneWidget::refit ( )
slot

This method refits t:he items in the graphics view.

References cubesBoundingRect(), and getView().

Referenced by addImages(), setOutlineRect(), and Isis::MosaicZoomTool::zoomFit().

◆ removeImages

void Isis::MosaicSceneWidget::removeImages ( ImageList images)
slot

References cubeToMosaic(), and images().

◆ rubberBandComplete

void Isis::MosaicSceneWidget::rubberBandComplete ( QRectF r,
Qt::MouseButton s )
signal

Referenced by eventFilter().

◆ save()

void Isis::MosaicSceneWidget::save ( QXmlStreamWriter & stream,
Project * project,
FileName newProjectRoot ) const

◆ selectedImages()

ImageList Isis::MosaicSceneWidget::selectedImages ( )

Returns a list of all the cubes selected in the scene.

Returns
QList<Cube *>

References Isis::ImageList::append(), getScene(), and selectedImages().

Referenced by contextMenuEvent(), and selectedImages().

◆ setCubesSelectable

void Isis::MosaicSceneWidget::setCubesSelectable ( bool selectable)
slot

◆ setOutlineRect

void Isis::MosaicSceneWidget::setOutlineRect ( QRectF outline)
slot

References getScene(), getView(), and refit().

◆ setProjection

void Isis::MosaicSceneWidget::setProjection ( Projection * proj)
slot

This method takes ownership of proj.

References projectionChanged().

Referenced by fromPvl().

◆ supportedActions() [1/2]

template<typename DataType >
QList< QAction * > Isis::MosaicSceneWidget::supportedActions ( DataType )
inline

Return an empty list of actions for unknown data types.

◆ supportedActions() [2/2]

QList< QAction * > Isis::MosaicSceneWidget::supportedActions ( ImageList * images)

Get a list of actions this scene can perform given "images".

References cubeToMosaic(), images(), and Isis::Directory::project().

◆ toPvl()

◆ userHasTools()

bool Isis::MosaicSceneWidget::userHasTools ( ) const
inline

◆ visibleRectChanged

void Isis::MosaicSceneWidget::visibleRectChanged ( QRectF )
signal

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