2 Qanava - Graph drawing library for QT
3 Copyright (C) 2006 Benoit AUTHEMAN
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 //-----------------------------------------------------------------------------
21 // This file is a part of the Qanava software.
23 // \file qanSimpleLayout.h
24 // \author Benoit Autheman (benoit@libqanava.org)
25 // \date 2007 January 06
26 //-----------------------------------------------------------------------------
29 #ifndef qanSimpleLayout_h
30 #define qanSimpleLayout_h
34 #include "./qanLayout.h"
37 //-----------------------------------------------------------------------------
38 namespace qan
{ // ::qan
40 //! Layout a graph as concentric circles of nodes.
44 class Concentric
: public Layout
46 /*! \name Concentric Constructor/Destructor *///-----------------------
50 //! Concentric constructor.
51 Concentric( double azimutDelta
= 45., double circleInterval
= 50. ) :
52 Layout( ), _azimutDelta( azimutDelta
), _circleInterval( circleInterval
) { }
58 double _circleInterval
;
60 //---------------------------------------------------------------------
64 /*! \name Concentric Layout Management *///----------------------------
69 virtual void layout( Graph
& graph
, QGraphicsScene
* scene
,
70 QRectF r
, QProgressDialog
* progress
= 0, int step
= -1 );
72 //---------------------------------------------------------------------
76 //! Layout nodes in a (logarithm) colimacon.
80 class Colimacon
: public Layout
82 /*! \name Colimacon Constructor/Destructor *///------------------------
86 //! Colimacon constructor.
87 Colimacon( double azimutDelta
= 15., double circleInterval
= 10. ) :
88 Layout( ), _azimutDelta( azimutDelta
), _circleInterval( circleInterval
) { }
94 double _circleInterval
;
96 //---------------------------------------------------------------------
100 /*! \name Colimacon Layout Management *///-----------------------------
105 virtual void layout( Graph
& graph
, QGraphicsScene
* scene
,
106 QRectF r
, QProgressDialog
* progress
= 0, int step
= -1 );
108 //---------------------------------------------------------------------
111 //-----------------------------------------------------------------------------
114 #endif // qanSimpleLayout_h