4 #include <QGraphicsView>
7 #include "ornamentedobj.h"
8 #include "selection.h" // FIXME should not be needed
13 /*! \brief Main widget in vym to display and edit a map */
15 class MapEditor : public QGraphicsView {
19 MapEditor(VymModel *vm);
22 QGraphicsScene * getScene();
25 void print(); //!< Print the map
26 void setAntiAlias (bool); //!< Set or unset antialiasing
27 void setSmoothPixmap(bool); //!< Set or unset smoothing of pixmaps
29 void toggleStandardFlag(QString);
31 void updateSelection(); // update geometry of selection
33 AttributeTable* attributeTable();
34 void testFunction1(); // just testing new stuff
35 void testFunction2(); // just testing new stuff
39 void editHeadingFinished();
45 virtual void contextMenuEvent ( QContextMenuEvent *e );
46 virtual void keyPressEvent(QKeyEvent*);
47 virtual void keyReleaseEvent(QKeyEvent*);
48 virtual void mousePressEvent(QMouseEvent*);
49 virtual void mouseMoveEvent(QMouseEvent*);
50 virtual void mouseReleaseEvent(QMouseEvent*);
51 virtual void mouseDoubleClickEvent(QMouseEvent*);
52 virtual void resizeEvent( QResizeEvent * );
54 void dragEnterEvent (QDragEnterEvent *);
55 void dragMoveEvent (QDragMoveEvent *);
56 void dragLeaveEvent (QDragLeaveEvent *);
57 void dropEvent (QDropEvent *);
61 QGraphicsScene *mapScene;
62 VymModel *model; //!< Vym Map, includding several mapCenters
64 bool adjustCanvasRequested; // collect requests until end of user event
65 BranchObj *editingBO; // entering Text into BO
67 QCursor HandOpenCursor; // cursor while moving canvas view
68 QCursor PickColorCursor; // cursor while picking color
69 QCursor CopyCursor; // cursor while picking color
70 QCursor XLinkCursor; // cursor while picking color
72 bool drawingLink; // true while creating a link
73 bool copyingObj; // true while creating a link
76 MapObj* movingObj; // moving a MapObj
77 MapObj* linkingObj_src; // part of a link
78 QPointF movingObj_orgPos; // org. pos of mouse before move
79 QPointF movingObj_orgRelPos; // org. relative pos of mouse before move
80 QPointF movingObj_start; // rel. pos of mouse to absPos
81 QPointF movingCont_start; // inital pos of moving Content or
82 QPointF movingVec; // how far has Content moved
84 QPointF contextMenuPos; // position where context event was triggered
86 QPrinter* printer; // Printing
88 AttributeTable *attrTable;
90 bool printFrame; // Print frame around map
91 bool printFooter; // Print footer below map
93 QPoint exportOffset; // set before export, used in save
95 Selection xelection; // FIXME only here to get rid of some gcc errors...
96 QString getName(const LinkableMapObj*); // FIXME see above, renamed to getObjectName in VymModel...