QElectroTech  0.70
Public Types | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
ElementScene Class Reference

#include <elementscene.h>

Public Types

enum  Behavior { Normal, PasteArea, AddPart }
 
enum  ItemOption {
  SortByZValue = 1, IncludeTerminals = 2, IncludeHelperItems = 4, Selected = 8,
  NonSelected = 16, SelectedOrNot = 24
}
 

Public Slots

void slot_select (const ElementContent &)
 ElementScene::slot_select Select the item in content, every others items in the scene are deselected. More...
 
void slot_selectAll ()
 ElementScene::slot_selectAll Select all items. More...
 
void slot_deselectAll ()
 ElementScene::slot_deselectAll deselect all item. More...
 
void slot_invertSelection ()
 
void slot_delete ()
 
void slot_editNames ()
 ElementScene::slot_editNames Launch a dialog for edit the names of the edited element. More...
 
void slot_editAuthorInformations ()
 
void slot_editProperties ()
 ElementScene::slot_editProperties Open dialog to edit the element properties. More...
 
void managePrimitivesGroups ()
 ElementScene::managePrimitivesGroups Ensure the decorator is adequately shown, hidden or updated so it always represents the current selection. More...
 
void stackAction (ElementEditionCommand *)
 

Signals

void partsAdded ()
 Signal emitted after one or several parts were added. More...
 
void partsRemoved ()
 Signal emitted after one or several parts were removed. More...
 
void partsZValueChanged ()
 Signal emitted when the zValue of one or several parts change. More...
 
void pasteAreaDefined (const QRectF &)
 Signal emitted when users have defined the copy/paste area. More...
 
void needZoomFit ()
 Signal emitted when need zoomFit. More...
 
void elementInfoChanged ()
 

Public Member Functions

 ElementScene (QETElementEditor *, QObject *=nullptr)
 
 ~ElementScene () override
 ElementScene::~ElementScene. More...
 
void setEventInterface (ESEventInterface *event_interface)
 ElementScene::setEventInterface Set a new event interface. More...
 
void clearEventInterface ()
 ElementScene::clearEventInterface Clear the current event interface. More...
 
void setBehavior (ElementScene::Behavior)
 ElementScene::setBehavior Modifie the current behavior of this scene. More...
 
ElementScene::Behavior behavior () const
 
QPointF snapToGrid (QPointF point)
 
void setNames (const NamesList &)
 
NamesList names () const
 
QString informations () const
 
void setInformations (const QString &)
 
QString elementType () const
 
DiagramContext elementKindInfo () const
 
DiagramContext elementInformation () const
 
virtual int xGrid () const
 
virtual int yGrid () const
 
virtual void setGrid (int, int)
 
virtual const QDomDocument toXml (bool=true)
 ElementScene::toXml Export this element as a xml file. More...
 
virtual QRectF boundingRectFromXml (const QDomDocument &)
 
virtual void fromXml (const QDomDocument &, const QPointF &=QPointF(), bool=true, ElementContent *=nullptr)
 
virtual void reset ()
 ElementScene::reset Remove all QGraphicsItems in the scene and clear the undo stack. More...
 
virtual QList< CustomElementPart * > primitives () const
 
virtual QList< QGraphicsItem * > zItems (ItemOptions options=ItemOptions(SortByZValue|IncludeTerminals|SelectedOrNot)) const
 
virtual ElementContent selectedContent () const
 
virtual void getPasteArea (const QRectF &)
 
QRectF elementSceneGeometricRect () const
 
bool containsTerminals () const
 
QUndoStack & undoStack ()
 
QGIManagerqgiManager ()
 
bool wasCopiedFromThisElement (const QString &)
 
void cut ()
 
void copy ()
 
QETElementEditoreditor () const
 
void setElementInfo (const DiagramContext &dc)
 

Static Public Member Functions

static bool clipboardMayContainElement ()
 

Protected Member Functions

void mouseMoveEvent (QGraphicsSceneMouseEvent *) override
 ElementScene::mouseMoveEvent. More...
 
void mousePressEvent (QGraphicsSceneMouseEvent *) override
 ElementScene::mousePressEvent. More...
 
