X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_ObjectsBrowser.h;h=53e9a5fb5cfb9df7dd99bb78850a275a43131cb7;hb=327f5bbd915fb32d21f2e524a8d97536e0e5dd4b;hp=5352ffe585f454ba50c403d626a1cfa9a63dc9ac;hpb=82d3fff7d0ed2c089da5aa6b106789be076081f3;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_ObjectsBrowser.h b/src/XGUI/XGUI_ObjectsBrowser.h index 5352ffe58..53e9a5fb5 100644 --- a/src/XGUI/XGUI_ObjectsBrowser.h +++ b/src/XGUI/XGUI_ObjectsBrowser.h @@ -16,8 +16,6 @@ class ModuleBase_IDocumentDataModel; class QLineEdit; class XGUI_DataModel; -#define ModuleDataModel - /** * \ingroup GUI * Implementation of Data Tree object for Object Browser @@ -33,7 +31,7 @@ Q_OBJECT virtual ~XGUI_DataTree(); /// Returns current data model - ModuleBase_IDocumentDataModel* dataModel() const; + XGUI_DataModel* dataModel() const; signals: //! Emited on context menu request @@ -47,6 +45,7 @@ public slots: /// Commit modified data (used for renaming of objects) virtual void commitData(QWidget* theEditor); + /// A slot which is called on mouse double click void onDoubleClick(const QModelIndex&); protected: @@ -72,17 +71,10 @@ 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) @@ -113,8 +105,9 @@ Q_OBJECT /// Resets the object browser into initial state void clearContent(); - /// Set Data Model for the Object Browser - void setDataModel(ModuleBase_IDocumentDataModel* theModel); +public slots: + //! Called on Edit command request + void onEditItem(); signals: //! Emited when selection is changed @@ -139,9 +132,6 @@ signals: /// \param thePnt a position of context menu void onLabelContextMenuRequested(const QPoint& thePnt); - //! Called on Edit command request - void onEditItem(); - //! Called when selection in Data Tree is changed void onSelectionChanged(const QItemSelection& theSelected, const QItemSelection& theDeselected); @@ -149,11 +139,7 @@ signals: void closeDocNameEditing(bool toSave); //! Internal model -#ifdef ModuleDataModel - ModuleBase_IDocumentDataModel* myDocModel; -#else XGUI_DataModel* myDocModel; -#endif QLineEdit* myActiveDocLbl; XGUI_DataTree* myTreeView; };