kivio

kivio_line_style.h
1/*
2 * Kivio - Visual Modelling and Flowcharting
3 * Copyright (C) 2000-2001 theKompany.com & Dave Marotti
4 *
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.
9 *
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.
14 *
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.
18 */
19#ifndef KIVIO_LINE_STYLE_H
20#define KIVIO_LINE_STYLE_H
21
22#ifdef HAVE_CONFIG_H
23#include <config.h>
24#endif
25
26#include <tqcolor.h>
27#include <tqdom.h>
28#include <tqpen.h>
29
30
31class KivioLineStyle
32{
33protected:
34 TQColor m_color;
35 float m_width;
36 int m_capStyle;
37 int m_joinStyle;
38 int m_style;
39
40public:
41 KivioLineStyle();
42 KivioLineStyle( const KivioLineStyle & );
43
44 virtual ~KivioLineStyle();
45
46 void copyInto( KivioLineStyle * );
47
48 TQDomElement saveXML( TQDomDocument & );
49 bool loadXML( const TQDomElement & );
50
51 TQPen pen( float ) const;
52
53 TQColor color() const { return m_color; }
54 void setColor( TQColor c ){ m_color=c; }
55
56 float width() const { return m_width; }
57 void setWidth( float f ){ m_width=f; }
58
59 int capStyle() const { return m_capStyle; }
60 void setCapStyle( int p ){ m_capStyle=p; }
61
62 int joinStyle() const { return m_joinStyle; }
63 void setJoinStyle( int j ){ m_joinStyle=j; }
64
65 int style() const { return m_style; }
66 void setStyle( int p ) { m_style=p; }
67};
68
69#endif
70