/**
  * @brief Test current connection
  */
 void ConnectionDialog::testConnection()
 {
     if(validateAndApply()){
         ConnectionDiagnosticDialog diag(_connection);
         diag.exec();
     }
 }
Esempio n. 2
0
void ClusterDialog::discoveryCluster() {
  ConnectionListWidgetItem* currentItem = dynamic_cast<ConnectionListWidgetItem*>(list_widget_->currentItem());  // +

  // Do nothing if no item selected
  if (!currentItem) {
    return;
  }

  if (!validateAndApply()) {
    return;
  }

  DiscoveryClusterDiagnosticDialog diag(this, currentItem->connection(), cluster_connection_);
  int result = diag.exec();
  if (result == QDialog::Accepted) {
    std::vector<ConnectionListWidgetItemDiscovered*> conns = diag.selectedConnections();
    for (size_t i = 0; i < conns.size(); ++i) {
      proxy::IConnectionSettingsBaseSPtr it = conns[i]->connection();
      addConnection(it);
    }
  }
}
Esempio n. 3
0
void ClusterDialog::accept() {
  if (validateAndApply()) {
    QDialog::accept();
  }
}
 /**
  * @brief Accept() is called when user agree with entered data.
  */
 void ConnectionDialog::accept()
 {
     if(validateAndApply()){
         QDialog::accept();
     }
 }