Warning, file /office/calligra/libs/flake/KoInsets.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) 2006, 2010 Thomas Zander <zander@kde.org>
0003  *
0004  * This library is free software; you can redistribute it and/or
0005  * modify it under the terms of the GNU Library General Public
0006  * License as published by the Free Software Foundation; either
0007  * version 2 of the License, or (at your option) any later version.
0008  *
0009  * This library is distributed in the hope that it will be useful,
0010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0012  * Library General Public License for more details.
0013  *
0014  * You should have received a copy of the GNU Library General Public License
0015  * along with this library; see the file COPYING.LIB.  If not, write to
0016  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0017  * Boston, MA 02110-1301, USA.
0018  */
0019 
0020 #ifndef KOINSETS_H
0021 #define KOINSETS_H
0022 
0023 #include "flake_export.h"
0024 
0025 #include <QDebug>
0026 
0027 /**
0028  * An Insets object is a representation of the strokes of a shape.
0029  */
0030 struct FLAKE_EXPORT KoInsets
0031 {
0032 public:
0033     /**
0034      * Constructor.
0035      * @param top the inset at the top.
0036      * @param left the inset at the left
0037      * @param bottom the inset at the bottom
0038      * @param right the inset at the right
0039      */
0040     KoInsets(qreal top, qreal left, qreal bottom, qreal right) {
0041         this->top = top;
0042         this->left = left;
0043         this->bottom = bottom;
0044         this->right = right;
0045     }
0046     /**
0047      * Constructor.
0048      * Initializes all values to 0
0049      */
0050     KoInsets() : top(0.), bottom(0.), left(0.), right(0.) {
0051     }
0052 
0053     /// clears the insets so all sides are set to zero
0054     void clear() {
0055         top = 0;
0056         bottom = 0;
0057         left = 0;
0058         right = 0;
0059     }
0060 
0061     qreal top;     ///< Top inset
0062     qreal bottom;  ///< Bottom inset
0063     qreal left;    ///< Left inset
0064     qreal right;   ///< Right inset
0065 };
0066 
0067 #ifndef QT_NO_DEBUG_STREAM
0068 FLAKE_EXPORT QDebug operator<<(QDebug, const KoInsets &);
0069 #endif
0070 
0071 #endif