void mouseReleaseEvent (QGraphicsSceneMouseEvent *) override
 ElementScene::mouseReleaseEvent. More...
 
void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) override
 ElementScene::mouseDoubleClickEvent. More...
 
void keyPressEvent (QKeyEvent *event) override
 ElementScene::keyPressEvent manage key press event. More...
 
void contextMenuEvent (QGraphicsSceneContextMenuEvent *event) override
 ElementScene::contextMenuEvent Display the context menu event, only if behavior are Normal. More...
 
void drawForeground (QPainter *, const QRectF &) override
 

Private Member Functions

 ElementScene (const ElementScene &)
 
QRectF elementContentBoundingRect (const ElementContent &) const
 
bool applyInformations (const QDomDocument &)
 
ElementContent loadContent (const QDomDocument &)
 ElementScene::loadContent. More...
 
ElementContent addContent (const ElementContent &)
 
ElementContent addContentAtPos (const ElementContent &, const QPointF &)
 
void addPrimitive (QGraphicsItem *)
 
void initPasteArea ()
 
void centerElementToOrigine ()
 ElementScene::centerElementToOrigine try to center better is possible the element to the scene (the calcul isn't optimal but work good) More...
 

Static Private Member Functions

static bool zValueLessThan (QGraphicsItem *, QGraphicsItem *)
 

Private Attributes

NamesList m_names_list
 
QString m_informations
 List of localized names. More...
 
QString m_elmt_type
 Extra informations. More...
 
DiagramContext m_elmt_kindInfo
 element type More...
 
DiagramContext m_elmt_information
 
QGIManager m_qgi_manager
 element kind info More...
 
QUndoStack m_undo_stack
 
ESEventInterfacem_event_interface = nullptr
 
Behavior m_behavior
 
QETElementEditorm_element_editor = nullptr
 
QGraphicsRectItem * m_paste_area
 
QRectF m_defined_paste_area
 
QString m_last_copied
 
ElementPrimitiveDecoratorm_decorator = nullptr
 Decorator item displayed when at least one item is selected. More...
 
int m_x_grid
 
int m_y_grid
 
QMutex * m_decorator_lock
 

Friends

class ChangePropertiesCommand
 

Detailed Description

This class is the canvas allowing the visual edition of an electrial element. It displays the various primitives composing the drawing of the element, the border due to its fixed size and its hotspot.

Definition at line 38 of file elementscene.h.

Member Enumeration Documentation

◆ Behavior

Enumerator
Normal 
PasteArea 
AddPart 

Definition at line 45 of file elementscene.h.

◆ ItemOption

Enumerator
SortByZValue 
IncludeTerminals 
IncludeHelperItems 
Selected 
NonSelected 
SelectedOrNot 

Definition at line 46 of file elementscene.h.

Constructor & Destructor Documentation

◆ ElementScene() [1/2]

ElementScene::ElementScene ( QETElementEditor editor,
QObject *  parent = nullptr 
)

Constructeur

Parameters
editorL'editeur d'element concerne
parentle Widget parent

Definition at line 47 of file elementscene.cpp.

References initPasteArea(), m_behavior, m_decorator_lock, m_undo_stack, managePrimitivesGroups(), Normal, and setGrid().

◆ ~ElementScene()

ElementScene::~ElementScene ( )
override

◆ ElementScene() [2/2]

ElementScene::ElementScene ( const ElementScene )
private

Member Function Documentation

◆ addContent()

ElementContent ElementScene::addContent ( const ElementContent content)
private

Ajoute le contenu content a cet element

Parameters
contentcontenu ( = liste de parties) a charger
Returns
Le contenu ajoute

Definition at line 1018 of file elementscene.cpp.

References addPrimitive().

Referenced by fromXml().

◆ addContentAtPos()

ElementContent ElementScene::addContentAtPos ( const ElementContent content,
const QPointF &  pos 
)
private

Ajoute le contenu content a cet element

Parameters
contentcontenu ( = liste de parties) a charger
posPosition du coin superieur gauche du contenu apres avoir ete ajoute
Returns
Le contenu ajoute

Definition at line 1031 of file elementscene.cpp.

References addPrimitive(), and elementContentBoundingRect().

Referenced by fromXml().

◆ addPrimitive()

void ElementScene::addPrimitive ( QGraphicsItem *  primitive)
private

Add a primitive to the scene by wrapping it within an ElementPrimitiveDecorator group.

Definition at line 1050 of file elementscene.cpp.

Referenced by addContent(), and addContentAtPos().

◆ applyInformations()

bool ElementScene::applyInformations ( const QDomDocument &  xml_document)
private

Applique les informations (dimensions, hostpot, orientations, connexions internes, noms et informations complementaires) contenu dans un document XML.

Parameters
xml_documentDocument XML a analyser
Returns
true si la lecture et l'application des informations s'est bien passee, false sinon.

Definition at line 902 of file elementscene.cpp.

References NamesList::fromXml(), DiagramContext::fromXml(), m_elmt_information, m_elmt_kindInfo, m_elmt_type, m_names_list, and setInformations().

Referenced by fromXml().

◆ behavior()

ElementScene::Behavior ElementScene::behavior ( ) const

Definition at line 314 of file elementscene.cpp.

References m_behavior.

◆ boundingRectFromXml()

QRectF ElementScene::boundingRectFromXml ( const QDomDocument &  xml_document)
virtual
Parameters
xml_documentun document XML decrivant un element
Returns
le boundingRect du contenu de l'element

Definition at line 436 of file elementscene.cpp.

References elementContentBoundingRect(), and loadContent().

◆ centerElementToOrigine()

void ElementScene::centerElementToOrigine ( )
private

ElementScene::centerElementToOrigine try to center better is possible the element to the scene (the calcul isn't optimal but work good)

Definition at line 1098 of file elementscene.cpp.

References elementSceneGeometricRect(), needZoomFit(), and ElementPrimitiveDecorator::Type.

Referenced by toXml().

◆ clearEventInterface()

void ElementScene::clearEventInterface ( )

ElementScene::clearEventInterface Clear the current event interface.

Definition at line 296 of file elementscene.cpp.

References m_event_interface.

Referenced by QETElementEditor::toFile(), and QETElementEditor::toLocation().

◆ clipboardMayContainElement()

bool ElementScene::clipboardMayContainElement ( )
static
Returns
true si le presse-papier semble contenir un element

Definition at line 533 of file elementscene.cpp.

Referenced by QETElementEditor::slot_updateMenus().

◆ containsTerminals()

bool ElementScene::containsTerminals ( ) const
Returns
true si l'element comporte au moins une borne, false s'il n'en a aucune.

Definition at line 507 of file elementscene.cpp.

◆ contextMenuEvent()

void ElementScene::contextMenuEvent ( QGraphicsSceneContextMenuEvent *  event)
overrideprotected

ElementScene::contextMenuEvent Display the context menu event, only if behavior are Normal.

Parameters
event

Definition at line 242 of file elementscene.cpp.

References m_behavior, m_element_editor, and Normal.

◆ copy()

void ElementScene::copy ( )

Gere le fait de copier la selection = l'exporter en XML dans le presse-papier.

Definition at line 563 of file elementscene.cpp.

References m_last_copied, and toXml().

Referenced by cut().

◆ cut()

void ElementScene::cut ( )

Gere le fait de couper la selection = l'exporter en XML dans le presse-papier puis la supprimer.

Definition at line 552 of file elementscene.cpp.

References copy(), and undoStack().

◆ drawForeground()

void ElementScene::drawForeground ( QPainter *  p,
const QRectF &  rect 
)
overrideprotected

Dessine l'arriere-plan de l'editeur, cad l'indicateur de hotspot.

Parameters
pLe QPainter a utiliser pour dessiner
rectLe rectangle de la zone a dessiner

Definition at line 257 of file elementscene.cpp.

◆ editor()

QETElementEditor * ElementScene::editor ( ) const

Definition at line 580 of file elementscene.cpp.

References m_element_editor.

Referenced by PartPolygon::contextMenuEvent().

◆ elementContentBoundingRect()

QRectF ElementScene::elementContentBoundingRect ( const ElementContent content) const
private
Parameters
contentContenu ( = parties) d'un element
Returns
le boundingRect de ces parties, exprime dans les coordonnes de la scene

Definition at line 884 of file elementscene.cpp.

References ElementPrimitiveDecorator::Type.

Referenced by addContentAtPos(), and boundingRectFromXml().

◆ elementInfoChanged

void ElementScene::elementInfoChanged ( )
signal

◆ elementInformation()

DiagramContext ElementScene::elementInformation ( ) const
inline

Definition at line 102 of file elementscene.h.

References m_elmt_information.

◆ elementKindInfo()

DiagramContext ElementScene::elementKindInfo ( ) const
inline

Definition at line 101 of file elementscene.h.

References m_elmt_kindInfo.

◆ elementSceneGeometricRect()

QRectF ElementScene::elementSceneGeometricRect ( ) const
Returns
the minimum, margin-less rectangle the element can fit into, in scene coordinates. It is different from itemsBoundingRect() because it is not supposed to imply any margin.

Definition at line 490 of file elementscene.cpp.

References ElementPrimitiveDecorator::Type, and PartDynamicTextField::Type.

Referenced by centerElementToOrigine(), and toXml().

◆ elementType()

QString ElementScene::elementType ( ) const
inline

Definition at line 100 of file elementscene.h.

References m_elmt_type.

Referenced by DynamicTextFieldEditor::fillInfoComboBox().

◆ fromXml()

void ElementScene::fromXml ( const QDomDocument &  xml_document,
const QPointF &  position = QPointF(),
bool  consider_informations = true,
ElementContent content_ptr = nullptr 
)
virtual

Importe l'element decrit dans un document XML. Si une position est precisee, les elements importes sont positionnes de maniere a ce que le coin superieur gauche du plus petit rectangle pouvant les entourant tous (le bounding rect) soit a cette position.

Parameters
xml_documentun document XML decrivant l'element
positionLa position des parties importees
consider_informationsSi vrai, les informations complementaires (dimensions, hotspot, etc.) seront prises en compte
content_ptrsi ce pointeur vers un ElementContent est different de 0, il sera rempli avec le contenu ajoute a l'element par le fromXml
Returns
true si l'import a reussi, false sinon

Definition at line 463 of file elementscene.cpp.

References addContent(), addContentAtPos(), applyInformations(), and loadContent().

◆ getPasteArea()

void ElementScene::getPasteArea ( const QRectF &  to_paste)
virtual
Parameters
to_pasteRectangle englobant les parties a coller
Returns
le rectangle ou il faudra coller ces parties

Definition at line 843 of file elementscene.cpp.

References m_behavior, m_paste_area, and PasteArea.

◆ informations()

QString ElementScene::informations ( ) const
inline
Returns
extra informations of the currently edited element

Definition at line 193 of file elementscene.h.

References m_informations.

Referenced by slot_editAuthorInformations(), and toXml().

◆ initPasteArea()

void ElementScene::initPasteArea ( )
private

Initialise la zone de collage

Definition at line 1058 of file elementscene.cpp.

References m_paste_area.

Referenced by ElementScene().

◆ keyPressEvent()

void ElementScene::keyPressEvent ( QKeyEvent *  event)
overrideprotected

◆ loadContent()

ElementContent ElementScene::loadContent ( const QDomDocument &  xml_document)
private

ElementScene::loadContent.

Par le document XML xml_document et retourne le contenu ( = liste de parties) correspondant.

Parameters
xml_documentDocument XML a analyser
error_messagepointeur vers une QString ; si error_message est different de 0, un message d'erreur sera stocke dedans si necessaire
xml_document: xml dom document to analyze
Returns
ElementScene::loadContent Create and load the content describe in the xml document.
Parameters
xml_document
Returns
the loaded content

Definition at line 951 of file elementscene.cpp.

References PartDynamicTextField::fromTextFieldXml(), CustomElementPart::fromXml(), m_element_editor, and QET::Icons::PartRectangle.

Referenced by boundingRectFromXml(), and fromXml().

◆ managePrimitivesGroups

void ElementScene::managePrimitivesGroups ( )
slot

ElementScene::managePrimitivesGroups Ensure the decorator is adequately shown, hidden or updated so it always represents the current selection.

Definition at line 1125 of file elementscene.cpp.

References IncludeTerminals, m_decorator, m_decorator_lock, Selected, stackAction(), and zItems().

Referenced by ElementScene(), and ~ElementScene().

◆ mouseDoubleClickEvent()

void ElementScene::mouseDoubleClickEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotected

◆ mouseMoveEvent()

void ElementScene::mouseMoveEvent ( QGraphicsSceneMouseEvent *  e)
overrideprotected

◆ mousePressEvent()

void ElementScene::mousePressEvent ( QGraphicsSceneMouseEvent *  e)
overrideprotected

◆ mouseReleaseEvent()

void ElementScene::mouseReleaseEvent ( QGraphicsSceneMouseEvent *  e)
overrideprotected

◆ names()

NamesList ElementScene::names ( ) const
inline
Returns
the list of names of the currently edited element

Definition at line 186 of file elementscene.h.

References m_names_list.

◆ needZoomFit

void ElementScene::needZoomFit ( )
signal

Signal emitted when need zoomFit.

Referenced by centerElementToOrigine().

◆ partsAdded

void ElementScene::partsAdded ( )
signal

Signal emitted after one or several parts were added.

Referenced by keyPressEvent(), mouseDoubleClickEvent(), mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent().

◆ partsRemoved

void ElementScene::partsRemoved ( )
signal

Signal emitted after one or several parts were removed.

Referenced by slot_delete().

◆ partsZValueChanged

void ElementScene::partsZValueChanged ( )
signal

Signal emitted when the zValue of one or several parts change.

◆ pasteAreaDefined

void ElementScene::pasteAreaDefined ( const QRectF &  )
signal

Signal emitted when users have defined the copy/paste area.

Referenced by mouseReleaseEvent().

◆ primitives()

QList< CustomElementPart * > ElementScene::primitives ( ) const
virtual
Returns
the list of primitives currently present on the scene.

Definition at line 760 of file elementscene.cpp.

◆ qgiManager()

QGIManager & ElementScene::qgiManager ( )
Returns
le gestionnaire de QGraphicsItem de cet editeur d'element

Definition at line 526 of file elementscene.cpp.

References m_qgi_manager.

Referenced by reset().

◆ reset()

void ElementScene::reset ( )
virtual

ElementScene::reset Remove all QGraphicsItems in the scene and clear the undo stack.

Definition at line 856 of file elementscene.cpp.

References m_decorator, qgiManager(), QGIManager::release(), QetGraphicsHandlerItem::Type, and undoStack().

◆ selectedContent()

ElementContent ElementScene::selectedContent ( ) const
virtual
Returns
les parties graphiques selectionnees

Definition at line 831 of file elementscene.cpp.

References zItems().

◆ setBehavior()

void ElementScene::setBehavior ( ElementScene::Behavior  b)

ElementScene::setBehavior Modifie the current behavior of this scene.

Parameters
b

Definition at line 310 of file elementscene.cpp.

References m_behavior.

Referenced by ESEventInterface::init(), and ESEventInterface::~ESEventInterface().

◆ setElementInfo()

void ElementScene::setElementInfo ( const DiagramContext dc)

◆ setEventInterface()

void ElementScene::setEventInterface ( ESEventInterface event_interface)

ElementScene::setEventInterface Set a new event interface.

Parameters
interface

Definition at line 280 of file elementscene.cpp.

References ESEventInterface::init(), and m_event_interface.

Referenced by QETElementEditor::addDynamicTextField().

◆ setGrid()

void ElementScene::setGrid ( int  x_g,
int  y_g 
)
virtual
Parameters
x_gTaille horizontale de la grille
y_gTaille verticale de la grille

Definition at line 336 of file elementscene.cpp.

References m_x_grid, and m_y_grid.

Referenced by ElementView::drawBackground(), and ElementScene().

◆ setInformations()

void ElementScene::setInformations ( const QString &  infos)
inline
Parameters
infosnew extra information for the currently edited element

Definition at line 200 of file elementscene.h.

References m_informations.

Referenced by applyInformations().

◆ setNames()

void ElementScene::setNames ( const NamesList nameslist)
inline
Parameters
nameslistNew set of naes for the currently edited element

Definition at line 179 of file elementscene.h.

◆ slot_delete

void ElementScene::slot_delete ( )
slot

Supprime les elements selectionnes

Definition at line 650 of file elementscene.cpp.

References m_undo_stack, and partsRemoved().

◆ slot_deselectAll

void ElementScene::slot_deselectAll ( )
slot

ElementScene::slot_deselectAll deselect all item.

Definition at line 633 of file elementscene.cpp.

References slot_select().

◆ slot_editAuthorInformations

void ElementScene::slot_editAuthorInformations ( )
slot

Lance un dialogue pour editer les informations complementaires de cet element. Concretement, ce champ libre est destine a accueillir des informations sur l'auteur de l'element, sa licence, etc.

Definition at line 668 of file elementscene.cpp.

References QET::Icons::Cancel, informations(), m_element_editor, QET::Icons::tr, and undoStack().

◆ slot_editNames

void ElementScene::slot_editNames ( )
slot

◆ slot_editProperties

void ElementScene::slot_editProperties ( )
slot

ElementScene::slot_editProperties Open dialog to edit the element properties.

Definition at line 713 of file elementscene.cpp.

References ChangePropertiesCommand, m_elmt_information, m_elmt_kindInfo, m_elmt_type, and undoStack().

◆ slot_invertSelection

void ElementScene::slot_invertSelection ( )
slot

Inverse la selection

Definition at line 640 of file elementscene.cpp.

◆ slot_select

void ElementScene::slot_select ( const ElementContent content)
slot

ElementScene::slot_select Select the item in content, every others items in the scene are deselected.

Parameters
content

Definition at line 598 of file elementscene.cpp.

References QetGraphicsHandlerItem::Type.

Referenced by slot_deselectAll(), and slot_selectAll().

◆ slot_selectAll

void ElementScene::slot_selectAll ( )
slot

ElementScene::slot_selectAll Select all items.

Definition at line 625 of file elementscene.cpp.

References slot_select().

◆ snapToGrid()

QPointF ElementScene::snapToGrid ( QPointF  point)

◆ stackAction

void ElementScene::stackAction ( ElementEditionCommand command)
slot

Push the provided command on the undo stack.

Definition at line 1162 of file elementscene.cpp.

References undoStack().

Referenced by managePrimitivesGroups().

◆ toXml()

const QDomDocument ElementScene::toXml ( bool  all_parts = true)
virtual

ElementScene::toXml Export this element as a xml file.

Parameters
all_parts(true by default) if true, export the entire element in xml, if false, only export the selected parts.
Returns
an xml document that describe the element.

Definition at line 348 of file elementscene.cpp.

References centerElementToOrigine(), elementSceneGeometricRect(), informations(), m_elmt_information, m_elmt_kindInfo, m_elmt_type, m_names_list, NamesList::toXml(), DiagramContext::toXml(), QET::version, and zItems().

Referenced by copy(), QETElementEditor::toFile(), and QETElementEditor::toLocation().

◆ undoStack()

QUndoStack & ElementScene::undoStack ( )

◆ wasCopiedFromThisElement()

bool ElementScene::wasCopiedFromThisElement ( const QString &  clipboard_content)
Parameters
clipboard_contentchaine de caractere, provenant vraisemblablement du presse-papier.
Returns
true si clipboard_content a ete copie depuis cet element.

Definition at line 544 of file elementscene.cpp.

References m_last_copied.

◆ xGrid()

int ElementScene::xGrid ( ) const
virtual
Returns
la taille horizontale de la grille

Definition at line 321 of file elementscene.cpp.

References m_x_grid.

◆ yGrid()

int ElementScene::yGrid ( ) const
virtual
Returns
la taille verticale de la grille

Definition at line 328 of file elementscene.cpp.

References m_y_grid.

◆ zItems()

QList< QGraphicsItem * > ElementScene::zItems ( ItemOptions  options = ItemOptions(SortByZValue | IncludeTerminals | SelectedOrNot)) const
virtual
Parameters
include_terminalstrue pour inclure les bornes, false sinon
Returns
les parties de l'element ordonnes par zValue croissante

Definition at line 774 of file elementscene.cpp.

References IncludeHelperItems, IncludeTerminals, NonSelected, Selected, SelectedOrNot, SortByZValue, QetGraphicsHandlerItem::Type, ElementPrimitiveDecorator::Type, and zValueLessThan().

Referenced by managePrimitivesGroups(), selectedContent(), and toXml().

◆ zValueLessThan()

bool ElementScene::zValueLessThan ( QGraphicsItem *  item1,
QGraphicsItem *  item2 
)
staticprivate
Returns
true if item1's zValue() is less than item2's.

Definition at line 1089 of file elementscene.cpp.

Referenced by zItems().

Friends And Related Function Documentation

◆ ChangePropertiesCommand

friend class ChangePropertiesCommand
friend

Definition at line 40 of file elementscene.h.

Referenced by slot_editProperties().

Member Data Documentation

◆ m_behavior

Behavior ElementScene::m_behavior
private

◆ m_decorator

ElementPrimitiveDecorator* ElementScene::m_decorator = nullptr
private

Decorator item displayed when at least one item is selected.

Definition at line 84 of file elementscene.h.

Referenced by managePrimitivesGroups(), reset(), and ~ElementScene().

◆ m_decorator_lock

QMutex* ElementScene::m_decorator_lock
private

Definition at line 144 of file elementscene.h.

Referenced by ElementScene(), managePrimitivesGroups(), and ~ElementScene().

◆ m_defined_paste_area

QRectF ElementScene::m_defined_paste_area
private

Definition at line 79 of file elementscene.h.

Referenced by mouseReleaseEvent().

◆ m_element_editor

QETElementEditor* ElementScene::m_element_editor = nullptr
private

◆ m_elmt_information

DiagramContext ElementScene::m_elmt_information
private

◆ m_elmt_kindInfo

DiagramContext ElementScene::m_elmt_kindInfo
private

◆ m_elmt_type

QString ElementScene::m_elmt_type
private

◆ m_event_interface

ESEventInterface* ElementScene::m_event_interface = nullptr
private

◆ m_informations

QString ElementScene::m_informations
private

List of localized names.

Definition at line 67 of file elementscene.h.

Referenced by informations(), and setInformations().

◆ m_last_copied

QString ElementScene::m_last_copied
private

Definition at line 81 of file elementscene.h.

Referenced by copy(), and wasCopiedFromThisElement().

◆ m_names_list

NamesList ElementScene::m_names_list
private

Definition at line 66 of file elementscene.h.

Referenced by applyInformations(), names(), slot_editNames(), and toXml().

◆ m_paste_area

QGraphicsRectItem* ElementScene::m_paste_area
private

Definition at line 78 of file elementscene.h.

Referenced by getPasteArea(), initPasteArea(), mouseMoveEvent(), and mouseReleaseEvent().

◆ m_qgi_manager

QGIManager ElementScene::m_qgi_manager
private

element kind info

Definition at line 71 of file elementscene.h.

Referenced by qgiManager().

◆ m_undo_stack

QUndoStack ElementScene::m_undo_stack
private

Definition at line 72 of file elementscene.h.

Referenced by ElementScene(), slot_delete(), undoStack(), and ~ElementScene().

◆ m_x_grid

int ElementScene::m_x_grid
private

Definition at line 86 of file elementscene.h.

Referenced by setGrid(), snapToGrid(), and xGrid().

◆ m_y_grid

int ElementScene::m_y_grid
private

Definition at line 86 of file elementscene.h.

Referenced by setGrid(), snapToGrid(), and yGrid().


The documentation for this class was generated from the following files: