KChart

KChartBackgroundAttributes.h
1/*
2 * SPDX-FileCopyrightText: 2001-2015 Klaralvdalens Datakonsult AB. All rights reserved.
3 *
4 * This file is part of the KD Chart library.
5 *
6 * SPDX-License-Identifier: GPL-2.0-or-later
7 */
8
9#ifndef KCHARTBACKGROUNDATTRIBUTES_H
10#define KCHARTBACKGROUNDATTRIBUTES_H
11
12#include <QDebug>
13#include <QMetaType>
14#include <QBrush>
15#include "KChartGlobal.h"
16
17namespace KChart {
18
19/**
20 * Set of attributes usable for background pixmaps
21 */
22class KCHART_EXPORT BackgroundAttributes
23{
24public:
27 BackgroundAttributes &operator= ( const BackgroundAttributes& );
28
30
31 enum BackgroundPixmapMode { BackgroundPixmapModeNone,
32 BackgroundPixmapModeCentered,
33 BackgroundPixmapModeScaled,
34 BackgroundPixmapModeStretched };
35
36 void setVisible( bool visible );
37 bool isVisible() const;
38
39 void setBrush( const QBrush &brush );
40 QBrush brush() const;
41
42 void setPixmapMode( BackgroundPixmapMode mode );
43 BackgroundPixmapMode pixmapMode() const;
44
45 void setPixmap( const QPixmap &backPixmap );
46 QPixmap pixmap() const;
47
48 bool operator==( const BackgroundAttributes& ) const;
49 inline bool operator!=( const BackgroundAttributes& other ) const { return !operator==(other); }
50
51 bool isEqualTo( const BackgroundAttributes& other, bool ignorePixmap=false ) const;
52
53private:
54 KCHART_DECLARE_PRIVATE_BASE_VALUE( BackgroundAttributes )
55}; // End of class BackgroundAttributes
56
57}
58
59#if !defined(QT_NO_DEBUG_STREAM)
60KCHART_EXPORT QDebug operator<<(QDebug, const KChart::BackgroundAttributes& );
61#endif /* QT_NO_DEBUG_STREAM */
62
63KCHART_DECLARE_SWAP_SPECIALISATION( KChart::BackgroundAttributes )
64
65QT_BEGIN_NAMESPACE
66Q_DECLARE_TYPEINFO( KChart::BackgroundAttributes, Q_MOVABLE_TYPE );
67QT_END_NAMESPACE
68
69Q_DECLARE_METATYPE( KChart::BackgroundAttributes )
70
71#endif // KCHARTBACKGROUNDATTRIBUTES_H
Contains KChart macros.
Set of attributes usable for background pixmaps.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:14:24 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.