DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
dbe
src
internal
Validator.cpp
Go to the documentation of this file.
1
// DUNE DAQ modification notice:
2
// This file has been modified from the original ATLAS dbe source for the DUNE DAQ project.
3
// Fork baseline commit: dbe-02-12-17 (2022-05-12).
4
// Renamed since fork: no.
5
7
#include "
dbe/Validator.hpp
"
8
9
dbe::ValidatorAcceptMatch::ValidatorAcceptMatch
( QVariant & Storage, QObject * parent )
10
: QValidator ( parent )
11
{
12
List
= Storage.toStringList();
13
}
14
15
QValidator::State
dbe::ValidatorAcceptMatch::validate
( QString & Input,
16
int
& Position )
const
17
{
18
Q_UNUSED ( Position )
19
20
for
(
const
QString & Name :
List
)
21
{
22
if
( Name.compare ( Input ) == 0 )
23
{
24
return
QValidator::Acceptable;
25
}
26
}
27
28
return
QValidator::Intermediate;
29
}
30
31
dbe::ValidatorAcceptNoMatch::ValidatorAcceptNoMatch
( QVariant & Storage, QObject * parent )
32
: QValidator ( parent )
33
{
34
List
= Storage.toStringList();
35
}
36
37
QValidator::State
dbe::ValidatorAcceptNoMatch::validate
( QString & Input,
38
int
& Position )
const
39
{
40
Q_UNUSED ( Position )
41
42
for
(
const
QString & Name :
List
)
43
{
44
if
( Name.compare ( Input ) == 0 )
45
{
46
return
QValidator::Intermediate;
47
}
48
}
49
50
return
QValidator::Acceptable;
51
}
Validator.hpp
dbe::ValidatorAcceptMatch::List
QStringList List
Definition
Validator.hpp:21
dbe::ValidatorAcceptMatch::ValidatorAcceptMatch
ValidatorAcceptMatch(QVariant &Storage, QObject *parent=0)
Including DBE.
Definition
Validator.cpp:9
dbe::ValidatorAcceptMatch::validate
QValidator::State validate(QString &Input, int &Position) const
Definition
Validator.cpp:15
dbe::ValidatorAcceptNoMatch::List
QStringList List
Definition
Validator.hpp:31
dbe::ValidatorAcceptNoMatch::ValidatorAcceptNoMatch
ValidatorAcceptNoMatch(QVariant &Storage, QObject *parent=0)
Definition
Validator.cpp:31
dbe::ValidatorAcceptNoMatch::validate
QValidator::State validate(QString &Input, int &Position) const
Definition
Validator.cpp:37
Generated on
for DUNE-DAQ by
1.17.0