Namespaces | Classes | Enumerations | Functions | Variables
color_widgets Namespace Reference

Namespaces

 detail
 

Classes

class  ColorDialog
 
class  ColorPalette
 
class  ColorPreview
 
class  ColorSelector
 
class  ColorWheel
 Display an analog widget that allows the selection of a HSV color. More...
 
class  Swatch
 A widget drawing a palette. More...
 

Enumerations

enum  MouseStatus { Nothing, DragCircle, DragSquare }
 

Functions

QColor colorFromString (const QString &string, bool alpha=true)
 Convert a string into a color. More...
 
QString stringFromColor (const QColor &color, bool alpha=true)
 Convert a color into a string. More...
 

Variables

static ColorWheel::DisplayFlags default_flags = hard_default_flags
 
static const ColorWheel::DisplayFlags hard_default_flags = ColorWheel::SHAPE_TRIANGLE|ColorWheel::ANGLE_ROTATING|ColorWheel::COLOR_HSV
 
static const double selector_radius = 6
 

Enumeration Type Documentation

◆ MouseStatus

Enumerator
Nothing 
DragCircle 
DragSquare 

Definition at line 35 of file color_wheel.cpp.

Function Documentation

◆ colorFromString()

QColor color_widgets::colorFromString ( const QString &  string,
bool  alpha = true 
)

Convert a string into a color.

Supported string formats:

  • Short hex strings #f00
  • Long hex strings #ff0000
  • Color names red
  • Function-like rgb(255,0,0)

Additional string formats supported only when alpha is true:

  • Long hex strings #ff0000ff
  • Function like rgba(255,0,0,255)

Definition at line 40 of file color_names.cpp.

◆ stringFromColor()

QString color_widgets::stringFromColor ( const QColor &  color,
bool  alpha = true 
)

Convert a color into a string.

Format:

  • If the color has full alpha: #ff0000
  • If alpha is true and the color has non-full alpha: #ff000088

Definition at line 33 of file color_names.cpp.

Variable Documentation

◆ default_flags

ColorWheel::DisplayFlags color_widgets::default_flags = hard_default_flags
static

Definition at line 43 of file color_wheel.cpp.

◆ hard_default_flags

const ColorWheel::DisplayFlags color_widgets::hard_default_flags = ColorWheel::SHAPE_TRIANGLE|ColorWheel::ANGLE_ROTATING|ColorWheel::COLOR_HSV
static

Definition at line 42 of file color_wheel.cpp.

◆ selector_radius

const double color_widgets::selector_radius = 6
static

Definition at line 44 of file color_wheel.cpp.



plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:51