2 * ModuleBase_PageBase.h
4 * Created on: Mar 4, 2015
8 #ifndef MODULEBASE_PAGEBASE_H_
9 #define MODULEBASE_PAGEBASE_H_
11 #include <ModuleBase.h>
12 #include <ModuleBase_Tools.h>
14 class ModuleBase_ModelWidget;
19 * Represent a property panel's list of ModuleBase_ModelWidgets
20 * or other pages widgets derived from ModuleBase_PageBase.
22 class MODULEBASE_EXPORT ModuleBase_PageBase
26 ModuleBase_PageBase();
27 /// Base virtual destructor.
28 virtual ~ModuleBase_PageBase();
29 /// Cast the page to regular QWidget
30 QWidget* pageWidget();
31 /// Adds the given ModuleBase_ModelWidget to the page
32 void addModelWidget(ModuleBase_ModelWidget* theWidget);
33 /// Adds the given ModuleBase_PageBase to the page
34 void addPageWidget(ModuleBase_PageBase* theWidget);
35 /// Removes all items from page's layout
37 /// Passes focus from page to the first ModuleBase_ModelWidget contained on the page
39 /// Returns list of ModuleBase_ModelWidgets contained on the page
40 QList<ModuleBase_ModelWidget*> modelWidgets();
41 /// Aligns top all widgets on page
45 /// Pure Virtual. Allows to derived class to lay out the widget properly;
46 virtual void placeModelWidget(ModuleBase_ModelWidget* theWidget) = 0;
47 /// Pure Virtual. Allows to derived class to lay out the page properly;
48 virtual void placePageWidget(ModuleBase_PageBase* theWidget) = 0;
49 /// Pure Virtual. Returns layout of the page.
50 virtual QLayout* pageLayout() = 0;
51 /// Pure Virtual. Allows to derived class to insert page stretch properly.
52 virtual void addPageStretch() = 0;
55 QList<ModuleBase_ModelWidget*> myWidgetList; ///< list of widgets contained on the page
59 #endif /* MODULEBASE_PAGEBASE_H_ */