MCPcopy Create free account
hub / github.com/Kitware/TeleSculptor / MatchMatrixWindow

Method MatchMatrixWindow

gui/MatchMatrixWindow.cxx:372–433  ·  view source on GitHub ↗

-----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

370
371//-----------------------------------------------------------------------------
372MatchMatrixWindow::MatchMatrixWindow(QWidget* parent, Qt::WindowFlags flags)
373 : QMainWindow(parent, flags), d_ptr(new MatchMatrixWindowPrivate)
374{
375 QTE_D();
376
377 this->setAttribute(Qt::WA_DeleteOnClose);
378
379 // Set up UI
380 d->UI.setupUi(this);
381 d->AM.setupActions(d->UI, this);
382
383 d->UI.menuView->insertAction(d->UI.actionShowStatusBar,
384 d->UI.optionsDock->toggleViewAction());
385
386 d->UI.view->setScene(&d->scene);
387
388 d->UI.color->setCurrentIndex(GradientSelector::Viridis);
389
390 // Set up UI persistence and restore previous state
391 d->uiState.setCurrentGroup("MatchMatrixWindow");
392 d->persist("Layout", d->UI.layout);
393 d->persist("Orientation", d->UI.orientation);
394 d->persist("Values", d->UI.values);
395 d->persist("Scale", d->UI.scale);
396 d->persist("Exponent", d->UI.exponent);
397 d->persist("Range", d->UI.range);
398 d->persist("Color", d->UI.color);
399
400 d->uiState.mapChecked("Window/status", d->UI.actionShowStatusBar);
401 d->uiState.mapState("Window/state", this);
402 d->uiState.mapGeometry("Window/geometry", this);
403 d->uiState.restore();
404
405 this->updateControls();
406 this->updateImageTransform();
407
408 // Set up signals/slots
409 connect(d->UI.actionSaveImage, &QAction::triggered,
410 this, QOverload<>::of(&MatchMatrixWindow::saveImage));
411
412 auto const indexChangedSignal =
413 QOverload<int>::of(&QComboBox::currentIndexChanged);
414 connect(d->UI.layout, indexChangedSignal,
415 this, &MatchMatrixWindow::updateImage);
416 connect(d->UI.orientation, indexChangedSignal,
417 this, &MatchMatrixWindow::updateImageTransform);
418 connect(d->UI.values, indexChangedSignal,
419 this, &MatchMatrixWindow::updateImage);
420 connect(d->UI.scale, indexChangedSignal,
421 this, &MatchMatrixWindow::updateImage);
422 connect(d->UI.color, indexChangedSignal,
423 this, &MatchMatrixWindow::updateImage);
424 connect(d->UI.exponent, &qtDoubleSlider::valueChanged,
425 this, &MatchMatrixWindow::updateImage);
426 connect(d->UI.range, &qtDoubleSlider::valueChanged,
427 this, &MatchMatrixWindow::updateImage);
428
429 connect(d->UI.values, indexChangedSignal,

Callers

nothing calls this directly

Calls 3

updateControlsMethod · 0.95
updateImageTransformMethod · 0.95
persistMethod · 0.45

Tested by

no test coverage detected