14 if (elements.isEmpty()) {
18 auto *firstElement = elements.constFirst();
19 auto *firstInput = qobject_cast<GraphicElementInput *>(firstElement);
34 for (
auto *elm : elements) {
35 const auto group = elm->elementGroup();
36 const auto firstGroup = firstElement->elementGroup();
54 c.
hasSameLabel &= (elm->label() == firstElement->label());
56 c.
hasSameFrequency &= qFuzzyCompare(elm->frequency(), firstElement->frequency());
57 c.
hasSameDelay &= qFuzzyCompare(elm->delay(), firstElement->delay());
62 if (
auto *elmInput = qobject_cast<GraphicElementInput *>(elm);
63 elmInput && (group == ElementGroup::Input) && (firstElement->elementGroup() == ElementGroup::Input)) {
65 c.
sameCheckState &= (elmInput->isLocked() == firstInput->isLocked());
69 c.
hasSameType &= (elm->elementType() == firstElement->elementType());
70 c.
hasSameAudio &= (elm->audio() == firstElement->audio());
71 c.
hasSameVolume &= qFuzzyCompare(elm->volume(), firstElement->volume());
75 if (elm->elementType() != ElementType::IC) {
85 bool sameElementGroup = (group == firstGroup);
86 sameElementGroup |= (group == ElementGroup::Input && firstGroup == ElementGroup::StaticInput);
87 sameElementGroup |= (group == ElementGroup::StaticInput && firstGroup == ElementGroup::Input);
89 c.
hasLatchedValue &= (group == ElementGroup::Input) && (elm->elementType() != ElementType::InputButton);