if( aPrs )
{
- bool anIsVisible = anObj->IsVisible( (int)aViewer );
+ bool anIsVisible = anObj->IsVisible( (size_t)aViewer );
aPrs->setVisible( anIsVisible );
}
}
{
HYDROGUI_DataModel* aModel = getDataModel();
- int aViewId = HYDROGUI_Tool::GetActiveGraphicsViewId( this );
+ size_t aViewId = HYDROGUI_Tool::GetActiveGraphicsViewId( this );
bool anIsSelection = false;
bool anIsVisibleInSelection = false;
{
HYDROGUI_Operation::startOperation();
- int aViewId = HYDROGUI_Tool::GetActiveGraphicsViewId( module() );
+ size_t aViewId = HYDROGUI_Tool::GetActiveGraphicsViewId( module() );
// for all objects
if( myId == ShowOnlyId || myId == ShowAllId || myId == HideAllId )
return aName;
}
-int HYDROGUI_Tool::GetActiveGraphicsViewId( HYDROGUI_Module* theModule )
+size_t HYDROGUI_Tool::GetActiveGraphicsViewId( HYDROGUI_Module* theModule )
{
- int aViewId = 0;
+ size_t aViewId = 0;
SUIT_ViewManager* aViewMgr = theModule->getApp()->activeViewManager();
if( !aViewMgr || aViewMgr->getType() != GraphicsView_Viewer::Type() )
return aViewId;
if( SUIT_ViewModel* aViewer = aViewMgr->getViewModel() )
- aViewId = (int)aViewer;
+ aViewId = (size_t)aViewer;
return aViewId;
}
-QList<int> HYDROGUI_Tool::GetGraphicsViewIdList( HYDROGUI_Module* theModule )
+QList<size_t> HYDROGUI_Tool::GetGraphicsViewIdList( HYDROGUI_Module* theModule )
{
- QList<int> aList;
+ QList<size_t> aList;
ViewManagerList aViewMgrs;
theModule->getApp()->viewManagers( GraphicsView_Viewer::Type(), aViewMgrs );
QListIterator<SUIT_ViewManager*> anIter( aViewMgrs );
if( SUIT_ViewManager* aViewMgr = anIter.next() )
{
if( SUIT_ViewModel* aViewer = aViewMgr->getViewModel() )
- aList.append( (int)aViewer );
+ aList.append( (size_t)aViewer );
}
}
return aList;
* \param theModule module
* \return view id
*/
- static int GetActiveGraphicsViewId( HYDROGUI_Module* theModule );
+ static size_t GetActiveGraphicsViewId( HYDROGUI_Module* theModule );
/**
* \brief Get list of ids of existing GraphicsView views.
* \param theModule module
* \return list of view ids
*/
- static QList<int> GetGraphicsViewIdList( HYDROGUI_Module* theModule );
+ static QList<size_t> GetGraphicsViewIdList( HYDROGUI_Module* theModule );
};
#endif
aResult->AppendReference( anImage2 );
aFactory->UpdateImage( doc(), aResult );
- int aViewId = HYDROGUI_Tool::GetActiveGraphicsViewId( module() );
+ size_t aViewId = HYDROGUI_Tool::GetActiveGraphicsViewId( module() );
anImage1->SetVisible( aViewId, false );
anImage2->SetVisible( aViewId, false );
aResult->SetVisible( aViewId, true );
#include <SUIT_ViewManager.h>
#include <SUIT_ViewWindow.h>
-#include <QApplication.h>
+#include <QApplication>
HYDROGUI_VisualStateOp::HYDROGUI_VisualStateOp( HYDROGUI_Module* theModule,
const bool theIsLoad )
{
if( SUIT_ViewManager* aViewManager = anIter.next() )
{
- int aViewId = (int)aViewManager->getViewModel();
+ size_t aViewId = (size_t)aViewManager->getViewModel();
if( SUIT_ViewWindow* aViewWindow = aViewManager->getActiveView() )
{
QString aType = aViewManager->getType();
QString aViewerId = aViewerEntry.section( '_', -1 ); // unused
if( SUIT_ViewManager* aViewManager = anApp->createViewManager( aType ) )
{
- int aViewId = (int)aViewManager->getViewModel();
+ size_t aViewId = (size_t)aViewManager->getViewModel();
if( SUIT_ViewWindow* aViewWindow = aViewManager->getActiveView() )
{
// Wait until the window is really shown. This step fixes MANY bugs.