BPS C++ API  2.24.4
bpsmaskprocessor.h
Go to the documentation of this file.
1 
4 #ifndef BPSMASKPROCESSOR_H
5 #define BPSMASKPROCESSOR_H
6 
7 #include "bpscore_global.h"
8 #include <QString>
9 
69 {
71 
72 public:
77 
81  BpsMaskProcessor(const QString& aMask);
82 
83  virtual ~BpsMaskProcessor();
84 
91  bool validate(QString& aInput, int& aPos) const;
92 
99  QString fixup(const QString& aInput) const;
100 
104  QString mask() const;
105 
110  void setMask(const QString& aMask);
111 
115  int maxLength() const;
116 
120  int minLength() const;
121 };
122 
123 #endif // BPSMASKPROCESSOR_H
Public include file for BPS CORE library macros.
#define BPSCORE_EXPORT
Declare class to be an import from the shared library.
Definition: bpscore_global.h:22
#define BPS_PRIVATE(Class)
Declare pointer to private object in a public class.
Definition: bpsglobals.h:102
This class implements the BPS mask validator for input text.
Definition: bpsmaskprocessor.h:69
bool validate(QString &aInput, int &aPos) const
Validate input and remove invalid inputs.
int minLength() const
Returns the minimum input length (including fillers)
BpsMaskProcessor()
Default constructor.
QString fixup(const QString &aInput) const
Fix up the input if possible.
BpsMaskProcessor(const QString &aMask)
void setMask(const QString &aMask)
Set the new mask.
int maxLength() const
Returns the maximum input length (including fillers)
QString mask() const