X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_ObjectsBrowser.h;h=a1e5c5ef1dd4b5bfbc04684db0424fb5cb07cbef;hb=47c18d4de2719126f6b045b5c37525cd8f170aa1;hp=18c03d2ccb7d3cd241c57738b876d84655d55f52;hpb=c23358fff93a754447d421ca606ae6f570e5c7a5;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_ObjectsBrowser.h b/src/XGUI/XGUI_ObjectsBrowser.h index 18c03d2cc..a1e5c5ef1 100644 --- a/src/XGUI/XGUI_ObjectsBrowser.h +++ b/src/XGUI/XGUI_ObjectsBrowser.h @@ -3,13 +3,13 @@ #define XGUI_ObjectsBrowser_H #include "XGUI.h" -#include "XGUI_Constants.h" +#include #include #include 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); @@ -61,7 +64,9 @@ public: XGUI_DocumentDataModel* dataModel() const { return myDocModel; } //! Returns list of currently selected features - QFeatureList selectedFeatures() const { return myTreeView->selectedFeatures(); } + 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 @@ -87,13 +94,24 @@ protected: private slots: void onActivePartChanged(FeaturePtr thePart); + 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; }; #endif \ No newline at end of file