]> OCCT Git - occt.git/commitdiff
0031351: Inspectors - thread in DFBrowser removing
authorsshutina <sshutina@opencascade.com>
Wed, 1 Sep 2021 12:43:40 +0000 (15:43 +0300)
committerbugmaster <bugmaster@opencascade.com>
Fri, 3 Sep 2021 17:19:52 +0000 (20:19 +0300)
 - DFBrowser_Thread and connected are removed from the package as obsolete

tools/DFBrowser/DFBrowser_Thread.cxx [deleted file]
tools/DFBrowser/DFBrowser_Thread.hxx [deleted file]
tools/DFBrowser/DFBrowser_ThreadItem.hxx [deleted file]
tools/DFBrowser/DFBrowser_ThreadItemSearch.cxx [deleted file]
tools/DFBrowser/DFBrowser_ThreadItemSearch.hxx [deleted file]
tools/DFBrowser/DFBrowser_Window.cxx
tools/DFBrowser/DFBrowser_Window.hxx
tools/DFBrowser/FILES

diff --git a/tools/DFBrowser/DFBrowser_Thread.cxx b/tools/DFBrowser/DFBrowser_Thread.cxx
deleted file mode 100644 (file)
index 75996be..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowser_Thread.hxx>
-#include <inspector/DFBrowser_ThreadItemSearch.hxx>
-#include <inspector/DFBrowser_TreeLevelLine.hxx>
-#include <inspector/DFBrowser_SearchLine.hxx>
-
-#include <inspector/DFBrowser_Window.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QThread>
-#include <Standard_WarningsRestore.hxx>
-
-//! \class DFBrowser_QThread
-//! Internal class to cover QThread in order to process ThreadItem.
-class DFBrowser_QThread : public QThread
-{
-public:
-
-  //! Constructor
-  DFBrowser_QThread (QObject* theParent) : QThread (theParent), myItem (0) {}
-
-  //! Destructor
-  virtual ~DFBrowser_QThread() {}
-
-  //! Sets thread item to be processed
-  //! \param theItem a thread item
-  void setItem (DFBrowser_ThreadItem* theItem) { myItem = theItem; }
-
-  //! Returns the current processing thread item
-  DFBrowser_ThreadItem* getItem() const { return myItem; }
-
-protected:
-
-  //! Starts thread item
-  virtual void run() Standard_OVERRIDE
-  {
-    if (myItem)
-      myItem->Run();
-  }
-
-private:
-
-  DFBrowser_ThreadItem* myItem;
-};
-
-// =======================================================================
-// function : Constructor
-// purpose :
-// =======================================================================
-DFBrowser_Thread::DFBrowser_Thread (DFBrowser_Window* theWindow)
-: QObject (theWindow), myPostponedItem (0), myIsFinishProcessing (false),
-  myIsProcessPostponed (Standard_False)
-{
-  DFBrowser_SearchLine* aSearchLine = theWindow->GetTreeLevelLine()->GetSearchLine();
-  myItems.append (new DFBrowser_ThreadItemSearch(aSearchLine));
-}
-
-// =======================================================================
-// function : ProcessApplication
-// purpose :
-// =======================================================================
-void DFBrowser_Thread::ProcessApplication()
-{
-  if (!myStartedThreads.empty())
-  {
-    myIsProcessPostponed = Standard_True;
-    return;
-  }
-  for (int anItemId = 0, aSize = myItems.size(); anItemId < aSize; anItemId++)
-    startThread (myItems[anItemId]);
-}
-
-// =======================================================================
-// function : startThread
-// purpose :
-// =======================================================================
-void DFBrowser_Thread::startThread (DFBrowser_ThreadItem* theItem)
-{
-  DFBrowser_QThread* aThread = new DFBrowser_QThread (this);
-  aThread->setItem (theItem);
-  aThread->start();
-  connect (aThread, SIGNAL (finished()), this, SLOT (onFinished()), Qt::QueuedConnection);
-  myStartedThreads.append (aThread);
-}
-
-// =======================================================================
-// function : TerminateThread
-// purpose :
-// =======================================================================
-void DFBrowser_Thread::TerminateThread()
-{
-  for (int aThreadsId = 0, aCount = myStartedThreads.size(); aThreadsId < aCount; aThreadsId++)
-  {
-    QThread* aThread = myStartedThreads[aThreadsId];
-    if (aThread->isRunning())
-      aThread->terminate();
-  }
-}
-
-// =======================================================================
-// function : onFinished
-// purpose :
-// =======================================================================
-void DFBrowser_Thread::onFinished()
-{
-  DFBrowser_QThread* aThread = (DFBrowser_QThread*)(sender());
-  if (myIsFinishProcessing)
-  {
-    // if thread send signal when other finished signal is processed
-    if (aThread)
-      myPostponedItem = aThread->getItem();
-    return;
-  }
-
-  myIsFinishProcessing = true;
-  if (aThread)
-  {
-    myStartedThreads.removeAll (aThread);
-    DFBrowser_ThreadItem* anItem = aThread->getItem();
-    if (anItem)
-      anItem->ApplyValues();
-  }
-
-  myIsFinishProcessing = false;
-  if (myPostponedItem)
-  {
-    myPostponedItem->ApplyValues();
-    myPostponedItem = 0;
-  }
-
-  if (myIsProcessPostponed)
-  {
-    myIsProcessPostponed = Standard_False;
-    ProcessApplication();
-  }
-}
diff --git a/tools/DFBrowser/DFBrowser_Thread.hxx b/tools/DFBrowser/DFBrowser_Thread.hxx
deleted file mode 100644 (file)
index f6e3465..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowser_Thread_H
-#define DFBrowser_Thread_H
-
-#include <Standard.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QList>
-#include <QObject>
-#include <Standard_WarningsRestore.hxx>
-
-class DFBrowser_Module;
-class DFBrowser_ThreadItem;
-class DFBrowser_Window;
-
-class QThread;
-
-//! /class DFBrowser_Thread
-//! Starts algorithm item in a separate thread and perform some functionality by the algorithm(thread) is finished
-class DFBrowser_Thread : public QObject
-{
-  Q_OBJECT
-public:
-
-  //! Constructor
-  Standard_EXPORT DFBrowser_Thread (DFBrowser_Window* theWindow);
-
-  //! Destructor
-  virtual ~DFBrowser_Thread() {}
-
-  //! Starts all candidate thread items
-  Standard_EXPORT void ProcessApplication();
-
-  //! Terminates all started threads.
-  Standard_EXPORT void TerminateThread();
-
-protected:
-
-  //! Creates new Qt thread and starts the item. Connects to finished signal of thread.
-  //! \param theItem a thread item
-  void startThread (DFBrowser_ThreadItem* theItem);
-
-protected slots:
-
-  //! Removes finished thread from the thread items and apply values of this thread
-  //! If this signal is come when another thread is processed, the current thread is stored in a cache and
-  //! is processed after the previous thread is processed.
-  void onFinished();
-
-private:
-
-  QList<DFBrowser_ThreadItem*> myItems; //!< candidates to be processed in a thread
-  QList<QThread*> myStartedThreads; //!< container of started threads
-  DFBrowser_ThreadItem* myPostponedItem; //!< currently processed item in onFinished()
-  bool myIsFinishProcessing; //!< blocking state if onFinished() is started but has not been finished yet
-  Standard_Boolean myIsProcessPostponed; //!< state if process application should be done by finish active thread
-};
-
-
-#endif
diff --git a/tools/DFBrowser/DFBrowser_ThreadItem.hxx b/tools/DFBrowser/DFBrowser_ThreadItem.hxx
deleted file mode 100644 (file)
index c066ca8..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowser_ThreadItem_H
-#define DFBrowser_ThreadItem_H
-
-#include <Standard_Macro.hxx>
-
-//! \class DFBrowser_ThreadItem
-//! An abstract interface for candidates to be processed in a separate thread.
-//! To do this, new thread item should inherit this interface and be started in DFBrowser_Thread.
-class DFBrowser_ThreadItem
-{
-public:
-
-  //! Constructor
-  DFBrowser_ThreadItem() {}
-
-  //! Destructor
-  virtual ~DFBrowser_ThreadItem() {}
-
-  //! Algorithm of this item work. It will be performed only once
-  virtual void Run() = 0;
-
-  //! Applying values accepted by algorithm
-  virtual void ApplyValues() = 0;
-};
-
-
-#endif
diff --git a/tools/DFBrowser/DFBrowser_ThreadItemSearch.cxx b/tools/DFBrowser/DFBrowser_ThreadItemSearch.cxx
deleted file mode 100644 (file)
index 6a605ee..0000000
+++ /dev/null
@@ -1,173 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowser_ThreadItemSearch.hxx>
-
-#include <inspector/DFBrowser_Module.hxx>
-#include <inspector/DFBrowser_Tools.hxx>
-#include <inspector/DFBrowser_TreeModel.hxx>
-#include <inspector/DFBrowser_SearchLine.hxx>
-#include <inspector/DFBrowserPane_Tools.hxx>
-
-#include <TDataStd_Comment.hxx>
-#include <TDataStd_Name.hxx>
-#include <TDataStd_UAttribute.hxx>
-#include <TDF_AttributeIterator.hxx>
-#include <TDF_ChildIterator.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QDir>
-#include <Standard_WarningsRestore.hxx>
-
-// =======================================================================
-// function : Run
-// purpose :
-// =======================================================================
-void DFBrowser_ThreadItemSearch::Run()
-{
-  DFBrowser_TreeModel* aModel = dynamic_cast<DFBrowser_TreeModel*> (mySearchLine->GetModule()->GetOCAFViewModel());
-  Handle(TDocStd_Application) anApplication = aModel->GetTDocStdApplication();
-  if (anApplication.IsNull())
-    return;
-
-  myDocumentValues.clear();
-  myDocumentInfoValues.clear();
-
-  QMap<QString, DFBrowser_SearchItemInfo> anAdditionalValues;
-  QStringList anInfoValues;
-  QStringList aCurrentPath;
-  for (Standard_Integer aDocId = 1, aNbDoc = anApplication->NbDocuments(); aDocId <= aNbDoc; aDocId++)
-  {
-    Handle(TDocStd_Document) aDocument;
-    anApplication->GetDocument (aDocId, aDocument);
-    if (aDocument.IsNull())
-      continue;
-
-    anAdditionalValues.clear();
-    anInfoValues.clear();
-    aCurrentPath.clear();
-    getLabelLines (aDocument->Main().Root(), aCurrentPath, anAdditionalValues, anInfoValues);
-
-    myDocumentValues[aDocId] = anAdditionalValues;
-    myDocumentInfoValues[aDocId] = anInfoValues;
-  }
-}
-
-// =======================================================================
-// function : ApplyValues
-// purpose :
-// =======================================================================
-void DFBrowser_ThreadItemSearch::ApplyValues()
-{
-  mySearchLine->SetValues (myDocumentValues, myDocumentInfoValues);
-}
-
-// =======================================================================
-// function : ClearValues
-// purpose :
-// =======================================================================
-void DFBrowser_ThreadItemSearch::ClearValues (DFBrowser_SearchLine* theSearchLine)
-{
-  theSearchLine->ClearValues();
-}
-
-// =======================================================================
-// function : getLabelLines
-// purpose :
-// =======================================================================
-void DFBrowser_ThreadItemSearch::getLabelLines (const TDF_Label& theLabel, QStringList& theCurrentPath,
-                                                QMap<QString, DFBrowser_SearchItemInfo >& theValues,
-                                                QStringList& theInfoValues)
-{
-  addLabel (theLabel, theCurrentPath, theValues, theInfoValues);
-  theCurrentPath.append (DFBrowserPane_Tools::GetEntry (theLabel).ToCString());
-
-  int anId = 0;
-  for (TDF_AttributeIterator anAttrIt (theLabel); anAttrIt.More(); anAttrIt.Next(), anId++)
-    addAttribute(anAttrIt.Value(), theCurrentPath, theValues, theInfoValues);
-
-  for (TDF_ChildIterator aChildIt (theLabel); aChildIt.More(); aChildIt.Next())
-    getLabelLines(aChildIt.Value(), theCurrentPath, theValues, theInfoValues);
-
-  theCurrentPath.removeLast();
-}
-
-// =======================================================================
-// function : addLabel
-// purpose :
-// =======================================================================
-void DFBrowser_ThreadItemSearch::addLabel (const TDF_Label& theLabel, const QStringList& theCurrentPath,
-                                           QMap<QString, DFBrowser_SearchItemInfo>& theValues,
-                                           QStringList& theInfoValues)
-{
-  QString anEntry = DFBrowserPane_Tools::GetEntry (theLabel).ToCString();
-  if (!theValues.contains (anEntry))
-  {
-    theInfoValues.append (anEntry);
-    theValues[anEntry] = DFBrowser_SearchItemInfo ("40x40_label_icon", anEntry, theCurrentPath, QDir::separator());
-  }
-}
-
-// =======================================================================
-// function : addAttribute
-// purpose :
-// =======================================================================
-void DFBrowser_ThreadItemSearch::addAttribute (const Handle(TDF_Attribute)& theAttribute,
-                                               const QStringList& theCurrentPath,
-                                               QMap<QString, DFBrowser_SearchItemInfo >& theValues,
-                                               QStringList& theInfoValues)
-{
-  Standard_CString anAttributeKind = theAttribute->DynamicType()->Name();
-  // add element of attribute kind
-  QString anAttributeName = QString ("%1%2%3").arg (anAttributeKind)
-                            .arg (DFBrowser_SearchLineModel::SplitSeparator())
-                            .arg (DFBrowserPane_Tools::GetEntry (theAttribute->Label()).ToCString());
-
-  if (!theInfoValues.contains (anAttributeName))
-  {
-    theInfoValues.append (anAttributeName);
-    theValues[anAttributeName] = DFBrowser_SearchItemInfo (QVariant(), anAttributeName, theCurrentPath,
-                                                           QDir::separator());
-  }
-
-  // add element of attribute value, e.g. Name or Comment string
-  QString anAttributeValue;
-  if (anAttributeKind == STANDARD_TYPE (TDataStd_Name)->Name())
-  {
-    Handle(TDataStd_Name) anAttribute = Handle(TDataStd_Name)::DownCast (theAttribute);
-    anAttributeValue = DFBrowserPane_Tools::ToString (anAttribute->Get());
-  }
-  else if (anAttributeKind == STANDARD_TYPE (TDataStd_Comment)->Name())
-  {
-    Handle(TDataStd_Comment) anAttribute = Handle(TDataStd_Comment)::DownCast (theAttribute);
-    anAttributeValue = DFBrowserPane_Tools::ToString (anAttribute->Get());
-  }
-  else
-    return;
-
-  if (anAttributeValue == "")
-    return;
-
-  // using attribute value in the name
-  QString anAttributeValueExt = QString ("%1%2%3").arg (anAttributeValue)
-                                          .arg (DFBrowser_SearchLineModel::SplitSeparator())
-                                          .arg (DFBrowserPane_Tools::GetEntry (theAttribute->Label()).ToCString());
-  if (!theInfoValues.contains (anAttributeValueExt))
-  {
-    theInfoValues.append (anAttributeValueExt);
-    theValues[anAttributeValueExt] = DFBrowser_SearchItemInfo (QVariant(), anAttributeValueExt,
-                                                               theCurrentPath, QDir::separator());
-  }
-}
diff --git a/tools/DFBrowser/DFBrowser_ThreadItemSearch.hxx b/tools/DFBrowser/DFBrowser_ThreadItemSearch.hxx
deleted file mode 100644 (file)
index 1ed4382..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowser_ThreadItemSearch_H
-#define DFBrowser_ThreadItemSearch_H
-
-#include <inspector/DFBrowser_ThreadItem.hxx>
-#include <inspector/DFBrowser_SearchLineModel.hxx> // to include DFBrowser_SearchItemInfo
-
-#include <Standard.hxx>
-#include <TDF_Label.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QAbstractItemModel>
-#include <QMap>
-#include <QStringList>
-#include <Standard_WarningsRestore.hxx>
-
-class DFBrowser_Module;
-class DFBrowser_SearchLine;
-class DFBrowser_SearchLineModel;
-
-//! \class DFBrowser_ThreadItemSearch
-//! Iterates by OCAF application to fill internal containers with information necessary for search
-class DFBrowser_ThreadItemSearch : public DFBrowser_ThreadItem
-{
-public:
-
-  //! Constructor
-  DFBrowser_ThreadItemSearch (DFBrowser_SearchLine* theSearchLine) : mySearchLine (theSearchLine) {}
-
-  //! Destructor
-  virtual ~DFBrowser_ThreadItemSearch() {}
-
-  //! Obtains the current OCAF application from the current module, iterates by all documents to fill
-  //! internal containers for search functionality
-  Standard_EXPORT virtual void Run() Standard_OVERRIDE;
-
-  //! Sets filled containers into search line
-  Standard_EXPORT virtual void ApplyValues() Standard_OVERRIDE;
-
-  //! Clears search line values
-  Standard_EXPORT static void ClearValues (DFBrowser_SearchLine* theSearchLine);
-
-private:
-
-  //! Fills information containers by iterating through sub-labels and attributes
-  //! The method is recursive by labels.
-  //! \parm theLabel a current label, the label information is got and children and attributes information
-  //! \param theCurrentPath it contains the current path to the label (stores in container)
-  //! \param theValues container of document item values
-  //! \param theInfoValues container of document item values
-  void getLabelLines (const TDF_Label& theLabel, QStringList& theCurrentPath,
-                      QMap<QString, DFBrowser_SearchItemInfo >& theValues, QStringList& theInfoValues);
-
-  //! Adds label information into container: search will be performed by label entry
-  //! \parm theLabel a current label
-  //! \param theCurrentPath it contains the current path to the label (stores in container)
-  //! \param theValues container of document item values
-  //! \param theInfoValues container of document item values
-  void addLabel (const TDF_Label& theLabel, const QStringList& theCurrentPath,
-                 QMap<QString, DFBrowser_SearchItemInfo>& theValues, QStringList& theInfoValues);
-
-  //! Adds attribute information, it is either attribute kind or attribute value for TDataStd_Name or TDataStd_Comment
-  //! \parm theAttribute a current attribute
-  //! \param theCurrentPath it contains the current path to the label (stores in container)
-  //! \param theValues container of document item values
-  //! \param theInfoValues container of document item values
-  void addAttribute (const Handle(TDF_Attribute)& theAttribute, const QStringList& theCurrentPath,
-                     QMap<QString, DFBrowser_SearchItemInfo>& theValues, QStringList& theInfoValues);
-
-private:
-
-  DFBrowser_SearchLine* mySearchLine; //!< class that should be filled by apply of the thread item
-  //!< a document index to container of entry/attribute name to item information
-  QMap<int, QMap<QString, DFBrowser_SearchItemInfo > > myDocumentValues;
-  QMap<int, QStringList> myDocumentInfoValues; //!< a document index to entry/attribute name
-};
-
-
-#endif
index 2e6d4dde897128ea61cde83dea983d11ff05d17d..4b59aa79a77f1d6d5fe9b1581cbe1a8e3fa54407 100644 (file)
@@ -31,8 +31,6 @@
 #include <inspector/DFBrowser_PropertyPanel.hxx>
 #include <inspector/DFBrowser_SearchLine.hxx>
 #include <inspector/DFBrowser_SearchView.hxx>
-#include <inspector/DFBrowser_Thread.hxx>
-#include <inspector/DFBrowser_ThreadItemSearch.hxx>
 #include <inspector/DFBrowser_Tools.hxx>
 #include <inspector/DFBrowser_TreeLevelLine.hxx>
 #include <inspector/DFBrowser_TreeLevelView.hxx>
@@ -209,8 +207,6 @@ DFBrowser_Window::DFBrowser_Window()
   myMainWindow->tabifyDockWidget (aDumpDockWidget, aViewDockWidget);
 
   myTreeView->resize (DFBROWSER_DEFAULT_TREE_VIEW_WIDTH, DFBROWSER_DEFAULT_TREE_VIEW_HEIGHT);
-
-  myThread = new DFBrowser_Thread (this);
 }
 
 // =======================================================================
@@ -457,8 +453,7 @@ void DFBrowser_Window::Init (const NCollection_List<Handle(Standard_Transient)>&
   //! expand first three levels: CUSTOM
   QModelIndex aParentIndex = aModel->index (0, 0);
   setExpandedLevels (myTreeView, aParentIndex, 3/*levels*/);
-
-  myThread->ProcessApplication();
+  
   myModule->SetInitialTreeViewSelection();
 }
 
@@ -469,7 +464,6 @@ void DFBrowser_Window::Init (const NCollection_List<Handle(Standard_Transient)>&
 void DFBrowser_Window::OpenFile (const TCollection_AsciiString& theFileName)
 {
   QApplication::setOverrideCursor (Qt::WaitCursor);
-  myThread->TerminateThread();
 
   myTreeLevelLine->ClearHistory();
   QItemSelectionModel* aSelectionModel = myModule->GetOCAFViewSelectionModel();
@@ -479,7 +473,6 @@ void DFBrowser_Window::OpenFile (const TCollection_AsciiString& theFileName)
     QModelIndex anIndex;
     aSelectionModel->select (anIndex, QItemSelectionModel::ClearAndSelect);
   }
-  ClearThreadCache();
 
   myTreeLevelLine->ClearHistory();
 
@@ -520,7 +513,6 @@ void DFBrowser_Window::OpenFile (const TCollection_AsciiString& theFileName)
     QModelIndex aParentIndex = anOCAFViewModel->index (0, 0);
     setExpandedLevels (myTreeView, aParentIndex, 3/*levels*/);
 
-    myThread->ProcessApplication();
     myModule->SetInitialTreeViewSelection();
     QApplication::restoreOverrideCursor();
   }
