Salome HOME
Issue #856: "show parent feature" should be available only on result bodies
[modules/shaper.git] / src / XGUI / XGUI_ObjectsBrowser.h
index 09f9dc220764d1bede32452e75d40cd26c81eccb..5352ffe585f454ba50c403d626a1cfa9a63dc9ac 100644 (file)
@@ -14,6 +14,9 @@
 
 class ModuleBase_IDocumentDataModel;
 class QLineEdit;
+class XGUI_DataModel;
+
+#define ModuleDataModel
 
 /**
 * \ingroup GUI
@@ -44,8 +47,7 @@ public slots:
   /// Commit modified data (used for renaming of objects)
   virtual void commitData(QWidget* theEditor);
 
-  /// Returns true if theObject can be renamed in theName
-  bool canRename(const ObjectPtr& theObject, const QString& theName);
+  void onDoubleClick(const QModelIndex&);
 
  protected:
    /// Redefinition of virtual method
@@ -70,10 +72,17 @@ Q_OBJECT
   virtual ~XGUI_ObjectsBrowser();
 
   //! Returns Model which provides access to data objects
+#ifdef ModuleDataModel
   ModuleBase_IDocumentDataModel* dataModel() const
   {
     return myDocModel;
   }
+#else
+  XGUI_DataModel* dataModel() const
+  {
+    return myDocModel;
+  }
+#endif
 
   //! Returns list of currently selected objects
   //! \param theIndexes - output list of corresponded indexes (can be NULL)
@@ -140,8 +149,11 @@ signals:
   void closeDocNameEditing(bool toSave);
 
   //! Internal model
+#ifdef ModuleDataModel
   ModuleBase_IDocumentDataModel* myDocModel;
-
+#else
+  XGUI_DataModel* myDocModel;
+#endif
   QLineEdit* myActiveDocLbl;
   XGUI_DataTree* myTreeView;
 };