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:
@@ -298,8 +298,11 @@ void OcafSamples::ModifyBoxOcafSample()
|
||||
AIS_ListOfInteractive anAisObjectsList;
|
||||
myContext->DisplayedObjects(anAisObjectsList);
|
||||
Standard_Integer aBoxCount(0);
|
||||
for (Handle(AIS_InteractiveObject) anAisObject : anAisObjectsList)
|
||||
for(AIS_ListOfInteractive::Iterator anIter(anAisObjectsList);
|
||||
anIter.More(); anIter.Next())
|
||||
{
|
||||
const Handle(AIS_InteractiveObject)& anAisObject = anIter.Value();
|
||||
|
||||
// Get the main label of the selected object
|
||||
Handle(TPrsStd_AISPresentation) anAisPresentation = Handle(TPrsStd_AISPresentation)::DownCast(anAisObject->GetOwner());
|
||||
TDF_Label aLabel = anAisPresentation->Label();
|
||||
@@ -398,8 +401,10 @@ void OcafSamples::ModifyCylinderOcafSample()
|
||||
AIS_ListOfInteractive anAisObjectsList;
|
||||
myContext->DisplayedObjects(anAisObjectsList);
|
||||
Standard_Integer aCylCount(0);
|
||||
for (Handle(AIS_InteractiveObject) anAisObject : anAisObjectsList)
|
||||
for(AIS_ListOfInteractive::Iterator anIter (anAisObjectsList);
|
||||
anIter.More(); anIter.Next())
|
||||
{
|
||||
const Handle(AIS_InteractiveObject)& anAisObject = anIter.Value();
|
||||
// Get the main label of the selected object
|
||||
Handle(TPrsStd_AISPresentation) anAisPresentation = Handle(TPrsStd_AISPresentation)::DownCast(anAisObject->GetOwner());
|
||||
TDF_Label aLabel = anAisPresentation->Label();
|
||||
@@ -534,7 +539,7 @@ void OcafSamples::DialogOpenOcafSample()
|
||||
}
|
||||
// Open the document in the current application
|
||||
PCDM_ReaderStatus aReaderStatus = anOcaf_Application->Open(myFileName, myOcafDoc);
|
||||
if (aReaderStatus == PCDM_ReaderStatus::PCDM_RS_OK)
|
||||
if (aReaderStatus == PCDM_RS_OK)
|
||||
{
|
||||
// Connect the document CAF (myDoc) with the AISContext (myAISContext)
|
||||
TPrsStd_AISViewer::New(myOcafDoc->Main(), myViewer);
|
||||
@@ -563,7 +568,7 @@ void OcafSamples::DialogSaveBinOcafSample()
|
||||
myOcafDoc->ChangeStorageFormat("BinOcaf");
|
||||
// Saves the document in the current application
|
||||
PCDM_StoreStatus aStoreStatus = anOcaf_Application->SaveAs(myOcafDoc, myFileName);
|
||||
if (aStoreStatus == PCDM_StoreStatus::PCDM_SS_OK)
|
||||
if (aStoreStatus == PCDM_SS_OK)
|
||||
{
|
||||
myResult << "The file was saved successfully" << std::endl;
|
||||
}
|
||||
@@ -580,7 +585,7 @@ void OcafSamples::DialogSaveXmlOcafSample()
|
||||
myOcafDoc->ChangeStorageFormat("XmlOcaf");
|
||||
// Saves the document in the current application
|
||||
PCDM_StoreStatus aStoreStatus = anOcaf_Application->SaveAs(myOcafDoc, myFileName);
|
||||
if (aStoreStatus == PCDM_StoreStatus::PCDM_SS_OK)
|
||||
if (aStoreStatus == PCDM_SS_OK)
|
||||
{
|
||||
myResult << "The file was saved successfully" << std::endl;
|
||||
}
|
||||
|
Reference in New Issue
Block a user