1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +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:
nds
2018-03-23 16:08:11 +03:00
committed by bugmaster
parent 6dfdbb7ab8
commit 6822a3bef1
135 changed files with 4187 additions and 1603 deletions

View File

@@ -35,11 +35,10 @@
class DFBrowser_DumpView;
class DFBrowser_Module;
class DFBrowser_PropertyPanel;
class DFBrowser_Shortcut;
class DFBrowser_Thread;
class DFBrowser_TreeLevelLine;
class TreeModel_MessageDialog;
class ViewControl_MessageDialog;
class View_ToolBar;
class View_Window;
@@ -73,6 +72,18 @@ public:
//! \param theParameters a parameters container
void SetParameters (const Handle(TInspectorAPI_PluginParameters)& theParameters) { myParameters = theParameters; }
//! Provide container for actions available in inspector on general level
//! \param theMenu if Qt implementation, it is QMenu object
Standard_EXPORT virtual void FillActionsMenu (void* theMenu);
//! Returns plugin preferences: dock widgets state, tree view columns.
//! \param theItem container of preference elements
Standard_EXPORT void GetPreferences (TInspectorAPI_PreferencesDataMap& theItem);
//! Applies plugin preferences
//! \param theItem container of preference elements
Standard_EXPORT void SetPreferences (const TInspectorAPI_PreferencesDataMap& theItem);
//! Applyes parameters to Init controls, opens files if there are in parameters, updates OCAF tree view model
Standard_EXPORT void UpdateContent();
@@ -101,22 +112,10 @@ public:
//! Returns tree level line control
DFBrowser_TreeLevelLine* GetTreeLevelLine() const { return myTreeLevelLine; }
//! Change palette of the widget to have white foreground
//! \param theControl a widget to be modified
Standard_EXPORT static void SetWhiteBackground (QWidget* theControl);
//! Returns temporary directory defined by environment variables TEMP or TMP
//! \return string value
Standard_EXPORT static TCollection_AsciiString TmpDirectory();
//! Returns single selected item in the cell of given orientation. If the orientation is Horizontal,
//! in the cell id colum, one row should be selected.
//! \param theIndices a container of selected indices
//! \param theCellId column index if orientation is horizontal, row index otherwise
//! \param theOrientation an orientation to apply the cell index
//! \return model index from the list
Standard_EXPORT static QModelIndex SingleSelected (const QModelIndexList& theIndices, const int theCellId,
const Qt::Orientation theOrientation = Qt::Horizontal);
private slots:
//! Cleans history in tree level line, clears cache of thread processing, starts threads for application
@@ -191,12 +190,6 @@ private:
//! \param theIndices a container of OCAF tree view model indices
void highlightIndices (const QModelIndexList& theIndices);
//! Creates an action with the given text connected to the slot
//! \param theText an action text value
//! \param theSlot a listener of triggered signal of the new action
//! \return a new action
QAction* createAction (const QString& theText, const char* theSlot);
//! Returns candidate to be the window title. It is either name of opened STEP file or the application path
//! \return string value
QString getWindowTitle() const;
@@ -231,8 +224,7 @@ private:
View_Window* myViewWindow; //!< V3d view to visualize presentations/references if it can be build for a selected item
DFBrowser_DumpView* myDumpView; //!< Text editor where "Dump" method output is shown
DFBrowser_Thread* myThread; //!< Threads manipulator, starting thread items, listens finalizing
DFBrowser_Shortcut* myShortcut; //!< Short cut processor, F5 - updates OCAF view model content
TreeModel_MessageDialog* myExportToShapeViewDialog; //!< dialog about exporting TopoDS_Shape to ShapeView plugin
ViewControl_MessageDialog* myExportToShapeViewDialog; //!< dialog about exporting TopoDS_Shape to ShapeView plugin
Handle(TInspectorAPI_PluginParameters) myParameters; //!< contains application, context, files that should be opened
};