New option Show accuracy radius.
This commit is contained in:
parent
56cdd08e71
commit
d95d755e0d
|
@ -8,6 +8,7 @@
|
|||
- Improve segmenting a curve for calculating a piece path.
|
||||
- [smart-pattern/valentina#184] Fix incorrect seam allowance.
|
||||
- Export area of piece in Final measurements.
|
||||
- New option Show accuracy radius.
|
||||
|
||||
# Valentina 0.7.52 September 12, 2022
|
||||
- Fix crash when default locale is ru.
|
||||
|
|
|
@ -4021,6 +4021,7 @@ void MainWindow::Clear()
|
|||
ui->actionFinalMeasurements->setEnabled(false);
|
||||
ui->actionLast_tool->setEnabled(false);
|
||||
ui->actionShowCurveDetails->setEnabled(false);
|
||||
ui->actionShowAccuracyRadius->setEnabled(false);
|
||||
ui->actionShowMainPath->setEnabled(false);
|
||||
ui->actionLoadIndividual->setEnabled(false);
|
||||
ui->actionLoadMultisize->setEnabled(false);
|
||||
|
@ -4272,6 +4273,7 @@ void MainWindow::SetEnableWidgets(bool enable)
|
|||
ui->actionZoomFitBestCurrent->setEnabled(enableOnDrawStage);
|
||||
ui->actionZoomOriginal->setEnabled(enable);
|
||||
ui->actionShowCurveDetails->setEnabled(enableOnDrawStage);
|
||||
ui->actionShowAccuracyRadius->setEnabled(enableOnDesignStage);
|
||||
ui->actionShowMainPath->setEnabled(enableOnDetailsStage);
|
||||
ui->actionLoadIndividual->setEnabled(enableOnDesignStage);
|
||||
ui->actionLoadMultisize->setEnabled(enableOnDesignStage);
|
||||
|
@ -5656,6 +5658,15 @@ void MainWindow::CreateActions()
|
|||
VAbstractValApplication::VApp()->ValentinaSettings()->SetShowCurveDetails(checked);
|
||||
});
|
||||
|
||||
ui->actionShowAccuracyRadius->setChecked(
|
||||
VAbstractValApplication::VApp()->ValentinaSettings()->GetShowAccuracyRadius());
|
||||
connect(ui->actionShowAccuracyRadius, &QAction::triggered, this, [this](bool checked)
|
||||
{
|
||||
VAbstractValApplication::VApp()->ValentinaSettings()->SetShowAccuracyRadius(checked);
|
||||
m_sceneDetails->update();
|
||||
m_sceneDraw->update();
|
||||
});
|
||||
|
||||
ui->actionShowMainPath->setChecked(VAbstractValApplication::VApp()->ValentinaSettings()->IsPieceShowMainPath());
|
||||
connect(ui->actionShowMainPath, &QAction::triggered, this, &MainWindow::ActionShowMainPath_triggered);
|
||||
|
||||
|
|
|
@ -1778,6 +1778,7 @@
|
|||
<addaction name="actionLast_tool"/>
|
||||
<addaction name="actionShowCurveDetails"/>
|
||||
<addaction name="actionShowMainPath"/>
|
||||
<addaction name="actionShowAccuracyRadius"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionAddBackgroundImage"/>
|
||||
</widget>
|
||||
|
@ -3182,6 +3183,17 @@
|
|||
<enum>QAction::NoRole</enum>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionShowAccuracyRadius">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Show accuracy radius</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<customwidgets>
|
||||
|
|
|
@ -107,6 +107,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingPatternShowCurveDetails, (QLatin
|
|||
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingPatternPieceShowMainPath, (QLatin1String("pattern/pieceShowMainPath"))) // NOLINT
|
||||
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingPatternLabelFontSize, (QLatin1String("pattern/labelFontSize"))) // NOLINT
|
||||
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingPatternHideLabels, (QLatin1String("pattern/hideLabels"))) // NOLINT
|
||||
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingPatternShowAccuracyRadius, (QLatin1String("pattern/showAccuracyRadius"))) // NOLINT
|
||||
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingPatternUseOpenGLRender, (QLatin1String("pattern/useOpenGLRender"))) // NOLINT
|
||||
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingPatternGraphicalOutput, (QLatin1String("pattern/graphicalOutput"))) // NOLINT
|
||||
|
||||
|
@ -1151,6 +1152,18 @@ void VCommonSettings::SetHideLabels(bool value)
|
|||
setValue(*settingPatternHideLabels, value);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
auto VCommonSettings::GetShowAccuracyRadius() const -> bool
|
||||
{
|
||||
return value(*settingPatternShowAccuracyRadius, false).toBool();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VCommonSettings::SetShowAccuracyRadius(bool value)
|
||||
{
|
||||
setValue(*settingPatternShowAccuracyRadius, value);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
auto VCommonSettings::GetLabelDateFormat() const -> QString
|
||||
{
|
||||
|
|
|
@ -213,6 +213,9 @@ public:
|
|||
auto GetHideLabels() const -> bool;
|
||||
void SetHideLabels(bool value);
|
||||
|
||||
auto GetShowAccuracyRadius() const -> bool;
|
||||
void SetShowAccuracyRadius(bool value);
|
||||
|
||||
#if !defined(Q_OS_WIN)
|
||||
static const QString unixStandardSharePath;
|
||||
#endif
|
||||
|
|
|
@ -69,8 +69,21 @@ void VScenePoint::paint(QPainter *painter, const QStyleOptionGraphicsItem *optio
|
|||
ScaleMainPenWidth(scale);
|
||||
ScaleCircleSize(this, scale);
|
||||
|
||||
if (VAbstractApplication::VApp()->Settings()->GetLabelFontSize()*scale < minVisibleFontSize ||
|
||||
VAbstractApplication::VApp()->Settings()->GetHideLabels())
|
||||
VCommonSettings *settings = VAbstractApplication::VApp()->Settings();
|
||||
|
||||
if (settings->GetShowAccuracyRadius())
|
||||
{
|
||||
painter->save();
|
||||
QPen pen = painter->pen();
|
||||
pen.setWidthF(accuracyPointOnLine/15);
|
||||
pen.setStyle(Qt::DashLine);
|
||||
pen.setColor(Qt::black);
|
||||
painter->setPen(pen);
|
||||
painter->drawEllipse(PointRect(accuracyPointOnLine));
|
||||
painter->restore();
|
||||
}
|
||||
|
||||
if (settings->GetLabelFontSize()*scale < minVisibleFontSize || settings->GetHideLabels())
|
||||
{
|
||||
m_namePoint->setVisible(false);
|
||||
m_lineName->setVisible(false);
|
||||
|
|
Loading…
Reference in New Issue
Block a user