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