コード例 #1
0
ファイル: qgsauthconfigselect.cpp プロジェクト: giohappy/QGIS
void QgsAuthConfigSelect::loadConfig()
{
  clearConfig();
  if ( !mAuthCfg.isEmpty() && mConfigs.contains( mAuthCfg ) )
  {
    QgsAuthMethodConfig config = mConfigs.value( mAuthCfg );
    QgsAuthMethod *authmethod = QgsAuthManager::instance()->configAuthMethod( mAuthCfg );
    QString methoddesc = tr( "Missing authentication method description" );
    if ( authmethod )
    {
      methoddesc = authmethod->description();
    }
    cmbConfigSelect->setToolTip( tr( "<ul><li><b>Method type:</b> %1</li>"
                                     "<li><b>Configuration ID:</b> %2</li></ul>" ).arg( methoddesc, config.id( ) ) );
    btnConfigEdit->setEnabled( true );
    btnConfigRemove->setEnabled( true );
  }
  emit selectedConfigIdChanged( mAuthCfg );
}
コード例 #2
0
void QgsAuthConfigSelect::loadConfig()
{
  clearConfig();
  if ( !mAuthCfg.isEmpty() && mConfigs.contains( mAuthCfg ) )
  {
    QgsAuthMethodConfig config = mConfigs.value( mAuthCfg );
    QgsAuthMethod * authmethod = QgsAuthManager::instance()->configAuthMethod( mAuthCfg );
    QString methoddesc = tr( "Missing authentication method description" );
    if ( authmethod )
    {
      methoddesc = authmethod->description();
    }
    leConfigMethodDesc->setText( methoddesc );
    leConfigMethodDesc->setCursorPosition( 0 ); // left justify
    leConfigId->setText( config.id() );
    btnConfigEdit->setEnabled( true );
    btnConfigRemove->setEnabled( true );
  }
  emit selectedConfigIdChanged( mAuthCfg );
}