コード例 #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));
    }
}
コード例 #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);
    }
}
コード例 #3
0
int AMOldDetectorInfoSet::indexOf(AMOldDetectorInfo *detectorInfo) const{
	return indexOfValue(detectorInfo);
}
コード例 #4
0
ファイル: AMDetectorSet.cpp プロジェクト: acquaman/acquaman
int AMDetectorSet::indexOf(AMDetector *detector) const{
	return indexOfValue(detector);
}
コード例 #5
0
ファイル: AMControlSet.cpp プロジェクト: Cpppro/acquaman
int AMControlSet::indexOf(AMControl* control) {
	return indexOfValue(control);
}
コード例 #6
0
ファイル: ArnXStringMap.cpp プロジェクト: micwik/ArnLib
int  XStringMap::indexOfValue( const QString& value, int from)  const
{
    return indexOfValue( value.toUtf8(), from);
}