void SearchOptions::deserializeSettings(const QString allOptions)
{
  setMatchEntireString();
  setMatchAsString();
  setCaseSensitive(false);
  setBackwards(false);
  setAllColumns(false);
  setWrap(false);
  setIsReplace(false);
  setIsReplaceAll(false);
  QStringList list = allOptions.split(",");
  for (int i=0; i<list.count(); ++i) {
    QString s = list.at(i);
    if (s.compare("MatchEntireString", Qt::CaseInsensitive) == 0) {
      setMatchEntireString();
    } else if (s.compare("Contains", Qt::CaseInsensitive) == 0) {
      setContains();
    } else if (s.compare("StartsWith", Qt::CaseInsensitive) == 0) {
      setStartsWith();
    } else if (s.compare("EndsWith", Qt::CaseInsensitive) == 0) {
      setEndsWith();
    } else if (s.compare("AsString", Qt::CaseInsensitive) == 0) {
      setMatchAsString();
    } else if (s.compare("RegExp", Qt::CaseInsensitive) == 0) {
      setRegularExpression();
    } else if (s.compare("Wildcard", Qt::CaseInsensitive) == 0) {
      setWildCard();
    } else if (s.compare("CaseSensitive", Qt::CaseInsensitive) == 0) {
      setCaseSensitive();
    } else if (s.compare("CaseInSensitive", Qt::CaseInsensitive) == 0) {
      setCaseSensitive(false);
    } else if (s.compare("Wrap", Qt::CaseInsensitive) == 0) {
      setWrap(true);
    } else if (s.compare("NoWrap", Qt::CaseInsensitive) == 0) {
      setWrap(false);
    } else if (s.compare("Backward", Qt::CaseInsensitive) == 0) {
      setBackwards(true);
    } else if (s.compare("Forward", Qt::CaseInsensitive) == 0) {
      setBackwards(false);
    } else if (s.compare("AllColumns", Qt::CaseInsensitive) == 0) {
      setAllColumns(true);
    } else if (s.compare("OneColumn", Qt::CaseInsensitive) == 0) {
      setAllColumns(false);
    } else if (s.compare("Replace", Qt::CaseInsensitive) == 0) {
      setIsReplace(true);
    } else if (s.compare("ReplaceAll", Qt::CaseInsensitive) == 0) {
      setIsReplaceAll(true);
    }
  }
}
Exemple #2
0
/**
 * Constructeur de l'objet Player
 */
Player::Player()
{
    setForwards(false);
    setBackwards(false);
    setStrafeLeft(false);
    setStrafeRight(false);

    lastPositionUpdate = -1;
    setSpeed(0.2f);
}
void SearchOptions::setToDefault()
{
  setContains();
  setMatchAsString();
  setCaseSensitive(false);
  setWrap(true);
  setBackwards(false);
  setAllColumns(false);
  m_isReplace = false;
  setIsReplaceAll(false);
}