Salome HOME
Issue #653 - Double and triple click edges -- Fix Debian dynamic_pointer_cast problem...
[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 "ModuleBase.h"
12
13 #include <QString>
14 #include <SUIT_PreferenceMgr.h>
15
16 /** 
17 * \ingroup GUI
18 * An interface class which provides incapsulation of SUIT_PreferenceMgr class instance 
19 * It is used in order to make common interface to Preference manager in Salome 
20 * and this application
21 */
22 class MODULEBASE_EXPORT ModuleBase_IPrefMgr
23 {
24 public:
25   /// Default constructor
26   ModuleBase_IPrefMgr();
27   /// Virtual destructor
28   virtual ~ModuleBase_IPrefMgr();
29
30   /** 
31   * Add preference item into preference dialog box
32   * \param theLbl - label of the item
33   * \param pId - id of container item
34   * \param theType - type of the item
35   * \param theSection - resouce section name
36   * \param theName - name of the resource
37   * Returns Id of the ctreated item
38   */
39   virtual int addPreference(const QString& theLbl, int pId, 
40                             SUIT_PreferenceMgr::PrefItemType theType,
41                             const QString& theSection, const QString& theName ) = 0;
42
43   /**
44   * \brief Set property of an item
45   * \param thePropName the property name
46   * \param theValue the value of the property
47   * \param theId id of the property
48   */
49   virtual void setItemProperty(const QString& thePropName,
50                                const QVariant& theValue,
51                                const int theId = -1) = 0;
52
53   /// Returns incapsulated preference manager
54   virtual SUIT_PreferenceMgr* prefMgr() const = 0;
55 };
56
57 #endif