Implemented drag'n drop of title block templates to diagrams + automatic integration in the parent project

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1471 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
xavier
2012-01-22 10:40:37 +00:00
parent 1ef2a0421a
commit 4795ed206d
10 changed files with 560 additions and 15 deletions

View File

@@ -19,6 +19,7 @@
#define DIAGRAMVIEW_H
#include <QtGui>
#include "elementslocation.h"
#include "templatelocation.h"
class Conductor;
class Diagram;
class Element;
@@ -78,8 +79,11 @@ class DiagramView : public QGraphicsView {
void dragLeaveEvent(QDragLeaveEvent *);
void dragMoveEvent(QDragMoveEvent *);
void dropEvent(QDropEvent *);
void handleElementDrop(QDropEvent *);
void handleTitleBlockDrop(QDropEvent *);
QRectF viewedSceneRect() const;
bool mustIntegrateElement(const ElementsLocation &) const;
bool mustIntegrateTitleBlockTemplate(const TitleBlockTemplateLocation &) const;
bool addElementAtPos(const ElementsLocation &, const QPoint &);
signals:
@@ -93,6 +97,8 @@ class DiagramView : public QGraphicsView {
void titleChanged(DiagramView *, const QString &);
/// Signal emis avant l'integration d'un element
void aboutToAddElement();
/// Signal emitted before integrating a title block template
void aboutToSetDroppedTitleBlockTemplate(const TitleBlockTemplateLocation &);
/// Signal emis lorsque l'utilisateur souhaite retrouver un element du schema dans les collections
void findElementRequired(const ElementsLocation &);
/// Signal emis lorsque l'utilisateur souhaite editer un element du schema
@@ -127,6 +133,7 @@ class DiagramView : public QGraphicsView {
private slots:
void addDroppedElement();
void setDroppedTitleBlockTemplate(const TitleBlockTemplateLocation &);
void adjustGridToZoom();
void applyReadOnly();
};