1
/***************************************************************************
2
File : ColorMapEditor.h
4
--------------------------------------------------------------------
5
Copyright : (C) 2006 by Ion Vasilief
6
Email (use @ for *) : ion_vasilief*yahoo.fr
7
Description : A QwtLinearColorMap Editor Widget
8
***************************************************************************/
10
/***************************************************************************
12
* This program is free software; you can redistribute it and/or modify *
13
* it under the terms of the GNU General Public License as published by *
14
* the Free Software Foundation; either version 2 of the License, or *
15
* (at your option) any later version. *
17
* This program is distributed in the hope that it will be useful, *
18
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
19
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
20
* GNU General Public License for more details. *
22
* You should have received a copy of the GNU General Public License *
23
* along with this program; if not, write to the Free Software *
24
* Foundation, Inc., 51 Franklin Street, Fifth Floor, *
25
* Boston, MA 02110-1301 USA *
27
***************************************************************************/
28
#ifndef COLORMAPEDITOR_H
29
#define COLORMAPEDITOR_H
32
#include <qwt_color_map.h>
38
class ColorMapEditor: public QWidget
43
ColorMapEditor(QWidget* parent=0);
45
QwtLinearColorMap colorMap(){return color_map;};
46
void setColorMap(const QwtLinearColorMap& map);
48
void setRange(double min, double max);
51
void updateColorMap();
52
void validateLevel(int row, int col);
53
void enableButtons(int row, int col, int = 0, int = 0);
54
void showColorDialog(int row, int col);
57
void setScaledColors(bool scale = true);
59
bool eventFilter(QObject *object, QEvent *e);
63
QPushButton *insertBtn, *deleteBtn;
64
QCheckBox *scaleColorsBox;
67
QwtLinearColorMap color_map;
70
double min_val, max_val;