From 17ee25d0b245afa71ae947e47fe4d8989c07444b Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Fri, 15 Jun 2018 14:22:03 +0200 Subject: [PATCH] AppFwk : Rename to uiField() and setUiField() --- .../RicSummaryCurveCreatorSplitterUi.cpp | 2 +- .../RiuSummaryCurveDefSelectionEditor.cpp | 2 +- .../cafPdmUiFieldEditorHandle.cpp | 12 ++++----- .../cafPdmUiCore/cafPdmUiFieldEditorHandle.h | 4 +-- .../cafPdmUiCheckBoxEditor.cpp | 16 ++++++------ .../cafPdmUiCheckBoxTristateEditor.cpp | 6 ++--- .../cafUserInterface/cafPdmUiColorEditor.cpp | 6 ++--- .../cafPdmUiComboBoxEditor.cpp | 12 ++++----- .../cafUserInterface/cafPdmUiDateEditor.cpp | 8 +++--- .../cafPdmUiDoubleSliderEditor.cpp | 12 ++++----- .../cafPdmUiDoubleValueEditor.cpp | 10 +++---- .../cafPdmUiFilePathEditor.cpp | 10 +++---- .../cafUserInterface/cafPdmUiLineEditor.cpp | 26 +++++++++---------- .../cafUserInterface/cafPdmUiListEditor.cpp | 22 ++++++++-------- .../cafPdmUiPushButtonEditor.cpp | 14 +++++----- .../cafUserInterface/cafPdmUiSliderEditor.cpp | 14 +++++----- .../cafUserInterface/cafPdmUiTableView.cpp | 4 +-- .../cafPdmUiTableViewEditor.cpp | 4 +-- .../cafPdmUiTableViewQModel.cpp | 8 +++--- .../cafUserInterface/cafPdmUiTextEditor.cpp | 12 ++++----- .../cafPdmUiToolBarEditor.cpp | 2 +- .../cafPdmUiToolButtonEditor.cpp | 16 ++++++------ .../cafPdmUiTreeSelectionEditor.cpp | 8 +++--- .../cafPdmUiTreeSelectionQModel.cpp | 18 ++++++------- .../cafPdmUiWidgetBasedObjectEditor.cpp | 6 ++--- 25 files changed, 127 insertions(+), 127 deletions(-) diff --git a/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreatorSplitterUi.cpp b/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreatorSplitterUi.cpp index 3d40631e56..45d936b75b 100644 --- a/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreatorSplitterUi.cpp +++ b/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreatorSplitterUi.cpp @@ -242,7 +242,7 @@ void RicSummaryCurveCreatorSplitterUi::configureAndUpdateFields(int widgetStartI if (fieldEditor) { - fieldEditor->setField(field); + fieldEditor->setUiField(field); // Place the widget(s) into the correct parent and layout QWidget* fieldCombinedWidget = fieldEditor->combinedWidget(); diff --git a/ApplicationCode/UserInterface/RiuSummaryCurveDefSelectionEditor.cpp b/ApplicationCode/UserInterface/RiuSummaryCurveDefSelectionEditor.cpp index 9e9099412a..2df7d80ba4 100644 --- a/ApplicationCode/UserInterface/RiuSummaryCurveDefSelectionEditor.cpp +++ b/ApplicationCode/UserInterface/RiuSummaryCurveDefSelectionEditor.cpp @@ -158,7 +158,7 @@ void RiuSummaryCurveDefSelectionEditor::configureAndUpdateFields(int widgetStart if (fieldEditor) { - fieldEditor->setField(field); + fieldEditor->setUiField(field); // Place the widget(s) into the correct parent and layout QWidget* fieldCombinedWidget = fieldEditor->combinedWidget(); diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiFieldEditorHandle.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiFieldEditorHandle.cpp index 4b59b47cc8..5cf18eedbc 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiFieldEditorHandle.cpp +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiFieldEditorHandle.cpp @@ -74,7 +74,7 @@ PdmUiFieldEditorHandle::~PdmUiFieldEditorHandle() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void PdmUiFieldEditorHandle::setField(PdmUiFieldHandle * field) +void PdmUiFieldEditorHandle::setUiField(PdmUiFieldHandle * field) { this->bindToPdmItem(field); @@ -94,7 +94,7 @@ void PdmUiFieldEditorHandle::setField(PdmUiFieldHandle * field) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -PdmUiFieldHandle* PdmUiFieldEditorHandle::field() +PdmUiFieldHandle* PdmUiFieldEditorHandle::uiField() { return dynamic_cast(pdmItem()); } @@ -119,7 +119,7 @@ void PdmUiFieldEditorHandle::createWidgets(QWidget * parent) //-------------------------------------------------------------------------------------------------- void PdmUiFieldEditorHandle::setValueToField(const QVariant& newUiValue) { - PdmUiCommandSystemProxy::instance()->setUiValueToField(field(), newUiValue); + PdmUiCommandSystemProxy::instance()->setUiValueToField(uiField(), newUiValue); } //-------------------------------------------------------------------------------------------------- @@ -154,9 +154,9 @@ void PdmUiFieldEditorHandle::updateLabelFromField(QLabel* label, const QString& void PdmUiFieldEditorHandle::customMenuRequested(QPoint pos) { PdmObjectHandle* objectHandle = nullptr; - if (field() && field()->fieldHandle()) + if (uiField() && uiField()->fieldHandle()) { - objectHandle = field()->fieldHandle()->ownerObject(); + objectHandle = uiField()->fieldHandle()->ownerObject(); } if (!objectHandle) @@ -182,7 +182,7 @@ void PdmUiFieldEditorHandle::customMenuRequested(QPoint pos) } QMenu menu; - objectHandle->uiCapability()->defineCustomContextMenu(field()->fieldHandle(), &menu, widget); + objectHandle->uiCapability()->defineCustomContextMenu(uiField()->fieldHandle(), &menu, widget); if (!menu.actions().empty()) { diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiFieldEditorHandle.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiFieldEditorHandle.h index d5fbe283c6..8b1b33c892 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiFieldEditorHandle.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiFieldEditorHandle.h @@ -103,8 +103,8 @@ public: PdmUiFieldEditorHandle(); ~PdmUiFieldEditorHandle(); - PdmUiFieldHandle* field(); - void setField(PdmUiFieldHandle * field); + PdmUiFieldHandle* uiField(); + void setUiField(PdmUiFieldHandle* uiFieldHandle); void createWidgets(QWidget * parent); QWidget* combinedWidget() { return m_combinedWidget; } diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiCheckBoxEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiCheckBoxEditor.cpp index 3db9a7ac74..16ce86c552 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiCheckBoxEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiCheckBoxEditor.cpp @@ -63,28 +63,28 @@ void PdmUiCheckBoxEditor::configureAndUpdateUi(const QString& uiConfigName) CAF_ASSERT(!m_label.isNull()); PdmUiCheckBoxEditorAttribute attributes; - caf::PdmUiObjectHandle* uiObject = uiObj(field()->fieldHandle()->ownerObject()); + caf::PdmUiObjectHandle* uiObject = uiObj(uiField()->fieldHandle()->ownerObject()); if (uiObject) { - uiObject->editorAttribute(field()->fieldHandle(), uiConfigName, &attributes); + uiObject->editorAttribute(uiField()->fieldHandle(), uiConfigName, &attributes); } if (attributes.m_useNativeCheckBoxLabel) { - m_checkBox->setText(field()->uiName(uiConfigName)); + m_checkBox->setText(uiField()->uiName(uiConfigName)); - m_label->setEnabled(!field()->isUiReadOnly(uiConfigName)); - m_label->setToolTip(field()->uiToolTip(uiConfigName)); + m_label->setEnabled(!uiField()->isUiReadOnly(uiConfigName)); + m_label->setToolTip(uiField()->uiToolTip(uiConfigName)); } else { PdmUiFieldEditorHandle::updateLabelFromField(m_label, uiConfigName); } - m_checkBox->setEnabled(!field()->isUiReadOnly(uiConfigName)); - m_checkBox->setToolTip(field()->uiToolTip(uiConfigName)); + m_checkBox->setEnabled(!uiField()->isUiReadOnly(uiConfigName)); + m_checkBox->setToolTip(uiField()->uiToolTip(uiConfigName)); - m_checkBox->setChecked(field()->uiValue().toBool()); + m_checkBox->setChecked(uiField()->uiValue().toBool()); } diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiCheckBoxTristateEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiCheckBoxTristateEditor.cpp index 5a4c898451..428f461646 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiCheckBoxTristateEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiCheckBoxTristateEditor.cpp @@ -30,10 +30,10 @@ void PdmUiCheckBoxTristateEditor::configureAndUpdateUi(const QString& uiConfigNa PdmUiFieldEditorHandle::updateLabelFromField(m_label, uiConfigName); - m_checkBox->setEnabled(!field()->isUiReadOnly(uiConfigName)); - m_checkBox->setToolTip(field()->uiToolTip(uiConfigName)); + m_checkBox->setEnabled(!uiField()->isUiReadOnly(uiConfigName)); + m_checkBox->setToolTip(uiField()->uiToolTip(uiConfigName)); - Tristate state = field()->uiValue().value(); + Tristate state = uiField()->uiValue().value(); if (state == Tristate::State::True) { diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiColorEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiColorEditor.cpp index f55319deca..762bf151d2 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiColorEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiColorEditor.cpp @@ -76,13 +76,13 @@ void PdmUiColorEditor::configureAndUpdateUi(const QString& uiConfigName) PdmUiFieldEditorHandle::updateLabelFromField(m_label, uiConfigName); - caf::PdmUiObjectHandle* uiObject = uiObj(field()->fieldHandle()->ownerObject()); + caf::PdmUiObjectHandle* uiObject = uiObj(uiField()->fieldHandle()->ownerObject()); if (uiObject) { - uiObject->editorAttribute(field()->fieldHandle(), uiConfigName, &m_attributes); + uiObject->editorAttribute(uiField()->fieldHandle(), uiConfigName, &m_attributes); } - QColor col = field()->uiValue().value(); + QColor col = uiField()->uiValue().value(); setColor(col); } diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiComboBoxEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiComboBoxEditor.cpp index ad4fc49ace..d45729b684 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiComboBoxEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiComboBoxEditor.cpp @@ -66,18 +66,18 @@ void PdmUiComboBoxEditor::configureAndUpdateUi(const QString& uiConfigName) // Handle attributes PdmUiComboBoxEditorAttribute attributes; - caf::PdmUiObjectHandle* uiObject = uiObj(field()->fieldHandle()->ownerObject()); + caf::PdmUiObjectHandle* uiObject = uiObj(uiField()->fieldHandle()->ownerObject()); if (uiObject) { - uiObject->editorAttribute(field()->fieldHandle(), uiConfigName, &attributes); + uiObject->editorAttribute(uiField()->fieldHandle(), uiConfigName, &attributes); } if (!m_comboBox.isNull()) { - m_comboBox->setEnabled(!field()->isUiReadOnly(uiConfigName)); + m_comboBox->setEnabled(!uiField()->isUiReadOnly(uiConfigName)); bool fromMenuOnly = true; - QList options = field()->valueOptions(&fromMenuOnly); + QList options = uiField()->valueOptions(&fromMenuOnly); CAF_ASSERT(fromMenuOnly); // Not supported m_comboBox->blockSignals(true); @@ -88,11 +88,11 @@ void PdmUiComboBoxEditor::configureAndUpdateUi(const QString& uiConfigName) { m_comboBox->addItem(options[i].icon(), options[i].optionUiText()); } - m_comboBox->setCurrentIndex(field()->uiValue().toInt()); + m_comboBox->setCurrentIndex(uiField()->uiValue().toInt()); } else { - m_comboBox->addItem(field()->uiValue().toString()); + m_comboBox->addItem(uiField()->uiValue().toString()); m_comboBox->setCurrentIndex(0); } diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiDateEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiDateEditor.cpp index e7489a265f..1684341c47 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiDateEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiDateEditor.cpp @@ -73,12 +73,12 @@ void PdmUiDateEditor::configureAndUpdateUi(const QString& uiConfigName) PdmUiFieldEditorHandle::updateLabelFromField(m_label, uiConfigName); - m_dateEdit->setEnabled(!field()->isUiReadOnly(uiConfigName)); + m_dateEdit->setEnabled(!uiField()->isUiReadOnly(uiConfigName)); - caf::PdmUiObjectHandle* uiObject = uiObj(field()->fieldHandle()->ownerObject()); + caf::PdmUiObjectHandle* uiObject = uiObj(uiField()->fieldHandle()->ownerObject()); if (uiObject) { - uiObject->editorAttribute(field()->fieldHandle(), uiConfigName, &m_attributes); + uiObject->editorAttribute(uiField()->fieldHandle(), uiConfigName, &m_attributes); } if (!m_attributes.dateFormat.isEmpty()) @@ -86,7 +86,7 @@ void PdmUiDateEditor::configureAndUpdateUi(const QString& uiConfigName) m_dateEdit->setDisplayFormat(m_attributes.dateFormat); } - m_dateEdit->setDate(field()->uiValue().toDate()); + m_dateEdit->setDate(uiField()->uiValue().toDate()); } diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiDoubleSliderEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiDoubleSliderEditor.cpp index 92a06dc0bd..3a37e62347 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiDoubleSliderEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiDoubleSliderEditor.cpp @@ -90,17 +90,17 @@ void PdmUiDoubleSliderEditor::configureAndUpdateUi(const QString& uiConfigName) PdmUiFieldEditorHandle::updateLabelFromField(m_label, uiConfigName); - m_lineEdit->setEnabled(!field()->isUiReadOnly(uiConfigName)); - m_slider->setEnabled(!field()->isUiReadOnly(uiConfigName)); + m_lineEdit->setEnabled(!uiField()->isUiReadOnly(uiConfigName)); + m_slider->setEnabled(!uiField()->isUiReadOnly(uiConfigName)); - caf::PdmUiObjectHandle* uiObject = uiObj(field()->fieldHandle()->ownerObject()); + caf::PdmUiObjectHandle* uiObject = uiObj(uiField()->fieldHandle()->ownerObject()); if (uiObject) { - uiObject->editorAttribute(field()->fieldHandle(), uiConfigName, &m_attributes); + uiObject->editorAttribute(uiField()->fieldHandle(), uiConfigName, &m_attributes); } - double doubleValue = field()->uiValue().toDouble(); - QString textValue = field()->uiValue().toString(); + double doubleValue = uiField()->uiValue().toDouble(); + QString textValue = uiField()->uiValue().toString(); m_slider->blockSignals(true); m_slider->setMaximum(m_attributes.m_sliderTickCount); diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiDoubleValueEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiDoubleValueEditor.cpp index 0ef047576e..d6c3ff589a 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiDoubleValueEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiDoubleValueEditor.cpp @@ -71,16 +71,16 @@ void PdmUiDoubleValueEditor::configureAndUpdateUi(const QString& uiConfigName) PdmUiFieldEditorHandle::updateLabelFromField(m_label, uiConfigName); - m_lineEdit->setEnabled(!field()->isUiReadOnly(uiConfigName)); + m_lineEdit->setEnabled(!uiField()->isUiReadOnly(uiConfigName)); - caf::PdmUiObjectHandle* uiObject = uiObj(field()->fieldHandle()->ownerObject()); + caf::PdmUiObjectHandle* uiObject = uiObj(uiField()->fieldHandle()->ownerObject()); if (uiObject) { - uiObject->editorAttribute(field()->fieldHandle(), uiConfigName, &m_attributes); + uiObject->editorAttribute(uiField()->fieldHandle(), uiConfigName, &m_attributes); } bool valueOk = false; - double value = field()->uiValue().toDouble(&valueOk); + double value = uiField()->uiValue().toDouble(&valueOk); QString textValue; if (valueOk) { @@ -88,7 +88,7 @@ void PdmUiDoubleValueEditor::configureAndUpdateUi(const QString& uiConfigName) } else { - textValue = field()->uiValue().toString(); + textValue = uiField()->uiValue().toString(); } m_lineEdit->setText(textValue); diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiFilePathEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiFilePathEditor.cpp index 57c44b1e42..49c5ddd022 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiFilePathEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiFilePathEditor.cpp @@ -67,16 +67,16 @@ void PdmUiFilePathEditor::configureAndUpdateUi(const QString& uiConfigName) PdmUiFieldEditorHandle::updateLabelFromField(m_label, uiConfigName); - m_lineEdit->setEnabled(!field()->isUiReadOnly(uiConfigName)); - m_lineEdit->setToolTip(field()->uiToolTip(uiConfigName)); + m_lineEdit->setEnabled(!uiField()->isUiReadOnly(uiConfigName)); + m_lineEdit->setToolTip(uiField()->uiToolTip(uiConfigName)); - caf::PdmUiObjectHandle* uiObject = uiObj(field()->fieldHandle()->ownerObject()); + caf::PdmUiObjectHandle* uiObject = uiObj(uiField()->fieldHandle()->ownerObject()); if (uiObject) { - uiObject->editorAttribute(field()->fieldHandle(), uiConfigName, &m_attributes); + uiObject->editorAttribute(uiField()->fieldHandle(), uiConfigName, &m_attributes); } - m_lineEdit->setText(field()->uiValue().toString()); + m_lineEdit->setText(uiField()->uiValue().toString()); if (m_attributes.m_appendUiSelectedFolderToText) { diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiLineEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiLineEditor.cpp index dcea9d4c1e..ecad77a3c1 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiLineEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiLineEditor.cpp @@ -166,7 +166,7 @@ void PdmUiLineEditor::configureAndUpdateUi(const QString& uiConfigName) if (!m_lineEdit.isNull()) { - bool isReadOnly = field()->isUiReadOnly(uiConfigName); + bool isReadOnly = uiField()->isUiReadOnly(uiConfigName); if (isReadOnly) { m_lineEdit->setReadOnly(true); @@ -181,14 +181,14 @@ void PdmUiLineEditor::configureAndUpdateUi(const QString& uiConfigName) m_lineEdit->setStyleSheet(""); } - m_lineEdit->setToolTip(field()->uiToolTip(uiConfigName)); + m_lineEdit->setToolTip(uiField()->uiToolTip(uiConfigName)); { PdmUiLineEditorAttribute leab; - caf::PdmUiObjectHandle* uiObject = uiObj(field()->fieldHandle()->ownerObject()); + caf::PdmUiObjectHandle* uiObject = uiObj(uiField()->fieldHandle()->ownerObject()); if (uiObject) { - uiObject->editorAttribute(field()->fieldHandle(), uiConfigName, &leab); + uiObject->editorAttribute(uiField()->fieldHandle(), uiConfigName, &leab); } if (leab.useRangeValidator) @@ -199,30 +199,30 @@ void PdmUiLineEditor::configureAndUpdateUi(const QString& uiConfigName) { PdmUiLineEditorAttributeUniqueValues leab; - caf::PdmUiObjectHandle* uiObject = uiObj(field()->fieldHandle()->ownerObject()); + caf::PdmUiObjectHandle* uiObject = uiObj(uiField()->fieldHandle()->ownerObject()); if (uiObject) { - uiObject->editorAttribute(field()->fieldHandle(), uiConfigName, &leab); + uiObject->editorAttribute(uiField()->fieldHandle(), uiConfigName, &leab); } if (leab.usedIds.size() > 0) { - if (isMultipleFieldsWithSameKeywordSelected(field()->fieldHandle())) + if (isMultipleFieldsWithSameKeywordSelected(uiField()->fieldHandle())) { QMessageBox::information(nullptr, "Invalid operation", "The field you are manipulating is defined to have unique values. A selection of multiple fields is detected. Please select a single item."); } - m_lineEdit->setValidator(new PdmUniqueIdValidator(leab.usedIds, isMultipleFieldsWithSameKeywordSelected(field()->fieldHandle()), leab.errorMessage, this)); + m_lineEdit->setValidator(new PdmUniqueIdValidator(leab.usedIds, isMultipleFieldsWithSameKeywordSelected(uiField()->fieldHandle()), leab.errorMessage, this)); } } bool fromMenuOnly = true; - QList enumNames = field()->valueOptions(&fromMenuOnly); + QList enumNames = uiField()->valueOptions(&fromMenuOnly); CAF_ASSERT(fromMenuOnly); // Not supported if (!enumNames.isEmpty() && fromMenuOnly == true) { - int enumValue = field()->uiValue().toInt(); + int enumValue = uiField()->uiValue().toInt(); if (enumValue < enumNames.size() && enumValue > -1) { @@ -232,16 +232,16 @@ void PdmUiLineEditor::configureAndUpdateUi(const QString& uiConfigName) else { PdmUiLineEditorAttributeUiDisplayString leab; - caf::PdmUiObjectHandle* uiObject = uiObj(field()->fieldHandle()->ownerObject()); + caf::PdmUiObjectHandle* uiObject = uiObj(uiField()->fieldHandle()->ownerObject()); if (uiObject) { - uiObject->editorAttribute(field()->fieldHandle(), uiConfigName, &leab); + uiObject->editorAttribute(uiField()->fieldHandle(), uiConfigName, &leab); } QString displayString; if (leab.m_displayString.isEmpty()) { - displayString = field()->uiValue().toString(); + displayString = uiField()->uiValue().toString(); } else { diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiListEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiListEditor.cpp index b5a344840a..32d1326898 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiListEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiListEditor.cpp @@ -164,13 +164,13 @@ void PdmUiListEditor::configureAndUpdateUi(const QString& uiConfigName) PdmUiFieldEditorHandle::updateLabelFromField(m_label, uiConfigName); - m_listView->setEnabled(!field()->isUiReadOnly(uiConfigName)); - m_listView->setToolTip(field()->uiToolTip(uiConfigName)); + m_listView->setEnabled(!uiField()->isUiReadOnly(uiConfigName)); + m_listView->setToolTip(uiField()->uiToolTip(uiConfigName)); bool optionsOnly = true; - QList options = field()->valueOptions(&optionsOnly); + QList options = uiField()->valueOptions(&optionsOnly); m_optionItemCount = options.size(); - if (options.size() > 0 || field()->isUiReadOnly(uiConfigName)) + if (options.size() > 0 || uiField()->isUiReadOnly(uiConfigName)) { m_isEditOperationsAvailable = false; } @@ -180,10 +180,10 @@ void PdmUiListEditor::configureAndUpdateUi(const QString& uiConfigName) } PdmUiListEditorAttribute attributes; - caf::PdmUiObjectHandle* uiObject = uiObj(field()->fieldHandle()->ownerObject()); + caf::PdmUiObjectHandle* uiObject = uiObj(uiField()->fieldHandle()->ownerObject()); if (uiObject) { - uiObject->editorAttribute(field()->fieldHandle(), uiConfigName, &attributes); + uiObject->editorAttribute(uiField()->fieldHandle(), uiConfigName, &attributes); QPalette myPalette(m_listView->palette()); myPalette.setColor(QPalette::Base, attributes.m_baseColor); @@ -205,11 +205,11 @@ void PdmUiListEditor::configureAndUpdateUi(const QString& uiConfigName) QStringList texts = PdmOptionItemInfo::extractUiTexts(options); strListModel->setStringList(texts); - QVariant fieldValue = field()->uiValue(); + QVariant fieldValue = uiField()->uiValue(); if (fieldValue.type() == QVariant::Int || fieldValue.type() == QVariant::UInt) { int col = 0; - int row = field()->uiValue().toInt(); + int row = uiField()->uiValue().toInt(); QModelIndex mi = strListModel->index(row, col); @@ -253,7 +253,7 @@ void PdmUiListEditor::configureAndUpdateUi(const QString& uiConfigName) QItemSelection selection = m_listView->selectionModel()->selection(); QModelIndex currentItem = m_listView->selectionModel()->currentIndex(); - QVariant fieldValue = field()->uiValue(); + QVariant fieldValue = uiField()->uiValue(); QStringList texts = fieldValue.toStringList(); texts.push_back(""); strListModel->setStringList(texts); @@ -306,7 +306,7 @@ void PdmUiListEditor::slotSelectionChanged(const QItemSelection & selected, cons { if (m_optionItemCount == 0) return; - QVariant fieldValue = field()->uiValue(); + QVariant fieldValue = uiField()->uiValue(); if (fieldValue.type() == QVariant::Int || fieldValue.type() == QVariant::UInt) { // NOTE : Workaround for update issue seen on RHEL6 with Qt 4.6.2 @@ -331,7 +331,7 @@ void PdmUiListEditor::slotSelectionChanged(const QItemSelection & selected, cons { QModelIndexList idxList = m_listView->selectionModel()->selectedIndexes(); - QVariant fieldValue = field()->uiValue(); + QVariant fieldValue = uiField()->uiValue(); QList valuesSelectedInField = fieldValue.toList(); if (idxList.size() == 1 && valuesSelectedInField.size() == 1) diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiPushButtonEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiPushButtonEditor.cpp index f59ea4b034..4e3596ee2a 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiPushButtonEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiPushButtonEditor.cpp @@ -69,17 +69,17 @@ void PdmUiPushButtonEditor::configureAndUpdateUi(const QString& uiConfigName) PdmUiFieldEditorHandle::updateLabelFromField(m_label, uiConfigName); m_pushButton->setCheckable(true); - m_pushButton->setEnabled(!field()->isUiReadOnly(uiConfigName)); - m_pushButton->setToolTip(field()->uiToolTip(uiConfigName)); + m_pushButton->setEnabled(!uiField()->isUiReadOnly(uiConfigName)); + m_pushButton->setToolTip(uiField()->uiToolTip(uiConfigName)); PdmUiPushButtonEditorAttribute attributes; - caf::PdmUiObjectHandle* uiObject = uiObj(field()->fieldHandle()->ownerObject()); + caf::PdmUiObjectHandle* uiObject = uiObj(uiField()->fieldHandle()->ownerObject()); if (uiObject) { - uiObject->editorAttribute(field()->fieldHandle(), uiConfigName, &attributes); + uiObject->editorAttribute(uiField()->fieldHandle(), uiConfigName, &attributes); } - QVariant variantFieldValue = field()->uiValue(); + QVariant variantFieldValue = uiField()->uiValue(); if (!attributes.m_buttonIcon.isNull()) { @@ -108,7 +108,7 @@ void PdmUiPushButtonEditor::configureAndUpdateUi(const QString& uiConfigName) if (variantFieldValue.type() == QVariant::Bool) { - m_pushButton->setChecked(field()->uiValue().toBool()); + m_pushButton->setChecked(uiField()->uiValue().toBool()); } } @@ -166,7 +166,7 @@ QWidget* PdmUiPushButtonEditor::createLabelWidget(QWidget * parent) //-------------------------------------------------------------------------------------------------- void PdmUiPushButtonEditor::slotClicked(bool checked) { - if (field() && dynamic_cast *> (field()->fieldHandle())) + if (uiField() && dynamic_cast *> (uiField()->fieldHandle())) { QVariant v; v = checked; diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiSliderEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiSliderEditor.cpp index 84ee3e291f..0da557ca65 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiSliderEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiSliderEditor.cpp @@ -65,16 +65,16 @@ void PdmUiSliderEditor::configureAndUpdateUi(const QString& uiConfigName) PdmUiFieldEditorHandle::updateLabelFromField(m_label, uiConfigName); - m_spinBox->setEnabled(!field()->isUiReadOnly(uiConfigName)); - m_spinBox->setToolTip(field()->uiToolTip(uiConfigName)); + m_spinBox->setEnabled(!uiField()->isUiReadOnly(uiConfigName)); + m_spinBox->setToolTip(uiField()->uiToolTip(uiConfigName)); - m_slider->setEnabled(!field()->isUiReadOnly(uiConfigName)); - m_slider->setToolTip(field()->uiToolTip(uiConfigName)); + m_slider->setEnabled(!uiField()->isUiReadOnly(uiConfigName)); + m_slider->setToolTip(uiField()->uiToolTip(uiConfigName)); - caf::PdmUiObjectHandle* uiObject = uiObj(field()->fieldHandle()->ownerObject()); + caf::PdmUiObjectHandle* uiObject = uiObj(uiField()->fieldHandle()->ownerObject()); if (uiObject) { - uiObject->editorAttribute(field()->fieldHandle(), uiConfigName, &m_attributes); + uiObject->editorAttribute(uiField()->fieldHandle(), uiConfigName, &m_attributes); } { @@ -90,7 +90,7 @@ void PdmUiSliderEditor::configureAndUpdateUi(const QString& uiConfigName) m_slider->blockSignals(false); } - QString textValue = field()->uiValue().toString(); + QString textValue = uiField()->uiValue().toString(); m_spinBox->setValue(textValue.toInt()); updateSliderPosition(); diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTableView.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiTableView.cpp index 16f17ca87f..e85109924b 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTableView.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTableView.cpp @@ -90,11 +90,11 @@ void PdmUiTableView::setChildArrayField(PdmChildArrayFieldHandle* childArrayFiel if (childArrayField) { - m_listViewEditor->setField(childArrayField->uiCapability()); + m_listViewEditor->setUiField(childArrayField->uiCapability()); } else { - m_listViewEditor->setField(nullptr); + m_listViewEditor->setUiField(nullptr); } // SIG_CAF_HACK diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewEditor.cpp index 53bd319d87..ab2dcd1abf 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewEditor.cpp @@ -442,9 +442,9 @@ void PdmUiTableViewEditor::updateSelectionManagerFromTableSelection() caf::PdmChildArrayFieldHandle* PdmUiTableViewEditor::childArrayFieldHandle() { caf::PdmChildArrayFieldHandle* childArrayFieldHandle = nullptr; - if (this->field()) + if (this->uiField()) { - childArrayFieldHandle = dynamic_cast(this->field()->fieldHandle()); + childArrayFieldHandle = dynamic_cast(this->uiField()->fieldHandle()); } return childArrayFieldHandle; diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewQModel.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewQModel.cpp index 7961ae0da1..04f4635aea 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewQModel.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewQModel.cpp @@ -353,7 +353,7 @@ void PdmUiTableViewQModel::setPdmData(PdmChildArrayFieldHandle* listField, const std::map::iterator it; for (it = m_fieldEditors.begin(); it != m_fieldEditors.end(); ++it) { - it->second->setField(nullptr); + it->second->setUiField(nullptr); } m_modelColumnIndexToFieldIndex.clear(); @@ -388,7 +388,7 @@ void PdmUiTableViewQModel::setPdmData(PdmChildArrayFieldHandle* listField, const if (fieldEditor) { - fieldEditor->setField(field); + fieldEditor->setUiField(field); //TODO: Create/update is not required at this point, as UI is recreated in getEditorWidgetAndTransferOwnership() // Can be moved, but a move will require changes in PdmUiFieldEditorHandle @@ -407,7 +407,7 @@ void PdmUiTableViewQModel::setPdmData(PdmChildArrayFieldHandle* listField, const std::vector< QString > fvhToRemoveFromMap; for (it = m_fieldEditors.begin(); it != m_fieldEditors.end(); ++it) { - if (it->second->field() == nullptr) + if (it->second->uiField() == nullptr) { PdmUiFieldEditorHandle* fvh = it->second; delete fvh; @@ -477,7 +477,7 @@ PdmUiFieldEditorHandle* PdmUiTableViewQModel::getEditor(const QModelIndex &index { if (field) { - editor->setField(field->uiCapability()); + editor->setUiField(field->uiCapability()); } } } diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTextEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiTextEditor.cpp index 737672288d..785bdb2837 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTextEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTextEditor.cpp @@ -109,16 +109,16 @@ void PdmUiTextEditor::configureAndUpdateUi(const QString& uiConfigName) PdmUiFieldEditorHandle::updateLabelFromField(m_label, uiConfigName); - m_textEdit->setReadOnly(field()->isUiReadOnly(uiConfigName)); + m_textEdit->setReadOnly(uiField()->isUiReadOnly(uiConfigName)); //m_textEdit->setEnabled(!field()->isUiReadOnly(uiConfigName)); // Neccesary ? - m_textEdit->setToolTip(field()->uiToolTip(uiConfigName)); + m_textEdit->setToolTip(uiField()->uiToolTip(uiConfigName)); PdmUiTextEditorAttribute leab; - caf::PdmUiObjectHandle* uiObject = uiObj(field()->fieldHandle()->ownerObject()); + caf::PdmUiObjectHandle* uiObject = uiObj(uiField()->fieldHandle()->ownerObject()); if (uiObject) { - uiObject->editorAttribute(field()->fieldHandle(), uiConfigName, &leab); + uiObject->editorAttribute(uiField()->fieldHandle(), uiConfigName, &leab); } m_textMode = leab.textMode; @@ -138,10 +138,10 @@ void PdmUiTextEditor::configureAndUpdateUi(const QString& uiConfigName) switch (leab.textMode) { case PdmUiTextEditorAttribute::PLAIN: - m_textEdit->setPlainText(field()->uiValue().toString()); + m_textEdit->setPlainText(uiField()->uiValue().toString()); break; case PdmUiTextEditorAttribute::HTML: - m_textEdit->setHtml(field()->uiValue().toString()); + m_textEdit->setHtml(uiField()->uiValue().toString()); break; } m_textEdit->blockSignals(false); diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiToolBarEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiToolBarEditor.cpp index 5841cc4ff7..addd9bce83 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiToolBarEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiToolBarEditor.cpp @@ -166,7 +166,7 @@ void PdmUiToolBarEditor::configureAndUpdateUi(const QString& uiConfigName) m_toolbar->addWidget(widget); } - fieldEditor->setField(uiFieldHandle); + fieldEditor->setUiField(uiFieldHandle); fieldEditor->updateUi(uiConfigName); } } diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiToolButtonEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiToolButtonEditor.cpp index 872565ffbf..ff93e8065c 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiToolButtonEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiToolButtonEditor.cpp @@ -56,32 +56,32 @@ void PdmUiToolButtonEditor::configureAndUpdateUi(const QString& uiConfigName) { CAF_ASSERT(!m_toolButton.isNull()); - QIcon ic = field()->uiIcon(uiConfigName); + QIcon ic = uiField()->uiIcon(uiConfigName); if (!ic.isNull()) { m_toolButton->setIcon(ic); } - QString buttonText = field()->uiName(uiConfigName); + QString buttonText = uiField()->uiName(uiConfigName); m_toolButton->setText(buttonText); - m_toolButton->setEnabled(!field()->isUiReadOnly(uiConfigName)); - m_toolButton->setToolTip(field()->uiToolTip(uiConfigName)); + m_toolButton->setEnabled(!uiField()->isUiReadOnly(uiConfigName)); + m_toolButton->setToolTip(uiField()->uiToolTip(uiConfigName)); PdmUiToolButtonEditorAttribute attributes; - PdmUiObjectHandle* pdmUiOjectHandle = uiObj(field()->fieldHandle()->ownerObject()); + PdmUiObjectHandle* pdmUiOjectHandle = uiObj(uiField()->fieldHandle()->ownerObject()); if (pdmUiOjectHandle) { - pdmUiOjectHandle->editorAttribute(field()->fieldHandle(), uiConfigName, &attributes); + pdmUiOjectHandle->editorAttribute(uiField()->fieldHandle(), uiConfigName, &attributes); } bool isCheckable = attributes.m_checkable; m_toolButton->setCheckable(isCheckable); - QVariant variantFieldValue = field()->uiValue(); + QVariant variantFieldValue = uiField()->uiValue(); if (isCheckable) { - m_toolButton->setChecked(field()->uiValue().toBool()); + m_toolButton->setChecked(uiField()->uiValue().toBool()); } } diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeSelectionEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeSelectionEditor.cpp index c481bfd86e..2368619cd8 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeSelectionEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeSelectionEditor.cpp @@ -250,12 +250,12 @@ void PdmUiTreeSelectionEditor::configureAndUpdateUi(const QString& uiConfigName) } bool optionsOnly = true; - QList options = field()->valueOptions(&optionsOnly); + QList options = uiField()->valueOptions(&optionsOnly); bool itemCountHasChaged = false; if (m_model->optionItemCount() != options.size()) itemCountHasChaged = true; - QVariant fieldValue = field()->uiValue(); + QVariant fieldValue = uiField()->uiValue(); m_model->setUiValueCache(&fieldValue); // TODO: If the count is different between incoming and current list of items, @@ -274,10 +274,10 @@ void PdmUiTreeSelectionEditor::configureAndUpdateUi(const QString& uiConfigName) } else if (PdmUiTreeSelectionQModel::isMultipleValueField(fieldValue)) { - caf::PdmUiObjectHandle* uiObject = uiObj(field()->fieldHandle()->ownerObject()); + caf::PdmUiObjectHandle* uiObject = uiObj(uiField()->fieldHandle()->ownerObject()); if (uiObject) { - uiObject->editorAttribute(field()->fieldHandle(), uiConfigName, &m_attributes); + uiObject->editorAttribute(uiField()->fieldHandle(), uiConfigName, &m_attributes); } if (m_attributes.singleSelectionMode) diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeSelectionQModel.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeSelectionQModel.cpp index 844e2627ea..148aa126d4 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeSelectionQModel.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeSelectionQModel.cpp @@ -91,11 +91,11 @@ int caf::PdmUiTreeSelectionQModel::optionItemValueRole() //-------------------------------------------------------------------------------------------------- void caf::PdmUiTreeSelectionQModel::setCheckedStateForItems(const QModelIndexList& sourceModelIndices, bool checked) { - if (!m_uiFieldHandle || !m_uiFieldHandle->field()) return; + if (!m_uiFieldHandle || !m_uiFieldHandle->uiField()) return; std::set selectedIndices; { - QVariant fieldValue = m_uiFieldHandle->field()->uiValue(); + QVariant fieldValue = m_uiFieldHandle->uiField()->uiValue(); QList fieldValueSelection = fieldValue.toList(); for (auto v : fieldValueSelection) @@ -125,7 +125,7 @@ void caf::PdmUiTreeSelectionQModel::setCheckedStateForItems(const QModelIndexLis fieldValueSelection.push_back(QVariant(v)); } - PdmUiCommandSystemProxy::instance()->setUiValueToField(m_uiFieldHandle->field(), fieldValueSelection); + PdmUiCommandSystemProxy::instance()->setUiValueToField(m_uiFieldHandle->uiField(), fieldValueSelection); } //-------------------------------------------------------------------------------------------------- @@ -326,11 +326,11 @@ QVariant caf::PdmUiTreeSelectionQModel::data(const QModelIndex &index, int role } else if (role == Qt::CheckStateRole && !optionItemInfo->isHeading()) { - if (m_uiFieldHandle && m_uiFieldHandle->field()) + if (m_uiFieldHandle && m_uiFieldHandle->uiField()) { // Avoid calling the seriously heavy uiValue method if we have a temporary valid cache. - QVariant fieldValue = m_uiValueCache ? *m_uiValueCache : m_uiFieldHandle->field()->uiValue(); + QVariant fieldValue = m_uiValueCache ? *m_uiValueCache : m_uiFieldHandle->uiField()->uiValue(); if (isSingleValueField(fieldValue)) { int row = fieldValue.toInt(); @@ -389,17 +389,17 @@ QVariant caf::PdmUiTreeSelectionQModel::data(const QModelIndex &index, int role //-------------------------------------------------------------------------------------------------- bool caf::PdmUiTreeSelectionQModel::setData(const QModelIndex &index, const QVariant &value, int role /*= Qt::EditRole*/) { - if (!m_uiFieldHandle || !m_uiFieldHandle->field()) return false; + if (!m_uiFieldHandle || !m_uiFieldHandle->uiField()) return false; if (role == Qt::CheckStateRole) { - QVariant fieldValue = m_uiFieldHandle->field()->uiValue(); + QVariant fieldValue = m_uiFieldHandle->uiField()->uiValue(); if (isSingleValueField(fieldValue)) { if (value.toBool() == true) { QVariant v = static_cast(optionIndex(index)); - PdmUiCommandSystemProxy::instance()->setUiValueToField(m_uiFieldHandle->field(), v); + PdmUiCommandSystemProxy::instance()->setUiValueToField(m_uiFieldHandle->uiField(), v); return true; } @@ -452,7 +452,7 @@ bool caf::PdmUiTreeSelectionQModel::setData(const QModelIndex &index, const QVar fieldValueSelection.push_back(QVariant(v)); } - PdmUiCommandSystemProxy::instance()->setUiValueToField(m_uiFieldHandle->field(), fieldValueSelection); + PdmUiCommandSystemProxy::instance()->setUiValueToField(m_uiFieldHandle->uiField(), fieldValueSelection); return true; } diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiWidgetBasedObjectEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiWidgetBasedObjectEditor.cpp index 4d725388c4..efcf94aaaa 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiWidgetBasedObjectEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiWidgetBasedObjectEditor.cpp @@ -108,7 +108,7 @@ void caf::PdmUiWidgetBasedObjectEditor::recursivelyConfigureAndUpdateUiItemsInGr if (fieldEditor) { - fieldEditor->setField(field); + fieldEditor->setUiField(field); // Place the widget(s) into the correct parent and layout QWidget* fieldCombinedWidget = fieldEditor->combinedWidget(); @@ -338,7 +338,7 @@ void caf::PdmUiWidgetBasedObjectEditor::configureAndUpdateUi(const QString& uiCo std::map::iterator it; for (it = m_fieldViews.begin(); it != m_fieldViews.end(); ++it) { - it->second->setField(nullptr); + it->second->setUiField(nullptr); } // Set all group Boxes to be unvisited @@ -352,7 +352,7 @@ void caf::PdmUiWidgetBasedObjectEditor::configureAndUpdateUi(const QString& uiCo std::vector< PdmFieldHandle* > fvhToRemoveFromMap; for (it = m_fieldViews.begin(); it != m_fieldViews.end(); ++it) { - if (it->second->field() == nullptr) + if (it->second->uiField() == nullptr) { PdmUiFieldEditorHandle* fvh = it->second; delete fvh;