[Uml-devel] branches/work/soc-umbrello/umbrello
Gopala Krishna A
krishna.ggk at gmail.com
Fri Jul 18 16:09:16 UTC 2008
SVN commit 834307 by gopala:
Cache the current size of the TextItemGroup in TextItemGroup::alignVertically() method.
Allow use of this currentSize, if needed, to calculate geometry of uml widgets.
M +4 -0 textitemgroup.cpp
M +5 -0 textitemgroup.h
--- branches/work/soc-umbrello/umbrello/textitemgroup.cpp #834306:834307
@@ -137,6 +137,10 @@
void TextItemGroup::alignVertically(qreal currentWidth, qreal currentHeight)
{
+ // Update current size
+ m_currentSize.setWidth(currentWidth);
+ m_currentSize.setHeight(currentHeight);
+
QSizeF minimumSize = calculateMinimumSize();
if(currentWidth < minimumSize.width() || currentHeight < minimumSize.height()) {
uDebug() << "Size of group less then minimum size\n"
--- branches/work/soc-umbrello/umbrello/textitemgroup.h #834306:834307
@@ -72,6 +72,10 @@
}
void setPos(const QPointF& pos);
+ QSizeF currentSize() const {
+ return m_currentSize;
+ }
+
void unparent();
void reparent();
@@ -81,6 +85,7 @@
QGraphicsItem *m_parentItem;
QList<TextItem*> m_textItems;
QPointF m_pos;
+ QSizeF m_currentSize;
qreal m_lineBreakageWidth;
};
More information about the umbrello-devel
mailing list