//----------------------------------------------------------------------------- PlotWindow::PlotWindow(COutputHandlerPlot * pHandler, const CPlotSpecification* ptrSpec, CopasiUI3Window * pMainWindow): CWindowInterface(), mpPlot(NULL), mpHandler(pHandler), mpMainWindow(pMainWindow), mpWindowMenu(NULL), mpaCloseWindow(NULL), mpaShowAll(NULL), mpaHideAll(NULL), mpaPrint(NULL), mpaSaveImage(NULL), mpaSaveData(NULL), mpaZoomOut(NULL), mpaToggleLogX(NULL), mpaToggleLogY(NULL), initializing(false) { this->resize(640, 480); this->setWindowTitle(("COPASI Plot: " + ptrSpec->getTitle()).c_str()); #ifndef Darwin setWindowIcon(CQIconResource::icon(CQIconResource::copasi)); #endif // not Darwin // set up the GUI - the toolbar createActions(); createMenus(); createToolBar(); mpPlot = new CopasiPlot(ptrSpec, this); setCentralWidget(mpPlot); addToMainWindow(mpMainWindow); }
SliderDialog::SliderDialog(QWidget* parent, const char* name, bool modal, Qt::WFlags fl): CWindowInterface(parent, fl), mpParentWindow(NULL), mpContextMenu(NULL), mpCurrSlider(NULL), mSliderMap(), mTaskMap(), mCurrentFolderId(0), mSliderValueChanged(false), mSliderPressed(false), mFramework(0), mChanged(false) { #ifndef Darwin setWindowIcon(CQIconResource::icon(CQIconResource::copasi)); #endif // not Darwin setupUi(this); addToMainWindow(mpParentWindow); setObjectName(QString::fromUtf8(name)); setWindowTitle("Slider Window"); mpSliderBox->layout()->addItem(new QSpacerItem(0, 5, QSizePolicy::Minimum, QSizePolicy::Expanding)); this->mpContextMenu = new QMenu(this); mpaCreateNewSlider = this->mpContextMenu->addAction("Add New Slider", this, SLOT(createNewSlider())); mpaRemoveSlider = this->mpContextMenu->addAction("Remove Slider", this, SLOT(removeSlider())); mpaEditSlider = this->mpContextMenu->addAction("Edit Slider", this, SLOT(editSlider())); mpaResetValue = this->mpContextMenu->addAction("Reset Value", this, SLOT(resetValue())); mpaSetDefault = this->mpContextMenu->addAction("Set new default value", this, SLOT(setDefault())); this->mSliderMap[C_INVALID_INDEX].push_back(new QLabel("<p>There are no sliders available for this task. If you select one of the tasks that supports sliders in the copasi object tree, this dialog will become active.</p>", mpSliderBox)); this->mTaskMap[23] = &SliderDialog::runTimeCourse; this->mTaskMap[21] = &SliderDialog::runSteadyStateTask; this->mTaskMap[31] = &SliderDialog::runScanTask; this->mTaskMap[24] = &SliderDialog::runMCATask; this->mTaskMap[35] = &SliderDialog::runLNATask; this->mTaskMap[33] = &SliderDialog::runParameterEstimationTask; this->mTaskMap[32] = &SliderDialog::runOptimizationTask; this->mTaskMap[28] = &SliderDialog::runCrossSectionTask; connect(this->mpRunTaskButton, SIGNAL(clicked()), this, SLOT(runTask())); connect(this->mpNewSliderButton, SIGNAL(clicked()), this, SLOT(createNewSlider())); this->setCurrentFolderId(C_INVALID_INDEX); init(); }