QElectroTech  0.8-dev
Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Properties | Private Member Functions | Private Attributes | List of all members
ElementTextItemGroup Class Reference

The ElementTextItemGroup class This class represent a group of element text Texts in the group can be aligned left / center /right. More...

#include <elementtextitemgroup.h>

Inherits QObject, and QGraphicsItemGroup.

Collaboration diagram for ElementTextItemGroup:
Collaboration graph

Signals

void rotationChanged (qreal)
 
void verticalAdjustmentChanged (int)
 
void alignmentChanged (Qt::Alignment)
 
void nameChanged (QString)
 
void holdToBottomPageChanged (bool)
 
void xChanged ()
 
void yChanged ()
 
void frameChanged (bool frame)
 

Public Member Functions

 ElementTextItemGroup (const QString &name, Element *parent)
 ElementTextItemGroup::ElementTextItemGroup. More...
 
 ~ElementTextItemGroup () override
 
void addToGroup (QGraphicsItem *item)
 ElementTextItemGroup::addToGroup. More...
 
void removeFromGroup (QGraphicsItem *item)
 ElementTextItemGroup::removeFromGroup. More...
 
void blockAlignmentUpdate (bool block)
 ElementTextItemGroup::blockAlignmentUpdate If true, the texts in this group are never aligned, moved, rotated etc... the texts stay as it was, until blockAlignmentUpdate is set to false. More...
 
void setAlignment (Qt::Alignment alignement)
 ElementTextItemGroup::setAlignement Set the alignement of this group. More...
 
Qt::Alignment alignment () const
 
void updateAlignment ()
 ElementTextItemGroup::setAlignment Update the alignement of the items in this group, according to the current alignement. More...
 
int verticalAdjustment () const
 
void setVerticalAdjustment (int v)
 ElementTextItemGroup::setVerticalAdjustment Set the value of the vertical adjustment to v. The vertical adjutment is use to adjust the space between the texts of this group. More...
 
void setName (QString name)
 ElementTextItemGroup::setName. More...
 
QString name () const
 
void setHoldToBottomPage (bool hold)
 
bool holdToBottomPage () const
 
void setFrame (const bool frame)
 
bool frame () const
 
QList< DynamicElementTextItem * > texts () const
 ElementTextItemGroup::texts. More...
 
Diagramdiagram () const
 ElementTextItemGroup::diagram. More...
 
ElementparentElement () const
 ElementTextItemGroup::parentElement. More...
 
QDomElement toXml (QDomDocument &dom_document) const
 ElementTextItemGroup::toXml Export data of this group to xml. More...
 
void fromXml (QDomElement &dom_element)
 ElementTextItemGroup::fromXml Import data of this group from xml. More...
 
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
 ElementTextItemGroup::paint. More...
 
QRectF boundingRect () const override
 ElementTextItemGroup::boundingRect. More...
 
void setRotation (qreal angle)
 
void setPos (const QPointF &pos)
 
void setPos (qreal x, qreal y)
 

Static Public Member Functions

static QString xmlTaggName ()
 

Protected Member Functions

void mousePressEvent (QGraphicsSceneMouseEvent *event) override
 ElementTextItemGroup::mousePressEvent. More...
 
void mouseMoveEvent (QGraphicsSceneMouseEvent *event) override
 ElementTextItemGroup::mouseMoveEvent. More...
 
void mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override
 ElementTextItemGroup::mouseReleaseEvent. More...
 
void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) override
 
void keyPressEvent (QKeyEvent *event) override
 ElementTextItemGroup::keyPressEvent. More...
 
void hoverEnterEvent (QGraphicsSceneHoverEvent *event) override
 
void hoverLeaveEvent (QGraphicsSceneHoverEvent *event) override
 

Properties

QPointF pos
 
qreal rotation
 
int verticalAdjustment
 
Qt::Alignment alignment
 
QString name
 
bool holdToBottomPage
 
bool frame
 

Private Member Functions

void updateXref ()
 
void adjustSlaveXrefPos ()
 
void autoPos ()
 

Private Attributes

Qt::Alignment m_alignment = Qt::AlignJustify
 
QString m_name
 
bool m_first_move = true
 
bool m_hold_to_bottom_of_page = false
 
bool m_block_alignment_update = false
 
bool m_frame = false
 
QPointF m_initial_position
 
int m_vertical_adjustment = 0
 
CrossRefItemm_Xref_item = nullptr
 
Elementm_parent_element = nullptr
 
QList< QMetaObject::Connection > m_update_slave_Xref_connection
 
QGraphicsTextItem * m_slave_Xref_item = nullptr
 
QMetaObject::Connection m_XrefChanged_timer
 
QMetaObject::Connection m_linked_changed_timer
 

