ColorButton Class Reference

A customized QtColorPicker used for color selection. More...

`#include <ColorButton.h>`

Inheritance diagram for ColorButton:

## Signals

void | colorChanged ()
Signals inherited from QtColorPicker
void | colorChanged (const QColor &)

## Public Member Functions

QColor | color ()
| Get the current color. More...
| ColorButton (QWidget *parent=0)
| Constructor. More...
void | setColor (const QColor &c)
| Set the current color to be displayed. More...
Public Member Functions inherited from QtColorPicker
QColor | color (int index) const
bool | colorDialogEnabled () const
QColor | currentColor () const
void | insertColor (const QColor &color, const QString &text=QString::null, int index=-1)
| QtColorPicker (QWidget *parent=0, int columns=-1, bool enableColorDialog=true)
void | setColorDialogEnabled (bool enabled)
void | setStandardColors ()
| ~QtColorPicker ()

## Additional Inherited Members

Public Slots inherited from QtColorPicker
void | setCurrentColor (const QColor &col)
Static Public Member Functions inherited from QtColorPicker
static QColor | getColor (const QPoint &pos, bool allowCustomColors=true)
Protected Member Functions inherited from QtColorPicker
void | paintEvent (QPaintEvent *e)
Properties inherited from QtColorPicker
bool | colorDialog
| Whether the ellipsis "..." (more) button is available. More...

## Detailed Description

A customized QtColorPicker used for color selection.

## Constructor & Destructor Documentation

## ColorButton()

ColorButton::ColorButton | ( | QWidget * | parent = `0` | ) |

Constructor.

Parameters

  parent | parent widget (only affects placement of the widget)

References colorChanged(), ColorBox::colorList(), ColorBox::colorNames(), ColorBox::defaultColorNames(), ColorBox::defaultColors(), QtColorPicker::insertColor(), and ColorBox::numPredefinedColors().

## Member Function Documentation

## color()

QColor ColorButton::color | ( |  | ) |

inline

Get the current color.

References colorChanged(), and QtColorPicker::currentColor().

Referenced by FitDialog::accept(), PlotDialog::acceptParams(), LineDialog::apply(), ConfigDialog::apply(), TextDialog::apply(), AxesDialog::applyAxisFormatToLayer(), AxesDialog::applyCanvasFormatTo(), PlotDialog::applyCanvasFormatToLayer(), AxesDialog::applyChangesToGrid(), PlotDialog::applyErrorBarFormatToCurve(), PlotDialog::applyFormatToLayer(), PlotDialog::applyLabelsFormatToItem(), PlotDialog::applyLineFormatToLayer(), PlotDialog::applyPercentileFormatToCurve(), PlotDialog::applySymbolsFormatToCurve(), PlotDialog::changePlotType(), FilterDialog::filter(), ExpDecayDialog::fit(), PolynomFitDialog::fit(), TextDialog::formatLayerLabels(), InterpolationDialog::interpolate(), AxesDialog::pickAxisLabelColor(), PlotDialog::pickErrorBarsColor(), ConfigDialog::rehighlight(), PlotDialog::setCanvasDefaultValues(), LineDialog::setDefaultValues(), EnrichmentDialog::setFrameDefaultValues(), AxesDialog::setFrameDefaultValues(), EnrichmentDialog::setFrameTo(), AxesDialog::setLabelsNumericFormat(), PlotDialog::setLayerDefaultValues(), EnrichmentDialog::setPatternTo(), EnrichmentDialog::setRectangleDefaultValues(), ApplicationWindow::setTextColor(), EnrichmentDialog::setTextDefaultValues(), EnrichmentDialog::setTextFormatTo(), AxesDialog::showAxis(), SmoothCurveDialog::smooth(), ConfigDialog::updateGrid(), ContourLinesEditor::updatePen(), Plot3DDialog::updatePlot(), AxesDialog::updatePlot(), FitDialog::updatePreview(), and AxesDialog::updateTickLabelsList().

## colorChanged

void ColorButton::colorChanged | ( |  | ) |

signal

Referenced by color(), and ColorButton().

## setColor()

void ColorButton::setColor | ( | const QColor & | c | ) |

inline

Set the current color to be displayed.

References QtColorPicker::setCurrentColor().

Referenced by FitDialog::activateCurve(), ExpDecayDialog::ExpDecayDialog(), FilterDialog::FilterDialog(), ConfigDialog::initAppPage(), FitDialog::initFitPage(), ConfigDialog::initFittingPage(), ConfigDialog::initNotesPage(), ConfigDialog::initPlots3DPage(), ConfigDialog::initPlotsPage(), ConfigDialog::initTablesPage(), InterpolationDialog::InterpolationDialog(), LineDialog::LineDialog(), PolynomFitDialog::PolynomFitDialog(), PlotDialog::setActiveCurve(), PlotDialog::setActiveLayer(), ConfigDialog::setApplication(), ApplicationWindow::setFormatBarColor(), AxesDialog::setGraph(), TextDialog::setGraph(), Plot3DDialog::setPlot(), EnrichmentDialog::setWidget(), AxesDialog::showGridOptions(), ConfigDialog::showGridOptions(), ContourLinesEditor::showPenDialog(), MultiLayer::showWaterfallFillDialog(), SmoothCurveDialog::SmoothCurveDialog(), and AxesDialog::updateAxisColor().

The documentation for this class was generated from the following files:

- qtiplot/src/lib/include/ColorButton.h
- qtiplot/src/lib/src/ColorButton.cpp