* Constructor
*/
//=================================================================
-GEOM_Displayer::GEOM_Displayer( SalomeApp_Study* study )
+GEOM_Displayer::GEOM_Displayer( SalomeApp_Study* st )
{
- myStudy = study;
+ if( st )
+ myApp = dynamic_cast<SalomeApp_Application*>( st->application() );
+ else
+ myApp = 0;
/* Shading Color */
SUIT_Session* session = SUIT_Session::session();
theSelMgr->setSelectedObjects( toSelect, true );
}
+
+void GEOM_Displayer::SetName( const char* theName )
+{
+ myName = theName;
+}
+
+void GEOM_Displayer::UnsetName()
+{
+ myName = "";
+}
+
+SalomeApp_Study* GEOM_Displayer::getStudy() const
+{
+ return dynamic_cast<SalomeApp_Study*>( myApp->activeStudy() );
+}
+
+void GEOM_Displayer::setIO( const Handle(SALOME_InteractiveObject)& theIO )
+{
+ myIO = theIO;
+}
+
+void GEOM_Displayer::setShape( const TopoDS_Shape& theShape )
+{
+ myShape = theShape;
+}
class TColStd_MapOfInteger;
class LightApp_SelectionMgr;
class SalomeApp_Study;
+class SalomeApp_Application;
class SUIT_SelectionFilter;
//class SALOME_Selection;
+
//#ifdef WNT
//#include <SALOME_WNT.hxx>
//#else
public:
/* Constructor */
- GEOM_Displayer( SalomeApp_Study* study );
+ GEOM_Displayer( SalomeApp_Study* app );
/* Destructor */
virtual ~GEOM_Displayer();
/* Sets name - for temporary objects only */
- void SetName( const char* theName ) { myName = theName; }
- void UnsetName() { myName = ""; }
+ void SetName( const char* theName );
+ void UnsetName();
/* Reimplemented from SALOME_Displayer */
virtual void Update( SALOME_OCCPrs* );
void GlobalSelection( const int = GEOM_ALLOBJECTS, const bool = false );
void GlobalSelection( const TColStd_MapOfInteger&, const bool = false );
- SalomeApp_Study* getStudy() const {return myStudy;}
+ SalomeApp_Study* getStudy() const;
protected:
/* internal methods */
virtual SALOME_Prs* buildPresentation( const QString&, SALOME_View* = 0 );
/* Sets interactive object */
- void setIO( const Handle(SALOME_InteractiveObject)& theIO ) { myIO = theIO; }
+ void setIO( const Handle(SALOME_InteractiveObject)& theIO );
/* Sets shape */
- void setShape( const TopoDS_Shape& theShape ) { myShape = theShape; }
+ void setShape( const TopoDS_Shape& theShape );
/* Resets internal data */
void internalReset();
int myDisplayMode;
private:
- SalomeApp_Study* myStudy;
+ SalomeApp_Application* myApp;
};
#endif // __GEOM_DISPLAYER_H