kivio

kivio_line_style.h

00001 /*
00002  * Kivio - Visual Modelling and Flowcharting
00003  * Copyright (C) 2000-2001 theKompany.com & Dave Marotti
00004  *
00005  * This program is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License
00007  * as published by the Free Software Foundation; either version 2
00008  * of the License, or (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00018  */
00019 #ifndef KIVIO_LINE_STYLE_H
00020 #define KIVIO_LINE_STYLE_H
00021 
00022 #ifdef HAVE_CONFIG_H
00023 #include <config.h>
00024 #endif
00025 
00026 #include <qcolor.h>
00027 #include <qdom.h>
00028 #include <qpen.h>
00029 
00030 
00031 class KivioLineStyle
00032 {
00033 protected:
00034     QColor m_color;
00035     float  m_width;
00036     int    m_capStyle;
00037     int    m_joinStyle;
00038     int    m_style;
00039 
00040 public:
00041     KivioLineStyle();
00042     KivioLineStyle( const KivioLineStyle & );
00043 
00044     virtual ~KivioLineStyle();
00045 
00046     void copyInto( KivioLineStyle * );
00047 
00048     QDomElement saveXML( QDomDocument & );
00049     bool loadXML( const QDomElement & );
00050 
00051     QPen pen( float ) const;
00052 
00053     QColor color() const { return m_color; }
00054     void setColor( QColor c ){ m_color=c; }
00055 
00056     float width() const { return m_width; }
00057     void setWidth( float f ){ m_width=f; }
00058 
00059     int capStyle() const { return m_capStyle; }
00060     void setCapStyle( int p ){ m_capStyle=p; }
00061 
00062     int joinStyle() const { return m_joinStyle; }
00063     void setJoinStyle( int j ){ m_joinStyle=j; }
00064 
00065     int style() const { return m_style; }
00066     void setStyle( int p ) { m_style=p; }
00067 };
00068 
00069 #endif
00070 
KDE Home | KDE Accessibility Home | Description of Access Keys