23 #include "IsisDebug.h"
28 #include <QDragEnterEvent>
29 #include <QDragMoveEvent>
31 #include <QItemSelectionModel>
34 #include <QSizePolicy>
36 #include <QVBoxLayout>
38 #include <QWidgetAction>
43 #include "MosaicGraphicsView.h"
44 #include "MosaicSceneWidget.h"
62 graphicsView->installEventFilter(
this);
63 graphicsView->setAcceptDrops(
false);
81 connect(
m_sceneWidget, SIGNAL(createControlPoint(
double,
double)),
82 this, SIGNAL(createControlPoint(
double,
double)));
86 connect(
this, SIGNAL(controlPointAdded(QString)),
89 QVBoxLayout *layout =
new QVBoxLayout;
116 setAcceptDrops(
true);
118 QSizePolicy policy = sizePolicy();
119 policy.setHorizontalPolicy(QSizePolicy::Expanding);
120 policy.setVerticalPolicy(QSizePolicy::Expanding);
121 setSizePolicy(policy);
146 return QSize(800, 600);
164 if (event->type() == QEvent::DragEnter) {
168 else if (event->type() == QEvent::DragMove) {
172 else if (event->type() == QEvent::Drop) {
173 dropEvent( static_cast<QDropEvent *>(event) );
177 return AbstractProjectItemView::eventFilter(watched, event);
188 qDebug()<<
"Footprint2DView::onItemAdded";
203 image = item->
image();
250 if (selectedImages.isEmpty() ) {
254 Image *currentImage = selectedImages.first();
263 foreach (
Image *image, selectedImages) {
Internalizes a list of images and allows for operations on the entire list.
A graphics view that resizes in a more friendly way.
virtual void dropEvent(QDropEvent *event)
Drops the data into the internal model if it can accept the data.
bool isShape() const
Returns true if an Shape is stored in the data of the item.
bool isImage() const
Returns true if an Image is stored in the data of the item.
Shape * shape() const
Returns the Shape stored in the data of the item.
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.
Image * image() const
Returns the Image stored in the data of the item.
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.
This represents a cube in a project-based GUI interface.
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.
Represents an item of a ProjectItemModel in Qt's model-view framework.