Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Simplified calculation of fly out distance and creation of constraints limited only...
[modules/shaper.git]
/
src
/
XGUI
/
XGUI_ObjectsBrowser.h
diff --git
a/src/XGUI/XGUI_ObjectsBrowser.h
b/src/XGUI/XGUI_ObjectsBrowser.h
index 169615c3d88c2e4ff3fa9cca619c1686c4346238..d92788abecde6f02730041ba7202c3690b3c1b5b 100644
(file)
--- a/
src/XGUI/XGUI_ObjectsBrowser.h
+++ b/
src/XGUI/XGUI_ObjectsBrowser.h
@@
-14,6
+14,9
@@
class ModuleBase_IDocumentDataModel;
class QLineEdit;
class ModuleBase_IDocumentDataModel;
class QLineEdit;
+class XGUI_DataModel;
+
+//#define ModuleDataModel
/**
* \ingroup GUI
/**
* \ingroup GUI
@@
-44,6
+47,8
@@
public slots:
/// Commit modified data (used for renaming of objects)
virtual void commitData(QWidget* theEditor);
/// Commit modified data (used for renaming of objects)
virtual void commitData(QWidget* theEditor);
+ void onDoubleClick(const QModelIndex&);
+
protected:
/// Redefinition of virtual method
virtual void contextMenuEvent(QContextMenuEvent* theEvent);
protected:
/// Redefinition of virtual method
virtual void contextMenuEvent(QContextMenuEvent* theEvent);
@@
-67,16
+72,21
@@
Q_OBJECT
virtual ~XGUI_ObjectsBrowser();
//! Returns Model which provides access to data objects
virtual ~XGUI_ObjectsBrowser();
//! Returns Model which provides access to data objects
+#ifdef ModuleDataModel
ModuleBase_IDocumentDataModel* dataModel() const
{
return myDocModel;
}
ModuleBase_IDocumentDataModel* dataModel() const
{
return myDocModel;
}
-
- //! Returns list of currently selected objects
- QObjectPtrList selectedObjects() const
+#else
+ XGUI_DataModel* dataModel() const
{
{
- return my
SelectedData
;
+ return my
DocModel
;
}
}
+#endif
+
+ //! Returns list of currently selected objects
+ //! \param theIndexes - output list of corresponded indexes (can be NULL)
+ QObjectPtrList selectedObjects(QModelIndexList* theIndexes = 0) const;
/// Set selected list of objects
/// \param theObjects list of objects to select
/// Set selected list of objects
/// \param theObjects list of objects to select
@@
-104,7
+114,13
@@
Q_OBJECT
void clearContent();
/// Set Data Model for the Object Browser
void clearContent();
/// Set Data Model for the Object Browser
+#ifdef ModuleDataModel
void setDataModel(ModuleBase_IDocumentDataModel* theModel);
void setDataModel(ModuleBase_IDocumentDataModel* theModel);
+#endif
+
+public slots:
+ //! Called on Edit command request
+ void onEditItem();
signals:
//! Emited when selection is changed
signals:
//! Emited when selection is changed
@@
-113,6
+129,9
@@
signals:
//! Emited on context menu request
void contextMenuRequested(QContextMenuEvent* theEvent);
//! Emited on context menu request
void contextMenuRequested(QContextMenuEvent* theEvent);
+ //! Segnal is emitted when user cliks by mouse in header label of object browser
+ void headerMouseDblClicked(const QModelIndex&);
+
protected:
/// Redefinition of virtual method
virtual bool eventFilter(QObject* obj, QEvent* theEvent);
protected:
/// Redefinition of virtual method
virtual bool eventFilter(QObject* obj, QEvent* theEvent);
@@
-126,9
+145,6
@@
signals:
/// \param thePnt a position of context menu
void onLabelContextMenuRequested(const QPoint& thePnt);
/// \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);
//! Called when selection in Data Tree is changed
void onSelectionChanged(const QItemSelection& theSelected, const QItemSelection& theDeselected);
@@
-136,12
+152,13
@@
signals:
void closeDocNameEditing(bool toSave);
//! Internal model
void closeDocNameEditing(bool toSave);
//! Internal model
+#ifdef ModuleDataModel
ModuleBase_IDocumentDataModel* myDocModel;
ModuleBase_IDocumentDataModel* myDocModel;
-
+#else
+ XGUI_DataModel* myDocModel;
+#endif
QLineEdit* myActiveDocLbl;
XGUI_DataTree* myTreeView;
QLineEdit* myActiveDocLbl;
XGUI_DataTree* myTreeView;
-
- QObjectPtrList mySelectedData;
};
#endif
};
#endif