X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_PagedContainer.h;h=863390897e1a7833eeed9bf71db9faf85fba6e93;hb=423f6b0a08a86d5e47115b87603cddeae4468b49;hp=d0677d3c0d4ef500dce61cdb6bb6afcbba8e224d;hpb=ec6aaa4d8bd3609b04ea85683e1b1175b6632238;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_PagedContainer.h b/src/ModuleBase/ModuleBase_PagedContainer.h index d0677d3c0..863390897 100644 --- a/src/ModuleBase/ModuleBase_PagedContainer.h +++ b/src/ModuleBase/ModuleBase_PagedContainer.h @@ -1,3 +1,4 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D /* * ModuleBase_PagedContainer.h * @@ -13,31 +14,60 @@ class ModuleBase_PageBase; +/** +* \ingroup GUI +* This is an abstract interface to be used for not model container widget such as switch or tool box. +*/ class MODULEBASE_EXPORT ModuleBase_PagedContainer : public ModuleBase_ModelWidget { Q_OBJECT public: - ModuleBase_PagedContainer(QWidget* theParent, const Config_WidgetAPI* theData, - const std::string& theParentId); + /// A constructor + /// \param theParent a parent widget + /// \param theData a data of the widget + ModuleBase_PagedContainer(QWidget* theParent, const Config_WidgetAPI* theData); virtual ~ModuleBase_PagedContainer(); - virtual int addPage(ModuleBase_PageBase* theWidget, - const QString& theName, const QString& theCaseId); - // ModuleBase_ModelWidget + /// Add a new page + /// \param theWidget a page object + /// \param theName a name of the page + /// \param theCaseId an Id of the page + /// \param theIcon aqn Icon of the page + virtual int addPage( ModuleBase_PageBase* theWidget, + const QString& theName, + const QString& theCaseId, + const QPixmap& theIcon ); + + /// Redefinition of virtual function virtual QList getControls() const; + + /// Redefinition of virtual function virtual bool focusTo(); + + /// Redefinition of virtual function virtual void setHighlighted(bool isHighlighted); + + /// Redefinition of virtual function virtual void enableFocusProcessing(); - virtual bool restoreValue(); protected: + /// Returns index of current page virtual int currentPageIndex() const = 0; + + /// Set current page by index virtual void setCurrentPageIndex(int ) = 0; - // ModuleBase_ModelWidget + + /// Redefinition of virtual function virtual void activateCustom(); - virtual bool storeValueCustom() const; + + /// Redefinition of virtual function + virtual bool storeValueCustom(); + + /// Redefinition of virtual function + virtual bool restoreValueCustom(); protected slots: + /// A slot called on page change void onPageChanged(); private: