0.3.1
[qanava.git] / src / qanSimpleLayout.h
blob74893797214d6c8eab2f8b16eb4943180a3eee89
1 /*
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
33 // Qanava headers
34 #include "./qanLayout.h"
37 //-----------------------------------------------------------------------------
38 namespace qan { // ::qan
40 //! Layout a graph as concentric circles of nodes.
41 /*!
42 \nosubgrouping
44 class Concentric : public Layout
46 /*! \name Concentric Constructor/Destructor *///-----------------------
47 //@{
48 public:
50 //! Concentric constructor.
51 Concentric( double azimutDelta = 45., double circleInterval = 50. ) :
52 Layout( ), _azimutDelta( azimutDelta ), _circleInterval( circleInterval ) { }
54 private:
56 double _azimutDelta;
58 double _circleInterval;
59 //@}
60 //---------------------------------------------------------------------
64 /*! \name Concentric Layout Management *///----------------------------
65 //@{
66 public:
68 //! .
69 virtual void layout( Graph& graph, QGraphicsScene* scene,
70 QRectF r, QProgressDialog* progress = 0, int step = -1 );
71 //@}
72 //---------------------------------------------------------------------
76 //! Layout nodes in a (logarithm) colimacon.
77 /*!
78 \nosubgrouping
80 class Colimacon : public Layout
82 /*! \name Colimacon Constructor/Destructor *///------------------------
83 //@{
84 public:
86 //! Colimacon constructor.
87 Colimacon( double azimutDelta = 15., double circleInterval = 10. ) :
88 Layout( ), _azimutDelta( azimutDelta ), _circleInterval( circleInterval ) { }
90 private:
92 double _azimutDelta;
94 double _circleInterval;
95 //@}
96 //---------------------------------------------------------------------
100 /*! \name Colimacon Layout Management *///-----------------------------
101 //@{
102 public:
104 //! .
105 virtual void layout( Graph& graph, QGraphicsScene* scene,
106 QRectF r, QProgressDialog* progress = 0, int step = -1 );
107 //@}
108 //---------------------------------------------------------------------
110 } // ::qan
111 //-----------------------------------------------------------------------------
114 #endif // qanSimpleLayout_h