[Uml-devel] branches/KDE/3.5/kdesdk/umbrello/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Sun Sep 11 10:49:06 UTC 2005


SVN commit 459714 by okellogg:

Add menu item for BoxWidget individual color selection.
However, when no color is individually selected, do not use the diagram
color (boxes shall be black regardless of diagram line color.)


 M  +3 -0      boxwidget.cpp  
 M  +1 -0      listpopupmenu.cpp  
 M  +1 -1      widgetbase.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/umbrello/boxwidget.cpp #459713:459714
@@ -26,6 +26,8 @@
 void BoxWidget::init() {
     setSize(100,80);
     UMLWidget::setBaseType( Uml::wt_Box );
+    WidgetBase::m_bUsesDiagramLineColour = false;  // boxes be black
+    WidgetBase::m_LineColour = QColor("black");
     setZ(0);
 }
 
@@ -34,6 +36,7 @@
 }
 
 void BoxWidget::draw(QPainter& p, int offsetX, int offsetY) {
+    UMLWidget::setPen(p);
     p.drawRect( offsetX, offsetY, width(), height() );
 
     if (m_bSelected) {
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/listpopupmenu.cpp #459713:459714
@@ -335,6 +335,7 @@
 
     case Uml::wt_Box:
         insertStdItems(false, type);
+        insertStdItem(mt_Line_Color);
         break;
 
     case Uml::wt_State:
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/widgetbase.cpp #459713:459714
@@ -99,7 +99,7 @@
     if (lineColour != "none") {
         m_LineColour = QColor(lineColour);
         m_bUsesDiagramLineColour = false;
-    } else if ( m_pView ) {
+    } else if (m_Type != Uml::wt_Box && m_pView != NULL) {
         m_LineColour = m_pView->getLineColor();
         m_bUsesDiagramLineColour = true;
     }




More information about the umbrello-devel mailing list