Inviwo  0.9.10.1
Inviwo documentation
inviwo::TFColorEdit Class Reference

widget in TF dialog for entering six digit HTML hex color codes More...

#include <tfcoloredit.h>

+ Inheritance diagram for inviwo::TFColorEdit:

Signals

void colorChanged (const QColor &color)
 
- Signals inherited from inviwo::ColorLineEdit
void colorChanged ()
 

Public Member Functions

 TFColorEdit (QWidget *parent=nullptr)
 
virtual QSize sizeHint () const override
 
void setColor (const QColor &color, bool ambiguous)
 
- Public Member Functions inherited from inviwo::ColorLineEdit
 ColorLineEdit (QWidget *parent=nullptr)
 
void setColor (ivec3 v, ColorRepresentation rep=ColorRepresentation::Integer)
 
void setColor (ivec4 v, ColorRepresentation rep=ColorRepresentation::Integer)
 
void setColor (vec3 v, ColorRepresentation rep=ColorRepresentation::FloatingPoint)
 
void setColor (vec4 v, ColorRepresentation rep=ColorRepresentation::FloatingPoint)
 
void setColor (dvec3 v, ColorRepresentation rep=ColorRepresentation::FloatingPoint)
 
void setColor (dvec4 v, ColorRepresentation rep=ColorRepresentation::FloatingPoint)
 
template<typename T >
getColor () const
 
dvec4 getColor () const
 
bool hasAlpha () const
 
void setRepresentation (ColorRepresentation rep)
 
ColorRepresentation getRepresentation () const
 
template<>
dvec3 getColor () const
 
template<>
dvec4 getColor () const
 
template<>
dvec3 getColor () const
 
template<>
dvec4 getColor () const
 

Additional Inherited Members

- Public Types inherited from inviwo::ColorLineEdit
enum  ColorRepresentation { Integer, FloatingPoint, Hexadecimal }
 
- Protected Member Functions inherited from inviwo::ColorLineEdit
virtual void changeEvent (QEvent *event) override
 
virtual void focusInEvent (QFocusEvent *event) override
 
virtual void focusOutEvent (QFocusEvent *event) override
 
virtual void keyPressEvent (QKeyEvent *event) override
 

Detailed Description

widget in TF dialog for entering six digit HTML hex color codes

Member Function Documentation

◆ colorChanged

void inviwo::TFColorEdit::colorChanged ( const QColor &  color)
signal

signal when a new valid color hex code has been entered.

◆ setColor()

void inviwo::TFColorEdit::setColor ( const QColor &  color,
bool  ambiguous 
)

set the color value of the line edit, if the value is ambiguous nothing will be shown. Otherwise the rgb components of the color are shown as hexadecimal color code, e.g. "#f9a033".

Parameters
colorrgb components are converted into a hexadecimal color code
ambiguouswhether the color has a name or not

The documentation for this class was generated from the following files: