3 #include "ChooserNameFilter.h"
15 ChooserNameFilter::ChooserNameFilter(
16 AbstractFilter::FilterEffectivenessFlag flag,
17 int minimumForSuccess) : AbstractStringFilter(flag, minimumForSuccess) {
21 ChooserNameFilter::ChooserNameFilter(
const ChooserNameFilter &other)
22 : AbstractStringFilter(other) {
26 ChooserNameFilter::~ChooserNameFilter() {
30 bool ChooserNameFilter::evaluate(
const ControlCubeGraphNode *node)
const {
31 return evaluateImageFromPointFilter(node);
35 bool ChooserNameFilter::evaluate(
const ControlPoint *point)
const {
36 return AbstractStringFilter::evaluate((QString) point->GetChooserName());
40 bool ChooserNameFilter::evaluate(
const ControlMeasure *)
const {
45 AbstractFilter *ChooserNameFilter::clone()
const {
46 return new ChooserNameFilter(*
this);
50 QString ChooserNameFilter::getImageDescription()
const {
51 QString description = AbstractFilter::getImageDescription();
53 if (getMinForSuccess() == 1)
54 description +=
"point with it's chooser name ";
56 description +=
"points with chooser names ";
58 description += descriptionSuffix();
63 QString ChooserNameFilter::getPointDescription()
const {
64 return "have chooser names " + descriptionSuffix();