}
}
+void HYDROGUI_AISCurve::Erase()
+{
+ for( int i = 0 ; i < myCurveRepresentation.size() ; i++ ){
+ myCurveRepresentation[i]->Erase();
+ }
+}
+
void HYDROGUI_AISCurve::buildCurve()
{
for( int i = 0 ; i < myCurveRepresentation.size() ; i++ ){
void setCurve( CurveCreator_Curve* theCurve );
void Display();
+ void Erase();
virtual void pointInserted( int theSection, int theIndx );
return aFont;
}
-QString HYDROGUI_DataObject::dataObjectEntry( const Handle(HYDROData_Object)& theObject )
+QString HYDROGUI_DataObject::dataObjectEntry( const Handle(HYDROData_Object)& theObject,
+ const bool theWithPrefix )
{
QString aEntryStr = QString::null;
if( !theObject.IsNull() )
{
TCollection_AsciiString aLabEntr;
TDF_Tool::Entry( theObject->Label(), aLabEntr );
- aEntryStr = HYDROGUI_DataObject::entryPrefix() + QString( aLabEntr.ToCString() );
+ aEntryStr = aLabEntr.ToCString();
+ if( theWithPrefix )
+ aEntryStr.prepend( HYDROGUI_DataObject::entryPrefix() );
}
return aEntryStr;
}
/**
* Returns the full entry for the specified data object.
*/
- static QString dataObjectEntry( const Handle(HYDROData_Object)& theObject );
+ static QString dataObjectEntry( const Handle(HYDROData_Object)& theObject,
+ const bool theWithPrefix = true );
protected:
Handle(HYDROData_Object) myData; ///< object from data model
blockSignalsLambert( false );
*/
- double aCartX0 = 600000;
- double aCartY0 = 6800000;
+ //double aCartX0 = 600000;
+ //double aCartY0 = 6800000;
+ double aCartX0 = 0;
+ double aCartY0 = 0;
blockSignalsCartesian( true );
myCartPointXMap[ HYDROGUI_PrsImage::PointA ]->setValue( aCartX0 );
myCartPointYMap[ HYDROGUI_PrsImage::PointA ]->setValue( aCartY0 );
- myCartPointXMap[ HYDROGUI_PrsImage::PointB ]->setValue( aCartX0 + 1000 );
+ myCartPointXMap[ HYDROGUI_PrsImage::PointB ]->setValue( aCartX0 + 500 );
myCartPointYMap[ HYDROGUI_PrsImage::PointB ]->setValue( aCartY0 );
myCartPointXMap[ HYDROGUI_PrsImage::PointC ]->setValue( aCartX0 );
- myCartPointYMap[ HYDROGUI_PrsImage::PointC ]->setValue( aCartY0 + 1000 );
+ myCartPointYMap[ HYDROGUI_PrsImage::PointC ]->setValue( aCartY0 + 500 );
for( int aPointType = HYDROGUI_PrsImage::PointA;
aPointType <= HYDROGUI_PrsImage::PointC; aPointType++ )
if( myIsEdit )
anImageObj->Update();
- theUpdateFlags = UF_Model | UF_Viewer | UF_GV_Forced;
+ theUpdateFlags = UF_Model | UF_Viewer | UF_GV_Forced | UF_OCCViewer | UF_OCC_Forced;
return true;
}
return aResShape;
ObjectKind anObjectKind = theObject->GetKind();
- if ( anObjectKind != KIND_POLYLINE &&
+ if ( anObjectKind != KIND_IMAGE &&
+ anObjectKind != KIND_POLYLINE &&
anObjectKind != KIND_ZONE )
return aResShape;
HYDROGUI_PolylineOp::HYDROGUI_PolylineOp( HYDROGUI_Module* theModule, bool theIsEdit )
: HYDROGUI_Operation( theModule ), myIsEdit(theIsEdit), myCurve(NULL),
- myActiveViewManager(NULL), myPreviewViewManager(NULL), myAISCurve(NULL)
+ myViewManager(NULL), myAISCurve(NULL)
{
setName( theIsEdit ? tr( "EDIT_POLYLINE" ) : tr( "CREATE_POLYLINE" ) );
}
HYDROGUI_PolylineOp::~HYDROGUI_PolylineOp()
{
- closePreview();
-}
-
-HYDROGUI_InputPanel* HYDROGUI_PolylineOp::createInputPanel() const
-{
- HYDROGUI_PolylineDlg* aDlg = new HYDROGUI_PolylineDlg( module(), getName() );
- connect( aDlg ,SIGNAL( selectionChanged() ), this, SLOT( onEditorSelectionChanged() ) );
- return aDlg;
-}
-
-bool HYDROGUI_PolylineOp::processApply( int& theUpdateFlags,
- QString& theErrorMsg )
-{
- HYDROGUI_PolylineDlg* aPanel = (HYDROGUI_PolylineDlg*)inputPanel();
-
- int aStudyId = module()->getStudyId();
- bool aHasDoc = HYDROData_Document::HasDocument(aStudyId);
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( aStudyId );
- if( aDocument.IsNull() )
- return false;
-
- Handle(HYDROData_Polyline) aPolylineObj;
- if( myIsEdit ){
- aPolylineObj = myEditedObject;
- }
- else{
- aPolylineObj = Handle(HYDROData_Polyline)::DownCast( aDocument->CreateObject( KIND_POLYLINE ) );
- }
-
- if( aPolylineObj.IsNull() )
- return false;
-
- QString aPolylineName = aPanel->getPolylineName();
- aPolylineObj->SetName(aPolylineName);
- int aDimInt = 3;
- if( myCurve->getDimension() == CurveCreator::Dim2d )
- aDimInt = 2;
- aPolylineObj->setDimension(aDimInt);
- QList<PolylineSection> aPolylineData;
- for( int i=0 ; i < myCurve->getNbSections() ; i++ ){
- PolylineSection aSect;
- aSect.mySectionName = HYDROGUI_Tool::ToExtString( QString::fromLocal8Bit(myCurve->getSectionName(i).c_str()));
- aSect.myIsClosed = myCurve->isClosed(i);
- aSect.myType = PolylineSection::SECTION_POLYLINE;
- if( myCurve->getType(i) == CurveCreator::BSpline ){
- aSect.myType = PolylineSection::SECTION_SPLINE;
- }
- CurveCreator::Coordinates aCoords = myCurve->getPoints(i);
- for( int j = 0 ; j < aCoords.size() ; j++ ){
- aSect.myCoords << aCoords.at(j);
- }
- aPolylineData << aSect;
- }
- aPolylineObj->setPolylineData(aPolylineData);
-
- theUpdateFlags = UF_Model;
- module()->setObjectVisible( HYDROGUI_Tool::GetActiveGraphicsViewId( module() ), aPolylineObj, true );
- return true;
-}
-
-void HYDROGUI_PolylineOp::onCreatePreview()
-{
- LightApp_Application* anApp = module()->getApp();
-
- myActiveViewManager = anApp->activeViewManager();
-
- myPreviewViewManager =
- dynamic_cast<OCCViewer_ViewManager*>( anApp->createViewManager( OCCViewer_Viewer::Type() ) );
- if( myPreviewViewManager )
- {
- connect( myPreviewViewManager, SIGNAL( lastViewClosed( SUIT_ViewManager* ) ),
- this, SLOT( onLastViewClosed( SUIT_ViewManager* ) ) );
-
- //anApp->selectionMgr()->setEnabled(false); // what the hell?!
- myPreviewViewManager->setTitle( tr( "CREATE_POLYLINE" ) );
- OCCViewer_Viewer* aViewer = myPreviewViewManager->getOCCViewer();
- aViewer->enableSelection(true);
- aViewer->enableMultiselection(true);
- Handle_AIS_InteractiveContext aCtx = aViewer->getAISContext();
-
- OCCViewer_ViewWindow* vw = (OCCViewer_ViewWindow*)myPreviewViewManager->getActiveView();
- vw->onTopView();
-
- myAISCurve = new HYDROGUI_AISCurve(myCurve, aCtx);
-
- myAISCurve->Display();
- }
+ erasePreview();
}
void HYDROGUI_PolylineOp::startOperation()
myAISCurve->setCurve(myCurve);
if( anOldCurve )
delete anOldCurve;
- onCreatePreview();
+ displayPreview();
}
void HYDROGUI_PolylineOp::abortOperation()
{
- closePreview();
+ erasePreview();
HYDROGUI_Operation::abortOperation();
}
void HYDROGUI_PolylineOp::commitOperation()
{
- closePreview();
+ erasePreview();
HYDROGUI_Operation::commitOperation();
}
+HYDROGUI_InputPanel* HYDROGUI_PolylineOp::createInputPanel() const
+{
+ HYDROGUI_PolylineDlg* aDlg = new HYDROGUI_PolylineDlg( module(), getName() );
+ connect( aDlg, SIGNAL( selectionChanged() ), this, SLOT( onEditorSelectionChanged() ) );
+ return aDlg;
+}
+
+bool HYDROGUI_PolylineOp::processApply( int& theUpdateFlags,
+ QString& theErrorMsg )
+{
+ HYDROGUI_PolylineDlg* aPanel = (HYDROGUI_PolylineDlg*)inputPanel();
+
+ int aStudyId = module()->getStudyId();
+ bool aHasDoc = HYDROData_Document::HasDocument(aStudyId);
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( aStudyId );
+ if( aDocument.IsNull() )
+ return false;
+
+ Handle(HYDROData_Polyline) aPolylineObj;
+ if( myIsEdit ){
+ aPolylineObj = myEditedObject;
+ }
+ else{
+ aPolylineObj = Handle(HYDROData_Polyline)::DownCast( aDocument->CreateObject( KIND_POLYLINE ) );
+ }
+
+ if( aPolylineObj.IsNull() )
+ return false;
+
+ QString aPolylineName = aPanel->getPolylineName();
+ aPolylineObj->SetName(aPolylineName);
+ int aDimInt = 3;
+ if( myCurve->getDimension() == CurveCreator::Dim2d )
+ aDimInt = 2;
+ aPolylineObj->setDimension(aDimInt);
+ QList<PolylineSection> aPolylineData;
+ for( int i=0 ; i < myCurve->getNbSections() ; i++ ){
+ PolylineSection aSect;
+ aSect.mySectionName = HYDROGUI_Tool::ToExtString( QString::fromLocal8Bit(myCurve->getSectionName(i).c_str()));
+ aSect.myIsClosed = myCurve->isClosed(i);
+ aSect.myType = PolylineSection::SECTION_POLYLINE;
+ if( myCurve->getType(i) == CurveCreator::BSpline ){
+ aSect.myType = PolylineSection::SECTION_SPLINE;
+ }
+ CurveCreator::Coordinates aCoords = myCurve->getPoints(i);
+ for( int j = 0 ; j < aCoords.size() ; j++ ){
+ aSect.myCoords << aCoords.at(j);
+ }
+ aPolylineData << aSect;
+ }
+ aPolylineObj->setPolylineData(aPolylineData);
+
+ theUpdateFlags = UF_Model;
+ module()->setObjectVisible( HYDROGUI_Tool::GetActiveGraphicsViewId( module() ), aPolylineObj, true );
+ return true;
+}
+
void HYDROGUI_PolylineOp::onEditorSelectionChanged()
{
HYDROGUI_PolylineDlg* aPanel = (HYDROGUI_PolylineDlg*)inputPanel();
}
}
-void HYDROGUI_PolylineOp::onLastViewClosed( SUIT_ViewManager* theViewManager )
+void HYDROGUI_PolylineOp::displayPreview()
{
- closePreview();
-}
+ LightApp_Application* anApp = module()->getApp();
-void HYDROGUI_PolylineOp::closePreview()
-{
- if( myPreviewViewManager )
+ myViewManager =
+ dynamic_cast<OCCViewer_ViewManager*>( anApp->getViewManager( OCCViewer_Viewer::Type(), true ) );
+ if( myViewManager )
{
- disconnect( myPreviewViewManager, SIGNAL( lastViewClosed( SUIT_ViewManager* ) ),
- this, SLOT( onLastViewClosed( SUIT_ViewManager* ) ) );
-
- module()->getApp()->removeViewManager( myPreviewViewManager ); // myPreviewViewManager is deleted here
- myPreviewViewManager = 0;
+ if( OCCViewer_Viewer* aViewer = myViewManager->getOCCViewer() )
+ {
+ Handle(AIS_InteractiveContext) aCtx = aViewer->getAISContext();
+ if( !aCtx.IsNull() )
+ {
+ myAISCurve = new HYDROGUI_AISCurve( myCurve, aCtx );
+ myAISCurve->Display();
+ }
+ }
}
+}
- if( myActiveViewManager )
+void HYDROGUI_PolylineOp::erasePreview()
+{
+ if( myViewManager )
{
- HYDROGUI_Tool::SetActiveViewManager( module(), myActiveViewManager );
- myActiveViewManager = 0;
+ if( OCCViewer_Viewer* aViewer = myViewManager->getOCCViewer() )
+ {
+ Handle(AIS_InteractiveContext) aCtx = aViewer->getAISContext();
+ if( !aCtx.IsNull() && myAISCurve )
+ {
+ myAISCurve->Erase();
+ delete myAISCurve;
+ myAISCurve = 0;
+ }
+ }
}
}
#include <HYDROData_Polyline.h>
class OCCViewer_ViewManager;
-class SUIT_ViewManager;
class CurveCreator_Curve;
class HYDROGUI_AISCurve;
virtual bool processApply( int& theUpdateFlags, QString& theErrorMsg );
- void onCreatePreview();
-
protected slots:
void onEditorSelectionChanged();
- void onLastViewClosed( SUIT_ViewManager* );
-
private:
- void closePreview();
+ void displayPreview();
+ void erasePreview();
private:
- SUIT_ViewManager* myActiveViewManager;
-
- OCCViewer_ViewManager* myPreviewViewManager;
+ OCCViewer_ViewManager* myViewManager;
bool myIsEdit;
Handle(HYDROData_Polyline) myEditedObject;
#include "HYDROGUI_Shape.h"
+#include "HYDROGUI_DataObject.h"
+#include "HYDROGUI_Tool.h"
+
#include <AIS_Drawer.hxx>
#include <BRepBuilderAPI_MakeEdge.hxx>
#include <Graphic3d_MaterialAspect.hxx>
#include <HYDROData_Domain.h>
+#include <HYDROData_Image.h>
#include <HYDROData_Polyline.h>
#include <TopoDS_Wire.hxx>
#include <Prs3d_IsoAspect.hxx>
#include <QColor>
+#include <QFile>
HYDROGUI_Shape::HYDROGUI_Shape( const Handle(AIS_InteractiveContext)& theContext,
const Handle(HYDROData_Object)& theObject )
if ( !myShape.IsNull() )
myShape.Nullify();
+
+ removeTextureFile();
}
void HYDROGUI_Shape::display( const bool theIsUpdateViewer )
setWire( aPolylineWire, false, false );
}
+ else if ( myObject->IsKind( STANDARD_TYPE(HYDROData_Image) ) )
+ {
+ Handle(HYDROData_Image) anImageObj =
+ Handle(HYDROData_Image)::DownCast( myObject );
+
+ removeTextureFile();
+
+ QString aTextureFileName = generateTextureFileName( anImageObj );
+
+ QImage anImage = anImageObj->Image();
+ QString aFilePath = anImageObj->GetFilePath();
+ QTransform aTrsf = anImageObj->Trsf();
+
+ int aWidth = anImage.width();
+ int aHeight = anImage.height();
+
+ anImage = anImage.transformed( aTrsf, Qt::SmoothTransformation );
+
+ // temporary optimization, to reduce the saved image size (and the texture quality)
+ QImage anImageToSave = reduceTexture( anImage, 500 );
+ anImageToSave.save( aTextureFileName );
+
+ QPointF aPoint1( 0, 0 );
+ QPointF aPoint2( aWidth, 0 );
+ QPointF aPoint3( aWidth, aHeight );
+ QPointF aPoint4( 0, aHeight );
+
+ aPoint1 = aTrsf.map( aPoint1 );
+ aPoint2 = aTrsf.map( aPoint2 );
+ aPoint3 = aTrsf.map( aPoint3 );
+ aPoint4 = aTrsf.map( aPoint4 );
+
+ QPolygonF aPolygon = QPolygonF() << aPoint1 << aPoint2 << aPoint3 << aPoint4;
+ QRectF aRect = aPolygon.boundingRect();
+
+ gp_Pnt aPnt1( aRect.topLeft().x(), aRect.topLeft().y(), 0 );
+ gp_Pnt aPnt2( aRect.topRight().x(), aRect.topRight().y(), 0 );
+ gp_Pnt aPnt3( aRect.bottomRight().x(), aRect.bottomRight().y(), 0 );
+ gp_Pnt aPnt4( aRect.bottomLeft().x(), aRect.bottomLeft().y(), 0 );
+
+ TopoDS_Edge anEdge1 = BRepBuilderAPI_MakeEdge( aPnt1, aPnt2 ).Edge();
+ TopoDS_Edge anEdge2 = BRepBuilderAPI_MakeEdge( aPnt2, aPnt3 ).Edge();
+ TopoDS_Edge anEdge3 = BRepBuilderAPI_MakeEdge( aPnt3, aPnt4 ).Edge();
+ TopoDS_Edge anEdge4 = BRepBuilderAPI_MakeEdge( aPnt4, aPnt1 ).Edge();
+
+ TopoDS_Wire aWire = BRepBuilderAPI_MakeWire( anEdge1, anEdge2, anEdge3, anEdge4 ).Wire();
+
+ setTextureFileName( aTextureFileName, false, false );
+ setFace( aWire, false, false );
+ }
}
if ( myShape.IsNull() || !isVisible() )
const bool theIsUpdateViewer )
{
myTopoShape = theFace;
- myDisplayMode = AIS_Shaded;
+ myDisplayMode = myTextureFileName.isEmpty() ? AIS_Shaded : AIS_ExactHLR;
buildShape();
updateShape( theToDisplay, theIsUpdateViewer );
return myHighlightColor;
}
+void HYDROGUI_Shape::setTextureFileName( const QString& theFileName,
+ const bool theToDisplay,
+ const bool theIsUpdateViewer )
+{
+ myTextureFileName = theFileName;
+ updateShape( theToDisplay, theIsUpdateViewer );
+}
+
+QString HYDROGUI_Shape::getTextureFileName() const
+{
+ return myTextureFileName;
+}
+
void HYDROGUI_Shape::buildShape()
{
// Erase previously created shape
if ( myTopoShape.IsNull() )
return;
- myShape = new AIS_Shape( myTopoShape );
+ myShape = new AIS_TexturedShape( myTopoShape );
if ( !myObject.IsNull() )
myShape->SetOwner( myObject );
myShape->SetTransparency( 0 );
myShape->SetDisplayMode( (AIS_DisplayMode)myDisplayMode );
+ QString aTextureFileName = getTextureFileName();
+ if( !aTextureFileName.isEmpty() )
+ {
+ myShape->SetTextureFileName( HYDROGUI_Tool::ToAsciiString( aTextureFileName ) );
+ myShape->SetTextureMapOn();
+ myShape->DisableTextureModulate();
+ }
+
// Init default params for shape
const Handle(AIS_Drawer)& anAttributes = myShape->Attributes();
if ( !anAttributes.IsNull() )
}
}
+QString HYDROGUI_Shape::generateTextureFileName( const Handle(HYDROData_Object)& theImageObj )
+{
+ QString aResult;
+ if( !theImageObj.IsNull() )
+ {
+ QString aTempDir = HYDROGUI_Tool::GetTempDir( true );
+
+ int aStudyId = HYDROGUI_Tool::GetActiveStudyId();
+ QString aPrefix = QString( "image_%1" ).arg( aStudyId );
+ QString anEntry = HYDROGUI_DataObject::dataObjectEntry( theImageObj, false );
+ anEntry.replace( ':', '_' );
+
+ QString anExtension = "bmp";
+
+ aResult = QString( "%1/%2_%3.%4" ).arg( aTempDir, aPrefix, anEntry, anExtension );
+ }
+ return aResult;
+}
+
+void HYDROGUI_Shape::removeTextureFile() const
+{
+ QFile aFile( getTextureFileName() );
+ if( aFile.exists() )
+ aFile.remove();
+}
+
+QImage HYDROGUI_Shape::reduceTexture( const QImage& theImage, const int theSizeLimit )
+{
+ double aSizeLimit = (double)theSizeLimit;
+ double aWidth = (double)theImage.width();
+ double aHeight = (double)theImage.height();
+ if( aWidth > aSizeLimit || aHeight > aSizeLimit )
+ {
+ if( aWidth > aHeight )
+ {
+ aHeight /= ( aWidth / aSizeLimit );
+ aWidth = aSizeLimit;
+ }
+ else
+ {
+ aWidth /= ( aHeight / aSizeLimit );
+ aHeight = aSizeLimit;
+ }
+ }
+ return theImage.scaled( aWidth, aHeight, Qt::KeepAspectRatio, Qt::SmoothTransformation );
+}
#define HYDROGUI_SHAPE_H
#include <AIS_InteractiveContext.hxx>
-#include <AIS_Shape.hxx>
+#include <AIS_TexturedShape.hxx>
#include <HYDROData_Object.h>
#include <QColor>
+#include <QImage>
#include <TopoDS_Face.hxx>
#include <TopoDS_Wire.hxx>
virtual void setHighlightColor( const QColor& theColor );
virtual QColor getHighlightColor() const;
+ virtual void setTextureFileName( const QString& theFileName,
+ const bool theToDisplay = true,
+ const bool theIsUpdateViewer = true );
+ virtual QString getTextureFileName() const;
+
protected:
virtual void buildShape();
virtual void updateShape( const bool theToDisplay = true,
static double getQuantityColorVal( const int theColorVal );
void colorShapeBorder( const QColor& theColor );
+ static QString generateTextureFileName( const Handle(HYDROData_Object)& theImageObj );
+ void removeTextureFile() const;
+
+ static QImage reduceTexture( const QImage& theImage, const int theSizeLimit );
+
private:
Handle(AIS_InteractiveContext) myContext;
Handle(HYDROData_Object) myObject;
- Handle(AIS_Shape) myShape;
+ Handle(AIS_TexturedShape) myShape;
bool myIsToUpdate;
bool myIsVisible;
QColor myFillingColor;
QColor myBorderColor;
QColor myHighlightColor;
+
+ QString myTextureFileName;
};
#endif
#include <STD_TabDesktop.h>
+#include <SUIT_Session.h>
#include <SUIT_Study.h>
#include <SUIT_ViewManager.h>
#include <SUIT_ViewWindow.h>
-#include <QTextCodec>
+#include <QDir>
+#include <QFileInfo>
#include <QDockWidget>
+#include <QTextCodec>
// Definition of this id allows to use 'latin1' (Qt alias for 'ISO-8859-1')
// encoding instead of default 'System'
return new TCollection_HExtendedString( ToExtString( src ) );
}
+int HYDROGUI_Tool::GetActiveStudyId()
+{
+ if( SUIT_Session* aSession = SUIT_Session::session() )
+ if( SUIT_Application* anApp = aSession->activeApplication() )
+ if( SUIT_Study* aStudy = anApp->activeStudy() )
+ return aStudy->id();
+ return 0;
+}
+
+QString HYDROGUI_Tool::GetTempDir( const bool theToCreate )
+{
+ QString aRes;
+
+ char* tmpdir = getenv ( "HYDRO_TMP_DIR" );
+ if ( tmpdir )
+ {
+ // try to create folder if it does not exist
+ QFileInfo fi( tmpdir );
+ if ( !fi.exists() && theToCreate )
+ {
+ if ( QDir().mkdir( tmpdir ) )
+ QFile::setPermissions( tmpdir, (QFile::Permissions)0x4FFFF );
+ QFileInfo fi( tmpdir );
+ if ( !fi.exists() || !fi.isWritable() )
+ tmpdir = 0;
+ }
+ }
+ if ( !tmpdir )
+ tmpdir = getenv ( "TEMP" );
+ if ( !tmpdir )
+ tmpdir = getenv ( "TMP" );
+ if ( !tmpdir )
+ {
+#ifdef WNT
+ tmpdir = "C:\\";
+#else
+ tmpdir = "/tmp";
+#endif
+ }
+ aRes = tmpdir;
+
+ QFileInfo fi( aRes );
+ if ( !fi.exists() || !fi.isWritable() )
+ aRes = QString::null;
+
+ return aRes;
+}
+
bool HYDROGUI_Tool::IsEqual( const Handle(HYDROData_Object)& theObj1,
const Handle(HYDROData_Object)& theObj2 )
{
*/
static Handle(TCollection_HExtendedString) ToHExtString( const QString& );
+ /**
+ * \brief Get the active study id.
+ * \return active study id
+ */
+ static int GetActiveStudyId();
+
+ /**
+ * \brief Get path to the temporary directory.
+ * \param theToCreate flag used to create a directory if it doesn't exist
+ * \return path
+ */
+ static QString GetTempDir( const bool theToCreate );
+
/**
* \brief Check that the specified objects are equal.
* \param theObj1 first object
module()->setObjectVisible( aViewId, aResult, true );
}
- theUpdateFlags = UF_Model | UF_Viewer | UF_GV_Forced;
+ theUpdateFlags = UF_Model | UF_Viewer | UF_GV_Forced | UF_OCCViewer | UF_OCC_Forced;
return true;
}
commitDocOperation();
- module()->update( UF_Model | UF_Viewer | UF_GV_Forced );
+ module()->update( UF_Model | UF_Viewer | UF_GV_Forced | UF_OCCViewer | UF_OCC_Forced );
commit();
}