fdffb12b489af867c8df12daf4ad76211900611b
[occt.git] / tools / VInspector / VInspector_Communicator.hxx
1 // Created on: 2017-06-16
2 // Created by: Natalia ERMOLAEVA
3 // Copyright (c) 2017 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement. 
15
16 #ifndef VInspector_Communicator_H
17 #define VInspector_Communicator_H
18
19 #include <Standard.hxx>
20 #include <Standard_Macro.hxx>
21 #include <inspector/VInspector_Window.hxx>
22
23 #include <inspector/TInspectorAPI_Communicator.hxx>
24
25 //! \class VInspector_Communicator.
26 //! \brief This is a connector from TInspector application to VInspector view
27 class VInspector_Communicator : public TInspectorAPI_Communicator
28 {
29 public:
30
31   //! Constructor
32   Standard_EXPORT VInspector_Communicator();
33
34   //! Destructor
35   virtual ~VInspector_Communicator() Standard_OVERRIDE {}
36
37   //! Provides the container with a parent where this container should be inserted.
38   //! If Qt implementation, it should be QWidget with QLayout set inside
39   //! \param theParent a parent class
40   virtual void SetParent (void* theParent) Standard_OVERRIDE { myWindow->SetParent (theParent); }
41
42   //! Sets parameters container, it should be used when the plugin is initialized or in update content
43   //! \param theParameters a parameters container
44   virtual void SetParameters (const Handle(TInspectorAPI_PluginParameters)& theParameters) Standard_OVERRIDE
45   { myWindow->SetParameters (theParameters); }
46
47   //! Calls update of the plugin's content
48   virtual void UpdateContent() Standard_OVERRIDE { myWindow->UpdateContent(); }
49
50 private:
51   VInspector_Window* myWindow; //!< current window
52 };
53
54 #endif