[Uml-devel] branches/work/soc-umbrello-2011/umbrello

Camila San Martin Ayres smayres at gmail.com
Tue May 10 02:37:54 UTC 2011


SVN commit 1231071 by ayres:

Porting/Testing class UMLView and working on UMLViewCanvas

 M  +7 -0      CMakeLists.txt  
 A             newcanvas (directory)  
 M  +16 -0     umlview.cpp  
 M  +5 -0      umlview.h  


--- branches/work/soc-umbrello-2011/umbrello/CMakeLists.txt #1231070:1231071
@@ -44,6 +44,7 @@
   ${CMAKE_CURRENT_SOURCE_DIR}/codegenwizard/
   ${CMAKE_CURRENT_SOURCE_DIR}/controller/
   ${CMAKE_CURRENT_SOURCE_DIR}/docgenerators/
+  ${CMAKE_CURRENT_SOURCE_DIR}/newcanvas/
   ${CMAKE_CURRENT_SOURCE_DIR}/refactoring/
   ${CMAKE_CURRENT_SOURCE_DIR}/widgets/
   ${Boost_INCLUDE_DIR}
@@ -53,6 +54,11 @@
     debug/debug_utils.cpp
 )
 
+set(libnewcanvas_SRCS
+    newcanvas/newscene.cpp
+    newcanvas/newview.cpp
+)
+
 set(libcodegenerator_SRCS
     codegenerators/codegenfactory.cpp
     codegenerators/codegenpolicyext.cpp
@@ -433,6 +439,7 @@
 kde4_add_kcfg_files(umbrello_SRCS umbrellosettings.kcfgc)
 
 set (umbrello_SRCS
+    ${libnewcanvas_SRCS}
     ${umbrello_SRCS}
     ${libcontroller_SRCS}
     ${libdebug_SRCS}
--- branches/work/soc-umbrello-2011/umbrello/umlview.cpp #1231070:1231071
@@ -99,6 +99,10 @@
 #include "entity.h"
 #include "foreignkeyconstraint.h"
 
+//new canvas
+#include "newview.h"
+#include <ktabwidget.h>
+
 // control the manual DoubleBuffering of QCanvas
 // with a define, so that this memory X11 effect can
 // be tested more easily
@@ -152,8 +156,19 @@
 
     m_pImageExporter = new UMLViewImageExporter(this);
 
+    //new canvas
+    qDebug() << "new scene";
+    KTabWidget *m_tabWidget = new KTabWidget();
+    m_tabWidget->setAutomaticResizeTabs(true);
+    m_tabWidget->setTabsClosable(true);
+    m_view = new NewView(parentFolder, m_tabWidget);
+    m_tabWidget->addTab(m_view, QString("QGraphicsView"));
+    m_tabWidget->show();  
+    //new canvas
+    
     //setup graphical items
     setCanvas(new UMLViewCanvas(this));
+    
     // don't set the quite frequent update rate for each
     // diagram, as that causes also an update of invisible
     // diagrams, which can cost high CPU load for many
@@ -180,6 +195,7 @@
     m_pToolBarState = m_pToolBarStateFactory->getState(WorkToolBar::tbb_Arrow, this);
     m_pDoc = UMLApp::app()->document();
     m_pFolder = parentFolder;
+    
 }
 
 /**
--- branches/work/soc-umbrello-2011/umbrello/umlview.h #1231070:1231071
@@ -12,6 +12,8 @@
 #define UMLVIEW_H
 
 // system includes
+
+
 #include <kurl.h>
 #include <qdom.h>
 #include <q3canvas.h>
@@ -31,6 +33,7 @@
 #include "messagewidgetlist.h"
 #include "optionstate.h"
 #include "worktoolbar.h"
+#include "newview.h"
 
 // forward declarations
 class ClassOptionsPage;
@@ -51,6 +54,7 @@
 class QPrinter;
 class ToolBarState;
 class ToolBarStateFactory;
+class NewUMLView;
 
 /**
  * UMLView instances represent diagrams.
@@ -1159,6 +1163,7 @@
      * The folder in which this UMLView is contained
      */
     UMLFolder *m_pFolder;
+    NewView *m_view;
 
     /**
      * set to true when a child has used the showDocumentation method,




More information about the umbrello-devel mailing list