MCPcopy Create free account
hub / github.com/KDAB/KDChart / setPaletteType

Method setPaletteType

src/KDChart/KDChartAttributesModel.cpp:419–438  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

417}
418
419void AttributesModel::setPaletteType(AttributesModel::PaletteType type)
420{
421 if (d->paletteType == type) {
422 return;
423 }
424 d->paletteType = type;
425 switch (type) {
426 case PaletteTypeDefault:
427 d->palette = Palette::defaultPalette();
428 break;
429 case PaletteTypeSubdued:
430 d->palette = Palette::subduedPalette();
431 break;
432 case PaletteTypeRainbow:
433 d->palette = Palette::rainbowPalette();
434 break;
435 default:
436 qWarning("Unknown palette type!");
437 }
438}
439
440AttributesModel::PaletteType AttributesModel::paletteType() const
441{

Callers 3

useDefaultColorsMethod · 0.80
useSubduedColorsMethod · 0.80
useRainbowColorsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected