KChart

KChartPalette.h
1 /*
2  * Copyright (C) 2001-2015 Klaralvdalens Datakonsult AB. All rights reserved.
3  *
4  * This file is part of the KD Chart library.
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; either version 2 of
9  * the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <https://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef __KCHART_PALETTE_H__
21 #define __KCHART_PALETTE_H__
22 
23 #include <QObject>
24 #include <QBrush>
25 #include "KChartGlobal.h"
26 
27 namespace KChart {
28 
46 class KCHART_EXPORT Palette: public QObject
47 {
48  Q_OBJECT
49 public:
50  explicit Palette( QObject *parent = nullptr );
51  Palette( const Palette& );
52  Palette &operator= ( const Palette & );
53 
54  ~Palette();
55 
58  static const Palette& defaultPalette();
59  static const Palette& subduedPalette();
60  static const Palette& rainbowPalette();
61 
64  bool isValid() const;
65 
67  int size() const;
68 
72  void addBrush( const QBrush & brush, int position = -1 );
73 
78  QBrush getBrush( int position ) const;
79 
81  void removeBrush( int position );
82 
83 Q_SIGNALS:
85  void changed();
86 
87 private:
88  KCHART_DECLARE_PRIVATE_BASE_VALUE( Palette )
89 };
90 
91 }
92 
93 KCHART_DECLARE_SWAP_SPECIALISATION( KChart::Palette )
94 
95 #endif
A Palette is a set of brushes (or colors) to be used for painting data sets.
Definition: KChartPalette.h:46
Class only listed here to document inheritance of some KChart classes.
Contains KChart macros.
Global namespace.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Dec 4 2020 22:36:58 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.