Open 3D Engine AzQtComponents API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AzQtComponents::ColorValidator Class Referenceabstract

#include <ColorValidator.h>

Inherits QObject.

Inherited by AzQtComponents::HueSaturationValidator, AzQtComponents::RGBALowRangeValidator, and AzQtComponents::RGBColorValidator.

Signals

void colorWarning (const QString &message)
 
void colorAccepted ()
 

Public Member Functions

 ColorValidator (QObject *parent=nullptr)
 
virtual bool isValid (const Internal::ColorController *controller)=0
 Returns true if the input color is valid, false otherwise. False will trigger adjust to be called.
 
virtual void adjust (Internal::ColorController *controller)=0
 Returns color adjusted to something acceptable.
 
virtual void warn ()=0
 Must emit colorWarning when called.
 
void acceptColor ()
 Emits the colorAccepted signal.
 

Detailed Description

Abstract base class for validating and adjusting colors, and providing warnings. Used by the color picker to validate

Member Function Documentation

◆ adjust()

virtual void AzQtComponents::ColorValidator::adjust ( Internal::ColorController *  controller)
pure virtual

Returns color adjusted to something acceptable.

Implemented in AzQtComponents::RGBColorValidator, AzQtComponents::RGBALowRangeValidator, and AzQtComponents::HueSaturationValidator.

◆ isValid()

virtual bool AzQtComponents::ColorValidator::isValid ( const Internal::ColorController *  controller)
pure virtual

Returns true if the input color is valid, false otherwise. False will trigger adjust to be called.

Implemented in AzQtComponents::RGBColorValidator, AzQtComponents::RGBALowRangeValidator, and AzQtComponents::HueSaturationValidator.

◆ warn()

virtual void AzQtComponents::ColorValidator::warn ( )
pure virtual

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