Go to the documentation of this file.
16#ifndef KDSME_MODEL_ELEMENT_H
17#define KDSME_MODEL_ELEMENT_H
19#include "kdsme_core_export.h"
34class KDSME_CORE_EXPORT
Element :
public QObject
77 Q_DECLARE_FLAGS(Flags, Flag)
79 explicit Element(QObject *parent =
nullptr);
82 virtual Type type()
const;
85 void setFlags(Flags flags);
90 QString label()
const;
91 void setLabel(
const QString &label);
98 quintptr internalId()
const;
99 void setInternalId(quintptr
id);
101 void setInternalPointer(
void *ptr);
102 void *internalPointer()
const;
105 void setPos(
const QPointF &pos);
107 qreal height()
const;
108 void setHeight(qreal height);
111 void setWidth(qreal width);
113 QPointF absolutePos()
const;
115 bool isVisible()
const;
116 void setVisible(
bool visible);
118 bool isSelected()
const;
119 void setSelected(
bool selected);
121 QSizeF preferredSize()
const;
122 virtual QRectF boundingRect()
const;
124 Element *parentElement()
const;
125 void setParentElement(
Element *parent);
126 void setParent(QObject *
object);
127 QList<Element *> childElements()
const;
129 virtual QString toDisplayString()
const;
146 QScopedPointer<Private> d;
void visibleChanged(bool visible)
void heightChanged(qreal height)
void posChanged(const QPointF &pos)
void setPos(const QPointF &pos)
void flagsChanged(KDSME::Element::Flags flags)
void setSelected(bool selected)
bool selected
Whether this item is marked as selected.
void setLabel(const QString &label)
void setVisible(bool visible)
QPointF pos
The position of the element from the top-left corner.
void setParentElement(Element *parent)
void setWidth(qreal width)
void selectedChanged(bool selected)
void parentChanged(KDSME::Element *parent)
bool visible
Whether this item is visible in the scene.
Element(QObject *parent=nullptr)
void labelChanged(const QString &label)
void widthChanged(qreal width)
void setFlags(Flags flags)
void setHeight(qreal height)
Element * parentElement() const