osc copypac from project:KDE:Unstable:Extra package:kgraphviewer revision:16
OBS-URL: https://build.opensuse.org/package/show/KDE:Extra/kgraphviewer?expand=0&rev=1
This commit is contained in:
commit
3304840832
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
12
_service
Normal file
12
_service
Normal file
@ -0,0 +1,12 @@
|
||||
<services>
|
||||
<service name="tar_scm">
|
||||
<param name="versionprefix">2.1.40git</param>
|
||||
<param name="url">git://anongit.kde.org/kgraphviewer</param>
|
||||
<param name="scm">git</param>
|
||||
</service>
|
||||
<service name="recompress">
|
||||
<param name="file">*.tar</param>
|
||||
<param name="compression">xz</param>
|
||||
</service>
|
||||
<service name="set_version"/>
|
||||
</services>
|
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:06e370933e36991c5f980cd77c7b5d80dc58c858d6bba9c36cf9ce72d7938d1c
|
||||
size 676332
|
121
_service:set_version:kgraphviewer.spec
Normal file
121
_service:set_version:kgraphviewer.spec
Normal file
@ -0,0 +1,121 @@
|
||||
#
|
||||
# spec file for package kgraphviewer
|
||||
#
|
||||
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
# Spec file for kgraphviewer
|
||||
%define soname 2
|
||||
Name: kgraphviewer
|
||||
Version: 2.1.40git.1413250754.d5210f4
|
||||
Release: 0
|
||||
Summary: Graphviz dot graph file viewer for KDE
|
||||
License: GPL-2.0 and GPL-2.0+ and LGPL-2.1+ and GPL-3.0
|
||||
Group: Development/Tools/Other
|
||||
Url: https://projects.kde.org/projects/extragear/graphics/kgraphviewer
|
||||
Source0: %{name}-%{version}.tar.xz
|
||||
Source1: %{name}-lang.tar.bz2
|
||||
Patch0: test_old_graphviz.diff
|
||||
BuildRequires: boost-devel
|
||||
BuildRequires: graphviz-devel
|
||||
BuildRequires: libkde4-devel
|
||||
BuildRequires: zlib-devel
|
||||
Requires: graphviz
|
||||
Requires: libkgraphviewer%{soname} = %{version}
|
||||
Recommends: %{name}-lang
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%{kde4_runtime_requires}
|
||||
|
||||
%description
|
||||
KGraphViewer is a Graphviz dot graph file viewer for KDE
|
||||
|
||||
%package -n libkgraphviewer%{soname}
|
||||
Summary: Graphviz dot graph file viewer for KDE
|
||||
Group: Development/Tools/Other
|
||||
Suggests: kgraphviewer = %{version}
|
||||
|
||||
%description -n libkgraphviewer%{soname}
|
||||
KGraphViewer is a Graphviz dot graph file viewer for KDE
|
||||
|
||||
%package -n kgraphviewer-devel
|
||||
Summary: Graphviz dot graph file viewer for KDE
|
||||
Group: Development/Tools/Other
|
||||
Requires: kgraphviewer = %{version}
|
||||
Requires: libkgraphviewer%{soname} = %{version}
|
||||
|
||||
%description -n kgraphviewer-devel
|
||||
KGraphViewer is a Graphviz dot graph file viewer for KDE
|
||||
|
||||
%lang_package
|
||||
|
||||
%prep
|
||||
%setup -q -a 1
|
||||
%if 0%{?suse_version} < 1320
|
||||
#patch -p1 < old_graphviz.diff
|
||||
%patch0 -p1
|
||||
%endif
|
||||
cat >> CMakeLists.txt << EOF
|
||||
add_subdirectory( po )
|
||||
EOF
|
||||
|
||||
%build
|
||||
# The patch for older graphviz version is provided in the repo
|
||||
%if 0%{?suse_version} < 1320
|
||||
#patch -p1 < old_graphviz.diff
|
||||
%endif
|
||||
%cmake_kde4 -d build
|
||||
%make_jobs
|
||||
|
||||
%install
|
||||
%kde4_makeinstall -C build
|
||||
%kde_post_install
|
||||
|
||||
%find_lang kgraphviewer %{name}.lang
|
||||
|
||||
%post -n libkgraphviewer%{soname} -p /sbin/ldconfig
|
||||
|
||||
%postun -n libkgraphviewer%{soname} -p /sbin/ldconfig
|
||||
|
||||
%files -n kgraphviewer-devel
|
||||
%defattr(-,root,root)
|
||||
%{_kde4_includedir}/*
|
||||
%{_kde4_libdir}/libkgraphviewer.so
|
||||
|
||||
%files -n libkgraphviewer%{soname}
|
||||
%defattr(-,root,root)
|
||||
%{_kde4_libdir}/libkgraphviewer.so.*
|
||||
|
||||
%files lang -f %{name}.lang
|
||||
%defattr(-,root,root)
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc AUTHORS COPYING COPYING.DOC
|
||||
%dir %{_kde4_datadir}/appdata
|
||||
%{_kde4_applicationsdir}/kgrapheditor.desktop
|
||||
%{_kde4_applicationsdir}/kgraphviewer.desktop
|
||||
%{_kde4_appsdir}/kgrapheditor
|
||||
%{_kde4_appsdir}/kgraphviewer
|
||||
%{_kde4_appsdir}/kgraphviewerpart
|
||||
%{_kde4_bindir}/*
|
||||
%{_kde4_configkcfgdir}/kgrapheditorsettings.kcfg
|
||||
%{_kde4_configkcfgdir}/kgraphviewer_partsettings.kcfg
|
||||
%{_kde4_configkcfgdir}/kgraphviewersettings.kcfg
|
||||
%{_kde4_datadir}/appdata/kgraphviewer*
|
||||
%{_kde4_iconsdir}/*
|
||||
%{_kde4_modulesdir}/kgraphviewerpart.so
|
||||
%{_kde4_servicesdir}/kgraphviewer_part.desktop
|
||||
|
||||
%changelog
|
3
kgraphviewer-2.1.40git.1403573518.tar.xz
Normal file
3
kgraphviewer-2.1.40git.1403573518.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:079928c4e0a663b45b7e588a5430bca79e3e4e996e30ed4deab4512be3e9022d
|
||||
size 674600
|
3
kgraphviewer-lang.tar.bz2
Normal file
3
kgraphviewer-lang.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e2e6500ffc2665ad63d4793fae103f75e09dbd8c93e01c43420f8ccaa847f615
|
||||
size 138257
|
48
kgraphviewer.changes
Normal file
48
kgraphviewer.changes
Normal file
@ -0,0 +1,48 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 14 13:30:33 UTC 2013 - cgiboudeaux@gmx.com
|
||||
|
||||
- Update translations
|
||||
|
||||
Sun Mar 6 23:21:56 2011 - cgiboudeaux@gmail.com
|
||||
|
||||
- Update snapshot (git-20110306)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 15 00:33:32 2010 - cgiboudeaux@gmail.com
|
||||
|
||||
- Update snapshot (git-20101215)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 14 01:15:00 2010 - cgiboudeaux@gmail.com
|
||||
|
||||
- Update snapshot (git-20101214)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Dec 11 00:29:48 2010 - cgiboudeaux@gmail.com
|
||||
|
||||
- Update snapshot (git-20101211)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 30 12:22:57 2010 - cgiboudeaux@gmail.com
|
||||
|
||||
- Update snapshot (git-20101130)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Nov 27 01:59:39 2010 - cgiboudeaux@gmail.com
|
||||
|
||||
- Update snapshot (git-20101127)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 17 13:18:01 2010 - cgiboudeaux@gmail.com
|
||||
|
||||
- Update snapshot (git-20101117)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Nov 14 01:20:25 2010 - cgiboudeaux@gmail.com
|
||||
|
||||
- Update snapshot (git-20101114)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 20 2010 - cgiboudeaux@gmail.com
|
||||
- Kgraphviewer 2.0.90 (svn)
|
||||
|
121
kgraphviewer.spec
Normal file
121
kgraphviewer.spec
Normal file
@ -0,0 +1,121 @@
|
||||
#
|
||||
# spec file for package kgraphviewer
|
||||
#
|
||||
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
# Spec file for kgraphviewer
|
||||
%define soname 2
|
||||
Name: kgraphviewer
|
||||
Version: 2.1.40git.1403573518
|
||||
Release: 0
|
||||
Summary: Graphviz dot graph file viewer for KDE
|
||||
License: GPL-2.0 and GPL-2.0+ and LGPL-2.1+ and GPL-3.0
|
||||
Group: Development/Tools/Other
|
||||
Url: https://projects.kde.org/projects/extragear/graphics/kgraphviewer
|
||||
Source0: %{name}-%{version}.tar.xz
|
||||
Source1: %{name}-lang.tar.bz2
|
||||
Patch0: test_old_graphviz.diff
|
||||
BuildRequires: boost-devel
|
||||
BuildRequires: graphviz-devel
|
||||
BuildRequires: libkde4-devel
|
||||
BuildRequires: zlib-devel
|
||||
Requires: graphviz
|
||||
Requires: libkgraphviewer%{soname} = %{version}
|
||||
Recommends: %{name}-lang
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%{kde4_runtime_requires}
|
||||
|
||||
%description
|
||||
KGraphViewer is a Graphviz dot graph file viewer for KDE
|
||||
|
||||
%package -n libkgraphviewer%{soname}
|
||||
Summary: Graphviz dot graph file viewer for KDE
|
||||
Group: Development/Tools/Other
|
||||
Suggests: kgraphviewer = %{version}
|
||||
|
||||
%description -n libkgraphviewer%{soname}
|
||||
KGraphViewer is a Graphviz dot graph file viewer for KDE
|
||||
|
||||
%package -n kgraphviewer-devel
|
||||
Summary: Graphviz dot graph file viewer for KDE
|
||||
Group: Development/Tools/Other
|
||||
Requires: kgraphviewer = %{version}
|
||||
Requires: libkgraphviewer%{soname} = %{version}
|
||||
|
||||
%description -n kgraphviewer-devel
|
||||
KGraphViewer is a Graphviz dot graph file viewer for KDE
|
||||
|
||||
%lang_package
|
||||
|
||||
%prep
|
||||
%setup -q -a 1
|
||||
%if 0%{?suse_version} < 1320
|
||||
#patch -p1 < old_graphviz.diff
|
||||
%patch0 -p1
|
||||
%endif
|
||||
cat >> CMakeLists.txt << EOF
|
||||
add_subdirectory( po )
|
||||
EOF
|
||||
|
||||
%build
|
||||
# The patch for older graphviz version is provided in the repo
|
||||
%if 0%{?suse_version} < 1320
|
||||
#patch -p1 < old_graphviz.diff
|
||||
%endif
|
||||
%cmake_kde4 -d build
|
||||
%make_jobs
|
||||
|
||||
%install
|
||||
%kde4_makeinstall -C build
|
||||
%kde_post_install
|
||||
|
||||
%find_lang kgraphviewer %{name}.lang
|
||||
|
||||
%post -n libkgraphviewer%{soname} -p /sbin/ldconfig
|
||||
|
||||
%postun -n libkgraphviewer%{soname} -p /sbin/ldconfig
|
||||
|
||||
%files -n kgraphviewer-devel
|
||||
%defattr(-,root,root)
|
||||
%{_kde4_includedir}/*
|
||||
%{_kde4_libdir}/libkgraphviewer.so
|
||||
|
||||
%files -n libkgraphviewer%{soname}
|
||||
%defattr(-,root,root)
|
||||
%{_kde4_libdir}/libkgraphviewer.so.*
|
||||
|
||||
%files lang -f %{name}.lang
|
||||
%defattr(-,root,root)
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc AUTHORS COPYING COPYING.DOC
|
||||
%dir %{_kde4_datadir}/appdata
|
||||
%{_kde4_applicationsdir}/kgrapheditor.desktop
|
||||
%{_kde4_applicationsdir}/kgraphviewer.desktop
|
||||
%{_kde4_appsdir}/kgrapheditor
|
||||
%{_kde4_appsdir}/kgraphviewer
|
||||
%{_kde4_appsdir}/kgraphviewerpart
|
||||
%{_kde4_bindir}/*
|
||||
%{_kde4_configkcfgdir}/kgrapheditorsettings.kcfg
|
||||
%{_kde4_configkcfgdir}/kgraphviewer_partsettings.kcfg
|
||||
%{_kde4_configkcfgdir}/kgraphviewersettings.kcfg
|
||||
%{_kde4_datadir}/appdata/kgraphviewer*
|
||||
%{_kde4_iconsdir}/*
|
||||
%{_kde4_modulesdir}/kgraphviewerpart.so
|
||||
%{_kde4_servicesdir}/kgraphviewer_part.desktop
|
||||
|
||||
%changelog
|
344
test_old_graphviz.diff
Normal file
344
test_old_graphviz.diff
Normal file
@ -0,0 +1,344 @@
|
||||
diff --git a/cmake/FindGraphViz.cmake b/cmake/FindGraphViz.cmake
|
||||
index 21f349c..a2852df 100644
|
||||
--- a/cmake/FindGraphViz.cmake
|
||||
+++ b/cmake/FindGraphViz.cmake
|
||||
@@ -29,7 +29,7 @@
|
||||
if ( NOT WIN32 )
|
||||
|
||||
find_package(PkgConfig)
|
||||
- pkg_check_modules( graphviz ${REQUIRED} libgvc libcdt libcgraph libpathplan )
|
||||
+ pkg_check_modules( graphviz ${REQUIRED} libgvc libcdt libgraph libpathplan )
|
||||
if ( graphviz_FOUND )
|
||||
set ( graphviz_INCLUDE_DIRECTORIES ${graphviz_INCLUDE_DIRS} )
|
||||
endif ( graphviz_FOUND )
|
||||
@@ -66,7 +66,7 @@ find_library( graphviz_CDT_LIBRARY
|
||||
)
|
||||
|
||||
find_library( graphviz_GRAPH_LIBRARY
|
||||
- NAMES cgraph
|
||||
+ NAMES graph
|
||||
PATHS
|
||||
${graphviz_LIBRARY_DIRS}
|
||||
/usr/local/lib64
|
||||
@@ -162,4 +162,4 @@ include(FindPackageHandleStandardArgs)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set GRAPHVIZ_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
-find_package_handle_standard_args(GraphViz DEFAULT_MSG graphviz_LIBRARIES graphviz_INCLUDE_DIRECTORIES)
|
||||
+find_package_handle_standard_args(GraphViz DEFAULT_MSG graphviz_LIBRARIES graphviz_INCLUDE_DIRECTORIES)
|
||||
\ No newline at end of file
|
||||
diff --git a/src/part/CMakeLists.txt b/src/part/CMakeLists.txt
|
||||
index 041536d..0e9f6d8 100644
|
||||
--- a/src/part/CMakeLists.txt
|
||||
+++ b/src/part/CMakeLists.txt
|
||||
@@ -29,7 +29,7 @@ set( kgraphviewerpart_PART_SRCS kgraphviewer_part.cpp )
|
||||
kde4_add_plugin(kgraphviewerpart ${kgraphviewerpart_PART_SRCS})
|
||||
|
||||
add_definitions(-DQT_STL)
|
||||
-target_link_libraries(kgraphviewerpart ${KDE4_KPARTS_LIBS} gvc cgraph pathplan cdt kgraphviewerlib)
|
||||
+target_link_libraries(kgraphviewerpart ${KDE4_KPARTS_LIBS} gvc graph pathplan cdt kgraphviewerlib)
|
||||
|
||||
install( TARGETS kgraphviewerpart DESTINATION ${PLUGIN_INSTALL_DIR})
|
||||
|
||||
diff --git a/src/part/dotgraph.cpp b/src/part/dotgraph.cpp
|
||||
index 57c59b5..95caf92 100644
|
||||
--- a/src/part/dotgraph.cpp
|
||||
+++ b/src/part/dotgraph.cpp
|
||||
@@ -410,25 +410,27 @@ void DotGraph::updateWithGraph(graph_t* newGraph)
|
||||
|
||||
setRenderOperations(ops);
|
||||
|
||||
- Agsym_t *attr = agnxtattr(newGraph, AGRAPH, NULL);
|
||||
+ Agsym_t *attr = agfstattr(newGraph);
|
||||
while(attr)
|
||||
{
|
||||
- kDebug() << agnameof(newGraph) << ":" << attr->name << agxget(newGraph,attr);
|
||||
- m_attributes[attr->name] = agxget(newGraph,attr);
|
||||
- attr = agnxtattr(newGraph, AGRAPH, attr);
|
||||
+ kDebug() << newGraph->name << ":" << attr->name << agxget(newGraph,attr->index);
|
||||
+ m_attributes[attr->name] = agxget(newGraph,attr->index);
|
||||
+ attr = agnxtattr(newGraph,attr);
|
||||
}
|
||||
|
||||
// copy subgraphs
|
||||
- for (graph_t* sg = agfstsubg(newGraph); sg; sg = agnxtsubg(sg))
|
||||
+ for (edge_t* e = agfstout(newGraph->meta_node->graph, newGraph->meta_node); e;
|
||||
+ e = agnxtout(newGraph->meta_node->graph, e))
|
||||
{
|
||||
- kDebug() << "subgraph:" << agnameof(sg);
|
||||
- if (subgraphs().contains(agnameof(sg)))
|
||||
+ graph_t* sg = agusergraph(e->head);
|
||||
+ kDebug() << "subgraph:" << sg->name;
|
||||
+ if (subgraphs().contains(sg->name))
|
||||
{
|
||||
kDebug() << "known";
|
||||
// ???
|
||||
// nodes()[ngn->name]->setZ(ngn->z());
|
||||
- subgraphs()[agnameof(sg)]->updateWithSubgraph(sg);
|
||||
- if (subgraphs()[agnameof(sg)]->canvasElement()!=0)
|
||||
+ subgraphs()[sg->name]->updateWithSubgraph(sg);
|
||||
+ if (subgraphs()[sg->name]->canvasElement()!=0)
|
||||
{
|
||||
// nodes()[ngn->id()]->canvasElement()->setGh(m_height);
|
||||
}
|
||||
@@ -438,7 +440,7 @@ void DotGraph::updateWithGraph(graph_t* newGraph)
|
||||
kDebug() << "new";
|
||||
GraphSubgraph* newsg = new GraphSubgraph(sg);
|
||||
// kDebug() << "new created";
|
||||
- subgraphs().insert(agnameof(sg), newsg);
|
||||
+ subgraphs().insert(sg->name, newsg);
|
||||
// kDebug() << "new inserted";
|
||||
}
|
||||
|
||||
@@ -451,14 +453,14 @@ void DotGraph::updateWithGraph(graph_t* newGraph)
|
||||
while (ngn != NULL)
|
||||
// foreach (GraphNode* ngn, newGraph.nodes())
|
||||
{
|
||||
- kDebug() << "node " << agnameof(ngn);
|
||||
- if (nodes().contains(agnameof(ngn)))
|
||||
+ kDebug() << "node " << ngn->name;
|
||||
+ if (nodes().contains(ngn->name))
|
||||
{
|
||||
kDebug() << "known";
|
||||
// ???
|
||||
// nodes()[ngn->name]->setZ(ngn->z());
|
||||
- nodes()[agnameof(ngn)]->updateWithNode(ngn);
|
||||
- if (nodes()[agnameof(ngn)]->canvasElement()!=0)
|
||||
+ nodes()[ngn->name]->updateWithNode(ngn);
|
||||
+ if (nodes()[ngn->name]->canvasElement()!=0)
|
||||
{
|
||||
// nodes()[ngn->id()]->canvasElement()->setGh(m_height);
|
||||
}
|
||||
@@ -468,7 +470,7 @@ void DotGraph::updateWithGraph(graph_t* newGraph)
|
||||
kDebug() << "new";
|
||||
GraphNode* newgn = new GraphNode(ngn);
|
||||
// kDebug() << "new created";
|
||||
- nodes().insert(agnameof(ngn), newgn);
|
||||
+ nodes().insert(ngn->name, newgn);
|
||||
// kDebug() << "new inserted";
|
||||
}
|
||||
|
||||
@@ -476,11 +478,11 @@ void DotGraph::updateWithGraph(graph_t* newGraph)
|
||||
edge_t* nge = agfstout(newGraph, ngn);
|
||||
while (nge != NULL)
|
||||
{
|
||||
-// kDebug() << "edge " << nge->id;
|
||||
- QString edgeName = QString(agnameof(aghead(nge))) + agnameof(agtail(nge));
|
||||
+ kDebug() << "edge " << nge->id;
|
||||
+ QString edgeName = QString(nge->head->name) + nge->tail->name;
|
||||
if (edges().contains(edgeName))
|
||||
{
|
||||
-// kDebug() << "edge known" << nge->id;
|
||||
+ kDebug() << "edge known" << nge->id;
|
||||
// edges()[nge->name]->setZ(nge->z());
|
||||
edges()[edgeName]->updateWithEdge(nge);
|
||||
if (edges()[edgeName]->canvasEdge()!=0)
|
||||
@@ -495,20 +497,20 @@ void DotGraph::updateWithGraph(graph_t* newGraph)
|
||||
GraphEdge* newEdge = new GraphEdge();
|
||||
newEdge->setId(edgeName);
|
||||
newEdge->updateWithEdge(nge);
|
||||
- if (elementNamed(agnameof(agtail(nge))) == 0)
|
||||
+ if (elementNamed(nge->tail->name) == 0)
|
||||
{
|
||||
GraphNode* newgn = new GraphNode();
|
||||
// kDebug() << "new created";
|
||||
- nodes().insert(agnameof(agtail(nge)), newgn);
|
||||
+ nodes().insert(nge->tail->name, newgn);
|
||||
}
|
||||
- newEdge->setFromNode(elementNamed(agnameof(agtail(nge))));
|
||||
- if (elementNamed(agnameof(aghead(nge))) == 0)
|
||||
+ newEdge->setFromNode(elementNamed(nge->tail->name));
|
||||
+ if (elementNamed(nge->head->name) == 0)
|
||||
{
|
||||
GraphNode* newgn = new GraphNode();
|
||||
// kDebug() << "new created";
|
||||
- nodes().insert(agnameof(aghead(nge)), newgn);
|
||||
+ nodes().insert(nge->head->name, newgn);
|
||||
}
|
||||
- newEdge->setToNode(elementNamed(agnameof(aghead(nge))));
|
||||
+ newEdge->setToNode(elementNamed(nge->head->name));
|
||||
edges().insert(edgeName, newEdge);
|
||||
}
|
||||
}
|
||||
diff --git a/src/part/graphedge.cpp b/src/part/graphedge.cpp
|
||||
index 58a9c12..a17a33c 100644
|
||||
--- a/src/part/graphedge.cpp
|
||||
+++ b/src/part/graphedge.cpp
|
||||
@@ -141,12 +141,12 @@ void GraphEdge::updateWithEdge(edge_t* edge)
|
||||
kDebug() << "element renderOperations size is now " << ops.size();
|
||||
}
|
||||
setRenderOperations(ops);
|
||||
- Agsym_t *attr = agnxtattr(agraphof(agtail(edge)), AGEDGE, NULL);
|
||||
+ Agsym_t *attr = agfstattr(edge);
|
||||
while(attr)
|
||||
{
|
||||
- kDebug() /*<< edge->name*/ << ":" << attr->name << agxget(edge,attr);
|
||||
- m_attributes[attr->name] = agxget(edge,attr);
|
||||
- attr = agnxtattr(agraphof(agtail(edge)), AGEDGE, attr);
|
||||
+ kDebug() /*<< edge->name*/ << ":" << attr->name << agxget(edge,attr->index);
|
||||
+ m_attributes[attr->name] = agxget(edge,attr->index);
|
||||
+ attr = agnxtattr(edge,attr);
|
||||
}
|
||||
|
||||
}
|
||||
diff --git a/src/part/graphexporter.cpp b/src/part/graphexporter.cpp
|
||||
index 042cfe0..e6b5a69 100644
|
||||
--- a/src/part/graphexporter.cpp
|
||||
+++ b/src/part/graphexporter.cpp
|
||||
@@ -118,11 +118,11 @@ QString GraphExporter::writeDot(const DotGraph* graph, const QString& fileName)
|
||||
|
||||
graph_t* GraphExporter::exportToGraphviz(const DotGraph* graph)
|
||||
{
|
||||
- Agdesc_t type = Agstrictundirected;
|
||||
- type.directed = graph->directed();
|
||||
- type.strict = graph->strict();
|
||||
+ int type = graph->directed()
|
||||
+ ?(graph->strict()?AGDIGRAPHSTRICT:AGDIGRAPH)
|
||||
+ :(graph->strict()?AGRAPHSTRICT:AGRAPH);
|
||||
|
||||
- graph_t* agraph = agopen((graph->id()!="\"\"")?graph->id().toUtf8().data():QString("unnamed").toUtf8().data(), type, NULL);
|
||||
+ graph_t* agraph = agopen((graph->id()!="\"\"")?graph->id().toUtf8().data():QString("unnamed").toUtf8().data(), type);
|
||||
|
||||
QTextStream stream;
|
||||
graph->exportToGraphviz(agraph);
|
||||
@@ -134,7 +134,7 @@ graph_t* GraphExporter::exportToGraphviz(const DotGraph* graph)
|
||||
sit != graph->subgraphs().end(); ++sit )
|
||||
{
|
||||
const GraphSubgraph& s = **sit;
|
||||
- graph_t* subgraph = agsubg(agraph, s.id().toUtf8().data(), 1);
|
||||
+ graph_t* subgraph = agsubg(agraph, s.id().toUtf8().data());
|
||||
s.exportToGraphviz(subgraph);
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ graph_t* GraphExporter::exportToGraphviz(const DotGraph* graph)
|
||||
GraphNodeMap::const_iterator nit;
|
||||
foreach (GraphNode* n, graph->nodes())
|
||||
{
|
||||
- node_t* node = agnode(agraph, n->id().toUtf8().data(), 1);
|
||||
+ node_t* node = agnode(agraph, n->id().toUtf8().data());
|
||||
n->exportToGraphviz(node);
|
||||
}
|
||||
|
||||
@@ -151,8 +151,8 @@ graph_t* GraphExporter::exportToGraphviz(const DotGraph* graph)
|
||||
foreach (GraphEdge* e, graph->edges())
|
||||
{
|
||||
kDebug() << "writing edge" << e->id();
|
||||
- edge_t* edge = agedge(agraph, agnode(agraph, e->fromNode()->id().toUtf8().data(), 0),
|
||||
- agnode(agraph, e->toNode()->id().toUtf8().data(), 0), NULL, 1);
|
||||
+ edge_t* edge = agedge(agraph, agnode(agraph, e->fromNode()->id().toUtf8().data()),
|
||||
+ agnode(agraph, e->toNode()->id().toUtf8().data()));
|
||||
e->exportToGraphviz(edge);
|
||||
}
|
||||
|
||||
diff --git a/src/part/graphnode.cpp b/src/part/graphnode.cpp
|
||||
index 250dc81..cc283aa 100644
|
||||
--- a/src/part/graphnode.cpp
|
||||
+++ b/src/part/graphnode.cpp
|
||||
@@ -78,8 +78,8 @@ void GraphNode::updateWithNode(const GraphNode& node)
|
||||
|
||||
void GraphNode::updateWithNode(node_t* node)
|
||||
{
|
||||
- kDebug() << agnameof(node);
|
||||
- m_attributes["id"] = agnameof(node);
|
||||
+ kDebug() << node->name;
|
||||
+ m_attributes["id"] = node->name;
|
||||
m_attributes["label"] = ND_label(node)->text;
|
||||
|
||||
DotRenderOpVec ops;
|
||||
@@ -99,12 +99,12 @@ void GraphNode::updateWithNode(node_t* node)
|
||||
|
||||
setRenderOperations(ops);
|
||||
|
||||
- Agsym_t *attr = agnxtattr(agraphof(node), AGNODE, NULL);
|
||||
+ Agsym_t *attr = agfstattr(node);
|
||||
while(attr)
|
||||
{
|
||||
- kDebug() << agnameof(node) << ":" << attr->name << agxget(node,attr);
|
||||
- m_attributes[attr->name] = agxget(node,attr);
|
||||
- attr = agnxtattr(agraphof(node), AGNODE, attr);
|
||||
+ kDebug() << node->name << ":" << attr->name << agxget(node,attr->index);
|
||||
+ m_attributes[attr->name] = agxget(node,attr->index);
|
||||
+ attr = agnxtattr(node,attr);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/part/graphsubgraph.cpp b/src/part/graphsubgraph.cpp
|
||||
index eb11084..82e63cd 100644
|
||||
--- a/src/part/graphsubgraph.cpp
|
||||
+++ b/src/part/graphsubgraph.cpp
|
||||
@@ -102,8 +102,8 @@ void GraphSubgraph::updateWithSubgraph(const GraphSubgraph& subgraph)
|
||||
|
||||
void GraphSubgraph::updateWithSubgraph(graph_t* subgraph)
|
||||
{
|
||||
- kDebug() << agnameof(subgraph);
|
||||
- m_attributes["id"] = agnameof(subgraph);
|
||||
+ kDebug() << subgraph->name;
|
||||
+ m_attributes["id"] = subgraph->name;
|
||||
if (GD_label(subgraph))
|
||||
m_attributes["label"] = GD_label(subgraph)->text;
|
||||
|
||||
@@ -124,25 +124,27 @@ void GraphSubgraph::updateWithSubgraph(graph_t* subgraph)
|
||||
|
||||
setRenderOperations(ops);
|
||||
|
||||
- Agsym_t *attr = agnxtattr(subgraph, AGRAPH, NULL);
|
||||
+ Agsym_t *attr = agfstattr(subgraph);
|
||||
while(attr)
|
||||
{
|
||||
- kDebug() << agnameof(subgraph) << ":" << attr->name << agxget(subgraph,attr);
|
||||
- m_attributes[attr->name] = agxget(subgraph,attr);
|
||||
- attr = agnxtattr(subgraph, AGRAPH, attr);
|
||||
+ kDebug() << subgraph->name << ":" << attr->name << agxget(subgraph,attr->index);
|
||||
+ m_attributes[attr->name] = agxget(subgraph,attr->index);
|
||||
+ attr = agnxtattr(subgraph,attr);
|
||||
}
|
||||
|
||||
|
||||
- for (graph_t* sg = agfstsubg(subgraph); sg; sg = agnxtsubg(sg))
|
||||
+ for (edge_t* e = agfstout(subgraph->meta_node->graph, subgraph->meta_node); e;
|
||||
+ e = agnxtout(subgraph->meta_node->graph, e))
|
||||
{
|
||||
- kDebug() << "subsubgraph:" << agnameof(sg);
|
||||
- if ( subgraphs().contains(agnameof(sg)))
|
||||
+ graph_t* sg = agusergraph(e->head);
|
||||
+ kDebug() << "subsubgraph:" << sg->name;
|
||||
+ if ( subgraphs().contains(sg->name))
|
||||
{
|
||||
kDebug() << "known subsubgraph";
|
||||
// ???
|
||||
// nodes()[ngn->name]->setZ(ngn->z());
|
||||
- subgraphs()[agnameof(sg)]->updateWithSubgraph(sg);
|
||||
- if (subgraphs()[agnameof(sg)]->canvasElement()!=0)
|
||||
+ subgraphs()[sg->name]->updateWithSubgraph(sg);
|
||||
+ if (subgraphs()[sg->name]->canvasElement()!=0)
|
||||
{
|
||||
// nodes()[ngn->id()]->canvasElement()->setGh(m_height);
|
||||
}
|
||||
@@ -152,7 +154,7 @@ void GraphSubgraph::updateWithSubgraph(graph_t* subgraph)
|
||||
kDebug() << "new subsubgraph";
|
||||
GraphSubgraph* newsg = new GraphSubgraph(sg);
|
||||
// kDebug() << "new created";
|
||||
- subgraphs().insert(agnameof(sg), newsg);
|
||||
+ subgraphs().insert(sg->name, newsg);
|
||||
// kDebug() << "new inserted";
|
||||
}
|
||||
|
||||
diff --git a/src/part/loadagraphthread.cpp b/src/part/loadagraphthread.cpp
|
||||
index 27a10ee..6475aa8 100644
|
||||
--- a/src/part/loadagraphthread.cpp
|
||||
+++ b/src/part/loadagraphthread.cpp
|
||||
@@ -30,12 +30,12 @@ void LoadAGraphThread::run()
|
||||
kError() << "Failed to open file " << m_dotFileName;
|
||||
return;
|
||||
}
|
||||
- m_g = agread(fp, NULL);
|
||||
+ m_g = agread(fp);
|
||||
if (!m_g)
|
||||
{
|
||||
kError() << "Failed to read file, retrying to work around graphviz bug(?)";
|
||||
rewind(fp);
|
||||
- m_g = agread(fp, NULL);
|
||||
+ m_g = agread(fp);
|
||||
}
|
||||
if (m_g==0)
|
||||
{
|
Loading…
Reference in New Issue
Block a user