23 #include "IsisDebug.h" 28 #include <QDockWidget> 29 #include <QDragEnterEvent> 30 #include <QDragMoveEvent> 32 #include <QItemSelectionModel> 35 #include <QSizePolicy> 39 #include <QHBoxLayout> 40 #include <QMainWindow> 41 #include <QVBoxLayout> 43 #include <QWidgetAction> 44 #include <QXmlStreamWriter> 46 #include "ControlNetTool.h" 51 #include "ImageFileListWidget.h" 52 #include "MosaicGraphicsView.h" 53 #include "MosaicSceneWidget.h" 54 #include "MosaicControlNetTool.h" 60 #include "XmlStackedHandlerReader.h" 71 QStatusBar *statusBar =
new QStatusBar(
this);
76 graphicsView->installEventFilter(
this);
77 graphicsView->setAcceptDrops(
false);
97 connect(
m_sceneWidget, SIGNAL(createControlPoint(
double,
double)),
98 this, SIGNAL(createControlPoint(
double,
double)));
106 connect(
this, SIGNAL(redrawMeasures()),
m_sceneWidget->getScene(), SLOT(update()));
108 setStatusBar(statusBar);
118 imageFileListdock->setObjectName(imageFileListdock->windowTitle());
119 imageFileListdock->setFeatures( QDockWidget::DockWidgetFloatable |
120 QDockWidget::DockWidgetMovable);
122 imageFileListdock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
126 addDockWidget(Qt::LeftDockWidgetArea, imageFileListdock, Qt::Vertical);
139 addToolBar(Qt::RightToolBarArea,
m_toolPad);
146 foreach (
QAction *action, findChildren<QAction *>()) {
193 if (event->type() == QEvent::DragEnter) {
197 else if (event->type() == QEvent::DragMove) {
201 else if (event->type() == QEvent::Drop) {
202 dropEvent( static_cast<QDropEvent *>(event) );
206 return AbstractProjectItemView::eventFilter(watched, event);
228 image = item->
image();
308 if (selectedImages.isEmpty() ) {
312 Image *currentImage = selectedImages.first();
320 foreach (
Image *image, selectedImages) {
336 if (action->toolTip() ==
"Control Net (c)") {
337 action->setEnabled(value);
352 foreach (
QAction *action, actions()) {
356 action->setEnabled(
true);
383 stream.writeStartElement(
"footprint2DView");
384 stream.writeAttribute(
"objectName", objectName());
389 stream.writeEndElement();
426 const QString &qName,
const QXmlAttributes &atts) {
427 bool result = XmlStackedHandler::startElement(namespaceURI, localName, qName, atts);
430 if (localName ==
"mosaicScene") {
431 m_footprintView->mosaicSceneWidget()->load(reader());
433 if (localName ==
"imageFileList") {
434 m_footprintView->m_fileListWidget->load(reader());
441 bool Footprint2DView::XmlHandler::endElement(
const QString &namespaceURI,
442 const QString &localName,
const QString &qName) {
443 bool result = XmlStackedHandler::endElement(namespaceURI, localName, qName);
Internalizes a list of images and allows for operations on the entire list.
The main project for ipce.
bool isImage() const
Returns true if an Image is stored in the data of the item.
A graphics view that resizes in a more friendly way.
File name manipulation and expansion.
virtual void dropEvent(QDropEvent *event)
Drops the data into the internal model if it can accept the data.
virtual void disableActions()
Disables toolbars and toolpad actions.
Control * activeControl()
Return the Active Control (control network)
AbstractProjectItemView is a base class for views of a ProjectItemModel in Qt's model-view framework...
virtual ProjectItemModel * internalModel()
Returns the internal model of the view.
QItemSelectionModel * selectionModel()
Returns the internal selection model.
Cube * cube()
Get the Cube * associated with this display property.
virtual void dragMoveEvent(QDragMoveEvent *event)
Accepts the drag event if the internal model can accept the mime data.
virtual void pushContentHandler(XmlStackedHandler *newHandler)
Push a contentHandler and maybe continue parsing...
This represents a cube in a project-based GUI interface.
geos::geom::MultiPolygon * footprint()
Get the footprint of this shape (if available).
Image * image() const
Returns the Image stored in the data of the item.
QString id() const
Get a unique, identifying string associated with this shape.
void append(Image *const &value)
Appends an image to the image list.
virtual void dragEnterEvent(QDragEnterEvent *event)
Accepts the drag enter event if the internal model can accept the mime data.
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
Shape * shape() const
Returns the Shape stored in the data of the item.
Represents an item of a ProjectItemModel in Qt's model-view framework.
Namespace for ISIS/Bullet specific routines.
Project * project() const
Gets the Project for this directory.
bool isShape() const
Returns true if an Shape is stored in the data of the item.
Manage a stack of content handlers for reading XML files.