[Uml-devel] branches/work/soc-umbrello/umbrello
Gopala Krishna A
krishna.ggk at gmail.com
Sun Jul 20 20:52:59 UTC 2008
SVN commit 835608 by gopala:
Added TextItem::underline() and TextItem::setUnderline convenience methods.
M +9 -0 textitem.cpp
M +5 -2 textitem.h
--- branches/work/soc-umbrello/umbrello/textitem.cpp #835607:835608
@@ -172,6 +172,15 @@
}
}
+void TextItem::setUnderline(bool u)
+{
+ QFont f = font();
+ if(u != f.underline()) {
+ f.setUnderline(u);
+ QGraphicsTextItem::setFont(f);
+ }
+}
+
/**
* Reimplemented to retain the italic/bold status on font change.
*
--- branches/work/soc-umbrello/umbrello/textitem.h #835607:835608
@@ -34,11 +34,9 @@
TextItem(const QString& text, QGraphicsItem *parent = 0);
~TextItem();
-
Qt::Alignment alignment() const;
void setAlignment(Qt::Alignment align);
-
bool bold() const {
return font().bold();
}
@@ -49,6 +47,11 @@
}
void setItalic(bool i);
+ bool underline() const {
+ return font().underline();
+ }
+ void setUnderline(bool u);
+
qreal width() const {
return boundingRect().width();
}
More information about the umbrello-devel
mailing list