// ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- void DataContainerArrayProxyWidget::setupGui() { connect(getFilter(), SIGNAL(preflightAboutToExecute()), this, SLOT(beforePreflight())); connect(getFilter(), SIGNAL(preflightExecuted()), this, SLOT(afterPreflight())); connect(getFilter(), SIGNAL(updateFilterParameters(AbstractFilter*)), this, SLOT(filterNeedsInputParameters(AbstractFilter*))); // Put in a QStandardItemModel QAbstractItemModel* oldModel = dcaProxyView->model(); QStandardItemModel* model = new QStandardItemModel; dcaProxyView->setModel(model); delete oldModel; connect(model, SIGNAL(itemChanged(QStandardItem*)), this, SLOT(itemActivated(QStandardItem*))); if (getFilterParameter() != NULL) { label->setText(getFilterParameter()->getHumanLabel() ); //If the filter is just being dragged into the pipeline then the filter is going to have an empty // Proxy object at which point nothing is going to be put into the lists. But if the Filter was // initialized from a pipeline file then it might actually have a proxy so we need to do something // with that proxy? m_DcaProxy = getFilter()->property(PROPERTY_NAME_AS_CHAR).value<DataContainerArrayProxy>(); //m_DcaProxy.print("DataContainerArrayProxyWidget::setupGui()"); } }
// ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- void ChoiceWidget::setupGui() { // 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(value, SIGNAL(currentIndexChanged(int)), this, SLOT(widgetChanged(int) ) ); if (getFilterParameter() != NULL) { label->setText(getFilterParameter()->getHumanLabel() ); // setup the list of choices for the widget ChoiceFilterParameter* choice = dynamic_cast<ChoiceFilterParameter*>(getFilterParameter()); if(choice) { QList<QString> choices = choice->getChoices().toList(); value->blockSignals(true); value->addItems(choices); value->blockSignals(false); } // Get the Default value from the filter int i = getFilter()->property(PROPERTY_NAME_AS_CHAR).toInt(); value->setCurrentIndex(i); } }
// ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- void Symmetric6x6Widget::setupGui() { // 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(v11, SIGNAL(textChanged(const QString&)), this, SLOT(widgetChanged(const QString&) ) ); connect(v12, SIGNAL(textChanged(const QString&)), this, SLOT(widgetChanged(const QString&) ) ); connect(v13, SIGNAL(textChanged(const QString&)), this, SLOT(widgetChanged(const QString&) ) ); connect(v14, SIGNAL(textChanged(const QString&)), this, SLOT(widgetChanged(const QString&) ) ); connect(v15, SIGNAL(textChanged(const QString&)), this, SLOT(widgetChanged(const QString&) ) ); connect(v16, SIGNAL(textChanged(const QString&)), this, SLOT(widgetChanged(const QString&) ) ); connect(v22, SIGNAL(textChanged(const QString&)), this, SLOT(widgetChanged(const QString&) ) ); connect(v23, SIGNAL(textChanged(const QString&)), this, SLOT(widgetChanged(const QString&) ) ); connect(v24, SIGNAL(textChanged(const QString&)), this, SLOT(widgetChanged(const QString&) ) ); connect(v25, SIGNAL(textChanged(const QString&)), this, SLOT(widgetChanged(const QString&) ) ); connect(v26, SIGNAL(textChanged(const QString&)), this, SLOT(widgetChanged(const QString&) ) ); connect(v33, SIGNAL(textChanged(const QString&)), this, SLOT(widgetChanged(const QString&) ) ); connect(v34, SIGNAL(textChanged(const QString&)), this, SLOT(widgetChanged(const QString&) ) ); connect(v35, SIGNAL(textChanged(const QString&)), this, SLOT(widgetChanged(const QString&) ) ); connect(v36, SIGNAL(textChanged(const QString&)), this, SLOT(widgetChanged(const QString&) ) ); connect(v44, SIGNAL(textChanged(const QString&)), this, SLOT(widgetChanged(const QString&) ) ); connect(v45, SIGNAL(textChanged(const QString&)), this, SLOT(widgetChanged(const QString&) ) ); connect(v46, SIGNAL(textChanged(const QString&)), this, SLOT(widgetChanged(const QString&) ) ); connect(v55, SIGNAL(textChanged(const QString&)), this, SLOT(widgetChanged(const QString&) ) ); connect(v56, SIGNAL(textChanged(const QString&)), this, SLOT(widgetChanged(const QString&) ) ); connect(v66, SIGNAL(textChanged(const QString&)), this, SLOT(widgetChanged(const QString&) ) ); QDoubleValidator* v11Val = new QDoubleValidator(v11); v11->setValidator(v11Val); QDoubleValidator* v12Val = new QDoubleValidator(v12); v12->setValidator(v12Val); QDoubleValidator* v13Val = new QDoubleValidator(v13); v13->setValidator(v13Val); QDoubleValidator* v14Val = new QDoubleValidator(v14); v14->setValidator(v14Val); QDoubleValidator* v15Val = new QDoubleValidator(v15); v15->setValidator(v15Val); QDoubleValidator* v16Val = new QDoubleValidator(v16); v16->setValidator(v16Val); QDoubleValidator* v22Val = new QDoubleValidator(v22); v22->setValidator(v22Val); QDoubleValidator* v23Val = new QDoubleValidator(v23); v23->setValidator(v23Val); QDoubleValidator* v24Val = new QDoubleValidator(v24); v24->setValidator(v24Val); QDoubleValidator* v25Val = new QDoubleValidator(v25); v25->setValidator(v25Val); QDoubleValidator* v26Val = new QDoubleValidator(v26); v26->setValidator(v26Val); QDoubleValidator* v33Val = new QDoubleValidator(v33); v33->setValidator(v33Val); QDoubleValidator* v34Val = new QDoubleValidator(v34); v34->setValidator(v34Val); QDoubleValidator* v35Val = new QDoubleValidator(v35); v35->setValidator(v35Val); QDoubleValidator* v36Val = new QDoubleValidator(v36); v36->setValidator(v36Val); QDoubleValidator* v44Val = new QDoubleValidator(v44); v44->setValidator(v44Val); QDoubleValidator* v45Val = new QDoubleValidator(v45); v45->setValidator(v45Val); QDoubleValidator* v46Val = new QDoubleValidator(v46); v46->setValidator(v46Val); QDoubleValidator* v55Val = new QDoubleValidator(v55); v55->setValidator(v55Val); QDoubleValidator* v56Val = new QDoubleValidator(v56); v56->setValidator(v56Val); QDoubleValidator* v66Val = new QDoubleValidator(v66); v66->setValidator(v66Val); if (getFilterParameter() != NULL) { label->setText(getFilterParameter()->getHumanLabel() ); FloatVec21_t data = getFilter()->property(PROPERTY_NAME_AS_CHAR).value<FloatVec21_t>(); v11->setText( QString::number(data.v11) ); v12->setText( QString::number(data.v12) ); v13->setText( QString::number(data.v13) ); v14->setText( QString::number(data.v14) ); v15->setText( QString::number(data.v15) ); v16->setText( QString::number(data.v16) ); v22->setText( QString::number(data.v22) ); v23->setText( QString::number(data.v23) ); v24->setText( QString::number(data.v24) ); v25->setText( QString::number(data.v25) ); v26->setText( QString::number(data.v26) ); v33->setText( QString::number(data.v33) ); v34->setText( QString::number(data.v34) ); v35->setText( QString::number(data.v35) ); v36->setText( QString::number(data.v36) ); v44->setText( QString::number(data.v44) ); v45->setText( QString::number(data.v45) ); v46->setText( QString::number(data.v46) ); v55->setText( QString::number(data.v55) ); v56->setText( QString::number(data.v56) ); v66->setText( QString::number(data.v66) ); } //connect combobox to symmetry state connect(comboBox, SIGNAL(currentIndexChanged( int )), this, SLOT( changeSym( int ) ) ); clearSym(); changeSym(comboBox->currentIndex()); }
// ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- void FourthOrderPolynomialWidget::setupGui() { // 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(c40, SIGNAL(textChanged(const QString&)), this, SLOT(widgetChanged(const QString&) ) ); connect(c04, SIGNAL(textChanged(const QString&)), this, SLOT(widgetChanged(const QString&) ) ); connect(c31, SIGNAL(textChanged(const QString&)), this, SLOT(widgetChanged(const QString&) ) ); connect(c13, SIGNAL(textChanged(const QString&)), this, SLOT(widgetChanged(const QString&) ) ); connect(c22, SIGNAL(textChanged(const QString&)), this, SLOT(widgetChanged(const QString&) ) ); connect(c30, SIGNAL(textChanged(const QString&)), this, SLOT(widgetChanged(const QString&) ) ); connect(c03, SIGNAL(textChanged(const QString&)), this, SLOT(widgetChanged(const QString&) ) ); connect(c21, SIGNAL(textChanged(const QString&)), this, SLOT(widgetChanged(const QString&) ) ); connect(c12, SIGNAL(textChanged(const QString&)), this, SLOT(widgetChanged(const QString&) ) ); connect(c20, SIGNAL(textChanged(const QString&)), this, SLOT(widgetChanged(const QString&) ) ); connect(c02, SIGNAL(textChanged(const QString&)), this, SLOT(widgetChanged(const QString&) ) ); connect(c11, SIGNAL(textChanged(const QString&)), this, SLOT(widgetChanged(const QString&) ) ); connect(c10, SIGNAL(textChanged(const QString&)), this, SLOT(widgetChanged(const QString&) ) ); connect(c01, SIGNAL(textChanged(const QString&)), this, SLOT(widgetChanged(const QString&) ) ); connect(c00, SIGNAL(textChanged(const QString&)), this, SLOT(widgetChanged(const QString&) ) ); QDoubleValidator* c40Val = new QDoubleValidator(c40); c40->setValidator(c40Val); QDoubleValidator* c04Val = new QDoubleValidator(c04); c04->setValidator(c04Val); QDoubleValidator* c31Val = new QDoubleValidator(c31); c31->setValidator(c31Val); QDoubleValidator* c13Val = new QDoubleValidator(c13); c13->setValidator(c13Val); QDoubleValidator* c22Val = new QDoubleValidator(c22); c22->setValidator(c22Val); QDoubleValidator* c30Val = new QDoubleValidator(c30); c30->setValidator(c30Val); QDoubleValidator* c03Val = new QDoubleValidator(c03); c03->setValidator(c03Val); QDoubleValidator* c21Val = new QDoubleValidator(c21); c21->setValidator(c21Val); QDoubleValidator* c12Val = new QDoubleValidator(c12); c12->setValidator(c12Val); QDoubleValidator* c20Val = new QDoubleValidator(c20); c20->setValidator(c20Val); QDoubleValidator* c02Val = new QDoubleValidator(c02); c02->setValidator(c02Val); QDoubleValidator* c11Val = new QDoubleValidator(c11); c11->setValidator(c11Val); QDoubleValidator* c10Val = new QDoubleValidator(c10); c10->setValidator(c10Val); QDoubleValidator* c01Val = new QDoubleValidator(c01); c01->setValidator(c01Val); QDoubleValidator* c00Val = new QDoubleValidator(c00); c00->setValidator(c00Val); if (getFilterParameter() != NULL) { label->setText(getFilterParameter()->getHumanLabel() ); Float4thOrderPoly_t data = getFilter()->property(PROPERTY_NAME_AS_CHAR).value<Float4thOrderPoly_t>(); c40->setText( QString::number(data.c40) ); c04->setText( QString::number(data.c04) ); c31->setText( QString::number(data.c31) ); c13->setText( QString::number(data.c13) ); c22->setText( QString::number(data.c22) ); c30->setText( QString::number(data.c30) ); c03->setText( QString::number(data.c03) ); c21->setText( QString::number(data.c21) ); c12->setText( QString::number(data.c12) ); c20->setText( QString::number(data.c20) ); c02->setText( QString::number(data.c02) ); c11->setText( QString::number(data.c11) ); c10->setText( QString::number(data.c10) ); c01->setText( QString::number(data.c01) ); c00->setText( QString::number(data.c00) ); } }