Sketcher: move icons to tools subdirectory
Add the icon path to the workbench's `InitGui.py`.
@@ -132,7 +132,7 @@ void CmdSketcherCloseShape::activated(int iMsg)
|
||||
int GeoIdLast=-1;
|
||||
|
||||
// undo command open
|
||||
openCommand("add coincident constraint");
|
||||
openCommand("Add coincident constraint");
|
||||
// go through the selected subelements
|
||||
for (unsigned int i=0; i<(SubNames.size()-1); i++ ) {
|
||||
// only handle edges
|
||||
@@ -234,7 +234,7 @@ void CmdSketcherConnect::activated(int iMsg)
|
||||
Sketcher::SketchObject* Obj = static_cast<Sketcher::SketchObject*>(selection[0].getObject());
|
||||
|
||||
// undo command open
|
||||
openCommand("add coincident constraint");
|
||||
openCommand("Add coincident constraint");
|
||||
|
||||
// go through the selected subelements
|
||||
for (unsigned int i=0; i<(SubNames.size()-1); i++ ) {
|
||||
@@ -1042,13 +1042,18 @@ void CmdSketcherSymmetry::activated(int iMsg)
|
||||
|
||||
if ( geoids == 0 || (geoids == 1 && LastGeoId>=0 && !lastvertexoraxis) ) {
|
||||
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
|
||||
QObject::tr("A symmetric construction requires at least two geometric elements, the last geometric element being the reference for the symmetry construction."));
|
||||
QObject::tr("A symmetric construction requires "
|
||||
"at least two geometric elements, "
|
||||
"the last geometric element being the reference "
|
||||
"for the symmetry construction."));
|
||||
return;
|
||||
}
|
||||
|
||||
if ( lastgeotype == invalid ) {
|
||||
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
|
||||
QObject::tr("The last element must be a point or a line serving as reference for the symmetry construction."));
|
||||
QObject::tr("The last element must be a point "
|
||||
"or a line serving as reference "
|
||||
"for the symmetry construction."));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1106,6 +1111,7 @@ public:
|
||||
virtual void activate() = 0;
|
||||
};
|
||||
|
||||
// TODO: replace XPM cursor with SVG file
|
||||
static const char *cursor_createcopy[]={
|
||||
"32 32 3 1",
|
||||
"+ c white",
|
||||
@@ -1350,7 +1356,7 @@ void SketcherCopy::activate(SketcherCopy::Op op)
|
||||
|
||||
if (geoids < 1) {
|
||||
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
|
||||
QObject::tr("A copy requires at least one selected non-external geometric element"));
|
||||
QObject::tr("A copy requires at least one selected non-external geometric element"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1375,23 +1381,24 @@ void SketcherCopy::activate(SketcherCopy::Op op)
|
||||
}
|
||||
|
||||
// Ask the user if he wants to clone or to simple copy
|
||||
/*int ret = QMessageBox::question(Gui::getMainWindow(), QObject::tr("Dimensional/Geometric constraints"),
|
||||
* QObject::tr("Do you want to clone the object, i.e. substitute dimensional constraints by geometric constraints?"),
|
||||
* QMessageBox::Yes, QMessageBox::No, QMessageBox::Cancel);
|
||||
* // use an equality constraint
|
||||
* if (ret == QMessageBox::Yes) {
|
||||
* clone = true;
|
||||
}
|
||||
else if (ret == QMessageBox::Cancel) {
|
||||
/*
|
||||
int ret = QMessageBox::question(Gui::getMainWindow(), QObject::tr("Dimensional/Geometric constraints"),
|
||||
QObject::tr("Do you want to clone the object, i.e. substitute dimensional constraints by geometric constraints?"),
|
||||
QMessageBox::Yes, QMessageBox::No, QMessageBox::Cancel);
|
||||
// use an equality constraint
|
||||
if (ret == QMessageBox::Yes) {
|
||||
clone = true;
|
||||
}
|
||||
else if (ret == QMessageBox::Cancel) {
|
||||
// do nothing
|
||||
return;
|
||||
}*/
|
||||
}
|
||||
*/
|
||||
|
||||
ActivateAcceleratorHandler(getActiveGuiDocument(),new DrawSketchHandlerCopy(geoIdList, LastGeoId, LastPointPos, geoids, op));
|
||||
}
|
||||
|
||||
|
||||
|
||||
class CmdSketcherCopy : public SketcherCopy
|
||||
{
|
||||
public:
|
||||
@@ -1622,6 +1629,7 @@ bool CmdSketcherCompCopy::isActive(void)
|
||||
}
|
||||
|
||||
|
||||
// TODO: replace XPM cursor with SVG file
|
||||
/* XPM */
|
||||
static const char *cursor_createrectangulararray[]={
|
||||
"32 32 3 1",
|
||||
|
||||
@@ -61,10 +61,6 @@
|
||||
<qresource>
|
||||
<file>icons/Sketcher_CarbonCopy.svg</file>
|
||||
<file>icons/Sketcher_CarbonCopy_Constr.svg</file>
|
||||
<file>icons/Sketcher_Clone.svg</file>
|
||||
<file>icons/Sketcher_CloseShape.svg</file>
|
||||
<file>icons/Sketcher_ConnectLines.svg</file>
|
||||
<file>icons/Sketcher_Copy.svg</file>
|
||||
</qresource>
|
||||
<qresource>
|
||||
<file>icons/geometry/Sketcher_Conics.svg</file>
|
||||
@@ -167,7 +163,6 @@
|
||||
<file>icons/Sketcher_MapSketch.svg</file>
|
||||
<file>icons/Sketcher_MergeSketch.svg</file>
|
||||
<file>icons/Sketcher_MirrorSketch.svg</file>
|
||||
<file>icons/Sketcher_Move.svg</file>
|
||||
<file>icons/Sketcher_NewSketch.svg</file>
|
||||
<file alias="icons/preferences-sketcher.svg">icons/Sketcher_NewSketch.svg</file>
|
||||
</qresource>
|
||||
@@ -193,20 +188,27 @@
|
||||
<file>icons/pointers/Sketcher_Pointer_Slot.svg</file>
|
||||
<file>icons/pointers/Sketcher_Pointer_Trimming.svg</file>
|
||||
</qresource>
|
||||
<qresource>
|
||||
<file>icons/tools/Sketcher_Clone.svg</file>
|
||||
<file>icons/tools/Sketcher_CloseShape.svg</file>
|
||||
<file>icons/tools/Sketcher_ConnectLines.svg</file>
|
||||
<file>icons/tools/Sketcher_Copy.svg</file>
|
||||
<file>icons/tools/Sketcher_Move.svg</file>
|
||||
<file>icons/tools/Sketcher_RectangularArray.svg</file>
|
||||
<file>icons/tools/Sketcher_SelectConflictingConstraints.svg</file>
|
||||
<file>icons/tools/Sketcher_SelectConstraints.svg</file>
|
||||
<file>icons/tools/Sketcher_SelectElementsAssociatedWithConstraints.svg</file>
|
||||
<file>icons/tools/Sketcher_SelectElementsWithDoFs.svg</file>
|
||||
<file>icons/tools/Sketcher_SelectHorizontalAxis.svg</file>
|
||||
<file>icons/tools/Sketcher_SelectOrigin.svg</file>
|
||||
<file>icons/tools/Sketcher_SelectRedundantConstraints.svg</file>
|
||||
<file>icons/tools/Sketcher_SelectVerticalAxis.svg</file>
|
||||
<file>icons/tools/Sketcher_Symmetry.svg</file>
|
||||
</qresource>
|
||||
<qresource>
|
||||
<file>icons/Sketcher_ProfilesHexagon1.svg</file>
|
||||
<file>icons/Sketcher_RectangularArray.svg</file>
|
||||
<file>icons/Sketcher_SelectConflictingConstraints.svg</file>
|
||||
<file>icons/Sketcher_SelectConstraints.svg</file>
|
||||
<file>icons/Sketcher_SelectElementsAssociatedWithConstraints.svg</file>
|
||||
<file>icons/Sketcher_SelectElementsWithDoFs.svg</file>
|
||||
<file>icons/Sketcher_SelectHorizontalAxis.svg</file>
|
||||
<file>icons/Sketcher_SelectOrigin.svg</file>
|
||||
<file>icons/Sketcher_SelectRedundantConstraints.svg</file>
|
||||
<file>icons/Sketcher_SelectVerticalAxis.svg</file>
|
||||
<file>icons/Sketcher_Sketch.svg</file>
|
||||
<file>icons/Sketcher_SwitchVirtualSpace.svg</file>
|
||||
<file>icons/Sketcher_Symmetry.svg</file>
|
||||
<file>icons/Sketcher_ToggleActiveConstraint.svg</file>
|
||||
<file>icons/Sketcher_ToggleConstraint.svg</file>
|
||||
<file>icons/Sketcher_Toggle_Constraint_Driven.svg</file>
|
||||
|
||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
@@ -48,6 +48,7 @@ class SketcherWorkbench ( Workbench ):
|
||||
# Gui.addIconPath(":/icons/obsolete")
|
||||
Gui.addIconPath(":/icons/pointers")
|
||||
Gui.addIconPath(":/icons/splines")
|
||||
Gui.addIconPath(":/icons/tools")
|
||||
try:
|
||||
import Profiles
|
||||
except ImportError:
|
||||
|
||||