GradientEditor Class Reference

#include <gradienteditor.h>

List of all members.

Public Slots

void pointsUpdated ()
void colorDialog (int index, QWidget *selectedWidget)
void moveColorsToAlpha (bool state)
void moveColorsWithAlpha (int index, qreal newXPos)
void newColorPoints (int index, qreal xPos)
void deleteColorPoints (int index)

Signals

void gradientStopsChanged (const QGradientStops &stops)

Public Member Functions

 GradientEditor (QWidget *parent)
void setGradientStops (const QGradientStops &stops)
unsigned int * getColorsPtr ()
void updateColorTexture (int minDensity=0, int maxDensity=4095)
void forwardHistogramPtr (QPixmap *histogramPtr)

Protected Member Functions

void resizeEvent (QResizeEvent *event)


Detailed Description

The gradienteditor class is a collection of a red, green, blue and alpha ShadeWidget.

Constructor & Destructor Documentation

GradientEditor::GradientEditor ( QWidget *  parent  ) 

Constructor that creates the transfer function editor.

Returns:
The pointer to the created transfer function editor.


Member Function Documentation

void GradientEditor::setGradientStops ( const QGradientStops &  stops  ) 

Sets the gradient stops position and color from the given stops.

Parameters:
stops are the gradient stops which should be set.

unsigned int * GradientEditor::getColorsPtr (  ) 

Returns:
The pointer to the transfer texture.

void GradientEditor::updateColorTexture ( int  minDensity = 0,
int  maxDensity = 4095 
)

Updates the transfer texture with the color currently set in ShadeWidgets.

void GradientEditor::forwardHistogramPtr ( QPixmap *  histogramPtr  ) 

Forwards the QPixmap pointer to the alpha ShadeWidget.

Parameters:
histogramPtr is the pointer which should be forwarded.

void GradientEditor::pointsUpdated (  )  [slot]

Updates the gradient stops position and color from the currently set points. Sets this gradient points at the alpha ShadeWidget and emits a gradientStopsChanged signal.

void GradientEditor::colorDialog ( int  index,
QWidget *  selectedWidget 
) [slot]

Creates a color dialog with which a new color can be set.

Parameters:
index is the index of the point for which the color should be changed.
selectedWidget is a pointer to the ShadeWidget from whom the x pos for the other 3 poitns, which should be chnaged, is taken.

void GradientEditor::moveColorsToAlpha ( bool  state  )  [slot]

Sets the state of colorsFixatedToAlpha. Creates the color points over each alpha point with the current color of the alpha point or not (dependent on the state). Also sets the 3 color ShadeWidgets as editable or not (dependent on the state).

Parameters:
state is the state of the checkbox which calls this function.

void GradientEditor::moveColorsWithAlpha ( int  index,
qreal  newXPos 
) [slot]

Moves the 3 color points with the corresponding alpha point if colorsFixatedToAlpha is true.

Parameters:
index is the index of the points which should be moved.
newXPos is the new x position to which the corresponding points should be moved.

void GradientEditor::newColorPoints ( int  index,
qreal  xPos 
) [slot]

Creates the 3 color points for the corresponding alpha point if colorsFixatedToAlpha is true.

Parameters:
index is the index where the points should be saved.
xPos is the x position where the points should be created.

void GradientEditor::deleteColorPoints ( int  index  )  [slot]

Deletes the 3 color points of the corresponding alpha point if colorsFixatedToAlpha is true.

Parameters:
index is the index where the points should be deleted.

void GradientEditor::gradientStopsChanged ( const QGradientStops &  stops  )  [signal]

A signal that is send on change of the gradient stops.

Parameters:
stops are the gradient stops which changed.

void GradientEditor::resizeEvent ( QResizeEvent *  event  )  [protected]

Updates the gradient points at each GradientEditor resizing.


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

Generated on Tue Dec 9 22:48:07 2008 by  doxygen 1.5.6