Sketcher: Sketcher Elements support for BSpline
This commit is contained in:
parent
1076b70056
commit
b255ada03a
|
@ -652,6 +652,9 @@ void TaskSketcherElements::slotElementsChanged(void)
|
||||||
QIcon Sketcher_Element_ArcOfParabola_MidPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Parabolic_Arc_Centre_Point") );
|
QIcon Sketcher_Element_ArcOfParabola_MidPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Parabolic_Arc_Centre_Point") );
|
||||||
QIcon Sketcher_Element_ArcOfParabola_StartingPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Parabolic_Arc_Start_Point") );
|
QIcon Sketcher_Element_ArcOfParabola_StartingPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Parabolic_Arc_Start_Point") );
|
||||||
QIcon Sketcher_Element_ArcOfParabola_EndPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Parabolic_Arc_End_Point") );
|
QIcon Sketcher_Element_ArcOfParabola_EndPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Parabolic_Arc_End_Point") );
|
||||||
|
QIcon Sketcher_Element_BSpline_Edge( Gui::BitmapFactory().pixmap("Sketcher_Element_BSpline_Edge") );
|
||||||
|
QIcon Sketcher_Element_BSpline_StartingPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_BSpline_StartPoint") );
|
||||||
|
QIcon Sketcher_Element_BSpline_EndPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_BSpline_EndPoint") );
|
||||||
QIcon none( Gui::BitmapFactory().pixmap("Sketcher_Element_SelectionTypeInvalid") );
|
QIcon none( Gui::BitmapFactory().pixmap("Sketcher_Element_SelectionTypeInvalid") );
|
||||||
|
|
||||||
assert(sketchView);
|
assert(sketchView);
|
||||||
|
@ -691,6 +694,9 @@ void TaskSketcherElements::slotElementsChanged(void)
|
||||||
(type == Part::GeomArcOfParabola::getClassTypeId() && element==1) ? Sketcher_Element_ArcOfParabola_StartingPoint :
|
(type == Part::GeomArcOfParabola::getClassTypeId() && element==1) ? Sketcher_Element_ArcOfParabola_StartingPoint :
|
||||||
(type == Part::GeomArcOfParabola::getClassTypeId() && element==2) ? Sketcher_Element_ArcOfParabola_EndPoint :
|
(type == Part::GeomArcOfParabola::getClassTypeId() && element==2) ? Sketcher_Element_ArcOfParabola_EndPoint :
|
||||||
(type == Part::GeomArcOfParabola::getClassTypeId() && element==3) ? Sketcher_Element_ArcOfParabola_MidPoint :
|
(type == Part::GeomArcOfParabola::getClassTypeId() && element==3) ? Sketcher_Element_ArcOfParabola_MidPoint :
|
||||||
|
(type == Part::GeomBSplineCurve::getClassTypeId() && element==0) ? Sketcher_Element_BSpline_Edge :
|
||||||
|
(type == Part::GeomBSplineCurve::getClassTypeId() && element==1) ? Sketcher_Element_BSpline_StartingPoint :
|
||||||
|
(type == Part::GeomBSplineCurve::getClassTypeId() && element==2) ? Sketcher_Element_BSpline_EndPoint :
|
||||||
none,
|
none,
|
||||||
type == Part::GeomPoint::getClassTypeId() ? ( isNamingBoxChecked ?
|
type == Part::GeomPoint::getClassTypeId() ? ( isNamingBoxChecked ?
|
||||||
(tr("Point") + QString::fromLatin1("(Edge%1)").arg(i)):
|
(tr("Point") + QString::fromLatin1("(Edge%1)").arg(i)):
|
||||||
|
@ -716,6 +722,9 @@ void TaskSketcherElements::slotElementsChanged(void)
|
||||||
type == Part::GeomArcOfParabola::getClassTypeId() ? ( isNamingBoxChecked ?
|
type == Part::GeomArcOfParabola::getClassTypeId() ? ( isNamingBoxChecked ?
|
||||||
(tr("Parabolic Arc") + QString::fromLatin1("(Edge%1)").arg(i)):
|
(tr("Parabolic Arc") + QString::fromLatin1("(Edge%1)").arg(i)):
|
||||||
(QString::fromLatin1("%1-").arg(i)+tr("Parabolic Arc"))) :
|
(QString::fromLatin1("%1-").arg(i)+tr("Parabolic Arc"))) :
|
||||||
|
type == Part::GeomBSplineCurve::getClassTypeId() ? ( isNamingBoxChecked ?
|
||||||
|
(tr("BSpline") + QString::fromLatin1("(Edge%1)").arg(i)):
|
||||||
|
(QString::fromLatin1("%1-").arg(i)+tr("BSpline"))) :
|
||||||
( isNamingBoxChecked ?
|
( isNamingBoxChecked ?
|
||||||
(tr("Other") + QString::fromLatin1("(Edge%1)").arg(i)):
|
(tr("Other") + QString::fromLatin1("(Edge%1)").arg(i)):
|
||||||
(QString::fromLatin1("%1-").arg(i)+tr("Other"))),
|
(QString::fromLatin1("%1-").arg(i)+tr("Other"))),
|
||||||
|
@ -903,7 +912,10 @@ void TaskSketcherElements::updateIcons(int element)
|
||||||
QIcon Sketcher_Element_ArcOfParabola_Edge( Gui::BitmapFactory().pixmap("Sketcher_Element_Parabolic_Arc_Edge") );
|
QIcon Sketcher_Element_ArcOfParabola_Edge( Gui::BitmapFactory().pixmap("Sketcher_Element_Parabolic_Arc_Edge") );
|
||||||
QIcon Sketcher_Element_ArcOfParabola_MidPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Parabolic_Arc_Centre_Point") );
|
QIcon Sketcher_Element_ArcOfParabola_MidPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Parabolic_Arc_Centre_Point") );
|
||||||
QIcon Sketcher_Element_ArcOfParabola_StartingPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Parabolic_Arc_Start_Point") );
|
QIcon Sketcher_Element_ArcOfParabola_StartingPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Parabolic_Arc_Start_Point") );
|
||||||
QIcon Sketcher_Element_ArcOfParabola_EndPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Parabolic_Arc_End_Point") );
|
QIcon Sketcher_Element_ArcOfParabola_EndPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Parabolic_Arc_End_Point") );
|
||||||
|
QIcon Sketcher_Element_BSpline_Edge( Gui::BitmapFactory().pixmap("Sketcher_Element_BSpline_Edge") );
|
||||||
|
QIcon Sketcher_Element_BSpline_StartingPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_BSpline_StartPoint") );
|
||||||
|
QIcon Sketcher_Element_BSpline_EndPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_BSpline_EndPoint") );
|
||||||
QIcon none( Gui::BitmapFactory().pixmap("Sketcher_Element_SelectionTypeInvalid") );
|
QIcon none( Gui::BitmapFactory().pixmap("Sketcher_Element_SelectionTypeInvalid") );
|
||||||
|
|
||||||
for (int i=0;i<ui->listWidgetElements->count(); i++) {
|
for (int i=0;i<ui->listWidgetElements->count(); i++) {
|
||||||
|
@ -934,6 +946,9 @@ void TaskSketcherElements::updateIcons(int element)
|
||||||
(type == Part::GeomArcOfParabola::getClassTypeId() && element==1) ? Sketcher_Element_ArcOfParabola_StartingPoint :
|
(type == Part::GeomArcOfParabola::getClassTypeId() && element==1) ? Sketcher_Element_ArcOfParabola_StartingPoint :
|
||||||
(type == Part::GeomArcOfParabola::getClassTypeId() && element==2) ? Sketcher_Element_ArcOfParabola_EndPoint :
|
(type == Part::GeomArcOfParabola::getClassTypeId() && element==2) ? Sketcher_Element_ArcOfParabola_EndPoint :
|
||||||
(type == Part::GeomArcOfParabola::getClassTypeId() && element==3) ? Sketcher_Element_ArcOfParabola_MidPoint :
|
(type == Part::GeomArcOfParabola::getClassTypeId() && element==3) ? Sketcher_Element_ArcOfParabola_MidPoint :
|
||||||
|
(type == Part::GeomBSplineCurve::getClassTypeId() && element==0) ? Sketcher_Element_BSpline_Edge :
|
||||||
|
(type == Part::GeomBSplineCurve::getClassTypeId() && element==1) ? Sketcher_Element_BSpline_StartingPoint :
|
||||||
|
(type == Part::GeomBSplineCurve::getClassTypeId() && element==2) ? Sketcher_Element_BSpline_EndPoint :
|
||||||
none);
|
none);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user