// 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 TInspector_Communicator_H #define TInspector_Communicator_H #include #include #include #include #include class QPushButton; //! \class TInspector_Communicator. //! \brief This is a connector from TInspector window to: //! - register tool plugin //! - give parameters into plugin class TInspector_Communicator { public: //! Constructor Standard_EXPORT TInspector_Communicator(); //! Destructor virtual ~TInspector_Communicator() {} //! Registers plugin into TInspector window //! \param thePluginName a name of the plugin void RegisterPlugin (const TCollection_AsciiString& thePluginName) { myWindow->RegisterPlugin (thePluginName); } //! Stores parameters for the plugin //! \param theParameters container of parameters(e.g. AIS_InteractiveContext, TDocStd_Application) void Init (const NCollection_List& theParameters) { myWindow->Init ("", theParameters); } //! Stores parameters for the plugin //! \param thePluginName a name of the plugin //! \param theParameters container of parameters(e.g. AIS_InteractiveContext, TDocStd_Application) void Init (const TCollection_AsciiString& thePluginName, const NCollection_List& theParameters) { myWindow->Init (thePluginName, theParameters); } //! UpdateContent for the TInspector window void UpdateContent() { myWindow->UpdateContent(); } //! SetOpenButton for the TInspector window void SetOpenButton (QPushButton* theButton) { myWindow->SetOpenButton (theButton); } //! OpenFile in TInspector window void OpenFile (const TCollection_AsciiString& thePluginName, const TCollection_AsciiString& theFileName) { myWindow->OpenFile (thePluginName, theFileName); } //! Activates plugin //! \param thePluginName a name of the plugin void Activate (const TCollection_AsciiString& thePluginName) { myWindow->ActivateTool (thePluginName); } //! Change window visibility //! \param theVisible boolean state Standard_EXPORT virtual void SetVisible (const bool theVisible); private: TInspector_Window* myWindow; //!< current window }; #endif