MCPcopy Create free account
hub / github.com/Kitware/ParaView / updateColorTransferFunction

Method updateColorTransferFunction

Qt/Components/pqDisplayColorWidget.cxx:733–756  ·  view source on GitHub ↗

-----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

731
732//-----------------------------------------------------------------------------
733void pqDisplayColorWidget::updateColorTransferFunction()
734{
735 if (!this->Representation)
736 {
737 return;
738 }
739
740 pqScalarsToColors* lut = this->Representation->getLookupTable(
741 this->Internals->ColorMapEditorHelper->GetSelectedPropertiesType());
742 if (this->ColorTransferFunction && this->ColorTransferFunction != lut)
743 {
744 this->disconnect(this->ColorTransferFunction);
745 this->ColorTransferFunction->disconnect(this);
746 this->ColorTransferFunction = nullptr;
747 }
748 if (lut)
749 {
750 this->ColorTransferFunction = lut;
751 this->setComponentNumber(
752 lut->getVectorMode() == pqScalarsToColors::MAGNITUDE ? -1 : lut->getVectorComponent());
753 QObject::connect(lut, &pqScalarsToColors::componentOrModeChanged, this,
754 &pqDisplayColorWidget::updateColorTransferFunction, Qt::UniqueConnection);
755 }
756}
757
758//-----------------------------------------------------------------------------
759int pqDisplayColorWidget::addOutOfDomainEntry(int association, const QString& arrayName)

Callers 3

setRepresentationMethod · 0.95

Calls 5

setComponentNumberMethod · 0.95
getLookupTableMethod · 0.80
disconnectMethod · 0.80
getVectorModeMethod · 0.80
getVectorComponentMethod · 0.80

Tested by

no test coverage detected