TuiNodeInt.cpp   TuiNodeInt.cpp 
skipping to change at line 40 skipping to change at line 40
TuiNodeResponse TuiNodeInt::handleEditingKey(int key) TuiNodeResponse TuiNodeInt::handleEditingKey(int key)
{ {
TuiNodeResponse response; TuiNodeResponse response;
response.accepted = false; response.accepted = false;
response.newNode = this; response.newNode = this;
if (key==Qt::Key_Left || key==Qt::Key_Return) if (key==Qt::Key_Left || key==Qt::Key_Return)
{ {
editing = false; editing = false;
typing = false; typing = false;
response.accepted = true; response.accepted = true;
response.newNode = this;
emit(setValue(value)); emit(setValue(value));
return response; return response;
} }
else if (key==Qt::Key_Up) else if (key==Qt::Key_Up)
{ {
typing = false; typing = false;
value+=increment; value+=increment;
if (value > maximum) if (value > maximum)
value = maximum; value = maximum;
response.accepted = true; response.accepted = true;
response.newNode = this;
emit(setValue(value)); emit(setValue(value));
return response; return response;
} }
else if (key==Qt::Key_Down) else if (key==Qt::Key_Down)
{ {
typing = false; typing = false;
value-=increment; value-=increment;
if (value < minimum) if (value < minimum)
value = minimum; value = minimum;
response.accepted = true; response.accepted = true;
response.newNode = this;
emit(setValue(value)); emit(setValue(value));
return response; return response;
} }
else if (key>=Qt::Key_0 && key<=Qt::Key_9) else if (key>=Qt::Key_0 && key<=Qt::Key_9)
{ {
QString s; QString s;
if (!typing) if (!typing)
{ {
typing = true; typing = true;
s = QString("%1").arg(key - Qt::Key_0); s = QString("%1").arg(key - Qt::Key_0);
skipping to change at line 121 skipping to change at line 118
emit(setValue(value)); emit(setValue(value));
return response; return response;
} }
else if (key==Qt::Key_Minus) else if (key==Qt::Key_Minus)
{ {
typing = true; typing = true;
int i = value *= -1; int i = value *= -1;
if (i>=minimum && i<=maximum) if (i>=minimum && i<=maximum)
value = i; value = i;
response.accepted = true; response.accepted = true;
response.newNode = this;
emit(setValue(value)); emit(setValue(value));
return response; return response;
} }
return response; return response;
} }
QString TuiNodeInt::getDisplayText() QString TuiNodeInt::getDisplayText()
{ {
if (!editing) if (!editing)
{ {
 End of changes. 4 change blocks. 
4 lines changed or deleted 0 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/