Improved icon themes support

This commit is contained in:
triplus
2019-02-12 21:13:56 +01:00
committed by Yorik van Havre
parent fc7efcb4d7
commit 92efd5fbe9
18 changed files with 230 additions and 230 deletions

View File

@@ -1887,11 +1887,11 @@ void CmdSketcherConstrainLock::updateAction(int mode)
switch (mode) {
case Reference:
if (getAction())
getAction()->setIcon(Gui::BitmapFactory().pixmap("Sketcher_ConstrainLock_Driven"));
getAction()->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_ConstrainLock_Driven"));
break;
case Driving:
if (getAction())
getAction()->setIcon(Gui::BitmapFactory().pixmap("Sketcher_ConstrainLock"));
getAction()->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_ConstrainLock"));
break;
}
}
@@ -2769,11 +2769,11 @@ void CmdSketcherConstrainDistance::updateAction(int mode)
switch (mode) {
case Reference:
if (getAction())
getAction()->setIcon(Gui::BitmapFactory().pixmap("Constraint_Length_Driven"));
getAction()->setIcon(Gui::BitmapFactory().iconFromTheme("Constraint_Length_Driven"));
break;
case Driving:
if (getAction())
getAction()->setIcon(Gui::BitmapFactory().pixmap("Constraint_Length"));
getAction()->setIcon(Gui::BitmapFactory().iconFromTheme("Constraint_Length"));
break;
}
}
@@ -3245,11 +3245,11 @@ void CmdSketcherConstrainDistanceX::updateAction(int mode)
switch (mode) {
case Reference:
if (getAction())
getAction()->setIcon(Gui::BitmapFactory().pixmap("Constraint_HorizontalDistance_Driven"));
getAction()->setIcon(Gui::BitmapFactory().iconFromTheme("Constraint_HorizontalDistance_Driven"));
break;
case Driving:
if (getAction())
getAction()->setIcon(Gui::BitmapFactory().pixmap("Constraint_HorizontalDistance"));
getAction()->setIcon(Gui::BitmapFactory().iconFromTheme("Constraint_HorizontalDistance"));
break;
}
}
@@ -3492,11 +3492,11 @@ void CmdSketcherConstrainDistanceY::updateAction(int mode)
switch (mode) {
case Reference:
if (getAction())
getAction()->setIcon(Gui::BitmapFactory().pixmap("Constraint_VerticalDistance_Driven"));
getAction()->setIcon(Gui::BitmapFactory().iconFromTheme("Constraint_VerticalDistance_Driven"));
break;
case Driving:
if (getAction())
getAction()->setIcon(Gui::BitmapFactory().pixmap("Constraint_VerticalDistance"));
getAction()->setIcon(Gui::BitmapFactory().iconFromTheme("Constraint_VerticalDistance"));
break;
}
}
@@ -5451,11 +5451,11 @@ void CmdSketcherConstrainRadius::updateAction(int mode)
switch (mode) {
case Reference:
if (getAction())
getAction()->setIcon(Gui::BitmapFactory().pixmap("Constraint_Radius_Driven"));
getAction()->setIcon(Gui::BitmapFactory().iconFromTheme("Constraint_Radius_Driven"));
break;
case Driving:
if (getAction())
getAction()->setIcon(Gui::BitmapFactory().pixmap("Constraint_Radius"));
getAction()->setIcon(Gui::BitmapFactory().iconFromTheme("Constraint_Radius"));
break;
}
}
@@ -5922,11 +5922,11 @@ void CmdSketcherConstrainDiameter::updateAction(int mode)
switch (mode) {
case Reference:
if (getAction())
getAction()->setIcon(Gui::BitmapFactory().pixmap("Constraint_Diameter_Driven"));
getAction()->setIcon(Gui::BitmapFactory().iconFromTheme("Constraint_Diameter_Driven"));
break;
case Driving:
if (getAction())
getAction()->setIcon(Gui::BitmapFactory().pixmap("Constraint_Diameter"));
getAction()->setIcon(Gui::BitmapFactory().iconFromTheme("Constraint_Diameter"));
break;
}
}
@@ -5976,9 +5976,9 @@ Gui::Action * CmdSketcherCompConstrainRadDia::createAction(void)
applyCommandData(this->className(), pcAction);
QAction* arc1 = pcAction->addAction(QString());
arc1->setIcon(Gui::BitmapFactory().pixmap("Constraint_Radius"));
arc1->setIcon(Gui::BitmapFactory().iconFromTheme("Constraint_Radius"));
QAction* arc2 = pcAction->addAction(QString());
arc2->setIcon(Gui::BitmapFactory().pixmap("Constraint_Diameter"));
arc2->setIcon(Gui::BitmapFactory().iconFromTheme("Constraint_Diameter"));
_pcAction = pcAction;
languageChange();
@@ -6002,13 +6002,13 @@ void CmdSketcherCompConstrainRadDia::updateAction(int mode)
int index = pcAction->property("defaultAction").toInt();
switch (mode) {
case Reference:
a[0]->setIcon(Gui::BitmapFactory().pixmap("Constraint_Radius_Driven"));
a[1]->setIcon(Gui::BitmapFactory().pixmap("Constraint_Diameter_Driven"));
a[0]->setIcon(Gui::BitmapFactory().iconFromTheme("Constraint_Radius_Driven"));
a[1]->setIcon(Gui::BitmapFactory().iconFromTheme("Constraint_Diameter_Driven"));
getAction()->setIcon(a[index]->icon());
break;
case Driving:
a[0]->setIcon(Gui::BitmapFactory().pixmap("Constraint_Radius"));
a[1]->setIcon(Gui::BitmapFactory().pixmap("Constraint_Diameter"));
a[0]->setIcon(Gui::BitmapFactory().iconFromTheme("Constraint_Radius"));
a[1]->setIcon(Gui::BitmapFactory().iconFromTheme("Constraint_Diameter"));
getAction()->setIcon(a[index]->icon());
break;
}
@@ -6543,11 +6543,11 @@ void CmdSketcherConstrainAngle::updateAction(int mode)
switch (mode) {
case Reference:
if (getAction())
getAction()->setIcon(Gui::BitmapFactory().pixmap("Constraint_InternalAngle_Driven"));
getAction()->setIcon(Gui::BitmapFactory().iconFromTheme("Constraint_InternalAngle_Driven"));
break;
case Driving:
if (getAction())
getAction()->setIcon(Gui::BitmapFactory().pixmap("Constraint_InternalAngle"));
getAction()->setIcon(Gui::BitmapFactory().iconFromTheme("Constraint_InternalAngle"));
break;
}
}

