#include <ColorBox.h>
Public Member Functions | |
| QColor | color () const |
| Return the current color. | |
| ColorBox (QWidget *parent=0) | |
| Constructor. | |
| void | setColor (const QColor &c) |
| Set the current color. | |
Static Public Member Functions | |
| static QColor | color (int colorIndex) |
| Return the color at index 'colorindex'. | |
| static int | colorIndex (const QColor &c) |
| Return the index for a given color. | |
| static bool | isValidColor (const QColor &color) |
| Returns TRUE if the color is included in the color box, otherwise returns FALSE. | |
| static int | numPredefinedColors () |
| Returns the number of predefined colors. | |
Protected Member Functions | |
| void | init () |
| Internal initialization function. | |
Static Protected Attributes | |
| static const QColor | colors [] |
| Array containing the 24 predefined colors. | |
| static const int | colors_count = 24 |
| The number of predefined colors. | |
| ColorBox::ColorBox | ( | QWidget * | parent = 0 |
) |
| QColor ColorBox::color | ( | int | colorIndex | ) | [static] |
| QColor ColorBox::color | ( | ) | const |
Return the current color.
References colors.
Referenced by PlotDialog::acceptParams(), Graph::addFunction(), Filter::addResultCurve(), Correlation::addResultCurve(), Convolution::addResultCurve(), ImportOPJ::addText(), AxesDialog::applyChangesToGrid(), QwtPieCurve::color(), MultiPeakFit::generateFitCurve(), ImportOPJ::importGraphs(), Fit::insertFitFunctionCurve(), MultiPeakFit::insertPeakFunctionCurve(), Grid::load(), ApplicationWindow::openGraph(), FFT::output(), Graph::plotBoxDiagram(), Fit::showConfidenceLimits(), Fit::showPredictionLimits(), Fit::showResiduals(), Graph::updateCurveLayout(), and FitDialog::updatePreview().
| int ColorBox::colorIndex | ( | const QColor & | c | ) | [static] |
Return the index for a given color.
References colors.
Referenced by Graph::guessUniqueCurveLayout(), Graph::saveCurveLayout(), and Filter::setColor().
| void ColorBox::init | ( | ) | [protected] |
| bool ColorBox::isValidColor | ( | const QColor & | color | ) | [static] |
Returns TRUE if the color is included in the color box, otherwise returns FALSE.
References colors, and colors_count.
Referenced by Filter::setColor().
| int ColorBox::numPredefinedColors | ( | ) | [static] |
Returns the number of predefined colors.
References colors_count.
Referenced by QwtPieCurve::color().
| void ColorBox::setColor | ( | const QColor & | c | ) |
Set the current color.
References colors.
Referenced by FitDialog::activateCurve(), ExpDecayDialog::ExpDecayDialog(), FilterDialog::FilterDialog(), FitDialog::initFitPage(), InterpolationDialog::InterpolationDialog(), PolynomFitDialog::PolynomFitDialog(), PlotDialog::setActiveCurve(), AxesDialog::showGridOptions(), and SmoothCurveDialog::SmoothCurveDialog().
const QColor ColorBox::colors [static, protected] |
Initial value:
{
QColor(Qt::black),
QColor(Qt::red),
QColor(Qt::green),
QColor(Qt::blue),
QColor(Qt::cyan),
QColor(Qt::magenta),
QColor(Qt::yellow),
QColor(Qt::darkYellow),
QColor(Qt::darkBlue),
QColor(Qt::darkMagenta),
QColor(Qt::darkRed),
QColor(Qt::darkGreen),
QColor(Qt::darkCyan),
QColor("#0000A0"),
QColor("#FF8000"),
QColor("#8000FF"),
QColor("#FF0080"),
QColor(Qt::white),
QColor(Qt::lightGray),
QColor(Qt::gray),
QColor("#FFFF80"),
QColor("#80FFFF"),
QColor("#FF80FF"),
QColor(Qt::darkGray),
}
Referenced by color(), colorIndex(), init(), isValidColor(), and setColor().
const int ColorBox::colors_count = 24 [static, protected] |
1.5.6