X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_ObjectsBrowser.h;h=53e9a5fb5cfb9df7dd99bb78850a275a43131cb7;hb=83a851858962e7cb250b2086ca43c8f0b2eaa787;hp=a59ec8bd313a8ba99e5b299d8f6b85988a5a3919;hpb=3e3fc52de000b4d8e51fdcffe7f72f82237833ad;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_ObjectsBrowser.h b/src/XGUI/XGUI_ObjectsBrowser.h index a59ec8bd3..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,8 +45,8 @@ public slots: /// Commit modified data (used for renaming of objects) virtual void commitData(QWidget* theEditor); - /// Returns true if theObject can be renamed in theName - bool canRename(const ObjectPtr& theObject, const QString& theName); + /// A slot which is called on mouse double click + void onDoubleClick(const QModelIndex&); protected: /// Redefinition of virtual method @@ -73,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) @@ -114,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 @@ -140,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); @@ -150,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; };