Widget ColorWheel graphically shows a color wheel for color theory. Class ColorWheel is new widget inherited from the QLabel. See e.g. http://en.wikipedia.org/wiki/Color_wheel for more info.
More...
#include <colorwheelwidget.h>
|
enum | MethodType {
Monochromatic,
Analogous,
Complementary,
Split,
Triadic,
Tetradic
} |
| It can handle these color theory methods.
|
|
|
void | clicked (int button, const QPoint &point) |
| Signal raised by mouse click on widget by user. More...
|
|
|
ScribusDoc * | currentDoc |
|
QString | trBaseColor |
| name of the "base color" to handle in extern color lists
|
|
colorModel | currentColorSpace |
| Which color model is in use.
|
|
MethodType | currentType |
| Actual type of color computing. See MethodType.
|
|
int | angle |
| Difference between selected value and counted ones. Let's set angle = 15 and base point e.g. 60 (everything in grades). Now you will have Analogous angles 60 (base) and 75 (+15) and 45 (-15). Exact interpretation of the angle value depends on the MethodType value.
|
|
int | baseAngle |
| Angle of the base color.
|
|
ScColor | actualColor |
| RGB interpretation of the leading point in the wheel.
|
|
ColorList | colorList |
| List of the colors created in this widget. Colors can be added into Scribus color list later.
|
|
|
void | mouseReleaseEvent (QMouseEvent *e) |
| An event for mouse actions handling. See. More...
|
|
void | mousePressEvent (QMouseEvent *e) |
| Mouse handling. It calls mouseReleaseEvent. More...
|
|
void | mouseMoveEvent (QMouseEvent *e) |
| Mouse handling. It calls mouseReleaseEvent. More...
|
|
void | paintEvent (QPaintEvent *) |
| Repaint the widget. It prevents the bugs with another window moving over it.
|
|
void | makeMonochromatic () |
| Counts the monochromatic colors. The monochromatic color scheme uses variations in lightness and saturation of a single color. It's clean and elegant color schema. I like it's minimalism ;)
|
|
void | makeAnalogous () |
| Counts the analogous colors. The analogous color scheme uses colors that are changed by an angle in the color wheel. It looks richer than mono scheme.
|
|
void | makeComplementary () |
| Counts the complementary colors. It takes two opposite colors (180 deg). It looks great when you choose a warm color against a cool one. E.g. dark green vs. wine red. Hmmm wine...
|
|
void | makeSplit () |
| Counts the split-complementary colors. It's enthanced complementary method. It takes base and opposite colors with applied angle differences.
|
|
void | makeTriadic () |
| Counts the triadic colors. It takes three colors balanced on the wheel (by 120 grades).
|
|
void | makeTetradic () |
| Counts the tetradic colors. It's two times complementary.
|
|
void | paintCenterSample () |
| Draw center circle filled with base color.
|
|
void | paintWheel () |
| Draw a color wheel.
|
|
ScColor | sampleByAngle (int angle) |
| Appends a color into. More...
|
|
void | baseColor () |
| Appends the base color into color list.
|
|
ScColor | colorSpaceColor (ScColor col) |
| Creates a Scribus ScColor from rgb value. Its result depends on the currentColorSpace value. More...
|
|
void | drawBorderPoint (int angle, bool base=false, bool clear=false) |
| Display user selection - selected colors. Chosen colors are marked via bullets on the border of the wheel. More...
|
|
int | valueFromPoint (const QPoint &p) const |
| Clear border marks before redrawing. It redraws only small piece of the bitmap. More...
|
|
|
ColorMap | colorMap |
| Internal color mapping. It provides angle-color dictionary.
|
|
int | angleShift |
| Angle diff between colorMap and painted wheel itself. QTransform wheel and colorMap have different start points. It's taken from Qt.
|
|
int | widthH |
| Half of the widget sizes. To prevent all width()/2 divisions.
|
|
int | heightH |
|
QList< PaintPoint > | pointList |
|
Widget ColorWheel graphically shows a color wheel for color theory. Class ColorWheel is new widget inherited from the QLabel. See e.g. http://en.wikipedia.org/wiki/Color_wheel for more info.
- Author
- Petr Vanek petr@.nosp@m.scri.nosp@m.bus.i.nosp@m.nfo
- Date
- April 2005
void ColorWheel::clicked |
( |
int |
button, |
|
|
const QPoint & |
point |
|
) |
| |
|
signal |
Signal raised by mouse click on widget by user.
- Parameters
-
button | Mouse button number. See Qt docs. |
point | Coordinates of the mouse pointer. |
ScColor ColorWheel::colorByAngle |
( |
int |
angle | ) |
|
Get sample color from specifid angle.
- Parameters
-
angle | Angle of the color in the wheel. An angle for transformation counting. E.g. base angle is 30, param is 90 - transformation is 120. There is easy "convert 665485 into 0-359 interval" algorithm too. |
- Return values
-
Creates a Scribus ScColor from rgb value. Its result depends on the currentColorSpace value.
- Parameters
-
- Return values
-
void ColorWheel::drawBorderPoint |
( |
int |
angle, |
|
|
bool |
base = false , |
|
|
bool |
clear = false |
|
) |
| |
|
protected |
Display user selection - selected colors. Chosen colors are marked via bullets on the border of the wheel.
- Parameters
-
angle | angle of the drawed mark |
base | Draw it highlighted if it is base color |
clear | Draw point with white = clear it from painter |
QString ColorWheel::getTypeDescription |
( |
MethodType |
aType | ) |
|
Returns localized name of the type.
- Parameters
-
aType | Type of the color algorithm. See MethodType. |
- Return values
-
QString | Translated method name. |
void ColorWheel::mouseMoveEvent |
( |
QMouseEvent * |
e | ) |
|
|
protected |
Mouse handling. It calls mouseReleaseEvent.
- Parameters
-
void ColorWheel::mousePressEvent |
( |
QMouseEvent * |
e | ) |
|
|
protected |
Mouse handling. It calls mouseReleaseEvent.
- Parameters
-
void ColorWheel::mouseReleaseEvent |
( |
QMouseEvent * |
e | ) |
|
|
protected |
An event for mouse actions handling. See.
- See also
- clicked() for more info.
- Parameters
-
bool ColorWheel::recomputeColor |
( |
ScColor |
col | ) |
|
Setup the values by given QColor. It sets all options by given color (from input color dialogs).
- Parameters
-
- Return values
-
true | on color found, false when color not found - black or white etc. |
ScColor ColorWheel::sampleByAngle |
( |
int |
angle | ) |
|
|
protected |
Appends a color into.
- See also
- colorList.
- Parameters
-
angle | Angle of the color in the wheel. An angle for transformation counting. E.g. base angle is 30, param is 90 - transformation is 120. There is easy "convert 665485 into 0-359 interval" algorithm too. |
- Return values
-
int ColorWheel::valueFromPoint |
( |
const QPoint & |
p | ) |
const |
|
protected |
Clear border marks before redrawing. It redraws only small piece of the bitmap.
Counts an angle of the point in color wheel. Modified method from Qt QDial widget.
- Parameters
-
p | coordinates of the point. |
- Return values
-
The documentation for this class was generated from the following files:
- /Users/ale/src/Scribus/scribus/plugins/colorwheel/colorwheelwidget.h
- /Users/ale/src/Scribus/scribus/plugins/colorwheel/colorwheelwidget.cpp