[Uml-devel] KDE/kdesdk/umbrello/umbrello
Andi Fischer
andi.fischer at hispeed.ch
Tue Dec 20 08:59:20 UTC 2011
SVN commit 1269457 by fischer:
Tool tips in the list for classifier and attributes added.
M +15 -1 umllistviewitem.cpp
--- trunk/KDE/kdesdk/umbrello/umbrello/umllistviewitem.cpp #1269456:1269457
@@ -197,10 +197,24 @@
QString UMLListViewItem::toolTip()
{
UMLObject *obj = umlObject();
- if (obj && obj->baseType() == UMLObject::ot_Operation) {
+ if (obj) {
+ switch (obj->baseType()) {
+ case UMLObject::ot_Class:
+ return obj->doc();
+ case UMLObject::ot_Operation:
+ {
UMLOperation *op = static_cast<UMLOperation*>(obj);
return op->toString(Uml::SignatureType::ShowSig);
}
+ case UMLObject::ot_Attribute:
+ {
+ UMLAttribute *at = static_cast<UMLAttribute*>(obj);
+ return at->toString(Uml::SignatureType::ShowSig);
+ }
+ default:
+ return QString();
+ }
+ }
else {
return QString();
}
More information about the umbrello-devel
mailing list