Esempio n. 1
0
void QtAddVoxOxAccount::load(const SipAccount & sipAccount) {
	if (sipAccount.getType() == SipAccount::SipAccountTypeWengo) {
		const WengoAccount & wengoAccount = dynamic_cast<const WengoAccount &>(sipAccount);
		//setAccountName(QString::fromStdString(wengoAccount.getWengoLogin()));
		//setPassword(wengoAccount.getWengoPassword());
		//VOXOX CHANGE by Rolando 04-06-09	
		if (sipAccount.isPasswordRemembered()) {
			setPassword(sipAccount.getUserPassword());
			_ui->rememberPasswordCheckBox->setCheckState(Qt::Checked);
		} else {
			setPassword("");
			_ui->rememberPasswordCheckBox->setCheckState(Qt::Unchecked);
		}

		if (!sipAccount.isUsernameRemembered()) {		
			setAccountName("");
			setPassword("");
			_ui->rememberPasswordCheckBox->setCheckState(Qt::Unchecked);
			//_ui->publicComputerCheckBox->setCheckState(Qt::Checked);
		} else {							
			_ui->publicComputerCheckBox->setCheckState(Qt::Unchecked);
			
		}

		_ui->automaticallyLoginCheckBox->setChecked(sipAccount.isAutoLoginVoxOx());

		

	} else {
		LOG_DEBUG("SIP getType() = SipAccount::SipAccountTypeBasic");
	}
}
Esempio n. 2
0
void QtAddVoxOxAccount::load(std::string sipAccountName) {
	//load userprofile
	UserProfile * userProfile = _cUserProfileHandler.getUserProfileHandler().getUserProfile(sipAccountName);
	if (userProfile) {
		SipAccount * sipAccount = userProfile->getSipAccount();
		//VOXOX CHANGE by Rolando 04-06-09
		if (sipAccount) {
			
			if (sipAccount->isPasswordRemembered()) {
				setPassword(sipAccount->getUserPassword());
				_ui->rememberPasswordCheckBox->setCheckState(Qt::Checked);
			} else {
				setPassword("");
				_ui->rememberPasswordCheckBox->setCheckState(Qt::Unchecked);
			}

			if (!sipAccount->isUsernameRemembered()) {		
				setAccountName("");
				setPassword("");
				_ui->rememberPasswordCheckBox->setCheckState(Qt::Unchecked);
				/*_ui->publicComputerCheckBox->setCheckState(Qt::Checked);*/
			} else {
				// Add and select the given SipAccount
				//SERGIO MARIN IF EXISTS ACCOUNT IN COMBO BOX
				if (_ui->usernameComboBox->findText(QString::fromStdString(sipAccountName))== -1){
					_ui->usernameComboBox->addItem(QString::fromStdString(sipAccountName));
				}

				setAccountName(QString::fromStdString(sipAccountName));

				_ui->publicComputerCheckBox->setCheckState(Qt::Unchecked);
				
			}

			_ui->automaticallyLoginCheckBox->setChecked(sipAccount->isAutoLoginVoxOx());

		}
	}
	else {
		//VOXOX CHANGE by Rolando - 2009.05.21 -commented line, we are now using a logo
		//updateAvatarLabel("");
	}
}
Esempio n. 3
0
void CoreAccount::fromVariantMap(const QVariantMap &v)
{
    setAccountId((AccountId)v.value("AccountId").toInt());
    setAccountName(v.value("AccountName").toString());
    setUuid(QUuid(v.value("Uuid").toString()));
    setInternal(v.value("Internal").toBool());
    setUser(v.value("User").toString());
    setPassword(v.value("Password").toString());
    setStorePassword(v.value("StorePassword").toBool());
    setHostName(v.value("HostName").toString());
    setPort(v.value("Port").toUInt());
    setUseSsl(v.value("UseSSL").toBool());
    setProxyType((QNetworkProxy::ProxyType)v.value("ProxyType").toInt());
    setProxyUser(v.value("ProxyUser").toString());
    setProxyPassword(v.value("ProxyPassword").toString());
    setProxyHostName(v.value("ProxyHostName").toString());
    setProxyPort(v.value("ProxyPort").toUInt());

    _storePassword = !password().isEmpty();
}