LinearColorMap.h
Go to the documentation of this file.
/***************************************************************************
File : LinearColorMap.h
Project : QtiPlot
--------------------------------------------------------------------
Copyright : (C) 2011 by Ion Vasilief
Email (use @ for *) : ion_vasilief*yahoo.fr
Description : A wrapper around QwtLinearColorMap from Qwt
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, *
* Boston, MA 02110-1301 USA *
* *
***************************************************************************/
#ifndef LINEAR_COLOR_MAP_H
#define LINEAR_COLOR_MAP_H
#include <qwt_color_map.h>
class LinearColorMap : public QwtLinearColorMap
{
public:
LinearColorMap();
LinearColorMap(const QColor &from, const QColor &to);
void setIntensityRange(const QwtDoubleInterval& range){d_range = range;}
void setIntensityRange(double vmin, double vmax){d_range = QwtDoubleInterval(vmin, vmax);}
QwtDoubleInterval intensityRange() const;
double lowerBound(){return d_range.minValue();}
double upperBound(){return d_range.maxValue();}
QString toXmlString();
static LinearColorMap fromXmlStringList(const QStringList& lst);
private:
QwtDoubleInterval d_range;
};
#endif
LinearColorMap::lowerBound
double lowerBound()
Get the lower range limit.
Definition: LinearColorMap.h:53
LinearColorMap
A customized QwtLinearColorMap.
Definition: LinearColorMap.h:39
LinearColorMap::intensityRange
QwtDoubleInterval intensityRange() const
Get the intensity range.
Definition: LinearColorMap.cpp:39
LinearColorMap::setIntensityRange
void setIntensityRange(double vmin, double vmax)
Set the intensity range.
Definition: LinearColorMap.h:49
LinearColorMap::LinearColorMap
LinearColorMap()
Constructor.
Definition: LinearColorMap.cpp:31
LinearColorMap::upperBound
double upperBound()
Get the upper range limit.
Definition: LinearColorMap.h:55
LinearColorMap::toXmlString
QString toXmlString()
Exports the map to a pseudo-XML string.
Definition: LinearColorMap.cpp:44
LinearColorMap::fromXmlStringList
static LinearColorMap fromXmlStringList(const QStringList &lst)
Used when restoring from project files.
Definition: LinearColorMap.cpp:63
LinearColorMap::d_range
QwtDoubleInterval d_range
Definition: LinearColorMap.h:64
LinearColorMap::setIntensityRange
void setIntensityRange(const QwtDoubleInterval &range)
Set the intensity range.
Definition: LinearColorMap.h:47