コード例 #1
0
void connection::loadValuesFromConnection(ConnectionBridge * c)
{
	inEditMode = true;

    RedisConnectionConfig config = c->getConfig();

    ui.nameEdit->setText(config.name);
    ui.hostEdit->setText(config.host);
    ui.portSpinBox->setValue(config.port);
    ui.authEdit->setText(config.auth);

    if (config.useSshTunnel()) {
		ui.useSshTunnel->setCheckState(Qt::Checked);
        ui.sshHost->setText(config.sshHost);
        ui.sshUser->setText(config.sshUser);
        ui.sshPass->setText(config.sshPassword);
        ui.sshPort->setValue(config.sshPort);
	}
}
コード例 #2
0
void ConnectionWindow::loadValuesFromConnection(ConnectionBridge * c)
{
    inEditMode = true;

    RedisConnectionConfig config = c->getConfig();

    ui.nameEdit->setText(config.name);
    ui.hostEdit->setText(config.host);
    ui.portSpinBox->setValue(config.port);
    ui.authEdit->setText(config.auth);
    ui.namespaceSeparator->setText(config.namespaceSeparator);
    ui.connectionTimeout->setValue(config.connectionTimeout / 1000);
    ui.executionTimeout->setValue(config.executeTimeout / 1000);

    if (config.useSshTunnel()) {
        ui.useSshTunnel->setCheckState(Qt::Checked);
        ui.sshHost->setText(config.sshHost);
        ui.sshUser->setText(config.sshUser);
        ui.sshPass->setText(config.sshPassword);
        ui.sshPort->setValue(config.sshPort);
    }
}