X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_ObjectsBrowser.h;h=a52c844545999bd6e91a17fa4e8663517c937d01;hb=be7d83df0061448606f62fcb370f59e2617557d1;hp=0760242bd99033635f2fef12a25fb6aea9f8ee10;hpb=6d9f778b60206147106c918852c4a9595898f892;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_ObjectsBrowser.h b/src/XGUI/XGUI_ObjectsBrowser.h index 0760242bd..a52c84454 100644 --- a/src/XGUI/XGUI_ObjectsBrowser.h +++ b/src/XGUI/XGUI_ObjectsBrowser.h @@ -1,3 +1,5 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D --> + #ifndef XGUI_ObjectsBrowser_H #define XGUI_ObjectsBrowser_H @@ -21,7 +23,7 @@ Q_OBJECT virtual ~XGUI_DataTree(); //! Returns list of currently selected objects - QList selectedObjects() const + QObjectPtrList selectedObjects() const { return mySelectedData; } @@ -36,6 +38,9 @@ signals: //! Emited on context menu request void contextMenuRequested(QContextMenuEvent* theEvent); +public slots: + virtual void clear(); + protected slots: virtual void commitData(QWidget* theEditor); @@ -49,7 +54,7 @@ signals: private: //! List of currently selected data - QList mySelectedData; + QObjectPtrList mySelectedData; }; /**\class XGUI_ObjectsBrowser @@ -70,12 +75,12 @@ Q_OBJECT } //! Returns list of currently selected objects - QList selectedObjects() const + QObjectPtrList selectedObjects() const { return myObjectsList; } - void setObjectsSelected(const QList& theObjects); + void setObjectsSelected(const QObjectPtrList& theObjects); //! Returns currently selected indexes QModelIndexList selectedIndexes() const @@ -94,7 +99,10 @@ Q_OBJECT void rebuildDataTree(); - void processEvent(const Events_Message* theMessage); + void processEvent(const std::shared_ptr& theMessage); + + // Resets the object browser into initial state + void clearContent(); signals: //! Emited when selection is changed @@ -128,7 +136,7 @@ signals: QLineEdit* myActiveDocLbl; XGUI_DataTree* myTreeView; - QList myObjectsList; + QObjectPtrList myObjectsList; }; #endif