Basic Decorate clean up. moved here the selection drawing. Added icons

This commit is contained in:
Paolo Cignoni cignoni 2014-11-06 15:50:38 +00:00
parent 360eca17a7
commit 3f8479e07d
6 changed files with 20 additions and 16 deletions

View File

@ -56,8 +56,8 @@ QString DecorateBasePlugin::decorationInfo(FilterIDType filter) const
case DP_SHOW_CAMERA: return tr("Draw the position of the camera, if present in the current mesh");
case DP_SHOW_TEXPARAM: return tr("Draw an overlayed flattened version of the current mesh that show the current parametrization");
case DP_SHOW_SELECTED_MESH: return tr("Enlighten the current mesh");
/* case DP_SHOW_SELECTED_FACE: return tr("Show the selected faces of the current mesh");
case DP_SHOW_SELECTED_VERT: return tr("Show the selected vertices of the current mesh");*/
case DP_SHOW_SELECTED_FACE: return tr("Show the selected faces of the current mesh");
case DP_SHOW_SELECTED_VERT: return tr("Show the selected vertices of the current mesh");
}
assert(0);
return QString();
@ -85,8 +85,8 @@ QString DecorateBasePlugin::decorationName(FilterIDType filter) const
case DP_SHOW_QUALITY_HISTOGRAM: return QString("Show Quality Histogram");
case DP_SHOW_QUALITY_CONTOUR: return QString("Show Quality Contour");
case DP_SHOW_SELECTED_MESH: return QString("Show Current Mesh");
/* case DP_SHOW_SELECTED_FACE: return QString("Show Selected Faces");
case DP_SHOW_SELECTED_VERT: return QString("Show Selected Vertices");*/
case DP_SHOW_SELECTED_FACE: return QString("Show Selected Faces");
case DP_SHOW_SELECTED_VERT: return QString("Show Selected Vertices");
default: assert(0);
}
@ -435,12 +435,12 @@ void DecorateBasePlugin::decorateMesh(QAction *a, MeshModel &m, RichParameterSet
glPopAttrib();
}
} break;
/*case DP_SHOW_SELECTED_FACE :
case DP_SHOW_SELECTED_FACE :
m.renderSelectedFace();
break;
case DP_SHOW_SELECTED_VERT :
m.renderSelectedVert();
break;*/
break;
} // end switch;
glPopMatrix();
}
@ -843,8 +843,8 @@ int DecorateBasePlugin::getDecorationClass(QAction *action) const
case DP_SHOW_QUOTED_BOX :
case DP_SHOW_LABEL :
case DP_SHOW_TEXPARAM :
/*case DP_SHOW_SELECTED_FACE :
case DP_SHOW_SELECTED_VERT :*/
case DP_SHOW_SELECTED_FACE :
case DP_SHOW_SELECTED_VERT :
case DP_SHOW_BOUNDARY_TEX : return DecorateBasePlugin::PerMesh;
case DP_SHOW_AXIS : return DecorateBasePlugin::PerDocument;
case DP_SHOW_CAMERA : return DecorateBasePlugin::PerDocument;

View File

@ -59,9 +59,9 @@ class DecorateBasePlugin : public QObject, public MeshDecorateInterface
DP_SHOW_CAMERA,
DP_SHOW_TEXPARAM,
DP_SHOW_BOUNDARY_TEX,
DP_SHOW_SELECTED_MESH/*,
DP_SHOW_SELECTED_MESH ,
DP_SHOW_SELECTED_FACE,
DP_SHOW_SELECTED_VERT*/
DP_SHOW_SELECTED_VERT
};
@ -99,18 +99,19 @@ public:
DP_SHOW_CAMERA <<
DP_SHOW_TEXPARAM <<
DP_SHOW_SELECTED_MESH <<
/*DP_SHOW_SELECTED_FACE <<
DP_SHOW_SELECTED_VERT <<*/
DP_SHOW_SELECTED_FACE <<
DP_SHOW_SELECTED_VERT <<
DP_SHOW_BOUNDARY_TEX;
FilterIDType tt;
foreach(tt , types())
{
actionList << new QAction(decorationName(tt), this);
/*if(tt==DP_SHOW_SELECTED_VERT)
actionList.last()->setIcon(QIcon(":/images/selected_vert.png"));
if(tt==DP_SHOW_SELECTED_FACE)
actionList.last()->setIcon(QIcon(":/images/selected_face.png"));*/
if(tt==DP_SHOW_SELECTED_VERT) actionList.last()->setIcon(QIcon(":/images/selected_vert.png"));
if(tt==DP_SHOW_SELECTED_FACE) actionList.last()->setIcon(QIcon(":/images/selected_face.png"));
if(tt==DP_SHOW_BOUNDARY) actionList.last()->setIcon(QIcon(":/images/show_boundary.png"));
if(tt==DP_SHOW_NON_MANIF_EDGE) actionList.last()->setIcon(QIcon(":/images/show_nonmanifold_edge.png"));
if(tt==DP_SHOW_NON_MANIF_VERT) actionList.last()->setIcon(QIcon(":/images/show_nonmanifold_vertex.png"));
}
QAction *ap;

View File

@ -6,5 +6,8 @@
<qresource prefix="/images">
<file>selected_face.png</file>
<file>selected_vert.png</file>
<file>show_boundary.png</file>
<file>show_nonmanifold_edge.png</file>
<file>show_nonmanifold_vertex.png</file>
</qresource>
</RCC>

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB