VivoQuant 6.3.0
Loading...
Searching...
No Matches
BrainAtlasNameValidator Class Reference

Validator for custom brain atlas name prefixes. More...

#include <BrainAtlasNaming.h>

Public Member Functions

 BrainAtlasNameValidator (QObject *parent=nullptr)
 Constructs the validator.
 
State validate (string &input, int &pos) override
 Validates the current input.
 

Detailed Description

Validator for custom brain atlas name prefixes.

Restricts user input to the character set supported by BrainAtlasNaming::prefixPattern().

Valid characters are:

  • letters (A-Z, a-z)
  • digits (0-9)
  • underscore (_)
  • hyphen (-)
  • period (.)

This ensures atlas names generated by the atlas creation wizard can later be discovered and parsed correctly.

Constructor & Destructor Documentation

◆ BrainAtlasNameValidator()

BrainAtlasNameValidator ( QObject *  parent = nullptr)
inlineexplicit

Constructs the validator.

Parameters
parentParent QObject.

Member Function Documentation

◆ validate()

State validate ( string &  input,
int &  pos 
)
override

Validates the current input.

Empty input is considered Intermediate so the user may continue typing.

Parameters
inputText being validated.
posCursor position (unused).
Returns
Acceptable if the name contains only supported characters, Intermediate if empty, Invalid otherwise.