HAL
hal::HexadecimalValidator Class Reference

#include <hexadecimal_validator.h>

Inheritance diagram for hal::HexadecimalValidator:
Inheritance graph
Collaboration diagram for hal::HexadecimalValidator:
Collaboration graph

Public Member Functions

 HexadecimalValidator ()
 
bool validate (const QString &input)
 
- Public Member Functions inherited from hal::Validator
void setFailText (const QString &text)
 
QString failText () const
 

Additional Inherited Members

- Protected Attributes inherited from hal::Validator
QString mFailText = "Chosen input is not allowed."
 

Detailed Description

The HexadecimalValidator class checks if a string is in a valid hexadecimal format (uses symbols 0-9, a-f). Its validate function returns true if that is the case.

Definition at line 37 of file hexadecimal_validator.h.

Constructor & Destructor Documentation

◆ HexadecimalValidator()

hal::HexadecimalValidator::HexadecimalValidator ( )

Member Function Documentation

◆ validate()

bool hal::HexadecimalValidator::validate ( const QString input)
virtual

Given any string this function returns true if the string is in the hexadecimal format (0-9, a-f). The matches are case insensitive.

Parameters
input- The input string
Returns
true if the string is considered valid.

Implements hal::Validator.

Definition at line 12 of file hexadecimal_validator.cpp.

References hal::input, and QRegularExpressionValidator::validate().


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