[Uml-devel] [Bug 67719] cannot make abstract use cases

Oliver Kellogg okellogg at users.sourceforge.net
Thu May 26 13:21:51 UTC 2005


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=67719         
okellogg users sourceforge net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From okellogg users sourceforge net  2005-05-26 22:21 -------
SVN commit 418526 by okellogg:

Patch from Jean-Remy Falleri <jr.falleri_AT_gmail.com> adds abstract usecases.
BUG:67719


 M  +1 -1      ChangeLog  
 M  +1 -0      THANKS  
 M  +8 -2      umbrello/dialogs/classgenpage.cpp  
 M  +8 -2      umbrello/usecasewidget.cpp  


--- trunk/KDE/kdesdk/umbrello/ChangeLog #418525:418526
 @ -5,7 +5,7  @
 * Change interface into class and vice versa (if abstract and no attributes)
 
 * Bugs fixed / wishes implemented (see http://bugs.kde.org)
-57588 79433 87252 88117 105564
+57588 67719 79433 87252 88117 105564
 
 Version 1.4.1 (maintenance release)
 
--- trunk/KDE/kdesdk/umbrello/THANKS #418525:418526
 @ -24,6 +24,7  @
 Albert Cervera <albertca  jazzfree com>
 Albert Astals Cid <tsdgeos  terra es>
 Vincent Decorges <vincent.decorges  eivd ch>
+Jean-Remy Falleri <jr.falleri  gmail com>
 Andi Fischer <andi.fischer  hispeed ch>
 Pascal Fleury <fleury  users sourceforge net>
 Esben Mose Hansen <esben  despammed com>
--- trunk/KDE/kdesdk/umbrello/umbrello/dialogs/classgenpage.cpp #418525:418526
 @ -103,8 +103,14  @
 		m_pPackageL->setBuddy(m_pPackageLE);
 	}
 
-	if (t == Uml::ot_Class ) {
-		m_pAbstractCB = new QCheckBox( i18n("A&bstract class"), this );
+	if (t == Uml::ot_Class || t == Uml::ot_UseCase ) {
+		QString abstractCaption;
+		if ( t == Uml::ot_Class  ) {
+			abstractCaption = i18n("A&bstract class");
+		} else {
+			abstractCaption = i18n("A&bstract use case");
+		}
+		m_pAbstractCB = new QCheckBox( abstractCaption, this );
 		m_pAbstractCB -> setChecked( o -> getAbstract() );
 		m_pNameLayout -> addWidget( m_pAbstractCB, 3, 0 );
 	}
--- trunk/KDE/kdesdk/umbrello/umbrello/usecasewidget.cpp #418525:418526
 @ -20,6 +20,7  @
 #include "usecase.h"
 #include "umlview.h"
 
+
 UseCaseWidget::UseCaseWidget(UMLView * view, UMLUseCase *o) : UMLWidget(view, o) {
 	UMLWidget::setBaseType(Uml::wt_UseCase);
 	//calculateSize();  Doing this during loadFromXMI() gives futile updates.
 @ -32,7 +33,11  @
 	UMLWidget::setPen(p);
 	if ( UMLWidget::getUseFillColour() )
 		p.setBrush( UMLWidget::getFillColour() );
-	p.setFont( UMLWidget::getFont() );
+	QFont font = UMLWidget::getFont();
+	font.setUnderline(false);
+	font.setBold(false);
+	font.setItalic( m_pObject->getAbstract() );
+	p.setFont( font );
 	QFontMetrics &fm = getFontMetrics(FT_NORMAL);
 	int fontHeight  = fm.lineSpacing();
 	int w = width();
 @ -50,7 +55,8  @
 
 void UseCaseWidget::calculateSize()
 {
-	QFontMetrics &fm = getFontMetrics(FT_NORMAL);
+	const UMLWidget::FontType ft = ( m_pObject->getAbstract() ? FT_BOLD_ITALIC : FT_BOLD );
+	QFontMetrics &fm = UMLWidget::getFontMetrics(ft);
 	int fontHeight  = fm.lineSpacing();
 	int textWidth = fm.width(getName());
 	int width = textWidth > UC_WIDTH?textWidth:UC_WIDTH;




More information about the umbrello-devel mailing list