Bug 67719 - cannot make abstract use cases
Summary: cannot make abstract use cases
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-09 23:03 UTC by Wiebe Cazemier
Modified: 2005-05-26 22:21 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wiebe Cazemier 2003-11-09 23:03:53 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources

Classes can be made abstract, resulting in an italicly written title. Although I can create an italic title for use cases, it would be better if it would be possible to make use cases abstract with an toggle
Comment 1 Oliver Kellogg 2005-05-26 22:21:14 UTC
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;