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

Andi Fischer andi.fischer at hispeed.ch
Sat Mar 24 10:12:50 UTC 2012


SVN commit 1286935 by fischer:

Using parameter scene instead of view.

 M  +5 -5      assocpage.cpp  
 M  +3 -3      assocpage.h  
 M  +1 -1      classpropdlg.cpp  


--- trunk/KDE/kdesdk/umbrello/umbrello/dialogs/assocpage.cpp #1286934:1286935
@@ -12,7 +12,7 @@
 
 #include "assocpropdlg.h"
 #include "debug_utils.h"
-#include "umlview.h"
+#include "umlscene.h"
 
 #include <klocale.h>
 
@@ -26,10 +26,10 @@
  *  @param  v       The view the UMLObject being represented.
  *  @param  o       The UMLObject being represented
  */
-AssocPage::AssocPage(QWidget *parent, UMLView * v, UMLObject * o) : QWidget(parent)
+AssocPage::AssocPage(QWidget *parent, UMLScene * s, UMLObject * o) : QWidget(parent)
 {
     m_pObject = o;
-    m_pView = v;
+    m_pScene = s;
     int margin = fontMetrics().height();
 
     QHBoxLayout * mainLayout = new QHBoxLayout(this);
@@ -89,7 +89,7 @@
 {
     m_List.clear();
     m_pAssocLW->clear();
-    m_pView->umlScene()->getWidgetAssocs(m_pObject, m_List);
+    m_pScene->getWidgetAssocs(m_pObject, m_List);
     int i = 0;
     foreach( AssociationWidget* assocwidget, m_List ) {
         if( assocwidget->associationType() != Uml::AssociationType::Anchor) {
@@ -126,7 +126,7 @@
     ListPopupMenu::MenuType id = m_pMenu->getMenuType(action);
     switch (id) {
     case ListPopupMenu::mt_Delete:
-        m_pView->umlScene()->removeAssocInViewAndDoc(a);
+        m_pScene->removeAssocInViewAndDoc(a);
         fillListBox();
         break;
 
--- trunk/KDE/kdesdk/umbrello/umbrello/dialogs/assocpage.h #1286934:1286935
@@ -19,9 +19,9 @@
 #include "associationwidget.h"
 #include "listpopupmenu.h"
 
+class UMLScene;
 class QGroupBox;
 class QListWidget;
-class UMLView;
 
 /**
  * Displays a page on the tabbed dialog window of @ref ClassPropDlg.
@@ -36,12 +36,12 @@
     Q_OBJECT
 
 public:
-    AssocPage(QWidget *parent, UMLView * v, UMLObject * o);
+    AssocPage(QWidget *parent, UMLScene * scene, UMLObject * o);
     ~AssocPage();
 
 private:
     UMLObject * m_pObject;
-    UMLView * m_pView;
+    UMLScene * m_pScene;
     QListWidget * m_pAssocLW;
     QGroupBox * m_pAssocGB;
     AssociationWidgetList m_List;
--- trunk/KDE/kdesdk/umbrello/umbrello/dialogs/classpropdlg.cpp #1286934:1286935
@@ -360,7 +360,7 @@
 {
     QFrame* page = createPage( i18n("Associations"), i18n("Class Associations"),
                                Icon_Utils::it_Properties_Associations );
-    m_pAssocPage = new AssocPage(page, UMLApp::app()->currentView(), m_pObject);
+    m_pAssocPage = new AssocPage(page, UMLApp::app()->currentView()->umlScene(), m_pObject);
     QHBoxLayout* assocLayout = new QHBoxLayout(page);
     assocLayout->addWidget(m_pAssocPage);
 }




More information about the umbrello-devel mailing list