X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_Preferences.h;h=1fcb0d8ea2da349b9051f6a3ef68b6373e63d8c8;hb=b3025c793455da0df5d0fe83455a7f45c64e885e;hp=d156f5f708f24fcec6a3b09758524ea718c74296;hpb=dfdb2899a4cb4eaea4cdce45fa7c05ec0c5c807a;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_Preferences.h b/src/ModuleBase/ModuleBase_Preferences.h index d156f5f70..1fcb0d8ea 100644 --- a/src/ModuleBase/ModuleBase_Preferences.h +++ b/src/ModuleBase/ModuleBase_Preferences.h @@ -1,8 +1,22 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D - -// File: ModuleBase_Preferences.h -// Created: 07 Aug 2014 -// Author: Vitaly SMETANNIKOV +// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or +// email : webmaster.salome@opencascade.com +// #ifndef ModuleBase_Preferences_H #define ModuleBase_Preferences_H @@ -23,6 +37,7 @@ typedef QPair ModuleBase_Pref; typedef QList ModuleBase_Prefs; //*********************************************************************** +/// \ingroup GUI /// Class for manipulation with preferences in the application class MODULEBASE_EXPORT ModuleBase_Preferences { @@ -41,19 +56,13 @@ class MODULEBASE_EXPORT ModuleBase_Preferences static SUIT_ResourceMgr* resourceMgr(); /// Sets a resource manager - /// It is used in case of necessity to define external resource manager (not NewGeom) + /// It is used in case of necessity to define external resource manager (not SHAPER) /// \param theMgr resource manager static void setResourceMgr(SUIT_ResourceMgr* theMgr) { myResourceMgr = theMgr; } /// Updates Config_PropManager properties by module from SUIT_ResourceMgr static void updateConfigByResources(); - /// Updates SUIT_ResourceMgr values by Config_PropManager properties - static void updateResourcesByConfig(); - - /// Set default values to the Config_PropManager properties - static void resetConfig(); - /// Loads properties defined by module to Config_PropManager static void loadCustomProps(); @@ -62,7 +71,19 @@ class MODULEBASE_EXPORT ModuleBase_Preferences /// \param thePage an id of a page static void createEditContent(ModuleBase_IPrefMgr* thePref, int thePage); + /// Retrieve preferences of resource manage to default state + static void resetResourcePreferences(SUIT_PreferenceMgr* thePref); + + /// Retrieve preferences of config prop to default state + static void resetConfigPropPreferences(SUIT_PreferenceMgr* thePref); + private: + /// Updates SUIT_ResourceMgr values by Config_PropManager properties + static void updateResourcesByConfig(); + + /// Set default values to the Config_PropManager properties + static void resetConfig(); + /// Creates content of preferences editing widget static void createCustomPage(ModuleBase_IPrefMgr* thePref, int thePageId); @@ -70,6 +91,7 @@ private: }; //*********************************************************************** +/// \ingroup GUI /// Manager of preferences class MODULEBASE_EXPORT ModuleBase_PreferencesMgr : public SUIT_PreferenceMgr { @@ -102,6 +124,7 @@ Q_OBJECT }; //*********************************************************************** +/// \ingroup GUI /// Dialog box for preferences editing class MODULEBASE_EXPORT ModuleBase_PreferencesDlg : public QDialog { @@ -137,7 +160,7 @@ protected slots: /// Create a viewer page in dialog box void createViewerPage(int thePageId); - + /// Create menu properties page in the dialog box void createMenuPage(int thePageId);