Detailed Description

The ElementTextItemGroup class This class represent a group of element text Texts in the group can be aligned left / center /right.

Constructor & Destructor Documentation

◆ ElementTextItemGroup()

ElementTextItemGroup::ElementTextItemGroup ( const QString &  name,
Element parent 
)

ElementTextItemGroup::ElementTextItemGroup.

Parameters
name:
parent:
Here is the call graph for this function:

◆ ~ElementTextItemGroup()

ElementTextItemGroup::~ElementTextItemGroup ( )
override

Member Function Documentation

◆ addToGroup()

void ElementTextItemGroup::addToGroup ( QGraphicsItem *  item)

ElementTextItemGroup::addToGroup.

Parameters
item
Here is the call graph for this function:
Here is the caller graph for this function:

◆ adjustSlaveXrefPos()

void ElementTextItemGroup::adjustSlaveXrefPos ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ alignment()

Qt::Alignment ElementTextItemGroup::alignment ( ) const

◆ alignmentChanged

void ElementTextItemGroup::alignmentChanged ( Qt::Alignment  )
signal
Here is the caller graph for this function:

◆ autoPos()

void ElementTextItemGroup::autoPos ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ blockAlignmentUpdate()

void ElementTextItemGroup::blockAlignmentUpdate ( bool  block)

ElementTextItemGroup::blockAlignmentUpdate If true, the texts in this group are never aligned, moved, rotated etc... the texts stay as it was, until blockAlignmentUpdate is set to false.

Parameters
block

◆ boundingRect()

QRectF ElementTextItemGroup::boundingRect ( ) const
override

ElementTextItemGroup::boundingRect.

Returns
Here is the call graph for this function:
Here is the caller graph for this function:

◆ diagram()

Diagram * ElementTextItemGroup::diagram ( ) const

ElementTextItemGroup::diagram.

Returns
The diagram of this group, or nullptr if this group is not in a diagram
Here is the caller graph for this function:

◆ frame()

bool ElementTextItemGroup::frame ( ) const

◆ frameChanged

void ElementTextItemGroup::frameChanged ( bool  frame)
signal
Here is the caller graph for this function:

◆ fromXml()

void ElementTextItemGroup::fromXml ( QDomElement &  dom_element)

ElementTextItemGroup::fromXml Import data of this group from xml.

Parameters
dom_element
Here is the call graph for this function:
Here is the caller graph for this function:

◆ holdToBottomPage()

bool ElementTextItemGroup::holdToBottomPage ( ) const
inline

◆ holdToBottomPageChanged

void ElementTextItemGroup::holdToBottomPageChanged ( bool  )
signal
Here is the caller graph for this function:

◆ hoverEnterEvent()

void ElementTextItemGroup::hoverEnterEvent ( QGraphicsSceneHoverEvent *  event)
overrideprotected

◆ hoverLeaveEvent()

void ElementTextItemGroup::hoverLeaveEvent ( QGraphicsSceneHoverEvent *  event)
overrideprotected

◆ keyPressEvent()

void ElementTextItemGroup::keyPressEvent ( QKeyEvent *  event)
overrideprotected

ElementTextItemGroup::keyPressEvent.

Parameters
event
Here is the call graph for this function:

◆ mouseDoubleClickEvent()

void ElementTextItemGroup::mouseDoubleClickEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotected
Here is the call graph for this function:

◆ mouseMoveEvent()

void ElementTextItemGroup::mouseMoveEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotected

ElementTextItemGroup::mouseMoveEvent.

Parameters
event
Here is the call graph for this function:

◆ mousePressEvent()

void ElementTextItemGroup::mousePressEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotected

◆ mouseReleaseEvent()

void ElementTextItemGroup::mouseReleaseEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotected

ElementTextItemGroup::mouseReleaseEvent.

Parameters
event
Here is the call graph for this function:

◆ name()

QString ElementTextItemGroup::name ( ) const
inline

◆ nameChanged

void ElementTextItemGroup::nameChanged ( QString  )
signal
Here is the caller graph for this function:

◆ paint()

void ElementTextItemGroup::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget 
)
override

ElementTextItemGroup::paint.

Parameters
painter
option
widget
Here is the call graph for this function:

◆ parentElement()

Element * ElementTextItemGroup::parentElement ( ) const

ElementTextItemGroup::parentElement.

Returns
The parent element of this group or nullptr
Here is the caller graph for this function:

◆ removeFromGroup()

void ElementTextItemGroup::removeFromGroup ( QGraphicsItem *  item)

ElementTextItemGroup::removeFromGroup.

Parameters
item
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rotationChanged

void ElementTextItemGroup::rotationChanged ( qreal  )
signal
Here is the caller graph for this function:

◆ setAlignment()

