Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
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
 
bool isValid () const
 

Additional Inherited Members

- Public Types inherited from inviwo::ColorLineEdit
enum class  ColorRepresentation { Integer , FloatingPoint , Hexadecimal }
 
- Public Slots inherited from inviwo::ColorLineEdit
void setInvalid (bool invalid=true)
 
- 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 a "-" 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 file: