9#include "Footprint2DView.h"
13#include <QDragEnterEvent>
14#include <QDragMoveEvent>
16#include <QItemSelectionModel>
27#include <QWidgetAction>
28#include <QXmlStreamWriter>
30#include "ControlNetTool.h"
31#include "ControlPoint.h"
35#include "ImageFileListWidget.h"
36#include "MosaicGraphicsView.h"
37#include "MosaicSceneWidget.h"
38#include "MosaicControlNetTool.h"
40#include "ProjectItem.h"
41#include "ProjectItemModel.h"
54 QStatusBar *statusBar =
new QStatusBar(
this);
59 graphicsView->installEventFilter(
this);
60 graphicsView->setAcceptDrops(
false);
80 connect(
m_sceneWidget, SIGNAL(createControlPoint(
double,
double)),
81 this, SIGNAL(createControlPoint(
double,
double)));
89 connect(
this, SIGNAL(redrawMeasures()),
m_sceneWidget->getScene(), SLOT(update()));
91 setStatusBar(statusBar);
101 imageFileListdock->setObjectName(imageFileListdock->windowTitle());
102 imageFileListdock->setFeatures( QDockWidget::DockWidgetFloatable |
103 QDockWidget::DockWidgetMovable);
105 imageFileListdock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
109 addDockWidget(Qt::LeftDockWidgetArea, imageFileListdock, Qt::Vertical);
122 addToolBar(Qt::RightToolBarArea,
m_toolPad);
129 foreach (
QAction *action, findChildren<QAction *>()) {
176 if (event->type() == QEvent::DragEnter) {
180 else if (event->type() == QEvent::DragMove) {
184 else if (event->type() == QEvent::Drop) {
185 dropEvent(
static_cast<QDropEvent *
>(event) );
189 return AbstractProjectItemView::eventFilter(watched, event);
211 image = item->
image();
214 m_images.append(image);
291 if (selectedImages.isEmpty() ) {
295 Image *currentImage = selectedImages.first();
303 foreach (
Image *image, selectedImages) {
319 if (action->toolTip() ==
"Control Net (c)") {
320 action->setEnabled(value);
335 foreach (
QAction *action, actions()) {
336 if (action->toolTip() ==
"Control Net (c)" && !
m_directory->project()->activeControl()) {
339 action->setEnabled(
true);
357 stream.writeStartElement(
"footprint2DView");
358 stream.writeAttribute(
"objectName", objectName());
363 stream.writeEndElement();
virtual void dropEvent(QDropEvent *event)
Drops the data into the internal model if it can accept the data.
virtual void dragEnterEvent(QDragEnterEvent *event)
Accepts the drag enter event if the internal model can accept the mime data.
virtual void dragMoveEvent(QDragMoveEvent *event)
Accepts the drag event if the internal model can accept the mime data.
virtual void disableActions()
Disables toolbars and toolpad actions.
AbstractProjectItemView(QWidget *parent=0)
Constructs the AbstractProjectItemView.
virtual ProjectItemModel * internalModel()
Returns the internal model of the view.
File name manipulation and expansion.
This represents a cube in a project-based GUI interface.
Internalizes a list of images and allows for operations on the entire list.
void append(Image *const &value)
Appends an image to the image list.
A graphics view that resizes in a more friendly way.
The main project for ipce.
Represents an item of a ProjectItemModel in Qt's model-view framework.
bool isShape() const
Returns true if an Shape is stored in the data of the item.
Shape * shape() const
Returns the Shape stored in the data of the item.
Image * image() const
Returns the Image stored in the data of the item.
bool isImage() const
Returns true if an Image is stored in the data of the item.
QItemSelectionModel * selectionModel()
Returns the internal selection model.
QString id() const
Get a unique, identifying string associated with this shape.
Cube * cube()
Get the Cube * associated with this display property.
geos::geom::MultiPolygon * footprint()
Get the footprint of this shape (if available).
This is free and unencumbered software released into the public domain.