AngleSpinBox.cpp   AngleSpinBox.cpp 
skipping to change at line 92 skipping to change at line 92
} }
AngleSpinBox::AngleSpinboxSection AngleSpinBox::getCurrentSection() const AngleSpinBox::AngleSpinboxSection AngleSpinBox::getCurrentSection() const
{ {
int cusorPos = lineEdit()->cursorPosition(); int cusorPos = lineEdit()->cursorPosition();
const QString str = lineEdit()->text(); const QString str = lineEdit()->text();
int cPosMin = str.indexOf(QRegExp("[+-"+q_("N")+q_("S")+q_("E")+q_(" W")+"]"), 0); int cPosMin = str.indexOf(QRegExp("[+-"+q_("N")+q_("S")+q_("E")+q_(" W")+"]"), 0);
int cPosMax = cPosMin+1; int cPosMax = cPosMin+1;
if (cPosMin==0) if (cusorPos>=cPosMin && cusorPos<cPosMax) {
{
// No prefix
cPosMax=0;
}
else if (cusorPos>=cPosMin && cusorPos<cPosMax)
return SectionPrefix; return SectionPrefix;
}
cPosMin = cPosMax; cPosMin = cPosMax;
cPosMax = str.indexOf(QRegExp(QString("[h%1]").arg(QChar(176))), 0)+ 1; cPosMax = str.indexOf(QRegExp(QString("[h%1]").arg(QChar(176))), 0)+ 1;
if (cusorPos>=cPosMin && cusorPos<cPosMax) if (cusorPos > cPosMin && cusorPos <= cPosMax) {
return SectionDegreesHours; return SectionDegreesHours;
}
cPosMin = cPosMax; cPosMin = cPosMax;
cPosMax = str.indexOf(QRegExp("[m']"), 0)+1; cPosMax = str.indexOf(QRegExp("[m']"), 0)+1;
if (cusorPos>=cPosMin && cusorPos<cPosMax) if (cusorPos > cPosMin && cusorPos <= cPosMax) {
return SectionMinutes; return SectionMinutes;
}
cPosMin = cPosMax; cPosMin = cPosMax;
cPosMax = str.indexOf(QRegExp("[s\"]"), 0)+1; cPosMax = str.indexOf(QRegExp("[s\"]"), 0)+1;
if (cusorPos>=cPosMin && cusorPos<cPosMax) if (cusorPos > cPosMin && cusorPos <= cPosMax) {
return SectionSeconds; return SectionSeconds;
}
return SectionNone; return SectionNone;
} }
void AngleSpinBox::stepBy (int steps) void AngleSpinBox::stepBy (int steps)
{ {
const int cusorPos = lineEdit()->cursorPosition(); const int cusorPos = lineEdit()->cursorPosition();
const AngleSpinBox::AngleSpinboxSection sec = getCurrentSection(); const AngleSpinBox::AngleSpinboxSection sec = getCurrentSection();
switch (sec) switch (sec)
{ {
 End of changes. 8 change blocks. 
9 lines changed or deleted 8 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/