#
#
# patch "libs/qanava/build/pro/can/can.vcproj"
# from [9e4654b0a6b68238249dff41e03b3978659fc180]
# to [a76ec241aa2d3d966ee5476fd701b418f3bc9377]
#
# patch "libs/qanava/build/pro/ui/ui.vcproj"
# from [27556f6c5e8220426de2981781da91d437c0d70a]
# to [021cc16d73b56f0fa1a44b69b60949be94d90bce]
#
# patch "libs/qanava/build/vc71/qanava.sln"
# from [f0baa870483482865bc22f324064e1213adcedee]
# to [616bfc4b7d775f850eb564a05d2dde90ecbacbac]
#
# patch "libs/qanava/src/can/canGraphItemView.cpp"
# from [9f7d36b2ea896d61870bb1564cf3b3a52debb32f]
# to [194b8fb3e2907ed2c8916f3e7896b3e6140d3ee6]
#
# patch "libs/qanava/src/can/canGraphicsView.cpp"
# from [7939221fdb922f5b8cd345081892f970cce3a331]
# to [c66625a1ce81b1e6ce899d5d85c4e7b4ec54f785]
#
# patch "libs/qanava/src/can/canItemGeom.cpp"
# from [a7fd96e347cf762c95252ab333a1fad3947f5599]
# to [440c20898da096a0f4847f94709825891d245362]
#
# patch "libs/qanava/src/la/laGraph.cpp"
# from [be2e22c1a71c3c0b8716b2da649942e78e56f48b]
# to [0af06f9e082ae93bc6d4f5735e1173a5a1c386b2]
#
# patch "libs/qanava/src/la/laLayout.cpp"
# from [952b2d3a34c69bee229fb8ea0ab77ecab1154eac]
# to [63563d82ead07609d0eef0caad47fbf760a3986d]
#
# patch "libs/qanava/src/la/laLayout.h"
# from [28ef82ee266b4918b0a5cc146c6f8528dc8ee26f]
# to [6b645c84ebe816790d35f21966d10bfefaf3839c]
#
# patch "libs/qanava/src/la/laNode.h"
# from [39795c963f6c9fa5a1bd71fa80818d1eaed2ec23]
# to [dd4e21401a2bf0d478e6e26fafc5a279e98c5a6f]
#
============================================================
--- libs/qanava/build/pro/can/can.vcproj 9e4654b0a6b68238249dff41e03b3978659fc180
+++ libs/qanava/build/pro/can/can.vcproj a76ec241aa2d3d966ee5476fd701b418f3bc9377
@@ -148,18 +148,18 @@
RelativePath="..\..\..\src\can\canStyle.cpp">
+ RelativePath="release\moc_canController.cpp">
+ RelativePath="debug\moc_canController.cpp">
@@ -184,36 +184,36 @@
+ RelativePath="release\moc_canGraphItemModel.cpp">
+ RelativePath="debug\moc_canGraphItemModel.cpp">
+ RelativePath="debug\moc_canGraphItemView.cpp">
+ RelativePath="release\moc_canGraphItemView.cpp">
@@ -238,36 +238,36 @@
+ RelativePath="release\moc_canItemGeom.cpp">
+ RelativePath="debug\moc_canItemGeom.cpp">
+ RelativePath="release\moc_canStyle.cpp">
+ RelativePath="debug\moc_canStyle.cpp">
============================================================
--- libs/qanava/build/pro/ui/ui.vcproj 27556f6c5e8220426de2981781da91d437c0d70a
+++ libs/qanava/build/pro/ui/ui.vcproj 021cc16d73b56f0fa1a44b69b60949be94d90bce
@@ -124,36 +124,36 @@
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx">
+ RelativePath="debug\moc_uiNodesItemModel.cpp">
+ RelativePath="release\moc_uiNodesItemModel.cpp">
+ RelativePath="debug\moc_uiStyleModel.cpp">
+ RelativePath="release\moc_uiStyleModel.cpp">
============================================================
--- libs/qanava/build/vc71/qanava.sln f0baa870483482865bc22f324064e1213adcedee
+++ libs/qanava/build/vc71/qanava.sln 616bfc4b7d775f850eb564a05d2dde90ecbacbac
@@ -65,6 +65,10 @@ EndProject
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_large", "..\..\tests\large\test_large.vcproj", "{061024EB-0D88-339D-BCF9-93A7C6DD4CD7}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
@@ -116,6 +120,10 @@ Global
{A53A62E0-F302-3AC8-95D7-EB695FF71D49}.Debug.Build.0 = Debug|Win32
{A53A62E0-F302-3AC8-95D7-EB695FF71D49}.Release.ActiveCfg = Release|Win32
{A53A62E0-F302-3AC8-95D7-EB695FF71D49}.Release.Build.0 = Release|Win32
+ {061024EB-0D88-339D-BCF9-93A7C6DD4CD7}.Debug.ActiveCfg = Debug|Win32
+ {061024EB-0D88-339D-BCF9-93A7C6DD4CD7}.Debug.Build.0 = Debug|Win32
+ {061024EB-0D88-339D-BCF9-93A7C6DD4CD7}.Release.ActiveCfg = Release|Win32
+ {061024EB-0D88-339D-BCF9-93A7C6DD4CD7}.Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
============================================================
--- libs/qanava/src/can/canGraphItemView.cpp 9f7d36b2ea896d61870bb1564cf3b3a52debb32f
+++ libs/qanava/src/can/canGraphItemView.cpp 194b8fb3e2907ed2c8916f3e7896b3e6140d3ee6
@@ -93,11 +93,16 @@ void GraphItemView::clear( )
_graphicItemModelIndexMap.clear( );
_nodeGraphicItemMap.clear( );
- // Clear al items in the graphic view
- //_canvas->clear( ); // FIXME
-
+ // Clear all items in the graphic view
+ // FIXME: all items are removed, not just the one modelling the actual graph
+ QList< QGraphicsItem* > items = _graphicsView->scene( )->items( );
+ QList< QGraphicsItem* >::iterator itemIterator;
+ for( itemIterator = items.begin( ); itemIterator != items.end( ); ++itemIterator )
+ _graphicsView->scene( )->removeItem( *itemIterator );
+
_styleManager.clear( );
- delete _layout;
+ if ( _layout != 0 )
+ delete _layout;
_layout = new la::Random( );
}
//-----------------------------------------------------------------------------
============================================================
--- libs/qanava/src/can/canGraphicsView.cpp 7939221fdb922f5b8cd345081892f970cce3a331
+++ libs/qanava/src/can/canGraphicsView.cpp c66625a1ce81b1e6ce899d5d85c4e7b4ec54f785
@@ -59,7 +59,7 @@ GraphicsView::GraphicsView( QWidget* par
setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
- setCacheMode( QGraphicsView::CacheBackground );
+// setCacheMode( QGraphicsView::CacheBackground );
}
GraphicsView::GraphicsView( QGraphicsScene* scene, QWidget* parent ) :
@@ -79,7 +79,7 @@ GraphicsView::GraphicsView( QGraphicsSce
setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
- setCacheMode( QGraphicsView::CacheBackground );
+// setCacheMode( QGraphicsView::CacheBackground );
if ( scene != 0 )
scene->setItemIndexMethod( QGraphicsScene::NoIndex );
}
@@ -172,7 +172,7 @@ void GraphicsView::setZoom( double zoom
if ( factor < 0.07 || factor > 100 )
return;
- if ( zoom > 0.7 )
+ if ( zoom > 0.1 )
{
_zoom = zoom;
QMatrix m;
============================================================
--- libs/qanava/src/can/canItemGeom.cpp a7fd96e347cf762c95252ab333a1fad3947f5599
+++ libs/qanava/src/can/canItemGeom.cpp 440c20898da096a0f4847f94709825891d245362
@@ -45,6 +45,7 @@ Foundation, Inc., 51 Franklin Street, Fi
#include
#include
#include
+#include
// STD headers
@@ -124,7 +125,8 @@ void Edge::paint( QPainter* painter, con
painter->drawLine( line );
// Draw the arrows if there's enough room
- if ( _hasArrow )
+ if ( option->levelOfDetail > 0.25 &&
+ _hasArrow )
{
const double Pi = 3.141592653;
double TwoPi = 2.0 * Pi;
@@ -230,7 +232,8 @@ void Node::paint( QPainter* painter, con
void Node::paint( QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget )
{
- if ( hasShadow( ) ) // Draw shadow
+ if ( option->levelOfDetail > 0.4 &&
+ hasShadow( ) ) // Draw shadow
{
QBrush b;
b.setStyle( Qt::SolidPattern );
@@ -262,7 +265,8 @@ void Node::paint( QPainter* painter, con
QGraphicsRectItem::paint( painter, option, widget );
- if ( _labelDocument != 0 && _labelLayout != 0 )
+ if ( option->levelOfDetail > 0.25 &&
+ _labelDocument != 0 && _labelLayout != 0 )
{
painter->setPen( QColor( 0, 0, 0 ) );
double textMarginX = 2;
============================================================
--- libs/qanava/src/la/laGraph.cpp be2e22c1a71c3c0b8716b2da649942e78e56f48b
+++ libs/qanava/src/la/laGraph.cpp 0af06f9e082ae93bc6d4f5735e1173a5a1c386b2
@@ -369,6 +369,10 @@ void Graph::clear( )
for ( Node::List::iterator nodeIter = _nodes.begin( ); nodeIter != _nodes.end( ); nodeIter++ )
delete *nodeIter;
_nodes.clear( );
+
+
+ _rootNodes.clear( );
+ _rootNodesSet.clear( );
}
//-----------------------------------------------------------------------------
============================================================
--- libs/qanava/src/la/laLayout.cpp 952b2d3a34c69bee229fb8ea0ab77ecab1154eac
+++ libs/qanava/src/la/laLayout.cpp 63563d82ead07609d0eef0caad47fbf760a3986d
@@ -34,6 +34,7 @@ Foundation, Inc., 51 Franklin Street, Fi
#include
#include
#include
+#include
namespace qan { // ::qan
@@ -49,8 +50,6 @@ void Layout::resetNodesPositions( la::Gr
}
//-----------------------------------------------------------------------------
-
-
/* Random Layout Generation Management *///------------------------------------
void Random::layout( la::Graph& graph, la::Grid& grid, QRectF r, utl::Progress&, int step )
{
============================================================
--- libs/qanava/src/la/laLayout.h 28ef82ee266b4918b0a5cc146c6f8528dc8ee26f
+++ libs/qanava/src/la/laLayout.h 6b645c84ebe816790d35f21966d10bfefaf3839c
@@ -62,7 +62,7 @@ namespace qan { // ::qan
Layout( ) { }
//! Layout virtual destructor.
- virtual ~Layout( ) { }
+ ~Layout( ) { }
private:
@@ -77,8 +77,8 @@ namespace qan { // ::qan
public:
//! Layout nodes from a given graph using r as a clipping rect, and update grid.
- virtual void layout( la::Graph& graph, la::Grid& grid,
- QRectF r, utl::Progress& progress, int step = -1 ) = 0;
+ void layout( la::Graph& graph, la::Grid& grid,
+ QRectF r, utl::Progress& progress, int step = -1 ) {}
protected:
@@ -112,7 +112,7 @@ namespace qan { // ::qan
public:
//! .
- virtual void layout( la::Graph& graph, la::Grid& grid,
+ void layout( la::Graph& graph, la::Grid& grid,
QRectF r, utl::Progress& progress, int step = -1 );
//@}
//---------------------------------------------------------------------
@@ -148,7 +148,7 @@ namespace qan { // ::qan
public:
//! .
- virtual void layout( la::Graph& graph, la::Grid& grid,
+ void layout( la::Graph& graph, la::Grid& grid,
QRectF r, utl::Progress& progress, int step = -1 );
//@}
//---------------------------------------------------------------------
@@ -184,7 +184,7 @@ namespace qan { // ::qan
public:
//! .
- virtual void layout( la::Graph& graph, la::Grid& grid,
+ void layout( la::Graph& graph, la::Grid& grid,
QRectF r, utl::Progress& progress, int step = -1 );
//@}
//---------------------------------------------------------------------
@@ -237,7 +237,7 @@ namespace qan { // ::qan
public:
//! Layout a graph as a hierarchy tree.
- virtual void layout( la::Graph& graph, la::Grid& grid,
+ void layout( la::Graph& graph, la::Grid& grid,
QRectF r, utl::Progress& progress, int step = -1 );
protected:
@@ -307,7 +307,7 @@ namespace qan { // ::qan
public:
//! Layout 'graph' using a spring force algorithm.
- virtual void layout( la::Graph& graph, la::Grid& grid,
+ void layout( la::Graph& graph, la::Grid& grid,
QRectF r, utl::Progress& progress, int step = -1 );
static void add( VectorF& a, const VectorF& b );
============================================================
--- libs/qanava/src/la/laNode.h 39795c963f6c9fa5a1bd71fa80818d1eaed2ec23
+++ libs/qanava/src/la/laNode.h dd4e21401a2bf0d478e6e26fafc5a279e98c5a6f
@@ -32,7 +32,7 @@ Foundation, Inc., 51 Franklin Street, Fi
// Qanava headers
#include "./laEdge.h"
-#include "./laVectorF.h"
+#include "./laVectorf.h"
// Standard headers