1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0031827: Samples - Qt OCCT Overview sample is not compiled with VS 2010

* Menu storage changed from json to XML (because Qt 4 does not support json)
 * C++11 for(object : container) construction changed to OCCT iterators / Qt foreach
 * enum type::name changed to type_name
 * non used class members removed
 * Qt connect functions changed to macros version
 * warning 4127 disabled for Q_INIT_RESOURCE in VS2010 / Qt 4 case
 * widgets parent problem on Qt 4 fixed
 * QRegularExpression changed to QRegExp
This commit is contained in:
asuraven
2020-10-15 18:23:10 +03:00
committed by bugmaster
parent 1877dc98c9
commit 8833fd4dc5
34 changed files with 736 additions and 1190 deletions

View File

@@ -128,8 +128,10 @@ void DataExchangeSamples::ExecuteSample (const TCollection_AsciiString& theSampl
void DataExchangeSamples::BrepExportSample()
{
Standard_Boolean anIsShapeExist = Standard_False;
for (Handle(AIS_InteractiveObject) anObject : myObject3d)
for(NCollection_Vector<Handle(AIS_InteractiveObject)>::Iterator anIter(myObject3d);
anIter.More(); anIter.Next())
{
const Handle(AIS_InteractiveObject)& anObject = anIter.Value();
if (Handle(AIS_Shape) aShape = Handle(AIS_Shape)::DownCast(anObject))
{
anIsShapeExist = Standard_True;
@@ -167,8 +169,10 @@ void DataExchangeSamples::StepExportSample()
}
STEPControl_Writer aStepWriter;
for (Handle(AIS_InteractiveObject) anObject : myObject3d)
for(NCollection_Vector<Handle(AIS_InteractiveObject)>::Iterator anIter(myObject3d);
anIter.More(); anIter.Next())
{
const Handle(AIS_InteractiveObject)& anObject = anIter.Value();
if (Handle(AIS_Shape) aShape = Handle(AIS_Shape)::DownCast(anObject))
{
aStatus = aStepWriter.Transfer(aShape->Shape(), myStepType);
@@ -207,8 +211,10 @@ void DataExchangeSamples::IgesExportSample()
Interface_Static::IVal("XSTEP.iges.writebrep.mode"));
Standard_Boolean anIsShapeExist = Standard_False;
for (Handle(AIS_InteractiveObject) anObject : myObject3d)
for(NCollection_Vector<Handle(AIS_InteractiveObject)>::Iterator anIter(myObject3d);
anIter.More(); anIter.Next())
{
const Handle(AIS_InteractiveObject)& anObject = anIter.Value();
if (Handle(AIS_Shape) aShape = Handle(AIS_Shape)::DownCast(anObject))
{
anIsShapeExist = Standard_True;
@@ -240,8 +246,10 @@ void DataExchangeSamples::StlExportSample()
aBuilder.MakeCompound(aTopoCompound);
Standard_Boolean anIsShapeExist = Standard_False;
for (Handle(AIS_InteractiveObject) anObject : myObject3d)
for(NCollection_Vector<Handle(AIS_InteractiveObject)>::Iterator anIter(myObject3d);
anIter.More(); anIter.Next())
{
const Handle(AIS_InteractiveObject)& anObject = anIter.Value();
if (Handle(AIS_Shape) aShape = Handle(AIS_Shape)::DownCast(anObject))
{
anIsShapeExist = Standard_True;
@@ -273,8 +281,10 @@ void DataExchangeSamples::VrmlExportSample()
aBrepBuilder.MakeCompound(aTopoCompound);
Standard_Boolean anIsShapeExist = Standard_False;
for (Handle(AIS_InteractiveObject) anObject : myObject3d)
for(NCollection_Vector<Handle(AIS_InteractiveObject)>::Iterator anIter(myObject3d);
anIter.More(); anIter.Next())
{
const Handle(AIS_InteractiveObject)& anObject = anIter.Value();
if (Handle(AIS_Shape) aShape = Handle(AIS_Shape)::DownCast(anObject))
{
anIsShapeExist = Standard_True;
@@ -382,8 +392,10 @@ void DataExchangeSamples::IgesImportSample()
Standard_Boolean DataExchangeSamples::CheckFacetedBrep()
{
Standard_Boolean anError = Standard_False;
for (Handle(AIS_InteractiveObject) anObject : myObject3d)
for(NCollection_Vector<Handle(AIS_InteractiveObject)>::Iterator anIter (myObject3d);
anIter.More(); anIter.Next())
{
const Handle(AIS_InteractiveObject)& anObject = anIter.Value();
if (Handle(AIS_Shape) aShape = Handle(AIS_Shape)::DownCast(anObject))
{
const TopoDS_Shape aTopoShape = aShape->Shape();