#include <HYDROData_ShapesGroup.h>
#endif
-//#define _DEVDEBUG_
+#define _DEVDEBUG_
#include "HYDRO_trace.hxx"
static HYDROData_SequenceOfObjects myCopyingObjects;
QString anEntry = theEntry;
if( anEntry.indexOf( "_" ) != -1 ) // reference object
anEntry = anEntry.section( "_", -1 );
-
+ //DEBTRACE("objectByEntry: " << anEntry.toStdString() << " kind: " << theObjectKind);
Handle(HYDROData_Document) aDocument = getDocument();
if( !aDocument.IsNull() )
{
if( !anObject.IsNull() )
{
QString anEntryRef = HYDROGUI_DataObject::dataObjectEntry( anObject );
+ //DEBTRACE(" anEntryRef " << anEntryRef.toStdString());
if( anEntryRef == anEntry )
+ {
+ //DEBTRACE(" found!");
return anObject;
+ }
}
}
}
ViewManagerMap::const_iterator it = myViewManagerMap.begin(), last = myViewManagerMap.end();
for( ; it!=last; it++ )
{
- int aViewerId = it.key();
+ size_t aViewerId = it.key();
OCCViewer_ViewManager* aMgr = dynamic_cast<OCCViewer_ViewManager*>( it.value().first );
if( aMgr )
getOCCDisplayer()->UpdatePolylines( aViewerId, aType, aSize );
const ViewManagerRole theRole )
{
DEBTRACE("HYDROGUI_Module::setViewManagerRole");
- int anId = getViewManagerId( theViewManager );
- if( anId != -1 )
+ size_t anId = getViewManagerId( theViewManager );
+ if( anId != 0 )
{
ViewManagerInfo& anInfo = myViewManagerMap[ anId ];
anInfo.second = theRole;
createSelector( theViewManager ); // replace the default selector
- int anId = getViewManagerId( theViewManager );
- if( anId != -1 )
+ size_t anId = getViewManagerId( theViewManager );
+ if( anId != 0 )
{
OCCViewer_ViewManager* anOCCViewManager =
::qobject_cast<OCCViewer_ViewManager*>( myViewManagerMap[ anId ].first );
{
OCCViewer_Viewer* anOCCViewer = anOCCViewManager->getOCCViewer();
if ( anOCCViewer ) {
- int aViewerId = (size_t)anOCCViewer;
+ size_t aViewerId = (size_t)anOCCViewer;
removeViewShapes( aViewerId );
setLandCoversScalarMapModeOff( aViewerId );
}
const bool theDoFitAll )
{
DEBTRACE("HYDROGUI_Module::updateViewer");
- QList<int> aViewManagerIdList;
+ QList<size_t> aViewManagerIdList;
// currently, all views are updated
ViewManagerMapIterator anIter( myViewManagerMap );
}
}
- QListIterator<int> anIdIter( aViewManagerIdList );
+ QListIterator<size_t> anIdIter( aViewManagerIdList );
while( anIdIter.hasNext() )
{
theDisplayer->UpdateAll( anIdIter.next(), theIsInit, theIsForced, theDoFitAll );
}
-Handle(HYDROData_StricklerTable) HYDROGUI_Module::getLandCoverColoringTable( const int theViewId ) const
+Handle(HYDROData_StricklerTable) HYDROGUI_Module::getLandCoverColoringTable( const size_t theViewId ) const
{
Handle(HYDROData_StricklerTable) aTable;
return aTable;
}
-void HYDROGUI_Module::setLandCoverColoringTable( const int theViewId,
+void HYDROGUI_Module::setLandCoverColoringTable( const size_t theViewId,
const Handle(HYDROData_StricklerTable)& theTable )
{
if ( !theTable.IsNull() ) {
}
}
-void HYDROGUI_Module::setLandCoversScalarMapModeOff( const int theViewId )
+void HYDROGUI_Module::setLandCoversScalarMapModeOff( const size_t theViewId )
{
myLandCoverColoringMap.remove( theViewId );
}
-bool HYDROGUI_Module::isLandCoversScalarMapModeOn( const int theViewId ) const
+bool HYDROGUI_Module::isLandCoversScalarMapModeOn( const size_t theViewId ) const
{
return myLandCoverColoringMap.contains( theViewId );
}
if ( theObject->GetKind() == KIND_STRICKLER_TABLE ) {
Handle(HYDROData_StricklerTable) aTable =
Handle(HYDROData_StricklerTable)::DownCast( theObject );
- QList<int> aViewIds;
QMutableMapIterator<size_t, Handle(HYDROData_StricklerTable)> anIter( myLandCoverColoringMap );
while ( anIter.hasNext() ) {
if ( HYDROGUI_DataObject::dataObjectEntry( anIter.next().value() ) ==
* @return the Strickler table used for scalar map coloring of Land Covers in the given view;
null - if scalar map coloring is off for the view
*/
- Handle(HYDROData_StricklerTable) getLandCoverColoringTable( const int theViewId ) const;
+ Handle(HYDROData_StricklerTable) getLandCoverColoringTable( const size_t theViewId ) const;
/**
* Set Strickler table to be used for Land Cover scalar map coloring in the given view.
* @param theViewId the view id
* @param theTable the Strickler table
*/
- void setLandCoverColoringTable( const int theViewId,
+ void setLandCoverColoringTable( const size_t theViewId,
const Handle(HYDROData_StricklerTable)& theTable );
/**
* Set Land Cover scalar map coloring mode off for the given view.
* @param theViewId the view id
*/
- void setLandCoversScalarMapModeOff( const int theViewId );
+ void setLandCoversScalarMapModeOff( const size_t theViewId );
/**
* Check if Land Cover scalar map coloring mode is on in the given view.
* @param theViewId the view id
* @return true if the mode is on, false if the mode is off
*/
- bool isLandCoversScalarMapModeOn( const int theViewId ) const;
+ bool isLandCoversScalarMapModeOn( const size_t theViewId ) const;
/**
* Set object as removed.
if ( !aViewer )
return;
- int aViewerId = (size_t)aViewer;
+ size_t aViewerId = (size_t)aViewer;
Handle(AIS_InteractiveContext) aContext = aViewer->getAISContext();
if ( aContext.IsNull() ) {
}*/
mySelectedExternals.clear();
- DEBTRACE(" ...");
for ( SUIT_DataOwnerPtrList::const_iterator itr = aList.begin(); itr != aList.end(); ++itr )
{
const LightApp_DataOwner* owner = dynamic_cast<const LightApp_DataOwner*>( (*itr).operator->() );
Handle(HYDROData_Entity) anEntity = myModule->getDataModel()->objectByEntry( anEntry );
if( !anEntity.IsNull() )
{
+ DEBTRACE("aViewerId, anEntity " << aViewerId << " " << anEntity.get());
HYDROGUI_Shape* aShape = myModule->getObjectShape( aViewerId, anEntity );
if( aShape && aShape->isVisible() )
{
mySelectedExternals.append(*itr);
}
}
-
+ DEBTRACE("aSelList.Size() " << aSelList.Size());
aViewer->unHighlightAll( false );
aViewer->setObjectsSelected( aSelList );
}