Skip to content

Commit

Permalink
added smoothing label in menu
Browse files Browse the repository at this point in the history
  • Loading branch information
medicalphysics committed May 29, 2019
1 parent a0faf1c commit 0869cc0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/opendxmc/src/slicerenderwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Copyright 2019 Erlend Andersen
#include <QColor>
#include <QPushButton>
#include <QIcon>
#include <QLabel>
#include <QMenu>
#include <QColorDialog>
#include <QFileDialog>
Expand Down Expand Up @@ -280,7 +281,14 @@ SliceRenderWidget::SliceRenderWidget(QWidget *parent, Orientation orientation)
else
connect(smoothSlider, &QSlider::valueChanged, [=](int value) {m_imageSmoother->SetStandardDeviations(static_cast<double>(value), 0.0, static_cast<double>(value)); });
auto smoothSliderAction = new QWidgetAction(menuButton);
smoothSliderAction->setDefaultWidget(smoothSlider);
auto smoothSliderHolder = new QWidget(menuButton);
auto smoothSliderLayout = new QHBoxLayout(smoothSliderHolder);
smoothSliderHolder->setLayout(smoothSliderLayout);
auto smoothSliderLabel = new QLabel("Smoothing", smoothSliderHolder);
smoothSliderLayout->addWidget(smoothSliderLabel);
smoothSliderLayout->addWidget(smoothSlider);
//smoothSliderLayout->setContentsMargins(0, 0, 0, 0);
smoothSliderAction->setDefaultWidget(smoothSliderHolder);
menu->addAction(smoothSliderAction);

menu->addAction(QString(tr("Set background color")), [=]() {
Expand Down

0 comments on commit 0869cc0

Please sign in to comment.