本文整理汇总了C++中datacontainerarray::Pointer::doesAttributeArrayExist方法的典型用法代码示例。如果您正苦于以下问题:C++ Pointer::doesAttributeArrayExist方法的具体用法?C++ Pointer::doesAttributeArrayExist怎么用?C++ Pointer::doesAttributeArrayExist使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类datacontainerarray::Pointer
的用法示例。
在下文中一共展示了Pointer::doesAttributeArrayExist方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: populateComboBoxes
// -----------------------------------------------------------------------------
//
// -----------------------------------------------------------------------------
void DataArraySelectionWidget::populateComboBoxes()
{
//qDebug() << "-----------------------------------------------";
//qDebug() << getFilter()->getHumanLabel() << " " << getFilterParameter()->getHumanLabel() << " DataArraySelectionWidget::populateComboBoxes()";
// Now get the DataContainerArray from the Filter instance
// We are going to use this to get all the current DataContainers
DataContainerArray::Pointer dca = getFilter()->getDataContainerArray();
if(NULL == dca.get()) { return; }
//qDebug() << getFilter()->getHumanLabel() << " " << getFilterParameter()->getHumanLabel();
// Grab what is currently selected
QString curDcName = dataContainerCombo->currentText();
QString curAmName = attributeMatrixCombo->currentText();
QString curDaName = attributeArrayCombo->currentText();
//qDebug() << "Current ComboBox Value: " << curDcName << "::" << curAmName << "::" << curDaName;
// Check to see if we have any DataContainers to actually populate drop downs with.
if(dca->getDataContainers().size() == 0)
{
dataContainerCombo->clear();
attributeMatrixCombo->clear();
attributeArrayCombo->clear();
return;
}
// Cache the DataContainerArray Structure for our use during all the selections
m_DcaProxy = DataContainerArrayProxy(dca.get());
// Populate the DataContainerArray Combo Box with all the DataContainers
QList<DataContainerProxy> dcList = m_DcaProxy.dataContainers.values();
QListIterator<DataContainerProxy> iter(dcList);
dataContainerCombo->clear();
while(iter.hasNext() )
{
DataContainerProxy dc = iter.next();
dataContainerCombo->addItem(dc.name);
// if(dataContainerCombo->findText(dc.name) == -1 )
// {
// int index = dataContainerCombo->currentIndex();
// dataContainerCombo->addItem(dc.name);
// dataContainerCombo->setCurrentIndex(index);
// }
}
// Get what is in the filter
DataArrayPath selectedPath = getFilter()->property(PROPERTY_NAME_AS_CHAR).value<DataArrayPath>();
// Split the path up to make sure we have a valid path separated by the "|" character
QString filtDcName = selectedPath.getDataContainerName();
QString filtAmName = selectedPath.getAttributeMatrixName();
QString filtDaName = selectedPath.getDataArrayName();
QString dcName;
QString amName;
QString daName;
// If EVERYTHING is empty, then try the default value
if(filtDcName.isEmpty() && filtAmName.isEmpty() && filtDaName.isEmpty()
&& curDcName.isEmpty() && curAmName.isEmpty() && curDaName.isEmpty() )
{
DataArrayPath daPath = getFilterParameter()->getDefaultValue().value<DataArrayPath>();
dcName = daPath.getDataContainerName();
amName = daPath.getAttributeMatrixName();
daName = daPath.getDataArrayName();
}
else
{
// Now to figure out which one of these to use. If this is the first time through then what we picked up from the
// gui will be empty strings because nothing is there. If there is something in the filter then we should use that.
// If there is something in both of them and they are NOT equal then we have a problem. Use the flag m_DidCausePreflight
// to determine if the change from the GUI should over ride the filter or vice versa. there is a potential that in future
// versions that something else is driving DREAM3D and pushing the changes to the filter and we need to reflect those
// changes in the GUI, like a testing script?
dcName = checkStringValues(curDcName, filtDcName);
if( !dca->doesDataContainerExist(dcName) ) { dcName = ""; }
amName = checkStringValues(curAmName, filtAmName);
if ( !dca->doesAttributeMatrixExist(DataArrayPath(dcName, amName, "") ) ) { amName = ""; }
daName = checkStringValues(curDaName, filtDaName);
if ( !dca->doesAttributeArrayExist(DataArrayPath(dcName, amName, daName) )) { daName = ""; }
}
bool didBlock = false;
if (!dataContainerCombo->signalsBlocked()) { didBlock = true; }
dataContainerCombo->blockSignals(true);
int dcIndex = dataContainerCombo->findText(dcName);
dataContainerCombo->setCurrentIndex(dcIndex);
populateAttributeMatrixList();
if(didBlock) { dataContainerCombo->blockSignals(false); didBlock = false; }
if(!attributeMatrixCombo->signalsBlocked()) { didBlock = true; }
attributeMatrixCombo->blockSignals(true);
int amIndex = -1;
if (dcIndex < 0)
{
attributeMatrixCombo->setCurrentIndex(-1);
//.........这里部分代码省略.........