]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Return name of root object as moduleName
authornds <nds@opencascade.com>
Thu, 3 Nov 2005 07:14:34 +0000 (07:14 +0000)
committernds <nds@opencascade.com>
Thu, 3 Nov 2005 07:14:34 +0000 (07:14 +0000)
src/CAM/CAM_RootObject.cxx
src/CAM/CAM_RootObject.h

index e248271676b3df49f3d55aabac8f8b1ae20a27f3..d915a7c1d3b26f2546b81a5f4cc311ea16bf241b 100755 (executable)
@@ -1,6 +1,7 @@
 #include "CAM_RootObject.h"
 
 #include "CAM_DataModel.h"
+#include "CAM_Module.h"
 
 /*!Constructor. Initialize by \a parent.
  * Set data model to 0.
@@ -26,6 +27,17 @@ CAM_RootObject::~CAM_RootObject()
 {
 }
 
+/*!
+    Returns module name
+*/
+QString CAM_RootObject::name() const
+{
+  QString aName = "";
+  if (myDataModel)
+    aName = myDataModel->module()->moduleName();
+  return aName;
+}
+
 /*!Get data model
  *\retval const CAM_DataModel pointer to data model.
  */
index dee53d7ba6efefb616dd77e1859babdb8854b6c6..7e4e2d4b8a68768ae48307806f53ace8c8a91ef9 100755 (executable)
@@ -18,6 +18,8 @@ public:
   CAM_RootObject( CAM_DataModel*, SUIT_DataObject* = 0 );
   virtual ~CAM_RootObject();
 
+  virtual QString        name() const;
+
   virtual CAM_DataModel* dataModel() const;
   virtual void           setDataModel( CAM_DataModel* );