Item

An item is a graphical component that follows the MVC pattern, composed of three parts: Model, Vision and Controller. To create a new item is required inherit the following classes: ItemObserver, ItemModelObservable and ItemController. The part View of the component is the one that uses the Qt library, specifically the Graphics View Framework. Thus the whole View is also a QGraphicsItem. Ex.: TextItem, MapItem, RectangleItem, etc.

ObjectItem

Abstract class that represents a graphic item. This object is of type QGraphicsObject. Its coordinate system is the same of scene (millimeters). Knows rotate and resize. Stores a pixmap drawn by model. This is also child of ItemObserver, so it can become observer of a model (Observable). This class will be inherited and will became the view part of the MVC component.

MapItem

This class is a proxy MapDisplay. This makes it possible to add a MapDisplay as item of a scene. This object is of type QGraphicsProxyWidget. He have a directly interaction by user. The transformation matrix is inverted, that is, the inverse of the matrix of the scene, so its coordinate system is screen (pixel), but its position in the scene remains in millimeters. This is also child of ItemObserver, so it can become observer of a model (Observable). “View” part of MVC component.

TextItem

Class that represents text. This object is of type QGraphicsTextItem. He is directly editable via user interaction. The transformation matrix is inverted, that is, the inverse of the matrix of the scene, so its coordinate system is screen (pixel), but its position in the scene remains in millimeters. This is also child of ItemObserver, so it can become observer of a model (Observable). “View” part of MVC component.

ItemGroup

Class that represents the grouping of objects of type QGraphicsItem, MVC components. Its coordinate system is the same of scene (millimeters). This is also the child of ItemObserver and ObjectItem, so it can become observer of a model (Observable).

LegendItem

Class that represents a graphic legend of a map. Its coordinate system is the same of scene (millimeters). This is also the child of ItemObserver and ObjectItem, so it can become observer of a model (Observable).

ScaleItem

Class that represents a graphic scale of a map. Its coordinate system is the same of scene (millimeters). This is also the child of ItemObserver and ObjectItem, so it can become observer of a model (Observable).


QR Code
QR Code wiki:designimplementation:layout:item (generated for current page)