void NormDock::initUi() { normModeBox->addItem("Observed"); normModeBox->addItem("Theoretical"); normModeBox->addItem("Fixed"); // FIXME: could not find implementation for clamping in ImageModel. // -> no Clamp button for now. normClampButton->hide(); connect(normIButton, SIGNAL(toggled(bool)), this, SLOT(updateGUI())); connect(normGButton, SIGNAL(toggled(bool)), this, SLOT(updateGUI())); connect(normModeBox, SIGNAL(currentIndexChanged(int)), this, SLOT(processNormModeSelected(int))); connect(normMinBox, SIGNAL(editingFinished()), this, SLOT(processMinValueChanged())); connect(normMaxBox, SIGNAL(editingFinished()), this, SLOT(processMaxValueChanged())); connect(normApplyButton, SIGNAL(clicked()), this, SLOT(processApplyClicked())); // update values in GUI elements updateGUI(); }
void FalseColorDock::initUi() { // initialize scaled view view->installEventFilter(this); // needed for leave event view->init(); scene = new ScaledView(); view->setScene(scene); connect(scene, SIGNAL(newContentRect(QRect)), view, SLOT(fitContentRect(QRect))); // initialize selection widget sel = new AutohideWidget(); uisel = new Ui::FalsecolorDockSelUI(); uisel->setupUi(sel); scene->offTop = AutohideWidget::OutOffset; view->addWidget(AutohideWidget::TOP, sel); // setup source box uisel->sourceBox->setAHView(view); uisel->sourceBox->addItem(prettyFalseColorNames[FalseColoring::CMF], FalseColoring::CMF); uisel->sourceBox->addItem(prettyFalseColorNames[FalseColoring::PCA], FalseColoring::PCA); uisel->sourceBox->addItem(prettyFalseColorNames[FalseColoring::PCAGRAD], FalseColoring::PCAGRAD); #ifdef WITH_SOM uisel->sourceBox->addItem(prettyFalseColorNames[FalseColoring::SOM], FalseColoring::SOM); uisel->sourceBox->addItem(prettyFalseColorNames[FalseColoring::SOMGRAD], FalseColoring::SOMGRAD); #endif // WITH_SOM uisel->sourceBox->setCurrentIndex(0); updateTheButton(); updateProgressBar(); connect(scene, SIGNAL(newSizeHint(QSize)), view, SLOT(updateSizeHint(QSize))); connect(scene, SIGNAL(updateScrolling(bool)), view, SLOT(suppressScrolling(bool))); connect(scene, SIGNAL(requestCursor(Qt::CursorShape)), view, SLOT(applyCursor(Qt::CursorShape))); connect(scene, SIGNAL(pixelOverlay(int,int)), this, SIGNAL(pixelOverlay(int,int))); connect(scene, SIGNAL(requestSpecSim(int,int)), this, SLOT(requestSpecSim(int,int))); connect(uisel->sourceBox, SIGNAL(currentIndexChanged(int)), this, SLOT(processSelectedColoring())); connect(uisel->theButton, SIGNAL(clicked()), this, SLOT(processApplyClicked())); connect(this, SIGNAL(visibilityChanged(bool)), this, SLOT(processVisibilityChanged(bool))); connect(uisel->screenshotButton, SIGNAL(released()), this, SLOT(screenshot())); // add similarity widget sw = new SimilarityWidget(view); scene->offBottom = AutohideWidget::OutOffset; view->addWidget(AutohideWidget::BOTTOM, sw); connect(sw->doneAction(), SIGNAL(triggered()), this, SLOT(restoreFalseColorFunction())); connect(sw->doneAction(), SIGNAL(triggered()), scene, SLOT(updateInputMode())); connect(sw->targetAction(), SIGNAL(triggered()), scene, SLOT(updateInputMode())); scene->setActionTarget(sw->targetAction()); }