mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0029674: Improvements in Inspector tool
- preferences for dock windows geometry, tree view columns and current view projection; - ViewControl package for common functionality between plugins; - processing Location and Orientation for external TopoDS_Shape object - 'F5' key to update content of each plugin - visibility column in tree view (used now only in ShapeView) - properties child item for context (presents tree of current Filters of context)
This commit is contained in:
@@ -51,8 +51,8 @@ public:
|
||||
|
||||
//! Initialize the model by the given context
|
||||
//! \param theContext viewer context
|
||||
Standard_EXPORT const Handle(AIS_InteractiveContext)& GetContext() const;
|
||||
|
||||
Standard_EXPORT Handle(AIS_InteractiveContext) GetContext() const;
|
||||
|
||||
//! Initialize the model by the given context
|
||||
//! \param theContext viewer context
|
||||
Standard_EXPORT void SetContext (const Handle(AIS_InteractiveContext)& theContext);
|
||||
@@ -70,29 +70,24 @@ public:
|
||||
//! Returns root item by column
|
||||
//! \param theColumn an index of the column
|
||||
//! \return root item instance
|
||||
Standard_EXPORT virtual TreeModel_ItemBasePtr RootItem (const int theColumn) const Standard_OVERRIDE
|
||||
virtual TreeModel_ItemBasePtr RootItem (const int theColumn) const Standard_OVERRIDE
|
||||
{ return myRootItems[theColumn]; }
|
||||
|
||||
//! Returns count of columns in the model
|
||||
//! \param theParent an index of the parent item
|
||||
//! \return integer value
|
||||
Standard_EXPORT virtual int columnCount (const QModelIndex& theParent = QModelIndex()) const Standard_OVERRIDE
|
||||
{ (void)theParent; return 9; }
|
||||
|
||||
//! Returns the header data for the given role and section in the header with the specified orientation.
|
||||
//! \param theSection the header section. For horizontal headers - column number, for vertical headers - row number.
|
||||
//! \param theOrientation a header orientation
|
||||
//! \param theRole a data role
|
||||
//! \return the header data
|
||||
Standard_EXPORT virtual QVariant headerData (int theSection, Qt::Orientation theOrientation,
|
||||
int theRole = Qt::DisplayRole ) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns select owners for tree view selected items
|
||||
//! \param theSelectionModel a selection model
|
||||
//! \param theOwners an output list of owners
|
||||
Standard_EXPORT static void GetSelectedOwners (QItemSelectionModel* theSelectionModel,
|
||||
NCollection_List<Handle(SelectBasics_EntityOwner)>& theOwners);
|
||||
|
||||
//! Updates tree model
|
||||
Standard_EXPORT void UpdateTreeModel();
|
||||
|
||||
protected:
|
||||
|
||||
//! Creates root item
|
||||
//! \param theColumnId index of a column
|
||||
virtual void createRootItem (const int theColumnId) Standard_OVERRIDE;
|
||||
|
||||
private:
|
||||
|
||||
QMap<int, TreeModel_ItemBasePtr> myRootItems; //!< container of root items, for each column own root item
|
||||
|
Reference in New Issue
Block a user