32 #ifndef __TERRALIB_LAYOUT_INTERNAL_SCENE_H
33 #define __TERRALIB_LAYOUT_INTERNAL_SCENE_H
36 #include "../../core/AbstractScene.h"
37 #include "../../core/Config.h"
40 #include "../item/MovingItemGroup.h"
48 #include <QGraphicsScene>
56 class QGraphicsItemGroup;
59 class QStyleOptionGraphicsItem;
67 class VisualizationArea;
89 Scene(QObject*
object = (QObject*)0);
116 virtual void insertItem(QGraphicsItem* item);
124 virtual void init(
double screenWMM,
double screenHMM);
131 virtual QTransform sceneTransform();
136 virtual void deleteItems();
141 virtual void removeSelectedItems();
150 virtual QGraphicsItemGroup* createItemGroup(
const QList<QGraphicsItem *> & items );
160 virtual void destroyItemGroup( QGraphicsItemGroup *group );
174 virtual void addUndoStack( QUndoCommand* command );
181 virtual void setUndoStackLimit(
int limit );
188 virtual int getUndoStackLimit();
195 virtual QUndoStack* getUndoStack();
203 virtual void calculateSceneMeasures(
double widthMM,
double heightMM);
227 virtual bool exportPropertiesToTemplate(
EnumType* type, std::string fileName);
237 virtual std::vector<te::layout::Properties*> importTemplateToProperties(
EnumType* type, std::string fileName);
242 virtual void reset();
257 virtual void redrawSelectionMap();
264 virtual void exportItemsToImage(std::string dir);
269 virtual bool eventFilter ( QObject * watched, QEvent * event );
276 virtual void selectItem(std::string name);
282 virtual void selectItems(std::vector<std::string> names);
289 virtual void selectItems(QList<QGraphicsItem*> items);
296 virtual void selectItem(QGraphicsItem* item);
298 virtual void redrawItems();
300 virtual void updateSelectedItemsPositions();
310 virtual bool addItemStackWithoutScene(QGraphicsItem* item);
319 virtual bool removeItemStackWithoutScene(QGraphicsItem* item);
328 virtual void onChangeZoomFactor(
double currentFactor);
335 void addItemFinalized();
342 void deleteFinalized(std::vector<std::string> names);
349 virtual void calculateMatrixViewScene();
357 virtual void calculateWindow(
double wMM,
double hMM);
364 virtual std::vector<te::layout::Properties*> getItemsProperties();
QUndoStack * m_undoStack
Undo/Redo stack.
#define TELAYOUTEXPORT
You can use this macro in order to export/import classes and functions from this module.
Creates the viewing area. Ex.: creation of the sheet of paper.
QColor m_backgroundColor
background color that is applied to each observer(QGraphicsView) of the scene.
Class applying the alignment of one or more objects. Ex .: send to back, bring to front...
Class applying the alignment of one or more objects. Ex .: send to back, bring to front...
QTransform m_matrix
transformation matrix of the scene.
Abstract class to represent an observer. "View" part of MVC component. All classes representing the g...
An utility struct for representing 2D coordinates.
QList< QGraphicsItem * > m_itemStackWithoutScene
Items that are not included in any scene.
int m_undoStackLimit
Undo/Redo limit size.
Class representing the scene. This scene is child of QGraphicsScene, part of Graphics View Framework...
std::map< QGraphicsItem *, QPointF > m_moveWatches
AlignItems * m_align
object responsible for aligning objects in the scene.
Abstract scene for Scene, a QGraphicsScene class, part of Graphics View Framework.
PrintScene * m_print
object responsible for printing the scene.
Class that represents the value of an enumeration. An enumeration is made of "1..n" objects EnumType...
Class responsible for printing the entire content or part of the scene. As the scene is upside down...
Class responsible for printing the entire content or part of the scene. As the scene is upside down...