View File

@@ -436,11 +436,11 @@ void CmdSketcherCreateLine::updateAction(int mode)
switch (mode) {
case Normal:
if (getAction())
getAction()->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateLine"));
getAction()->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateLine"));
break;
case Construction:
if (getAction())
getAction()->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateLine_Constr"));
getAction()->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateLine_Constr"));
break;
}
}
@@ -675,11 +675,11 @@ void CmdSketcherCreateRectangle::updateAction(int mode)
switch (mode) {
case Normal:
if (getAction())
getAction()->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateRectangle"));
getAction()->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateRectangle"));
break;
case Construction:
if (getAction())
getAction()->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateRectangle_Constr"));
getAction()->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateRectangle_Constr"));
break;
}
}
@@ -1408,11 +1408,11 @@ void CmdSketcherCreatePolyline::updateAction(int mode)
switch (mode) {
case Normal:
if (getAction())
getAction()->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreatePolyline"));
getAction()->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreatePolyline"));
break;
case Construction:
if (getAction())
getAction()->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreatePolyline_Constr"));
getAction()->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreatePolyline_Constr"));
break;
}
}
@@ -2046,9 +2046,9 @@ Gui::Action * CmdSketcherCompCreateArc::createAction(void)
applyCommandData(this->className(), pcAction);
QAction* arc1 = pcAction->addAction(QString());
arc1->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateArc"));
arc1->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateArc"));
QAction* arc2 = pcAction->addAction(QString());
arc2->setIcon(Gui::BitmapFactory().pixmap("Sketcher_Create3PointArc"));
arc2->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_Create3PointArc"));
_pcAction = pcAction;
languageChange();
@@ -2070,13 +2070,13 @@ void CmdSketcherCompCreateArc::updateAction(int mode)
int index = pcAction->property("defaultAction").toInt();
switch (mode) {
case Normal:
a[0]->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateArc"));
a[1]->setIcon(Gui::BitmapFactory().pixmap("Sketcher_Create3PointArc"));
a[0]->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateArc"));
a[1]->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_Create3PointArc"));
getAction()->setIcon(a[index]->icon());
break;
case Construction:
a[0]->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateArc_Constr"));
a[1]->setIcon(Gui::BitmapFactory().pixmap("Sketcher_Create3PointArc_Constr"));
a[0]->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateArc_Constr"));
a[1]->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_Create3PointArc_Constr"));
getAction()->setIcon(a[index]->icon());
break;
}
@@ -4338,25 +4338,25 @@ Gui::Action * CmdSketcherCompCreateConic::createAction(void)
applyCommandData(this->className(), pcAction);
QAction* ellipseByCenter = pcAction->addAction(QString());
ellipseByCenter->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateEllipse"));
ellipseByCenter->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateEllipse"));
/// @todo replace with correct icon
QAction* ellipseBy3Points = pcAction->addAction(QString());
ellipseBy3Points->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateEllipse_3points"));
ellipseBy3Points->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateEllipse_3points"));
QAction* arcofellipse = pcAction->addAction(QString());
arcofellipse->setIcon(Gui::BitmapFactory().pixmap("Sketcher_Elliptical_Arc"));
arcofellipse->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_Elliptical_Arc"));
QAction* arcofhyperbola = pcAction->addAction(QString());
arcofhyperbola->setIcon(Gui::BitmapFactory().pixmap("Sketcher_Hyperbolic_Arc"));
arcofhyperbola->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_Hyperbolic_Arc"));
QAction* arcofparabola = pcAction->addAction(QString());
arcofparabola->setIcon(Gui::BitmapFactory().pixmap("Sketcher_Parabolic_Arc"));
arcofparabola->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_Parabolic_Arc"));
_pcAction = pcAction;
languageChange();
// set ellipse by center, a, b as default method
pcAction->setIcon(Gui::BitmapFactory().pixmap("Sketcher_Conics"));
pcAction->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_Conics"));
int defaultId = 0;
pcAction->setProperty("defaultAction", QVariant(defaultId));
@@ -4373,19 +4373,19 @@ void CmdSketcherCompCreateConic::updateAction(int mode)
int index = pcAction->property("defaultAction").toInt();
switch (mode) {
case Normal:
a[0]->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateEllipse"));
a[1]->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateEllipse_3points"));
a[2]->setIcon(Gui::BitmapFactory().pixmap("Sketcher_Elliptical_Arc"));
a[3]->setIcon(Gui::BitmapFactory().pixmap("Sketcher_Hyperbolic_Arc"));
a[4]->setIcon(Gui::BitmapFactory().pixmap("Sketcher_Parabolic_Arc"));
a[0]->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateEllipse"));
a[1]->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateEllipse_3points"));
a[2]->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_Elliptical_Arc"));
a[3]->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_Hyperbolic_Arc"));
a[4]->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_Parabolic_Arc"));
getAction()->setIcon(a[index]->icon());
break;
case Construction:
a[0]->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateEllipse_Constr"));
a[1]->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateEllipse_3points_Constr"));
a[2]->setIcon(Gui::BitmapFactory().pixmap("Sketcher_Elliptical_Arc_Constr"));
a[3]->setIcon(Gui::BitmapFactory().pixmap("Sketcher_Hyperbolic_Arc_Constr"));
a[4]->setIcon(Gui::BitmapFactory().pixmap("Sketcher_Parabolic_Arc_Constr"));
a[0]->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateEllipse_Constr"));
a[1]->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateEllipse_3points_Constr"));
a[2]->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_Elliptical_Arc_Constr"));
a[3]->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_Hyperbolic_Arc_Constr"));
a[4]->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_Parabolic_Arc_Constr"));
getAction()->setIcon(a[index]->icon());
break;
}
@@ -4889,11 +4889,11 @@ void CmdSketcherCreateBSpline::activated(int iMsg)
switch (mode) {
case Normal:
if (getAction())
getAction()->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateBSpline"));
getAction()->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateBSpline"));
break;
case Construction:
if (getAction())
getAction()->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateBSpline_Constr"));
getAction()->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateBSpline_Constr"));
break;
}
}*/
@@ -4982,16 +4982,16 @@ Gui::Action * CmdSketcherCompCreateBSpline::createAction(void)
applyCommandData(this->className(), pcAction);
QAction* bspline = pcAction->addAction(QString());
bspline->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateBSpline"));
bspline->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateBSpline"));
QAction* periodicbspline = pcAction->addAction(QString());
periodicbspline->setIcon(Gui::BitmapFactory().pixmap("Sketcher_Create_Periodic_BSpline"));
periodicbspline->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_Create_Periodic_BSpline"));
_pcAction = pcAction;
languageChange();
// default
pcAction->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateBSpline"));
pcAction->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateBSpline"));
int defaultId = 0;
pcAction->setProperty("defaultAction", QVariant(defaultId));
@@ -5008,13 +5008,13 @@ void CmdSketcherCompCreateBSpline::updateAction(int mode)
int index = pcAction->property("defaultAction").toInt();
switch (mode) {
case Normal:
a[0]->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateBSpline"));
a[1]->setIcon(Gui::BitmapFactory().pixmap("Sketcher_Create_Periodic_BSpline"));
a[0]->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateBSpline"));
a[1]->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_Create_Periodic_BSpline"));
getAction()->setIcon(a[index]->icon());
break;
case Construction:
a[0]->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateBSpline_Constr"));
a[1]->setIcon(Gui::BitmapFactory().pixmap("Sketcher_Create_Periodic_BSpline_Constr"));
a[0]->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateBSpline_Constr"));
a[1]->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_Create_Periodic_BSpline_Constr"));
getAction()->setIcon(a[index]->icon());
break;
}
@@ -5337,9 +5337,9 @@ Gui::Action * CmdSketcherCompCreateCircle::createAction(void)
applyCommandData(this->className(), pcAction);
QAction* arc1 = pcAction->addAction(QString());
arc1->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateCircle"));
arc1->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateCircle"));
QAction* arc2 = pcAction->addAction(QString());
arc2->setIcon(Gui::BitmapFactory().pixmap("Sketcher_Create3PointCircle"));
arc2->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_Create3PointCircle"));
_pcAction = pcAction;
languageChange();
@@ -5361,13 +5361,13 @@ void CmdSketcherCompCreateCircle::updateAction(int mode)
int index = pcAction->property("defaultAction").toInt();
switch (mode) {
case Normal:
a[0]->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateCircle"));
a[1]->setIcon(Gui::BitmapFactory().pixmap("Sketcher_Create3PointCircle"));
a[0]->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateCircle"));
a[1]->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_Create3PointCircle"));
getAction()->setIcon(a[index]->icon());
break;
case Construction:
a[0]->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateCircle_Constr"));
a[1]->setIcon(Gui::BitmapFactory().pixmap("Sketcher_Create3PointCircle_Constr"));
a[0]->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateCircle_Constr"));
a[1]->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_Create3PointCircle_Constr"));
getAction()->setIcon(a[index]->icon());
break;
}
@@ -6889,11 +6889,11 @@ static const char *cursor_carboncopy[]={
switch (mode) {
case Normal:
if (getAction())
getAction()->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CarbonCopy"));
getAction()->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CarbonCopy"));
break;
case Construction:
if (getAction())
getAction()->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CarbonCopy_Constr"));
getAction()->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CarbonCopy_Constr"));
break;
}
}
@@ -7164,11 +7164,11 @@ void CmdSketcherCreateSlot::updateAction(int mode)
switch (mode) {
case Normal:
if (getAction())
getAction()->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateSlot"));
getAction()->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateSlot"));
break;
case Construction:
if (getAction())
getAction()->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateSlot_Constr"));
getAction()->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateSlot_Constr"));
break;
}
}
@@ -7614,19 +7614,19 @@ Gui::Action * CmdSketcherCompCreateRegularPolygon::createAction(void)
applyCommandData(this->className(), pcAction);
QAction* triangle = pcAction->addAction(QString());
triangle->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateTriangle"));
triangle->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateTriangle"));
QAction* square = pcAction->addAction(QString());
square->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateSquare"));
square->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateSquare"));
QAction* pentagon = pcAction->addAction(QString());
pentagon->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreatePentagon"));
pentagon->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreatePentagon"));
QAction* hexagon = pcAction->addAction(QString());
hexagon->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateHexagon"));
hexagon->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateHexagon"));
QAction* heptagon = pcAction->addAction(QString());
heptagon->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateHeptagon"));
heptagon->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateHeptagon"));
QAction* octagon = pcAction->addAction(QString());
octagon->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateOctagon"));
octagon->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateOctagon"));
QAction* regular = pcAction->addAction(QString());
regular->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateRegularPolygon"));
regular->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateRegularPolygon"));
_pcAction = pcAction;
languageChange();
@@ -7648,23 +7648,23 @@ void CmdSketcherCompCreateRegularPolygon::updateAction(int mode)
int index = pcAction->property("defaultAction").toInt();
switch (mode) {
case Normal:
a[0]->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateTriangle"));
a[1]->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateSquare"));
a[2]->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreatePentagon"));
a[3]->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateHexagon"));
a[4]->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateHeptagon"));
a[5]->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateOctagon"));
a[6]->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateRegularPolygon"));
a[0]->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateTriangle"));
a[1]->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateSquare"));
a[2]->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreatePentagon"));
a[3]->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateHexagon"));
a[4]->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateHeptagon"));
a[5]->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateOctagon"));
a[6]->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateRegularPolygon"));
getAction()->setIcon(a[index]->icon());
break;
case Construction:
a[0]->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateTriangle_Constr"));
a[1]->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateSquare_Constr"));
a[2]->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreatePentagon_Constr"));
a[3]->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateHexagon_Constr"));
a[4]->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateHeptagon_Constr"));
a[5]->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateOctagon_Constr"));
a[6]->setIcon(Gui::BitmapFactory().pixmap("Sketcher_CreateRegularPolygon_Constr"));
a[0]->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateTriangle_Constr"));
a[1]->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateSquare_Constr"));
a[2]->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreatePentagon_Constr"));
a[3]->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateHexagon_Constr"));
a[4]->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateHeptagon_Constr"));
a[5]->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateOctagon_Constr"));
a[6]->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_CreateRegularPolygon_Constr"));
getAction()->setIcon(a[index]->icon());
break;
}

