libs/flake

KoGuidesData.h

Go to the documentation of this file.
00001 /* This file is part of the KDE project
00002    Copyright (C) 2006 Laurent Montel <montel@kde.org>
00003    Copyright (C) 2008 Jan Hambrecht <jaham@gmx.net>
00004 
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License as published by the Free Software Foundation; either
00008    version 2 of the License, or (at your option) any later version.
00009 
00010    This library 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 GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #ifndef KOGUIDESDATA_H
00022 #define KOGUIDESDATA_H
00023 
00024 #include "flake_export.h"
00025 #include <QtCore/QList>
00026 #include <QtCore/Qt>
00027 #include "KoXmlReaderForward.h"
00028 
00029 class QPainter;
00030 class KoViewConverter;
00031 class QRectF;
00032 class QColor;
00033 class KoXmlWriter;
00034 
00038 class FLAKE_EXPORT KoGuidesData
00039 {
00040 public:
00041     KoGuidesData();
00042     ~KoGuidesData();
00043 
00050     void setGuideLines(const QList<qreal> &horizontalLines, const QList<qreal> &verticalLines);
00056     void setHorizontalGuideLines(const QList<qreal> &lines);
00057 
00063     void setVerticalGuideLines(const QList<qreal> &lines);
00064 
00071     void addGuideLine(Qt::Orientation o, qreal pos);
00072 
00076     bool showGuideLines() const;
00077 
00081     void setShowGuideLines(bool show);
00082 
00084     QList<qreal> horizontalGuideLines() const;
00085 
00087     QList<qreal> verticalGuideLines() const;
00088 
00096     void paintGuides(QPainter &painter, const KoViewConverter &converter, const QRectF &area) const;
00097 
00102     void setGuidesColor(const QColor &color);
00103 
00105     QColor guidesColor() const;
00106 
00108     bool loadOdfSettings(const KoXmlDocument & settingsDoc);
00109 
00111     void saveOdfSettings(KoXmlWriter &settingsWriter);
00112 
00113 private:
00114     class Private;
00115     Private * const d;
00116 };
00117 
00118 
00119 #endif
00120