KD Chart 2: KDChartPalette.cpp File Reference

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- File List
- File Members

# KDChartPalette.cpp File Reference

`#include "KDChartPalette.h"`
`#include <QBrush>`
`#include <QVector>`
`#include <KDABLibFakes>`

Include dependency graph for KDChartPalette.cpp:

Go to the source code of this file.

## Defines
#define | d d_func()
## Functions
static Palette | makeDefaultPalette ()
static Palette | makeRainbowPalette ()
static Palette | makeSubduedPalette ()

## Define Documentation

#define d d_func()

Definition at line 103 of file KDChartPalette.cpp.

## Function Documentation

static Palette @72::makeDefaultPalette | ( |  | ) | `[static]`

Definition at line 40 of file KDChartPalette.cpp.

References KDChart::Palette::addBrush().

Referenced by KDChart::Palette::defaultPalette().

    00040                                         {
    00041         Palette p;
    00042
    00043         p.addBrush( Qt::red );
    00044         p.addBrush( Qt::green );
    00045         p.addBrush( Qt::blue );
    00046         p.addBrush( Qt::cyan );
    00047         p.addBrush( Qt::magenta );
    00048         p.addBrush( Qt::yellow );
    00049         p.addBrush( Qt::darkRed );
    00050         p.addBrush( Qt::darkGreen );
    00051         p.addBrush( Qt::darkBlue );
    00052         p.addBrush( Qt::darkCyan );
    00053         p.addBrush( Qt::darkMagenta );
    00054         p.addBrush( Qt::darkYellow );
    00055
    00056         return p;
    00057     }

static Palette @72::makeRainbowPalette | ( |  | ) | `[static]`

Definition at line 84 of file KDChartPalette.cpp.

References KDChart::Palette::addBrush(), and KDChart::Palette::getBrush().

Referenced by KDChart::Palette::rainbowPalette().

    00084                                         {
    00085         Palette p;
    00086
    00087         p.addBrush( QColor(255,  0,196) );
    00088         p.addBrush( QColor(255,  0, 96) );
    00089         p.addBrush( QColor(255, 128,64) );
    00090         p.addBrush( Qt::yellow );
    00091         p.addBrush( Qt::green );
    00092         p.addBrush( Qt::cyan );
    00093         p.addBrush( QColor( 96, 96,255) );
    00094         p.addBrush( QColor(160,  0,255) );
    00095         for( int i = 8 ; i < 16 ; ++i )
    00096             p.addBrush( p.getBrush(i-8).color().light(), i );
    00097
    00098         return p;
    00099     }

static Palette @72::makeSubduedPalette | ( |  | ) | `[static]`

Definition at line 59 of file KDChartPalette.cpp.

References KDChart::Palette::addBrush().

Referenced by KDChart::Palette::subduedPalette().

    00059                                         {
    00060         Palette p;
    00061
    00062         p.addBrush( QColor( 0xe0,0x7f,0x70 ) );
    00063         p.addBrush( QColor( 0xe2,0xa5,0x6f ) );
    00064         p.addBrush( QColor( 0xe0,0xc9,0x70 ) );
    00065         p.addBrush( QColor( 0xd1,0xe0,0x70 ) );
    00066         p.addBrush( QColor( 0xac,0xe0,0x70 ) );
    00067         p.addBrush( QColor( 0x86,0xe0,0x70 ) );
    00068         p.addBrush( QColor( 0x70,0xe0,0x7f ) );
    00069         p.addBrush( QColor( 0x70,0xe0,0xa4 ) );
    00070         p.addBrush( QColor( 0x70,0xe0,0xc9 ) );
    00071         p.addBrush( QColor( 0x70,0xd1,0xe0 ) );
    00072         p.addBrush( QColor( 0x70,0xac,0xe0 ) );
    00073         p.addBrush( QColor( 0x70,0x86,0xe0 ) );
    00074         p.addBrush( QColor( 0x7f,0x70,0xe0 ) );
    00075         p.addBrush( QColor( 0xa4,0x70,0xe0 ) );
    00076         p.addBrush( QColor( 0xc9,0x70,0xe0 ) );
    00077         p.addBrush( QColor( 0xe0,0x70,0xd1 ) );
    00078         p.addBrush( QColor( 0xe0,0x70,0xac ) );
    00079         p.addBrush( QColor( 0xe0,0x70,0x86 ) );
    00080
    00081         return p;
    00082     }