[Uml-devel] [Bug 67059] Automatic layout of diagrams

Oliver Kellogg okellogg at users.sourceforge.net
Thu Aug 4 05:00:30 UTC 2005


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=67059         




------- Additional Comments From okellogg users sourceforge net  2005-08-04 13:57 -------
SVN commit 442912 by okellogg:

CCBUG:67059 - Fix autoconf detection of graphviz.
This just shows how it would be done - IF we were doing it.
To activate, remove the "dnl" from the start of the lines following the line
"dnl Not GPL compatible" in configure.in.in.


 M  +14 -4     configure.in.in  
 M  +3 -5      umbrello/Makefile.am  
 M  +3 -3      umbrello/autolayout/Makefile.am  
 M  +11 -7     umbrello/uml.cpp  
 M  +4 -2      umbrello/uml.h  


--- branches/KDE/3.5/kdesdk/umbrello/configure.in.in #442911:442912
 @ -9,13 +9,23  @
 fi
 
 dnl Not GPL compatible
-dnl AC_CHECK_HEADER(graphviz/dot.h,
+dnl AC_PATH_PROG(DOT_FOUND, dot, no)
+dnl KDE_CHECK_HEADER(graphviz/pathgeom.h,
 dnl   [kde_have_graphviz=yes],
 dnl   [kde_have_graphviz=no])
-dnl
-dnl if test "$kde_have_graphviz" = "no"; then
-dnl   DO_NOT_COMPILE="$DO_NOT_COMPILE umbrello"
+dnl  
+dnl if test "$DOT_FOUND" != "no" -a "$kde_have_graphviz" = "yes"; then
+dnl   CXXFLAGS="$CXXFLAGS -DHAVE_DOT"
+dnl   GRAPHVIZ_LIB=`pkg-config --libs libgraph`
+dnl   AUTOLAYOUT_DIR="autolayout"
+dnl   AUTOLAYOUT_LIBS="autolayout/libautolayout.la $GRAPHVIZ_LIB -ldotgen -lgvc"
+dnl else
+dnl   AUTOLAYOUT_DIR=""
+dnl   AUTOLAYOUT_LIBS=""
 dnl fi
+dnl AC_SUBST(AUTOLAYOUT_DIR)
+dnl AC_SUBST(AUTOLAYOUT_LIBS)
+
 AC_LANG_RESTORE
 
 
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/Makefile.am #442911:442912
 @ -99,11 +99,9  @
 widget_utils.cpp \
 worktoolbar.cpp
 
-#umbrello_LDADD   = ./refactoring/librefactoring.la ./classparser/libclassparser.la ./clipboard/libclipboard.la ./dialogs/libdialogs.la ./codegenerators/libcodegenerator.la ./autolayout/libautolayout.la  $(LIB_KDEPRINT) $(LIB_KIO) 
-umbrello_LDADD   = ./refactoring/librefactoring.la ./classparser/libclassparser.la ./clipboard/libclipboard.la ./dialogs/libdialogs.la ./codegenerators/libcodegenerator.la $(LIB_KDEPRINT) $(LIB_KIO) 
+umbrello_LDADD   = ./refactoring/librefactoring.la ./classparser/libclassparser.la ./clipboard/libclipboard.la ./dialogs/libdialogs.la ./codegenerators/libcodegenerator.la $(AUTOLAYOUT_LIBS) $(LIB_KDEPRINT) $(LIB_KIO)
 
-#SUBDIRS = classparser dialogs clipboard pics codegenerators headings refactoring autolayout
-SUBDIRS = classparser dialogs clipboard pics codegenerators headings refactoring
+SUBDIRS = $(AUTOLAYOUT_DIR) classparser dialogs clipboard pics codegenerators headings refactoring
 
 KDE_ICON=AUTO
 
 @ -116,7 +114,7  @
 mime_DATA = x-umbrello.desktop
 
 #INCLUDES= -Idialogs -Irefactoring $(all_includes) -I/usr/include/graphviz/
-INCLUDES= -Idialogs -Irefactoring $(all_includes) -I/usr/include/graphviz/
+INCLUDES= -Idialogs -Irefactoring $(all_includes)
 
 METASOURCES = AUTO
 
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/autolayout/Makefile.am #442911:442912
 @ -1,8 +1,8  @
 noinst_LTLIBRARIES = libautolayout.la
 
-INCLUDES = -I/usr/include/graphviz/ -Idialogs -Irefactoring \
+INCLUDES = -Idialogs -Irefactoring \
 	$(all_includes)
-AM_CXXFLAGS = -I/usr/include/graphviz/
+#AM_CXXFLAGS = -I/usr/include/graphviz/
 
 libautolayout_la_METASOURCES = AUTO
 #noinst_HEADERS = node.h autolayout.h autolayoutdlg.h autolayouter.h canvas.h \
 @ -14,6 +14,6  @
 	graphvizgraph.cpp graphviznode.cpp dotautolayouter.cpp
 
 #libautolayout_la_LIBADD = /usr/lib/graphviz/libdotneato.la
-libautolayout_la_LDFLAGS = -ldotneato -L/usr/lib/graphviz
+#libautolayout_la_LDFLAGS = -ldotneato -L/usr/lib/graphviz
 
 
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/uml.cpp #442911:442912
 @ -59,7 +59,9  @
 #include "umllistview.h"
 #include "umlviewlist.h"
 #include "worktoolbar.h"
-// #include "autolayout/autolayoutdlg.h"//dimitri
+#ifdef HAVE_DOT
+# include "autolayout/autolayoutdlg.h" //dimitri
+#endif
 
 #include "clipboard/umlclipboard.h"
 #include "dialogs/classwizard.h"
 @ -216,8 +218,10  @
     classDiagram = new KAction( i18n( "&Class Diagram..." ), SmallIconSet("umbrello_diagram_class"), 0,
                                 this, SLOT( slotClassDiagram() ), actionCollection(), "new_class_diagram" );
 
-    //    autolayout = new KAction(i18n("&Autolayout..."),0,0,this,SLOT(slotAutolayout()),
-    //                                              actionCollection(),"autolayout");
+#if defined (HAVE_DOT)
+    autolayout = new KAction(i18n("&Autolayout..."),0,0,this,SLOT(slotAutolayout()),
+                             actionCollection(),"autolayout");
+#endif
     sequenceDiagram= new KAction( i18n( "&Sequence Diagram..." ), SmallIconSet("umbrello_diagram_sequence"), 0,
                                   this, SLOT( slotSequenceDiagram() ), actionCollection(), "new_sequence_diagram" );
 
 @ -1685,12 +1689,12  @
     //m_tabWidget->moveTab( m_tabWidget->currentPageIndex(), m_tabWidget->currentPageIndex() + 1 );
 }
 
-/*
 void UMLApp::slotAutolayout(){
- QDialog* d = new AutolayoutDlg(getCurrentView());
- d->show();
+#ifdef HAVE_DOT
+    QDialog* d = new AutolayoutDlg(getCurrentView());
+    d->show();
+#endif
 }
-*/
 
 KTabWidget* UMLApp::tabWidget() {
     return m_tabWidget;
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/uml.h #442911:442912
 @ -501,7 +501,7  @
     /**
      * Autolayouts the current class diagram
      */
-    //void slotAutolayout();
+    void slotAutolayout();
 
     /**
      * Changes the statusbar contents for the standard label
 @ -887,7 +887,9  @
     KAction* classWizard;
     KAction* deleteSelectedWidget;
     KAction* deleteDiagram;
-    //KAction* autolayout;
+#ifdef HAVE_DOT
+    KAction* autolayout;
+#endif
 
     KAction* changeTabLeft;
     KAction* changeTabRight;




More information about the umbrello-devel mailing list