void TransFunc1DKeysEditor::createConnections() { // Buttons connect(clearButton_, SIGNAL(clicked()), this, SLOT(clearButtonClicked())); connect(loadButton_, SIGNAL(clicked()), this, SLOT(loadTransferFunction())); connect(saveButton_, SIGNAL(clicked()), this, SLOT(saveTransferFunction())); connect(makeRampButton_, SIGNAL(clicked()), this, SLOT(makeRamp())); // signals from transferMappingCanvas connect(transCanvas_, SIGNAL(changed()), this, SLOT(updateTransferFunction())); connect(transCanvas_, SIGNAL(loadTransferFunction()), this, SLOT(loadTransferFunction())); connect(transCanvas_, SIGNAL(saveTransferFunction()), this, SLOT(saveTransferFunction())); connect(transCanvas_, SIGNAL(resetTransferFunction()), this, SLOT(clearButtonClicked())); connect(transCanvas_, SIGNAL(toggleInteractionMode(bool)), this, SLOT(toggleInteractionMode(bool))); // signals for colorPicker connect(transCanvas_, SIGNAL(colorChanged(const QColor&)), colorPicker_, SLOT(setCol(const QColor))); connect(transCanvas_, SIGNAL(colorChanged(const QColor&)), colorLumPicker_, SLOT(setCol(const QColor))); connect(colorPicker_, SIGNAL(newCol(int,int)), colorLumPicker_, SLOT(setCol(int,int))); connect(colorLumPicker_, SIGNAL(newHsv(int,int,int)), this, SLOT(markerColorChanged(int,int,int))); connect(colorPicker_, SIGNAL(toggleInteractionMode(bool)), this, SLOT(toggleInteractionMode(bool))); connect(colorLumPicker_, SIGNAL(toggleInteractionMode(bool)), this, SLOT(toggleInteractionMode(bool))); // doubleslider connect(doubleSlider_, SIGNAL(valuesChanged(float, float)), this, SLOT(applyThreshold())); connect(doubleSlider_, SIGNAL(toggleInteractionMode(bool)), this, SLOT(toggleInteractionMode(bool))); connect(lowerMappingSpin_, SIGNAL(valueChanged(double)), this, SLOT(lowerMappingChanged(double))); connect(upperMappingSpin_, SIGNAL(valueChanged(double)), this, SLOT(upperMappingChanged(double))); connect(fitDomainToData_, SIGNAL(clicked()), this, SLOT(fitDomainToData())); connect(alwaysFit_, SIGNAL(stateChanged(int)), this, SLOT(alwaysFitChanged(int))); }
void TransFunc1DRampEditor::createConnections() { // Buttons connect(clearButton_, SIGNAL(clicked()), this, SLOT(clearButtonClicked())); connect(loadButton_, SIGNAL(clicked()), this, SLOT(loadTransferFunction())); connect(saveButton_, SIGNAL(clicked()), this, SLOT(saveTransferFunction())); // signals from transferMappingCanvas connect(transCanvas_, SIGNAL(changed()), this, SLOT(updateTransferFunction())); connect(transCanvas_, SIGNAL(loadTransferFunction()), this, SLOT(loadTransferFunction())); connect(transCanvas_, SIGNAL(saveTransferFunction()), this, SLOT(saveTransferFunction())); connect(transCanvas_, SIGNAL(resetTransferFunction()), this, SLOT(clearButtonClicked())); connect(transCanvas_, SIGNAL(toggleInteractionMode(bool)), this, SLOT(toggleInteractionMode(bool))); // signals for colorPicker connect(transCanvas_, SIGNAL(colorChanged(const QColor&)), colorPicker_, SLOT(setCol(const QColor))); connect(transCanvas_, SIGNAL(colorChanged(const QColor&)), colorLumPicker_, SLOT(setCol(const QColor))); connect(colorPicker_, SIGNAL(newCol(int,int)), colorLumPicker_, SLOT(setCol(int,int))); connect(colorLumPicker_, SIGNAL(newHsv(int,int,int)), this, SLOT(markerColorChanged(int,int,int))); connect(colorPicker_, SIGNAL(toggleInteractionMode(bool)), this, SLOT(toggleInteractionMode(bool))); connect(colorLumPicker_, SIGNAL(toggleInteractionMode(bool)), this, SLOT(toggleInteractionMode(bool))); // doubleslider connect(doubleSlider_, SIGNAL(valuesChanged(float, float)), this, SLOT(thresholdChanged(float, float))); connect(doubleSlider_, SIGNAL(toggleInteractionMode(bool)), this, SLOT(toggleInteractionMode(bool))); // threshold spinboxes connect(lowerThresholdSpin_, SIGNAL(valueChanged(int)), this, SLOT(lowerThresholdSpinChanged(int))); connect(upperThresholdSpin_, SIGNAL(valueChanged(int)), this, SLOT(upperThresholdSpinChanged(int))); connect(checkClipThresholds_, SIGNAL(toggled(bool)), transCanvas_, SLOT(toggleClipThresholds(bool))); //ramp slider and spinboxes connect(sliderRampCenter_, SIGNAL(valueChanged(int)), this, SLOT(updateRampCenter(int))); connect(spinRampCenter_, SIGNAL(valueChanged(int)), this, SLOT(updateRampCenter(int))); connect(spinRampWidth_, SIGNAL(valueChanged(int)), this, SLOT(updateRampWidth(int))); connect(sliderRampWidth_, SIGNAL(valueChanged(int)), this, SLOT(updateRampWidth(int))); connect(sliderRampCenter_, SIGNAL(sliderPressed()), this, SLOT(startTracking())); connect(sliderRampWidth_, SIGNAL(sliderPressed()), this, SLOT(startTracking())); connect(sliderRampCenter_, SIGNAL(sliderReleased()), this, SLOT(stopTracking())); connect(sliderRampWidth_, SIGNAL(sliderReleased()), this, SLOT(stopTracking())); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { loadVolAction = new QAction("Load Volume Data", this); connect(loadVolAction, SIGNAL(triggered()), this, SLOT(loadVolume())); loadTFAction = new QAction("Load Transfer Function", this); connect(loadTFAction, SIGNAL(triggered()), this, SLOT(loadTransferFunction())); quitAction = new QAction("Quit", this); connect(quitAction, SIGNAL(triggered()), this, SLOT(quit())); mipAction = new QAction("Maximum Intensity Projection", this); connect(mipAction, SIGNAL(triggered()), this, SLOT(modeMIP())); avgAction = new QAction("Average Intensity Projection", this); connect(avgAction, SIGNAL(triggered()), this, SLOT(modeAVG())); comAction = new QAction("Composition Projection", this); connect(comAction, SIGNAL(triggered()), this, SLOT(modeCOM())); contourTreeAction = new QAction("Build Contour Tree", this); connect(contourTreeAction, SIGNAL(triggered()), this, SLOT(buildContourTree())); fileMenu = new QMenu("File", this); fileMenu->addAction(loadVolAction); fileMenu->addAction(loadTFAction); fileMenu->addSeparator(); fileMenu->addAction(quitAction); viewMenu = new QMenu("View", this); viewMenu->addAction(mipAction); viewMenu->addAction(avgAction); viewMenu->addAction(comAction); toolMenu = new QMenu("Tools", this); toolMenu->addAction(contourTreeAction); menuBar()->addMenu(fileMenu); menuBar()->addMenu(viewMenu); menuBar()->addMenu(toolMenu); resize(600, 600); QGLFormat f; f.setVersion(4, 2); f.setProfile(QGLFormat::CoreProfile); view = new Ui::Viewport(f, this); setCentralWidget(view); }
void TransFuncEditorIntensityPet::createConnections() { // buttons connect(loadButton_, SIGNAL(clicked()), this, SLOT(loadTransferFunction())); connect(saveButton_, SIGNAL(clicked()), this, SLOT(saveTransferFunction())); connect(resetButton_, SIGNAL(clicked()), this, SLOT(resetButtonClicked())); //if (property_->getManualRepaint()) //connect(repaintButton_, SIGNAL(clicked()), this, SLOT(causeVolumeRenderingRepaint())); // double slider connect(doubleSlider_, SIGNAL(valuesChanged(float, float)), this, SLOT(sliderChanged(float, float))); connect(doubleSlider_, SIGNAL(toggleInteractionMode(bool)), this, SLOT(toggleInteractionMode(bool))); // spinboxes connect(lowerThresholdSpin_, SIGNAL(valueChanged(int)), this, SLOT(minBoxChanged(int))); connect(upperThresholdSpin_, SIGNAL(valueChanged(int)), this, SLOT(maxBoxChanged(int))); // expand and collapse button connect(expandButton_, SIGNAL(clicked()), this, SLOT(expandGradient())); connect(collapseButton_, SIGNAL(clicked()), this, SLOT(collapseGradient())); }
void TransFuncEditorIntensityGradient::createConnections() { if (!supported_) return; // buttons connect(loadButton_, SIGNAL(clicked()), this, SLOT(loadTransferFunction())); connect(saveButton_, SIGNAL(clicked()), this, SLOT(saveTransferFunction())); connect(clearButton_, SIGNAL(clicked()), painter_, SLOT(resetTransferFunction())); connect(gridEnabledButton_, SIGNAL(clicked()), this, SLOT(toggleShowGrid())); connect(histogramEnabledButton_, SIGNAL(clicked()), this, SLOT(toggleShowHistogram())); connect(quadButton_, SIGNAL(clicked()), painter_, SLOT(addQuadPrimitive())); connect(bananaButton_, SIGNAL(clicked()), painter_, SLOT(addBananaPrimitive())); connect(deleteButton_, SIGNAL(clicked()), painter_, SLOT(deletePrimitive())); connect(colorButton_, SIGNAL(clicked()), painter_, SLOT(colorizePrimitive())); connect(histogramBrightness_, SIGNAL(sliderMoved(int)), painter_, SLOT(histogramBrightnessChanged(int))); connect(histogramLog_, SIGNAL(stateChanged(int)), painter_, SLOT(toggleHistogramLogarithmic(int))); // slider connect(fuzziness_, SIGNAL(valueChanged(int)), painter_, SLOT(fuzzinessChanged(int))); connect(transparency_, SIGNAL(valueChanged(int)), painter_, SLOT(transparencyChanged(int))); connect(fuzziness_, SIGNAL(sliderPressed()), this, SLOT(startTracking())); connect(transparency_, SIGNAL(sliderPressed()), this, SLOT(startTracking())); connect(fuzziness_, SIGNAL(sliderReleased()), this, SLOT(stopTracking())); connect(transparency_, SIGNAL(sliderReleased()), this, SLOT(stopTracking())); connect(painter_, SIGNAL(setTransparencySlider(int)), this, SLOT(setTransparency(int))); connect(painter_, SIGNAL(primitiveDeselected()), this, SLOT(primitiveDeselected())); connect(painter_, SIGNAL(primitiveSelected()), this, SLOT(primitiveSelected())); connect(painter_, SIGNAL(toggleInteractionMode(bool)), this, SLOT(toggleInteractionMode(bool))); connect(painter_, SIGNAL(repaintSignal()), this, SLOT(repaintSignal())); }