Newer
Older
// Show the menu
menu->popup(QCursor::pos());
}
void ConvFit::fixItem()
{
QtBrowserItem* item = m_cfTree->currentItem();
// Determine what the property is.
QtProperty* prop = item->property();
QtProperty* fixedProp = m_stringManager->addProperty( prop->propertyName() );
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
QtProperty* fprlbl = m_stringManager->addProperty("Fixed");
fixedProp->addSubProperty(fprlbl);
m_stringManager->setValue(fixedProp, prop->valueText());
item->parent()->property()->addSubProperty(fixedProp);
m_fixedProps[fixedProp] = prop;
item->parent()->property()->removeSubProperty(prop);
}
void ConvFit::unFixItem()
{
QtBrowserItem* item = m_cfTree->currentItem();
QtProperty* prop = item->property();
if ( prop->subProperties().empty() )
{
item = item->parent();
prop = item->property();
}
item->parent()->property()->addSubProperty(m_fixedProps[prop]);
item->parent()->property()->removeSubProperty(prop);
m_fixedProps.remove(prop);
QtProperty* proplbl = prop->subProperties()[0];
delete proplbl;
delete prop;
}
void ConvFit::showTieCheckbox(QString fitType)
{
uiForm().confit_ckTieCentres->setVisible( fitType == "Two Lorentzians" );
}
} // namespace IDA
} // namespace CustomInterfaces
} // namespace MantidQt