[Uml-devel] kdesdk/umbrello/umbrello

Sebastian Stein seb.kde at hpfsc.de
Wed Aug 27 12:55:09 UTC 2003


CVS commit by sstein: 

KASTLE:
- make changing fill color of multiple items work


  M +1 -1      listpopupmenu.cpp   1.26
  M +2 -1      listpopupmenu.h   1.17
  M +10 -0     umlview.cpp   1.73
  M +5 -0      umlview.h   1.31
  M +7 -0      umlwidget.cpp   1.42


--- kdesdk/umbrello/umbrello/umlwidget.cpp  #1.41:1.42
@@ -348,4 +348,11 @@ void UMLWidget::slotMenuSelection(int se
                                 break;
 
+                        case ListPopupMenu::mt_Fill_Color_Selection:
+                                if ( KColorDialog::getColor(newColour) ) {
+                                        m_pView -> selectionSetFillColor( newColour );
+                                        m_pView->getDocument()->setModified(true);
+                                }
+                                break;
+
                         case ListPopupMenu::mt_Use_Fill_Color:
                                 m_pData->setUseFillColor( !m_pData->getUseFillColor() );

--- kdesdk/umbrello/umbrello/umlview.h  #1.30:1.31
@@ -232,4 +232,9 @@ public:
 
         /**
+         *      Set the fill color for all the currently selected items.
+         */
+        void selectionSetFillColor( QColor color );
+
+        /**
          *      Delete the selected widgets list and the widgets in it.
          */

--- kdesdk/umbrello/umbrello/umlview.cpp  #1.72:1.73
@@ -984,5 +984,15 @@ void UMLView::selectionSetLineColor( QCo
                 temp -> getData() -> setUsesDiagramLineColour(false);
         }
+}
 
+void UMLView::selectionSetFillColor( QColor color )
+{
+        UMLWidget * temp = 0;
+        for(temp=(UMLWidget *) m_SelectedList.first();
+                                temp;
+                                        temp=(UMLWidget *)m_SelectedList.next()) {
+                temp -> setFillColour( color );
+                temp -> getData() -> setUsesDiagramFillColour(false);
+        }
 }
 

--- kdesdk/umbrello/umbrello/listpopupmenu.h  #1.16:1.17
@@ -122,6 +122,7 @@ public:
             mt_Multi_Selection,               //MULTISELECTION
             mt_Line_Color,                    //LINECOLOR
-            mt_Line_Color_Selection,          //LINECOLOR, multiple Items
+            mt_Line_Color_Selection,          //LINECOLOR, multiple items
             mt_Fill_Color,                    //FILLCOLOR
+            mt_Fill_Color_Selection,          //FILLCOLOR, multiple items
             mt_Use_Fill_Color,                //USEFCOLOR
             mt_Default_Properties,            //DEFAULTPROPERTIES

--- kdesdk/umbrello/umbrello/listpopupmenu.cpp  #1.25:1.26
@@ -452,5 +452,5 @@ void ListPopupMenu::setupColorSelection(
         m_pColor = new KPopupMenu( this, "Colour");
         m_pColor -> insertItem(SmallIcon( "color_line"), i18n("Line Color"), mt_Line_Color_Selection);
-        m_pColor -> insertItem(SmallIcon( "color_fill"), i18n("Fill Color"), mt_Fill_Color);
+        m_pColor -> insertItem(SmallIcon( "color_fill"), i18n("Fill Color"), mt_Fill_Color_Selection);
         m_pColor -> insertItem( i18n("Use Fill Color"), mt_Use_Fill_Color);
 






More information about the umbrello-devel mailing list