GradientEditor Class Reference
#include <gradienteditor.h>
List of all members.
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] |
The documentation for this class was generated from the following files: