1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 * ModuleBase_PagedContainer.h
5 * Created on: Mar 13, 2015
9 #ifndef MODULEBASE_PAGEDCONTAINER_H_
10 #define MODULEBASE_PAGEDCONTAINER_H_
12 #include <ModuleBase.h>
13 #include <ModuleBase_ModelWidget.h>
15 class ModuleBase_PageBase;
19 * This is an abstract interface to be used for not model container widget such as switch or tool box.
21 class MODULEBASE_EXPORT ModuleBase_PagedContainer : public ModuleBase_ModelWidget
26 /// \param theParent a parent widget
27 /// \param theData a data of the widget
28 ModuleBase_PagedContainer(QWidget* theParent, const Config_WidgetAPI* theData);
29 virtual ~ModuleBase_PagedContainer();
32 /// \param theWidget a page object
33 /// \param theName a name of the page
34 /// \param theCaseId an Id of the page
35 /// \param theIcon aqn Icon of the page
36 virtual int addPage( ModuleBase_PageBase* theWidget,
37 const QString& theName,
38 const QString& theCaseId,
39 const QPixmap& theIcon );
41 /// Redefinition of virtual function
42 virtual QList<QWidget*> getControls() const;
44 /// Redefinition of virtual function
45 virtual bool focusTo();
47 /// Redefinition of virtual function
48 virtual void setHighlighted(bool isHighlighted);
50 /// Redefinition of virtual function
51 virtual void enableFocusProcessing();
54 /// Returns index of current page
55 virtual int currentPageIndex() const = 0;
57 /// Set current page by index
58 virtual void setCurrentPageIndex(int ) = 0;
60 /// Redefinition of virtual function
61 virtual void activateCustom();
63 /// Redefinition of virtual function
64 virtual bool storeValueCustom();
66 /// Redefinition of virtual function
67 virtual bool restoreValueCustom();
70 /// A slot called on page change
74 bool myIsFocusOnCurrentPage;
75 QStringList myCaseIds;
76 QList<ModuleBase_PageBase*> myPages;
80 #endif /* MODULEBASE_PAGEDCONTAINER_H_ */