/** * Constructs a CQMathMatrixWidget which is a child of 'parent', with the * name 'name' and widget flags set to 'f'. */ CQMathMatrixWidget::CQMathMatrixWidget(QWidget* parent) : CopasiWidget(parent) { setupUi(this); CColorScaleSimple * tcs = new CColorScaleSimple(); mpArrayWidget1->setColorCoding(tcs); tcs->setMinMax(-1.5, 1.5); mpArrayWidget1->setColorScalingAutomatic(false); tcs = new CColorScaleSimple(); mpArrayWidget2->setColorCoding(tcs); tcs->setMinMax(-1.5, 1.5); mpArrayWidget2->setColorScalingAutomatic(false); tcs = new CColorScaleSimple(); mpArrayWidget3->setColorCoding(tcs); tcs->setMinMax(-1.5, 1.5); mpArrayWidget3->setColorScalingAutomatic(false); #ifdef _DERIV_TEST_ connect(mpDerivButton, SIGNAL(clicked()), this, SLOT(slotDerivButtonPressed())); #else if (mpTabWidget->count()) mpTabWidget->removeTab(mpTabWidget->count() - 1); #endif }
/** * Constructs a CQMathMatrixWidget which is a child of 'parent', with the * name 'name' and widget flags set to 'f'. */ CQMathMatrixWidget::CQMathMatrixWidget(QWidget* parent) : CopasiWidget(parent) , mLabelTitle(NULL) , mJacobian() , mJacobianRed() , eigenValues() , mpJacobianAnn(NULL) , mpJacobianAnnRed(NULL) { setupUi(this); CColorScaleSimple * tcs = new CColorScaleSimple(); mpArrayWidget1->setColorCoding(tcs); tcs->setMinMax(-1.5, 1.5); mpArrayWidget1->setColorScalingAutomatic(false); tcs = new CColorScaleSimple(); mpArrayWidget2->setColorCoding(tcs); tcs->setMinMax(-1.5, 1.5); mpArrayWidget2->setColorScalingAutomatic(false); tcs = new CColorScaleSimple(); mpArrayWidget3->setColorCoding(tcs); tcs->setMinMax(-1.5, 1.5); mpArrayWidget3->setColorScalingAutomatic(false); #ifdef _DERIV_TEST_ connect(mpDerivButton, SIGNAL(clicked()), this, SLOT(slotDerivButtonPressed())); #else if (mpTabWidget->count()) mpTabWidget->removeTab(mpTabWidget->count() - 1); #endif mpJacobianAnn = new CDataArray("Jacobian (complete system)", NULL, new CMatrixInterface<CMatrix<C_FLOAT64> >(&mJacobian), true); mpJacobianAnn->setMode(CDataArray::Mode::Objects); mpJacobianAnn->setDescription(""); mpJacobianAnn->setDimensionDescription(0, "Variables of the system, including dependent species"); mpJacobianAnn->setDimensionDescription(1, "Variables of the system, including dependent species"); mpJacobianAnnotationWidget->setColorCoding(new CColorScaleBiLog()); mpJacobianAnnotationWidget->setColorScalingAutomatic(true); mpJacobianAnnotationWidget->setLegendEnabled(false); mpJacobianAnnRed = new CDataArray("Jacobian (reduced system)", NULL, new CMatrixInterface<CMatrix<C_FLOAT64> >(&mJacobianRed), true); mpJacobianAnnRed->setMode(CDataArray::Mode::Objects); mpJacobianAnnRed->setDescription(""); mpJacobianAnnRed->setDimensionDescription(0, "Independent variables of the system"); mpJacobianAnnRed->setDimensionDescription(1, "Independent variables of the system"); mpRedJacobianAnnotationWidget->setColorCoding(new CColorScaleBiLog()); mpRedJacobianAnnotationWidget->setColorScalingAutomatic(true); mpRedJacobianAnnotationWidget->setLegendEnabled(false); }
void CQTSSAResultSubWidget::slotTableChanged() { std::string name = static_cast<std::string >(mpBox1->currentText().toUtf8()); if (name == "Reactions slow space" || name == "Reactions contribution to the mode" || name == "Reactions distribution between modes " || name == "Reactions fast space" || name == "Participation Index" || name == "Fast Participation Index" || name == "Slow Participation Index" || name == "Normed Participation Index (by column)" || name == "Normed Participation Index (by row)" || name == "Importance Index" || name == "Normed Importance Index (by row)") { CColorScaleSimple* tcs = new CColorScaleSimple(); tcs->setSymmetric(true); mpArrayWidget->setColorCoding(tcs); mpArrayWidget->setColorScalingAutomatic(true); } else { //CColorScaleAdvanced * tcs = new CColorScaleAdvanced() ; //tcs->setColorMin(QColor(240, 240, 240)); //tcs->setColorMax(QColor(0, 255, 0)); CColorScaleSimple* tcs = new CColorScaleSimple(); tcs->setSymmetric(true); mpArrayWidget->setColorCoding(tcs); mpArrayWidget->setColorScalingAutomatic(true); } pResult = pMethod->getTable(name); mpArrayWidget->setArrayAnnotation(pResult); }