2 Qanava - Graph drawing library for QT
3 Copyright (C) 2005 Benoit AUTHEMAN
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
10 This program 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
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; 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.
24 // \author Benoit Autheman (benoit@faktiss.net)
25 // \date 2004 December 05
26 //-----------------------------------------------------------------------------
34 #include "../la/laTimeTree.h"
35 //#include "canCanvas.h"
47 //-----------------------------------------------------------------------------
48 namespace qan
{ // ::qan
49 namespace can
{ // ::qan::can
53 //! Implements the abstract methods defined in class la::Grid.
57 class Grid
: public la::Grid
59 /*! \name Grid Constructor/Destructor *///----------------------------
63 Grid( can::Canvas
& canvas
);
69 //---------------------------------------------------------------------
73 /*! \name Grid Lines Management *///----------------------------------
77 virtual void addLine( int ax
, int ay
, int bx
, int by
, int w
= 1, bool dash
= false, bool dot
= false );
79 virtual void addRectangle( int x
, int y
, int w
, int h
, int r
, int g
, int b
);
81 virtual void addText( const std::string
& text
, int x
, int y
, bool bold
= false );
83 virtual void resize( int w
, int h
);
85 virtual void addHorizontalLine( int ax
, int ay
, int bx
, int by
, int w
= 1, bool dash
= false, bool dot
= false );
87 virtual void addVerticalLine( int ax
, int ay
, int bx
, int by
, int w
= 1, bool dash
= false, bool dot
= false );
91 QCanvasLine
* createLine( int ax
, int ay
, int bx
, int by
, int w
= 1, bool dash
= false, bool dot
= false );
93 typedef std::list
< QCanvasLine
* > Lines
;
99 //---------------------------------------------------------------------
104 //-----------------------------------------------------------------------------