Isis 3 Programmer Reference
|
View for displaying footprints of images in a QMos like way. More...
#include <Footprint2DView.h>
Classes | |
class | XmlHandler |
Public Slots | |
void | enableControlNetTool (bool value) |
A slot function that is called when directory emits a siganl that an active control network is set. More... | |
virtual void | addItem (ProjectItem *item) |
Adds an item to the view. More... | |
virtual void | addItems (QList< ProjectItem * > items) |
Adds several items to the view. More... | |
virtual void | removeItem (ProjectItem *item) |
Removes an item to the view. More... | |
virtual void | removeItems (QList< ProjectItem * > items) |
Removes several items from the view. More... | |
virtual void | disableActions () |
Disables toolbars and toolpad actions. More... | |
Signals | |
void | modifyControlPoint (ControlPoint *controlPoint) |
void | deleteControlPoint (ControlPoint *controlPoint) |
void | createControlPoint (double latitude, double longitude) |
void | redrawMeasures () |
void | controlPointAdded (QString newPointId) |
void | windowChangeEvent (bool event) |
Public Member Functions | |
Footprint2DView (Directory *directory, QWidget *parent=0) | |
Constructor. More... | |
~Footprint2DView () | |
Destructor. More... | |
MosaicSceneWidget * | mosaicSceneWidget () |
Accessor for the MosaicSceneWidget. More... | |
ImageFileListWidget * | fileListWidget () |
Accessor for the FileListWidget. More... | |
void | load (XmlStackedHandlerReader *xmlReader) |
Loads the Footprint2DView from an XML file. More... | |
void | save (QXmlStreamWriter &stream, Project *project, FileName newProjectRoot) const |
Save the footprint view widgets (ImageFileListWidget and MosaicSceneWidget to an XML file. More... | |
virtual QSize | sizeHint () const |
Returns the suggested size. More... | |
virtual void | setModel (ProjectItemModel *model) |
Sets the model used by the view. More... | |
virtual ProjectItemModel * | model () |
Returns the model used by the view. More... | |
virtual void | dragEnterEvent (QDragEnterEvent *event) |
Accepts the drag enter event if the internal model can accept the mime data. More... | |
virtual void | dragMoveEvent (QDragMoveEvent *event) |
Accepts the drag event if the internal model can accept the mime data. More... | |
virtual void | dropEvent (QDropEvent *event) |
Drops the data into the internal model if it can accept the data. More... | |
virtual void | moveEvent (QMoveEvent *event) |
virtual void | resizeEvent (QResizeEvent *event) |
virtual void | enterEvent (QEvent *event) |
Enables actions when cursor enters the view. More... | |
virtual void | leaveEvent (QEvent *event) |
Disables actions when cursor leaves the view. More... | |
virtual QList< QAction * > | contextMenuActions () |
Returns a list of actions appropriate for a context menu. More... | |
virtual ProjectItem * | currentItem () |
Returns the current item of the model. More... | |
virtual QList< ProjectItem * > | selectedItems () |
Return the selected items of the model. More... | |
virtual ProjectItemModel * | internalModel () |
Returns the internal model of the view. More... | |
virtual void | setInternalModel (ProjectItemModel *model) |
Sets the internal model of the view. More... | |
Protected Member Functions | |
bool | eventFilter (QObject *watched, QEvent *event) |
Event filter to filter out drag and drop events. More... | |
Private Slots | |
void | onItemAdded (ProjectItem *item) |
Slot to connect to the itemAdded signal from the model. More... | |
void | onItemsAdded () |
Slot called once all selected images have been added to the proxy model. More... | |
void | onItemRemoved (ProjectItem *item) |
Slot to connect to the itemRemoved signal from the model. More... | |
void | onQueueSelectionChanged () |
Slot to connect to the queueSelectionChanged signal from a MosiacSceneWidget. More... | |
void | onMosItemRemoved (Image *image) |
Slot at removes the mosaic item and corresponding image file list item when a cube is closed using the Close Cube context menu. More... | |
Private Member Functions | |
void | enableActions () |
Enables toolbars and toolpad actions. More... | |
Private Attributes | |
MosaicSceneWidget * | m_sceneWidget |
The scene widget. More... | |
ImageFileListWidget * | m_fileListWidget |
The file list widget. More... | |
QMainWindow * | m_window |
Main window. More... | |
ImageList | m_images |
QMap< Image *, ProjectItem * > | m_imageItemMap |
Maps images to their items. More... | |
Directory * | m_directory |
The directory. More... | |
QToolBar * | m_permToolBar |
The permanent tool bar. More... | |
QToolBar * | m_activeToolBar |
The active tool bar. More... | |
ToolPad * | m_toolPad |
The tool pad. More... | |
ProjectItemModel * | m_internalModel |
The internal model used by the view. More... | |
View for displaying footprints of images in a QMos like way.
Definition at line 102 of file Footprint2DView.h.
Constructor.
parent | (QMainWindow *) Pointer to parent QMainWindow |
Definition at line 54 of file Footprint2DView.cpp.
References Isis::AbstractProjectItemView::disableActions(), Isis::AbstractProjectItemView::internalModel(), m_activeToolBar, m_directory, m_fileListWidget, m_permToolBar, m_sceneWidget, m_toolPad, onItemAdded(), onItemRemoved(), onItemsAdded(), onMosItemRemoved(), and onQueueSelectionChanged().
Isis::Footprint2DView::~Footprint2DView | ( | ) |
Destructor.
Definition at line 142 of file Footprint2DView.cpp.
References m_activeToolBar, m_fileListWidget, m_permToolBar, and m_toolPad.
|
virtualslotinherited |
Adds an item to the view.
The item must be part of the view's model. This method can be overridden in a subclass to filter out unneeded items.
[in] | item | (ProjectItem *) The item to add. |
Definition at line 250 of file AbstractProjectItemView.cpp.
References Isis::AbstractProjectItemView::internalModel().
Referenced by Isis::CubeDnView::addItem().
|
virtualslotinherited |
Adds several items to the view.
The items must be a part of the view's model. This method can be overridden in a subclass to filter out unneeded items.
[in] | items | (QList<ProjectItem *>) The items to add. |
Definition at line 264 of file AbstractProjectItemView.cpp.
References Isis::AbstractProjectItemView::internalModel().
Referenced by Isis::CubeDnViewWorkOrder::execute(), and Isis::Footprint2DViewWorkOrder::execute().
Returns a list of actions appropriate for a context menu.
Definition at line 218 of file AbstractProjectItemView.cpp.
|
virtualinherited |
Returns the current item of the model.
Definition at line 228 of file AbstractProjectItemView.cpp.
References Isis::ProjectItemModel::currentItem(), and Isis::AbstractProjectItemView::model().
|
virtualslotinherited |
Disables toolbars and toolpad actions.
Definition at line 196 of file AbstractProjectItemView.cpp.
Referenced by Isis::CnetEditorView::CnetEditorView(), Isis::CnetEditorView::createMenus(), Footprint2DView(), Isis::AbstractProjectItemView::leaveEvent(), and Isis::CnetEditorView::leaveEvent().
|
virtualinherited |
Accepts the drag enter event if the internal model can accept the mime data.
[in] | event | (QDragEnterEvent *) The drag event |
Definition at line 119 of file AbstractProjectItemView.cpp.
References Isis::AbstractProjectItemView::internalModel().
Referenced by eventFilter().
|
virtualinherited |
Accepts the drag event if the internal model can accept the mime data.
[in] | event | (QDragMoveEvent *) The drag event |
Definition at line 134 of file AbstractProjectItemView.cpp.
References Isis::AbstractProjectItemView::internalModel().
Referenced by eventFilter().
|
virtualinherited |
Drops the data into the internal model if it can accept the data.
[in] | event | (QDropEvent *) The drop event |
Definition at line 148 of file AbstractProjectItemView.cpp.
References Isis::AbstractProjectItemView::internalModel().
Referenced by eventFilter().
|
privatevirtual |
Enables toolbars and toolpad actions.
Overriden method. If an active control network has not been set, do not enable the cnet tool.
Reimplemented from Isis::AbstractProjectItemView.
Definition at line 337 of file Footprint2DView.cpp.
References Isis::Project::activeControl(), m_directory, and Isis::Directory::project().
|
slot |
A slot function that is called when directory emits a siganl that an active control network is set.
It enables the control network editor tool in the toolpad.
value | The boolean that holds if a control network has been set. |
Definition at line 320 of file Footprint2DView.cpp.
References Isis::MosaicControlNetTool::loadNetwork(), and m_toolPad.
|
virtualinherited |
Enables actions when cursor enters the view.
event | The enter event |
Definition at line 178 of file AbstractProjectItemView.cpp.
References Isis::AbstractProjectItemView::enableActions().
|
protected |
Event filter to filter out drag and drop events.
[in] | watched | (QObject *) The object being filtered |
[in] | event | (QEvent *) The event |
Definition at line 178 of file Footprint2DView.cpp.
References Isis::AbstractProjectItemView::dragEnterEvent(), Isis::AbstractProjectItemView::dragMoveEvent(), and Isis::AbstractProjectItemView::dropEvent().
ImageFileListWidget * Isis::Footprint2DView::fileListWidget | ( | ) |
Accessor for the FileListWidget.
Definition at line 165 of file Footprint2DView.cpp.
References m_fileListWidget.
|
virtualinherited |
Returns the internal model of the view.
By default it is a proxy model.
Definition at line 108 of file AbstractProjectItemView.cpp.
References Isis::AbstractProjectItemView::m_internalModel.
Referenced by Isis::AbstractProjectItemView::addItem(), Isis::AbstractProjectItemView::addItems(), Isis::CubeDnView::CubeDnView(), Isis::AbstractProjectItemView::dragEnterEvent(), Isis::AbstractProjectItemView::dragMoveEvent(), Isis::AbstractProjectItemView::dropEvent(), Footprint2DView(), Isis::AbstractProjectItemView::model(), Isis::CubeDnView::onCubeViewportActivated(), Isis::CubeDnView::onCubeViewportDeleted(), Isis::CubeDnView::onCurrentChanged(), onQueueSelectionChanged(), Isis::ProjectItemTreeView::ProjectItemTreeView(), Isis::AbstractProjectItemView::removeItem(), Isis::ProjectItemTreeView::setInternalModel(), and Isis::AbstractProjectItemView::setModel().
|
virtualinherited |
Disables actions when cursor leaves the view.
event | The leave event |
Reimplemented in Isis::CubeDnView, and Isis::CnetEditorView.
Definition at line 188 of file AbstractProjectItemView.cpp.
References Isis::AbstractProjectItemView::disableActions().
void Isis::Footprint2DView::load | ( | XmlStackedHandlerReader * | xmlReader | ) |
Loads the Footprint2DView from an XML file.
xmlReader | The reader that takes in and parses the XML file. |
Definition at line 351 of file Footprint2DView.cpp.
References Isis::XmlStackedHandlerReader::pushContentHandler().
|
virtualinherited |
Returns the model used by the view.
If the internal model is a proxy model, it returns the source model.
Definition at line 83 of file AbstractProjectItemView.cpp.
References Isis::AbstractProjectItemView::internalModel().
Referenced by Isis::AbstractProjectItemView::currentItem(), Isis::BundleObservationView::displayCsvFile(), Isis::AbstractProjectItemView::selectedItems(), Isis::AbstractProjectItemView::setInternalModel(), Isis::ProjectItemTreeView::setInternalModel(), and Isis::AbstractProjectItemView::setModel().
MosaicSceneWidget * Isis::Footprint2DView::mosaicSceneWidget | ( | ) |
Accessor for the MosaicSceneWidget.
Definition at line 157 of file Footprint2DView.cpp.
References m_sceneWidget.
Referenced by Isis::Directory::addFootprint2DView().
|
privateslot |
Slot to connect to the itemAdded signal from the model.
If the item is an image or shape it is added to a list. When everything has been added, then the list is added to the scene through signal/slot connection from ProjectItemProxyModel signal, itemsAdded which is connected to this objects onItemsAdded slot.
[in] | item | (ProjectItem *) The item |
Definition at line 204 of file Footprint2DView.cpp.
References Isis::ImageList::append(), Isis::Shape::cube(), Isis::Shape::footprint(), Isis::Shape::id(), Isis::ProjectItem::image(), Isis::ProjectItem::isImage(), Isis::ProjectItem::isShape(), m_imageItemMap, and Isis::ProjectItem::shape().
Referenced by Footprint2DView().
|
privateslot |
Slot to connect to the itemRemoved signal from the model.
If the item is an image it removes it from the scene.
[in] | item | (ProjectItem *) The item to be removed |
Definition at line 266 of file Footprint2DView.cpp.
References Isis::ImageList::append(), Isis::ProjectItem::image(), Isis::ProjectItem::isImage(), m_fileListWidget, m_imageItemMap, m_sceneWidget, and Isis::ImageFileListWidget::removeImages().
Referenced by Footprint2DView().
|
privateslot |
Slot called once all selected images have been added to the proxy model.
This is much faster than adding a single image at a time to the MosaicSceneWidget. This is connected from the ProjectItemProxyModel::itemsAdded signal.
Definition at line 231 of file Footprint2DView.cpp.
References Isis::ImageFileListWidget::addImages(), m_fileListWidget, and m_sceneWidget.
Referenced by Footprint2DView().
|
privateslot |
Slot at removes the mosaic item and corresponding image file list item when a cube is closed using the Close Cube context menu.
image | The image that was closed and needs to be removed |
Definition at line 245 of file Footprint2DView.cpp.
References Isis::ImageList::append(), m_fileListWidget, m_imageItemMap, m_sceneWidget, and Isis::ImageFileListWidget::removeImages().
Referenced by Footprint2DView().
|
privateslot |
Slot to connect to the queueSelectionChanged signal from a MosiacSceneWidget.
Updates the selection in the model.
Definition at line 291 of file Footprint2DView.cpp.
References Isis::AbstractProjectItemView::internalModel(), m_imageItemMap, m_sceneWidget, Isis::MosaicSceneWidget::selectedImages(), and Isis::ProjectItemModel::selectionModel().
Referenced by Footprint2DView().
|
virtualslotinherited |
Removes an item to the view.
The item must be part of the view's model. This method can be overriden in a subclass to filter out unneeded items.
[in] | item | (ProjectItem *) The item to remove. |
Definition at line 278 of file AbstractProjectItemView.cpp.
References Isis::AbstractProjectItemView::internalModel().
Referenced by Isis::AbstractProjectItemView::removeItems().
|
virtualslotinherited |
Removes several items from the view.
The items must be a part of the view's model.
[in] | items | (QList<ProjectItem *>) The items to remove. |
Definition at line 292 of file AbstractProjectItemView.cpp.
References Isis::AbstractProjectItemView::removeItem().
void Isis::Footprint2DView::save | ( | QXmlStreamWriter & | stream, |
Project * | project, | ||
FileName | newProjectRoot | ||
) | const |
Save the footprint view widgets (ImageFileListWidget and MosaicSceneWidget to an XML file.
stream | The XML stream writer |
newProjectRoot | The FileName of the project this Directory is attached to. |
Definition at line 366 of file Footprint2DView.cpp.
References m_fileListWidget, m_sceneWidget, and Isis::ImageFileListWidget::save().
Referenced by Isis::Directory::save().
|
virtualinherited |
Return the selected items of the model.
Definition at line 238 of file AbstractProjectItemView.cpp.
References Isis::AbstractProjectItemView::model(), and Isis::ProjectItemModel::selectedItems().
|
virtualinherited |
Sets the internal model of the view.
[in] | model | (ProjectItemModel *) The new internal model |
Reimplemented in Isis::ProjectItemTreeView.
Definition at line 97 of file AbstractProjectItemView.cpp.
References Isis::AbstractProjectItemView::m_internalModel, and Isis::AbstractProjectItemView::model().
Referenced by Isis::ProjectItemTreeView::setInternalModel().
|
virtualinherited |
Sets the model used by the view.
If the internal model is a proxy model, it sets the source model.
[in] | model | (ProjectItemModel *) The new model |
Definition at line 69 of file AbstractProjectItemView.cpp.
References Isis::AbstractProjectItemView::internalModel(), and Isis::AbstractProjectItemView::model().
Referenced by Isis::Directory::addCubeDnView(), Isis::Directory::addFootprint2DView(), and Isis::Directory::addProjectItemTreeView().
|
virtualinherited |
Returns the suggested size.
Reimplemented in Isis::ProjectItemTreeView, and Isis::ControlHealthMonitorView.
Definition at line 53 of file AbstractProjectItemView.cpp.
|
private |
The active tool bar.
Definition at line 170 of file Footprint2DView.h.
Referenced by Footprint2DView(), and ~Footprint2DView().
|
private |
The directory.
Definition at line 167 of file Footprint2DView.h.
Referenced by enableActions(), and Footprint2DView().
|
private |
The file list widget.
Definition at line 163 of file Footprint2DView.h.
Referenced by fileListWidget(), Footprint2DView(), onItemRemoved(), onItemsAdded(), onMosItemRemoved(), save(), and ~Footprint2DView().
|
private |
Maps images to their items.
Definition at line 166 of file Footprint2DView.h.
Referenced by onItemAdded(), onItemRemoved(), onMosItemRemoved(), and onQueueSelectionChanged().
|
privateinherited |
The internal model used by the view.
Definition at line 123 of file AbstractProjectItemView.h.
Referenced by Isis::AbstractProjectItemView::AbstractProjectItemView(), Isis::AbstractProjectItemView::internalModel(), and Isis::AbstractProjectItemView::setInternalModel().
|
private |
The permanent tool bar.
Definition at line 169 of file Footprint2DView.h.
Referenced by Footprint2DView(), and ~Footprint2DView().
|
private |
The scene widget.
Definition at line 162 of file Footprint2DView.h.
Referenced by Footprint2DView(), mosaicSceneWidget(), onItemRemoved(), onItemsAdded(), onMosItemRemoved(), onQueueSelectionChanged(), and save().
|
private |
The tool pad.
Definition at line 171 of file Footprint2DView.h.
Referenced by enableControlNetTool(), Footprint2DView(), and ~Footprint2DView().
|
private |
Main window.
Definition at line 164 of file Footprint2DView.h.