QtiPlot
0.9.8.2
|
A modified QComboBox used for color selection. More...
#include <ColorBox.h>
Public Member Functions | |
QColor | color () const |
Return the current color. More... | |
ColorBox (QWidget *parent=0) | |
Constructor. More... | |
void | setColor (const QColor &c) |
Set the current color. More... | |
Static Public Member Functions | |
static QColor | color (int colorIndex) |
Return the color at index 'colorIndex'. More... | |
static int | colorIndex (const QColor &c) |
Return the index for a given color. More... | |
static QList< QColor > | colorList () |
Return the list of colors. More... | |
static QStringList | colorNames () |
Returns the color names. More... | |
static QColor | defaultColor (int colorIndex) |
Return the default color at index 'colorIndex'. More... | |
static QStringList | defaultColorNames () |
Returns the color name for the predefined colors. More... | |
static QList< QColor > | defaultColors () |
Returns the list of predefined colors. More... | |
static bool | isValidColor (const QColor &color) |
Returns TRUE if the color is included in the color box, otherwise returns FALSE. More... | |
static int | numPredefinedColors () |
Returns the number of predefined colors. More... | |
Protected Member Functions | |
void | init () |
Internal initialization function. More... | |
Static Protected Attributes | |
static const QColor | colors [] |
Array containing the 24 predefined colors. More... | |
static const int | colors_count = 24 |
The number of predefined colors. More... | |
A modified QComboBox used for color selection.
It contains a list of 24 predefined colors.
ColorBox::ColorBox | ( | QWidget * | parent = 0 ) |
QColor ColorBox::color | ( | ) | const |
Return the current color.
Referenced by PieCurve::color(), Fit::showConfidenceLimits(), Fit::showPredictionLimits(), and Fit::showResiduals().
|
static |
Return the color at index 'colorIndex'.
References colorList().
|
static |
Return the index for a given color.
References colorList(), and isValidColor().
Referenced by defaultColor(), setColor(), Fit::showConfidenceLimits(), Fit::showPredictionLimits(), and Fit::showResiduals().
|
static |
Return the list of colors.
References colors, and colors_count.
Referenced by color(), ColorButton::ColorButton(), colorIndex(), init(), and isValidColor().
|
static |
Returns the color names.
References defaultColorNames().
Referenced by ColorButton::ColorButton(), and init().
|
static |
Return the default color at index 'colorIndex'.
References colorIndex(), and colors.
Referenced by Graph::addFunction(), Grid::load(), ApplicationWindow::openGraph(), ApplicationWindow::readColorFromProject(), Filter::setColor(), Graph::setCurveLineColor(), and MultiPeakFit::setPeakCurvesColor().
|
static |
Returns the color name for the predefined colors.
Referenced by ColorButton::ColorButton(), colorNames(), ConfigDialog::loadDefaultColors(), and ApplicationWindow::setDefaultOptions().
|
static |
Returns the list of predefined colors.
References colors, and colors_count.
Referenced by ColorButton::ColorButton(), Graph::guessUniqueCurveLayout(), Graph::initCurveLayout(), ConfigDialog::loadDefaultColors(), Graph::plotBox(), ApplicationWindow::setDefaultOptions(), and Graph::setIndexedColors().
|
protected |
Internal initialization function.
References colorList(), and colorNames().
Referenced by ColorBox().
|
static |
Returns TRUE if the color is included in the color box, otherwise returns FALSE.
References colorList().
Referenced by colorIndex(), and Filter::setColor().
|
static |
Returns the number of predefined colors.
References colors_count.
Referenced by PieCurve::color(), and ColorButton::ColorButton().
void ColorBox::setColor | ( | const QColor & | c) |
Set the current color.
References colorIndex().
|
staticprotected |
Array containing the 24 predefined colors.
Referenced by colorList(), defaultColor(), and defaultColors().
|
staticprotected |
The number of predefined colors.
Referenced by colorList(), defaultColors(), and numPredefinedColors().