Salome HOME
Join modifications from branch OCC_debug_for_3_2_0b1
[modules/superv.git] / src / SUPERVGUI / SUPERVGUI.h
index d35d4ac1b1af337533619679416c9106362e83bf..803043e2b0b6c48e1a43200a1b047614825a1916 100644 (file)
@@ -36,6 +36,7 @@
 #include "SUPERVGUI_Main.h"
 
 #include "SalomeApp_Module.h"
+#include "SALOMEDSClient.hxx"
 
 class SUIT_Study;
 
@@ -96,7 +97,7 @@ class SUPERVGUI: public SalomeApp_Module {
        theIsOwner = true if Selected object belongs to Suipervision.
        theIsDataflow = true if Selected object is Dataflow
     */
-    void whatIsSelected(const Handle(SALOME_InteractiveObject)& theObj, bool& theIsOwner, bool& theIsDataflow);
+    void whatIsSelected(const _PTR(SObject)& theObj, bool& theIsOwner, bool& theIsDataflow);
 
     /* asv : bug [VSR Bugs and Improvements in Supervisor] 1.8 : when exporting a file, 
        a backup copy of an existing file must be created (in case Export fails..)
@@ -108,6 +109,26 @@ class SUPERVGUI: public SalomeApp_Module {
 
     virtual void windows( QMap<int, int>& ) const;
 
+    QMap<QString, QString> getInterfaceNameMap() const;
+
+    /*!
+     * \brief The method nullify myInitalViewFrame variable
+     * to avoid using this view frame once more, it is using
+     * after add any node into first new dataflow in study.
+     */
+    void nullifyInitialVF() { if ( myInitialViewFrame ) myInitialViewFrame = 0; }
+
+    // mkr : IPAL10825
+    QColor getIVFBackgroundColor() { return myIVFBackgroundColor; }
+    void   setIVFBackgroundColor( QColor theColor ) { if ( myInitialViewFrame ) myIVFBackgroundColor = theColor; }
+
+    // mkr : PAL7037
+    /*!
+     * \brief The method update name of the given dataflow, if this dataflow is in study.
+     * Returns true if update was done.
+     */
+    bool updateDataFlowSOName( SUPERV::Graph_ptr theDataflow );
+
   signals:
     void KillMainThread(bool theValue);
 
@@ -120,11 +141,12 @@ class SUPERVGUI: public SalomeApp_Module {
     void OnGUIEvent();
 
   public slots:
-    virtual void           activateModule( SUIT_Study* );
-    virtual void           deactivateModule( SUIT_Study* );
+    virtual bool           activateModule( SUIT_Study* );
+    virtual bool           deactivateModule( SUIT_Study* );
       
   protected:
     virtual CAM_DataModel* createDataModel();
+    virtual LightApp_Selection* createSelection() const;
 
   private:
     void loadEngine(SALOME_NamingService* namingService);
@@ -134,11 +156,13 @@ class SUPERVGUI: public SalomeApp_Module {
     // method called from importDataflow(), modifyDataflow(), newDataflow() with
     // different modes.  The behavior of the function is very similar in all 3 cases, 
     // but some differences still exist.  These differences are implemented using NEW_DF_MODE param.
-    bool createDataflow( const NEW_DF_MODE f );  
+    bool createDataflow( const NEW_DF_MODE f, bool theInitialDF = false );  
 
     void createSupervAction( const int id, const QString& po_id, const QString& icon_id = QString(""), 
                             const int key = 0, const bool toggle = false );
 
+    void fillInterfaceNameMap();
+
     static int             factory;
     SUIT_Study*            study;
     SUPERV_Engine          engine;
@@ -148,6 +172,12 @@ class SUPERVGUI: public SalomeApp_Module {
 
     SUPERVGUI_Main*        main;  // active main    
     QPtrList<SUPERVGUI_Main> myGraphList;
+    QMap<QString, QString> myInterfaceNameMap;
+
+    bool                   myFirstActivation;
+    bool                   myAllGraphsClosed;
+    SUPERVGraph_ViewFrame* myInitialViewFrame;
+    QColor                 myIVFBackgroundColor; // mkr : IPAL10825
 };
 
 #endif