return HYDROData_SequenceOfObjects();
}
-Standard_Boolean HYDROData_Entity::GetZLevel( Standard_Integer& theLevel ) const
+bool HYDROData_Entity::GetZLevel( Standard_Integer& theLevel ) const
{
theLevel = -1;
if ( aLabel.FindAttribute( TDataStd_Integer::GetID(), anIntVal ) )
{
theLevel = anIntVal->Get();
- return Standard_True;
+ return true;
}
}
- return Standard_False;
+ return false;
}
void HYDROData_Entity::SetZLevel( const Standard_Integer& theLevel )
/**
* Returns the z-level for object presentation, -1 if no z-level.
*/
- HYDRODATA_EXPORT virtual Standard_Boolean GetZLevel( Standard_Integer& theLevel ) const;
+ HYDRODATA_EXPORT virtual bool GetZLevel( Standard_Integer& theLevel ) const;
/**
* Set the z-level for object presentation.
HYDRODATA_EXPORT bool Add( const Handle( HYDROData_Object )&, const QString& theType );
HYDRODATA_EXPORT bool Add( const Handle( HYDROData_PolylineXY )&, const QString& theType );
+ using HYDROData_Entity::Remove;
HYDRODATA_EXPORT bool Remove( const TopoDS_Face& );
HYDRODATA_EXPORT bool Remove( const TopTools_ListOfShape& );
Handle(HYDROData_Entity) HYDROData_Zone::GetMergeObject() const
{
- return Handle(HYDROData_Entity)::DownCast(
- GetReferenceObject( DataTag_MergeObject ) );
+ return GetReferenceObject( DataTag_MergeObject );
}
void HYDROData_Zone::RemoveMergeObject()
set(PROJECT_SOURCES
HYDROGUI_AbstractDisplayer.cxx
- #HYDROGUI_AISShape.cxx
- #HYDROGUI_AISTrihedron.cxx
+ HYDROGUI_AISShape.cxx
+ HYDROGUI_AISTrihedron.cxx
HYDROGUI_BathymetryPrs.cxx
- #HYDROGUI_CalculationDlg.cxx
+ HYDROGUI_CalculationDlg.cxx
HYDROGUI_CalculationOp.cxx
HYDROGUI_ChannelDlg.cxx
HYDROGUI_ChannelOp.cxx
HYDROGUI_CopyPasteOp.cxx
HYDROGUI_CopyPastePositionOp.cxx
HYDROGUI_CurveCreatorProfile.cxx
- #HYDROGUI_DataBrowser.cxx
+ HYDROGUI_DataBrowser.cxx
HYDROGUI_DataModel.cxx
HYDROGUI_DataModelSync.cxx
HYDROGUI_DataObject.cxx
HYDROGUI_ImportImageDlg.cxx
HYDROGUI_ImportImageOp.cxx
HYDROGUI_ImportLandCoverMapOp.cxx
- #HYDROGUI_ImportLandCoverMapDlg.cxx
- #HYDROGUI_ImportPolylineOp.cxx
- #HYDROGUI_ImportSinusXOp.cxx
+ HYDROGUI_ImportLandCoverMapDlg.cxx
+ HYDROGUI_ImportPolylineOp.cxx
+ HYDROGUI_ImportSinusXOp.cxx
HYDROGUI_ExportSinusXOp.cxx
HYDROGUI_ExportSinusXDlg.cxx
HYDROGUI_ExportLandCoverMapDlg.cxx
HYDROGUI_InputPanel.cxx
HYDROGUI_LandCoverArgsFilter.cxx
HYDROGUI_LandCoverMapDlg.cxx
- #HYDROGUI_LandCoverMapOp.cxx
- #HYDROGUI_LandCoverMapPrs.cxx
+ HYDROGUI_LandCoverMapOp.cxx
+ HYDROGUI_LandCoverMapPrs.cxx
HYDROGUI_LocalCSDlg.cxx
HYDROGUI_LocalCSOp.cxx
HYDROGUI_MergePolylinesDlg.cxx
HYDROGUI_NameValidator.cxx
HYDROGUI_ObjSelector.cxx
HYDROGUI_ObserveImageOp.cxx
- #HYDROGUI_OCCDisplayer.cxx
- #HYDROGUI_OCCSelector.cxx
+ HYDROGUI_OCCDisplayer.cxx
+ HYDROGUI_OCCSelector.cxx
HYDROGUI_Operation.cxx
HYDROGUI_Operations.cxx
HYDROGUI_Poly3DDlg.cxx
HYDROGUI_PrsZoneDriver.cxx
HYDROGUI_Region.cxx
HYDROGUI_RemoveImageRefsOp.cxx
- #HYDROGUI_Shape.cxx
- #HYDROGUI_ShapeBathymetry.cxx
- #HYDROGUI_ShapeImage.cxx
- #HYDROGUI_ShapeLandCoverMap.cxx
+ HYDROGUI_Shape.cxx
+ HYDROGUI_ShapeBathymetry.cxx
+ HYDROGUI_ShapeImage.cxx
+ HYDROGUI_ShapeLandCoverMap.cxx
HYDROGUI_ShowHideOp.cxx
HYDROGUI_StreamDlg.cxx
HYDROGUI_StreamOp.cxx
HYDROGUI_LineEditDoubleValidator.cxx
- #HYDROGUI_StricklerTableDlg.cxx
+ HYDROGUI_StricklerTableDlg.cxx
HYDROGUI_StricklerTableOp.cxx
- #HYDROGUI_StricklerTypeComboBox.cxx
+ HYDROGUI_StricklerTypeComboBox.cxx
HYDROGUI_SplitPolylinesDlg.cxx
HYDROGUI_SplitPolylinesOp.cxx
HYDROGUI_SubmersibleOp.cxx
- #HYDROGUI_Tool.cxx
- #HYDROGUI_Tool2.cxx
+ HYDROGUI_Tool.cxx
+ HYDROGUI_Tool2.cxx
HYDROGUI_TwoImagesDlg.cxx
HYDROGUI_TwoImagesOp.cxx
- #HYDROGUI_UpdateObjectOp.cxx
+ HYDROGUI_UpdateObjectOp.cxx
HYDROGUI_VisualStateOp.cxx
HYDROGUI_VTKPrs.cxx
HYDROGUI_VTKPrsBathymetry.cxx
HYDROGUI_Wizard.cxx
HYDROGUI_Zone.cxx
HYDROGUI_ImportGeomObjectOp.cxx
- #HYDROGUI_ImportObstacleFromFileOp.cxx
+ HYDROGUI_ImportObstacleFromFileOp.cxx
HYDROGUI_ExportCalculationOp.cxx
- #HYDROGUI_GeomObjectDlg.cxx
+ HYDROGUI_GeomObjectDlg.cxx
HYDROGUI_SetColorOp.cxx
HYDROGUI_ColorDlg.cxx
- #HYDROGUI_ImportProfilesOp.cxx
+ HYDROGUI_ImportProfilesOp.cxx
HYDROGUI_GeoreferencementDlg.cxx
HYDROGUI_GeoreferencementOp.cxx
HYDROGUI_Actor.cxx
- #HYDROGUI_BathymetryBoundsOp.cxx
+ HYDROGUI_BathymetryBoundsOp.cxx
HYDROGUI_TranslateObstacleDlg.cxx
HYDROGUI_TranslateObstacleOp.cxx
- #HYDROGUI_ListModel.cxx
+ HYDROGUI_ListModel.cxx
HYDROGUI_ZLevelsDlg.cxx
HYDROGUI_ZLevelsOp.cxx
HYDROGUI_OrderedListWidget.cxx
HYDROGUI_ZLayers.cxx
HYDROGUI_ZLayers2.cxx
HYDROGUI_ZLayers3.cxx
- #HYDROGUI_PriorityWidget.cxx
- #HYDROGUI_PriorityTableModel.cxx
+ HYDROGUI_PriorityWidget.cxx
+ HYDROGUI_PriorityTableModel.cxx
HYDROGUI_RiverBottomDlg.cxx
HYDROGUI_RiverBottomOp.cxx
HYDROGUI_ViewerDlg.cxx
#include <AIS_DisplayMode.hxx>
#include <Prs3d_IsoAspect.hxx>
#include <Prs3d_LineAspect.hxx>
-#include <StdPrs_WFDeflectionShape.hxx>
+#include <StdPrs_WFShape.hxx>
IMPLEMENT_STANDARD_RTTIEXT(HYDROGUI_AISShape, AIS_Shape)
}
if( theMode==AIS_Shaded )
- StdPrs_WFDeflectionShape::Add( thePresentation, Shape(), myDrawer );
+ StdPrs_WFShape::Add( thePresentation, Shape(), myDrawer );
}
theParams.myPfirst, theParams.myPlast );
}
-void HYDROGUI_AISTrihedron::Compute(const Handle_Prs3d_Projector& aProjector,
- const Handle_Geom_Transformation& aTransformation,
- const Handle_Prs3d_Presentation& aPresentation)
+void HYDROGUI_AISTrihedron::Compute(const Handle(Prs3d_Projector)& aProjector,
+ const Handle(Geom_Transformation)& aTransformation,
+ const Handle(Prs3d_Presentation)& aPresentation)
{
}
bool HYDROGUI_BathymetryBoundsOp::processApply( int& theUpdateFlags, QString& theErrorMsg,
QStringList& theBrowseObjectsEntries )
{
- Handle_HYDROData_PolylineXY aPolyline = myBath->CreateBoundaryPolyline();
+ Handle(HYDROData_PolylineXY) aPolyline = myBath->CreateBoundaryPolyline();
bool isOK = !aPolyline.IsNull();
theUpdateFlags = 0;
if( isOK ) {
void HYDROGUI_CalculationDlg::setEditedObject( const Handle(HYDROData_CalculationCase) theCase )
{
myEditedObject = theCase;
- myValidator->setEditedObject( theCase );
+ myValidator->setEditedObject( myEditedObject );
// Build the calculation case subtree
module()->getDataModel()->buildCaseTree( myBrowser->root(), myEditedObject);
// Create OBSelector
new HYDROGUI_OBSelector( this, theModule->getApp()->selectionMgr() );
- treeView()->header()->setResizeMode(SUIT_DataObject::VisibilityId, QHeaderView::Fixed);
+ treeView()->header()->setSectionResizeMode(SUIT_DataObject::VisibilityId, QHeaderView::Fixed);
treeView()->header()->moveSection(SUIT_DataObject::NameId,SUIT_DataObject::VisibilityId);
treeView()->setColumnWidth(SUIT_DataObject::VisibilityId, VISIBILITY_COLUMN_WIDTH);
treeView()->hideColumn( SUIT_DataObject::VisibilityId );
#include <vector>
class SUIT_FileDlg;
-class gp_XYZ;
-class Handle_HYDROData_PolylineXY;
-class Handle_HYDROData_Polyline3D;
-class TopoDS_Face;
class HYDROGUI_ExportFileOp : public HYDROGUI_Operation
{
{
SUIT_FileDlg* aFileDlg = new SUIT_FileDlg( this, true );
aFileDlg->setWindowTitle( tr("IMPORT_OBSTACLE_FROM_FILE") );
- aFileDlg->setFilter( tr("OBSTACLE_FILTER") );
+ aFileDlg->setNameFilter( tr("OBSTACLE_FILTER") );
if ( !lastUsedFilter.isEmpty() ) {
- aFileDlg->selectFilter( lastUsedFilter );
+ aFileDlg->selectNameFilter( lastUsedFilter );
}
if ( aFileDlg->exec() == QDialog::Accepted ) {
QString aFileName = aFileDlg->selectedFile();
- lastUsedFilter = aFileDlg->selectedFilter();
+ lastUsedFilter = aFileDlg->selectedNameFilter();
if ( !aFileName.isEmpty() ) {
myFileName->setText( aFileName );
QString HYDROGUI_GeomObjectDlg::getDefaultName()
{
return myDefaultName;
-}
\ No newline at end of file
+}
myCorrTableWidget->setHorizontalHeaderItem(0, aHeader_1);
myCorrTableWidget->setHorizontalHeaderItem(1, aHeader_2);
myCorrTableWidget->setHorizontalHeaderItem(2, aHeader_3);
- myCorrTableWidget->horizontalHeader()->setResizeMode( QHeaderView::ResizeToContents );
+ myCorrTableWidget->horizontalHeader()->setSectionResizeMode( QHeaderView::ResizeToContents );
//
for (int i = 0; i < aFCSize; i++)
{
return false;
}
return true;
-}
\ No newline at end of file
+}
}
else
{
- Handle(HYDROData_Entity) LCM = Handle(HYDROData_Entity)::DownCast( myLCM );
- LCM->Remove();
+ myLCM->Remove();
module()->setObjectRemoved( myLCM );
abort();
}
} else {
myFileDlg = new SUIT_FileDlg( module()->getApp()->desktop(), true );
myFileDlg->setWindowTitle( getName() );
- myFileDlg->setFilter( tr("OBSTACLE_FILTER") );
+ myFileDlg->setNameFilter( tr("OBSTACLE_FILTER") );
if ( !lastUsedFilter.isEmpty() ) {
- myFileDlg->selectFilter( lastUsedFilter );
+ myFileDlg->selectNameFilter( lastUsedFilter );
}
connect( myFileDlg, SIGNAL( accepted() ), this, SLOT( onApply() ) );
} else if ( myFileDlg ) {
// Get file name and file filter defined by the user
aFileName = myFileDlg->selectedFile();
- lastUsedFilter = myFileDlg->selectedFilter();
+ lastUsedFilter = myFileDlg->selectedNameFilter();
}
// Check the file name
}
return aPanel;
-}
\ No newline at end of file
+}
myFileDlg = new SUIT_FileDlg( module()->getApp()->desktop(), true );
myFileDlg->setWindowTitle( getName() );
myFileDlg->setFileMode( SUIT_FileDlg::ExistingFiles );
- myFileDlg->setFilter( tr("POLYLINE_FILTER") );
+ myFileDlg->setNameFilter( tr("POLYLINE_FILTER") );
connect( myFileDlg, SIGNAL( accepted() ), this, SLOT( onApply() ) );
connect( myFileDlg, SIGNAL( rejected() ), this, SLOT( onCancel() ) );
if (anExt == "shp")
{
HYDROData_ShapeFile anImporter;
- NCollection_Sequence<Handle_HYDROData_Entity> theEntities;
+ NCollection_Sequence<Handle(HYDROData_Entity)> theEntities;
int aShapeTypeOfFile = -1;
int aStat = anImporter.ImportPolylines(doc(), aFileName, theEntities, aShapeTypeOfFile );
if (aStat == 1)
QApplication::restoreOverrideCursor();
}
-void HYDROGUI_ImportPolylineOp::UpdateView( NCollection_Sequence<Handle_HYDROData_Entity>& anEntities)
+void HYDROGUI_ImportPolylineOp::UpdateView( NCollection_Sequence<Handle(HYDROData_Entity)>& anEntities)
{
size_t anActiveViewId = HYDROGUI_Tool::GetActiveGraphicsViewId( module() );
if ( anActiveViewId == 0 )
myFileDlg = new SUIT_FileDlg( module()->getApp()->desktop(), true );
myFileDlg->setWindowTitle( getName() );
myFileDlg->setFileMode( SUIT_FileDlg::ExistingFiles );
- myFileDlg->setFilter( tr("PROFILE_FILTER") );
+ myFileDlg->setNameFilter( tr("PROFILE_FILTER") );
connect( myFileDlg, SIGNAL( accepted() ), this, SLOT( onApply() ) );
connect( myFileDlg, SIGNAL( rejected() ), this, SLOT( onCancel() ) );
myFileDlg = new SUIT_FileDlg( module()->getApp()->desktop(), true );
myFileDlg->setWindowTitle( getName() );
myFileDlg->setFileMode( SUIT_FileDlg::ExistingFiles );
- myFileDlg->setFilter( tr("SINUSX_FILTER") );
+ myFileDlg->setNameFilter( tr("SINUSX_FILTER") );
connect( myFileDlg, SIGNAL( accepted() ), this, SLOT( onApply() ) );
connect( myFileDlg, SIGNAL( rejected() ), this, SLOT( onCancel() ) );
#include <AIS_DisplayMode.hxx>
#include <Prs3d_IsoAspect.hxx>
#include <SelectMgr_SequenceOfOwner.hxx>
-#include <StdPrs_WFDeflectionShape.hxx>
+#include <StdPrs_WFShape.hxx>
#include <StdSelect_BRepOwner.hxx>
#include <TopoDS_Face.hxx>
#include <QColor>
SetTransparency( myLCMap->GetTransparency() );
}
-Handle(Aspect_ColorScale) HYDROGUI_LandCoverMapPrs::GetColorScale() const
+Handle(AIS_ColorScale) HYDROGUI_LandCoverMapPrs::GetColorScale() const
{
return myColorScale;
}
-void HYDROGUI_LandCoverMapPrs::SetColorScale( const Handle(Aspect_ColorScale)& theColorScale )
+void HYDROGUI_LandCoverMapPrs::SetColorScale( const Handle(AIS_ColorScale)& theColorScale )
{
myColorScale = theColorScale;
double aMin = 0, aMax = 0;
}
if( theMode==AIS_Shaded )
- StdPrs_WFDeflectionShape::Add( thePresentation, Shape(), myDrawer );
+ StdPrs_WFShape::Add( thePresentation, Shape(), myDrawer );
}
void HYDROGUI_LandCoverMapPrs::HilightSelected( const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
{
Handle(StdSelect_BRepOwner) anOwner = Handle(StdSelect_BRepOwner)::DownCast( theOwners.Value( i ) );
if( !anOwner.IsNull() )
- StdPrs_WFDeflectionShape::Add( aSelectPrs, anOwner->Shape(), HilightAttributes() );
+ StdPrs_WFShape::Add( aSelectPrs, anOwner->Shape(), HilightAttributes() );
}
HilightAttributes()->UIsoAspect()->SetNumber( 0 );
#include <AIS_ColoredShape.hxx>
#include <AIS_ColorScale.hxx>
-DEFINE_STANDARD_HANDLE( HYDROGUI_LandCoverMapPrs, AIS_ColoredShape )
class HYDROGUI_LandCoverMapPrs : public AIS_ColoredShape
{
public:
- DEFINE_STANDARD_RTTI( HYDROGUI_LandCoverMapPrs );
+ DEFINE_STANDARD_RTTIEXT( HYDROGUI_LandCoverMapPrs, AIS_ColoredShape );
HYDROGUI_LandCoverMapPrs( const Handle(HYDROData_LandCoverMap)& );
virtual ~HYDROGUI_LandCoverMapPrs();
Handle(HYDROData_LandCoverMap) GetLandCoverMap() const;
void SetLandCoverMap( const Handle(HYDROData_LandCoverMap)& );
- Handle(Aspect_ColorScale) GetColorScale() const;
- void SetColorScale( const Handle(Aspect_ColorScale)& );
+ Handle(AIS_ColorScale) GetColorScale() const;
+ void SetColorScale( const Handle(AIS_ColorScale)& );
Handle(HYDROData_StricklerTable) GetTable() const;
void SetTable( const Handle(HYDROData_StricklerTable)& );
private:
Handle(HYDROData_LandCoverMap) myLCMap;
- Handle(Aspect_ColorScale) myColorScale;
+ Handle(AIS_ColorScale) myColorScale;
Handle(HYDROData_StricklerTable) myTable;
};
myEye = QPixmap( 16, 16 );
myEye.fill( Qt::black );
}
-
- // Set the supported drag actions for the items in the model
- setSupportedDragActions( Qt::MoveAction | Qt::CopyAction );
}
/**
*/
void HYDROGUI_ListModel::setObjects( const Object2VisibleList& theObjects )
{
+ beginResetModel();
myObjects = theObjects;
-
- reset();
+ endResetModel();
}
/**
*/
void HYDROGUI_ListModel::addObject( const Object2Visible& theObject )
{
+ beginResetModel();
myObjects << theObject;
-
- reset();
+ endResetModel();
}
/**
}
}
+ beginResetModel();
myObjects.removeAll(anItem);
-
- reset();
+ endResetModel();
}
return Qt::MoveAction | Qt::CopyAction;
}
+/**
+*/
+Qt::DropActions HYDROGUI_ListModel::supportedDragActions() const
+{
+ // Set the supported drag actions for the items in the model
+ return Qt::MoveAction | Qt::CopyAction;
+}
+
/**
Get list of ids by the list model indexes.
@param theIsToSort defines if the list of ids should be sorted in ascending order
void HYDROGUI_ListModel::undoLastMove()
{
+ beginResetModel();
myObjects = myPrevObjects;
- reset();
+ endResetModel();
}
virtual bool dropMimeData( const QMimeData* theData, Qt::DropAction theAction,
int theRow, int theColumn, const QModelIndex& theParent );
virtual Qt::DropActions supportedDropActions() const;
+ virtual Qt::DropActions supportedDragActions() const;
QList<int> getIds( const QModelIndexList& theIndexes, bool theIsToSort = true ) const;
bool myIsDecorationEnabled;
};
-#endif
\ No newline at end of file
+#endif
#include <AIS_InteractiveContext.hxx>
#include <AIS_ListIteratorOfListOfInteractive.hxx>
#include <AIS_ListOfInteractive.hxx>
-
-#include <Aspect_ColorScale.hxx>
+#include <AIS_ColorScale.hxx>
#include <TColStd_SequenceOfInteger.hxx>
return aResShape;
if( theObject->IsKind( STANDARD_TYPE( HYDROData_Image ) ) )
- aResShape = new HYDROGUI_ShapeImage( theContext, Handle_HYDROData_Image::DownCast( theObject ) );
+ aResShape = new HYDROGUI_ShapeImage( theContext, Handle(HYDROData_Image)::DownCast( theObject ) );
else if( theObject->IsKind( STANDARD_TYPE( HYDROData_Bathymetry ) ) )
- aResShape = new HYDROGUI_ShapeBathymetry( this, theContext, Handle_HYDROData_Bathymetry::DownCast( theObject ) );
+ aResShape = new HYDROGUI_ShapeBathymetry( this, theContext, Handle(HYDROData_Bathymetry)::DownCast( theObject ) );
else if( theObject->IsKind( STANDARD_TYPE( HYDROData_LandCoverMap ) ) ) {
bool isScalarMode = module()->isLandCoversScalarMapModeOn( theViewerId );
- aResShape = new HYDROGUI_ShapeLandCoverMap( this, theContext, Handle_HYDROData_LandCoverMap::DownCast( theObject ), -1, isScalarMode );
+ aResShape = new HYDROGUI_ShapeLandCoverMap( this, theContext, Handle(HYDROData_LandCoverMap)::DownCast( theObject ), -1, isScalarMode );
}
else
aResShape = new HYDROGUI_Shape( theContext, theObject );
}
}
- Handle(Aspect_ColorScale) aColorScale;
+ Handle(AIS_ColorScale) aColorScale = GetColorScale( aViewerId );
+ Handle(AIS_InteractiveContext) aCtx = theViewer->getAISContext();
if( isDisplayColorScale )
{
- aColorScale = aView->ColorScale();
if( !aColorScale.IsNull() )
{
aColorScale->SetXPosition( anXPos );
aColorScale->SetTitle( aColorScaleTitle );
aColorScale->SetRange( aColorScaleMin, aColorScaleMax );
+
+ aColorScale->SetToUpdate();
if ( !isLandCoverColoringOn ) {
foreach( HYDROGUI_Shape* aShape, aBathShapes ) {
aBathShape->UpdateWithColorScale( aColorScale );
}
}
+
+ if ( !aCtx.IsNull() && !aCtx->IsDisplayed( aColorScale ) ) {
+ aCtx->Display( aColorScale );
+ }
}
- if( !aView->ColorScaleIsDisplayed() )
- aView->ColorScaleDisplay();
}
else
{
- if( aView->ColorScaleIsDisplayed() )
- aView->ColorScaleErase();
+ if ( !aCtx.IsNull() && aCtx->IsDisplayed( aColorScale ) ) {
+ aCtx->Erase( aColorScale );
+ }
}
foreach( HYDROGUI_Shape* aShape, aLandCoverMapShapes ) {
myToUpdateColorScale = false;
}
+
+Handle(AIS_ColorScale) HYDROGUI_OCCDisplayer::GetColorScale( const int theViewerId )
+{
+ Handle(AIS_ColorScale) aColorScale;
+
+ aColorScale = myColorScales.value( theViewerId, aColorScale );
+ if ( aColorScale.IsNull() ) {
+ aColorScale = new AIS_ColorScale();
+ myColorScales.insert( theViewerId, aColorScale );
+ }
+
+ return aColorScale;
+}
class HYDROGUI_Shape;
class AIS_InteractiveContext;
+class AIS_ColorScale;
class OCCViewer_ViewManager;
class OCCViewer_Viewer;
void SetToUpdateColorScale();
+ /**
+ * \brief Get color scale for the viewer.
+ * \param theViewerId viewer identifier
+ * \return the color scale
+ */
+ Handle(AIS_ColorScale) GetColorScale( const int theViewerId );
+
protected:
/**
* \brief Erase all viewer objects.
private:
bool myToUpdateColorScale;
+
+ QMap<int, Handle(AIS_ColorScale)> myColorScales;
};
#endif
beginResetModel();
myRules = myPrevRules;
endResetModel();
- reset();
}
/**
// Set resize mode
myTable->horizontalHeader()->setStretchLastSection( false);
- myTable->horizontalHeader()->setResizeMode( 0, QHeaderView::Stretch );
- myTable->horizontalHeader()->setResizeMode( 1, QHeaderView::ResizeToContents );
- myTable->horizontalHeader()->setResizeMode( 2, QHeaderView::Stretch );
- myTable->horizontalHeader()->setResizeMode( 3, QHeaderView::ResizeToContents );
+ myTable->horizontalHeader()->setSectionResizeMode( 0, QHeaderView::Stretch );
+ myTable->horizontalHeader()->setSectionResizeMode( 1, QHeaderView::ResizeToContents );
+ myTable->horizontalHeader()->setSectionResizeMode( 2, QHeaderView::Stretch );
+ myTable->horizontalHeader()->setSectionResizeMode( 3, QHeaderView::ResizeToContents );
- myTable->verticalHeader()->setResizeMode( QHeaderView::ResizeToContents );
+ myTable->verticalHeader()->setSectionResizeMode( QHeaderView::ResizeToContents );
// Layout
// buttons
myContext->SetZLayer( myShape, myZLayer );
}
-Handle_AIS_InteractiveObject HYDROGUI_Shape::createShape() const
+Handle(AIS_InteractiveObject) HYDROGUI_Shape::createShape() const
{
if( myTopoShape.IsNull() ) {
- return Handle_AIS_InteractiveObject();
+ return Handle(AIS_InteractiveObject)();
}
TopAbs_ShapeEnum aShapeType = myTopoShape.ShapeType();
if( myShape.IsNull() )
return;
- Handle_AIS_Shape anAISShape = Handle_AIS_Shape::DownCast( myShape );
+ Handle(AIS_Shape) anAISShape = Handle(AIS_Shape)::DownCast( myShape );
if( !anAISShape.IsNull() )
anAISShape ->SetHLRAngleAndDeviation( 0.001 );
if ( !myObject.IsNull() && !myObject->IsKind( STANDARD_TYPE(HYDROData_LandCoverMap) ) )
myShape->SetTransparency( 0 );
myShape->SetDisplayMode( (AIS_DisplayMode)myDisplayMode );
- myShape->SetSelectionMode( (Standard_Integer)mySelectionMode );
- // Init default params for shape
+ // Init default params for shape
const Handle(Prs3d_Drawer)& anAttributes = myShape->Attributes();
if ( !anAttributes.IsNull() )
{
void HYDROGUI_Shape::setSelectionMode( int theSelectionMode )
{
mySelectionMode = theSelectionMode;
-}
\ No newline at end of file
+}
virtual void eraseShape( const bool theIsUpdateViewer );
virtual QColor getActiveColor() const;
- virtual Handle_AIS_InteractiveObject createShape() const;
+ virtual Handle(AIS_InteractiveObject) createShape() const;
void setDisplayMode( int theDisplayMode );
#include <HYDROData_Bathymetry.h>
#include <AIS_InteractiveContext.hxx>
-#include <Aspect_ColorScale.hxx>
+#include <AIS_ColorScale.hxx>
#include <Prs3d_PointAspect.hxx>
HYDROGUI_ShapeBathymetry::HYDROGUI_ShapeBathymetry( HYDROGUI_OCCDisplayer* theDisplayer,
const Handle(AIS_InteractiveContext)& theContext,
- const Handle_HYDROData_Bathymetry& theBathymetry,
+ const Handle(HYDROData_Bathymetry)& theBathymetry,
const int theZLayer )
: HYDROGUI_Shape( theContext, theBathymetry, theZLayer ),
myDisplayer( theDisplayer )
}
-Handle_AIS_InteractiveObject HYDROGUI_ShapeBathymetry::createShape() const
+Handle(AIS_InteractiveObject) HYDROGUI_ShapeBathymetry::createShape() const
{
- Handle_HYDROData_Bathymetry aBath = Handle_HYDROData_Bathymetry::DownCast( getObject() );
+ Handle(AIS_InteractiveObject) aPntCloud;
+
+ Handle(HYDROData_Bathymetry) aBath = Handle(HYDROData_Bathymetry)::DownCast( getObject() );
if( !aBath.IsNull() )
{
- Handle(AIS_PointCloud) aPntCloud = new HYDROGUI_BathymetryPrs();
+ aPntCloud = new HYDROGUI_BathymetryPrs();
aPntCloud->SetHilightMode( AIS_PointCloud::DM_BndBox );
aPntCloud->Attributes()->SetPointAspect (new Prs3d_PointAspect (Aspect_TOM_POINT, Quantity_NOC_WHITE, 2.0));
aThat->myColors = new Quantity_HArray1OfColor( aLower, anUpper );
for( int i=aLower; i<=anUpper; i++ )
aThat->myCoords->SetValue( i, aBathPoints.Value( i ) );
-
- return aPntCloud;
}
- else
- return Handle_AIS_InteractiveObject();
+
+ return aPntCloud;
}
void HYDROGUI_ShapeBathymetry::GetRange( double& theMin, double& theMax ) const
}
}
-void HYDROGUI_ShapeBathymetry::UpdateWithColorScale( const Handle(Aspect_ColorScale)& theColorScale )
+void HYDROGUI_ShapeBathymetry::UpdateWithColorScale( const Handle(AIS_ColorScale)& theColorScale )
{
for( int i=myCoords->Lower(), n=myCoords->Upper(); i<=n; i++ )
{
theColorScale->FindColor( z, aColor );
myColors->SetValue( i, aColor );
}
- Handle_AIS_PointCloud aPntCloud = Handle_AIS_PointCloud::DownCast( getAISObject() );
+ Handle(AIS_PointCloud) aPntCloud = Handle(AIS_PointCloud)::DownCast( getAISObject() );
aPntCloud->SetPoints( myCoords, myColors );
getContext()->Redisplay( aPntCloud, Standard_False );
}
#include <Quantity_HArray1OfColor.hxx>
class HYDROData_Bathymetry;
-class Aspect_ColorScale;
+class AIS_ColorScale;
class HYDROGUI_OCCDisplayer;
class HYDROGUI_ShapeBathymetry : public HYDROGUI_Shape
virtual ~HYDROGUI_ShapeBathymetry();
void GetRange( double& theMin, double& theMax ) const;
- void UpdateWithColorScale( const Handle(Aspect_ColorScale)& );
+ void UpdateWithColorScale( const Handle(AIS_ColorScale)& );
virtual void display( const bool theIsUpdateViewer = true );
virtual void erase( const bool theIsUpdateViewer = true );
Handle(AIS_InteractiveObject) HYDROGUI_ShapeImage::createShape() const
{
- Handle(HYDROData_Image) anImageObj = Handle(HYDROData_Image)::DownCast( getObject() );
- if ( anImageObj.IsNull() )
- return Handle_AIS_InteractiveObject();
+ Handle(HYDROGUI_ImagePrs) aPrs;
- Handle(HYDROGUI_ImagePrs) aPrs = new HYDROGUI_ImagePrs( imagePixMap( anImageObj ), imageContour( anImageObj ) );
- return aPrs;
+ Handle(HYDROData_Image) anImageObj = Handle(HYDROData_Image)::DownCast( getObject() );
+ if ( !anImageObj.IsNull() )
+ {
+ aPrs = new HYDROGUI_ImagePrs( imagePixMap( anImageObj ), imageContour( anImageObj ) );
+ }
+
+ return aPrs;
}
Handle(Image_PixMap) HYDROGUI_ShapeImage::imagePixMap( const Handle(HYDROData_Image)& theImageObj ) const
return aPix;
}
-QPolygonF HYDROGUI_ShapeImage::imageContour( const Handle_HYDROData_Image& theImageObj ) const
+QPolygonF HYDROGUI_ShapeImage::imageContour( const Handle(HYDROData_Image)& theImageObj ) const
{
QPolygonF aContour;
if ( !theImageObj.IsNull() )
#include <QPolygonF>
-class Handle_HYDROData_Image;
+class HYDROData_Image;
class HYDROGUI_ShapeImage : public HYDROGUI_Shape
{
public:
HYDROGUI_ShapeImage( const Handle(AIS_InteractiveContext)& theContext,
- const Handle_HYDROData_Image& theImage,
+ const Handle(HYDROData_Image)& theImage,
const int theZLayer = -1 );
virtual ~HYDROGUI_ShapeImage();
virtual void update( bool isUpdateViewer, bool isDeactivateSelection );
protected:
- virtual Handle_AIS_InteractiveObject createShape() const;
- Handle(Image_PixMap) imagePixMap( const Handle_HYDROData_Image& ) const;
- QPolygonF imageContour( const Handle_HYDROData_Image& ) const;
+ virtual Handle(AIS_InteractiveObject) createShape() const;
+ Handle(Image_PixMap) imagePixMap( const Handle(HYDROData_Image)& ) const;
+ QPolygonF imageContour( const Handle(HYDROData_Image)& ) const;
};
#endif
HYDROGUI_ShapeLandCoverMap::HYDROGUI_ShapeLandCoverMap( HYDROGUI_OCCDisplayer* theDisplayer,
const Handle(AIS_InteractiveContext)& theContext,
- const Handle_HYDROData_LandCoverMap& theLandCoverMap,
+ const Handle(HYDROData_LandCoverMap)& theLandCoverMap,
const int theZLayer,
const bool theIsScalarMode )
: HYDROGUI_Shape( theContext, theLandCoverMap, theZLayer ),
myDisplayer->SetToUpdateColorScale();
}
-Handle_AIS_InteractiveObject HYDROGUI_ShapeLandCoverMap::createShape() const
+Handle(AIS_InteractiveObject) HYDROGUI_ShapeLandCoverMap::createShape() const
{
Handle(HYDROData_LandCoverMap) aLandCoverMap = Handle(HYDROData_LandCoverMap)::DownCast( getObject() );
if ( !aLandCoverMap.IsNull() )
aLandCoverMapPrs->SetTable( aTable );
// Set color scale
- OCCViewer_ViewWindow* aWnd = dynamic_cast<OCCViewer_ViewWindow*>( aViewer->getViewManager()->getActiveView() );
- Handle(V3d_View) aView = aWnd->getViewPort()->getView();
- if( !aView.IsNull() )
- {
- Handle(Aspect_ColorScale) aColorScale = aView->ColorScale();
- aLandCoverMapPrs->SetColorScale( aColorScale );
- }
+ aLandCoverMapPrs->SetColorScale( myDisplayer->GetColorScale( aViewerId) );
}
}
}
#include <HYDROGUI_Shape.h>
class HYDROGUI_OCCDisplayer;
-class Handle_HYDROData_LandCoverMap;
+class HYDROData_LandCoverMap;
class HYDROGUI_ShapeLandCoverMap : public HYDROGUI_Shape
{
public:
HYDROGUI_ShapeLandCoverMap( HYDROGUI_OCCDisplayer* theDisplayer,
const Handle(AIS_InteractiveContext)& theContext,
- const Handle_HYDROData_LandCoverMap& theLandCoverMap,
+ const Handle(HYDROData_LandCoverMap)& theLandCoverMap,
const int theZLayer = -1,
const bool theIsScalarMode = false );
virtual ~HYDROGUI_ShapeLandCoverMap();
protected:
virtual void displayShape( const bool theIsUpdateViewer );
- virtual Handle_AIS_InteractiveObject createShape() const;
+ virtual Handle(AIS_InteractiveObject) createShape() const;
private:
HYDROGUI_OCCDisplayer* myDisplayer;
void HYDROGUI_ColorDelegate::paint( QPainter* thePainter, const QStyleOptionViewItem& theOption,
const QModelIndex& theIndex ) const
{
- QColor aColor = qVariantValue<QColor>( theIndex.data( Qt::BackgroundColorRole ) );
+ QColor aColor = theIndex.data( Qt::BackgroundColorRole ).value<QColor>();
thePainter->fillRect( theOption.rect, aColor );
}
const QStyleOptionViewItem& theOption,
const QModelIndex& theIndex ) const
{
- QColor aColor = qVariantValue<QColor>( theIndex.data( Qt::BackgroundColorRole ) );
+ QColor aColor = theIndex.data( Qt::BackgroundColorRole ).value<QColor>();
QColor aNewColor = QColorDialog::getColor( aColor );
if( aNewColor.isValid() )
{
myTable->setHorizontalHeaderLabels( aColumnNames );
myTable->horizontalHeader()->setStretchLastSection( false );
- myTable->horizontalHeader()->setResizeMode( 0, QHeaderView::ResizeToContents );
- myTable->horizontalHeader()->setResizeMode( 1, QHeaderView::ResizeToContents );
- myTable->horizontalHeader()->setResizeMode( 2, QHeaderView::ResizeToContents );
- myTable->horizontalHeader()->setResizeMode( 3, QHeaderView::Stretch );
+ myTable->horizontalHeader()->setSectionResizeMode( 0, QHeaderView::ResizeToContents );
+ myTable->horizontalHeader()->setSectionResizeMode( 1, QHeaderView::ResizeToContents );
+ myTable->horizontalHeader()->setSectionResizeMode( 2, QHeaderView::ResizeToContents );
+ myTable->horizontalHeader()->setSectionResizeMode( 3, QHeaderView::Stretch );
myTable->horizontalHeader()->setMinimumSectionSize( 50 );
- myTable->verticalHeader()->setResizeMode( QHeaderView::ResizeToContents );
+ myTable->verticalHeader()->setSectionResizeMode( QHeaderView::ResizeToContents );
// Layout
// buttons
myName->setReadOnly( on );
}
-void HYDROGUI_StricklerTableDlg::getGuiData( Handle_HYDROData_StricklerTable& theTable ) const
+void HYDROGUI_StricklerTableDlg::getGuiData( Handle(HYDROData_StricklerTable)& theTable ) const
{
if( theTable.IsNull() )
return;
}
}
-void HYDROGUI_StricklerTableDlg::setGuiData( const Handle_HYDROData_StricklerTable& theTable )
+void HYDROGUI_StricklerTableDlg::setGuiData( const Handle(HYDROData_StricklerTable)& theTable )
{
myAttrName->setText( theTable->GetAttrName() );
if ( myModule )
{
// Construct a list of unique names of all Strickler types defined within the data model
- Handle_HYDROData_Document aDoc = HYDROData_Document::Document( myModule->getStudyId() );
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( myModule->getStudyId() );
if ( aDoc )
{
QStringList aStricklerTypes;
}
QMap<QString,HYDROData_SequenceOfObjects> HYDROGUI_Tool::GetObjectsBackReferences(
- const Handle_HYDROData_Document& theDocument, const QStringList& theObjectNames )
+ const Handle(HYDROData_Document)& theDocument, const QStringList& theObjectNames )
{
QMap<QString,HYDROData_SequenceOfObjects> aResMap;
if( isOK && isCheckValidProfile )
{
- Handle_HYDROData_Profile aProfile = Handle_HYDROData_Profile::DownCast( anObject );
+ Handle(HYDROData_Profile) aProfile = Handle(HYDROData_Profile)::DownCast( anObject );
if( !aProfile.IsNull() && !aProfile->IsValid() )
isOK = false;
}
{
anEntry.remove( aPrefix );
for( ObjectKind anObjectKind = KIND_UNKNOWN + 1; anObjectKind <= KIND_LAST; anObjectKind++ )
- if( HYDROGUI_DataModel::tr( HYDROGUI_DataModel::partitionName( anObjectKind ).toAscii() ) == anEntry )
+ if( HYDROGUI_DataModel::tr( HYDROGUI_DataModel::partitionName( anObjectKind ).toLatin1() ) == anEntry )
return anObjectKind;
}
}
HYDROData_SequenceOfObjects::Iterator anIter( aRefObjects );
for ( ; anIter.More(); anIter.Next() )
{
- Handle(HYDROData_Entity) aRefbject =
- Handle(HYDROData_Entity)::DownCast( anIter.Value() );
+ Handle(HYDROData_Entity) aRefbject = anIter.Value();
if ( aRefbject.IsNull() )
continue;
void SetZLayerForPrs( const Handle(PrsMgr_Presentation)& thePrs, int theLayerId );
-void SetPrsZLayer( const Handle_PrsMgr_PresentableObject& thePresentableObject,
+void SetPrsZLayer( const Handle(PrsMgr_PresentableObject)& thePresentableObject,
const int theMode, const int theLayerId )
{
PrsMgr_Presentations& aPresentations = thePresentableObject->Presentations();
}
}
-void SetZLayerSettings( const Handle_V3d_Viewer& theViewer3d, int theLayerId, bool theIsOrdered )
+void SetZLayerSettings( const Handle(V3d_Viewer)& theViewer3d, int theLayerId, bool theIsOrdered )
{
if ( theViewer3d.IsNull() /*|| theLayerId < 0*/ )
{
theViewer3d->SetZLayerSettings( theLayerId, aSettings );
}
-int CreateTopZLayer( const Handle_V3d_Viewer& theViewer3d )
+int CreateTopZLayer( const Handle(V3d_Viewer)& theViewer3d )
{
int aTopZLayer = -1;
}
-HYDROGUI_ZLayersIterator::HYDROGUI_ZLayersIterator( const Handle_V3d_Viewer& theViewer )
+HYDROGUI_ZLayersIterator::HYDROGUI_ZLayersIterator( const Handle(V3d_Viewer)& theViewer )
: myIndex( 0 ), myNewZLayer( -1 ), myViewer( theViewer )
{
Init( theViewer );
{
}
-void HYDROGUI_ZLayersIterator::Init( const Handle_V3d_Viewer& theViewer )
+void HYDROGUI_ZLayersIterator::Init( const Handle(V3d_Viewer)& theViewer )
{
TColStd_SequenceOfInteger anExistingZLayers;
theViewer->GetAllZLayers( anExistingZLayers );
#include <AIS_Trihedron.hxx>
#include <PrsMgr_PresentationManager3d.hxx>
-void UpdateZLayersOfHilightPresentationsOfDisplayedObjects( const Handle_AIS_InteractiveContext& theContext,
+void UpdateZLayersOfHilightPresentationsOfDisplayedObjects( const Handle(AIS_InteractiveContext)& theContext,
int theLayer )
{
AIS_ListOfInteractive aDisplayedObjects;
HYDROData_SequenceOfObjects::Iterator anIter( aSeq );
for ( ; anIter.More(); anIter.Next() )
{
- Handle(HYDROData_Entity) aRefGeomObj =
- Handle(HYDROData_Entity)::DownCast( anIter.Value() );
+ Handle(HYDROData_Entity) aRefGeomObj = anIter.Value();
if ( !aRefGeomObj.IsNull() )
{
// Get Ref.Object name
SET(_add_SOURCES
sipHYDROPyNCollection_Sequence0100HYDROData_IPolylineSectionType.cc
- sipHYDROPyNCollection_Sequence0100Handle_HYDROData_Entity.cc
+ sipHYDROPyNCollection_Sequence0600opencascadehandle0100HYDROData_Entity.cc
sipHYDROPyNCollection_Sequence0100TCollection_AsciiString.cc
sipHYDROPyNCollection_Sequence0100gp_XY.cc
sipHYDROPyNCollection_Sequence0100gp_XYZ.cc
/**
* Add new one reference geometry object for calculation case.
*/
- bool AddGeometryObject( HYDROData_Object theObject ) [bool ( const Handle_HYDROData_Object& )];
+ bool AddGeometryObject( HYDROData_Object theObject ) [bool ( const opencascade::handle<HYDROData_Object>& )];
%MethodCode
Handle(HYDROData_Object) aRef =
Handle(HYDROData_Object)::DownCast( createHandle( a0 ) );
* Removes reference geometry object from calculation case.
*/
void RemoveGeometryObject( HYDROData_Object theObject )
- [void ( const Handle_HYDROData_Object& )];
+ [void ( const opencascade::handle<HYDROData_Object>& )];
%MethodCode
Handle(HYDROData_Object) aRef =
Handle(HYDROData_Object)::DownCast( createHandle( a0 ) );
/**
* Add new one reference geometry group for calculation case.
*/
- bool AddGeometryGroup( HYDROData_ShapesGroup theGroup ) [bool ( const Handle_HYDROData_ShapesGroup& )];
+ bool AddGeometryGroup( HYDROData_ShapesGroup theGroup ) [bool ( const opencascade::handle<HYDROData_ShapesGroup>& )];
%MethodCode
Handle(HYDROData_ShapesGroup) aRef =
Handle(HYDROData_ShapesGroup)::DownCast( createHandle( a0 ) );
/**
* Removes reference geometry group from calculation case.
*/
- void RemoveGeometryGroup( HYDROData_ShapesGroup theGroup ) [void ( const Handle_HYDROData_ShapesGroup& )];
+ void RemoveGeometryGroup( HYDROData_ShapesGroup theGroup ) [void ( opencascade::handle<HYDROData_ShapesGroup>& )];
%MethodCode
Handle(HYDROData_ShapesGroup) aRef =
Handle(HYDROData_ShapesGroup)::DownCast( createHandle( a0 ) );
/**
* Sets reference boundary polyline object for calculation case.
*/
- void SetBoundaryPolyline( HYDROData_PolylineXY thePolyline ) [void ( const Handle_HYDROData_PolylineXY& )];
+ void SetBoundaryPolyline( HYDROData_PolylineXY thePolyline ) [void ( opencascade::handle<HYDROData_PolylineXY>& )];
%MethodCode
Handle(HYDROData_PolylineXY) aRef =
Handle(HYDROData_PolylineXY)::DownCast( createHandle( a0 ) );
/**
* Returns reference boundary polyline object of calculation case.
*/
- HYDROData_PolylineXY GetBoundaryPolyline() const [Handle_HYDROData_PolylineXY ()];
+ HYDROData_PolylineXY GetBoundaryPolyline() const [opencascade::handle<HYDROData_PolylineXY> ()];
%MethodCode
Handle(HYDROData_PolylineXY) aRef;
* The label of theZone is changed during this operation
* because of new region becomes the new parent for this zone.
*/
- HYDROData_Region AddNewRegion( HYDROData_Zone theZone ) [Handle_HYDROData_Region ( const Handle_HYDROData_Zone& )];
+ HYDROData_Region AddNewRegion( HYDROData_Zone theZone ) [opencascade::handle<HYDROData_Region> ( opencascade::handle<HYDROData_Zone>& )];
%MethodCode
Handle(HYDROData_Zone) aRef =
Handle(HYDROData_Zone)::DownCast( createHandle( a0 ) );
* Add new one reference region for calculation case.
* The label of theRegion is changed in case if old parent is not this calculation.
*/
- bool AddRegion( HYDROData_Region theRegion ) [bool ( const Handle_HYDROData_Region& )];
+ bool AddRegion( HYDROData_Region theRegion ) [bool ( opencascade::handle<HYDROData_Region>& )];
%MethodCode
Handle(HYDROData_Region) aRef =
Handle(HYDROData_Region)::DownCast( createHandle( a0 ) );
/**
* Removes reference region from calculation case.
*/
- void RemoveRegion( HYDROData_Region theRegion ) [void ( const Handle_HYDROData_Region& )];
+ void RemoveRegion( HYDROData_Region theRegion ) [void ( opencascade::handle<HYDROData_Region>& )];
%MethodCode
Handle(HYDROData_Region) aRef =
Handle(HYDROData_Region)::DownCast( createHandle( a0 ) );
double GetAltitudeForPoint( const double theCoordX,
const double theCoordY,
HYDROData_Region theRegion ) const
- [double ( const gp_XY&, const Handle_HYDROData_Region& )];
+ [double ( const gp_XY&, opencascade::handle<HYDROData_Region>& )];
%MethodCode
gp_XY aPnt( a0, a1 );
Handle(HYDROData_Region) aRefRegion =
double GetAltitudeForPoint( const double theCoordX,
const double theCoordY,
HYDROData_Zone theZone ) const
- [double ( const gp_XY&, const Handle_HYDROData_Zone& )];
+ [double ( const gp_XY&, opencascade::handle<HYDROData_Zone>& )];
%MethodCode
gp_XY aPnt( a0, a1 );
Handle(HYDROData_Zone) aRefZone =
const NCollection_Sequence<double>& theCoordsY,
HYDROData_Region theRegion,
int theMethod = 0) const
- [NCollection_Sequence<double> ( const NCollection_Sequence<gp_XY>&, const Handle_HYDROData_Region&, int)];
+ [NCollection_Sequence<double> ( const NCollection_Sequence<gp_XY>&, opencascade::handle<HYDROData_Region>&, int)];
%MethodCode
NCollection_Sequence<gp_XY> aPnts;
const NCollection_Sequence<double>& theCoordsY,
HYDROData_Zone theZone,
int theMethod = 0) const
- [NCollection_Sequence<double> ( const NCollection_Sequence<gp_XY>&, const Handle_HYDROData_Zone&, int )];
+ [NCollection_Sequence<double> ( const NCollection_Sequence<gp_XY>&, opencascade::handle<HYDROData_Zone>&, int )];
%MethodCode
NCollection_Sequence<gp_XY> aPnts;
*/
HYDROData_Region GetRegionFromPoint( const double theCoordX,
const double theCoordY ) const
- [Handle_HYDROData_Region ( const gp_XY& )];
+ [opencascade::handle<HYDROData_Region> ( const gp_XY& )];
%MethodCode
Handle(HYDROData_Region) aRes;
*/
HYDROData_Zone GetZoneFromPoint( const double theCoordX,
const double theCoordY ) const
- [Handle_HYDROData_Zone ( const gp_XY& )];
+ [opencascade::handle<HYDROData_Zone> ( const gp_XY& )];
%MethodCode
Handle(HYDROData_Zone) aRes;
PointClassification GetPointClassification( const double theCoordX,
const double theCoordY,
HYDROData_Zone theZone ) const
- [PointClassification ( const gp_XY&, const Handle_HYDROData_Zone& )];
+ [PointClassification ( const gp_XY&, opencascade::handle<HYDROData_Zone>& )];
%MethodCode
gp_XY aPnt( a0, a1 );
HYDROData_Entity theObject2,
HYDROData_Zone::MergeType theMergeType,
HYDROData_CalculationCase::DataTag theDataTag )
- [void ( const Handle_HYDROData_Entity&, HYDROData_PriorityType, const Handle_HYDROData_Entity&, HYDROData_Zone::MergeType, HYDROData_CalculationCase::DataTag )];
+ [void ( const opencascade::handle<HYDROData_Entity>&, HYDROData_PriorityType, opencascade::handle<HYDROData_Entity>&, HYDROData_Zone::MergeType, HYDROData_CalculationCase::DataTag )];
%MethodCode
- Handle(HYDROData_Entity) anObject1 =
- Handle(HYDROData_Entity)::DownCast( createHandle( a0 ) );
- Handle(HYDROData_Entity) anObject2 =
- Handle(HYDROData_Entity)::DownCast( createHandle( a2 ) );
+ Handle(HYDROData_Entity) anObject1 = createHandle( a0 );
+ Handle(HYDROData_Entity) anObject2 = createHandle( a2 );
Py_BEGIN_ALLOW_THREADS
sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::AddRule( anObject1, a1, anObject2, a3, a4 ) :
* Sets reference guide line object for channel.
*/
bool SetGuideLine( HYDROData_Polyline3D theGuideLine )
- [bool ( const Handle_HYDROData_Polyline3D& )];
+ [bool ( const opencascade::handle<HYDROData_Polyline3D>& )];
%MethodCode
Handle(HYDROData_Polyline3D) aRef =
Handle(HYDROData_Polyline3D)::DownCast( createHandle( a0 ) );
* Returns reference guide line object of channel.
*/
HYDROData_Polyline3D GetGuideLine() const
- [Handle_HYDROData_Polyline3D ()];
+ [opencascade::handle<HYDROData_Polyline3D> ()];
%MethodCode
Handle(HYDROData_Polyline3D) aRef;
* Sets reference profile object for channel.
*/
bool SetProfile( HYDROData_Profile theProfile )
- [bool ( const Handle_HYDROData_Profile& )];
+ [bool ( const opencascade::handle<HYDROData_Profile>& )];
%MethodCode
Handle(HYDROData_Profile) aRef =
Handle(HYDROData_Profile)::DownCast( createHandle( a0 ) );
* Returns reference profile object of channel.
*/
HYDROData_Profile GetProfile() const
- [Handle_HYDROData_Profile ()];
+ [opencascade::handle<HYDROData_Profile> ()];
%MethodCode
Handle(HYDROData_Profile) aRef;
%End
%ConvertToSubClassCode
- if ( !Handle(HYDROData_Document)::DownCast( sipCpp ).IsNull() )
+ HYDROData_Document* aDoc = dynamic_cast< HYDROData_Document*>( sipCpp );
+ if ( aDoc )
sipClass = sipClass_HYDROData_Document;
else
sipClass = NULL;
public:
//! Returns the existing document or creates new if it is not exist
- static HYDROData_Document Document( const int theStudyID ) [Handle_HYDROData_Document (const int)] ;
+ static HYDROData_Document Document( const int theStudyID ) [opencascade::handle<HYDROData_Document> (const int)] ;
%MethodCode
Handle(HYDROData_Document) aDocument;
//! Creates and locates in the document a new object
//! \param theKind kind of the created object, can not be UNKNOWN
//! \returns the created object
- HYDROData_Entity CreateObject( const ObjectKind theKind ) [Handle_HYDROData_Entity (const ObjectKind)] ;
+ HYDROData_Entity CreateObject( const ObjectKind theKind ) [opencascade::handle<HYDROData_Entity> (const ObjectKind)] ;
%MethodCode
Handle(HYDROData_Entity) anObject;
HYDROData_Entity FindObjectByName( const QString& theName,
const ObjectKind theKind = KIND_UNKNOWN )
- [Handle_HYDROData_Entity (const QString&, const ObjectKind)] ;
+ [opencascade::handle<HYDROData_Entity> (const QString&, const ObjectKind)] ;
%MethodCode
Handle(HYDROData_Entity) anObject;
* Returns father object. For object created under root document label
* this method always return NULL object.
*/
- HYDROData_Entity GetFatherObject() const [Handle_HYDROData_Entity ()];
+ HYDROData_Entity GetFatherObject() const [opencascade::handle<HYDROData_Entity> ()];
%MethodCode
Handle(HYDROData_Entity) aFather;
/**
* Returns the z-level for object presentation, -1 if no z-level.
*/
- virtual bool GetZLevel( int& theLevel ) const [Standard_Boolean ( Standard_Integer& )];
+ virtual bool GetZLevel( int& theLevel ) const [bool ( Standard_Integer& )];
/**
* Set the z-level for object presentation.
* Sets the altitude object for interpolation.
*/
void SetAltitudeObject( HYDROData_IAltitudeObject theAltitude )
- [void ( const Handle_HYDROData_IAltitudeObject& )];
+ [void ( const opencascade::handle<HYDROData_IAltitudeObject>& )];
%MethodCode
Handle(HYDROData_IAltitudeObject) anAltitude =
Handle(HYDROData_IAltitudeObject)::DownCast( createHandle( a0 ) );
/**
* Returns the altitude object for interpolation.
*/
- HYDROData_IAltitudeObject GetAltitudeObject() const [Handle_HYDROData_IAltitudeObject ()];
+ HYDROData_IAltitudeObject GetAltitudeObject() const [opencascade::handle<HYDROData_IAltitudeObject> ()];
%MethodCode
Handle(HYDROData_IAltitudeObject) aRes;
const QPointF& thePointB,
const QPointF& thePointC = QPoint( INT_MIN, INT_MIN ),
const bool theIsUpdate = true )
- [void ( const Handle_HYDROData_Image&, const QPointF&, const QPointF&, const QPointF&, const bool )];
+ [void ( const opencascade::handle<HYDROData_Image>&, const QPointF&, const QPointF&, const QPointF&, const bool )];
%MethodCode
Handle(HYDROData_Image) aRefImage =
Handle(HYDROData_Image)::DownCast( createHandle( a0 ) );
QPointF& thePointA /Out/,
QPointF& thePointB /Out/,
QPointF& thePointC /Out/ ) const
- [bool ( const Handle_HYDROData_Image&, QPointF&, QPointF&, QPointF& )];
+ [bool ( const opencascade::handle<HYDROData_Image>&, QPointF&, QPointF&, QPointF& )];
%MethodCode
Handle(HYDROData_Image) aRefImage =
Handle(HYDROData_Image)::DownCast( createHandle( a0 ) );
*/
bool HasReferencePoints() const;
-
/**
* Stores the reference image for transformation
* \param theRefImage reference image
*/
- void SetTrsfReferenceImage( HYDROData_Image theRefImage ) [void ( const Handle_HYDROData_Image& )];
+ void SetTrsfReferenceImage( HYDROData_Image theRefImage ) [void ( const opencascade::handle<HYDROData_Image>& )];
%MethodCode
Handle(HYDROData_Image) aRefImage =
Handle(HYDROData_Image)::DownCast( createHandle( a0 ) );
/**
* Returns the reference image for transformation
*/
- HYDROData_Image GetTrsfReferenceImage() const [Handle_HYDROData_Image ()];
+ HYDROData_Image GetTrsfReferenceImage() const [opencascade::handle<HYDROData_Image> ()];
%MethodCode
Handle(HYDROData_Image) aRefImage;
* Appends reference to other object (image or polyline).
* \param theReferenced the object referenced by this
*/
- void AppendReference( HYDROData_Entity theReferenced ) [void ( const Handle_HYDROData_Entity& )];
+ void AppendReference( HYDROData_Entity theReferenced ) [void ( const opencascade::handle<HYDROData_Entity>& )];
%MethodCode
Handle(HYDROData_Entity) aRef = createHandle( a0 );
if ( !aRef.IsNull() )
* \param theIndex number of reference [0; NbReference)
* \returns the referenced object, or Null if index is invalid
*/
- HYDROData_Entity Reference( const int theIndex ) const [Handle_HYDROData_Entity ()];
+ HYDROData_Entity Reference( const int theIndex ) const [opencascade::handle<HYDROData_Entity> ()];
%MethodCode
Handle(HYDROData_Entity) aRef;
* \param theReferenced the object referenced by this
*/
void ChangeReference( const int theIndex, HYDROData_Entity theReferenced )
- [void ( const int, const Handle_HYDROData_Entity& )];
+ [void ( const int, const opencascade::handle<HYDROData_Entity>& )];
%MethodCode
Handle(HYDROData_Entity) aRef = createHandle( a1 );
if ( !aRef.IsNull() )
/**
* Sets reference polyline object for zone.
*/
- void SetPolyline( HYDROData_PolylineXY thePolyline ) [void (const Handle_HYDROData_PolylineXY&)];
+ void SetPolyline( HYDROData_PolylineXY thePolyline ) [void (const opencascade::handle<HYDROData_PolylineXY>&)];
%MethodCode
Handle(HYDROData_PolylineXY) aRefPolyline =
/**
* Returns reference polyline object of zone.
*/
- HYDROData_PolylineXY GetPolyline() const [Handle_HYDROData_PolylineXY ()];
+ HYDROData_PolylineXY GetPolyline() const [opencascade::handle<HYDROData_PolylineXY> ()];
%MethodCode
Handle(HYDROData_PolylineXY) aRefPolyline;
bool ExportTelemac( const QString& theFileName, double theDeflection,
HYDROData_StricklerTable theTable ) const
- [bool( const QString&, double, const Handle_HYDROData_StricklerTable& )];
+ [bool( const QString&, double, const opencascade::handle<HYDROData_StricklerTable>& )];
%MethodCode
Handle(HYDROData_StricklerTable) aRef =
Handle(HYDROData_StricklerTable)::DownCast( createHandle( a2 ) );
%End
bool Add( HYDROData_Object theObject, const QString& theType )
- [bool ( const Handle_HYDROData_Object&, const QString& )];
+ [bool ( const opencascade::handle<HYDROData_Object>&, const QString& )];
%MethodCode
Handle(HYDROData_Object) aRef =
Handle(HYDROData_Object)::DownCast( createHandle( a0 ) );
%End
bool Add( HYDROData_PolylineXY thePolyline, const QString& theType )
- [bool ( const Handle_HYDROData_PolylineXY&, const QString& )];
+ [bool ( const opencascade::handle<HYDROData_PolylineXY>&, const QString& )];
%MethodCode
Handle(HYDROData_PolylineXY) aRef =
Handle(HYDROData_PolylineXY)::DownCast( createHandle( a0 ) );
%End
bool Split( HYDROData_PolylineXY thePolyline )
- [bool ( const Handle_HYDROData_PolylineXY& )];
+ [bool ( const opencascade::handle<HYDROData_PolylineXY>& )];
%MethodCode
Handle(HYDROData_PolylineXY) aRef =
Handle(HYDROData_PolylineXY)::DownCast( createHandle( a0 ) );
/**
* Set reference altitude object for geometry object.
*/
- bool SetAltitudeObject( HYDROData_IAltitudeObject theAltitude ) [void (const Handle_HYDROData_IAltitudeObject&)];
+ bool SetAltitudeObject( HYDROData_IAltitudeObject theAltitude ) [void (const opencascade::handle<HYDROData_IAltitudeObject>&)];
%MethodCode
Handle(HYDROData_IAltitudeObject) aRefAltitude =
/**
* Returns reference altitude object of geometry object.
*/
- HYDROData_IAltitudeObject GetAltitudeObject() const [Handle_HYDROData_IAltitudeObject ()];
+ HYDROData_IAltitudeObject GetAltitudeObject() const [opencascade::handle<HYDROData_IAltitudeObject> ()];
%MethodCode
Handle(HYDROData_IAltitudeObject) aRefAltitude;
/**
* Returns group data model object by it id.
*/
- HYDROData_ShapesGroup GetGroup( const int theGroupId ) const [Handle_HYDROData_ShapesGroup ()];
+ HYDROData_ShapesGroup GetGroup( const int theGroupId ) const [opencascade::handle<HYDROData_ShapesGroup> ()];
%MethodCode
Handle(HYDROData_ShapesGroup) aRefGroup;
/**
* Returns group id by data model object.
*/
- int GetGroupId( HYDROData_ShapesGroup theGroup ) const [int (const Handle_HYDROData_ShapesGroup&)];
+ int GetGroupId( HYDROData_ShapesGroup theGroup ) const [int (const opencascade::handle<HYDROData_ShapesGroup>&)];
%MethodCode
Handle(HYDROData_ShapesGroup) aRefGroup =
*/
bool SetPolylineXY( HYDROData_PolylineXY thePolyline,
const bool theIsUpdateProfile = true )
- [bool ( const Handle_HYDROData_PolylineXY&,
+ [bool ( const opencascade::handle<HYDROData_PolylineXY>&,
const bool = true )];
%MethodCode
Handle(HYDROData_PolylineXY) aRef =
* Returns reference x,y polyline object of 3D polyline.
*/
HYDROData_PolylineXY GetPolylineXY() const
- [Handle_HYDROData_PolylineXY ()];
+ [opencascade::handle<HYDROData_PolylineXY> ()];
%MethodCode
Handle(HYDROData_PolylineXY) aRef;
* Sets reference u,z profile object for 3D polyline.
*/
bool SetProfileUZ( HYDROData_ProfileUZ theProfile )
- [bool ( const Handle_HYDROData_ProfileUZ& )];
+ [bool ( const opencascade::handle<HYDROData_ProfileUZ>& )];
%MethodCode
Handle(HYDROData_ProfileUZ) aRef =
Handle(HYDROData_ProfileUZ)::DownCast( createHandle( a0 ) );
* Returns reference u,z profile object of 3D polyline.
*/
HYDROData_ProfileUZ GetProfileUZ() const
- [Handle_HYDROData_ProfileUZ ()];
+ [Hopencascade::handle<HYDROData_ProfileUZ> ()];
%MethodCode
Handle(HYDROData_ProfileUZ) aRef;
* Reimplemented to remove reference u,z profile.
*/
bool SetAltitudeObject( HYDROData_IAltitudeObject theAltitude )
- [bool ( const Handle_HYDROData_IAltitudeObject& )];
+ [bool ( const opencascade::handle<HYDROData_IAltitudeObject>& )];
%MethodCode
Handle(HYDROData_IAltitudeObject) aRef =
Handle(HYDROData_IAltitudeObject)::DownCast( createHandle( a0 ) );
* Returns the child u,z profile which has been generated from bathymetry.
*/
HYDROData_ProfileUZ GetChildProfileUZ( const bool theIsCreate = true ) const
- [Handle_HYDROData_ProfileUZ ( const bool = true )];
+ [opencascade::handle<HYDROData_ProfileUZ> ( const bool = true )];
%MethodCode
Handle(HYDROData_ProfileUZ) aRef;
/**
* Sets the child u,z profile for polyline.
*/
- void SetChildProfileUZ( HYDROData_ProfileUZ theProfile ) [void ( const Handle_HYDROData_ProfileUZ& )];
+ void SetChildProfileUZ( HYDROData_ProfileUZ theProfile ) [void ( const opencascade::handle<HYDROData_ProfileUZ>& )];
%MethodCode
Handle(HYDROData_ProfileUZ) aRef =
Handle(HYDROData_ProfileUZ)::DownCast( createHandle( a0 ) );
* \return profile U,Z
*/
HYDROData_ProfileUZ GetProfileUZ( const bool theIsCreate = true ) const
- [Handle_HYDROData_ProfileUZ ( const bool theIsCreate = true )];
+ [opencascade::handle<HYDROData_ProfileUZ> ( const bool theIsCreate = true )];
%MethodCode
Handle(HYDROData_ProfileUZ) aRefProfileUZ;
static int ImportFromFile( HYDROData_Document theDoc,
const TCollection_AsciiString& theFileName,
NCollection_Sequence<int>& theBadProfilesIds )
- [int ( const Handle_HYDROData_Document&,
+ [int ( const opencascade::handle<HYDROData_Document>&,
const TCollection_AsciiString&,
NCollection_Sequence<int>& )];
%MethodCode
/**
* Add new one reference zone for region.
*/
- void AddZone( HYDROData_Zone theZone ) [void (const Handle_HYDROData_Zone&)];
+ void AddZone( HYDROData_Zone theZone ) [void (const opencascade::handle<HYDROData_Zone>&)];
%MethodCode
Handle(HYDROData_Zone) aZone =
/**
* Removes reference zone from region.
*/
- void RemoveZone( HYDROData_Zone theZone ) [void (const Handle_HYDROData_Zone&)];
+ void RemoveZone( HYDROData_Zone theZone ) [void (const opencascade::handle<HYDROData_Zone>&)];
%MethodCode
Handle(HYDROData_Zone) aZone =
#include <NCollection_Sequence.hxx>
%End
-%MappedType NCollection_Sequence<Handle_HYDROData_Entity>
+%MappedType NCollection_Sequence<opencascade::handle<HYDROData_Entity>>
{
%TypeHeaderCode
#include <NCollection_Sequence.hxx>
{
Py_DECREF(l);
{
- Handle_HYDROData_Entity anEnt( aPntr );
+ Handle(HYDROData_Entity) anEnt( aPntr );
}
return NULL;
return 1;
}
- NCollection_Sequence<Handle_HYDROData_Entity> *aSeq =
- new NCollection_Sequence<Handle_HYDROData_Entity>;
+ NCollection_Sequence<Handle(HYDROData_Entity)> *aSeq =
+ new NCollection_Sequence<Handle(HYDROData_Entity)>;
len = PySequence_Size(sipPy);
for (SIP_SSIZE_T i = 0; i < len; ++i)
return 0;
}
- Handle_HYDROData_Entity anEnt( t );
+ Handle(HYDROData_Entity) anEnt( t );
aSeq->Append( anEnt );
//sipReleaseType(t, sipType_HYDROData_Entity, state);
%End
};
-typedef NCollection_Sequence<Handle_HYDROData_Entity> HYDROData_SequenceOfObjects;
+typedef NCollection_Sequence<opencascade::handle<HYDROData_Entity>> HYDROData_SequenceOfObjects;
* Returns true if given polyline can be used as stream axis.
*/
static bool IsValidAsAxis( HYDROData_PolylineXY theAxis )
- [bool ( const Handle_HYDROData_PolylineXY& )];
+ [bool ( const opencascade::handle<HYDROData_PolylineXY>& )];
%MethodCode
Handle(HYDROData_PolylineXY) aRef =
Handle(HYDROData_PolylineXY)::DownCast( createHandle( a0 ) );
* Sets reference hydraulic axis object for stream.
*/
bool SetHydraulicAxis( HYDROData_PolylineXY theAxis )
- [bool ( const Handle_HYDROData_PolylineXY& )];
+ [bool ( const opencascade::handle<HYDROData_PolylineXY>& )];
%MethodCode
Handle(HYDROData_PolylineXY) aRef =
Handle(HYDROData_PolylineXY)::DownCast( createHandle( a0 ) );
* Returns reference hydraulic axis object of stream.
*/
HYDROData_PolylineXY GetHydraulicAxis() const
- [Handle_HYDROData_PolylineXY ()];
+ [opencascade::handle<HYDROData_PolylineXY> ()];
%MethodCode
Handle(HYDROData_PolylineXY) aRef;
* Add new one reference profile object for stream.
*/
bool AddProfile( HYDROData_Profile theProfile )
- [bool ( const Handle_HYDROData_Profile& )];
+ [bool ( const opencascade::handle<HYDROData_Profile>& )];
%MethodCode
Handle(HYDROData_Profile) aRef =
Handle(HYDROData_Profile)::DownCast( createHandle( a0 ) );
* Removes reference profile object from stream.
*/
bool RemoveProfile( HYDROData_Profile theProfile )
- [bool ( const Handle_HYDROData_Profile& )];
+ [bool ( const opencascade::handle<HYDROData_Profile>& )];
%MethodCode
Handle(HYDROData_Profile) aRef =
Handle(HYDROData_Profile)::DownCast( createHandle( a0 ) );
* Returns reference bottom polyline object of stream.
*/
HYDROData_Polyline3D GetBottomPolyline() const
- [Handle_HYDROData_Polyline3D ()];
+ [opencascade::handle<HYDROData_Polyline3D> ()];
%MethodCode
Handle(HYDROData_Polyline3D) aRef;
* Sets reference bottom polyline object for stream.
*/
bool SetBottomPolyline( HYDROData_Polyline3D theBottom )
- [bool ( const Handle_HYDROData_Polyline3D& )];
+ [bool ( const opencascade::handle<HYDROData_Polyline3D>& )];
%MethodCode
Handle(HYDROData_Polyline3D) aRef =
Handle(HYDROData_Polyline3D)::DownCast( createHandle( a0 ) );
MergeType GetMergeType() const;
void SetMergeAltitude( HYDROData_IAltitudeObject theAltitude )
- [void (const Handle_HYDROData_IAltitudeObject&)];
+ [void (const opencascade::handle<HYDROData_IAltitudeObject>&)];
%MethodCode
Handle(HYDROData_IAltitudeObject) aRefAltitude =
Handle(HYDROData_IAltitudeObject)::DownCast( createHandle( a0 ) );
}
%End
- HYDROData_IAltitudeObject GetMergeAltitude() const [Handle_HYDROData_IAltitudeObject ()];
+ HYDROData_IAltitudeObject GetMergeAltitude() const [opencascade::handle<HYDROData_IAltitudeObject> ()];
%MethodCode
Handle(HYDROData_IAltitudeObject) aRefAltitude;
Py_BEGIN_ALLOW_THREADS
Py_END_ALLOW_THREADS
%End
- void SetMergeObject( HYDROData_Entity theObject ) [void (const Handle_HYDROData_Entity&)];
+ void SetMergeObject( HYDROData_Entity theObject ) [void (const opencascade::handle<HYDROData_Entity>&)];
%MethodCode
- Handle(HYDROData_Entity) aRefObject =
- Handle(HYDROData_Entity)::DownCast( createHandle( a0 ) );
+ Handle(HYDROData_Entity) aRefObject = createHandle( a0 );
if ( !aRefObject.IsNull() )
{
Py_BEGIN_ALLOW_THREADS
}
%End
- HYDROData_Entity GetMergeObject() const [Handle_HYDROData_Entity ()];
+ HYDROData_Entity GetMergeObject() const [opencascade::handle<HYDROData_Entity> ()];
%MethodCode
Handle(HYDROData_Entity) aRefObject;
Py_BEGIN_ALLOW_THREADS
void RemoveMergeObject();
- void AddObject( HYDROData_Entity theObject ) [void (const Handle_HYDROData_Entity&)];
+ void AddObject( HYDROData_Entity theObject ) [void (const opencascade::handle<HYDROData_Entity>&)];
%MethodCode
- Handle(HYDROData_Entity) anObj =
- Handle(HYDROData_Entity)::DownCast( createHandle( a0 ) );
+ Handle(HYDROData_Entity) anObj = createHandle( a0 );
if ( !anObj.IsNull() )
{
Py_BEGIN_ALLOW_THREADS
#ifdef WIN32
#pragma warning ( disable: 4251 )
#endif
-#include <AIS_InteractiveContext.hxx>
#include <AIS_Shape.hxx>
-#include <Aspect_ColorScale.hxx>
+#include <AIS_ColorScale.hxx>
#include <Prs3d_PointAspect.hxx>
#include <TopoDS_Iterator.hxx>
#include <QDir>
return false;
}
-Handle_Aspect_ColorScale TestViewer::colorScale()
+Handle(AIS_ColorScale) TestViewer::colorScale()
{
- Handle(V3d_View) aView = myViewWindow->getViewPort()->getView();
- if( aView.IsNull() )
- return Handle(Aspect_ColorScale)();
- else
- return aView->ColorScale();
+ static Handle(AIS_ColorScale) aColorScale = new AIS_ColorScale();
+
+ return aColorScale;
}
void TestViewer::showColorScale( bool isShow )
{
- Handle(V3d_View) aView = myViewWindow->getViewPort()->getView();
- if( aView.IsNull() )
- return;
-
- Handle(Aspect_ColorScale) aColorScale = colorScale();
+ Handle(AIS_ColorScale) aColorScale = colorScale();
if( aColorScale.IsNull() )
return;
aColorScale->SetTitle( "test" );
aColorScale->SetRange( 0, 1 );
+ aColorScale->SetToUpdate();
+
if( isShow )
{
- if( !aView->ColorScaleIsDisplayed() )
- aView->ColorScaleDisplay();
+ if( !context()->IsDisplayed( aColorScale ) )
+ context()->Display( aColorScale );
}
else
{
- if( aView->ColorScaleIsDisplayed() )
- aView->ColorScaleErase();
+ if( context()->IsDisplayed( aColorScale ) )
+ context()->Erase( aColorScale );
}
}
#pragma once
+#include <AIS_InteractiveContext.hxx>
+
class OCCViewer_ViewManager;
class OCCViewer_Viewer;
class OCCViewer_ViewWindow;
class TopoDS_Shape;
class QString;
class QColor;
-class AIS_InteractiveContext;
class AIS_InteractiveObject;
-class Aspect_ColorScale;
+class AIS_ColorScale;
class TestViewer
{
static bool AssertImages( QString& theMessage );
static QColor GetColor(int i);
- static Handle(Aspect_ColorScale) colorScale();
+ static Handle(AIS_ColorScale) colorScale();
static void showColorScale( bool );
static void select( int theViewX, int theViewY );
#include <cppunit/extensions/HelperMacros.h>
-class Handle_HYDROData_Bathymetry;
class QString;
class test_HYDROData_Bathymetry : public CppUnit::TestFixture {
#include <TestShape.h>
#include <TopTools_ListOfShape.hxx>
#include <AIS_DisplayMode.hxx>
-#include <Aspect_ColorScale.hxx>
#include <BRepMesh_IncrementalMesh.hxx>
#include <QString>
#include <QColor>
int W = 800, H = 600;
aWindow->setGeometry( 200, 200, W, H );
aWindow->show();
- QTest::qWaitForWindowShown( aWindow );
+ QTest::qWaitForWindowExposed( aWindow );
int dy = 34;
//std::cout << dx << "," << dy << std::endl;
#include <cppunit/extensions/HelperMacros.h>
-class Handle_HYDROData_Profile;
class QString;
class test_HYDROData_Profile : public CppUnit::TestFixture {
#include <HYDROData_Document.h>
#include <HYDROGUI_ListModel.h>
-Handle_HYDROData_Document GetDocument()
+Handle(HYDROData_Document) GetDocument()
{
return HYDROData_Document::Document( 0 );
}
for( int i=0; i<theObjCount; i++ )
{
- Handle_HYDROData_Entity anObj = GetDocument()->CreateObject( KIND_IMMERSIBLE_ZONE );
+ Handle(HYDROData_Entity) anObj = GetDocument()->CreateObject( KIND_IMMERSIBLE_ZONE );
std::string aName = " ";
aName[0] = 'A' + i;
aRes = aModel->move( QList<int>() << 0 << 2 << 4 << 5 << 7, aDnD, false, 3 );
CPPUNIT_ASSERT_EQUAL( true, aRes );
CPPUNIT_ASSERT_EQUAL( std::string( "F, *A, *G, *C, H, *E, D, B" ), GetObjects( aModel ) );
-}
\ No newline at end of file
+}
128 << 18 << 140 << 50 << 131 << 89 << 104 << 111 <<
31 << 114 );
- Handle_AIS_InteractiveContext aContext = TestViewer::context();
- Handle_HYDROData_Entity anEntity; //it should be null as in preview
+ Handle(AIS_InteractiveContext) aContext = TestViewer::context();
+ Handle(HYDROData_Entity) anEntity; //it should be null as in preview
HYDROGUI_Shape* aPreview = new HYDROGUI_Shape( aContext, anEntity );
aPreview->setFace( aFace, true, true, "" );