Ejemplo n.º 1
0
/**
 * @brief Update widgets when pickerLine is manually changed. Do not update if
 * the pickerLine moved so little that it did not positioned over a different
 * slice.
 * @param newEnergySelected the new energy retrieved from the pickerLine
 */
void SliceSelector::newIndexFromPickedEnergy(const double &newEnergySelected) {
    auto axis = m_loadedWorkspace->m_ws->getAxis(1);
    auto newSelectedIndex = axis->indexOfValue(newEnergySelected);
    if (m_selectedWorkspaceIndex != newSelectedIndex) {
        updateSelectedSlice(static_cast<int>(newSelectedIndex));
    }
}
Ejemplo n.º 2
0
/**
 * @brief Update the position of the picker line as a response to changes in the
 * SliceSelector, unless the energy being pointed to corresponds to the current
 * index.
 */
void SliceSelector::updatePickerLine() {
    auto energyBeingPointedTo = m_pickerLine->getMinimum();
    auto axis = m_loadedWorkspace->m_ws->getAxis(1);
    auto indexBeingPointedTo = axis->indexOfValue(energyBeingPointedTo);
    if (m_selectedWorkspaceIndex != indexBeingPointedTo) {
        m_pickerLine->setMinimum(m_loadedWorkspace->m_energy);
    }
}
Ejemplo n.º 3
0
int AMOldDetectorInfoSet::indexOf(AMOldDetectorInfo *detectorInfo) const{
	return indexOfValue(detectorInfo);
}
Ejemplo n.º 4
0
int AMDetectorSet::indexOf(AMDetector *detector) const{
	return indexOfValue(detector);
}
Ejemplo n.º 5
0
int AMControlSet::indexOf(AMControl* control) {
	return indexOfValue(control);
}
Ejemplo n.º 6
0
int  XStringMap::indexOfValue( const QString& value, int from)  const
{
    return indexOfValue( value.toUtf8(), from);
}