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.
|
- Improve segmenting a curve for calculating a piece path.
|
||||||
- [smart-pattern/valentina#184] Fix incorrect seam allowance.
|
- [smart-pattern/valentina#184] Fix incorrect seam allowance.
|
||||||
- Export area of piece in Final measurements.
|
- Export area of piece in Final measurements.
|
||||||
|
- New option Show accuracy radius.
|
||||||
|
|
||||||
# Valentina 0.7.52 September 12, 2022
|
# Valentina 0.7.52 September 12, 2022
|
||||||
- Fix crash when default locale is ru.
|
- Fix crash when default locale is ru.
|
||||||
|
|
|
@ -4021,6 +4021,7 @@ void MainWindow::Clear()
|
||||||
ui->actionFinalMeasurements->setEnabled(false);
|
ui->actionFinalMeasurements->setEnabled(false);
|
||||||
ui->actionLast_tool->setEnabled(false);
|
ui->actionLast_tool->setEnabled(false);
|
||||||
ui->actionShowCurveDetails->setEnabled(false);
|
ui->actionShowCurveDetails->setEnabled(false);
|
||||||
|
ui->actionShowAccuracyRadius->setEnabled(false);
|
||||||
ui->actionShowMainPath->setEnabled(false);
|
ui->actionShowMainPath->setEnabled(false);
|
||||||
ui->actionLoadIndividual->setEnabled(false);
|
ui->actionLoadIndividual->setEnabled(false);
|
||||||
ui->actionLoadMultisize->setEnabled(false);
|
ui->actionLoadMultisize->setEnabled(false);
|
||||||
|
@ -4272,6 +4273,7 @@ void MainWindow::SetEnableWidgets(bool enable)
|
||||||
ui->actionZoomFitBestCurrent->setEnabled(enableOnDrawStage);
|
ui->actionZoomFitBestCurrent->setEnabled(enableOnDrawStage);
|
||||||
ui->actionZoomOriginal->setEnabled(enable);
|
ui->actionZoomOriginal->setEnabled(enable);
|
||||||
ui->actionShowCurveDetails->setEnabled(enableOnDrawStage);
|
ui->actionShowCurveDetails->setEnabled(enableOnDrawStage);
|
||||||
|
ui->actionShowAccuracyRadius->setEnabled(enableOnDesignStage);
|
||||||
ui->actionShowMainPath->setEnabled(enableOnDetailsStage);
|
ui->actionShowMainPath->setEnabled(enableOnDetailsStage);
|
||||||
ui->actionLoadIndividual->setEnabled(enableOnDesignStage);
|
ui->actionLoadIndividual->setEnabled(enableOnDesignStage);
|
||||||
ui->actionLoadMultisize->setEnabled(enableOnDesignStage);
|
ui->actionLoadMultisize->setEnabled(enableOnDesignStage);
|
||||||
|
@ -5656,6 +5658,15 @@ void MainWindow::CreateActions()
|
||||||
VAbstractValApplication::VApp()->ValentinaSettings()->SetShowCurveDetails(checked);
|
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());
|
ui->actionShowMainPath->setChecked(VAbstractValApplication::VApp()->ValentinaSettings()->IsPieceShowMainPath());
|
||||||
connect(ui->actionShowMainPath, &QAction::triggered, this, &MainWindow::ActionShowMainPath_triggered);
|
connect(ui->actionShowMainPath, &QAction::triggered, this, &MainWindow::ActionShowMainPath_triggered);
|
||||||
|
|
||||||
|
|
|
@ -1778,6 +1778,7 @@
|
||||||
<addaction name="actionLast_tool"/>
|
<addaction name="actionLast_tool"/>
|
||||||
<addaction name="actionShowCurveDetails"/>
|
<addaction name="actionShowCurveDetails"/>
|
||||||
<addaction name="actionShowMainPath"/>
|
<addaction name="actionShowMainPath"/>
|
||||||
|
<addaction name="actionShowAccuracyRadius"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionAddBackgroundImage"/>
|
<addaction name="actionAddBackgroundImage"/>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -3182,6 +3183,17 @@
|
||||||
<enum>QAction::NoRole</enum>
|
<enum>QAction::NoRole</enum>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</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>
|
</widget>
|
||||||
<layoutdefault spacing="6" margin="11"/>
|
<layoutdefault spacing="6" margin="11"/>
|
||||||
<customwidgets>
|
<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, settingPatternPieceShowMainPath, (QLatin1String("pattern/pieceShowMainPath"))) // NOLINT
|
||||||
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingPatternLabelFontSize, (QLatin1String("pattern/labelFontSize"))) // 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, 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, settingPatternUseOpenGLRender, (QLatin1String("pattern/useOpenGLRender"))) // NOLINT
|
||||||
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingPatternGraphicalOutput, (QLatin1String("pattern/graphicalOutput"))) // 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);
|
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
|
auto VCommonSettings::GetLabelDateFormat() const -> QString
|
||||||
{
|
{
|
||||||
|
|
|
@ -213,6 +213,9 @@ public:
|
||||||
auto GetHideLabels() const -> bool;
|
auto GetHideLabels() const -> bool;
|
||||||
void SetHideLabels(bool value);
|
void SetHideLabels(bool value);
|
||||||
|
|
||||||
|
auto GetShowAccuracyRadius() const -> bool;
|
||||||
|
void SetShowAccuracyRadius(bool value);
|
||||||
|
|
||||||
#if !defined(Q_OS_WIN)
|
#if !defined(Q_OS_WIN)
|
||||||
static const QString unixStandardSharePath;
|
static const QString unixStandardSharePath;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -69,8 +69,21 @@ void VScenePoint::paint(QPainter *painter, const QStyleOptionGraphicsItem *optio
|
||||||
ScaleMainPenWidth(scale);
|
ScaleMainPenWidth(scale);
|
||||||
ScaleCircleSize(this, scale);
|
ScaleCircleSize(this, scale);
|
||||||
|
|
||||||
if (VAbstractApplication::VApp()->Settings()->GetLabelFontSize()*scale < minVisibleFontSize ||
|
VCommonSettings *settings = VAbstractApplication::VApp()->Settings();
|
||||||
VAbstractApplication::VApp()->Settings()->GetHideLabels())
|
|
||||||
|
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_namePoint->setVisible(false);
|
||||||
m_lineName->setVisible(false);
|
m_lineName->setVisible(false);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user