//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellPathFracture::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
{
    RimFracture::defineUiOrdering(uiConfigName, uiOrdering);

    if (m_fractureTemplate())
    {
        uiOrdering.add(nameField(), caf::PdmUiOrdering::LayoutOptions(true, 3, 1));
        uiOrdering.add(&m_fractureTemplate, {true, 2, 1});
        uiOrdering.add(&m_editFractureTemplate, {false, 1, 0});
    }
    else
    {
        uiOrdering.add(nameField());
        {
            RimProject* project = nullptr;
            this->firstAncestorOrThisOfTypeAsserted(project);
            if (project->allFractureTemplates().empty())
            {
                uiOrdering.add(&m_createEllipseFractureTemplate);
                uiOrdering.add(&m_createStimPlanFractureTemplate, false);
            }
            else
            {
                uiOrdering.add(&m_fractureTemplate);
            }
        }
    }

    caf::PdmUiGroup* locationGroup = uiOrdering.addNewGroup("Location / Orientation");
    locationGroup->add(&m_measuredDepth);
    locationGroup->add(&m_azimuth);
    locationGroup->add(&m_uiWellPathAzimuth);
    locationGroup->add(&m_uiWellFractureAzimuthDiff);
    locationGroup->add(&m_wellFractureAzimuthAngleWarning);
    locationGroup->add(&m_dip);
    locationGroup->add(&m_tilt);

    caf::PdmUiGroup* propertyGroup = uiOrdering.addNewGroup("Properties");
    propertyGroup->add(&m_fractureUnit);
    propertyGroup->add(&m_stimPlanTimeIndexToPlot);
    propertyGroup->add(&m_perforationLength);
    propertyGroup->add(&m_perforationEfficiency);
    propertyGroup->add(&m_wellDiameter);

    caf::PdmUiGroup* fractureCenterGroup = uiOrdering.addNewGroup("Fracture Center Info");
    fractureCenterGroup->add(&m_uiAnchorPosition);

    uiOrdering.skipRemainingFields(true);
}
Exemple #2
0
void SupplierDlg::accept()
{
    if(le_name->text().trimmed().isEmpty() || !cb_area->currentIndex()) {
	QMessageBox::information(this,
	  trUtf8("Alta Proveedor"),
	  trUtf8("Debe llenar al menos los campos obligatorios."));
	le_name->setFocus();
	return;
    }

    if(selectedRow >= 0) {
	mapper->submit();
    } else {
	QSqlRecord record;

	QSqlField nameField("name", QVariant::String);
	QSqlField areaField("idArea", QVariant::Int);
	QSqlField addressField("address", QVariant::String);
	QSqlField locationField("location", QVariant::String);
	QSqlField phoneField("phone", QVariant::String);
	QSqlField faxField("fax", QVariant::String);
	QSqlField emailField("email", QVariant::String);
	QSqlField contactNameField("contactName", QVariant::String);
	QSqlField contactPhoneField("contactPhone", QVariant::String);

	int idA = cb_area->model()->data(cb_area->model()->index(
	  cb_area->currentIndex(), 0)).toInt();

	nameField.setValue(le_name->text());
	areaField.setValue(idA);
	addressField.setValue(le_address->text());
	locationField.setValue(le_location->text());
	phoneField.setValue(le_phone->text());
	faxField.setValue(le_fax->text());
	emailField.setValue(le_email->text());
	contactNameField.setValue(le_contactName->text());
	contactPhoneField.setValue(le_contactPhone->text());

	record.append(nameField);
	record.append(areaField);
	record.append(addressField);
	record.append(locationField);
	record.append(phoneField);
	record.append(faxField);
	record.append(emailField);
	record.append(contactNameField);
	record.append(contactPhoneField);

	if(!model->insertRecord(-1, record)) {
	    model->revertAll();
	    if(errorCommon(this, SUPPLIER_WINDOW, model->lastError().number())) {
		return;
	    }
	}
    }

    QDialog::accept();
}
Exemple #3
0
//--------------------------------------------------------------------------------------------------
/// 
//--------------------------------------------------------------------------------------------------
RimPerforationInterval::RimPerforationInterval()
{
    CAF_PDM_InitObject("Perforation", ":/PerforationInterval16x16.png", "", "");

    CAF_PDM_InitField(&m_startMD,        "StartMeasuredDepth", 0.0,                             "Start MD", "", "", "");
    CAF_PDM_InitField(&m_endMD,          "EndMeasuredDepth",   0.0,                             "End MD", "", "", "");
    CAF_PDM_InitField(&m_diameter,       "Diameter",           0.216,                           "Diameter", "", "", "");
    CAF_PDM_InitField(&m_skinFactor,     "SkinFactor",         0.0,                             "Skin Factor", "", "", "");
    CAF_PDM_InitField(&m_startOfHistory, "StartOfHistory",     true,                            "All Timesteps", "", "", "");
    CAF_PDM_InitField(&m_date,           "StartDate",          QDateTime::currentDateTime(),    "Start Date", "", "", "");

    nameField()->uiCapability()->setUiReadOnly(true);
}
Exemple #4
0
//--------------------------------------------------------------------------------------------------
/// 
//--------------------------------------------------------------------------------------------------
RimFishboneWellPathCollection::RimFishboneWellPathCollection()
{
    CAF_PDM_InitObject("WellPathCompletions", ":/FishBoneGroupFromFile16x16.png", "", "");

    nameField()->uiCapability()->setUiHidden(true);
    this->setName("Imported Laterals");

    CAF_PDM_InitFieldNoDefault(&m_wellPaths, "WellPaths", "Imported Laterals", "", "", "");
    m_wellPaths.uiCapability()->setUiHidden(true);

    CAF_PDM_InitFieldNoDefault(&m_pipeProperties, "PipeProperties", "Pipe Properties", "", "", "");
    m_pipeProperties.uiCapability()->setUiHidden(true);
    m_pipeProperties.uiCapability()->setUiTreeHidden(true);
    m_pipeProperties.uiCapability()->setUiTreeChildrenHidden(true);
    m_pipeProperties = new RimFishbonesPipeProperties;
}
Exemple #5
0
void CustomerDlg::accept()
{
    if(le_lastName->text().trimmed().isEmpty()) {
	QMessageBox::information(this,
	  trUtf8("Datos incompletos"),
	  trUtf8("Debe llenar al menos los campos obligatorios."));
	le_lastName->setFocus();
	return;
    }

    if(selectedRow >= 0) {
	mapper->submit();
    } else {
	QSqlRecord rec;
	QSqlField lastNameFiel("lastName", QVariant::String);
	QSqlField nameField("name", QVariant::String);
	QSqlField addressField("address", QVariant::String);
	QSqlField locationField("location", QVariant::String);
	QSqlField cellPoneField("cellphone", QVariant::String);
	QSqlField phoneField("phone", QVariant::String);
	QSqlField emailField("email", QVariant::String);

	lastNameFiel.setValue(le_lastName->text());
	nameField.setValue(le_name->text());
	addressField.setValue(le_address->text());
	locationField.setValue(le_location->text());
	cellPoneField.setValue(le_cellphone->text());
	phoneField.setValue(le_phone->text());
	emailField.setValue(le_email->text());

	rec.append(lastNameFiel);
	rec.append(nameField);
	rec.append(addressField);
	rec.append(locationField);
	rec.append(cellPoneField);
	rec.append(phoneField);
	rec.append(emailField);

	if(!model->insertRecord(-1, rec)) {
	    model->revertAll();
	    if(errorCommon(this, CUSTOMER_WINDOW, model->lastError().number()))
		return;
	}
    }

    QDialog::accept();
}
void ServiceEditor::addEvent(void)
{
  connect(nameField(), SIGNAL(returnPressed ()), this, SLOT(handleReturnPressed() ) );
  connect(typeField(), SIGNAL(currentIndexChanged(const QString&)), this, SLOT(handleNodeTypeChanged( const QString& ) ) );
  connect(typeField(), SIGNAL(activated(const QString&)), this, SLOT(handleNodeTypeActivated( const QString& ) ) );
  connect(m_dataPointSearchField, SIGNAL(returnPressed()), this, SLOT(handleDataPointFieldReturnPressed()));
  connect(m_dataPointSearchField, SIGNAL(textEdited(const QString&)), this, SLOT(handleDataPointFilter(const QString&)));
  connect(m_searchDataPointButton, SIGNAL(clicked()), this, SLOT(handleDataPointSearch()));
  connect(m_addDataPointButton, SIGNAL(clicked()), this, SLOT(handleAddDataPointEntry()));
  connect(m_hostGroupFilterBox, SIGNAL(currentIndexChanged(const QString &)), this, SLOT(handleUpdateDataPointsList()));
  connect(m_actionButtonBox, SIGNAL(accepted()), this, SLOT(handleSaveClick()));
  connect(m_actionButtonBox, SIGNAL(rejected()), this, SLOT(handleCloseClick()));
  connect(m_addThresholdButton, SIGNAL(clicked()), this, SLOT(handleAddThreshold()));
  connect(m_removeThresholdButton, SIGNAL(clicked()), this, SLOT(handleRemoveThreshold()));
  connect(m_thresholdRulesBox, SIGNAL(currentIndexChanged(int)), this, SLOT(handleThresholdRulesChanged()));
  connect(m_calcRulesBox, SIGNAL(currentIndexChanged(int)), this, SLOT(handleCalcRuleChanged()));
}