ColorMapEditor Class Reference

#include <ColorMapEditor.h>

List of all members.


Detailed Description

A complex widget allowing to customize a QwtLinearColorMap.

It uses a QTableWidget to display the values in one column and their corresponding colors in a second column. A click on a table color pops-up a QColorDialog allowing to customize it.

color_map_editor.png


Public Member Functions

QwtLinearColorMap colorMap ()
 Returns the customized color map.
 ColorMapEditor (const QLocale &locale=QLocale::system(), int precision=6, QWidget *parent=0)
 Constructor.
void setColorMap (const QwtLinearColorMap &map)
 Use this function to initialize the color map to be edited.
void setRange (double min, double max)
 Use this function to initialize the values range.

Static Public Member Functions

static QString saveToXmlString (const QwtLinearColorMap &color_map)
 Exports the map to a pseudo-XML string.

Protected Slots

void deleteLevel ()
void enableButtons (int row)
bool eventFilter (QObject *object, QEvent *e)
void insertLevel ()
void setScaledColors (bool scale=true)
void showColorDialog (int row, int col)
void spinBoxActivated (DoubleSpinBox *)
void updateColorMap ()

Private Attributes

QwtLinearColorMap color_map
 Color map object.
QLocale d_locale
 Locale settings used to display level values.
int d_precision
 Precision used to display level values.
QPushButton * deleteBtn
QPushButton * insertBtn
double max_val
double min_val
 Levels range.
QCheckBox * scaleColorsBox
QTableWidget * table
 Table displaying the values ranges in the first column and their corresponding colors in the second column.


Constructor & Destructor Documentation

ColorMapEditor::ColorMapEditor const QLocale &  locale = QLocale::system(),
int  precision = 6,
QWidget *  parent = 0
 

Constructor.

Parameters:
parent parent widget (only affects placement of the widget)


Member Function Documentation

QwtLinearColorMap ColorMapEditor::colorMap  )  [inline]
 

Returns the customized color map.

void ColorMapEditor::deleteLevel  )  [protected, slot]
 

void ColorMapEditor::enableButtons int  row  )  [protected, slot]
 

bool ColorMapEditor::eventFilter QObject *  object,
QEvent *  e
[protected, slot]
 

void ColorMapEditor::insertLevel  )  [protected, slot]
 

QString ColorMapEditor::saveToXmlString const QwtLinearColorMap &  color_map  )  [static]
 

Exports the map to a pseudo-XML string.

void ColorMapEditor::setColorMap const QwtLinearColorMap &  map  ) 
 

Use this function to initialize the color map to be edited.

void ColorMapEditor::setRange double  min,
double  max
 

Use this function to initialize the values range.

void ColorMapEditor::setScaledColors bool  scale = true  )  [protected, slot]
 

void ColorMapEditor::showColorDialog int  row,
int  col
[protected, slot]
 

void ColorMapEditor::spinBoxActivated DoubleSpinBox  )  [protected, slot]
 

void ColorMapEditor::updateColorMap  )  [protected, slot]
 


Member Data Documentation

QwtLinearColorMap ColorMapEditor::color_map [private]
 

Color map object.

QLocale ColorMapEditor::d_locale [private]
 

Locale settings used to display level values.

int ColorMapEditor::d_precision [private]
 

Precision used to display level values.

QPushButton * ColorMapEditor::deleteBtn [private]
 

QPushButton* ColorMapEditor::insertBtn [private]
 

double ColorMapEditor::max_val [private]
 

double ColorMapEditor::min_val [private]
 

Levels range.

QCheckBox* ColorMapEditor::scaleColorsBox [private]
 

QTableWidget* ColorMapEditor::table [private]
 

Table displaying the values ranges in the first column and their corresponding colors in the second column.


The documentation for this class was generated from the following files:
Generated on Tue Nov 4 10:49:53 2008 for Qti by  doxygen 1.4.6