1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-13 14:27:08 +03:00

0029748: Samples - Inspector tool - use recently opened files in TInspectorEXE

- recently files using in open file dialog
- correction of TInspectorEXE title to show opened file path by Start
This commit is contained in:
nds
2018-05-08 20:21:08 +03:00
committed by abv
parent d0fbc7e5dd
commit 042e09aa36
14 changed files with 158 additions and 100 deletions

View File

@@ -222,6 +222,9 @@ void DFBrowser_Window::SetParent (void* theParent)
QLayout* aLayout = myParent->layout();
if (aLayout)
aLayout->addWidget (GetMainWindow());
if (!myOpenedFileName.isEmpty())
myParent->setObjectName(myOpenedFileName);
}
}
@@ -247,7 +250,6 @@ void DFBrowser_Window::FillActionsMenu (void* theMenu)
// =======================================================================
void DFBrowser_Window::GetPreferences (TInspectorAPI_PreferencesDataMap& theItem)
{
theItem.Clear();
theItem.Bind ("geometry", TreeModel_Tools::ToString (myMainWindow->saveState()).toStdString().c_str());
QMap<QString, QString> anItems;
@@ -498,6 +500,8 @@ void DFBrowser_Window::OpenFile (const TCollection_AsciiString& theFileName)
if (myParent)
myParent->setObjectName (isSTEPFileName ? QString (TCollection_AsciiString (theFileName).ToCString()) : getWindowTitle());
else
myOpenedFileName = isSTEPFileName ? QString(TCollection_AsciiString(theFileName).ToCString()) : getWindowTitle();
if (anApplication.IsNull())
{

View File

@@ -226,6 +226,7 @@ private:
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
};
#endif