File indexing completed on 2024-05-05 13:08:57
0001 /* This file is part of the KDE project 0002 * Copyright (C) 2001-2007 by OpenMFG, LLC (info@openmfg.com) 0003 * Copyright (C) 2007-2008 by Adam Pigg (adam@piggz.co.uk) 0004 * Copyright (C) 2010-2015 Jarosław Staniek <staniek@kde.org> 0005 * 0006 * This library is free software; you can redistribute it and/or 0007 * modify it under the terms of the GNU Lesser General Public 0008 * License as published by the Free Software Foundation; either 0009 * version 2.1 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 * Lesser General Public License for more details. 0015 * 0016 * You should have received a copy of the GNU Lesser General Public 0017 * License along with this library. If not, see <http://www.gnu.org/licenses/>. 0018 */ 0019 0020 #ifndef KREPORTELEMENT_H 0021 #define KREPORTELEMENT_H 0022 0023 #include "kreport_export.h" 0024 0025 #include <QColor> 0026 #include <QRectF> 0027 0028 class QDebug; 0029 0030 //! @brief The KReportElement class represents a functional visual element of a report design 0031 class KREPORT_EXPORT KReportElement //SDC: explicit operator== virtual_dtor 0032 { 0033 public: 0034 /*! 0035 @getter 0036 @return element's name. 0037 @setter 0038 Sets the element's name to @a name. 0039 */ 0040 QString name; //SDC: 0041 0042 /*! 0043 @getter 0044 @return element's rectangle. 0045 @setter 0046 Sets the element's rectangle to @a rect. 0047 */ 0048 QRectF rect; //SDC: 0049 0050 /*! 0051 @getter 0052 @return element's Z-value. 0053 The Z value decides the stacking order of sibling (neighboring) elements. 0054 A sibling element of high Z value will always be drawn on top of another sibling 0055 element with a lower Z value. 0056 If you restore the Z value, the element's insertion order will decide its stacking order. 0057 The Z-value does not affect the element's size in any way. 0058 The default Z-value is 0. 0059 @setter 0060 Sets the element's Z-value to @a z. 0061 */ 0062 qreal z; //SDC: default=0 0063 0064 /*! 0065 @getter 0066 @return element's foreground color. 0067 The default foreground color is invalid what means 'unspecified'. 0068 @setter 0069 Sets the element's foreground color to @a foregroundColor. 0070 */ 0071 QColor foregroundColor; //SDC: 0072 0073 /*! 0074 @getter 0075 @return element's background color. 0076 The default background color is invalid what means 'unspecified'. 0077 @setter 0078 Sets the element's background color to @a backgroundColor. 0079 */ 0080 QColor backgroundColor; //SDC: 0081 0082 /*! 0083 @getter 0084 @return element's background opacity, which is between 0.0 (transparent) and 1.0 (opaque). 0085 The default opacity is 0.0. 0086 @setter 0087 Sets the element's background opacity to @a backgroundOpacity. 0088 */ 0089 qreal backgroundOpacity; //SDC: default=0.0 custom_setter 0090 }; 0091 0092 //! Sends information about the element @a element to debug output @a dbg. 0093 KREPORT_EXPORT QDebug operator<<(QDebug dbg, const KReportElement& element); 0094 0095 KREPORT_EXPORT uint qHash(const KReportElement &element, uint seed = 0) Q_DECL_NOTHROW; 0096 0097 #endif // KREPORTELEMENT_H