Esempio n. 1
0
QSizeF QGraphicsFlowLayout::minimumSize() const
{
	QSizeF size;
	QGraphicsLayoutItem *item;
	foreach (item, m_itemList)
		size = size.expandedTo(item->minimumSize());

	size += QSizeF(m_margins.left() + m_margins.right(), m_margins.top() + m_margins.bottom());
	return size;
}
void CVisSystemCanvasNote::setNoteRect(const QRectF& noteRect)
{
    QPointF pos = noteRect.center();
	QSizeF size = noteRect.size();
	QSizeF minSize = d->minimumSize;

	size = size.expandedTo(minSize);

    prepareGeometryChange();
    setRect(QRectF(-size.width()/2, -size.height()/2, size.width(), size.height()));
	setPos(pos);
    update();

    emit noteRectChanged();
	emit d->canvas->projectPartModified();
}