Salome HOME
Selection validators improvements
[modules/shaper.git] / src / XGUI / XGUI_ObjectsBrowser.h
index c1907e34d19c9a33a98dc76571e08fa1c8d9e41d..a1e5c5ef1dd4b5bfbc04684db0424fb5cb07cbef 100644 (file)
@@ -3,13 +3,13 @@
 #define XGUI_ObjectsBrowser_H
 
 #include "XGUI.h"
-#include "XGUI_Constants.h"
+#include <ModuleBase_Definitions.h>
 
 #include <QWidget>
 #include <QTreeView>
 
 class XGUI_DocumentDataModel;
-class QLabel;
+class QLineEdit;
 
 
 class XGUI_DataTree: public QTreeView
@@ -32,6 +32,9 @@ signals:
   //! Emited on context menu request
   void contextMenuRequested(QContextMenuEvent* theEvent);
 
+protected slots:
+  virtual void commitData(QWidget* theEditor);
+
 protected:
   virtual void mouseDoubleClickEvent(QMouseEvent* theEvent);
   virtual void contextMenuEvent(QContextMenuEvent* theEvent);
@@ -63,6 +66,8 @@ public:
   //! Returns list of currently selected features
   QFeatureList selectedFeatures() const { return myFeaturesList; }
 
+  void setFeaturesSelected(const QFeatureList& theFeatures);
+
   //! Returns currently selected indexes
   QModelIndexList selectedIndexes() const { return myTreeView->selectionModel()->selectedIndexes(); }
 
@@ -70,7 +75,9 @@ public:
   XGUI_DataTree* treeView() const { return myTreeView; }
 
   //! Activates currently selected part. Signal activePartChanged will not be sent
-  void activateCurrentPart(bool toActivate);
+  void activatePart(const FeaturePtr& thePart);
+
+  void rebuildDataTree();
 
 signals:
   //! Emited when selection is changed
@@ -90,11 +97,18 @@ private slots:
   void onContextMenuRequested(QContextMenuEvent* theEvent);
   void onLabelContextMenuRequested(const QPoint& thePnt);
 
+  //! Called on Edit command request
+  void onEditItem();
+
+  void onSelectionChanged();
+
 private:
+  void closeDocNameEditing(bool toSave);
+
   //! Internal model
   XGUI_DocumentDataModel* myDocModel;
 
-  QLabel* myActiveDocLbl;
+  QLineEdit* myActiveDocLbl;
   XGUI_DataTree* myTreeView;
 
   QFeatureList myFeaturesList;