1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 * ModuleBase_PageBase.h
5 * Created on: Mar 4, 2015
9 #ifndef MODULEBASE_PAGEBASE_H_
10 #define MODULEBASE_PAGEBASE_H_
12 #include <ModuleBase.h>
13 #include <ModuleBase_Tools.h>
15 class ModuleBase_ModelWidget;
20 * Represent a property panel's list of ModuleBase_ModelWidgets
21 * or other pages widgets derived from ModuleBase_PageBase.
23 class MODULEBASE_EXPORT ModuleBase_PageBase
27 ModuleBase_PageBase();
28 /// Base virtual destructor.
29 virtual ~ModuleBase_PageBase();
30 /// Cast the page to regular QWidget
31 QWidget* pageWidget();
32 /// Adds the given ModuleBase_ModelWidget to the page
33 void addModelWidget(ModuleBase_ModelWidget* theWidget);
34 /// Adds the given ModuleBase_PageBase to the page
35 void addPageWidget(ModuleBase_PageBase* theWidget);
36 /// Adds the given widget to the page
37 void addWidget(QWidget* theWidget);
38 /// Removes all items from page's layout
40 /// Passes focus from page to the first ModuleBase_ModelWidget contained on the page
42 /// Returns list of ModuleBase_ModelWidgets contained on the page
43 QList<ModuleBase_ModelWidget*> modelWidgets() const;
44 /// Aligns top all widgets on page
48 /// Pure Virtual. Allows to derived class to lay out the widget properly;
49 virtual void placeModelWidget(ModuleBase_ModelWidget* theWidget) = 0;
50 /// Pure Virtual. Allows to derived class to lay out the page properly;
51 virtual void placePageWidget(ModuleBase_PageBase* theWidget);
52 /// Pure Virtual. Allows to derived class to lay out the page properly;
53 virtual void placeWidget(QWidget* theWidget) = 0;
54 /// Pure Virtual. Returns layout of the page.
55 virtual QLayout* pageLayout() = 0;
56 /// Pure Virtual. Allows to derived class to insert page stretch properly.
57 virtual void addPageStretch() = 0;
60 QList<ModuleBase_ModelWidget*> myWidgetList; ///< list of widgets contained on the page
64 #endif /* MODULEBASE_PAGEBASE_H_ */