Add mini buttons to set rotation degrees
parent
dd371387a4
commit
b7cb4ed18a
|
@ -9,7 +9,7 @@ FloatNumberWidget::FloatNumberWidget(QWidget *parent, bool singleLine) :
|
|||
{
|
||||
m_slider = new QSlider(Qt::Horizontal, this);
|
||||
m_slider->setRange(0, 100);
|
||||
m_slider->setFixedWidth(120);
|
||||
m_slider->setFixedWidth(240);
|
||||
|
||||
m_label = new QLabel(this);
|
||||
m_label->setAlignment(Qt::AlignLeft);
|
||||
|
|
|
@ -462,9 +462,27 @@ void PartWidget::showCutRotationSettingPopup(const QPoint &pos)
|
|||
emit groupOperationAdded();
|
||||
});
|
||||
|
||||
QPushButton *rotationMinus5Button = new QPushButton(QChar(fa::rotateleft));
|
||||
initToolButton(rotationMinus5Button);
|
||||
|
||||
connect(rotationMinus5Button, &QPushButton::clicked, [=]() {
|
||||
rotationWidget->setValue(-0.5);
|
||||
emit groupOperationAdded();
|
||||
});
|
||||
|
||||
QPushButton *rotation5Button = new QPushButton(QChar(fa::rotateright));
|
||||
initToolButton(rotation5Button);
|
||||
|
||||
connect(rotation5Button, &QPushButton::clicked, [=]() {
|
||||
rotationWidget->setValue(0.5);
|
||||
emit groupOperationAdded();
|
||||
});
|
||||
|
||||
QHBoxLayout *rotationLayout = new QHBoxLayout;
|
||||
rotationLayout->addWidget(rotationEraser);
|
||||
rotationLayout->addWidget(rotationWidget);
|
||||
rotationLayout->addWidget(rotationMinus5Button);
|
||||
rotationLayout->addWidget(rotation5Button);
|
||||
|
||||
FloatNumberWidget *hollowThicknessWidget = new FloatNumberWidget;
|
||||
hollowThicknessWidget->setItemName(tr("Hollow"));
|
||||
|
|
Loading…
Reference in New Issue