void PlotEntitiesProperty::notifyAll() { Property::invalidate(); executeLinks(); // check if conditions are met and exec actions for (size_t j = 0; j < conditions_.size(); ++j) conditions_[j]->exec(); updateWidgets(); invalidateOwner(); }
void TransFuncProperty::set(TransFunc* tf) { //Normally this method is only called when the type of transfer function //changes. The plugins are working with a pointer and thus they only call //notifyChange() when the transfer function changes. // tf object already assigned if (tf == value_) { return; } fitToDomainPending_ = false; // new tf object assigned -> check if contents are equal TransFunc1DKeys* tf_int = dynamic_cast<TransFunc1DKeys*>(tf); TransFunc1DKeys* value_int = dynamic_cast<TransFunc1DKeys*>(value_); TransFunc2DPrimitives* tf_grad = dynamic_cast<TransFunc2DPrimitives*>(tf); TransFunc2DPrimitives* value_grad = dynamic_cast<TransFunc2DPrimitives*>(value_); // assign new object, but store previous one for deletion TransFunc* oldValue = value_; value_ = tf; // both transfer functions are of type TransFuncIntensity if (tf_int && value_int) { if (*tf_int == *value_int) { // keys are equal -> only inform widgets about new object updateWidgets(); } else { // the pointer is the same but keys are different -> notify change notifyChange(); } } // both transfer functions are of type TransFuncIntensityGradient else if (tf_grad && value_grad) { if (*tf_grad == *value_grad) { // primitives are equal ->only inform widgets about new object updateWidgets(); } else { // primitives are different -> notify change notifyChange(); } } // last case: tf type has changed -> additionally shaders may have to be recompiled else { invalidateOwner(Processor::INVALID_PROGRAM); notifyChange(); } // finally delete previously assigned object delete oldValue; }
void PlotPredicateProperty::notifyAll() { std::vector<std::pair<int, PlotPredicate*> > cpy = value_; // check if conditions are met and exec actions for (size_t j = 0; j < conditions_.size(); ++j) conditions_[j]->exec(); updateWidgets(); // invalidate owner: invalidateOwner(); }
void TransFuncProperty::notifyChange() { executeLinks(); // check if conditions are met and exec actions for (size_t j = 0; j < conditions_.size(); ++j) conditions_[j]->exec(); updateWidgets(); // invalidate owner: invalidateOwner(); }
void PlotDataProperty::notifyChange() { updateWidgets(); invalidateOwner(); }
void Property::invalidate() { invalidateOwner(); // notify widgets of updated values updateWidgets(); }
void Property::invalidateOwner() { invalidateOwner(invalidationLevel_); }
void StringExpressionProperty::itemWasSelected(const std::string& guiName) { invalidateOwner(); set(get() + guiName + ": " + getPlaceHolder(guiName) + "\n"); }