9#include "ChooserNameFilter.h"
14#include "ControlMeasure.h"
15#include "ControlNet.h"
16#include "ControlPoint.h"
21 ChooserNameFilter::ChooserNameFilter(
22 AbstractFilter::FilterEffectivenessFlag flag,
23 int minimumForSuccess) : AbstractStringFilter(flag, minimumForSuccess) {
27 ChooserNameFilter::ChooserNameFilter(
const ChooserNameFilter &other)
28 : AbstractStringFilter(other) {
32 ChooserNameFilter::~ChooserNameFilter() {
36 bool ChooserNameFilter::evaluate(
const QPair<QString, ControlNet *> *imageAndNet)
const {
37 return evaluateImageFromPointFilter(imageAndNet);
41 bool ChooserNameFilter::evaluate(
const ControlPoint *point)
const {
42 return AbstractStringFilter::evaluate((QString) point->GetChooserName());
46 bool ChooserNameFilter::evaluate(
const ControlMeasure *)
const {
51 AbstractFilter *ChooserNameFilter::clone()
const {
52 return new ChooserNameFilter(*
this);
56 QString ChooserNameFilter::getImageDescription()
const {
57 QString description = AbstractFilter::getImageDescription();
59 if (getMinForSuccess() == 1)
60 description +=
"point with it's chooser name ";
62 description +=
"points with chooser names ";
64 description += descriptionSuffix();
69 QString ChooserNameFilter::getPointDescription()
const {
70 return "have chooser names " + descriptionSuffix();
This is free and unencumbered software released into the public domain.