Exemplo n.º 1
0
 /**
  * @brief Test current connection
  */
 void ConnectionDialog::testConnection()
 {
     if(validateAndApply()){
         ConnectionDiagnosticDialog diag(_connection);
         diag.exec();
     }
 }
Exemplo 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);
    }
  }
}
Exemplo n.º 3
0
void ClusterDialog::accept() {
  if (validateAndApply()) {
    QDialog::accept();
  }
}
Exemplo n.º 4
0
 /**
  * @brief Accept() is called when user agree with entered data.
  */
 void ConnectionDialog::accept()
 {
     if(validateAndApply()){
         QDialog::accept();
     }
 }