SHAPER 9.16.0
ModuleBase_PageBase.h
1// Copyright (C) 2014-2026 CEA, EDF
2//
3// This library is free software; you can redistribute it and/or
4// modify it under the terms of the GNU Lesser General Public
5// License as published by the Free Software Foundation; either
6// version 2.1 of the License, or (at your option) any later version.
7//
8// This library is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11// Lesser General Public License for more details.
12//
13// You should have received a copy of the GNU Lesser General Public
14// License along with this library; if not, write to the Free Software
15// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16//
17// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18//
19
20#ifndef MODULEBASE_PAGEBASE_H_
21#define MODULEBASE_PAGEBASE_H_
22
23#include <ModuleBase.h>
24#include <ModuleBase_Tools.h>
25
27class QLayout;
28class QWidget;
29
34class MODULEBASE_EXPORT ModuleBase_PageBase
35{
36 public:
40 virtual ~ModuleBase_PageBase();
42 QWidget* pageWidget();
44 void addModelWidget(ModuleBase_ModelWidget* theWidget);
46 void addPageWidget(ModuleBase_PageBase* theWidget);
48 void addWidget(QWidget* theWidget);
50 void clearPage();
52 bool takeFocus();
54 QList<ModuleBase_ModelWidget*> modelWidgets() const;
56 void alignToTop();
57
58 protected:
60 virtual void placeModelWidget(ModuleBase_ModelWidget* theWidget) = 0;
62 virtual void placePageWidget(ModuleBase_PageBase* theWidget);
64 virtual void placeWidget(QWidget* theWidget) = 0;
66 virtual QLayout* pageLayout() = 0;
68 virtual void addPageStretch() = 0;
69
70 private:
71 QList<ModuleBase_ModelWidget*> myWidgetList;
72
73};
74
75#endif /* MODULEBASE_PAGEBASE_H_ */
An abstract custom widget class.
Definition: ModuleBase_ModelWidget.h:60
Definition: ModuleBase_PageBase.h:35
virtual void placeModelWidget(ModuleBase_ModelWidget *theWidget)=0
Pure Virtual. Allows to derived class to lay out the widget properly;.
virtual void addPageStretch()=0
Pure Virtual. Allows to derived class to insert page stretch properly.
virtual void placeWidget(QWidget *theWidget)=0
Pure Virtual. Allows to derived class to lay out the page properly;.
virtual QLayout * pageLayout()=0
Pure Virtual. Returns layout of the page.