// ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- void VolumeDataContainerInfoWidget::beforePreflight() { if (NULL == getFilter()) { return; } if(m_DidCausePreflight == true) { // std::cout << "*** VolumeDataContainerInfoWidget already caused a preflight, just returning" << std::endl; return; } dataContainerList->blockSignals(true); // Reset all the combo box widgets to have the default selection of the first index in the list populateComboBoxes(); dataContainerList->blockSignals(false); if (m_FilterParameter != NULL) { IntVec3_t data = getFilter()->property(PROPERTY_NAME_AS_CHAR).value<IntVec3_t>(); QString str = QString("0-%1 x 0-%2 x 0-%3").arg(data.x - 1).arg(data.y - 1).arg(data.z - 1); voxelExtentsLabel->setText(str); } if (m_FilterParameter != NULL) { FloatVec3_t data = getFilter()->property(m_FilterParameter->getResolutionProperty().toLatin1().constData()).value<FloatVec3_t>(); QString str = QString("%1 x %2 x %3").arg(data.x).arg(data.y).arg(data.z); resolutionLabel->setText(str); } }
// ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- void PhaseTypeSelectionWidget::setupGui() { if(getFilter() == NULL) { return; } // Catch when the filter is about to execute the preflight connect(getFilter(), SIGNAL(preflightAboutToExecute()), this, SLOT(beforePreflight())); // Catch when the filter is finished running the preflight connect(getFilter(), SIGNAL(preflightExecuted()), this, SLOT(afterPreflight())); // Catch when the filter wants its values updated connect(getFilter(), SIGNAL(updateFilterParameters(AbstractFilter*)), this, SLOT(filterNeedsInputParameters(AbstractFilter*))); label->setText(m_FilterParameter->getHumanLabel() ); dataContainerCombo->blockSignals(true); attributeMatrixCombo->blockSignals(true); dataContainerCombo->clear(); attributeMatrixCombo->clear(); // Now let the gui send signals like normal dataContainerCombo->blockSignals(false); attributeMatrixCombo->blockSignals(false); populateComboBoxes(); updatePhaseComboBoxes(); }
// ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- void DataArraySelectionWidget::setupGui() { // Sanity Check the filter and the filter parameter if(getFilter() == NULL) { return; } if (getFilterParameter() == NULL) { return; } // Generate the text for the QLabel label->setText(getFilterParameter()->getHumanLabel() ); // Get the default path from the Filter instance to cache m_DefaultPath = getFilter()->property(PROPERTY_NAME_AS_CHAR).value<DataArrayPath>(); // dataContainerCombo->addItem(m_DefaultPath.getDataContainerName()); // attributeMatrixCombo->addItem(m_DefaultPath.getAttributeMatrixName() ); // attributeArrayCombo->addItem(m_DefaultPath.getDataArrayName() ); // Block Signals from the ComboBoxes while we clear them dataContainerCombo->blockSignals(true); attributeMatrixCombo->blockSignals(true); attributeArrayCombo->blockSignals(true); dataContainerCombo->clear(); attributeMatrixCombo->clear(); attributeArrayCombo->clear(); dataContainerCombo->blockSignals(false); attributeMatrixCombo->blockSignals(false); attributeArrayCombo->blockSignals(false); populateComboBoxes(); // Lastly, hook up the filter's signals and slots to our own signals and slots // Catch when the filter is about to execute the preflight connect(getFilter(), SIGNAL(preflightAboutToExecute()), this, SLOT(beforePreflight())); // Catch when the filter is finished running the preflight connect(getFilter(), SIGNAL(preflightExecuted()), this, SLOT(afterPreflight())); // Catch when the filter wants its values updated connect(getFilter(), SIGNAL(updateFilterParameters(AbstractFilter*)), this, SLOT(filterNeedsInputParameters(AbstractFilter*))); }
// ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- void DataContainerSelectionWidget::beforePreflight() { if (NULL == getFilter()) { return; } if(m_DidCausePreflight == true) { std::cout << "*** DataContainerSelectionWidget already caused a preflight, just returning" << std::endl; return; } dataContainerCombo->blockSignals(true); // Reset all the combo box widgets to have the default selection of the first index in the list populateComboBoxes(); dataContainerCombo->blockSignals(false); }
// ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- void VolumeDataContainerInfoWidget::setupGui() { if(getFilter() == NULL) { return; } // Catch when the filter is about to execute the preflight connect(getFilter(), SIGNAL(preflightAboutToExecute()), this, SLOT(beforePreflight())); // Catch when the filter is finished running the preflight connect(getFilter(), SIGNAL(preflightExecuted()), this, SLOT(afterPreflight())); // Catch when the filter wants its values updated connect(getFilter(), SIGNAL(updateFilterParameters(AbstractFilter*)), this, SLOT(filterNeedsInputParameters(AbstractFilter*))); if (m_FilterParameter == NULL) { return; } label->setText(m_FilterParameter->getHumanLabel() ); dataContainerList->blockSignals(true); dataContainerList->clear(); // Now let the gui send signals like normal dataContainerList->blockSignals(false); if (m_FilterParameter != NULL) { IntVec3_t data = getFilter()->property(PROPERTY_NAME_AS_CHAR).value<IntVec3_t>(); QString str = QString("%1 x %2 x %3").arg(data.x).arg(data.y).arg(data.z); voxelExtentsLabel->setText(str); } if (m_FilterParameter != NULL) { FloatVec3_t data = getFilter()->property(m_FilterParameter->getResolutionProperty().toLatin1().constData()).value<FloatVec3_t>(); QString str = QString("%1, %2, %3").arg(data.x).arg(data.y).arg(data.z); resolutionLabel->setText(str); } populateComboBoxes(); }
// ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- void DataArrayCreationWidget::setupGui() { blockSignals(true); if (getFilterParameter() != NULL) { label->setText(getFilterParameter()->getHumanLabel() ); QString str = getFilter()->property(PROPERTY_NAME_AS_CHAR).toString(); dataArrayName->setText(str); } blockSignals(false); applyChangesBtn->setVisible(false); // Do not allow the user to put a forward slash into the attributeMatrixName line edit dataArrayName->setValidator(new QRegularExpressionValidator(QRegularExpression("[^/]*"), this)); // Catch when the filter is about to execute the preflight connect(getFilter(), SIGNAL(preflightAboutToExecute()), this, SLOT(beforePreflight())); // Catch when the filter is finished running the preflight connect(getFilter(), SIGNAL(preflightExecuted()), this, SLOT(afterPreflight())); // Catch when the filter wants its values updated connect(getFilter(), SIGNAL(updateFilterParameters(AbstractFilter*)), this, SLOT(filterNeedsInputParameters(AbstractFilter*))); connect(dataArrayName, SIGNAL(textChanged(const QString&)), this, SLOT(widgetChanged(const QString&))); dataContainerCombo->blockSignals(true); attributeMatrixCombo->blockSignals(true); dataArrayName->blockSignals(true); dataContainerCombo->clear(); attributeMatrixCombo->clear(); dataArrayName->clear(); // Now let the gui send signals like normal dataContainerCombo->blockSignals(false); attributeMatrixCombo->blockSignals(false); dataArrayName->blockSignals(false); populateComboBoxes(); }
// ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- void PhaseTypeSelectionWidget::beforePreflight() { if (NULL == getFilter()) { return; } if(m_DidCausePreflight == true) { return; } dataContainerCombo->blockSignals(true); attributeMatrixCombo->blockSignals(true); populateComboBoxes(); dataContainerCombo->blockSignals(false); attributeMatrixCombo->blockSignals(false); }
// ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- void DataArraySelectionWidget::beforePreflight() { if (NULL == getFilter()) { return; } if(m_DidCausePreflight == true) { // std::cout << "*** DataArraySelectionWidget already caused a preflight, just returning" << std::endl; return; } dataContainerCombo->blockSignals(true); attributeMatrixCombo->blockSignals(true); attributeArrayCombo->blockSignals(true); populateComboBoxes(); dataContainerCombo->blockSignals(false); attributeMatrixCombo->blockSignals(false); attributeArrayCombo->blockSignals(false); }
Form::Form(QWidget *parent) : QWidget(parent), ui(new Ui::Form), dialog(new Dialog) { setFixedSize(680, 600); ui->setupUi(this); enableExams(); populateComboBoxes(); populateSpinBoxes(); QIntValidator *validator = new QIntValidator; ui->lineExamNumber->setValidator(validator); ui->lineExamNumber2->setValidator(validator); ui->lineAppNumber->setFocus(); QObject::connect(ui->pushButtonAddSubject, SIGNAL(clicked()), this, SLOT(viewDialog())); QObject::connect(ui->pushButtonAddSubject2, SIGNAL(clicked()), this, SLOT(viewDialog2())); QObject::connect(ui->pushButtonCancel, SIGNAL(clicked()), this, SLOT(close())); QObject::connect(ui->pushButtonSave, SIGNAL(clicked()), this, SLOT(acceptForm())); QObject::connect(ui->checkBoxTwoSittings, SIGNAL(toggled(bool)), this, SLOT(enableExams())); QObject::connect(ui->pushButtonRemove, SIGNAL(clicked()), this, SLOT(removeSubject())); QObject::connect(ui->pushButtonRemove2, SIGNAL(clicked()), this, SLOT(removeSubject2())); }