mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-02-05 20:19:58 +01:00
Forget file from previous commit
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5118 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "QPropertyUndoCommand/qpropertyundocommand.h"
|
||||
#include "terminal.h"
|
||||
#include "conductor.h"
|
||||
#include "elementtextitemgroup.h"
|
||||
|
||||
#include <QDomDocument>
|
||||
#include <QDomElement>
|
||||
@@ -222,11 +223,26 @@ void DynamicElementTextItem::fromXml(const QDomElement &dom_elmt)
|
||||
/**
|
||||
* @brief DynamicElementTextItem::ParentElement
|
||||
* @return a pointer to the parent element. Note the pointer can be null.
|
||||
* Note that the text can return a parent element,
|
||||
* even if the text belong to a group of this same element.
|
||||
*/
|
||||
Element *DynamicElementTextItem::parentElement() const {
|
||||
return m_parent_element;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief DynamicElementTextItem::parentGroup
|
||||
* @return The group where this text belong, if this item
|
||||
* is note in a group, return nullptr.
|
||||
*/
|
||||
ElementTextItemGroup *DynamicElementTextItem::parentGroup() const
|
||||
{
|
||||
if(group())
|
||||
return dynamic_cast<ElementTextItemGroup *>(group());
|
||||
else
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief DynamicElementTextItem::elementUseForInfo
|
||||
* @return a pointer to the element we must use for the variable information.
|
||||
@@ -493,6 +509,11 @@ bool DynamicElementTextItem::frame() const
|
||||
return m_frame;
|
||||
}
|
||||
|
||||
QUuid DynamicElementTextItem::uuid() const
|
||||
{
|
||||
return m_uuid;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief DynamicElementTextItem::mousePressEvent
|
||||
* @param event
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
class Element;
|
||||
class Conductor;
|
||||
class ElementTextItemGroup;
|
||||
|
||||
/**
|
||||
* @brief The DynamicElementTextItem class
|
||||
@@ -77,6 +78,7 @@ class DynamicElementTextItem : public DiagramTextItem
|
||||
void fromXml(const QDomElement &dom_elmt) override;
|
||||
|
||||
Element *parentElement() const;
|
||||
ElementTextItemGroup *parentGroup() const;
|
||||
Element *elementUseForInfo() const;
|
||||
void refreshLabelConnection();
|
||||
|
||||
@@ -93,6 +95,7 @@ class DynamicElementTextItem : public DiagramTextItem
|
||||
QString compositeText() const;
|
||||
void setFrame(const bool frame);
|
||||
bool frame() const;
|
||||
QUuid uuid() const;
|
||||
|
||||
protected:
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
|
||||
Reference in New Issue
Block a user