ColorLuminancePicker Class Reference
A widget that allows the user to selected a luminance for a given color. More...
#include <colorluminancepicker.h>
Public Slots | |
| void | setCol (int h, int s) |
| Slot that is called when the selected color in the colorpicker changes. | |
| void | setCol (const QColor &c) |
| Slot that is called when the selected color in the colorpicker changes. | |
Signals | |
| void | newHsv (int h, int s, int v) |
| This signal is emitted when the luminance was changed by the user. | |
| void | toggleInteractionMode (bool b) |
| This signal is emitted when the user changes the luminance. | |
Public Member Functions | |
| ColorLuminancePicker (QWidget *parent=0) | |
| Constructor. | |
| ~ColorLuminancePicker () | |
| Destructor. | |
Protected Member Functions | |
| void | paintEvent (QPaintEvent *event) |
| Paints the luminancepicker. | |
| void | mouseMoveEvent (QMouseEvent *event) |
| Sets the arrow that indicates the luminance to the y-position of the mouse. | |
| void | mousePressEvent (QMouseEvent *event) |
| Sets the arrow that indicates the luminance to the y-position of the mouse. | |
| void | mouseReleaseEvent (QMouseEvent *event) |
| Only emits the toggleInteractionMode signal, so that coarseness mode is siwtched off. | |
Detailed Description
A widget that allows the user to selected a luminance for a given color.
A colorbar is diplayed that shows a colorgradient with all possible luminance values. Furthermore there is an arrow that shows the current luminance. The user can adjust the luminance by dragging the arrow or clicking on the colorbar.
Definition at line 45 of file colorluminancepicker.h.
Constructor & Destructor Documentation
| ColorLuminancePicker | ( | QWidget * | parent = 0 |
) |
Constructor.
- Parameters:
-
parent the parent widget
Definition at line 37 of file colorluminancepicker.cpp.
Member Function Documentation
| void mouseMoveEvent | ( | QMouseEvent * | event | ) | [protected] |
Sets the arrow that indicates the luminance to the y-position of the mouse.
- Parameters:
-
event the mouse event
Definition at line 65 of file colorluminancepicker.cpp.
| void mousePressEvent | ( | QMouseEvent * | event | ) | [protected] |
Sets the arrow that indicates the luminance to the y-position of the mouse.
- Parameters:
-
event the mouse event
Definition at line 69 of file colorluminancepicker.cpp.
| void mouseReleaseEvent | ( | QMouseEvent * | event | ) | [protected] |
Only emits the toggleInteractionMode signal, so that coarseness mode is siwtched off.
- Parameters:
-
event the mouse event
Definition at line 74 of file colorluminancepicker.cpp.
| void paintEvent | ( | QPaintEvent * | event | ) | [protected] |
Paints the luminancepicker.
- Parameters:
-
event the paint event
Definition at line 100 of file colorluminancepicker.cpp.
| void setCol | ( | const QColor & | c | ) | [slot] |
Slot that is called when the selected color in the colorpicker changes.
- Parameters:
-
c selected color
Definition at line 148 of file colorluminancepicker.cpp.
| void setCol | ( | int | h, | |
| int | s | |||
| ) | [slot] |
Slot that is called when the selected color in the colorpicker changes.
- Parameters:
-
h new hue value s new saturation value
Definition at line 95 of file colorluminancepicker.cpp.
| void toggleInteractionMode | ( | bool | b | ) | [signal] |
This signal is emitted when the user changes the luminance.
It will switch the coarseness mode of volume rendering on and off.
- Parameters:
-
on should coarseness mode switched on or off?