View File

@@ -284,13 +284,13 @@ Gui::Action * CmdSketcherCompBSplineShowHideGeometryInformation::createAction(vo
applyCommandData(this->className(), pcAction);
QAction* c1 = pcAction->addAction(QString());
c1->setIcon(Gui::BitmapFactory().pixmap("Sketcher_BSplineDegree"));
c1->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_BSplineDegree"));
QAction* c2 = pcAction->addAction(QString());
c2->setIcon(Gui::BitmapFactory().pixmap("Sketcher_BSplinePolygon"));
c2->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_BSplinePolygon"));
QAction* c3 = pcAction->addAction(QString());
c3->setIcon(Gui::BitmapFactory().pixmap("Sketcher_BSplineComb"));
c3->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_BSplineComb"));
QAction* c4 = pcAction->addAction(QString());
c4->setIcon(Gui::BitmapFactory().pixmap("Sketcher_BSplineKnotMultiplicity"));
c4->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_BSplineKnotMultiplicity"));
_pcAction = pcAction;
languageChange();
@@ -856,9 +856,9 @@ Gui::Action * CmdSketcherCompModifyKnotMultiplicity::createAction(void)
applyCommandData(this->className(), pcAction);
QAction* c1 = pcAction->addAction(QString());
c1->setIcon(Gui::BitmapFactory().pixmap("Sketcher_BSplineIncreaseKnotMultiplicity"));
c1->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_BSplineIncreaseKnotMultiplicity"));
QAction* c2 = pcAction->addAction(QString());
c2->setIcon(Gui::BitmapFactory().pixmap("Sketcher_BSplineDecreaseKnotMultiplicity"));
c2->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_BSplineDecreaseKnotMultiplicity"));
_pcAction = pcAction;
languageChange();

View File

@@ -1595,11 +1595,11 @@ Gui::Action * CmdSketcherCompCopy::createAction(void)
applyCommandData(this->className(), pcAction);
QAction* clone = pcAction->addAction(QString());
clone->setIcon(Gui::BitmapFactory().pixmap("Sketcher_Clone"));
clone->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_Clone"));
QAction* copy = pcAction->addAction(QString());
copy->setIcon(Gui::BitmapFactory().pixmap("Sketcher_Copy"));
copy->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_Copy"));
QAction* move = pcAction->addAction(QString());
move->setIcon(Gui::BitmapFactory().pixmap("Sketcher_Move"));
move->setIcon(Gui::BitmapFactory().iconFromTheme("Sketcher_Move"));
_pcAction = pcAction;
languageChange();

View File

@@ -177,40 +177,40 @@ public:
return name;
}
else if (role == Qt::DecorationRole) {
static QIcon hdist( Gui::BitmapFactory().pixmap("Constraint_HorizontalDistance") );
static QIcon vdist( Gui::BitmapFactory().pixmap("Constraint_VerticalDistance") );
static QIcon horiz( Gui::BitmapFactory().pixmap("Constraint_Horizontal") );
static QIcon vert ( Gui::BitmapFactory().pixmap("Constraint_Vertical") );
//static QIcon lock ( Gui::BitmapFactory().pixmap("Sketcher_ConstrainLock") );
static QIcon block ( Gui::BitmapFactory().pixmap("Sketcher_ConstrainBlock") );
static QIcon coinc( Gui::BitmapFactory().pixmap("Constraint_PointOnPoint") );
static QIcon para ( Gui::BitmapFactory().pixmap("Constraint_Parallel") );
static QIcon perp ( Gui::BitmapFactory().pixmap("Constraint_Perpendicular") );
static QIcon tang ( Gui::BitmapFactory().pixmap("Constraint_Tangent") );
static QIcon dist ( Gui::BitmapFactory().pixmap("Constraint_Length") );
static QIcon radi ( Gui::BitmapFactory().pixmap("Constraint_Radius") );
static QIcon dia ( Gui::BitmapFactory().pixmap("Constraint_Diameter") );
//static QIcon majradi ( Gui::BitmapFactory().pixmap("Constraint_Ellipse_Major_Radius") );
//static QIcon minradi ( Gui::BitmapFactory().pixmap("Constraint_Ellipse_Minor_Radius") );
static QIcon angl ( Gui::BitmapFactory().pixmap("Constraint_InternalAngle") );
//static QIcon ellipseXUAngl ( Gui::BitmapFactory().pixmap("Constraint_Ellipse_Axis_Angle") );
static QIcon equal( Gui::BitmapFactory().pixmap("Constraint_EqualLength") );
static QIcon pntoo( Gui::BitmapFactory().pixmap("Constraint_PointOnObject") );
static QIcon symm ( Gui::BitmapFactory().pixmap("Constraint_Symmetric") );
static QIcon snell ( Gui::BitmapFactory().pixmap("Constraint_SnellsLaw") );
static QIcon iaellipseminoraxis ( Gui::BitmapFactory().pixmap("Constraint_InternalAlignment_Ellipse_MinorAxis") );
static QIcon iaellipsemajoraxis ( Gui::BitmapFactory().pixmap("Constraint_InternalAlignment_Ellipse_MajorAxis") );
static QIcon iaellipsefocus1 ( Gui::BitmapFactory().pixmap("Constraint_InternalAlignment_Ellipse_Focus1") );
static QIcon iaellipsefocus2 ( Gui::BitmapFactory().pixmap("Constraint_InternalAlignment_Ellipse_Focus2") );
static QIcon iaellipseother ( Gui::BitmapFactory().pixmap("Constraint_InternalAlignment") );
static QIcon hdist( Gui::BitmapFactory().iconFromTheme("Constraint_HorizontalDistance") );
static QIcon vdist( Gui::BitmapFactory().iconFromTheme("Constraint_VerticalDistance") );
static QIcon horiz( Gui::BitmapFactory().iconFromTheme("Constraint_Horizontal") );
static QIcon vert ( Gui::BitmapFactory().iconFromTheme("Constraint_Vertical") );
//static QIcon lock ( Gui::BitmapFactory().iconFromTheme("Sketcher_ConstrainLock") );
static QIcon block ( Gui::BitmapFactory().iconFromTheme("Sketcher_ConstrainBlock") );
static QIcon coinc( Gui::BitmapFactory().iconFromTheme("Constraint_PointOnPoint") );
static QIcon para ( Gui::BitmapFactory().iconFromTheme("Constraint_Parallel") );
static QIcon perp ( Gui::BitmapFactory().iconFromTheme("Constraint_Perpendicular") );
static QIcon tang ( Gui::BitmapFactory().iconFromTheme("Constraint_Tangent") );
static QIcon dist ( Gui::BitmapFactory().iconFromTheme("Constraint_Length") );
static QIcon radi ( Gui::BitmapFactory().iconFromTheme("Constraint_Radius") );
static QIcon dia ( Gui::BitmapFactory().iconFromTheme("Constraint_Diameter") );
//static QIcon majradi ( Gui::BitmapFactory().iconFromTheme("Constraint_Ellipse_Major_Radius") );
//static QIcon minradi ( Gui::BitmapFactory().iconFromTheme("Constraint_Ellipse_Minor_Radius") );
static QIcon angl ( Gui::BitmapFactory().iconFromTheme("Constraint_InternalAngle") );
//static QIcon ellipseXUAngl ( Gui::BitmapFactory().iconFromTheme("Constraint_Ellipse_Axis_Angle") );
static QIcon equal( Gui::BitmapFactory().iconFromTheme("Constraint_EqualLength") );
static QIcon pntoo( Gui::BitmapFactory().iconFromTheme("Constraint_PointOnObject") );
static QIcon symm ( Gui::BitmapFactory().iconFromTheme("Constraint_Symmetric") );
static QIcon snell ( Gui::BitmapFactory().iconFromTheme("Constraint_SnellsLaw") );
static QIcon iaellipseminoraxis ( Gui::BitmapFactory().iconFromTheme("Constraint_InternalAlignment_Ellipse_MinorAxis") );
static QIcon iaellipsemajoraxis ( Gui::BitmapFactory().iconFromTheme("Constraint_InternalAlignment_Ellipse_MajorAxis") );
static QIcon iaellipsefocus1 ( Gui::BitmapFactory().iconFromTheme("Constraint_InternalAlignment_Ellipse_Focus1") );
static QIcon iaellipsefocus2 ( Gui::BitmapFactory().iconFromTheme("Constraint_InternalAlignment_Ellipse_Focus2") );
static QIcon iaellipseother ( Gui::BitmapFactory().iconFromTheme("Constraint_InternalAlignment") );
static QIcon hdist_driven ( Gui::BitmapFactory().pixmap("Constraint_HorizontalDistance_Driven") );
static QIcon vdist_driven( Gui::BitmapFactory().pixmap("Constraint_VerticalDistance_Driven") );
static QIcon dist_driven ( Gui::BitmapFactory().pixmap("Constraint_Length_Driven") );
static QIcon radi_driven ( Gui::BitmapFactory().pixmap("Constraint_Radius_Driven") );
static QIcon dia_driven ( Gui::BitmapFactory().pixmap("Constraint_Diameter_Driven") );
static QIcon angl_driven ( Gui::BitmapFactory().pixmap("Constraint_InternalAngle_Driven") );
static QIcon snell_driven ( Gui::BitmapFactory().pixmap("Constraint_SnellsLaw_Driven") );
static QIcon hdist_driven ( Gui::BitmapFactory().iconFromTheme("Constraint_HorizontalDistance_Driven") );
static QIcon vdist_driven( Gui::BitmapFactory().iconFromTheme("Constraint_VerticalDistance_Driven") );
static QIcon dist_driven ( Gui::BitmapFactory().iconFromTheme("Constraint_Length_Driven") );
static QIcon radi_driven ( Gui::BitmapFactory().iconFromTheme("Constraint_Radius_Driven") );
static QIcon dia_driven ( Gui::BitmapFactory().iconFromTheme("Constraint_Diameter_Driven") );
static QIcon angl_driven ( Gui::BitmapFactory().iconFromTheme("Constraint_InternalAngle_Driven") );
static QIcon snell_driven ( Gui::BitmapFactory().iconFromTheme("Constraint_SnellsLaw_Driven") );
switch(constraint->Type){
case Sketcher::Horizontal:

View File

@@ -650,34 +650,34 @@ void TaskSketcherElements::leaveEvent (QEvent * event)
void TaskSketcherElements::slotElementsChanged(void)
{
QIcon Sketcher_Element_Arc_Edge( Gui::BitmapFactory().pixmap("Sketcher_Element_Arc_Edge") );
QIcon Sketcher_Element_Arc_EndPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Arc_EndPoint") );
QIcon Sketcher_Element_Arc_MidPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Arc_MidPoint") );
QIcon Sketcher_Element_Arc_StartingPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Arc_StartingPoint") );
QIcon Sketcher_Element_Circle_Edge( Gui::BitmapFactory().pixmap("Sketcher_Element_Circle_Edge") );
QIcon Sketcher_Element_Circle_MidPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Circle_MidPoint") );
QIcon Sketcher_Element_Line_Edge( Gui::BitmapFactory().pixmap("Sketcher_Element_Line_Edge") );
QIcon Sketcher_Element_Line_EndPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Line_EndPoint") );
QIcon Sketcher_Element_Line_StartingPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Line_StartingPoint") );
QIcon Sketcher_Element_Point_StartingPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Point_StartingPoint") );
QIcon Sketcher_Element_Ellipse_Edge( Gui::BitmapFactory().pixmap("Sketcher_Element_Ellipse_Edge_2") );
QIcon Sketcher_Element_Ellipse_MidPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Ellipse_CentrePoint") );
QIcon Sketcher_Element_ArcOfEllipse_Edge( Gui::BitmapFactory().pixmap("Sketcher_Element_Elliptical_Arc_Edge") );
QIcon Sketcher_Element_ArcOfEllipse_MidPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Elliptical_Arc_Centre_Point") );
QIcon Sketcher_Element_ArcOfEllipse_StartingPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Elliptical_Arc_Start_Point") );
QIcon Sketcher_Element_ArcOfEllipse_EndPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Elliptical_Arc_End_Point") );
QIcon Sketcher_Element_ArcOfHyperbola_Edge( Gui::BitmapFactory().pixmap("Sketcher_Element_Hyperbolic_Arc_Edge") );
QIcon Sketcher_Element_ArcOfHyperbola_MidPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Hyperbolic_Arc_Centre_Point") );
QIcon Sketcher_Element_ArcOfHyperbola_StartingPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Hyperbolic_Arc_Start_Point") );
QIcon Sketcher_Element_ArcOfHyperbola_EndPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Hyperbolic_Arc_End_Point") );
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_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_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 Sketcher_Element_Arc_Edge( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Arc_Edge") );
QIcon Sketcher_Element_Arc_EndPoint( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Arc_EndPoint") );
QIcon Sketcher_Element_Arc_MidPoint( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Arc_MidPoint") );
QIcon Sketcher_Element_Arc_StartingPoint( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Arc_StartingPoint") );
QIcon Sketcher_Element_Circle_Edge( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Circle_Edge") );
QIcon Sketcher_Element_Circle_MidPoint( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Circle_MidPoint") );
QIcon Sketcher_Element_Line_Edge( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Line_Edge") );
QIcon Sketcher_Element_Line_EndPoint( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Line_EndPoint") );
QIcon Sketcher_Element_Line_StartingPoint( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Line_StartingPoint") );
QIcon Sketcher_Element_Point_StartingPoint( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Point_StartingPoint") );
QIcon Sketcher_Element_Ellipse_Edge( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Ellipse_Edge_2") );
QIcon Sketcher_Element_Ellipse_MidPoint( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Ellipse_CentrePoint") );
QIcon Sketcher_Element_ArcOfEllipse_Edge( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Elliptical_Arc_Edge") );
QIcon Sketcher_Element_ArcOfEllipse_MidPoint( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Elliptical_Arc_Centre_Point") );
QIcon Sketcher_Element_ArcOfEllipse_StartingPoint( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Elliptical_Arc_Start_Point") );
QIcon Sketcher_Element_ArcOfEllipse_EndPoint( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Elliptical_Arc_End_Point") );
QIcon Sketcher_Element_ArcOfHyperbola_Edge( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Hyperbolic_Arc_Edge") );
QIcon Sketcher_Element_ArcOfHyperbola_MidPoint( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Hyperbolic_Arc_Centre_Point") );
QIcon Sketcher_Element_ArcOfHyperbola_StartingPoint( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Hyperbolic_Arc_Start_Point") );
QIcon Sketcher_Element_ArcOfHyperbola_EndPoint( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Hyperbolic_Arc_End_Point") );
QIcon Sketcher_Element_ArcOfParabola_Edge( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Parabolic_Arc_Edge") );
QIcon Sketcher_Element_ArcOfParabola_MidPoint( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Parabolic_Arc_Centre_Point") );
QIcon Sketcher_Element_ArcOfParabola_StartingPoint( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Parabolic_Arc_Start_Point") );
QIcon Sketcher_Element_ArcOfParabola_EndPoint( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Parabolic_Arc_End_Point") );
QIcon Sketcher_Element_BSpline_Edge( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_BSpline_Edge") );
QIcon Sketcher_Element_BSpline_StartingPoint( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_BSpline_StartPoint") );
QIcon Sketcher_Element_BSpline_EndPoint( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_BSpline_EndPoint") );
QIcon none( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_SelectionTypeInvalid") );
assert(sketchView);
// Build up ListView with the elements
@@ -973,34 +973,34 @@ void TaskSketcherElements::clearWidget()
void TaskSketcherElements::updateIcons(int element)
{
QIcon Sketcher_Element_Arc_Edge( Gui::BitmapFactory().pixmap("Sketcher_Element_Arc_Edge") );
QIcon Sketcher_Element_Arc_EndPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Arc_EndPoint") );
QIcon Sketcher_Element_Arc_MidPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Arc_MidPoint") );
QIcon Sketcher_Element_Arc_StartingPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Arc_StartingPoint") );
QIcon Sketcher_Element_Circle_Edge( Gui::BitmapFactory().pixmap("Sketcher_Element_Circle_Edge") );
QIcon Sketcher_Element_Circle_MidPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Circle_MidPoint") );
QIcon Sketcher_Element_Line_Edge( Gui::BitmapFactory().pixmap("Sketcher_Element_Line_Edge") );
QIcon Sketcher_Element_Line_EndPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Line_EndPoint") );
QIcon Sketcher_Element_Line_StartingPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Line_StartingPoint") );
QIcon Sketcher_Element_Point_StartingPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Point_StartingPoint") );
QIcon Sketcher_Element_Ellipse_Edge( Gui::BitmapFactory().pixmap("Sketcher_Element_Ellipse_Edge_2") );
QIcon Sketcher_Element_Ellipse_MidPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Ellipse_CentrePoint") );
QIcon Sketcher_Element_ArcOfEllipse_Edge( Gui::BitmapFactory().pixmap("Sketcher_Element_Elliptical_Arc_Edge") );
QIcon Sketcher_Element_ArcOfEllipse_MidPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Elliptical_Arc_Centre_Point") );
QIcon Sketcher_Element_ArcOfEllipse_StartingPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Elliptical_Arc_Start_Point") );
QIcon Sketcher_Element_ArcOfEllipse_EndPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Elliptical_Arc_End_Point") );
QIcon Sketcher_Element_ArcOfHyperbola_Edge( Gui::BitmapFactory().pixmap("Sketcher_Element_Hyperbolic_Arc_Edge") );
QIcon Sketcher_Element_ArcOfHyperbola_MidPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Hyperbolic_Arc_Centre_Point") );
QIcon Sketcher_Element_ArcOfHyperbola_StartingPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Hyperbolic_Arc_Start_Point") );
QIcon Sketcher_Element_ArcOfHyperbola_EndPoint( Gui::BitmapFactory().pixmap("Sketcher_Element_Hyperbolic_Arc_End_Point") );
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_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_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 Sketcher_Element_Arc_Edge( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Arc_Edge") );
QIcon Sketcher_Element_Arc_EndPoint( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Arc_EndPoint") );
QIcon Sketcher_Element_Arc_MidPoint( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Arc_MidPoint") );
QIcon Sketcher_Element_Arc_StartingPoint( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Arc_StartingPoint") );
QIcon Sketcher_Element_Circle_Edge( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Circle_Edge") );
QIcon Sketcher_Element_Circle_MidPoint( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Circle_MidPoint") );
QIcon Sketcher_Element_Line_Edge( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Line_Edge") );
QIcon Sketcher_Element_Line_EndPoint( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Line_EndPoint") );
QIcon Sketcher_Element_Line_StartingPoint( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Line_StartingPoint") );
QIcon Sketcher_Element_Point_StartingPoint( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Point_StartingPoint") );
QIcon Sketcher_Element_Ellipse_Edge( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Ellipse_Edge_2") );
QIcon Sketcher_Element_Ellipse_MidPoint( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Ellipse_CentrePoint") );
QIcon Sketcher_Element_ArcOfEllipse_Edge( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Elliptical_Arc_Edge") );
QIcon Sketcher_Element_ArcOfEllipse_MidPoint( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Elliptical_Arc_Centre_Point") );
QIcon Sketcher_Element_ArcOfEllipse_StartingPoint( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Elliptical_Arc_Start_Point") );
QIcon Sketcher_Element_ArcOfEllipse_EndPoint( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Elliptical_Arc_End_Point") );
QIcon Sketcher_Element_ArcOfHyperbola_Edge( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Hyperbolic_Arc_Edge") );
QIcon Sketcher_Element_ArcOfHyperbola_MidPoint( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Hyperbolic_Arc_Centre_Point") );
QIcon Sketcher_Element_ArcOfHyperbola_StartingPoint( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Hyperbolic_Arc_Start_Point") );
QIcon Sketcher_Element_ArcOfHyperbola_EndPoint( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Hyperbolic_Arc_End_Point") );
QIcon Sketcher_Element_ArcOfParabola_Edge( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Parabolic_Arc_Edge") );
QIcon Sketcher_Element_ArcOfParabola_MidPoint( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Parabolic_Arc_Centre_Point") );
QIcon Sketcher_Element_ArcOfParabola_StartingPoint( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Parabolic_Arc_Start_Point") );
QIcon Sketcher_Element_ArcOfParabola_EndPoint( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_Parabolic_Arc_End_Point") );
QIcon Sketcher_Element_BSpline_Edge( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_BSpline_Edge") );
QIcon Sketcher_Element_BSpline_StartingPoint( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_BSpline_StartPoint") );
QIcon Sketcher_Element_BSpline_EndPoint( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_BSpline_EndPoint") );
QIcon none( Gui::BitmapFactory().iconFromTheme("Sketcher_Element_SelectionTypeInvalid") );
for (int i=0;i<ui->listWidgetElements->count(); i++) {
Base::Type type = static_cast<ElementItem *>(ui->listWidgetElements->item(i))->GeometryType;