void Xor::setKey(QByteArray val) { if (key != val) { key = val; emit confUpdated(); } }
void Xor::setFromHex(bool val) { if (hexDecode != val) { hexDecode = val; emit confUpdated(); } }
void Xor::setType(Xor::Type val) { if (xortype != val) { xortype = val; emit confUpdated(); } }
void BytesInteger::setLittleEndian(bool val) { if (val != littleendian) { littleendian = val; emit confUpdated(); } }
void UrlEncode::setExclude(QByteArray vals) { if (exclude != vals) { exclude = vals; emit confUpdated(); } }
void TransformAbstract::setWay(TransformAbstract::Way nway) { if (wayValue != nway) { wayValue = nway; Q_EMIT confUpdated(); } }
void UrlEncode::setPercentSign(char val) { if (percentSign != val) { percentSign = val; emit confUpdated(); } }
void Zlib::setRemoveHeader(bool flag) { if (removeHeader != flag) { removeHeader = flag; emit confUpdated(); } }
void Cut::setLineByLine(bool value) { if (lineByLine != value) { lineByLine = value; emit confUpdated(); } }
void ByteRot::setRotation(int rot) { if (rotation != rot) { rotation = rot % 256; emit confUpdated(); } }
void Cut::setCutEverything(bool val) { if (everything != val) { everything = val; emit confUpdated(); } }
void Cut::setClassicCut(bool value) { if (classicCut != value) { classicCut = value; emit confUpdated(); } }
void UrlEncode::setInclude(QByteArray vals) { if (include != vals) { include = vals; emit confUpdated(); } }
void BytesInteger::setSignedInteger(bool val) { if (val != signedInteger) { signedInteger = val; emit confUpdated(); } }
void BytesInteger::setIntegerSize(BytesInteger::IntSize val) { if (val != integerSize) { integerSize = val; emit confUpdated(); } }
bool Cut::setFromPos(int val) { if (val < 0) { emit error(tr("Invalid starting position: %1").arg(val),id); return false; } if (from != val) { from = val; emit confUpdated(); } return true; }
bool Cut::setLength(int val) { if (val < 1) { emit error(tr("Invalid length: %1").arg(val),id); return false; } if (length != val) { length = val; everything = false; emit confUpdated(); } return true; }
bool CiscoSecret7::setSeed(unsigned int nseed) { if (seed > 52) { emit error(tr("Valid values for a seed are supposed to be in [0-52]"),id); return false; } if (nseed != seed) { seed = nseed; emit confUpdated(); } return true; }
bool Zlib::setCompression(int level) { if (level < 0 || level > 9) { emit error(tr("Incorrect compression level"),id); return false; } if (compressionLevel != level) { compressionLevel = level; emit confUpdated(); } return true; }
bool Binary::setBlockSize(int val) { if (val < MINBLOCKSIZE || val > MAXBLOCKSIZE) { emit error(tr("Blocksize value out of bound [%1-%2]").arg(MINBLOCKSIZE).arg(MAXBLOCKSIZE),id); return false; } if (blockSize != val) { blockSize = val; emit confUpdated(); } return true; }
bool Reverse::setBlocksize(int val) { if (val < MINBLOCKSIZE || val > MAXBLOCKSIZE) { emit error(tr("Blocksize value out of bound [%1-%2]").arg(MINBLOCKSIZE).arg(MAXBLOCKSIZE),id); return false; } blockSize = val; noBlock = false; emit confUpdated(); return true; }
Statusbar::Statusbar(MainWindow *parent) : QObject(parent), m_statusbar(parent->ui->statusbar), m_status(new QLabel), m_padlock(new QLabel), m_config_profile(new QLabel), m_pixmap_disconnected(QPixmap(":/images/disconnected.png").scaledToHeight(18, Qt::SmoothTransformation)), m_pixmap_connected(QPixmap(":/images/connected.png").scaledToHeight(18, Qt::SmoothTransformation)) { this->connect(b_engine, SIGNAL(logged()), SLOT(setStatusLogged())); this->connect(b_engine, SIGNAL(delogged()), SLOT(setStatusNotLogged())); this->connect(b_engine, SIGNAL(settingsChanged()), SLOT(confUpdated())); connect(b_engine, SIGNAL(emitTextMessage(const QString &)), this->m_statusbar, SLOT(showMessage(const QString &))); this->connect(parent, SIGNAL(initialized()), SLOT(initialize())); }
void Substitution::setSTable(QByteArray sTable) { if (sTable.size() < SubstitutionTables::S_ARRAY_SIZE) { sTable.append(QByteArray(SubstitutionTables::S_ARRAY_SIZE - sTable.size(),'\x00')); emit error(tr("Permutation table too short (%1 intead of 256). Completed with zeros.").arg(sTable.size()),id); } else if (sTable.size() > SubstitutionTables::S_ARRAY_SIZE) { sTable = sTable.mid(0,SubstitutionTables::S_ARRAY_SIZE); emit error(tr("Permutation table too long (%1 instead of 256). Truncated.").arg(sTable.size()),id); } if (s_table_e != sTable) { s_table_e = sTable; createDecryptTable(); emit confUpdated(); } }
bool NumberToChar::setSeparator(char c) { if (c == '-') { emit error("Cannot use the negative sign as separator",id); return false; } if ((c > 47 && c < 58) ) { emit error("Cannot use a number as separator",id); return false; } if (separator != c) { separator = c; emit confUpdated(); } return true; }
void Html::setUseName(bool val) { useName = val; emit confUpdated(); }
void Html::setUseHexadecimal(bool val) { useHexadecimal = val; emit confUpdated(); }
void Html::setEncodeAll(bool val) { encodeAll = val; emit confUpdated(); }
void Reverse::setNoBlock(bool val) { noBlock = val; emit confUpdated(); }