void INCREMENTAL_TEXT_CTRL::incrementCtrlBy( double aInc )
{
    const wxString txt = getCtrlText();
    if( !validateFloatField( txt ) )
        return;

    txt.ToDouble( &m_currentValue );
    m_currentValue += aInc;

    updateTextValue();
}
void INCREMENTAL_TEXT_CTRL::SetStep( double aMin, double aMax,
    STEP_FUNCTION aStepFunc )
{
    wxASSERT( aMin <= aMax );

    m_minVal = std::min( aMin, aMax );
    m_maxVal = std::max( aMin, aMax );
    m_stepFunc = aStepFunc;

    // finally, clamp the current value and re-display
    updateTextValue();
}
Пример #3
0
int DiagrammScene::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QGraphicsScene::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: updateTextValue((*reinterpret_cast< int(*)>(_a[1]))); break;
        default: ;
        }
        _id -= 1;
    }
    return _id;
}
void INCREMENTAL_TEXT_CTRL::SetValue( double aValue )
{
    m_currentValue = aValue;
    updateTextValue();
}