rem: void SpinBox::addValue(int change, bool current) { int newval = value() + change; int maxval = current ? QSpinBox::maxValue() : mMaxValue; int minval = current ? QSpinBox::minValue() : mMinValue; if (wrapping()) { int range = maxval - minval + 1; if (newval > maxval) newval = minval + (newval - maxval - 1) % range; else if (newval < minval) newval = maxval - (minval - 1 - newval) % range; } else { if (newval > maxval) newval = maxval; else if (newval < minval) newval = minval; } setValue(newval); }
add: void         addValue(int change)                  { addValue(change, false); }
context: void SpinBox::addValue(int change, bool current){	int newval = value() + change;	int maxval = current ? QSpinBox::maxValue() : mMaxValue;	int minval = current ? QSpinBox::minValue() : mMinValue;	if (wrapping())	{		int range = maxval - minval + 1;		if (newval > maxval)			newval = minval + (newval - maxval - 1) % range;		else if (newval < minval)			newval = maxval - (minval - 1 - newval) % range;	}	else	{		if (newval > maxval)			newval = maxval;		else if (newval < minval)			newval = minval;	}	setValue(newval);}