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
36 // set /mainwindo/showTestMenu=true...
40 void editHeadingFinished();
46 virtual void contextMenuEvent ( QContextMenuEvent *e );
47 virtual void keyPressEvent(QKeyEvent*);
48 virtual void keyReleaseEvent(QKeyEvent*);
49 virtual void mousePressEvent(QMouseEvent*);
50 virtual void mouseMoveEvent(QMouseEvent*);
51 virtual void mouseReleaseEvent(QMouseEvent*);
52 virtual void mouseDoubleClickEvent(QMouseEvent*);
53 virtual void resizeEvent( QResizeEvent * );
55 void dragEnterEvent (QDragEnterEvent *);
56 void dragMoveEvent (QDragMoveEvent *);
57 void dragLeaveEvent (QDragLeaveEvent *);
58 void dropEvent (QDropEvent *);
62 QGraphicsScene *mapScene;
63 VymModel *model; // Vym Map, includding several mapCenters
65 bool adjustCanvasRequested; // collect requests until end of user event
66 BranchObj *editingBO; // entering Text into BO
68 QCursor HandOpenCursor; // cursor while moving canvas view
69 QCursor PickColorCursor; // cursor while picking color
70 QCursor CopyCursor; // cursor while picking color
71 QCursor XLinkCursor; // cursor while picking color
73 bool drawingLink; // true while creating a link
74 bool copyingObj; // true while creating a link
77 MapObj* movingObj; // moving a MapObj
78 MapObj* linkingObj_src; // part of a link
79 QPointF movingObj_orgPos; // org. pos of mouse before move
80 QPointF movingObj_orgRelPos; // org. relative pos of mouse before move
81 QPointF movingObj_start; // rel. pos of mouse to absPos
82 QPointF movingCont_start; // inital pos of moving Content or
83 QPointF movingVec; // how far has Content moved
85 QPointF contextMenuPos; // position where context event was triggered
87 QPrinter* printer; // Printing
89 AttributeTable *attrTable;
91 bool printFrame; // Print frame around map
92 bool printFooter; // Print footer below map
94 QPoint exportOffset; // set before export, used in save
96 Selection xelection; // FIXME only here to get rid of some gcc errors...
97 QString getName(const LinkableMapObj*); // FIXME see above, renamed to getObjectName in VymModel...