Warning, file /office/calligra/libs/odf/KoOdfGraphicStyles.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /* This file is part of the KDE project
0002    Copyright (C) 2004-2006 David Faure <faure@kde.org>
0003    Copyright (C) 2007 Jan Hambrecht <jaham@gmx.net>
0004    Copyright (C) 2007 Thorsten Zachmann <zachmann@kde.org>
0005 
0006    This library is free software; you can redistribute it and/or
0007    modify it under the terms of the GNU Library General Public
0008    License as published by the Free Software Foundation; either
0009    version 2 of the License, or (at your option) any later version.
0010 
0011    This library is distributed in the hope that it will be useful,
0012    but WITHOUT ANY WARRANTY; without even the implied warranty of
0013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0014    Library General Public License for more details.
0015 
0016    You should have received a copy of the GNU Library General Public License
0017    along with this library; see the file COPYING.LIB.  If not, write to
0018    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0019  * Boston, MA 02110-1301, USA.
0020 */
0021 
0022 #ifndef KOODFGRAPHICSTYLES_H
0023 #define KOODFGRAPHICSTYLES_H
0024 
0025 #include "koodf_export.h"
0026 
0027 #include <QTransform>
0028 
0029 class QBrush;
0030 class QPen;
0031 class QString;
0032 class QSizeF;
0033 
0034 class KoGenStyle;
0035 class KoGenStyles;
0036 class KoStyleStack;
0037 
0038 class KoOdfStylesReader;
0039 
0040 namespace KoOdfGraphicStyles
0041 {
0042     KOODF_EXPORT void saveOdfFillStyle(KoGenStyle &styleFill, KoGenStyles& mainStyles, const QBrush &brush);
0043 
0044     KOODF_EXPORT void saveOdfStrokeStyle(KoGenStyle &styleStroke, KoGenStyles &mainStyles, const QPen &pen);
0045 
0046     KOODF_EXPORT QString saveOdfHatchStyle(KoGenStyles &mainStyles, const QBrush &brush);
0047 
0048     /// Saves gradient style of brush into mainStyles and returns the styles name
0049     KOODF_EXPORT QString saveOdfGradientStyle(KoGenStyles &mainStyles, const QBrush &brush);
0050 
0051     /// Loads gradient style from style stack and stylesReader adapted to the given size and returns a brush
0052     KOODF_EXPORT QBrush loadOdfGradientStyle(const KoStyleStack &styleStack, const KoOdfStylesReader &stylesReader, const QSizeF &size);
0053 
0054     /// Loads gradient style with the given name from style stack and stylesReader adapted to the given size and returns a brush
0055     KOODF_EXPORT QBrush loadOdfGradientStyleByName(const KoOdfStylesReader &stylesReader, const QString &styleName, const QSizeF &size);
0056 
0057     KOODF_EXPORT QBrush loadOdfFillStyle(const KoStyleStack &styleStack, const QString &fill,  const KoOdfStylesReader &stylesReader);
0058 
0059     KOODF_EXPORT QPen loadOdfStrokeStyle(const KoStyleStack &styleStack, const QString &stroke, const KoOdfStylesReader &stylesReader);
0060 
0061     /// Helper function to parse a transformation attribute
0062     KOODF_EXPORT QTransform loadTransformation(const QString &transformation);
0063 
0064     /// Helper function to create a transformation attribute
0065     KOODF_EXPORT QString saveTransformation(const QTransform &transformation, bool appendTranslateUnit = true);
0066 }
0067 
0068 #endif /* KOODFGRAPHICSTYLES_H */