qCC  version 2.5.4 (Qt) - 19 Apr. 2014
 All Classes Functions Variables Typedefs Enumerations
Signals | Public Member Functions | Protected Slots | Protected Attributes | List of all members
ccColorScaleEditorWidget Class Reference

Color scale editor dialog. More...

#include <ccColorScaleEditorWidget.h>

Inheritance diagram for ccColorScaleEditorWidget:
Inheritance graph
Collaboration diagram for ccColorScaleEditorWidget:
Collaboration graph


void stepSelected (int index)
 Signal emitted when a slider is selected.
void stepModified (int index)
 Signal emitted when a slider is modified.

Public Member Functions

 ccColorScaleEditorWidget (QWidget *parent=0, Qt::Orientation orientation=Qt::Horizontal)
 Default constructor.
virtual ~ccColorScaleEditorWidget ()
int getStepCount () const
 Returns the current number of color scale steps.
const ColorScaleElementSlidergetStep (int index)
 Returns a given slider (pointer on)
void setStepColor (int index, QColor color)
 Sets a given slider color.
void setStepRelativePosition (int index, double relativePos)
 Sets a given slider relative position.
int getSelectedStepIndex () const
 Returns currently selected step index.
void setSelectedStepIndex (int index, bool silent=false)
 Sets currently selected step index.
void deleteStep (int index)
 Deletes a given step. More...
void exportColorScale (ccColorScale::Shared &destScale) const
 Exports the current color scale.
void importColorScale (ccColorScale::Shared scale)
 Imports the current color scale.
void showLabels (bool state)
 Sets whether to show the color elements labels or not.
void setLabelColor (QColor color)
 Sets the labels color.
void setLabelPrecision (int precision)
 Sets the labels precision.
virtual void setSliders (SharedColorScaleElementSliders sliders)
 Sets associated sliders set.
- Public Member Functions inherited from ColorScaleEditorBaseWidget
 ColorScaleEditorBaseWidget (SharedColorScaleElementSliders sliders, Qt::Orientation orientation, int margin, QWidget *parent=0)
 Defautl constructor.
int length () const
 Returns useful length.
Qt::Orientation getOrientation () const
 Returns orientation.
int getMargin () const
 Returns margin.

Protected Slots

void onPointClicked (double relativePos)
 Slot called when a 'point' is clicked on the color bar.
void onSliderModified (int sliderIndex)
 Slot called when a slider is moved or its color is changed.
void onSliderSelected (int sliderIndex)
 Slot called when a slider is selected.

Protected Attributes

 Associated color bar.
 Associated sliders widget.
 Associated (sliders) labels widget.
- Protected Attributes inherited from ColorScaleEditorBaseWidget
SharedColorScaleElementSliders m_sliders
 Associated sliders.
Qt::Orientation m_orientation
int m_margin

Detailed Description

Color scale editor dialog.

Member Function Documentation

void ccColorScaleEditorWidget::deleteStep ( int  index)

Deletes a given step.

Warning: first and last steps shouldn't be deleted!

The documentation for this class was generated from the following files: