KD Chart 2  [rev.2.6]
KDChartPalette.h
Go to the documentation of this file.
1 /****************************************************************************
2 ** Copyright (C) 2001-2019 Klaralvdalens Datakonsult AB. All rights reserved.
3 **
4 ** This file is part of the KD Chart library.
5 **
6 ** Licensees holding valid commercial KD Chart licenses may use this file in
7 ** accordance with the KD Chart Commercial License Agreement provided with
8 ** the Software.
9 **
10 **
11 ** This file may be distributed and/or modified under the terms of the
12 ** GNU General Public License version 2 and version 3 as published by the
13 ** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
14 **
15 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17 **
18 ** Contact info@kdab.com if any conditions of this licensing are not
19 ** clear to you.
20 **
21 **********************************************************************/
22 
23 #ifndef __KDCHART_PALETTE_H__
24 #define __KDCHART_PALETTE_H__
25 
26 #include <QObject>
27 #include <QBrush>
28 #include "KDChartGlobal.h"
29 
30 namespace KDChart {
31 
49 class KDCHART_EXPORT Palette: public QObject
50 {
51  Q_OBJECT
52 public:
53  explicit Palette( QObject *parent = 0 );
54  Palette( const Palette& );
55  Palette &operator= ( const Palette & );
56 
57  ~Palette();
58 
61  static const Palette& defaultPalette();
62  static const Palette& subduedPalette();
63  static const Palette& rainbowPalette();
64 
67  bool isValid() const;
68 
70  int size() const;
71 
75  void addBrush( const QBrush & brush, int position = -1 );
76 
81  QBrush getBrush( int position ) const;
82 
84  void removeBrush( int position );
85 
86 Q_SIGNALS:
89  void changed();
90 
91 private:
93 };
94 
95 }
96 
98 
99 #endif
A Palette is a set of brushes (or colors) to be used for painting data sets.
#define KDCHART_DECLARE_PRIVATE_BASE_VALUE(X)
Definition: KDChartGlobal.h:71
#define KDCHART_DECLARE_SWAP_SPECIALISATION(X)
Class only listed here to document inheritance of some KDChart classes.

Klarälvdalens Datakonsult AB (KDAB)
Qt-related services and products
https://www.kdab.com/
https://www.kdab.com/products/kd-chart/