Exemple #1
0
void MeshLayerEditDialog::nextButtonPressed()
{
	_layerEdit->setEnabled(false);
	_nextButton->setEnabled(false);
	_nLayerExplanation->setText("");
	_n_layers  = static_cast<unsigned>(_layerEdit->text().toInt());

	if (_n_layers == 0)
		this->createWithRasters();
	else
	{
		QVBoxLayout* _radiobuttonLayout (new QVBoxLayout(_radioButtonBox));
		QRadioButton* selectButton1 (new QRadioButton("Add layers based on raster files", _radioButtonBox));
		QRadioButton* selectButton2 (new QRadioButton("Add layers with static thickness", _radioButtonBox));
		_radioButtonBox = new QGroupBox(this);
		_radiobuttonLayout->addWidget(selectButton1);
		_radiobuttonLayout->addWidget(selectButton2);
		_radioButtonBox->setLayout(_radiobuttonLayout);
		gridLayoutLayerMapping->addWidget(_radioButtonBox, 2, 0, 1, 3);
		// add an empty line to better arrange the following information
		gridLayoutLayerMapping->addWidget(_nLayerExplanation, 3, 0);
		connect(selectButton1, SIGNAL(pressed()), this, SLOT(createWithRasters()));
		connect(selectButton2, SIGNAL(pressed()), this, SLOT(createStatic()));
	}
}
void MshEditDialog::nextButtonPressed()
{
	_layerEdit->setEnabled(false);
	_nextButton->setEnabled(false);
	_nLayerExplanation->setText("");
	_n_layers = _layerEdit->text().toInt();

	// configure group box + layout (will be needed in the next step)
	_layerBox = new QGroupBox;
	this->_layerSelectionLayout->setMargin(10);
	this->_layerSelectionLayout->setColumnMinimumWidth(2,10);
	this->_layerSelectionLayout->setColumnStretch(0, 80);
	this->_layerSelectionLayout->setColumnStretch(1, 200);
	this->_layerSelectionLayout->setColumnStretch(2, 10);

	if (_n_layers > 0)
	{
		_radioButtonBox = new QGroupBox;
		_radiobuttonLayout->addWidget(_selectButton1);
		_radiobuttonLayout->addWidget(_selectButton2);
		_radioButtonBox->setLayout(_radiobuttonLayout);
		gridLayoutLayerMapping->addWidget(_radioButtonBox, 2, 0, 1, 3);
		// add an empty line to better arrange the following information
		gridLayoutLayerMapping->addWidget(_nLayerExplanation, 3, 0);
		connect(_selectButton1, SIGNAL(pressed()), this, SLOT(createWithRasters()));
		connect(_selectButton2, SIGNAL(pressed()), this, SLOT(createStatic()));
	}
	else
		this->createWithRasters();


}
Exemple #3
0
void MeshLayerEditDialog::nextButtonPressed()
{
    _n_layers  = static_cast<unsigned>(_layerEdit->text().toInt());

    if (_n_layers < 1)
    {
        OGSError::box("Add the number of layers to add (at least 1)");
        return;
    }

    _layerEdit->setEnabled(false);
    _nextButton->setEnabled(false);

    QVBoxLayout* _radiobuttonLayout (new QVBoxLayout(_radioButtonBox));
    QRadioButton* selectButton1 (new QRadioButton("Add layers based on raster files", _radioButtonBox));
    QRadioButton* selectButton2 (new QRadioButton("Add layers with static thickness", _radioButtonBox));
    _radioButtonBox = new QGroupBox(this);
    _radiobuttonLayout->addWidget(selectButton1);
    _radiobuttonLayout->addWidget(selectButton2);
    _radioButtonBox->setLayout(_radiobuttonLayout);
    gridLayoutLayerMapping->addWidget(_radioButtonBox, 2, 0, 1, 3);
    connect(selectButton1, SIGNAL(pressed()), this, SLOT(createWithRasters()));
    connect(selectButton2, SIGNAL(pressed()), this, SLOT(createStatic()));
}