Commit 4389e571 authored by Jeff Baumes's avatar Jeff Baumes

STYLE: Adding doxygen comments to the new series colors classes.

parent 5640823a
......@@ -139,9 +139,28 @@ public:
/// The new lighter color.
static QColor lighter(const QColor &color, float factor=0.7);
/// \brief
/// Gets a new color between the given colors in hsv space.
///
/// The interpolation does not wrap around in the hue component.
///
/// \param color1 The first color.
/// \param color2 The last color.
/// \param fraction The fraction (0.0 to 1.0) of the distance from
/// \c color1 to \c color2.
/// \return
/// The interpolated color.
static QColor interpolateHsv(const QColor &color1, const QColor &color2,
float fraction);
/// \brief
/// Gets a new color between the given colors in rgb space.
/// \param color1 The first color.
/// \param color2 The last color.
/// \param fraction The fraction (0.0 to 1.0) of the distance from
/// \c color1 to \c color2.
/// \return
/// The interpolated color.
static QColor interpolateRgb(const QColor &color1, const QColor &color2,
float fraction);
......
......@@ -31,21 +31,41 @@ class QBrush;
class vtkQtChartSeriesModel;
/// \class vtkQtChartSeriesColors
/// \brief
/// The vtkQtChartSeriesColors class is used to color a chart series
/// with multiple colors.
class VTKQTCHART_EXPORT vtkQtChartSeriesColors : public QObject
{
Q_OBJECT
public:
/// \brief
/// Creates a chart series colors object.
/// \param parent The parent object.
vtkQtChartSeriesColors(QObject *parent=0);
virtual ~vtkQtChartSeriesColors() {}
/// \brief
/// Gets the chart series model.
/// \return
/// A pointer to the chart series model.
vtkQtChartSeriesModel *getModel() const {return this->Model;}
/// \brief
/// Sets the chart series model.
/// \param model The new chart series model.
virtual void setModel(vtkQtChartSeriesModel *model) {this->Model = model;}
/// \brief
/// Gets the brush for the given index of a series.
/// \param series The multi-color series.
/// \param index The index in the series items.
/// \param brush Used to return the brush for the given index.
virtual void getBrush(int series, int index, QBrush &brush) const = 0;
private:
vtkQtChartSeriesModel *Model;
vtkQtChartSeriesModel *Model; ///< Stores the chart series model.
private:
vtkQtChartSeriesColors(const vtkQtChartSeriesColors &);
......
......@@ -31,21 +31,61 @@ class vtkQtChartSeriesHueRangeInternal;
class QColor;
/// \class vtkQtChartSeriesHueRange
/// \brief
/// The vtkQtChartSeriesHueRange class is used to color a chart series
/// with a range of colors.
class VTKQTCHART_EXPORT vtkQtChartSeriesHueRange :
public vtkQtChartSeriesColors
{
public:
/// \brief
/// Creates a chart series hue range object.
/// \param parent The parent object.
vtkQtChartSeriesHueRange(QObject *parent=0);
virtual ~vtkQtChartSeriesHueRange();
/// \name vtkQtChartSeriesColors Methods
//@{
/// \brief
/// Gets the brush for the given index of a series.
///
/// The index and total number of series values is used to pick a
/// color along a hue gradient between the colors for the given
/// series. If the series does not have an associated color range,
/// the brush is not modified.
///
/// \param series The multi-color series.
/// \param index The index in the series items.
/// \param brush Used to return the brush for the given index.
virtual void getBrush(int series, int index, QBrush &brush) const;
//@}
/// \name Setup Methods
//@{
/// \brief
/// Gets the number of color ranges.
/// \return
/// The number of color ranges.
int getNumberOfRanges() const;
/// \brief
/// Adds a color range to the list.
/// \param color1 The first color in the range.
/// \param color2 The last color in the range.
void addRange(const QColor &color1, const QColor &color2);
/// \brief
/// Removes the color range at the given index.
/// \param index The color range to remove.
void removeRange(int index);
/// Removes all the color ranges in the list.
void removeAllRanges();
//@}
private:
/// Stores the list of color ranges.
vtkQtChartSeriesHueRangeInternal *Internal;
private:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment