Salome HOME
Harmonisation of GUI.
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_AbstractDisplayer.h
index ec3f9ed4039579538c929f75fc5a1d050089df80..6438d3dd5288a2dd08f9def1be73d836cb8e0038 100644 (file)
@@ -26,6 +26,7 @@
 #include <HYDROData_Entity.h>
 
 class HYDROGUI_Module;
+class SUIT_ViewManager;
 
 /**
  * \class HYDROGUI_DataModel
@@ -46,6 +47,20 @@ public:
   virtual ~HYDROGUI_AbstractDisplayer();
 
 public:
+  /**
+   * \brief Check if this displayer is applicable to the given view manager.
+   * The view manager method getType is used.
+   * \param theViewerId viewer identifier
+   */
+  virtual bool     IsApplicable( const int theViewerId ) const;
+
+  /**
+   * \brief Check if this displayer is applicable to the given view manager.
+   * The view manager method getType is used.
+   * \param theViewMgr the view manager to check
+   */
+  virtual bool     IsApplicable( const SUIT_ViewManager* theViewMgr ) const;
+
   /**
    * \brief Update all objects in the viewer.
    * \param theViewerId viewer identifier
@@ -65,6 +80,11 @@ public:
   virtual void     SetToUpdate( const HYDROData_SequenceOfObjects& theObjs,
                                 const int theViewerId ) = 0;
 
+  /**
+   * \brief Get the applicable viewer type.
+   */
+  virtual QString  GetType() const = 0;
+
 protected:
   /**
    * \brief Update and display all objects in the viewer.
@@ -113,6 +133,7 @@ protected:
                             const bool theIsForced,
                             const bool theDoFitAll ) = 0;
 
+protected:
   /**
    * \brief Purge all invalid objects in the viewer.
    * \param theViewerId viewer identifier