void ElementTextItemGroup::setAlignment ( Qt::Alignment  alignement)

ElementTextItemGroup::setAlignement Set the alignement of this group.

Parameters
alignement
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setFrame()

void ElementTextItemGroup::setFrame ( const bool  frame)
Here is the caller graph for this function:

◆ setHoldToBottomPage()

void ElementTextItemGroup::setHoldToBottomPage ( bool  hold)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setName()

void ElementTextItemGroup::setName ( QString  name)

ElementTextItemGroup::setName.

Parameters
nameSet the name of this group
Here is the caller graph for this function:

◆ setPos() [1/2]

void ElementTextItemGroup::setPos ( const QPointF &  pos)
Here is the caller graph for this function:

◆ setPos() [2/2]

void ElementTextItemGroup::setPos ( qreal  x,
qreal  y 
)

◆ setRotation()

void ElementTextItemGroup::setRotation ( qreal  angle)
Here is the caller graph for this function:

◆ setVerticalAdjustment()

void ElementTextItemGroup::setVerticalAdjustment ( int  v)

ElementTextItemGroup::setVerticalAdjustment Set the value of the vertical adjustment to v. The vertical adjutment is use to adjust the space between the texts of this group.

Parameters
v
Here is the call graph for this function:
Here is the caller graph for this function:

◆ texts()

QList< DynamicElementTextItem * > ElementTextItemGroup::texts ( ) const

ElementTextItemGroup::texts.

Returns
Every texts in this group
Here is the caller graph for this function:

◆ toXml()

QDomElement ElementTextItemGroup::toXml ( QDomDocument &  dom_document) const

ElementTextItemGroup::toXml Export data of this group to xml.

Parameters
dom_document
Returns
Here is the call graph for this function:

◆ updateAlignment()

void ElementTextItemGroup::updateAlignment ( )

ElementTextItemGroup::setAlignment Update the alignement of the items in this group, according to the current alignement.

Parameters
alignement
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateXref()

void ElementTextItemGroup::updateXref ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ verticalAdjustment()

int ElementTextItemGroup::verticalAdjustment ( ) const
inline

◆ verticalAdjustmentChanged

void ElementTextItemGroup::verticalAdjustmentChanged ( int  )
signal
Here is the caller graph for this function:

◆ xChanged

void ElementTextItemGroup::xChanged ( )
signal
Here is the caller graph for this function:

◆ xmlTaggName()

static QString ElementTextItemGroup::xmlTaggName ( )
inlinestatic
Here is the caller graph for this function:

◆ yChanged

void ElementTextItemGroup::yChanged ( )
signal
Here is the caller graph for this function:

Member Data Documentation

◆ m_alignment

Qt::Alignment ElementTextItemGroup::m_alignment = Qt::AlignJustify
private

◆ m_block_alignment_update

bool ElementTextItemGroup::m_block_alignment_update = false
private

◆ m_first_move

bool ElementTextItemGroup::m_first_move = true
private

◆ m_frame

bool ElementTextItemGroup::m_frame = false
private

◆ m_hold_to_bottom_of_page

bool ElementTextItemGroup::m_hold_to_bottom_of_page = false
private

◆ m_initial_position

QPointF ElementTextItemGroup::m_initial_position
private

◆ m_linked_changed_timer

QMetaObject::Connection ElementTextItemGroup::m_linked_changed_timer
private

◆ m_name

QString ElementTextItemGroup::m_name
private

◆ m_parent_element

Element* ElementTextItemGroup::m_parent_element = nullptr
private

◆ m_slave_Xref_item

QGraphicsTextItem* ElementTextItemGroup::m_slave_Xref_item = nullptr
private

◆ m_update_slave_Xref_connection

QList<QMetaObject::Connection> ElementTextItemGroup::m_update_slave_Xref_connection
private

◆ m_vertical_adjustment

int ElementTextItemGroup::m_vertical_adjustment = 0
private

◆ m_Xref_item

CrossRefItem* ElementTextItemGroup::m_Xref_item = nullptr
private

◆ m_XrefChanged_timer

QMetaObject::Connection ElementTextItemGroup::m_XrefChanged_timer
private

Property Documentation

◆ alignment

Qt::Alignment ElementTextItemGroup::alignment
readwrite

◆ frame

bool ElementTextItemGroup::frame
readwrite

◆ holdToBottomPage

bool ElementTextItemGroup::holdToBottomPage
readwrite

◆ name

QString ElementTextItemGroup::name
readwrite

◆ pos

QPointF ElementTextItemGroup::pos
readwrite

◆ rotation

qreal ElementTextItemGroup::rotation
readwrite

◆ verticalAdjustment

int ElementTextItemGroup::verticalAdjustment
readwrite

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