3 #include "PointTypeFilter.h"
15 PointTypeFilter::PointTypeFilter(AbstractFilter::FilterEffectivenessFlag flag,
16 int minimumForSuccess) :
17 AbstractMultipleChoiceFilter(flag, minimumForSuccess) {
19 options <<
"Fixed" <<
"Constrained" <<
"Free";
20 createWidget(options);
24 PointTypeFilter::PointTypeFilter(
const PointTypeFilter &other)
25 : AbstractMultipleChoiceFilter(other) {
29 PointTypeFilter::~PointTypeFilter() {
33 bool PointTypeFilter::evaluate(
const ControlCubeGraphNode *node)
const {
34 return evaluateImageFromPointFilter(node);
38 bool PointTypeFilter::evaluate(
const ControlPoint *point)
const {
39 return ((QString) point->GetPointTypeString() == getCurrentChoice()) ^
44 bool PointTypeFilter::evaluate(
const ControlMeasure *)
const {
49 AbstractFilter *PointTypeFilter::clone()
const {
50 return new PointTypeFilter(*
this);
54 QString PointTypeFilter::getImageDescription()
const {
55 QString description = AbstractFilter::getImageDescription() +
"point";
57 if (getMinForSuccess() != 1)
62 description +=
"that ";
64 if (getMinForSuccess() == 1)
67 description +=
"are ";
70 description +=
"not ";
72 description +=
" of type " + getCurrentChoice();
78 QString PointTypeFilter::getPointDescription()
const {
79 QString description =
"are ";
82 description +=
"not ";
84 description +=
"of type " + getCurrentChoice();