int Editor::wordEnd(wchar_t const* str, int pos, int dir) { if (dir > 0) { if (str[pos] == 0) return pos; char t = chType(str[pos]); do {pos++;} while(str[pos] && chType(str[pos]) == t); return pos; } else { if (str[pos] == 0) pos--; char t = chType(str[pos]); while (pos > 0 && chType(str[pos - 1]) == t) pos--; return pos; } }
/* * Destroys the object and frees any allocated resources */ QG_DlgOptionsDrawing::~QG_DlgOptionsDrawing() { // no need to delete child widgets, Qt does it all for us RS_SETTINGS->beginGroup("/Appearance"); RS_SETTINGS->writeEntry("/IsometricGrid", rbIsometricGrid->isChecked()?QString("1"):QString("0")); RS2::CrosshairType chType(RS2::TopCrosshair); if(rbCrosshairLeft->isChecked()) { chType=RS2::LeftCrosshair; }else if (rbCrosshairTop->isChecked()) { chType=RS2::TopCrosshair; }else if (rbCrosshairRight->isChecked()) { chType=RS2::RightCrosshair; } RS_SETTINGS->writeEntry("/CrosshairType", QString::number(static_cast<int>(chType))); if(spacing.valid){ RS_SETTINGS->writeEntry("/GridSpacingX", spacing.x); RS_SETTINGS->writeEntry("/GridSpacingY", spacing.y); } RS_SETTINGS->endGroup(); }