2 * ModuleBase_PagedContainer.h
4 * Created on: Mar 13, 2015
8 #ifndef MODULEBASE_PAGEDCONTAINER_H_
9 #define MODULEBASE_PAGEDCONTAINER_H_
11 #include <ModuleBase.h>
12 #include <ModuleBase_ModelWidget.h>
14 class ModuleBase_PageBase;
18 * This is an abstract interface to be used for not model container widget such as switch or tool box.
20 class MODULEBASE_EXPORT ModuleBase_PagedContainer : public ModuleBase_ModelWidget
25 /// \param theParent a parent widget
26 /// \param theData a data of the widget
27 /// \param theParentId an Id of the parent object
28 ModuleBase_PagedContainer(QWidget* theParent, const Config_WidgetAPI* theData,
29 const std::string& theParentId);
30 virtual ~ModuleBase_PagedContainer();
33 /// \param theWidget a page object
34 /// \param theName a name of the page
35 /// \param theCaseId an Id of the page
36 /// \param theIcon aqn Icon of the page
37 virtual int addPage( ModuleBase_PageBase* theWidget,
38 const QString& theName,
39 const QString& theCaseId,
40 const QPixmap& theIcon );
42 /// Redefinition of virtual function
43 virtual QList<QWidget*> getControls() const;
45 /// Redefinition of virtual function
46 virtual bool focusTo();
48 /// Redefinition of virtual function
49 virtual void setHighlighted(bool isHighlighted);
51 /// Redefinition of virtual function
52 virtual void enableFocusProcessing();
55 /// Returns index of current page
56 virtual int currentPageIndex() const = 0;
58 /// Set current page by index
59 virtual void setCurrentPageIndex(int ) = 0;
61 /// Redefinition of virtual function
62 virtual void activateCustom();
64 /// Redefinition of virtual function
65 virtual bool storeValueCustom() const;
67 /// Redefinition of virtual function
68 virtual bool restoreValueCustom();
71 /// A slot called on page change
75 bool myIsFocusOnCurrentPage;
76 QStringList myCaseIds;
77 QList<ModuleBase_PageBase*> myPages;
81 #endif /* MODULEBASE_PAGEDCONTAINER_H_ */