@@ -592,17 +584,6 @@ void DFBrowser_Window::setOCAFModel (QAbstractItemModel* theModel)
 void DFBrowser_Window::onBeforeUpdateTreeModel()
 {
   myTreeLevelLine->ClearHistory();
-  ClearThreadCache();
-  myThread->ProcessApplication();
-}
-
-// =======================================================================
-// function : ClearThreadCache
-// purpose :
-// =======================================================================
-void DFBrowser_Window::ClearThreadCache()
-{
-  DFBrowser_ThreadItemSearch::ClearValues (GetTreeLevelLine()->GetSearchLine());
 }
 
 // =======================================================================
index eb4459e1054e346a87944c1c6f490e6649da400b..5b1564ccaf4632052ebd50f3cdfe5f80446f9ec6 100644 (file)
@@ -35,7 +35,6 @@
 class DFBrowser_DumpView;
 class DFBrowser_Module;
 class DFBrowser_PropertyPanel;
-class DFBrowser_Thread;
 class DFBrowser_TreeLevelLine;
 
 class ViewControl_MessageDialog;
@@ -92,12 +91,12 @@ public:
   //! Fills controls of the plugin by parameters:
   //! - Find TDocStd_Application and fills OCAF tree model if it differs from the current application
   //! - Fine AIS_InteractiveObject and fills View if it if it differs from the current context
