1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: SamplePanelPlugin_WidgetCreator.h
4 // Created: 29 Mar 2015
5 // Author: Natalia ERMOLAEVA
7 #ifndef SamplePanelPlugin_WidgetCreator_H
8 #define SamplePanelPlugin_WidgetCreator_H
10 #include "SamplePanelPlugin.h"
12 #include <ModuleBase_IWidgetCreator.h>
21 * Interface to WidgetCreator which can create specific widgets by type
23 class SamplePanelPlugin_WidgetCreator : public ModuleBase_IWidgetCreator
26 /// Default constructor
27 SamplePanelPlugin_WidgetCreator();
29 /// Virtual destructor
30 ~SamplePanelPlugin_WidgetCreator() {}
32 /// Returns a container of possible page types, which this creator can process
33 /// \param theTypes a list of type names
34 virtual void panelTypes(std::set<std::string>& theTypes);
36 /// Create panel control by its type.
37 /// \param theType a panel type
38 /// \param theParent a parent widget
39 /// \param theFeature a feature to fill the panel
40 /// \return created widget or null
41 virtual QWidget* createPanelByType(const std::string& theType,
43 const FeaturePtr& theFeature);
45 std::set<std::string> myPanelTypes; /// types of panels