Salome HOME
Merge branch 'Dev_1.2.0' of newgeom:newgeom.git into Dev_1.2.0
[modules/shaper.git] / src / ModuleBase / ModuleBase_IPrefMgr.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        ModuleBase_IPrefMgr.h
4 // Created:     10 Sept 2014
5 // Author:      Vitaly SMETANNIKOV
6
7
8 #ifndef ModuleBase_IPrefMgr_H
9 #define ModuleBase_IPrefMgr_H
10
11 #include <QString>
12 #include <SUIT_PreferenceMgr.h>
13
14 /** 
15 * \ingroup GUI
16 * An interface class which provides incapsulation of SUIT_PreferenceMgr class instance 
17 * It is used in order to make common interface to Preference manager in Salome 
18 * and this application
19 */
20 class ModuleBase_IPrefMgr
21 {
22 public:
23
24   /** 
25   * Add preference item into preference dialog box
26   * \param theLbl - label of the item
27   * \param pId - id of container item
28   * \param theType - type of the item
29   * \param theSection - resouce section name
30   * \param theName - name of the resource
31   * Returns Id of the ctreated item
32   */
33   virtual int addPreference(const QString& theLbl, int pId, 
34                             SUIT_PreferenceMgr::PrefItemType theType,
35                             const QString& theSection, const QString& theName ) = 0;
36
37   /**
38   * \brief Set property of an item
39   * \param thePropName the property name
40   * \param theValue the value of the property
41   * \param theId id of the property
42   */
43   virtual void setItemProperty(const QString& thePropName,
44                                const QVariant& theValue,
45                                const int theId = -1) = 0;
46
47   /// Returns incapsulated preference manager
48   virtual SUIT_PreferenceMgr* prefMgr() const = 0;
49 };
50
51 #endif