void ConnectionSettings::Load(QSettings & settings, bool dontDecryptPassword) { settings.beginGroup(connectionSettingsSection); SetDC(settings.value(dcNameParam).toString().toStdWString()); SetLogin(settings.value(userNameParam).toString().toStdWString()); QString protectedPassword = settings.value(passwordParam).toString(); CurrentUserCredentials(settings.value(currentUserCredParam, true).toBool()); CurrentDomain(settings.value(currentDomainParam, true).toBool()); QString unprotectedPassword = dontDecryptPassword ? protectedPassword : UnprotectPassword(protectedPassword); SetPassword(unprotectedPassword.toStdWString()); #pragma warning(push, 3) #pragma warning(disable: 4003) BOOST_SCOPE_EXIT(&settings) { settings.endGroup(); } BOOST_SCOPE_EXIT_END #pragma warning(pop) }
/******************************************************************************* * Function Name: SetWaveform ******************************************************************************** * * Summary * Sets currentWaveform as a wave with the specified shape (mode) * * Parameters: * numSamples - the number of samples (number of elements in waveform) * mode - the waveform type (square, sine, triangle, sawtooth, or DC) * currentWaveform - the raw array of waveform samples to be filled * * Return: * None. * *******************************************************************************/ void SetWaveform(int numSamples, int mode, uint8 voltage, uint8 *currentWaveform) { switch (mode) { case SQUARE: SetSquare(numSamples, voltage, currentWaveform); break; case SINE: SetSine(numSamples, voltage, currentWaveform); break; case TRIANGLE: SetTriangle(numSamples, voltage, currentWaveform); break; case SAWTOOTH: SetSawtooth(numSamples, voltage, currentWaveform); break; case DC: SetDC(numSamples, voltage, currentWaveform); break; } }