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
16
dbe::ValidatorAcceptMatch::validate
(QString& Input,
int
& Position)
const
17
{
18
Q_UNUSED(Position)
19
20
for
(
const
QString& Name :
List
) {
21
if
(Name.compare(Input) == 0) {
22
return
QValidator::Acceptable;
23
}
24
}
25
26
return
QValidator::Intermediate;
27
}
28
29
dbe::ValidatorAcceptNoMatch::ValidatorAcceptNoMatch
(QVariant& Storage, QObject* parent)
30
: QValidator(parent)
31
{
32
List
= Storage.toStringList();
33
}
34
35
QValidator::State
36
dbe::ValidatorAcceptNoMatch::validate
(QString& Input,
int
& Position)
const
37
{
38
Q_UNUSED(Position)
39
40
for
(
const
QString& Name :
List
) {
41
if
(Name.compare(Input) == 0) {
42
return
QValidator::Intermediate;
43
}
44
}
45
46
return
QValidator::Acceptable;
47
}
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:16
dbe::ValidatorAcceptNoMatch::List
QStringList List
Definition
Validator.hpp:32
dbe::ValidatorAcceptNoMatch::ValidatorAcceptNoMatch
ValidatorAcceptNoMatch(QVariant &Storage, QObject *parent=0)
Definition
Validator.cpp:29
dbe::ValidatorAcceptNoMatch::validate
QValidator::State validate(QString &Input, int &Position) const
Definition
Validator.cpp:36
Generated on
for DUNE-DAQ by
1.18.0