#include <colordlg.h>
Collaboration diagram for ColorDlg:
Public Slots | |
void | colorChanged (const rColor &) |
void | rgbChanged (int) |
void | hsvChanged (int) |
void | alphaChanged (int) |
void | grabPixel () |
void | addCustomColor () |
void | toHistory (const rColor &) |
void | deleteHistory (HistoryFrame *) |
void | htmlChanged () |
Public Member Functions | |
ColorDlg (QWidget *parent=0, const char *name=0, bool modal=false, WFlags f=0) | |
void | setColor (const rColor &c) |
void | setColor (const QColor &) |
const rColor & | getRColor () |
const QColor & | getQColor () |
void | setHistory (int, const rColor &) |
const rColor & | getHistory (int) |
Protected Member Functions | |
void | mouseReleaseEvent (QMouseEvent *) |
Private Attributes | |
rColor | curColor |
ColorCircle * | colci |
QHBoxLayout * | upperLayout |
QVBoxLayout * | colorsLayout |
QVBoxLayout * | ColorDlgLayout |
QGridLayout * | SliderLayout |
QGridLayout * | sampleLayout |
QGridLayout * | lowerLayout |
bool | useSpinBoxes |
bool | grabbing |
Slider * | hueSlider |
Slider * | satSlider |
Slider * | valSlider |
Slider * | redSlider |
Slider * | greenSlider |
Slider * | blueSlider |
QSpinBox * | hueSpinBox |
QSpinBox * | satSpinBox |
QSpinBox * | valSpinBox |
QSpinBox * | redSpinBox |
QSpinBox * | greenSpinBox |
QSpinBox * | blueSpinBox |
QLabel * | hueLabel |
QLabel * | satLabel |
QLabel * | valLabel |
QLabel * | redLabel |
QLabel * | greenLabel |
QLabel * | blueLabel |
QLabel * | alphaLabel |
QLabel * | htmlLabel |
QLabel * | newLabel |
QLabel * | oldLabel |
QSpinBox * | alphaSpinBox |
Slider * | alphaSlider |
QLineEdit * | htmlText |
Sample * | newSample |
Sample * | oldSample |
HistoryFrame ** | history |
int | historyFrames |
int | nextFrame |
QPushButton * | acceptButton |
QPushButton * | rejectButton |
QToolButton * | addHistory |
QToolButton * | pickColor |
QColor | retQCol |
rColor | retRCol |
|
The one and only c'tor. Here is where the necessary widgets are created and put in their divers layouts. Connections between signals and slots are made: The usual rather boring thing. |
|
|
|
Takes care of changes in the desired alpha value. |
|
The heavily used function for setting the current Color, whenever changes have taken place in the various input modules. |
|
This slot is called when a history entry should be deleted. The frame is cleared and the remaining colors are shifted to the left to fill the gap. ( Not really true, but sounds better. ) |
|
Retrieves the rColor from history frame n. If n is out of range, returns opaque white. Here is the call graph for this function: |
|
Returns the current color as a QColor. Here is the call graph for this function: |
|
|
|
Starts the color picker. I had to create my own cross cursor here, because Qt uses the X11 cross cursor. And this cursor is not masked for transparency at the relevant hot spot. |
|
This constructs a new color whenever one of the hue, saturation or value components change. |
|
This slot is called whenever return is pressed in the HTML field. The text is evaluated as an hex integer. If the result turns out to have more than 24 bits, a new value for alpha is taken from the topmost bits. If not, alpha is set to 255 ( opaque ). |
|
The mouseReleaseEvent is reimplemented in order to get to the selected color if color picking is active. Sets a new current color if this is the case. Here is the call graph for this function: |
|
The input widgets for the red, green and blue color components are connected to this slot, as a new current color must be created out of them. rColor does not have a constructor for this. |
|
Builds a new current rColor from a QColor. Here is the call graph for this function: |
|
Sets a new current rColor. |
|
Adds the rColor c to the history frame Here is the call graph for this function: |
|
Add the current color to the history, if it is not opaque white. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|