SciDAVis
1.D4
|
A combo box to select a standard color. More...
#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. |
A combo box to select a standard color.
ColorBox::ColorBox | ( | QWidget * | parent = 0 | ) |
QColor ColorBox::color | ( | ) | const |
Return the current color.
References colors.
Referenced by PlotDialog::acceptParams(), Correlation::addResultCurve(), Convolution::addResultCurve(), Filter::addResultCurve(), MultiPeakFit::generateFitCurve(), ImportOPJ::importGraphs(), Fit::insertFitFunctionCurve(), MultiPeakFit::insertPeakFunctionCurve(), Grid::load(), ApplicationWindow::openGraph(), FFT::output(), Graph::plotBoxDiagram(), Graph::updateCurveLayout(), and AxesDialog::updateGrid().
|
static |
Return the color at index 'colorindex'.
References colorIndex(), and colors.
|
static |
Return the index for a given color.
References colors.
Referenced by color(), Graph::guessUniqueCurveLayout(), Graph::saveCurveLayout(), and Filter::setColor().
|
protected |
|
static |
Returns TRUE if the color is included in the color box, otherwise returns FALSE.
References colors, and colors_count.
Referenced by Filter::setColor().
|
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 ExpDecayDialog::ExpDecayDialog(), FilterDialog::FilterDialog(), FitDialog::initFitPage(), InterpolationDialog::InterpolationDialog(), PolynomFitDialog::PolynomFitDialog(), PlotDialog::setActiveCurve(), AxesDialog::showGridOptions(), and SmoothCurveDialog::SmoothCurveDialog().
|
staticprotected |
Array containing the 24 predefined colors.
Referenced by color(), colorIndex(), init(), isValidColor(), and setColor().
|
staticprotected |
The number of predefined colors.
Referenced by isValidColor(), and numPredefinedColors().