File indexing completed on 2025-02-16 13:49:57
0001 0002 /* 0003 ** Header file for inclusion with kspread_xml2latex.c 0004 ** 0005 ** Copyright (C) 2003 Robert JACOLIN 0006 ** 0007 ** This library is free software; you can redistribute it and/or 0008 ** modify it under the terms of the GNU Library General Public 0009 ** License as published by the Free Software Foundation; either 0010 ** version 2 of the License, or (at your option) any later version. 0011 ** 0012 ** This library is distributed in the hope that it will be useful, 0013 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 0014 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0015 ** Library General Public License for more details. 0016 ** 0017 ** To receive a copy of the GNU Library General Public License, write to the 0018 ** Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0019 * Boston, MA 02110-1301, USA. 0020 ** 0021 */ 0022 0023 #ifndef __CALLIGRA_SHEETS_LATEX_PEN_H__ 0024 #define __CALLIGRA_SHEETS_LATEX_PEN_H__ 0025 0026 #include <QTextStream> 0027 #include <QString> 0028 #include <QColor> 0029 #include "xmlparser.h" 0030 0031 /***********************************************************************/ 0032 /* Class: Pen */ 0033 /***********************************************************************/ 0034 0035 /** 0036 * This class describe a pen which is used to draw borders. 0037 */ 0038 class Pen: public XmlParser 0039 { 0040 double _width; 0041 int _style; 0042 QColor _color; 0043 0044 public: 0045 /** 0046 * Constructors 0047 * 0048 * Creates a new instance of Format. 0049 */ 0050 Pen(); 0051 0052 /* 0053 * Destructor 0054 * 0055 * Nothing to do 0056 */ 0057 ~Pen() override {} 0058 0059 /** 0060 * getters 0061 */ 0062 double getWidth() const { 0063 return _width; 0064 } 0065 int getStyle() const { 0066 return _style; 0067 } 0068 QColor getColor() const { 0069 return _color; 0070 } 0071 0072 /** 0073 * setters 0074 */ 0075 void setWidth(double w) { 0076 _width = w; 0077 } 0078 void setStyle(int s) { 0079 _style = s; 0080 } 0081 void setColor(QString color) { 0082 _color.setNamedColor(color); 0083 } 0084 0085 /** 0086 * Helpful functions 0087 */ 0088 0089 /** 0090 * Get information from a markup tree (only param of a format). 0091 */ 0092 virtual void analyze(const QDomNode); 0093 0094 virtual void generate(QTextStream&); 0095 0096 }; 0097 0098 #endif /* __CALLIGRA_SHEETS_LATEX_PEN_H__ */