[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdesdk/umbrello/umbrello
From: Luis De la Parra Blum <lparrab () gmx ! net>
Date: 2003-03-31 23:32:06
[Download RAW message or body]
CVS commit by luis:
Aha!, found why the old classwidgets were not being updated...
dont understand why they get the signal from the UMLDoc instead of from the \
UMLClass... and dont know how you can construct a ClassWidget *without* a \
UMLClass ( 3 constructors?). but oh well...
--> connect UMLObject's signal modified to a "update" slot in the widget.
changes made by the refactoring assistant are now reflected by the \
classwidgets.. you have to start the assistant from one of the new \
classwidgets, then switch back to the old diagram (if you want) and watch \
it work.
M +14 -4 umlwidget.cpp 1.25
M +2 -0 umlwidget.h 1.8
--- kdesdk/umbrello/umbrello/umlwidget.h #1.7:1.8
@@ -547,4 +547,6 @@ public slots:
* @param o The changed UMLobject
*/
+ virtual void updateWidget();
+
virtual void slotChangeWidget(UMLObject * o);
--- kdesdk/umbrello/umbrello/umlwidget.cpp #1.24:1.25
@@ -207,8 +207,6 @@ Uml::UMLWidget_Type UMLWidget::getBaseTy
}
////////////////////////////////////////////////////////////////////////////////////////////////////
-
-void UMLWidget::slotChangeWidget(UMLObject * o) {
- if(m_pObject != o)
- return;
+void UMLWidget::updateWidget()
+{
if(m_pObject)
setName(m_pObject->getName());//sync names
@@ -218,4 +216,12 @@ void UMLWidget::slotChangeWidget(UMLObje
update();
}
+
+void UMLWidget::slotChangeWidget(UMLObject * o)
+{
+ if(m_pObject != o)
+ return;
+ updateWidget();
+
+}
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -281,4 +287,8 @@ void UMLWidget::init() {
connect( m_pView, SIGNAL(sigColorChanged(int)), this, \
SLOT(slotColorChanged(int)));
connect( m_pView -> getDocument(), \
SIGNAL(sigWidgetUpdated(UMLObject *)), this, \
SLOT(slotChangeWidget(UMLObject *))); + if( m_pObject )
+ {
+ connect( \
m_pObject,SIGNAL(modified()),this,SLOT(updateWidget())); + }
setZ( 1 );
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic