- XGUI_DocumentDataModel* dataModel() const { return myDocModel; }
-
- //! Returns list of currently selected features
- QFeatureList selectedFeatures() const { return myFeaturesList; }
+#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)
+ QObjectPtrList selectedObjects(QModelIndexList* theIndexes = 0) const;
+
+ /// Set selected list of objects
+ /// \param theObjects list of objects to select
+ void setObjectsSelected(const QObjectPtrList& theObjects);