-  //! - If it is the first call, it creates module, start thread to cache application information, fills selection models
+  //! - If it is the first call, it creates module, fills selection models
   //! \param theParameters a parameters container
   Standard_EXPORT void Init (const NCollection_List<Handle(Standard_Transient)>& theParameters);
 
   //! Opens application by the name, it may be either OCAF document or STEP file.
-  //! Before opening it cleans tree view history, current selections, stop threads(if it was started),
+  //! Before opening it cleans tree view history, current selections,
   //! reset OCAF tree view model. After opening document, it fills all controls by the created application.
   //! \param theFileName a file name to be opened
   Standard_EXPORT void OpenFile (const TCollection_AsciiString& theFileName);
@@ -108,9 +107,6 @@ public:
   //! Returns the current module
   DFBrowser_Module* GetModule() const { return myModule; }
 
-  //! Clears thread cache
-  Standard_EXPORT void ClearThreadCache();
-
   //! Returns tree level line control
   DFBrowser_TreeLevelLine* GetTreeLevelLine() const { return myTreeLevelLine; }
 
@@ -126,7 +122,7 @@ public:
 
 private slots:
 
-  //! Cleans history in tree level line, clears cache of thread processing, starts threads for application
+  //! Cleans history in tree level line
   void onBeforeUpdateTreeModel();
 
   //! Shows context menu for tree view selected item. It contains clear view or BREP operations items
@@ -233,7 +229,6 @@ private:
   ViewControl_PropertyView* myPropertyView; //!< property control to display model item values if exist
   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
   ViewControl_MessageDialog* myExportToShapeViewDialog; //!< dialog about exporting TopoDS_Shape to ShapeView plugin
   Handle(TInspectorAPI_PluginParameters) myParameters; //!< contains application, context, files that should be opened
   QString myOpenedFileName; //!< cached name of opened file between parent is set, apply it by parent setting and nullify
index 349918d9c3f95455dfcdd57526499ce01a21f4b4..d4d1f2b2cf6ef6dc4985eece3a3d19b2e1f8ee86 100644 (file)
@@ -30,11 +30,6 @@ DFBrowser_SearchLineModel.cxx
 DFBrowser_SearchLineModel.hxx
 DFBrowser_SearchView.cxx
 DFBrowser_SearchView.hxx
-DFBrowser_Thread.cxx
-DFBrowser_Thread.hxx
-DFBrowser_ThreadItem.hxx
-DFBrowser_ThreadItemSearch.cxx
-DFBrowser_ThreadItemSearch.hxx
 DFBrowser_Tools.cxx
 DFBrowser_Tools.hxx
 DFBrowser_TreeLevelLine.cxx