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:
@@ -15,18 +15,6 @@
|
||||
|
||||
#include <inspector/ShapeView_Communicator.hxx>
|
||||
|
||||
#include <inspector/ShapeView_Window.hxx>
|
||||
#include <OSD_Directory.hxx>
|
||||
#include <OSD_Environment.hxx>
|
||||
#include <OSD_Path.hxx>
|
||||
#include <OSD_Protection.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QApplication>
|
||||
#include <QMainWindow>
|
||||
#include <QDir>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : CreateCommunicator
|
||||
// purpose : Creates a communicator by the library loading
|
||||
@@ -35,52 +23,3 @@ Standard_EXPORTEXTERNC TInspectorAPI_Communicator* CreateCommunicator()
|
||||
{
|
||||
return new ShapeView_Communicator();
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : Constructor
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
ShapeView_Communicator::ShapeView_Communicator()
|
||||
: TInspectorAPI_Communicator(), myWindow (0)
|
||||
{
|
||||
// main window creation
|
||||
TCollection_AsciiString aTmpDir;
|
||||
#ifdef _WIN32
|
||||
OSD_Environment anEnvironment ("TEMP");
|
||||
aTmpDir = anEnvironment.Value();
|
||||
if (aTmpDir.IsEmpty() )
|
||||
{
|
||||
anEnvironment.SetName("TMP");
|
||||
aTmpDir = anEnvironment.Value();
|
||||
if (aTmpDir.IsEmpty())
|
||||
aTmpDir = "C:\\";
|
||||
}
|
||||
if (!aTmpDir.EndsWith ("\\"))
|
||||
aTmpDir += "\\";
|
||||
OSD_Path aTmpPath (aTmpDir);
|
||||
OSD_Directory aTmpDirectory;
|
||||
#else
|
||||
OSD_Directory aTmpDirectory = OSD_Directory::BuildTemporary();
|
||||
OSD_Path aTmpPath;
|
||||
aTmpDirectory.Path (aTmpPath);
|
||||
#endif
|
||||
aTmpPath.DownTrek ("ShapeView");
|
||||
aTmpDirectory.SetPath (aTmpPath);
|
||||
if (!aTmpDirectory.Exists())
|
||||
aTmpDirectory.Build (OSD_Protection());
|
||||
|
||||
aTmpDirectory.Path (aTmpPath);
|
||||
TCollection_AsciiString aTmpDirectoryName;
|
||||
aTmpPath.SystemName(aTmpDirectoryName);
|
||||
myWindow = new ShapeView_Window (0, aTmpDirectoryName);
|
||||
}
|
||||
|
||||
ShapeView_Communicator::~ShapeView_Communicator()
|
||||
{
|
||||
myWindow->RemoveAllShapes(); // removes all cached shapes and files in temporary directory
|
||||
OSD_Path aPath (myWindow->GetTemporaryDirectory());
|
||||
OSD_Directory aTmpDirectory (aPath);
|
||||
// temporary directory can be removed only if is empty
|
||||
aTmpDirectory.Remove();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user