Warning, file /office/calligra/libs/flake/KoColorBackground.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) 2008 Jan Hambrecht <jaham@gmx.net> 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 KOCOLORBACKGROUND_H 0021 #define KOCOLORBACKGROUND_H 0022 0023 #include "KoShapeBackground.h" 0024 #include "flake_export.h" 0025 #include <Qt> 0026 0027 class KoColorBackgroundPrivate; 0028 class QColor; 0029 0030 /// A simple solid color shape background 0031 class FLAKE_EXPORT KoColorBackground : public KoShapeBackground 0032 { 0033 public: 0034 KoColorBackground(); 0035 0036 /// Creates background from given color and style 0037 explicit KoColorBackground(const QColor &color, Qt::BrushStyle style = Qt::SolidPattern); 0038 0039 ~KoColorBackground() override; 0040 0041 /// Returns the background color 0042 QColor color() const; 0043 0044 /// Sets the background color 0045 void setColor(const QColor &color); 0046 0047 /// Returns the background style 0048 Qt::BrushStyle style() const; 0049 0050 // reimplemented from KoShapeBackground 0051 void paint(QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &context, const QPainterPath &fillPath) const override; 0052 // reimplemented from KoShapeBackground 0053 void fillStyle(KoGenStyle &style, KoShapeSavingContext &context) override; 0054 // reimplemented from KoShapeBackground 0055 bool loadStyle(KoOdfLoadingContext & context, const QSizeF &shapeSize) override; 0056 protected: 0057 KoColorBackground(KoShapeBackgroundPrivate &dd); 0058 private: 0059 Q_DECLARE_PRIVATE(KoColorBackground) 0060 Q_DISABLE_COPY(KoColorBackground) 0061 }; 0062 0063 #endif // KOCOLORBACKGROUND_H