Isis 3 Programmer Reference
|
This widget encompasses the entire mosaic scene. More...
#include <MosaicSceneWidget.h>
Classes | |
class | XmlHandler |
Public Slots | |
void | addImages (ImageList) |
void | removeImages (ImageList) |
void | refit () |
This method refits t:he items in the graphics view. More... | |
void | setCubesSelectable (bool) |
void | setProjection (Projection *) |
This method takes ownership of proj. More... | |
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. More... | |
MosaicGraphicsView * | getView () const |
QGraphicsScene * | getScene () const |
Projection * | getProjection () 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. More... | |
MosaicSceneItem * | cubeToMosaic (Image *) |
bool | cubesSelectable () const |
void | enableRubberBand (bool) |
bool | blockSelectionChange (bool) |
bool | userHasTools () const |
QProgressBar * | getProgress () |
PvlObject | toPvl () const |
void | fromPvl (const PvlObject &) |
Call this method after loading any cubes when loading a project. More... | |
void | load (XmlStackedHandlerReader *xmlReader) |
void | save (QXmlStreamWriter &stream, Project *project, FileName newProjectRoot) const |
QRectF | cubesBoundingRect () const |
QStringList | cubeFileNames () |
Directory * | directory () const |
ImageList | images () |
ImageList | selectedImages () |
Returns a list of all the cubes selected in the scene. More... | |
QList< QAction * > | getExportActions () |
QList< QAction * > | getViewActions () |
QList< QAction * > | supportedActions (ImageList *) |
Get a list of actions this scene can perform given "images". More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
double | moveZ (MosaicSceneItem *sceneItem, double newZ, bool newZValueMightExist=true) |
This method moves the given scene item to the given Z value. More... | |
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. More... | |
bool | isControlNetToolActive () |
Static Public Member Functions | |
static QWidget * | getControlNetHelp (QWidget *cnetToolContainer=NULL) |
static QWidget * | getGridHelp (QWidget *gridToolContainer=NULL) |
static QWidget * | getLongHelp (QWidget *mosaicSceneContainer=NULL) |
static QWidget * | getMapHelp (QWidget *mapContainer=NULL) |
static QWidget * | getPreviewHelp (QWidget *worldViewContainer=NULL) |
Protected Member Functions | |
virtual bool | eventFilter (QObject *obj, QEvent *ev) |
Private Slots | |
void | exportView () |
Saves the scene as a png, jpg, or tif file. More... | |
void | saveList () |
void | removeMosItem (QObject *) |
void | moveDownOne () |
void | moveToBottom () |
void | moveUpOne () |
void | moveToTop () |
void | fitInView () |
void | onSelectionChanged () |
void | onQueuedSelectionChanged () |
void | configProjectionParameters () |
This happens when the user clicks on the map action (the button that is named after the current projection). More... | |
void | quickConfigProjectionParameters () |
void | sendVisibleRectChanged () |
Private Member Functions | |
void | setProjection (const PvlGroup &mappingGroup, Pvl label=Pvl()) |
MosaicSceneItem * | addImage (Image *image) |
void | reprojectItems () |
Reprojects all the items in the view. More... | |
double | maximumZ () |
double | minimumZ () |
void | recalcSceneRect () |
MosaicSceneItem * | getNextItem (MosaicSceneItem *item, bool up) |
Implemented because we want invisible items too. More... | |
PvlGroup | createInitialProjection (Image *cube) |
MosaicSceneItem * | cubeToMosaic (DisplayProperties *props) |
Static Private Member Functions | |
static bool | zOrderGreaterThan (MosaicSceneItem *first, MosaicSceneItem *second) |
Private Attributes | |
Directory * | m_directory |
bool | m_cubesSelectable |
bool | m_customRubberBandEnabled |
QRubberBand * | m_customRubberBand |
QPoint * | m_rubberBandOrigin |
QGraphicsScene * | m_graphicsScene |
The graphics scene that makes up this widget. More... | |
MosaicGraphicsView * | m_graphicsView |
The graphics view. More... | |
Projection * | m_projection |
The current projection type. More... | |
QList< MosaicSceneItem * > * | m_mosaicSceneItems |
QMap< DisplayProperties *, MosaicSceneItem * > | m_displayPropsToMosaicSceneItemMap |
QGraphicsRectItem * | m_outlineRect |
QToolButton * | m_mapButton |
QAction * | m_quickMapAction |
QList< MosaicTool * > * | m_tools |
ToolPad * | m_toolpad |
QToolBar * | m_permToolbar |
QToolBar * | m_activeToolbar |
ProgressBar * | m_progress |
QHash< QString, double > * | m_projectImageZOrders |
bool | m_blockingSelectionChanged |
bool | m_userToolControl |
bool | m_ownProjection |
bool | m_queuedSelectionChanged |
bool | m_shouldRequeueSelectionChanged |
double | m_currentMinimumFootprintZ |
double | m_currentMaximumFootprintZ |
PvlObject * | m_projectViewTransform |
This widget encompasses the entire mosaic scene.
This widget is a self-contained 2D footprint view using Qt's graphics scene/view framework.
Definition at line 153 of file MosaicSceneWidget.h.
Isis::MosaicSceneWidget::MosaicSceneWidget | ( | QStatusBar * | status, |
bool | showTools, | ||
bool | internalizeToolBarsAndProgress, | ||
Directory * | directory, | ||
QWidget * | parent = 0 |
||
) |
Create a scene widget.
Definition at line 66 of file MosaicSceneWidget.cpp.
References m_graphicsScene, m_graphicsView, and m_projection.
|
privateslot |
This happens when the user clicks on the map action (the button that is named after the current projection).
This method pops up a modal configuration dialog for the map file.
Definition at line 1515 of file MosaicSceneWidget.cpp.
bool Isis::MosaicSceneWidget::contextMenuEvent | ( | QGraphicsSceneContextMenuEvent * | event | ) |
This is called by MosaicGraphicsScene::contextMenuEvent.
Return false if not handled, true if handled.
Definition at line 442 of file MosaicSceneWidget.cpp.
References Isis::ImageList::append(), Isis::Directory::project(), selectedImages(), Isis::Directory::supportedActions(), and Isis::ImageList::supportedActions().
|
privateslot |
Saves the scene as a png, jpg, or tif file.
Definition at line 1427 of file MosaicSceneWidget.cpp.
void Isis::MosaicSceneWidget::fromPvl | ( | const PvlObject & | project | ) |
Call this method after loading any cubes when loading a project.
project | The project Pvl |
Definition at line 581 of file MosaicSceneWidget.cpp.
References Isis::PvlObject::findGroup(), Isis::PvlObject::findObject(), Isis::PvlObject::hasObject(), Isis::PvlContainer::keywords(), setProjection(), and Isis::toDouble().
|
private |
Implemented because we want invisible items too.
Definition at line 2074 of file MosaicSceneWidget.cpp.
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.
Definition at line 1810 of file MosaicSceneWidget.cpp.
References moveToBottom().
This doesn't compress the Z values - the original Z values of these images are guaranteed to be empty after this operation.
Definition at line 1819 of file MosaicSceneWidget.cpp.
References moveToBottom().
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.
Definition at line 1789 of file MosaicSceneWidget.cpp.
Referenced by moveToBottom().
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.
Definition at line 1918 of file MosaicSceneWidget.cpp.
References moveToTop().
This doesn't compress the Z values - the original Z values of these images are guaranteed to be empty after this operation.
Definition at line 1927 of file MosaicSceneWidget.cpp.
References moveToTop().
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.
Definition at line 1887 of file MosaicSceneWidget.cpp.
Referenced by moveToTop().
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.
sceneItem | The item in this scene to change the Z value |
newZ | The new Z value for the item |
newZValueMightExist | True if an item in the scene might occupy the new Z value |
Definition at line 1955 of file MosaicSceneWidget.cpp.
Referenced by Isis::MosaicSceneWorkOrder::restoreZPositions().
|
slot |
This method refits t:he items in the graphics view.
Definition at line 1485 of file MosaicSceneWidget.cpp.
Referenced by reprojectItems(), and Isis::MosaicZoomTool::zoomFit().
|
private |
Reprojects all the items in the view.
Also makes sure to resize the view rectangle to fit the newly projected footprints.
Definition at line 1680 of file MosaicSceneWidget.cpp.
References Isis::DisplayProperties::displayName(), Isis::Image::displayProperties(), Isis::IException::print(), Isis::IException::Programmer, refit(), Isis::MosaicSceneItem::reproject(), and Isis::ProgressBar::setText().
Referenced by setProjection().
ImageList Isis::MosaicSceneWidget::selectedImages | ( | ) |
Returns a list of all the cubes selected in the scene.
Definition at line 742 of file MosaicSceneWidget.cpp.
References Isis::ImageList::append().
Referenced by contextMenuEvent(), and Isis::Footprint2DView::onQueueSelectionChanged().
|
slot |
This method takes ownership of proj.
Definition at line 290 of file MosaicSceneWidget.cpp.
References Isis::PvlContainer::findKeyword(), m_projection, and reprojectItems().
Referenced by fromPvl().
|
inline |
Return an empty list of actions for unknown data types.
Definition at line 240 of file MosaicSceneWidget.h.
Get a list of actions this scene can perform given "images".
Definition at line 812 of file MosaicSceneWidget.cpp.
References Isis::Directory::project(), and Isis::WorkOrder::setData().
|
private |
The graphics scene that makes up this widget.
Definition at line 364 of file MosaicSceneWidget.h.
Referenced by MosaicSceneWidget().
|
private |
The graphics view.
Definition at line 365 of file MosaicSceneWidget.h.
Referenced by MosaicSceneWidget().
|
private |
The current projection type.
Definition at line 366 of file MosaicSceneWidget.h.
Referenced by MosaicSceneWidget(), and setProjection().