45 lines
1.1 KiB
C++
45 lines
1.1 KiB
C++
#include "blobinvertedrect2.hpp"
|
|
#include "blobgroup2.hpp"
|
|
|
|
BlobInvertedRect2::BlobInvertedRect2(QQuickItem* parent) : BlobShape2(parent) {}
|
|
|
|
BlobInvertedRect2::~BlobInvertedRect2() {
|
|
if (m_group) m_group->clearInvertedRect(this);
|
|
}
|
|
|
|
void BlobInvertedRect2::setBorderLeft(qreal v) {
|
|
if (qFuzzyCompare(m_borderLeft, v)) return;
|
|
m_borderLeft = v;
|
|
emit borderLeftChanged();
|
|
if (m_group) m_group->markDirty();
|
|
}
|
|
|
|
void BlobInvertedRect2::setBorderRight(qreal v) {
|
|
if (qFuzzyCompare(m_borderRight, v)) return;
|
|
m_borderRight = v;
|
|
emit borderRightChanged();
|
|
if (m_group) m_group->markDirty();
|
|
}
|
|
|
|
void BlobInvertedRect2::setBorderTop(qreal v) {
|
|
if (qFuzzyCompare(m_borderTop, v)) return;
|
|
m_borderTop = v;
|
|
emit borderTopChanged();
|
|
if (m_group) m_group->markDirty();
|
|
}
|
|
|
|
void BlobInvertedRect2::setBorderBottom(qreal v) {
|
|
if (qFuzzyCompare(m_borderBottom, v)) return;
|
|
m_borderBottom = v;
|
|
emit borderBottomChanged();
|
|
if (m_group) m_group->markDirty();
|
|
}
|
|
|
|
void BlobInvertedRect2::registerWithGroup() {
|
|
if (m_group) m_group->setInvertedRect(this);
|
|
}
|
|
|
|
void BlobInvertedRect2::unregisterFromGroup() {
|
|
if (m_group) m_group->clearInvertedRect(this);
|
|
}
|