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

Ralf Habacker ralf.habacker at gmail.com
Sat Mar 24 10:04:27 UTC 2012


SVN commit 1286932 by habacker:

Fixed applying of text color changes in diagrams property dialog.

CCBUG: 291058

 M  +1 -0      dialogs/umlviewdialog.cpp  
 M  +4 -1      umlscene.cpp  
 M  +1 -0      umlscene.h  
 M  +17 -0     widgets/umlwidget.cpp  
 M  +1 -0      widgets/umlwidget.h  


--- trunk/KDE/kdesdk/umbrello/umbrello/dialogs/umlviewdialog.cpp #1286931:1286932
@@ -190,6 +190,7 @@
          */
         m_pView->umlScene()->setLineWidth( m_options.uiState.lineWidth );
         m_pView->umlScene()->setUseFillColor( m_options.uiState.useFillColor );
+        m_pView->umlScene()->setTextColor( m_options.uiState.textColor );
         m_pView->umlScene()->setLineColor( m_options.uiState.lineColor );
         m_pView->umlScene()->setFillColor( m_options.uiState.fillColor );
         m_pView->umlScene()->setBackgroundColor( m_options.uiState.backgroundColor );
--- trunk/KDE/kdesdk/umbrello/umbrello/umlscene.cpp #1286931:1286932
@@ -408,6 +408,7 @@
     w->setActivated();
     w->setFont(getFont());
     w->slotColorChanged(getID());
+    w->slotTextColorChanged(getID());
     w->slotLineWidthChanged(getID());
     resizeCanvasToItems();
     m_WidgetList.append(w);
@@ -481,6 +482,7 @@
     newWidget->setActivated();
     newWidget->setFont(getFont());
     newWidget->slotColorChanged(getID());
+    newWidget->slotTextColorChanged(getID());
     newWidget->slotLineWidthChanged(getID());
     newWidget->updateComponentSize();
 
@@ -940,6 +942,7 @@
     disconnect(this, SIGNAL(sigRemovePopupMenu()), o, SLOT(slotRemovePopupMenu()));
     disconnect(this, SIGNAL(sigClearAllSelected()), o, SLOT(slotClearAllSelected()));
     disconnect(this, SIGNAL(sigColorChanged(Uml::IDType)), o, SLOT(slotColorChanged(Uml::IDType)));
+    disconnect(this, SIGNAL(sigTextColorChanged(Uml::IDType)), o, SLOT(slotTextColorChanged(Uml::IDType)));
     if (t == WidgetBase::wt_Message) {
         m_MessageList.removeAll(static_cast<MessageWidget*>(o));
     } else
@@ -1040,7 +1043,7 @@
 void UMLScene::setTextColor(const QColor &color)
 {
     m_Options.uiState.textColor = color;
-    emit sigColorChanged(getID());
+    emit sigTextColorChanged(getID());
     setAllChanged();
 }
 
--- trunk/KDE/kdesdk/umbrello/umbrello/umlscene.h #1286931:1286932
@@ -718,6 +718,7 @@
 
 signals:
     void sigColorChanged( Uml::IDType );
+    void sigTextColorChanged( Uml::IDType );
     void sigRemovePopupMenu();
     void sigClearAllSelected();
     void sigLineWidthChanged( Uml::IDType );
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/umlwidget.cpp #1286931:1286932
@@ -332,6 +332,7 @@
     connect(m_scene, SIGNAL(sigClearAllSelected()), this, SLOT(slotClearAllSelected()));
 
     connect(m_scene, SIGNAL(sigColorChanged(Uml::IDType)), this, SLOT(slotColorChanged(Uml::IDType)));
+    connect(m_scene, SIGNAL(sigTextColorChanged(Uml::IDType)), this, SLOT(slotTextColorChanged(Uml::IDType)));
     connect(m_scene, SIGNAL(sigLineWidthChanged(Uml::IDType)), this, SLOT(slotLineWidthChanged(Uml::IDType)));
 
     m_pObject = NULL;
@@ -520,6 +521,20 @@
 }
 
 /**
+ * Captures a text color change signal.
+ *
+ * @param sceneID The id of the object behind the widget.
+ */
+void UMLWidget::slotTextColorChanged(Uml::IDType viewID)
+{
+    //only change if on the diagram concerned
+    if (m_scene->getID() != viewID)
+        return;
+    setTextColor( m_scene->textColor() );
+    update();
+}
+
+/**
  * Captures a linewidth change signal.
  *
  * @param sceneID The id of the object behind the widget.
@@ -1082,11 +1097,13 @@
     disconnect(m_scene, SIGNAL(sigRemovePopupMenu()), this, SLOT(slotRemovePopupMenu()));
     disconnect(m_scene, SIGNAL(sigClearAllSelected()), this, SLOT(slotClearAllSelected()));
     disconnect(m_scene, SIGNAL(sigColorChanged(Uml::IDType)), this, SLOT(slotColorChanged(Uml::IDType)));
+    disconnect(m_scene, SIGNAL(sigTextColorChanged(Uml::IDType)), this, SLOT(slotTextColorChanged(Uml::IDType)));
     disconnect(m_scene, SIGNAL(sigLineWidthChanged(Uml::IDType)), this, SLOT(slotLineWidthChanged(Uml::IDType)));
     m_scene = v;
     connect(m_scene, SIGNAL(sigRemovePopupMenu()), this, SLOT(slotRemovePopupMenu()));
     connect(m_scene, SIGNAL(sigClearAllSelected()), this, SLOT(slotClearAllSelected()));
     connect(m_scene, SIGNAL(sigColorChanged(Uml::IDType)), this, SLOT(slotColorChanged(Uml::IDType)));
+    connect(m_scene, SIGNAL(sigTextColorChanged(Uml::IDType)), this, SLOT(slotTextColorChanged(Uml::IDType)));
     connect(m_scene, SIGNAL(sigLineWidthChanged(Uml::IDType)), this, SLOT(slotLineWidthChanged(Uml::IDType)));
 }
 
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/umlwidget.h #1286931:1286932
@@ -375,6 +375,7 @@
     virtual void slotMenuSelection(QAction* action);
     virtual void slotWidgetMoved(Uml::IDType id);
     virtual void slotColorChanged(Uml::IDType viewID);
+    virtual void slotTextColorChanged(Uml::IDType viewID);
     virtual void slotLineWidthChanged(Uml::IDType viewID);
 
     void slotClearAllSelected();




More information about the umbrello-devel mailing list