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 <modules/qtwidgets/tf/tfcoloredit.h>

+ Inheritance diagram for inviwo::TFColorEdit:

Signals

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

Public Member Functions

void setColor (std::optional< QColor > color, bool ambiguous)
 
virtual QSize sizeHint () const override
 
 TFColorEdit (QWidget *parent=nullptr)
 
- Public Member Functions inherited from inviwo::ColorLineEdit
 ColorLineEdit (QWidget *parent=nullptr)
 
template<typename T >
T getColor () const
 
dvec4 getColor () const
 
ColorRepresentation getRepresentation () const
 
bool hasAlpha () const
 
bool isValid () const
 
void setColor (dvec3 v, ColorRepresentation rep=ColorRepresentation::FloatingPoint)
 
void setColor (dvec4 v, ColorRepresentation rep=ColorRepresentation::FloatingPoint)
 
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 setRepresentation (ColorRepresentation rep)
 

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 ( std::optional< QColor > color,
bool ambiguous )

set the color value of the line edit, if the value is ambiguous or empty 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
ambiguousaffects whether the widget is enabled or not. The widget will be disabled if color has no value and ambiguous is false.

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